[go: up one dir, main page]

CN116204144A - Screen throwing method and device based on virtual screen of vehicle machine, vehicle machine equipment and vehicle - Google Patents

Screen throwing method and device based on virtual screen of vehicle machine, vehicle machine equipment and vehicle Download PDF

Info

Publication number
CN116204144A
CN116204144A CN202211566904.1A CN202211566904A CN116204144A CN 116204144 A CN116204144 A CN 116204144A CN 202211566904 A CN202211566904 A CN 202211566904A CN 116204144 A CN116204144 A CN 116204144A
Authority
CN
China
Prior art keywords
screen
virtual screen
application
car
expected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211566904.1A
Other languages
Chinese (zh)
Inventor
侯雨杉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202211566904.1A priority Critical patent/CN116204144A/en
Publication of CN116204144A publication Critical patent/CN116204144A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • G06F3/1462Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay with means for detecting differences between the image stored in the host and the images displayed on the remote displays
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明实施例公开了一种基于车机虚拟屏的投屏方法、装置、车机设备及车辆,该方法包括:在车机设备与终端设备连接后,接收终端设备的投屏指令,投屏指令携带未适配应用的投屏数据,在未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏,在目标虚拟屏上显示投屏数据;能够在不侵入未适配应用的前提下,结合预期屏幕参数创建虚拟屏,确保未适配应用可以在不同分辨率的车机屏幕上正常显示,提升未适配应用显示的完整性和可用性,使得未适配应用在所有车机上获得几乎一致的视觉感受和交互体验。

Figure 202211566904

The embodiment of the present invention discloses a screen projection method, device, vehicle equipment and vehicle based on the virtual screen of the vehicle. The command carries the projection data of the unadapted application. When the unadapted application is an application that does not support full-screen adaptive display, the target virtual screen is created according to the expected screen parameters of the car virtual screen and the application group to which the unadapted application belongs. Display the projected screen data on the target virtual screen; without intruding into the unadapted application, a virtual screen can be created in combination with the expected screen parameters to ensure that the unadapted application can be displayed normally on the car screen with different resolutions, and the unadapted application can be improved. The integrity and usability of the display of the adapted application enables the non-adapted application to obtain almost the same visual experience and interactive experience on all vehicles.

Figure 202211566904

Description

一种基于车机虚拟屏的投屏方法、装置、车机设备及车辆Screen projection method, device, vehicle-machine equipment and vehicle based on vehicle-machine virtual screen

技术领域technical field

本申请涉及车机互联技术领域,尤其涉及一种基于车机虚拟屏的投屏方法、装置、车机设备及车辆。The present application relates to the technical field of vehicle-machine interconnection, and in particular to a screen projection method, device, vehicle-machine equipment and vehicle based on a vehicle-machine virtual screen.

背景技术Background technique

随着车机互联技术的发展,用户对出行产品的需求不再仅仅局限于通话、导航、音乐,用户对于娱乐、休闲、工作等应用多样性的需求也随之越来越高。但是,手机上部分第三方应用存在合作困难、难以接入到车机系统的问题。而为了提升各公司出行产品的核心竞争力和用户体验,一些出行产品都提供了支持未适配应用运行在车机投屏的功能,且比较常见的技术是直接在车机虚拟屏上全屏启动手机上的未适配应用。With the development of car-machine interconnection technology, users' demand for travel products is no longer limited to calls, navigation, and music, and users' demand for entertainment, leisure, work and other applications is also increasing. However, some third-party applications on mobile phones have difficulties in cooperation and access to the car-machine system. In order to improve the core competitiveness and user experience of the travel products of various companies, some travel products provide the function of supporting unadapted applications to run on the car-machine mirroring screen, and the more common technology is to directly start the full-screen on the car-machine virtual screen Unadapted apps on the phone.

但是,在实际应用中发现,由于市面上车企较多,各种车型车机屏幕大小不一、分辨率/屏幕像素密度不同,且未适配应用本身可能不支持自适应或者对自适应支持有限,导致未适配应用在不同分辨率的车机虚拟屏上表现不尽相同,部分界面可能存在异常,比如界面元素重叠、错乱、溢出,功能可用性较差,投屏效果差,直接影响到用户体验。However, in practical applications, it is found that due to the large number of car companies on the market, the screen sizes of various models are different, and the resolution/screen pixel density is different, and the unadapted application itself may not support self-adaptation or support self-adaptation Limited, resulting in different performances of non-adapted applications on the virtual screen of the car with different resolutions. Some interfaces may have abnormalities, such as overlapping, disordered, and overflowing interface elements, poor function usability, and poor screen projection effects, which directly affect the user experience.

发明内容Contents of the invention

本申请实施例公开了一种基于车机虚拟屏的投屏方法、装置、车机设备及车辆,能够实现未适配应用在不同屏幕分辨率车机上的完整投屏,确保投屏效果,提高用户体验。The embodiment of the present application discloses a screen projection method, device, vehicle equipment, and vehicle based on the virtual screen of the vehicle, which can realize the complete projection of the unadapted application on the vehicle with different screen resolutions, ensure the projection effect, and improve the user experience.

本申请实施例第一方面公开了一种基于车机虚拟屏的投屏方法,可包括:The first aspect of the embodiment of the present application discloses a screen projection method based on a car-machine virtual screen, which may include:

在车机设备与终端设备连接后,接收所述终端设备的投屏指令,所述投屏指令携带未适配应用的投屏数据;After the in-vehicle device is connected to the terminal device, a screen projection instruction of the terminal device is received, and the screen projection instruction carries screen projection data of an unadapted application;

在所述未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏;When the unadapted application is an application that does not support full-screen adaptive display, create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs;

在所述目标虚拟屏上显示所述投屏数据。The screen projection data is displayed on the target virtual screen.

作为一种可选的实施方式,在本申请实施例第一方面中,在所述未适配应用为不支持全屏自适应显示的应用时,以及所述根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏之前,所述方法还包括:As an optional implementation manner, in the first aspect of the embodiment of this application, when the unadapted application is an application that does not support full-screen adaptive display, and the Before configuring the expected screen parameters of the application group to which the application belongs, before creating the target virtual screen, the method further includes:

判断是否已创建有所述目标虚拟屏;judging whether the target virtual screen has been created;

若否,执行所述根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏的步骤。If not, execute the step of creating a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs.

作为一种可选的实施方式,在本申请实施例第一方面中,所述方法还包括:As an optional implementation manner, in the first aspect of the embodiment of the present application, the method further includes:

若已创建有所述目标虚拟屏,复用所述目标虚拟屏,以在所述目标虚拟屏上显示所述投屏数据。If the target virtual screen has already been created, multiplexing the target virtual screen to display the projection data on the target virtual screen.

作为一种可选的实施方式,在本申请实施例第一方面中,所述根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏,包括:As an optional implementation manner, in the first aspect of the embodiment of the present application, the creation of the target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs includes:

获取所述未适配应用所属应用组的预期屏幕参数,所述预期屏幕参数至少包括预期屏幕宽度、预期屏幕高度以及预期屏幕像素密度;Acquire expected screen parameters of the application group to which the unadapted application belongs, where the expected screen parameters at least include expected screen width, expected screen height, and expected screen pixel density;

根据所述预期屏幕参数创建目标虚拟屏;creating a target virtual screen according to the expected screen parameters;

将所述目标虚拟屏放置于尺寸相同的显示容器中;placing the target virtual screen in a display container of the same size;

根据所述车机虚拟屏的屏幕分辨率计算所述显示容器的缩放系数;calculating the scaling factor of the display container according to the screen resolution of the car-machine virtual screen;

根据所述缩放系数缩放所述显示容器;scaling the display container according to the scaling factor;

移动缩放后的显示容器以在所述车机虚拟屏完整显示所述目标虚拟屏;moving the scaled display container to completely display the target virtual screen on the car-machine virtual screen;

将所述车机虚拟屏的触摸事件注入所述目标虚拟屏。Injecting the touch event of the vehicle-machine virtual screen into the target virtual screen.

作为一种可选的实施方式,在本申请实施例第一方面中,所述根据所述车机虚拟屏的屏幕分辨率计算所述显示容器的缩放系数,包括:As an optional implementation manner, in the first aspect of the embodiments of the present application, the calculating the scaling factor of the display container according to the screen resolution of the car-machine virtual screen includes:

获取所述车机虚拟屏的实际屏幕参数,所述实际屏幕参数至少包括实际屏幕宽度和实际屏幕高度;Acquiring actual screen parameters of the car-machine virtual screen, where the actual screen parameters at least include actual screen width and actual screen height;

根据所述实际屏幕参数,计算所述车机虚拟屏的实际应用区域宽高比;According to the actual screen parameters, calculate the aspect ratio of the actual application area of the car-machine virtual screen;

根据所述预期屏幕参数,计算预期屏幕分辨率宽高比;Calculate an expected screen resolution aspect ratio according to the expected screen parameters;

根据所述实际屏幕参数、所述预期屏幕参数、所述实际应用区域宽高比和所述预期屏幕分辨率宽高比,计算所述显示容器的缩放系数。Calculate the scaling factor of the display container according to the actual screen parameters, the expected screen parameters, the actual application area aspect ratio and the expected screen resolution aspect ratio.

作为一种可选的实施方式,在本申请实施例第一方面中,所述移动缩放后的显示容器以在所述车机虚拟屏完整显示所述目标虚拟屏包括:As an optional implementation manner, in the first aspect of the embodiment of the present application, the moving the scaled display container to completely display the target virtual screen on the vehicle-machine virtual screen includes:

根据所述预期屏幕参数和所述缩放系数,计算横向平移量和纵向平移量;calculating a horizontal translation amount and a vertical translation amount according to the expected screen parameters and the scaling factor;

根据所述横向平移量和所述纵向平移量,移动缩放后的显示容器至所述车机虚拟屏的中心位置,以在所述车机虚拟屏上完整显示所述目标虚拟屏。According to the horizontal translation amount and the vertical translation amount, the zoomed display container is moved to the center of the vehicle-machine virtual screen, so as to completely display the target virtual screen on the vehicle-machine virtual screen.

作为一种可选的实施方式,在本申请实施例第一方面中,所述将所述车机虚拟屏的触摸事件注入所述目标虚拟屏,包括:As an optional implementation manner, in the first aspect of the embodiment of the present application, injecting the touch event of the vehicle-machine virtual screen into the target virtual screen includes:

监听所述车机虚拟屏的触摸事件;monitoring the touch event of the virtual screen of the vehicle;

获取所述车机虚拟屏的触摸事件坐标;Obtain the touch event coordinates of the car-machine virtual screen;

根据所述缩放系数对所述触摸事件坐标进行缩放处理;performing scaling processing on the coordinates of the touch event according to the scaling factor;

将处理后的触摸事件坐标注入所述目标虚拟屏。Inject the processed touch event coordinates into the target virtual screen.

作为一种可选的实施方式,在本申请实施例第一方面中,所述方法还包括:As an optional implementation manner, in the first aspect of the embodiment of the present application, the method further includes:

在所述未适配应用为支持全屏自适应显示的应用时,在所述车机虚拟屏上直接显示所述投屏数据。When the unadapted application is an application that supports full-screen adaptive display, the projected screen data is directly displayed on the car-machine virtual screen.

本申请实施例第二方面公开了一种基于车机虚拟屏的投屏装置,可包括:The second aspect of the embodiment of the present application discloses a screen projection device based on a car-machine virtual screen, which may include:

接收模块,用于在车机设备与终端设备连接后,接收所述终端设备的投屏指令,所述投屏指令携带未适配应用的投屏数据;The receiving module is configured to receive a screen projection instruction of the terminal equipment after the vehicle-machine equipment is connected to the terminal equipment, and the screen projection instruction carries screen projection data of unadapted applications;

创建模块,用于在所述未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏;A creation module, configured to create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs when the unadapted application is an application that does not support full-screen adaptive display;

启动模块,用于在所述目标虚拟屏上显示所述投屏数据。A starting module, configured to display the screen projection data on the target virtual screen.

作为一种可选的实施方式,在本申请实施例第二方面中,所述装置还包括:As an optional implementation manner, in the second aspect of the embodiment of the present application, the device further includes:

判断模块,用于在所述未适配应用为不支持全屏自适应显示的应用时,以及所述创建模块根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏之前,判断是否已创建有所述目标虚拟屏;A judging module, configured to create a target according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs when the unadapted application is an application that does not support full-screen adaptive display Before the virtual screen, determine whether the target virtual screen has been created;

所述创建模块,具体用于在所述判断模块的判断结果为否时,根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏。The creating module is specifically configured to create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs when the judgment result of the judging module is negative.

作为一种可选的实施方式,在本申请实施例第二方面中,所述启动模块,还用于在所述判断模块的判断结果为已创建有所述目标虚拟屏时,复用所述目标虚拟屏,以在所述目标虚拟屏上显示所述投屏数据。As an optional implementation manner, in the second aspect of the embodiments of the present application, the startup module is further configured to reuse the A target virtual screen, for displaying the screen projection data on the target virtual screen.

作为一种可选的实施方式,在本申请实施例第二方面中,所述创建模块用于根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏的方式具体为:As an optional implementation, in the second aspect of the embodiment of the present application, the creation module is used to create the target virtual screen according to the vehicle-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs. The specific method is:

获取所述未适配应用所属应用组的预期屏幕参数,所述预期屏幕参数至少包括预期屏幕宽度、预期屏幕高度以及预期屏幕像素密度;以及,根据所述预期屏幕参数创建目标虚拟屏;以及,将所述目标虚拟屏放置于尺寸相同的显示容器中;以及,根据所述车机虚拟屏的屏幕分辨率计算所述显示容器的缩放系数;以及,根据所述缩放系数缩放所述显示容器;以及,移动缩放后的显示容器以在所述车机虚拟屏完整显示所述目标虚拟屏;以及,将所述车机虚拟屏的触摸事件注入所述目标虚拟屏。Obtain expected screen parameters of the application group to which the unadapted application belongs, where the expected screen parameters at least include expected screen width, expected screen height, and expected screen pixel density; and, create a target virtual screen according to the expected screen parameters; and, placing the target virtual screen in a display container of the same size; and calculating a scaling factor of the display container according to the screen resolution of the vehicle-machine virtual screen; and scaling the display container according to the scaling factor; And, moving the scaled display container to completely display the target virtual screen on the car-machine virtual screen; and injecting a touch event of the car-machine virtual screen into the target virtual screen.

作为一种可选的实施方式,在本申请实施例第二方面中,所述创建模块用于根据所述车机的屏幕分辨率计算所述显示容器的缩放系数的方式具体为:As an optional implementation manner, in the second aspect of the embodiment of the present application, the manner in which the creation module is used to calculate the scaling factor of the display container according to the screen resolution of the car machine is as follows:

获取所述车机虚拟屏的实际屏幕参数,所述实际屏幕参数至少包括实际屏幕宽度和实际屏幕高度;根据所述实际屏幕参数,计算所述车机虚拟屏的实际应用区域宽高比;根据所述预期屏幕参数,计算预期屏幕分辨率宽高比;根据所述实际屏幕参数、所述预期屏幕参数、所述实际应用区域宽高比和所述预期屏幕分辨率宽高比,计算所述显示容器的缩放系数。Obtain the actual screen parameters of the car-machine virtual screen, the actual screen parameters at least include the actual screen width and the actual screen height; according to the actual screen parameters, calculate the actual application area aspect ratio of the car-machine virtual screen; Calculate the expected screen resolution aspect ratio of the expected screen parameters; calculate the expected screen resolution aspect ratio according to the actual screen parameters, the expected screen parameters, the actual application area aspect ratio and the expected screen resolution aspect ratio Displays the scaling factor of the container.

作为一种可选的实施方式,在本申请实施例第二方面中,所述创建模块用于移动缩放后的显示容器以在所述车机虚拟屏完整显示所述目标虚拟屏的方式具体为:As an optional implementation manner, in the second aspect of the embodiment of the present application, the manner in which the creation module is used to move the scaled display container to completely display the target virtual screen on the vehicle-machine virtual screen is as follows: :

根据所述预期屏幕参数和所述缩放系数,计算横向平移量和纵向平移量;以及,根据所述横向平移量和所述纵向平移量,移动缩放后的显示容器至所述车机虚拟屏的中心位置,以在所述车机虚拟屏上完整显示所述目标虚拟屏。Calculate the horizontal translation amount and the vertical translation amount according to the expected screen parameters and the zoom factor; and move the zoomed display container to the car-machine virtual screen according to the horizontal translation amount and the vertical translation amount center position, so as to completely display the target virtual screen on the car-machine virtual screen.

作为一种可选的实施方式,在本申请实施例第二方面中,所述创建模块用于将所述车机虚拟屏的触摸事件注入所述目标虚拟屏的方式具体为:As an optional implementation manner, in the second aspect of the embodiment of the present application, the method for the creation module to inject the touch event of the car-machine virtual screen into the target virtual screen is specifically:

监听所述车机虚拟屏的触摸事件;以及,获取所述车机虚拟屏的触摸事件坐标;以及,根据所述缩放系数对所述触摸事件坐标进行缩放处理;以及,将处理后的触摸事件坐标注入所述目标虚拟屏。Listening to the touch event of the car-machine virtual screen; and acquiring the touch event coordinates of the car-machine virtual screen; and scaling the touch event coordinates according to the scaling factor; and processing the processed touch event Coordinates are injected into the target virtual screen.

本申请实施例第三方面公开了一种车机设备,可包括:The third aspect of the embodiment of the present application discloses a vehicle-machine equipment, which may include:

存储有可执行程序代码的存储器;a memory storing executable program code;

与所述存储器耦合的处理器;a processor coupled to the memory;

所述处理器调用所述存储器中存储的所述可执行程序代码,执行本发明实施例第一方面公开的一种基于车机虚拟屏的投屏方法。The processor invokes the executable program code stored in the memory to execute a screen projection method based on a vehicle-machine virtual screen disclosed in the first aspect of the embodiments of the present invention.

本申请实施例第四方面公开了一种车辆,可包括:The fourth aspect of the embodiment of the present application discloses a vehicle, which may include:

如本申请实施例第三方面公开的车机设备。The vehicle-machine equipment disclosed in the third aspect of the embodiment of the present application.

本申请实施例第五方面公开一种计算机可读存储介质,其存储计算机程序,其中,所述计算机程序使得计算机执行本发明实施例第一方面公开的一种基于车机虚拟屏的投屏方法。The fifth aspect of the embodiment of the present application discloses a computer-readable storage medium, which stores a computer program, wherein the computer program causes the computer to execute the screen projection method based on the car-machine virtual screen disclosed in the first aspect of the embodiment of the present invention .

本申请实施例第六方面公开一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行第一方面的任意一种方法的部分或全部步骤。The sixth aspect of the embodiments of the present application discloses a computer program product, which, when running on a computer, causes the computer to execute part or all of the steps of any method of the first aspect.

本申请实施例第七方面公开一种应用发布平台,所述应用发布平台用于发布计算机程序产品,其中,当所述计算机程序产品在计算机上运行时,使得所述计算机执行第一方面的任意一种方法的部分或全部步骤。The seventh aspect of the embodiments of the present application discloses an application release platform, the application release platform is used to release computer program products, wherein, when the computer program products run on a computer, the computer executes any Some or all steps of a method.

与现有技术相比,本申请实施例具有以下有益效果:Compared with the prior art, the embodiment of the present application has the following beneficial effects:

在本申请实施例中,在车机设备与终端设备连接后,接收终端设备的投屏指令,该投屏指令携带未适配应用的投屏数据,在未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏,然后在目标虚拟屏上显示未适配应用的投屏数据;通过实施本申请实施例,能够在不侵入未适配应用的前提下,结合预期屏幕参数创建虚拟屏,确保未适配应用可以在不同分辨率的车机屏幕上正常显示,提升未适配应用显示的完整性和可用性,使得未适配应用在所有车机上获得几乎一致的视觉感受和交互体验。In this embodiment of the application, after the vehicle-machine device is connected to the terminal device, the screen projection command of the terminal device is received. The screen projection command carries the screen projection data of the unadapted application, and the unadapted application does not support full-screen adaptive When displaying an application, create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs, and then display the projection data of the unadapted application on the target virtual screen; by implementing the embodiment of the present application , can create a virtual screen based on expected screen parameters without intruding into unadapted applications, ensuring that unadapted applications can be displayed normally on car screens with different resolutions, and improving the integrity and usability of unadapted application displays , so that unadapted applications can obtain almost the same visual experience and interactive experience on all vehicles.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings that need to be used in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.

图1为本申请实施例公开的基于车机虚拟屏的投屏方法的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a screen projection method based on a car-machine virtual screen disclosed in an embodiment of the present application;

图2为本申请实施例一公开的基于车机虚拟屏的投屏方法的流程示意图;FIG. 2 is a schematic flow diagram of a screen projection method based on a car-machine virtual screen disclosed in Embodiment 1 of the present application;

图3为本申请实施例二公开的基于车机虚拟屏的投屏方法的流程示意图;FIG. 3 is a schematic flow diagram of the screen projection method based on the car-machine virtual screen disclosed in Embodiment 2 of the present application;

图4为本申请实施例三公开的基于车机虚拟屏的投屏方法的流程示意图;FIG. 4 is a schematic flow diagram of the screen projection method based on the car-machine virtual screen disclosed in Embodiment 3 of the present application;

图5为本申请实施例公开的车机虚拟屏的示意图;Fig. 5 is a schematic diagram of the car-machine virtual screen disclosed in the embodiment of the present application;

图6为在本申请实施例一公开的目标虚拟屏的示意图;FIG. 6 is a schematic diagram of a target virtual screen disclosed in Embodiment 1 of the present application;

图7为本申请实施例二公开的对目标虚拟屏进行缩放后的示意图;FIG. 7 is a schematic diagram of zooming the target virtual screen disclosed in Embodiment 2 of the present application;

图8为本申请实施例三公开的目标虚拟屏的示意图;FIG. 8 is a schematic diagram of the target virtual screen disclosed in Embodiment 3 of the present application;

图9为本申请实施例一公开的基于车机虚拟屏的投屏装置的结构示意图;FIG. 9 is a schematic structural diagram of a screen projection device based on a car-machine virtual screen disclosed in Embodiment 1 of the present application;

图10为本申请实施例二公开的基于车机虚拟屏的投屏装置的结构示意图;FIG. 10 is a schematic structural diagram of a screen projection device based on a car-machine virtual screen disclosed in Embodiment 2 of the present application;

图11为本申请实施例公开的车机设备的结构示意图;Fig. 11 is a schematic structural diagram of the vehicle-machine equipment disclosed in the embodiment of the present application;

图12为本申请实施例公开的车辆的结构示意图。Fig. 12 is a schematic structural diagram of a vehicle disclosed in an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some, not all, embodiments of the application. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

需要说明的是,本申请的说明书和权利要求书中的术语“第一”、“第二”、“第三”及“第四”等是用于区别不同的对象,而不是用于描述特定顺序。本申请实施例的术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", "third" and "fourth" in the specification and claims of this application are used to distinguish different objects, rather than to describe specific order. The terms "comprising" and "having" and any variations thereof in the embodiments of the present application are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to expressly instead of those steps or elements listed, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

本申请实施例涉及的终端设备可以是智能手机、可穿戴设备(智能手环、智能手表等)、平板电脑等电子设备。The terminal device involved in this embodiment of the present application may be an electronic device such as a smart phone, a wearable device (smart bracelet, smart watch, etc.), a tablet computer, or the like.

其中,本申请实施例涉及的未适配应用,是指终端设备上的第三方应用未在车机设备上对接过,即第三方应用厂商与车机设备的车企还没有事先就第三方应用进行对接,以按照车机设备的车企规划或要求对第三方应用进行特殊处理,来满足第三方应用能够在车机设备的虚拟屏上进行自适应全屏显示。因此,在本申请实施例中将未适配应用划分为三种类型的应用组:支持自适应全屏显示的应用、只支持横屏显示的应用及只支持竖屏显示的应用。其中,只支持横屏显示的应用及只支持竖屏显示的应用也统称为不支持自适应全屏显示的应用。对于只支持横屏显示的应用,可以直接在车机虚拟屏上自适应全屏显示,对于只支持横屏显示的应用,在本申请实施例中需要根据未适配应用所属应用组的特性,即只支持横屏这一特性,预先设定对应的预期屏幕参数,并结合车机虚拟屏来创建出适于显示的目标虚拟屏,在目标虚拟屏上显示应用;对于只支持竖屏显示的应用,在本申请实施例中需要根据未适配应用所属应用组的特性,即只支持竖屏这一特性,预先设定对应的预期屏幕参数,并结合车机虚拟屏来创建出适于显示的目标虚拟屏,在目标虚拟屏上显示应用,其中,只支持横屏显示的应用所在的应用组对应的预期屏幕参数与只支持竖屏显示的应用所在的应用组对应的预期屏幕参数是不同的。Among them, the unadapted application involved in the embodiment of this application refers to the third-party application on the terminal device that has not been connected to the car-machine device, that is, the third-party application manufacturer and the car company of the car-machine device have not agreed on the third-party application in advance. Docking is carried out to carry out special processing for third-party applications according to the vehicle company's plan or requirements, so that third-party applications can be adaptively displayed on the virtual screen of the vehicle equipment. Therefore, in the embodiment of the present application, unadapted applications are divided into three types of application groups: applications that support adaptive full-screen display, applications that only support horizontal-screen display, and applications that only support vertical-screen display. Among them, applications that only support horizontal screen display and applications that only support vertical screen display are collectively referred to as applications that do not support adaptive full-screen display. For applications that only support horizontal screen display, they can be directly adaptively displayed in full screen on the virtual screen of the vehicle. For applications that only support horizontal screen display, in the embodiment of this application, it is necessary to use the characteristics of the application group to which the unadapted application belongs, that is, Only support the feature of horizontal screen, pre-set the corresponding expected screen parameters, and combine the car virtual screen to create a target virtual screen suitable for display, and display the application on the target virtual screen; for applications that only support vertical screen display , in the embodiment of this application, it is necessary to pre-set the corresponding expected screen parameters according to the characteristics of the application group to which the unadapted application belongs, that is, only support the vertical screen, and create a display suitable for the car-machine virtual screen. The target virtual screen displays the application on the target virtual screen. Among them, the expected screen parameters corresponding to the application group of the application that only supports horizontal screen display are different from the expected screen parameters corresponding to the application group of the application that only supports vertical screen display. .

进一步的,请参阅图1,图1为本申请实施例公开的基于车机虚拟屏的投屏方法的应用场景示意图;如图1所示,车辆中的车机设备与智能手机之间可以通过WIFI、蓝牙等,从而在车机设备与智能手机之间建立通讯链路。基于车机设备与智能手机之间的连接,智能手机可以进一步拓展车机设备的信息娱乐主机(Infotainment Head Unit,IHU)的能力,通过将智能手机的应用投屏至车机设备的虚拟屏进行显示,从而在车机设备上不仅实现导航、电台、播放音频、视频等,还可以实现在线工作、接入工作会议等。Further, please refer to Fig. 1, which is a schematic diagram of the application scene of the screen projection method based on the car-machine virtual screen disclosed in the embodiment of the present application; as shown in Fig. WIFI, Bluetooth, etc., so as to establish a communication link between the car equipment and the smart phone. Based on the connection between the in-vehicle device and the smartphone, the smartphone can further expand the capability of the infotainment head unit (IHU) of the in-vehicle device, by projecting the application screen of the smartphone to the virtual screen of the in-vehicle device. Display, so that not only navigation, radio, audio, video, etc. can be played on the car equipment, but also online work, access to work meetings, etc. can be realized.

进一步的,不同车企的车机设备的虚拟屏幕大小不一、分辨率/屏幕像素密度不同。其中,对于支持自适应全屏显示的未适配应用,可以直接在车机设备的虚拟屏上直接显示投屏数据,对于只支持横屏显示的应用及只支持竖屏显示的应用,可以都看作是不支持全屏自适应显示的应用,在接收到智能手机的投屏指令后,根据车机虚拟屏和未适配应用所属应用组的预期屏幕,创建目标虚拟屏,然后在目标虚拟屏上显示该未适配应用的投屏数据,从而可以在不侵入未适配应用的前提下,能够基于预设设定的预期屏幕参数创建出目标虚拟屏,确保未适配应用可以在不同分辨率的车机屏幕上正常显示,提升未适配应用显示的完整性和可用性,使得未适配应用在所有车机设备上获得几乎一致的视觉感受和交互体验。Furthermore, the virtual screen sizes and resolutions/screen pixel densities of different car companies are different. Among them, for non-adapted applications that support adaptive full-screen display, the projected screen data can be directly displayed on the virtual screen of the car device. For applications that only support horizontal screen display and applications that only support vertical screen display, you can view both The operation is an application that does not support full-screen adaptive display. After receiving the screen projection command from the smartphone, create a target virtual screen based on the virtual screen of the car and the expected screen of the application group to which the unadapted application belongs, and then create a target virtual screen on the target virtual screen. Display the screen projection data of the unadapted application, so that the target virtual screen can be created based on the preset expected screen parameters without intruding the unadapted application, so that the unadapted application can be displayed in different resolutions It can be displayed normally on the car-machine screen, improving the integrity and usability of unadapted application display, so that unadapted applications can obtain almost the same visual experience and interactive experience on all car-machine devices.

结合上述介绍,本申请实施例公开了一种基于车机虚拟屏的投屏方法、装置、车机设备及存储介质,能够实现未适配应用在不同屏幕分辨率车机虚拟屏上的完整投屏,确保投屏效果,提高用户体验。In combination with the above introduction, the embodiment of the present application discloses a screen projection method, device, vehicle equipment and storage medium based on the vehicle-machine virtual screen, which can realize the complete projection of unadapted applications on the vehicle-machine virtual screen with different screen resolutions. screen to ensure the effect of screen projection and improve user experience.

下面将通过具体实施例,对本申请技术方案进行详细说明。The technical solution of the present application will be described in detail below through specific embodiments.

请参阅图2,图2为本申请实施例一公开的基于车机虚拟屏的投屏方法的流程示意图;如图2所示,该基于车机虚拟屏的投屏方法可包括:Please refer to FIG. 2. FIG. 2 is a schematic flow chart of the screen projection method based on the car-machine virtual screen disclosed in Embodiment 1 of the present application; as shown in FIG. 2, the screen projection method based on the car-machine virtual screen may include:

201、在车机设备与终端设备连接后,接收终端设备的投屏指令,该投屏指令携带未适配应用的投屏数据。201. After the in-vehicle device is connected to the terminal device, receive a screen projection command from the terminal device, and the screen projection command carries screen projection data of an unadapted application.

其中,本申请实施例的执行主体可以为基于车机虚拟屏的投屏装置或者车机设备,其中,基于车机虚拟屏的投屏装置可以独立于车机设备外,也可以为内置于车机设备中的模块。Wherein, the executor of the embodiment of the present application may be a screen projection device based on a car-machine virtual screen or a car-machine device, wherein the screen projection device based on a car-machine virtual screen may be independent of the car-machine device, or may be built in the car-machine modules in machine equipment.

终端设备可以接收车机设备的连接请求,根据连接请求与车机设备建立通讯链路。车机设备也可以接收终端设备的连接请求,根据连接请求与终端设备建立通讯链路。例如,终端设备接收车机设备通过蓝牙或WIFI发送的连接请求,或者通过蓝牙、WIFI或二维码扫码方式向车机设备发送连接请求。因此,在需要建立终端设备与车机设备之间的通讯链路时,可以通过车机设备向终端设备发送连接请求,也可以通过终端设备向车机设备发送连接请求,从而快速在车机设备和终端设备之间建立通讯链路。The terminal device can receive the connection request of the vehicle-machine device, and establish a communication link with the vehicle-machine device according to the connection request. The in-vehicle device can also receive the connection request from the terminal device, and establish a communication link with the terminal device according to the connection request. For example, the terminal device receives the connection request sent by the car-machine device through Bluetooth or WIFI, or sends a connection request to the car-machine device through Bluetooth, WIFI or QR code scanning. Therefore, when it is necessary to establish a communication link between the terminal device and the vehicle-machine device, a connection request can be sent to the terminal device through the vehicle-machine device, or a connection request can be sent to the vehicle-machine device through the terminal device, so that the vehicle-machine device can be connected quickly. Establish a communication link with the terminal device.

在车机设备与终端设备建立通讯链路后,车机设备会创建一个车机虚拟屏,之后,若接收到终端设备的投屏指令,将投屏指令指示的未适配应用投屏到该车机虚拟屏上进行显示。After the car-machine device and the terminal device establish a communication link, the car-machine device will create a car-machine virtual screen. Afterwards, if it receives a screen projection command from the terminal device, it will project the unadapted application indicated by the screen projection command to the screen. Display on the car virtual screen.

结合上述介绍,未适配应用划分为三种类型的应用组:支持自适应全屏显示的应用、只支持横屏显示的应用及只支持竖屏显示的应用。对于只支持横屏显示的应用及只支持竖屏显示的应用,预先设定各自对应的预期屏幕参数,并保存在本地内存中或者连接的云端服务器中,由于横屏显示和竖屏显示的特性,两种应用组各自预设的预期屏幕参数各不相同。Combined with the above introduction, unadapted applications are divided into three types of application groups: applications that support adaptive full-screen display, applications that only support horizontal screen display, and applications that only support vertical screen display. For applications that only support horizontal screen display and applications that only support vertical screen display, the corresponding expected screen parameters are preset and saved in the local memory or in the connected cloud server. Due to the characteristics of horizontal screen display and vertical screen display , the expected screen parameters of the respective presets of the two application groups are different.

202、在未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏。202. When the unadapted application is an application that does not support full-screen adaptive display, create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs.

在本申请实施例中,在接收到投屏指令后,对投屏指令中的未适配应用进行所属应用组的区分,对于只支持横屏显示及只支持竖屏显示这两个应用组的未适配应用,由于无法自适应到车机虚拟屏进行显示,在本申请实施例中,根据未适配应用所属应用组,获取到匹配的预设的预期屏幕参数,根据预期屏幕参数和车机虚拟屏创建目标虚拟屏。In the embodiment of the present application, after receiving the screen projection command, the unadapted applications in the screen projection command are classified into the application groups to which they belong. For the application groups that only support horizontal screen display and vertical screen display Unadapted applications cannot be adaptively displayed on the virtual screen of the vehicle. In the embodiment of this application, according to the application group to which the unadapted application belongs, the matching preset expected screen parameters are obtained. According to the expected screen parameters and the vehicle machine virtual screen to create a target virtual screen.

需要说明的是,在车机设备与终端设备建立通讯链路后,直至断开该通讯链路之前,针对只支持横屏显示的应用组只需要创建一次目标虚拟屏,同样的,针对只支持竖屏显示的应用组也只需要创建一次目标虚拟屏。也就是说,目标虚拟屏的一次生命周期为从建立该目标虚拟屏开始,到断开车机设备与终端设备之间的通讯链路时截止。It should be noted that after the communication link is established between the in-vehicle device and the terminal device, until the communication link is disconnected, the target virtual screen only needs to be created once for the application group that only supports horizontal screen display. The application group displayed on the vertical screen only needs to create the target virtual screen once. That is to say, a life cycle of the target virtual screen starts from the establishment of the target virtual screen and ends when the communication link between the in-vehicle device and the terminal device is disconnected.

可选的,对投屏指令中的未适配应用进行所属应用组的区分可以通过以下步骤实现:Optionally, distinguishing the application groups to which the unadapted applications in the screen casting instruction belong can be achieved through the following steps:

将未适配应用输入分类模型,该分类模型为根据海量已经确认出应用组的支持自适应全屏显示、只支持横屏显示及只支持竖屏显示的未适配应用样本进行数学建模后得到;Input unadapted applications into the classification model, which is obtained after mathematical modeling based on a large number of unadapted application samples that support adaptive full-screen display, only support horizontal screen display, and only support vertical screen display. ;

获取分类模型的输出结果,该输出结果指示出未适配应用所属应用组。The output result of the classification model is obtained, and the output result indicates the application group to which the unadapted application belongs.

通过上述实施方式,能够快速识别未适配应用属于哪个应用组,以提高投屏效率。Through the above implementation manner, it is possible to quickly identify which application group an unadapted application belongs to, so as to improve screen projection efficiency.

进一步的,每次投屏时采用的未适配应用,都将保存为分类模型定期优化的样本,在未适配应用样本达到一定数量时,则优化该分类模型,以提升分类模型识别未适配应用的准确率。Furthermore, the unadapted applications used in each screen projection will be saved as samples that are regularly optimized by the classification model. When the unadapted application samples reach a certain number, the classification model will be optimized to improve the classification model's ability to identify unsuitable apps. Match the accuracy of the application.

203、在目标虚拟屏上显示投屏数据。203. Display the projection data on the target virtual screen.

需要说明的是,目标虚拟屏是覆盖显示在车机虚拟屏上的,即在车机虚拟屏上覆盖加载显示目标虚拟屏,使得目标虚拟屏能够全屏在车机虚拟屏上显示。具体的,对于只支持横屏显示的应用,目标虚拟屏的宽度与车机虚拟屏的宽度一致,而目标虚拟屏的高度通常小于车机虚拟屏的高度,对于只支持竖屏显示的应用,目标虚拟屏的高度与车机虚拟屏的高度一致,而目标虚拟屏的宽度通常小于车机虚拟屏的宽度。It should be noted that the target virtual screen is overlaid and displayed on the car-machine virtual screen, that is, the target virtual screen is overlaid and loaded on the car-machine virtual screen, so that the target virtual screen can be displayed on the car-machine virtual screen in full screen. Specifically, for applications that only support horizontal screen display, the width of the target virtual screen is the same as that of the car-machine virtual screen, and the height of the target virtual screen is usually smaller than the height of the car-machine virtual screen. For applications that only support vertical screen display, The height of the target virtual screen is consistent with the height of the car-machine virtual screen, and the width of the target virtual screen is usually smaller than the width of the car-machine virtual screen.

实施上述实施例,在车机设备与终端设备连接后,接收终端设备的投屏指令,该投屏指令携带未适配应用的投屏数据,在未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏,然后在目标虚拟屏上显示未适配应用的投屏数据;通过实施本申请实施例,能够在不侵入未适配应用的前提下,结合预期屏幕参数创建虚拟屏,确保未适配应用可以在不同分辨率的车机屏幕上正常显示,提升未适配应用显示的完整性和可用性,使得未适配应用在所有车机上获得几乎一致的视觉感受和交互体验。Implement the above embodiment, after the vehicle-machine device is connected to the terminal device, receive the screen projection command of the terminal device, the screen projection command carries the screen projection data of the unadapted application, and the unadapted application does not support full-screen adaptive display When applying, create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs, and then display the projected screen data of the unadapted application on the target virtual screen; by implementing the embodiments of the present application, it is possible On the premise of not intruding into unadapted applications, create a virtual screen based on expected screen parameters to ensure that unadapted applications can be displayed normally on different resolution car screens, improve the integrity and usability of unadapted application displays, and make Unadapted apps can obtain almost the same visual experience and interactive experience on all vehicles.

请参阅图3,图3为本申请实施例二公开的基于车机虚拟屏的投屏方法的流程示意图;如图3所示,该基于车机虚拟屏的投屏方法可包括:Please refer to FIG. 3. FIG. 3 is a schematic flowchart of the screen projection method based on the car-machine virtual screen disclosed in Embodiment 2 of the present application; as shown in FIG. 3, the screen projection method based on the car-machine virtual screen may include:

301、在车机设备与终端设备连接后,接收终端设备的投屏指令,该投屏指令携带未适配应用的投屏数据。301. After the in-vehicle device is connected to the terminal device, receive a screen projection command from the terminal device, and the screen projection command carries screen projection data of an unadapted application.

其中,本申请实施例的执行主体可以为基于车机虚拟屏的投屏装置或者车机设备,其中,基于车机虚拟屏的投屏装置可以独立于车机设备外,也可以为内置于车机设备中的模块。Wherein, the executor of the embodiment of the present application may be a screen projection device based on a car-machine virtual screen or a car-machine device, wherein the screen projection device based on a car-machine virtual screen may be independent of the car-machine device, or may be built in the car-machine modules in machine equipment.

需要说明的是,投屏数据为未适配应用的页面数据。It should be noted that the screen projection data is page data not adapted to the application.

302、在未适配应用为不支持全屏自适应显示的应用时,判断是否已创建有目标虚拟屏;其中,在判断结果为是时,转向步骤303-304,在判断结果为否时,转向步骤305。302. When the unadapted application is an application that does not support full-screen adaptive display, judge whether a target virtual screen has been created; wherein, if the judgment result is yes, turn to steps 303-304, and if the judgment result is no, turn to Step 305.

在步骤302中,对于投屏指令指示的未适配应用,先判断是否在车机设备与终端设备建立此次通讯链路后,已经创建过未适配应用所属应用组相适配的目标虚拟屏,如果已经创建过,执行步骤304,如果还未创建过,执行步骤303-304。对于未适配应用为全屏自适应显示的应用时,执行步骤306。In step 302, for the unadapted application indicated by the screen-casting instruction, it is first judged whether a target virtual application matching the application group to which the unadapted application belongs has been created after the communication link between the in-vehicle device and the terminal device is established. screen, if it has been created, go to step 304, if it has not been created, go to steps 303-304. When the unadapted application is a full-screen adaptive display application, step 306 is performed.

303、根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏。303. Create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs.

在本申请实施例中,确定未适配应用所属应用组,然后可以从本地内存存储的预期屏幕参数中查找到匹配的预期屏幕参数,根据预期屏幕参数和车机虚拟屏的屏幕分辨率,创建目标虚拟屏。In this embodiment of the application, the application group to which the unadapted application belongs is determined, and then the matching expected screen parameters can be found from the expected screen parameters stored in the local memory, and based on the expected screen parameters and the screen resolution of the car-machine virtual screen, create Target virtual screen.

304、在目标虚拟屏上显示投屏数据。304. Display the projection data on the target virtual screen.

其中,目标虚拟屏能够在车机虚拟屏上叠加且完整显示出来,从而将投屏数据在目标虚拟屏上显示,即可实现在车机虚拟屏上显示只支持横屏显示的应用或只支持竖屏显示的应用。比如,对于只支持横屏显示的应用,通过在目标虚拟屏上显示投屏数据后,在整体视觉效果上实现在车机虚拟屏上横屏显示未适配应用,对于只支持竖屏显示的应用,通过在目标虚拟屏上显示投屏数据后,在整体视觉效果上实现在车机虚拟屏上竖屏显示未适配应用。Among them, the target virtual screen can be superimposed and completely displayed on the virtual screen of the car machine, so that the projection data can be displayed on the target virtual screen, and the application that only supports horizontal screen display or only the horizontal screen can be displayed on the virtual screen of the car machine. Apps displayed vertically. For example, for applications that only support horizontal screen display, after displaying the projected screen data on the target virtual screen, the overall visual effect can be realized to display unadapted applications on the car virtual screen in horizontal screen. For applications that only support vertical screen display For the application, after displaying the projection data on the target virtual screen, the unadapted application can be displayed vertically on the car virtual screen in terms of the overall visual effect.

可见,结合步骤303-304,对于未适配应用而言,能够采用预先设定的一套预期屏幕参数,然后就可以在不同屏幕分辨率的车机虚拟屏上投屏显示,且能够完整显示,稳定性较好,整体视觉体验也较强,也能降低车机设备接入未适配应用的难度。It can be seen that, in combination with steps 303-304, for unadapted applications, a set of pre-set expected screen parameters can be used, and then the screen can be displayed on the virtual screen of the car with different screen resolutions, and can be completely displayed , the stability is good, and the overall visual experience is also strong, which can also reduce the difficulty of connecting in-vehicle equipment to unadapted applications.

在步骤302中,如果已经创建过目标虚拟屏,在车机虚拟屏上的中间位置叠加加载显示该目标虚拟屏,然后在目标虚拟屏上显示投屏数据,实现对未适配应用的当前投屏。In step 302, if the target virtual screen has already been created, the target virtual screen is superimposed and loaded and displayed in the middle of the virtual screen of the car, and then the projection data is displayed on the target virtual screen to realize the current projection of unadapted applications. Screen.

在上述实施方式中,在车机设备与终端设备建立当前通讯链路后,如果已经创建过所属应用组的目标虚拟屏,则不需要再重新创建,可以直接调用之前创建的目标虚拟屏,然后直接显示投屏数据即可,可以简化投屏操作,且能够确保投屏效果。In the above embodiment, after the current communication link is established between the in-vehicle device and the terminal device, if the target virtual screen of the application group to which it belongs has already been created, there is no need to re-create it, and the previously created target virtual screen can be called directly, and then It is enough to directly display the screen projection data, which can simplify the screen projection operation and ensure the screen projection effect.

305、在未适配应用为支持全屏自适应显示的应用时,在车机虚拟屏上直接显示投屏数据。305. When the unadapted application is an application that supports full-screen adaptive display, directly display the projection data on the virtual screen of the car.

其中,在未适配应用为支持全屏自适应显示的应用时,可以直接在车机虚拟屏上全屏显示投屏数据,而不需要再额外创建目标虚拟屏。Among them, when the unadapted application is an application that supports full-screen adaptive display, the projected screen data can be displayed in full screen directly on the virtual screen of the car, without additionally creating a target virtual screen.

可选的,对应支持全屏自适应显示的应用,在遇到极端屏幕分辨率时,可能也无法稳定在极端屏幕分辨率的车机虚拟屏上显示,对于这种情况,也可以通过预先设定预期屏幕参数,根据预期屏幕参数和车机虚拟屏的屏幕分辨率,去创建新的虚拟屏,然后在创建的虚拟屏上投屏显示,以提高应用投屏的稳定性和可行性,提高投屏效果。Optionally, for applications that support full-screen adaptive display, when encountering extreme screen resolutions, they may not be able to display stably on the car virtual screen with extreme screen resolutions. In this case, you can also set the Expected screen parameters, according to the expected screen parameters and the screen resolution of the car virtual screen, create a new virtual screen, and then project the screen on the created virtual screen to improve the stability and feasibility of the application screen projection, and improve the projection screen effect.

实施上述实施例,在车机设备与终端设备连接后,接收终端设备的投屏指令,该投屏指令携带未适配应用的投屏数据,在未适配应用为不支持全屏自适应显示的应用时,可以先判断是否存在目标虚拟屏,如果是,直接复用目标虚拟屏显示投屏数据,如果否,根据车机虚拟屏的屏幕分辨率和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏,然后在目标虚拟屏上显示未适配应用的投屏数据;通过实施本申请实施例,能够在不侵入未适配应用的前提下,采用预设的预期屏幕参数创建出能够适于投屏的目标虚拟屏,确保未适配应用可以在不同分辨率的车机屏幕上正常显示,提升未适配应用显示的完整性和可用性,使得未适配应用在所有车机上获得几乎一致的视觉感受和交互体验。另外,在未适配应用为支持全屏自适应显示的应用时,能够直接在车机虚拟屏上进行投屏显示,未适配应用能够在车机虚拟屏上自适应全屏显示,而无需额外干预。Implement the above embodiment, after the vehicle-machine device is connected to the terminal device, receive the screen projection command of the terminal device, the screen projection command carries the screen projection data of the unadapted application, and the unadapted application does not support full-screen adaptive display When applying, you can first judge whether there is a target virtual screen. If so, directly reuse the target virtual screen to display the projection data. If not, according to the screen resolution of the car virtual screen and the expected screen parameters of the application group to which the unadapted application belongs , create a target virtual screen, and then display the projected screen data of the unadapted application on the target virtual screen; by implementing the embodiment of the present application, it is possible to use the preset expected screen parameters to create a It is suitable for the target virtual screen of the projected screen, ensuring that unadapted applications can be displayed normally on car screens with different resolutions, improving the integrity and usability of unadapted application display, so that unadapted applications can be obtained on all car screens Almost the same visual experience and interactive experience. In addition, when the unadapted application is an application that supports full-screen adaptive display, it can be directly displayed on the virtual screen of the car, and the unadapted application can be adaptively displayed in full screen on the virtual screen of the car without additional intervention .

请参阅图4,图4为本申请实施例三公开的基于车机虚拟屏的投屏方法的流程示意图;如图4所示,该基于车机虚拟屏的投屏方法可包括:Please refer to FIG. 4. FIG. 4 is a schematic flowchart of the screen projection method based on the car-machine virtual screen disclosed in Embodiment 3 of the present application; as shown in FIG. 4, the screen projection method based on the car-machine virtual screen may include:

401、在车机设备与终端设备连接后,接收终端设备的投屏指令,该投屏指令携带未适配应用的投屏数据。401. After the in-vehicle device is connected to the terminal device, receive a screen projection command from the terminal device, and the screen projection command carries screen projection data of an unadapted application.

其中,本申请实施例的执行主体可以为基于车机虚拟屏的投屏装置或者车机设备,其中,基于车机虚拟屏的投屏装置可以独立于车机设备外,也可以为内置于车机设备中的模块。Wherein, the executor of the embodiment of the present application may be a screen projection device based on a car-machine virtual screen or a car-machine device, wherein the screen projection device based on a car-machine virtual screen may be independent of the car-machine device, or may be built in the car-machine modules in machine equipment.

402、在未适配应用为不支持全屏自适应显示的应用时,获取未适配应用所属应用组的预期屏幕参数,该预期屏幕参数至少包括预期屏幕宽度、预期屏幕高度以及预期屏幕像素密度。402. When the unadapted application is an application that does not support full-screen adaptive display, acquire expected screen parameters of the application group to which the unadapted application belongs, where the expected screen parameters at least include expected screen width, expected screen height, and expected screen pixel density.

在步骤401中,终端设备发送投屏指令,尝试在车机虚拟屏上启动未适配应用时,可以判断该未适配应用是否为支持全屏自适应显示的应用,如果是,执行步骤410。反之,在未适配应用为不支持全屏自适应显示的应用时,确定未适配应用所属应用组,可能是只支持横屏显示的应用组,或者属于只支持竖屏显示的应用组,两种应用组的预期屏幕参数不同,因此,在本申请实施例中,具体会根据不同应用组的未适配应用只支持横屏或只支持竖屏的特性,获取到未适配应用所属应该组的预期屏幕参数,该预期屏幕参数至少包括预期屏幕宽度、预期屏幕高度以及预期屏幕像素密度。In step 401, when the terminal device sends a screen projection command and tries to start an unadapted application on the car virtual screen, it can determine whether the unadapted application supports full-screen adaptive display, and if so, execute step 410. Conversely, when the unadapted application is an application that does not support full-screen adaptive display, it is determined that the application group to which the unadapted application belongs may be an application group that only supports horizontal screen display, or an application group that only supports vertical screen display. The expected screen parameters of different application groups are different. Therefore, in the embodiment of this application, according to the characteristics that the unadapted applications of different application groups only support horizontal screen or only support vertical screen, the corresponding group of unadapted applications will be obtained. Expected screen parameters, the expected screen parameters at least include expected screen width, expected screen height and expected screen pixel density.

可选的,上述预期屏幕参数还可以在结合若干次投屏后进行优化更新,以能够获取更加准确的预期屏幕参数,提高未适配应用在车机虚拟屏的投屏效果。Optionally, the above-mentioned expected screen parameters can also be optimized and updated after several times of screen projection, so as to obtain more accurate expected screen parameters and improve the screen projection effect of unadapted applications on the virtual screen of the car.

403、根据预期屏幕参数创建目标虚拟屏。403. Create a target virtual screen according to expected screen parameters.

其中,根据确定出的预期屏幕参数创建出目标虚拟屏,目标虚拟屏的宽度为预期屏幕参数中的预期屏幕宽度,目标虚拟屏的高度为预期屏幕参数中的预期屏幕高度,创建出满足预期屏幕像素密度的目标虚拟屏。Among them, the target virtual screen is created according to the determined expected screen parameters, the width of the target virtual screen is the expected screen width in the expected screen parameters, and the height of the target virtual screen is the expected screen height in the expected screen parameters, creating a screen that satisfies the expected screen The pixel density of the target virtual screen.

404、将目标虚拟屏放置于尺寸相同的显示容器中。404. Place the target virtual screens in display containers with the same size.

可选的,显示容器的尺寸与目标虚拟屏的尺寸相同,即显示容器的宽度也为上述预期屏幕宽度,显示容器的高度也为上述预期屏幕高度。可选的,选择可控制显示大小的TextureView作为显示容器。Optionally, the size of the display container is the same as that of the target virtual screen, that is, the width of the display container is also the aforementioned expected screen width, and the height of the display container is also the aforementioned expected screen height. Optionally, select a TextureView that can control the display size as the display container.

由于目标虚拟屏放置于显示容器中,可以通过控制显示容器的显示大小,达到控制目标虚拟屏的显示大小的目的,即达到控制目标虚拟屏的高度和宽度的目的。Since the target virtual screen is placed in the display container, the purpose of controlling the display size of the target virtual screen can be achieved by controlling the display size of the display container, that is, the purpose of controlling the height and width of the target virtual screen can be achieved.

405、根据车机虚拟屏的屏幕分辨率计算显示容器的缩放系数。405. Calculate the scaling factor of the display container according to the screen resolution of the car-machine virtual screen.

可选地,步骤405可包括:Optionally, step 405 may include:

获取车机虚拟屏的实际屏幕参数,该实际屏幕参数至少包括实际屏幕宽度和实际屏幕高度;Obtain the actual screen parameters of the car virtual screen, the actual screen parameters at least include the actual screen width and the actual screen height;

根据实际屏幕参数,计算车机虚拟屏的实际应用区域宽高比;According to the actual screen parameters, calculate the aspect ratio of the actual application area of the car virtual screen;

根据预期屏幕参数,计算预期屏幕分辨率宽高比;According to the expected screen parameters, calculate the expected screen resolution aspect ratio;

根据实际屏幕参数、预期屏幕参数、实际应用区域宽高比和预期屏幕分辨率宽高比,计算显示容器的缩放系数。Calculate the zoom factor of the display container according to the actual screen parameters, expected screen parameters, actual application area aspect ratio, and expected screen resolution aspect ratio.

其中,在车机设备与终端设备之间建立通讯链路后,车机设备创建一个车机虚拟屏,在该实施方式中,获取车机虚拟屏的实际屏幕参数,根据车机虚拟屏的实际屏幕参数计算出显示容器的缩放系数。Wherein, after the communication link is established between the car-machine device and the terminal device, the car-machine device creates a car-machine virtual screen. In this embodiment, the actual screen parameters of the car-machine virtual screen are obtained, and according to the actual The screen parameter calculates the scaling factor for the display container.

其中,缩放系数的计算方法如下:Among them, the calculation method of the scaling factor is as follows:

假设车机虚拟屏的实际屏幕宽度表示为REAL_DISPLAY_WIDTH,及实际屏幕高度表示为REAL_DISPLAY_HEIGHT,那么,车机虚拟屏的实际应用区域宽高比表示为realRatio,其中realRatio通过计算公式(1)计算,如下:Assuming that the actual screen width of the car virtual screen is expressed as REAL_DISPLAY_WIDTH, and the actual screen height is expressed as REAL_DISPLAY_HEIGHT, then the actual application area aspect ratio of the car virtual screen is expressed as realRatio, where realRatio is calculated by formula (1), as follows:

realRatio=REAL_DISPLAY_WIDTH/REAL_DISPLAY_HEIGHT*1frealRatio=REAL_DISPLAY_WIDTH/REAL_DISPLAY_HEIGHT*1f

其中,f=float,表示浮点数,将计算得到的realRatio转化成为浮点数。Wherein, f=float, which represents a floating point number, and the calculated realRatio is converted into a floating point number.

假设预期屏幕高度表示为EXPECTED_DISPLAY_HEIGHT,预期屏幕宽度表示为EPECTED_DISPLAY_WIDTH,预期屏幕分辨率宽高比表示为expectedRatio,其中expectedRatio采用计算公式(2)计算,如下:Assume that the expected screen height is expressed as EXPECTED_DISPLAY_HEIGHT, the expected screen width is expressed as EPECTED_DISPLAY_WIDTH, and the expected screen resolution aspect ratio is expressed as expectedRatio, where expectedRatio is calculated using the calculation formula (2), as follows:

expectedRatio=EPECTED_DISPLAY_WIDTH/EXPECTED_DISPLAY_HE IGHT*1fexpectedRatio=EPECTED_DISPLAY_WIDTH/EXPECTED_DISPLAY_HE IGHT*1f

相同的,上述f也是float的缩写,表示浮点数,将计算得到的expectedRatio转化成为浮点数。Similarly, the above f is also an abbreviation of float, which means a floating point number, and the calculated expectedRatio is converted into a floating point number.

进一步的,如果realRatio大于expectedRatio,假设缩放系数表示为scale,那么scale采用计算公式(3)计算,如下:Further, if realRatio is greater than expectedRatio, assuming that the scaling factor is expressed as scale, then scale is calculated using formula (3), as follows:

scale=REAL_DISPLAY_HEIGHT*1f/EXPECTED_DISPLAY_HEIGHTscale=REAL_DISPLAY_HEIGHT*1f/EXPECTED_DISPLAY_HEIGHT

反之,如果realRatio小于或等于expectedRatio,那么scale采用计算公式(4)计算,如下:Conversely, if realRatio is less than or equal to expectedRatio, then scale is calculated using formula (4), as follows:

Scale=REAL_DISPLAY_WIDTH*1f/expectedRatio/EXPECTED_DISPLA Y_HEIGHTScale=REAL_DISPLAY_WIDTH*1f/expectedRatio/EXPECTED_DISPLAY_HEIGHT

可见,经过上述实施方式,能够结合车机虚拟屏的实际屏幕参数,计算出能够准确缩放显示容器的缩放系数,以在车机虚拟屏上横屏或竖屏叠加显示显示容器,最终实现在车机虚拟屏上横屏或竖屏显示未适配应用的目的。It can be seen that, through the above-mentioned implementation, the zoom factor that can accurately zoom the display container can be calculated in combination with the actual screen parameters of the car-machine virtual screen, so that the display container can be superimposed on the car-machine virtual screen in a horizontal or vertical screen, and finally realized in the car. The horizontal screen or vertical screen on the machine virtual screen displays the purpose of unadapted applications.

406、根据缩放系数缩放显示容器。406. Scale the display container according to the scaling factor.

其中,由于显示容器的显示大小可以控制,在步骤406中,根据缩放系数缩放显示容器。由于缩放显示容器,同时达到缩放目标虚拟屏的目的,将目标虚拟屏缩放到匹配车机虚拟屏。Wherein, since the display size of the display container can be controlled, in step 406, the display container is scaled according to the scaling factor. Because the scaling display container achieves the purpose of scaling the target virtual screen at the same time, the target virtual screen is scaled to match the car-machine virtual screen.

407、移动缩放后的显示容器以在车机虚拟屏完整显示目标虚拟屏。407. Move the scaled display container to completely display the target virtual screen on the car-machine virtual screen.

可选的,上述移动缩放后的显示容器以在车机虚拟屏完整显示目标虚拟屏包括:Optionally, moving the zoomed display container to completely display the target virtual screen on the car-machine virtual screen includes:

根据预期屏幕参数和缩放系数,计算横向平移量和纵向平移量;Calculate the horizontal translation and vertical translation according to the expected screen parameters and zoom factor;

根据横向平移量和纵向平移量,移动缩放后的显示容器至车机虚拟屏的中心位置,以在车机虚拟屏上完整显示目标虚拟屏。According to the horizontal translation amount and the vertical translation amount, move the scaled display container to the center of the car-machine virtual screen, so as to fully display the target virtual screen on the car-machine virtual screen.

在上述实施方式中,通过缩放显示容器,获得目标虚拟屏,将目标虚拟屏移动至车机虚拟屏的中心位置,以实现目标虚拟屏在车机虚拟屏上是横屏显示或竖屏显示。In the above embodiments, the target virtual screen is obtained by zooming the display container, and the target virtual screen is moved to the center of the car-machine virtual screen to realize the horizontal or vertical screen display of the target virtual screen on the car-machine virtual screen.

其中,上述横向平移量的计算公式(5)如下:Wherein, the calculation formula (5) of the above-mentioned lateral translation amount is as follows:

(EXPECTED_DISPLAY_WIDTH-EXPECTED_DISPLAY_WIDTH*scale)/2(EXPECTED_DISPLAY_WIDTH-EXPECTED_DISPLAY_WIDTH*scale)/2

上述纵向平移量的计算公式(6)如下:The calculation formula (6) of the above-mentioned longitudinal translation amount is as follows:

(EXPECTED_DISPLAY_HEIGHT-EXPECTED_DISPLAY_HEIGHT*scale)/2;(EXPECTED_DISPLAY_HEIGHT-EXPECTED_DISPLAY_HEIGHT*scale)/2;

在计算出上述横向平移量和纵向平移量后,可以先按照横向平移量移动显示容器,然后再按照纵向平移量移动显示容器,从而将显示容器移动到车机虚拟屏的中心位置;或者,可以先按照纵向平移量移动显示容器,然后再按横向平移量移动显示容器,从而将显示容器移动车机虚拟屏的中心位置。After calculating the above-mentioned horizontal translation amount and vertical translation amount, the display container can be moved according to the horizontal translation amount first, and then the display container can be moved according to the vertical translation amount, so as to move the display container to the center position of the virtual screen of the car; or, you can First move the display container according to the vertical translation amount, and then move the display container according to the horizontal translation amount, so as to move the display container to the center of the car-machine virtual screen.

408、将车机虚拟屏的触摸事件注入目标虚拟屏。408. Inject the touch event of the car-machine virtual screen into the target virtual screen.

在本申请实施例中,最后是在目标虚拟屏上显示投屏数据,用户可以在目标虚拟屏上实现与未适配应用的交互,因此,需要获取车机虚拟屏的触摸事件,然后将车机虚拟屏的触摸事件注入到目标虚拟屏。In the embodiment of this application, the projection data is finally displayed on the target virtual screen, and the user can interact with unadapted applications on the target virtual screen. The touch event of the machine virtual screen is injected into the target virtual screen.

可选的,上述将车机虚拟屏的触摸事件注入目标虚拟屏,包括:Optionally, injecting the touch event of the car-machine virtual screen into the target virtual screen includes:

监听车机虚拟屏的触摸事件;Monitor touch events on the virtual screen of the car;

获取车机虚拟屏的触摸事件坐标;Obtain the touch event coordinates of the car virtual screen;

根据缩放系数对触摸事件坐标进行缩放处理;Scale the coordinates of the touch event according to the scaling factor;

将处理后的触摸事件坐标注入目标虚拟屏。Inject the processed touch event coordinates into the target virtual screen.

其中,通过代码实现触摸事件的发生,并监听该触摸事件,然后获取到触摸事件对应的触摸事件坐标,并按照缩放系数对触摸事件坐标进行缩放处理,然后将触摸事件坐标注入到目标虚拟屏。Among them, the touch event is realized through the code, and the touch event is monitored, and then the touch event coordinate corresponding to the touch event is obtained, and the touch event coordinate is scaled according to the scaling factor, and then the touch event coordinate is injected into the target virtual screen.

409、在目标虚拟屏上显示投屏数据。409. Display the projection data on the target virtual screen.

在创建后的目标虚拟屏上显示未适配应用的投屏数据,由于目标虚拟屏已经注入了车机虚拟屏的触摸事件,因此,基于目标虚拟屏用户可以操作应用,最终实现在车机虚拟屏上操作应用。The screen projection data of the unadapted application is displayed on the created target virtual screen. Since the target virtual screen has injected the touch event of the car-machine virtual screen, the user can operate the application based on the target virtual screen, and finally realize the in-car virtual screen. Operate the application on the screen.

410、在未适配应用为支持全屏自适应显示的应用时,在车机虚拟屏上直接显示投屏数据。410. When the unadapted application is an application that supports full-screen adaptive display, directly display the projection data on the virtual screen of the car.

实施上述实施例,能够保证在不侵入未适配应用的前提下,未适配应用大部分页面显示正常,并且保证各未适配应用在不同分辨率的车机设备上都有近乎一致的视觉和交互体验,大幅度提升未适配应用的界面显示完整性和可用性;同时通过上述实施例,能够根据未适配应用本身特性(支持全屏自适应显示、只支持横屏显示还是只支持竖屏显示)定制不同的适配规则,让未适配应用在正常显示的同时,尽可能获得更好的交互体验。Implementing the above embodiments can ensure that most pages of unadapted applications are displayed normally without intruding into unadapted applications, and ensure that each unadapted application has nearly the same visual and interactive experience, greatly improving the interface display integrity and usability of non-adapted applications; at the same time, through the above-mentioned embodiments, it can display) to customize different adaptation rules, so that unadapted applications can obtain a better interactive experience as much as possible while displaying normally.

进一步的,只需要使用一套固定的预期屏幕参数新建一个目标虚拟屏以及结合TextureView显示容器可缩放的特性,即可做到未适配应用在不同分辨率的车机设备上正常显示页面且各页面显示效果基本一致,本申请实施例在优化了未适配应用交互体验的同时,也降低了未适配应用的接入难度。Furthermore, it only needs to use a set of fixed expected screen parameters to create a new target virtual screen and combine the scalable characteristics of the TextureView display container, so that unadapted applications can display pages normally on different resolutions of car equipment and each The page display effect is basically the same. The embodiment of the present application not only optimizes the interactive experience of unadapted applications, but also reduces the difficulty of accessing unadapted applications.

请参阅图5至图8,其中,图5为本申请实施例公开的车机虚拟屏的示意图,图6为在本申请实施例一公开的目标虚拟屏的示意图,图7为本申请实施例二公开的对目标虚拟屏进行缩放后的示意图,图8为本申请实施例三公开的目标虚拟屏的示意图。在图5-图8中以只支持竖屏显示的未适配应用为例,车机设备的分辨率为1280x720,左侧图标所在栏为Dock栏,应用显示区域的宽高为1160x720,如图5所示。Please refer to Fig. 5 to Fig. 8, wherein Fig. 5 is a schematic diagram of the car-machine virtual screen disclosed in the embodiment of the present application, Fig. 6 is a schematic diagram of the target virtual screen disclosed in the first embodiment of the present application, and Fig. 7 is the schematic diagram of the embodiment of the present application The schematic diagram of the zoomed target virtual screen disclosed in the second disclosure, and FIG. 8 is a schematic diagram of the target virtual screen disclosed in the third embodiment of the present application. In Figures 5-8, an unadapted application that only supports vertical screen display is taken as an example. The resolution of the in-vehicle device is 1280x720, the column where the icon on the left is located is the Dock column, and the width and height of the application display area are 1160x720, as shown in the figure 5.

进一步的,预设的只支持竖屏显示的预期屏幕参数为EXPECTED_DISPLAY_WIDTH=1280,EXPECTED_ DISPLAY_HEIGHT=1600,EXPECTED_DISPLAY_DENSITY_DPI=360,根据该预期屏幕参数新建目标虚拟屏,新建的目标虚拟屏的宽高大于车机设备的车机虚拟屏,如图6所示,上面覆盖的颜色较浅的区域为目标虚拟屏,也就是TextureView显示容器。Further, the preset expected screen parameters that only support vertical screen display are EXPECTED_DISPLAY_WIDTH=1280, EXPECTED_DISPLAY_HEIGHT=1600, EXPECTED_DISPLAY_DENSITY_DPI=360, and create a target virtual screen according to the expected screen parameters, and the width and height of the newly created target virtual screen are larger than that of the vehicle The car-machine virtual screen of the device, as shown in Figure 6, covers the lighter-colored area on it as the target virtual screen, which is the TextureView display container.

进一步的,根据附图4所示实施例中给到的计算公式,计算出的缩放系数为0.45,然后根据该缩放系数对TextureView显示容器进行缩放,缩放后的TextureView显示容器位于屏幕左上方(灰色区域),也就是目标虚拟屏,黑色区域为车机虚拟屏,如图7所示。Further, according to the calculation formula given in the embodiment shown in accompanying drawing 4, the calculated scaling factor is 0.45, and then the TextureView display container is scaled according to the scaling factor, and the scaled TextureView display container is located at the upper left of the screen (gray area), which is the target virtual screen, and the black area is the car virtual screen, as shown in Figure 7.

进一步的,将目标虚拟屏移动到车机虚拟屏的中心位置,然后注入车机虚拟屏的触摸事件坐标,如图8所示,然后就可以在目标虚拟屏上显示未适配应用的投屏数据。Further, move the target virtual screen to the center of the car-machine virtual screen, and then inject the touch event coordinates of the car-machine virtual screen, as shown in Figure 8, and then display the projected screen of the unadapted application on the target virtual screen data.

请参阅图9,图9为本申请实施例一公开的基于车机虚拟屏的投屏装置的结构示意图;如图9所示,该基于车机虚拟屏的投屏装置可包括:Please refer to FIG. 9. FIG. 9 is a schematic structural diagram of a screen projection device based on a car-machine virtual screen disclosed in Embodiment 1 of the present application; as shown in FIG. 9, the screen projection device based on a car-machine virtual screen may include:

接收模块901,用于在车机设备与终端设备连接后,接收终端设备的投屏指令,该投屏指令携带未适配应用的投屏数据;The receiving module 901 is configured to receive a screen projection command from the terminal device after the vehicle-machine device is connected to the terminal device, and the screen projection command carries screen projection data of unadapted applications;

创建模块902,用于在未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏;The creation module 902 is used to create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs when the unadapted application is an application that does not support full-screen adaptive display;

启动模块903,用于在所述目标虚拟屏上显示投屏数据。The starting module 903 is configured to display screen projection data on the target virtual screen.

可见,实施上述装置,在车机设备与终端设备连接后,接收终端设备的投屏指令,该投屏指令携带未适配应用的投屏数据,在未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏,然后在目标虚拟屏上显示未适配应用的投屏数据;通过实施本申请实施例,能够在不侵入未适配应用的前提下,结合预期屏幕参数创建虚拟屏,确保未适配应用可以在不同分辨率的车机屏幕上正常显示,提升未适配应用显示的完整性和可用性,使得未适配应用在所有车机上获得几乎一致的视觉感受和交互体验。。It can be seen that, after implementing the above-mentioned device, after the vehicle-machine equipment is connected to the terminal device, the screen projection command of the terminal device is received. The screen projection command carries the screen projection data of the unadapted application, and the unadapted application does not support full-screen adaptive display. When using an application, create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs, and then display the projection data of the unadapted application on the target virtual screen; by implementing the embodiment of the present application, It is possible to create a virtual screen based on expected screen parameters without intruding into unadapted applications, to ensure that unadapted applications can be displayed normally on different resolution car screens, and to improve the integrity and usability of unadapted application displays. This enables unadapted applications to obtain almost the same visual experience and interactive experience on all vehicles. .

请参阅图10,图10为本申请实施例二公开的基于车机虚拟屏的投屏装置的结构示意图;图10所示的基于车机虚拟屏的投屏装置是在图9所示的基于车机虚拟屏的投屏装置基础上进行优化得到的,图10所示的基于车机虚拟屏的投屏装置中,进一步包括:判断模块1010。Please refer to Fig. 10. Fig. 10 is a schematic structural diagram of the screen projection device based on the car-machine virtual screen disclosed in Embodiment 2 of the present application; the screen projection device based on the car-machine virtual screen shown in Fig. 10 is based on the The screen projection device based on the car-machine virtual screen is optimized based on the screen-projection device based on the car-machine virtual screen. The screen projection device based on the car-machine virtual screen shown in FIG. 10 further includes: a judging module 1010 .

其中,判断模块1010,用于在未适配应用为不支持全屏自适应显示的应用时,以及创建模块902根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏之前,判断是否已创建有目标虚拟屏;Among them, the judging module 1010 is used to create the target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs when the unadapted application is an application that does not support full-screen adaptive display. Before, determine whether the target virtual screen has been created;

上述创建模块902,具体用于在判断模块1010的判断结果为否时,根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏。The creation module 902 is specifically configured to create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs when the judgment result of the judging module 1010 is negative.

在一些可选的实施方式中,上述启动模块903,还用于在上述判断模块1010的判断结果为已创建有目标虚拟屏时,复用目标虚拟屏,以在目标虚拟屏上启动未适配应用。In some optional implementations, the startup module 903 is further configured to multiplex the target virtual screen to start the unadapted application.

在一些可选的实施方式中,上述启动模块903,还用于在未适配应用为支持全屏自适应显示的应用时,在车机虚拟屏上直接显示投屏数据。In some optional implementation manners, the above startup module 903 is further configured to directly display screen projection data on the car-machine virtual screen when the unadapted application is an application that supports full-screen adaptive display.

实施上述实施方式,在车机设备与终端设备连接后,接收终端设备的投屏指令,该投屏指令携带未适配应用的投屏数据,在未适配应用为不支持全屏自适应显示的应用时,可以先判断是否存在目标虚拟屏,如果是,直接复用目标虚拟屏显示投屏数据,如果否,根据车机虚拟屏的屏幕分辨率和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏,然后在目标虚拟屏上显示未适配应用的投屏数据;通过实施本申请实施例,能够在不侵入未适配应用的前提下,采用预设的预期屏幕参数创建出能够适于投屏的目标虚拟屏,确保未适配应用可以在不同分辨率的车机屏幕上正常显示,提升未适配应用显示的完整性和可用性,使得未适配应用在所有车机上获得几乎一致的视觉感受和交互体验。另外,在未适配应用为支持全屏自适应显示的应用时,能够直接在车机虚拟屏上进行投屏显示,未适配应用能够在车机虚拟屏上自适应全屏显示,而无需额外干预。Implement the above-mentioned embodiment, after the vehicle-machine device is connected to the terminal device, receive the screen projection command of the terminal device, the screen projection command carries the screen projection data of the unadapted application, and the unadapted application does not support full-screen adaptive display When applying, you can first judge whether there is a target virtual screen. If so, directly reuse the target virtual screen to display the projection data. If not, according to the screen resolution of the car virtual screen and the expected screen parameters of the application group to which the unadapted application belongs , create a target virtual screen, and then display the projected screen data of the unadapted application on the target virtual screen; by implementing the embodiment of the present application, it is possible to use the preset expected screen parameters to create a It is suitable for the target virtual screen of the projected screen, ensuring that unadapted applications can be displayed normally on car screens with different resolutions, improving the integrity and usability of unadapted application display, so that unadapted applications can be obtained on all car screens Almost the same visual experience and interactive experience. In addition, when the unadapted application is an application that supports full-screen adaptive display, it can be directly displayed on the virtual screen of the car, and the unadapted application can be adaptively displayed in full screen on the virtual screen of the car without additional intervention .

在一些可选的实施方式中,上述创建模块902用于根据车机虚拟屏和未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏的方式具体为:In some optional implementations, the creation module 902 is used to create the target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs:

获取未适配应用所属应用组的预期屏幕参数,预期屏幕参数至少包括预期屏幕宽度、预期屏幕高度以及预期屏幕像素密度;以及,根据预期屏幕参数创建目标虚拟屏;以及,将目标虚拟屏放置于尺寸相同的显示容器中;以及,根据车机虚拟屏的屏幕分辨率计算显示容器的缩放系数;以及,根据缩放系数缩放显示容器;以及,移动缩放后的显示容器以在车机虚拟屏完整显示目标虚拟屏;以及,将车机虚拟屏的触摸事件注入所述目标虚拟屏。Obtain expected screen parameters of the application group to which the unadapted application belongs, where the expected screen parameters at least include expected screen width, expected screen height, and expected screen pixel density; and, create a target virtual screen according to the expected screen parameters; and, place the target virtual screen on In a display container with the same size; and, calculate the scaling factor of the display container according to the screen resolution of the car-machine virtual screen; and, scale the display container according to the scaling factor; and, move the scaled display container to be completely displayed on the car-machine virtual screen a target virtual screen; and injecting a touch event of the vehicle-machine virtual screen into the target virtual screen.

进一步可选的,上述创建模块902用于根据所述车机的屏幕分辨率计算显示容器的缩放系数的方式具体为:Further optionally, the manner in which the above creation module 902 is used to calculate the scaling factor of the display container according to the screen resolution of the car machine is specifically as follows:

获取车机虚拟屏的实际屏幕参数,该实际屏幕参数至少包括实际屏幕宽度和实际屏幕高度;根据实际屏幕参数,计算车机虚拟屏的实际应用区域宽高比;根据预期屏幕参数,计算预期屏幕分辨率宽高比;根据实际屏幕参数、预期屏幕参数、实际应用区域宽高比和预期屏幕分辨率宽高比,计算显示容器的缩放系数。Get the actual screen parameters of the car-machine virtual screen, the actual screen parameters include at least the actual screen width and actual screen height; calculate the actual application area aspect ratio of the car-machine virtual screen according to the actual screen parameters; calculate the expected screen according to the expected screen parameters Resolution aspect ratio; Calculate the scaling factor of the display container based on actual screen parameters, expected screen parameters, actual application area aspect ratio, and expected screen resolution aspect ratio.

另外,可选的,上述创建模块902用于移动缩放后的显示容器以在车机虚拟屏完整显示目标虚拟屏的方式具体为:In addition, optionally, the manner in which the creation module 902 is used to move the scaled display container to completely display the target virtual screen on the car-machine virtual screen is as follows:

根据预期屏幕参数和所述缩放系数,计算横向平移量和纵向平移量;以及,根据横向平移量和纵向平移量,移动缩放后的显示容器至车机虚拟屏的中心位置,以在车机虚拟屏上完整显示目标虚拟屏。Calculate the horizontal translation amount and the vertical translation amount according to the expected screen parameters and the scaling factor; The target virtual screen is completely displayed on the screen.

另外,可选的,上述创建模块902用于将车机虚拟屏的触摸事件注入目标虚拟屏的方式具体为:In addition, optionally, the method for injecting the touch event of the car-machine virtual screen into the target virtual screen by the creation module 902 is specifically:

监听所述车机虚拟屏的触摸事件;以及,获取车机虚拟屏的触摸事件坐标;以及,根据缩放系数对触摸事件坐标进行缩放处理;以及,将处理后的触摸事件坐标注入目标虚拟屏。Listening to the touch event of the car-machine virtual screen; and acquiring the touch event coordinates of the car-machine virtual screen; and scaling the touch event coordinates according to the scaling factor; and injecting the processed touch event coordinates into the target virtual screen.

实施上述实施方式,只需要使用一套固定的预期屏幕参数新建一个目标虚拟屏以及结合TextureView显示容器可缩放的特性,即可做到未适配应用在不同分辨率的车机设备上正常显示页面且各页面显示效果基本一致,本申请实施例在优化了未适配应用交互体验的同时,也降低了未适配应用的接入难度。To implement the above implementation, you only need to use a set of fixed expected screen parameters to create a target virtual screen and combine the scalable characteristics of the TextureView display container, so that the unadapted application can display the page normally on different resolutions of the vehicle equipment Moreover, the display effect of each page is basically the same. The embodiment of the present application not only optimizes the interactive experience of the unadapted application, but also reduces the difficulty of accessing the unadapted application.

请参阅图11,图11为本申请实施例公开的车机设备的结构示意图;图11所示的车机设备可包括:Please refer to Figure 11. Figure 11 is a schematic structural diagram of the vehicle-machine equipment disclosed in the embodiment of the present application; the vehicle-machine equipment shown in Figure 11 may include:

存储有可执行程序代码的存储器1110;a memory 1110 storing executable program codes;

与存储器1110耦合的处理器1120;a processor 1120 coupled to the memory 1110;

其中,处理器1120调用存储器1110中存储的可执行程序代码,执行图2至图4任意一种方法的部分步骤或者全部步骤。Wherein, the processor 1120 invokes the executable program code stored in the memory 1110 to execute some or all steps of any one of the methods in FIG. 2 to FIG. 4 .

请参阅图12,图12为本申请实施例公开的车辆的结构示意图;如图12所示,该车辆可包括:Please refer to Figure 12, Figure 12 is a schematic structural diagram of the vehicle disclosed in the embodiment of the present application; as shown in Figure 12, the vehicle may include:

如附图11所示的车机设备,有关于车机设备如何实现未适配应用的投屏显示的方法请参阅上述实施例,在此不再赘述。For the in-vehicle device shown in FIG. 11 , please refer to the above-mentioned embodiment for how the in-vehicle device realizes the screen projection display of unadapted applications, and details will not be repeated here.

本申请实施例还公开一种计算机可读存储介质,其存储计算机程序,其中,该计算机程序使得计算机执行图2至图4公开的方法。The embodiment of the present application also discloses a computer-readable storage medium, which stores a computer program, wherein the computer program causes a computer to execute the methods disclosed in FIGS. 2 to 4 .

本申请实施例还公开一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行图2至图4公开的任意一种方法的部分或全部步骤。The embodiment of the present application also discloses a computer program product. When the computer program product is run on a computer, the computer is made to execute some or all steps of any one of the methods disclosed in FIG. 2 to FIG. 4 .

本申请实施例还公开一种应用发布平台,该应用发布平台用于发布计算机程序产品,其中,当计算机程序产品在计算机上运行时,使得计算机执行图2至图4公开的任意一种方法的部分或全部步骤。The embodiment of the present application also discloses an application distribution platform, which is used to distribute a computer program product, wherein, when the computer program product is run on a computer, the computer is made to execute any one of the methods disclosed in Fig. 2 to Fig. 4 some or all of the steps.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质包括只读存储器(Read-Only Memory,ROM)、随机存储器(Random Access Memory,RAM)、可编程只读存储器(Programmable Read-only Memory,PROM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、一次可编程只读存储器(One-time Programmable Read-Only Memory,OTPROM)、电子抹除式可复写只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(CompactDisc Read-Only Memory,CD-ROM)或其他光盘存储器、磁盘存储器、磁带存储器、或者能够用于携带或存储数据的计算机可读的任何其他介质。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes read-only Memory (Read-Only Memory, ROM), Random Access Memory (Random Access Memory, RAM), Programmable Read-Only Memory (Programmable Read-only Memory, PROM), Erasable Programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), One-time Programmable Read-Only Memory (OTPROM), Electronically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CompactDisc Read -Only Memory, CD-ROM) or other optical disk storage, magnetic disk storage, tape storage, or any other computer-readable medium that can be used to carry or store data.

以上对本发明实施例公开的一种基于车机虚拟屏的投屏方法、装置、车机设备及车辆进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The above is a detailed introduction of a screen projection method, device, vehicle-machine equipment and vehicle disclosed in the embodiment of the present invention based on the car-machine virtual screen. In this paper, a specific example is used to illustrate the principle and implementation of the present invention. The above The description of the embodiment is only used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. As mentioned above, the contents of this specification should not be construed as limiting the present invention.

以上对本发明实施例公开的一种基于车机虚拟屏的投屏方法、装置、车机设备及车辆进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The above is a detailed introduction of a screen projection method, device, vehicle-machine equipment and vehicle disclosed in the embodiment of the present invention based on the car-machine virtual screen. In this paper, a specific example is used to illustrate the principle and implementation of the present invention. The above The description of the embodiment is only used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. As mentioned above, the contents of this specification should not be construed as limiting the present invention.

Claims (18)

1.一种基于车机虚拟屏的投屏方法,其特征在于,包括:1. A screen projection method based on a car-machine virtual screen, characterized in that it comprises: 在车机设备与终端设备连接后,接收所述终端设备的投屏指令,所述投屏指令携带未适配应用的投屏数据;After the in-vehicle device is connected to the terminal device, a screen projection instruction of the terminal device is received, and the screen projection instruction carries screen projection data of an unadapted application; 在所述未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏;When the unadapted application is an application that does not support full-screen adaptive display, create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs; 在所述目标虚拟屏上显示所述投屏数据。The screen projection data is displayed on the target virtual screen. 2.根据权利要求1所述的方法,其特征在于,在所述未适配应用为不支持全屏自适应显示的应用时,以及所述根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏之前,所述方法还包括:2. The method according to claim 1, wherein when the unadapted application is an application that does not support full-screen adaptive display, and the application according to the car-machine virtual screen and the unadapted application belongs to Set expected screen parameters, before creating the target virtual screen, the method further includes: 判断是否已创建有所述目标虚拟屏;judging whether the target virtual screen has been created; 若否,执行所述根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏的步骤。If not, execute the step of creating a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs. 3.根据权利要求2所述的方法,其特征在于,所述方法还包括:3. The method according to claim 2, wherein the method further comprises: 若已创建有所述目标虚拟屏,在所述目标虚拟屏上显示所述投屏数据。If the target virtual screen has already been created, displaying the screen projection data on the target virtual screen. 4.根据权利要求1至3任一项所述的方法,其特征在于,所述根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏,包括:4. The method according to any one of claims 1 to 3, wherein the creation of the target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs includes: 获取所述未适配应用所属应用组的预期屏幕参数,所述预期屏幕参数至少包括预期屏幕宽度、预期屏幕高度以及预期屏幕像素密度;Acquire expected screen parameters of the application group to which the unadapted application belongs, where the expected screen parameters at least include expected screen width, expected screen height, and expected screen pixel density; 根据所述预期屏幕参数创建目标虚拟屏;creating a target virtual screen according to the expected screen parameters; 将所述目标虚拟屏放置于尺寸相同的显示容器中;placing the target virtual screen in a display container of the same size; 根据所述车机虚拟屏的屏幕分辨率计算所述显示容器的缩放系数;calculating the scaling factor of the display container according to the screen resolution of the car-machine virtual screen; 根据所述缩放系数缩放所述显示容器;scaling the display container according to the scaling factor; 移动缩放后的显示容器以在所述车机虚拟屏完整显示所述目标虚拟屏;moving the scaled display container to completely display the target virtual screen on the car-machine virtual screen; 将所述车机虚拟屏的触摸事件注入所述目标虚拟屏。Injecting the touch event of the vehicle-machine virtual screen into the target virtual screen. 5.根据权利要求4所述的方法,其特征在于,所述根据所述车机虚拟屏的屏幕分辨率计算所述显示容器的缩放系数,包括:5. The method according to claim 4, wherein the calculating the scaling factor of the display container according to the screen resolution of the vehicle-machine virtual screen comprises: 获取所述车机虚拟屏的实际屏幕参数,所述实际屏幕参数至少包括实际屏幕宽度和实际屏幕高度;Acquiring actual screen parameters of the car-machine virtual screen, where the actual screen parameters at least include actual screen width and actual screen height; 根据所述实际屏幕参数,计算所述车机虚拟屏的实际应用区域宽高比;According to the actual screen parameters, calculate the aspect ratio of the actual application area of the car-machine virtual screen; 根据所述预期屏幕参数,计算预期屏幕分辨率宽高比;Calculate an expected screen resolution aspect ratio according to the expected screen parameters; 根据所述实际屏幕参数、所述预期屏幕参数、所述实际应用区域宽高比和所述预期屏幕分辨率宽高比,计算所述显示容器的缩放系数。Calculate the scaling factor of the display container according to the actual screen parameters, the expected screen parameters, the actual application area aspect ratio and the expected screen resolution aspect ratio. 6.根据权利要求5所述的方法,其特征在于,所述移动缩放后的显示容器以在所述车机虚拟屏完整显示所述目标虚拟屏包括:6. The method according to claim 5, wherein the moving the scaled display container to completely display the target virtual screen on the vehicle-machine virtual screen comprises: 根据所述预期屏幕参数和所述缩放系数,计算横向平移量和纵向平移量;calculating a horizontal translation amount and a vertical translation amount according to the expected screen parameters and the scaling factor; 根据所述横向平移量和所述纵向平移量,移动缩放后的显示容器至所述车机虚拟屏的中心位置,以在所述车机虚拟屏上完整显示所述目标虚拟屏。According to the horizontal translation amount and the vertical translation amount, the zoomed display container is moved to the center of the vehicle-machine virtual screen, so as to completely display the target virtual screen on the vehicle-machine virtual screen. 7.根据权利要求4所述的方法,其特征在于,所述将所述车机虚拟屏的触摸事件注入所述目标虚拟屏,包括:7. The method according to claim 4, wherein the injecting the touch event of the vehicle-machine virtual screen into the target virtual screen comprises: 监听所述车机虚拟屏的触摸事件;Monitor the touch event of the virtual screen of the vehicle; 获取所述车机虚拟屏的触摸事件坐标;Obtain the touch event coordinates of the car-machine virtual screen; 根据所述缩放系数对所述触摸事件坐标进行缩放处理;performing scaling processing on the coordinates of the touch event according to the scaling factor; 将处理后的触摸事件坐标注入所述目标虚拟屏。Inject the processed touch event coordinates into the target virtual screen. 8.根据权利要求1所述的方法,其特征在于,所述方法还包括:8. The method according to claim 1, further comprising: 在所述未适配应用为支持全屏自适应显示的应用时,在所述车机虚拟屏上直接显示所述投屏数据。When the unadapted application is an application that supports full-screen adaptive display, the projected screen data is directly displayed on the car-machine virtual screen. 9.一种基于车机虚拟屏的投屏装置,其特征在于,包括:9. A screen projection device based on a car-machine virtual screen, characterized in that it comprises: 接收模块,用于在车机设备与终端设备连接后,接收所述终端设备的投屏指令,所述投屏指令携带未适配应用的投屏数据;The receiving module is configured to receive a screen projection instruction of the terminal equipment after the vehicle-machine equipment is connected to the terminal equipment, and the screen projection instruction carries screen projection data of unadapted applications; 创建模块,用于在所述未适配应用为不支持全屏自适应显示的应用时,根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏;A creation module, configured to create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs when the unadapted application is an application that does not support full-screen adaptive display; 启动模块,用于在所述目标虚拟屏上显示所述投屏数据。A starting module, configured to display the screen projection data on the target virtual screen. 10.根据权利要求9所述的装置,其特征在于,所述装置还包括:10. The device according to claim 9, further comprising: 判断模块,用于在所述未适配应用为不支持全屏自适应显示的应用时,以及所述根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏之前,判断是否已创建有所述目标虚拟屏;A judging module, configured to create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs when the unadapted application is an application that does not support full-screen adaptive display Before, it is judged whether the target virtual screen has been created; 所述创建模块,具体用于在所述判断模块的判断结果为否时,根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏。The creating module is specifically configured to create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs when the judgment result of the judging module is negative. 11.根据权利要求10所述的装置,其特征在于:11. The device according to claim 10, characterized in that: 所述启动模块,还用于在所述判断模块的判断结果为已创建有所述目标虚拟屏时,在所述目标虚拟屏上显示所述投屏数据。The starting module is further configured to display the projected screen data on the target virtual screen when the judging result of the judging module is that the target virtual screen has been created. 12.根据权利要求9至11任一项所述的装置,其特征在于,所述创建模块用于根据车机虚拟屏和所述未适配应用所属应用组的预期屏幕参数,创建目标虚拟屏的方式具体为:12. The device according to any one of claims 9 to 11, wherein the creation module is used to create a target virtual screen according to the car-machine virtual screen and the expected screen parameters of the application group to which the unadapted application belongs The specific way is: 获取所述未适配应用所属应用组的预期屏幕参数,所述预期屏幕参数至少包括预期屏幕宽度、预期屏幕高度以及预期屏幕像素密度;以及,根据所述预期屏幕参数创建目标虚拟屏;以及,将所述目标虚拟屏放置于尺寸相同的显示容器中;以及,根据所述车机虚拟屏的屏幕分辨率计算所述显示容器的缩放系数;以及,根据所述缩放系数缩放所述显示容器;以及,移动缩放后的显示容器以在所述车机虚拟屏完整显示所述目标虚拟屏;以及,将所述车机虚拟屏的触摸事件注入所述目标虚拟屏。Obtain expected screen parameters of the application group to which the unadapted application belongs, where the expected screen parameters at least include expected screen width, expected screen height, and expected screen pixel density; and, create a target virtual screen according to the expected screen parameters; and, placing the target virtual screen in a display container of the same size; and calculating a scaling factor of the display container according to the screen resolution of the vehicle-machine virtual screen; and scaling the display container according to the scaling factor; And, moving the scaled display container to completely display the target virtual screen on the car-machine virtual screen; and injecting a touch event of the car-machine virtual screen into the target virtual screen. 13.根据权利要求12所述的装置,其特征在于,所述创建模块用于根据所述车机的屏幕分辨率计算所述显示容器的缩放系数的方式具体为:13. The device according to claim 12, wherein the method for the creation module to calculate the scaling factor of the display container according to the screen resolution of the vehicle is as follows: 获取所述车机虚拟屏的实际屏幕参数,所述实际屏幕参数至少包括实际屏幕宽度和实际屏幕高度;Acquiring actual screen parameters of the car-machine virtual screen, where the actual screen parameters at least include actual screen width and actual screen height; 根据所述实际屏幕参数,计算所述车机虚拟屏的实际应用区域宽高比;According to the actual screen parameters, calculate the aspect ratio of the actual application area of the car-machine virtual screen; 根据所述预期屏幕参数,计算预期屏幕分辨率宽高比;Calculate an expected screen resolution aspect ratio according to the expected screen parameters; 根据所述实际屏幕参数、所述预期屏幕参数、所述实际应用区域宽高比和所述预期屏幕分辨率宽高比,计算所述显示容器的缩放系数。Calculate the scaling factor of the display container according to the actual screen parameters, the expected screen parameters, the actual application area aspect ratio and the expected screen resolution aspect ratio. 14.根据权利要求13所述的装置,其特征在于,所述创建模块用于移动缩放后的显示容器以在所述车机虚拟屏完整显示所述目标虚拟屏的方式具体为:14. The device according to claim 13, wherein the method for the creation module to move the scaled display container to completely display the target virtual screen on the car-machine virtual screen is as follows: 根据所述预期屏幕参数和所述缩放系数,计算横向平移量和纵向平移量;以及,根据所述横向平移量和所述纵向平移量,移动缩放后的显示容器至所述车机虚拟屏的中心位置,以在所述车机虚拟屏上完整显示所述目标虚拟屏。Calculate the horizontal translation amount and the vertical translation amount according to the expected screen parameters and the zoom factor; and move the zoomed display container to the car-machine virtual screen according to the horizontal translation amount and the vertical translation amount center position, so as to completely display the target virtual screen on the car-machine virtual screen. 15.根据权利要求14所述的装置,其特征在于,所述创建模块用于将所述车机虚拟屏的触摸事件注入所述目标虚拟屏的方式具体为:15. The device according to claim 14, wherein the method for the creation module to inject the touch event of the car-machine virtual screen into the target virtual screen is as follows: 监听所述车机虚拟屏的触摸事件;以及,获取所述车机虚拟屏的触摸事件坐标;以及,根据所述缩放系数对所述触摸事件坐标进行缩放处理;以及,将处理后的触摸事件坐标注入所述目标虚拟屏。Listening to the touch event of the car-machine virtual screen; and acquiring the touch event coordinates of the car-machine virtual screen; and scaling the touch event coordinates according to the scaling factor; and processing the processed touch event Coordinates are injected into the target virtual screen. 16.一种车机设备,其特征在于,包括:16. A vehicle-machine equipment, characterized in that it comprises: 存储有可执行程序代码的存储器;a memory storing executable program code; 与所述存储器耦合的处理器;a processor coupled to the memory; 所述处理器调用所述存储器中存储的所述可执行程序代码,执行权利要求1至8任一项所述的基于车机虚拟屏的投屏方法。The processor invokes the executable program code stored in the memory to execute the screen projection method based on the vehicle-machine virtual screen according to any one of claims 1 to 8. 17.一种车辆,其特征在于,包括:17. A vehicle, comprising: 如权利要求16所述的车机设备。The vehicle-machine equipment according to claim 16. 18.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现权利要求1至8任一项所述方法的步骤。18. A computer-readable storage medium, on which a computer program is stored, wherein, when the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
CN202211566904.1A 2022-12-07 2022-12-07 Screen throwing method and device based on virtual screen of vehicle machine, vehicle machine equipment and vehicle Pending CN116204144A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211566904.1A CN116204144A (en) 2022-12-07 2022-12-07 Screen throwing method and device based on virtual screen of vehicle machine, vehicle machine equipment and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211566904.1A CN116204144A (en) 2022-12-07 2022-12-07 Screen throwing method and device based on virtual screen of vehicle machine, vehicle machine equipment and vehicle

Publications (1)

Publication Number Publication Date
CN116204144A true CN116204144A (en) 2023-06-02

Family

ID=86513733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211566904.1A Pending CN116204144A (en) 2022-12-07 2022-12-07 Screen throwing method and device based on virtual screen of vehicle machine, vehicle machine equipment and vehicle

Country Status (1)

Country Link
CN (1) CN116204144A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024255219A1 (en) * 2023-06-13 2024-12-19 华为技术有限公司 Screen mirroring method and electronic device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110662095A (en) * 2019-08-28 2020-01-07 北京小米移动软件有限公司 Screen projection processing method and device, terminal and storage medium
CN111432070A (en) * 2020-03-17 2020-07-17 北京百度网讯科技有限公司 Application screen projection control method, device, equipment and medium
CN112118558A (en) * 2020-06-30 2020-12-22 上汽通用五菱汽车股份有限公司 Vehicle screen display method, vehicle and computer readable storage medium
JP2021119387A (en) * 2020-05-13 2021-08-12 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッドBeijing Baidu Netcom Science Technology Co., Ltd. Screen projection method, device, apparatus, and storage media
CN113553014A (en) * 2020-09-10 2021-10-26 华为技术有限公司 Application interface display method and electronic device in multi-window screen projection scenario
CN114296673A (en) * 2021-12-28 2022-04-08 努比亚技术有限公司 Virtual screen projection control method and device and computer readable storage medium
CN114356258A (en) * 2020-09-30 2022-04-15 华为技术有限公司 Electronic device, screen projection method thereof and medium
CN114442972A (en) * 2020-10-31 2022-05-06 华为技术有限公司 Screen projection method and electronic equipment
CN115079969A (en) * 2021-03-12 2022-09-20 北京小米移动软件有限公司 Method, device and medium for interaction between devices

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110662095A (en) * 2019-08-28 2020-01-07 北京小米移动软件有限公司 Screen projection processing method and device, terminal and storage medium
CN111432070A (en) * 2020-03-17 2020-07-17 北京百度网讯科技有限公司 Application screen projection control method, device, equipment and medium
JP2021119387A (en) * 2020-05-13 2021-08-12 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッドBeijing Baidu Netcom Science Technology Co., Ltd. Screen projection method, device, apparatus, and storage media
CN112118558A (en) * 2020-06-30 2020-12-22 上汽通用五菱汽车股份有限公司 Vehicle screen display method, vehicle and computer readable storage medium
CN113553014A (en) * 2020-09-10 2021-10-26 华为技术有限公司 Application interface display method and electronic device in multi-window screen projection scenario
CN113741840A (en) * 2020-09-10 2021-12-03 华为技术有限公司 Application interface display method under multi-window screen projection scene and electronic equipment
CN114356258A (en) * 2020-09-30 2022-04-15 华为技术有限公司 Electronic device, screen projection method thereof and medium
CN114442972A (en) * 2020-10-31 2022-05-06 华为技术有限公司 Screen projection method and electronic equipment
CN115079969A (en) * 2021-03-12 2022-09-20 北京小米移动软件有限公司 Method, device and medium for interaction between devices
CN114296673A (en) * 2021-12-28 2022-04-08 努比亚技术有限公司 Virtual screen projection control method and device and computer readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PRAKASH R ET AL.: "Virtual microscopy made economical and effortless using the Foldscope and a smartphone with screen mirroring", 《2019 JOURNAL OF ORAL AND MAXILLOFACIAL PATHOLOGY》, 31 December 2019 (2019-12-31), pages 292 - 294 *
李佳: "用安卓手机投屏到PC", 《软件天地》, 20 January 2022 (2022-01-20), pages 30 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024255219A1 (en) * 2023-06-13 2024-12-19 华为技术有限公司 Screen mirroring method and electronic device

Similar Documents

Publication Publication Date Title
CN107273083B (en) Interaction method, device, equipment and storage medium between terminal equipment
CN106215418B (en) The display control method and its device of a kind of application, terminal
CN103324400B (en) A kind of method showing menu in 3D model and device
CN113010249B (en) Page switching method, device, equipment and medium
CN107341016B (en) Focus state implementation method and device under split screen mechanism, terminal and storage medium
CN111225232A (en) Video-based sticker animation engine, realization method, server and medium
CN117573013A (en) Image processing method, apparatus, device, computer readable storage medium, and product
WO2020220773A1 (en) Method and apparatus for displaying picture preview information, electronic device and computer-readable storage medium
EP4343580A1 (en) Media file processing method and apparatus, device, readable storage medium, and product
CN109147022A (en) VR data rendering method and system, computer equipment, computer storage medium
WO2024001915A1 (en) Scanning data display method and apparatus, device and storage medium
US10744410B2 (en) Storage medium, information processing apparatus, image processing method, and information processing system
CN116204144A (en) Screen throwing method and device based on virtual screen of vehicle machine, vehicle machine equipment and vehicle
US20250386078A1 (en) Method, apparatus, device, storage medium and product for image processing
CN116775174A (en) Processing method, device, equipment and medium based on user interface frame
CN103297516A (en) Multi-type providing method, multi-type providing system and multi-type providing device of applications
CN118170297A (en) Special effect editing method, device, electronic equipment, storage medium and program product
CN117392280A (en) Image processing methods, devices, equipment, computer-readable storage media and products
CN103248937A (en) Method and system for controlling digital television terminal and associated equipment
US20240267349A1 (en) Media content sending method and apparatus, and device, readable storage medium and product
WO2024188089A1 (en) Special effect information display method and apparatus, electronic device, and storage medium
CN111813317B (en) Interactive display method, system, electronic device and storage medium
CN111200705B (en) Image processing method and device
CN104423950B (en) Information processing method and electronic equipment
CN114153542A (en) Screen projection method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination