A picture switching system, method, electronic device and storage medium
Patent Information
- Application Number
- CN202611196839.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本申请提供了一种画面切换系统、方法、电子设备及存储介质,以至少解决相关技术中画面切换存在黑屏现象的问题
[0017] Through this application, after the vehicle starts, the first operating system sends the boot screen sequence to the first layer of the display controller and displays the boot screen sequence through the first layer. The second operating system starts loading the screen to be displayed. After loading is completed, it sends the screen to be displayed to the second layer of the display controller and sends a stop command to the first operating system. The first operating system responds to the stop command, and when the display controller meets the output conditions for the first frame of the screen to be displayed, it adjusts the transparency attribute of the first layer to be fully transparent to display the screen to be displayed. By placing the boot screen on the first layer and the screen to be displayed on the second layer, and by adjusting the transparency after the first operating system responds to the stop command and the screen to be displayed meets the output conditions, seamless screen switching is achieved, avoiding the black screen problem that may be caused by directly destroying the image window.
Smart Images

Figure CN122924879A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle display technology, specifically to a screen switching system, method, electronic device, and storage medium. Background Technology
[0002] With the development of intelligent vehicle technology, modern intelligent cockpit domain controllers typically run multiple operating systems simultaneously. The underlying high real-time system is responsible for high-safety-level tasks such as the instrument panel, vehicle speed display, and reversing camera, while the upper-level infotainment system is responsible for functions such as navigation and multimedia audio-visual. The high real-time system and the infotainment system share the same physical display screen hardware.
[0003] In related technologies, there is a time delay between the issuance of a ready signal and the successful push of the first frame of image into the physical screen register in the infotainment system. High real-time systems destroy the window immediately after receiving the ready signal, resulting in no graphic data input to the physical display screen, causing a black screen between the boot animation and the main interface. Summary of the Invention
[0004] This application provides a screen switching system, method, electronic device, and storage medium to at least solve the problem of black screen phenomenon during screen switching in related technologies.
[0005] This application provides a screen switching system, including: a display controller, a first operating system, and a second operating system; The first operating system is used to send the boot screen sequence to the display controller in response to the vehicle start command; The display controller is used to receive the boot screen sequence and store the boot screen sequence in the first layer of the hardware layer stack so that the boot screen sequence can be displayed on the physical screen through the first layer. The second operating system is used to respond to the vehicle start command and load the screen to be displayed. After the screen to be displayed is loaded, it sends the screen to be displayed to the display controller and sends an end command to the first operating system. The display controller is used to receive the image to be displayed and store it in the second layer of the hardware layer stack. The second layer is the layer below the first layer. In response to the termination command and after determining that the display controller meets the output conditions for the first frame of the image to be presented, the first operating system adjusts the transparency attribute of the first layer to be fully transparent so that the image to be presented can be displayed on the physical screen.
[0006] In one embodiment, the first operating system is further configured to: In response to the vehicle start command, the startup waiting time of the second operating system is determined by a startup waiting timer; if no end command is received from the second operating system and the startup waiting time of the second operating system is greater than the preset startup waiting threshold, an error message interface is displayed on the physical screen via the display controller.
[0007] In one embodiment, the first operating system is further configured to: Upon receiving an error status command from the second operating system, an error message interface is displayed on the physical screen via the display controller; wherein, if the screen to be presented fails to load, the second operating system sends an error status command to the first operating system.
[0008] In one embodiment, the first operating system is specifically used for: In response to the vehicle start command, a frame buffer queue is created; the boot screen sequence is stored in the frame buffer queue; based on the frame buffer queue, multiple boot screen frames in the boot screen sequence are sent to the display controller in sequence; upon receiving a stop command, the sequential sending of boot screen frames in the frame buffer queue to the display controller is stopped, and the remaining boot screen frames in the frame buffer queue are cleared; after the frame buffer queue is cleared, the transparency attribute of the first layer is adjusted to full transparency.
[0009] In one embodiment, the first operating system is further configured to: In response to the end command, the update flag of the second layer containing the image to be displayed is polled; if the update flag is valid, the display controller is determined to meet the output conditions of the first frame of the image to be displayed; if the update flag is invalid, the update flag is polled again.
[0010] In one embodiment, the display controller is further configured to: After storing the image to be displayed in the second layer of the hardware layer stack, the update flag of the second layer containing the image to be displayed is set to be valid.
[0011] In one embodiment, the first operating system is further configured to: If the update flag is invalid, the polling wait time is determined by polling the wait timer; if the polling wait time is greater than the preset polling wait threshold, an error message interface is displayed on the physical screen by the display controller.
[0012] This application also provides a screen switching method, including: Obtain the vehicle start command; Based on the first operating system, in response to the vehicle start command, the boot screen sequence is sent to the display controller; Based on the display controller, the boot screen sequence is received and stored in the first layer of the hardware layer stack so that the boot screen sequence can be displayed on the physical screen through the first layer; Based on the second operating system, in response to the vehicle start command, the system loads the screen to be displayed. After the screen to be displayed is loaded, the system sends the screen to be displayed to the display controller and sends an end command to the first operating system. Based on the display controller, the screen to be displayed is received and stored in the second layer of the hardware layer stack. The second layer is the layer below the first layer. Based on the first operating system, in response to the end command, and after determining that the display controller meets the output conditions of the first frame to be presented, the transparency attribute of the first layer is adjusted to be fully transparent so that the image to be presented can be displayed on the physical screen.
[0013] This application also provides a screen switching device, including: The acquisition module is used to acquire vehicle start commands; The first sending module is used to send the boot screen sequence to the display controller in response to the vehicle start command, based on the first operating system; The first display module is used to receive the boot screen sequence based on the display controller, store the boot screen sequence in the first layer of the hardware layer stack, and display the boot screen sequence on the physical screen through the first layer; The second sending module is used to respond to the vehicle start command based on the second operating system, load the screen to be displayed, send the screen to be displayed to the display controller after the screen to be displayed is loaded, and send an end command to the first operating system. The layer setting module is used to receive the image to be displayed based on the display controller and store the image to be displayed in the second layer of the hardware layer stack. The second layer is the layer below the first layer. The second display module is used, based on the first operating system, in response to an end command and after determining that the display controller meets the output conditions for the first frame of the image to be presented, to adjust the transparency attribute of the first layer to be fully transparent so that the image to be presented can be displayed on the physical screen.
[0014] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described screen switching methods.
[0015] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described screen switching methods.
[0016] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described screen switching methods.
[0017] Through this application, after the vehicle starts, the first operating system sends the boot screen sequence to the first layer of the display controller and displays the boot screen sequence through the first layer. The second operating system starts loading the screen to be displayed. After loading is completed, it sends the screen to be displayed to the second layer of the display controller and sends a stop command to the first operating system. The first operating system responds to the stop command, and when the display controller meets the output conditions for the first frame of the screen to be displayed, it adjusts the transparency attribute of the first layer to be fully transparent to display the screen to be displayed. By placing the boot screen on the first layer and the screen to be displayed on the second layer, and by adjusting the transparency after the first operating system responds to the stop command and the screen to be displayed meets the output conditions, seamless screen switching is achieved, avoiding the black screen problem that may be caused by directly destroying the image window. Attached Figure Description
[0018] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the interaction flow of the screen switching system provided in the embodiments of this application; Figure 2 A flowchart illustrating an exemplary screen switching method provided in an embodiment of this application; Figure 3 A schematic diagram of an exemplary hardware layer stack provided for embodiments of this application; Figure 4 A schematic diagram of the structure of an exemplary screen switching system provided in an embodiment of this application; Figure 5 A flowchart illustrating a screen switching method provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a screen switching device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0021] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0022] With the development of intelligent vehicle technology, modern intelligent cockpit domain controllers typically need to run multiple operating systems simultaneously on a single high-performance SoC. The lower-level, high-real-time systems, such as QNX or VxWorks, handle high-safety tasks like the instrument panel, speedometer display, and reversing camera, while the upper-level infotainment systems, such as Android Automotive OS, handle navigation, multimedia audio and video functions. These two systems usually run on a Hypervisor virtual machine architecture and share the same physical display screen hardware, such as the central control screen.
[0023] According to relevant safety regulations, a clear reversing image must be displayed within 2 seconds after the vehicle is put into reverse gear during a cold start. Major OEMs also require the system to light up the screen and play the brand's boot animation within 1.5 seconds of power-on.
[0024] Since it typically takes 15-30 seconds for the Android system's framework kernel to boot and the graphics compositor (SurfaceFlinger) to complete initialization, the fast-booting QNX system usually starts a lightweight media playback process, directly pushing the boot animation screen to the Display Controller (DPU). Meanwhile, Android performs its boot initialization in the background. When the Android system's graphics framework has finished booting and is ready to output its first frame, such as the desktop Launcher interface, screen control needs to be transferred from QNX to Android.
[0025] In related technologies, Android sends a handover exit signal (STOP signal) to QNX via inter-process communication (IPC). Upon receiving the signal, QNX's pre-playback process immediately calls the API to destroy the graphics window, release the frame buffer, and terminate the rendering process. Android's SurfaceFlinger detects the layer being idle and pushes the first frame into physical video memory via the hardware compositor. However, the Android framework has significant asynchronous timing delays. From the time Android sends the STOP signal to the successful storage of the first frame in the physical screen register, there is a delay and clock skew (VSYNC synchronization failure) of 50ms to hundreds of milliseconds. The QNX pre-playback process destroys the window immediately upon receiving the termination command, resulting in no graphics data input to the physical display during the idle period. The screen appears completely black with no signal, causing a noticeable black screen or strong screen flickering between the boot animation and the main interface.
[0026] To address the aforementioned technical problems, this application provides a screen switching system, method, electronic device, and storage medium. In this screen switching system, after the vehicle starts, the first operating system sends the boot screen sequence to the first layer of the display controller and displays the boot screen sequence through the first layer. The second operating system then loads the screen to be displayed. After loading, it sends the screen to be displayed to the second layer of the display controller and sends a termination command to the first operating system. In response to the termination command, and when the display controller meets the output conditions for the first frame of the screen to be displayed, the first operating system adjusts the transparency attribute of the first layer to full transparency to display the screen to be displayed. By having the boot screen located on the first layer and the screen to be displayed on the second layer, and by adjusting the transparency only after the first operating system responds to the termination command and the screen to be displayed meets the output conditions, seamless screen switching is achieved, avoiding the black screen problem that may result from directly destroying the image window.
[0027] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0028] This application provides a screen switching system for switching between the screens of a first operating system and a second operating system during a vehicle cold start.
[0029] like Figure 1The diagram illustrates the interaction flow of a screen switching system provided in this application embodiment. The system includes a display controller, a first operating system, and a second operating system. The first operating system, in response to a vehicle start command, sends a boot screen sequence to the display controller. The display controller receives the boot screen sequence and stores it in the first layer of a hardware layer stack, displaying the boot screen sequence on the physical screen through the first layer. The second operating system, in response to a vehicle start command, loads the screen to be displayed, and after loading, sends the screen to be displayed to the display controller and sends a termination command to the first operating system. The display controller receives the screen to be displayed and stores it in the second layer of the hardware layer stack, the second layer being the layer below the first layer. In response to the termination command and upon determining that the display controller meets the conditions for outputting the first frame of the screen to be displayed, the first operating system adjusts the transparency attribute of the first layer to be fully transparent, so that the screen to be displayed is displayed on the physical screen.
[0030] Specifically, the first operating system is a high real-time operating system, and the second operating system is an infotainment system. After a cold start of the vehicle, the first operating system responds to the vehicle start command, initiates the pre-viewing image playback process, and creates a first graphics window. This first graphics window corresponds to the first layer of the hardware layer stack in the display controller. The boot screen sequence is input to the first graphics window, which then sends the boot screen sequence to the first layer, which displays the boot screen sequence on the physical screen. The first graphics window can serve as a graphics buffer. The preset priority of the first graphics window is higher than that of the second graphics window, thus placing the first layer corresponding to the first graphics window above the second layer corresponding to the second graphics window in the display controller.
[0031] In response to the vehicle start command, the second operating system initiates the image compositing process (SurfaceFlinger) and creates a second graphics window. It then builds a graphics framework, composites multiple image elements, renders the image, and obtains the screen to be displayed. If the screen is successfully rendered, it is sent to the display controller through the second graphics window. This second graphics window corresponds to the second layer of the hardware layer stack in the display controller. An exit signal for screen handover, i.e., a termination command, is sent to the first operating system's pre-playback process via inter-process communication (IPC). The display controller then stores the screen to be displayed in the second layer, below the first layer.
[0032] In response to the termination command, and provided the display controller meets the conditions for outputting the first frame of the image to be presented, the first operating system calls a native display interface, such as `screen set window property iv`, to instantly modify the visibility attribute of the first graphics window to a fully transparent state without changing the window's lifecycle or memory usage, so that the physical screen can display the second layer of the image to be presented. The condition for outputting the first frame of the image to be presented is that the image to be presented is successfully stored in the second layer.
[0033] When the visibility attribute of the first graphics window is set to full transparency and the processing unit is displayed in the display controller, the first frame of the second operating system, which was originally hidden below, is instantly mapped onto the screen by using the hardware's native alpha blending mechanism, penetrating the first graphics window.
[0034] After successfully issuing the full transparency attribute configuration and ensuring visual layer penetration, the first operating system's pre-playback process executes the safe recycling logic in a completely silent background state, calls the destruction interface to release the first graphics window in the full transparency state, and terminates the process.
[0035] For example, such as Figure 2 The diagram shown is a flowchart illustrating an exemplary screen switching method provided in this application embodiment. In the initial display stage, the first operating system starts the pre-screen playback process and displays the boot screen sequence on the physical screen. In response to the vehicle start command, the second operating system begins rendering the screen to be presented. When the screen to be presented is rendered, the second operating system sends a termination command to the first operating system via IPC. In response to the termination command, the first operating system sets the first layer to a fully transparent state so that the screen to be presented by the second operating system can penetrate the first layer and be displayed on the physical screen. When the screen to be presented is successfully displayed, the first operating system destroys the first graphics window and the corresponding first layer.
[0036] Correspondingly, since the screen switching process does not involve time-consuming system-level process destruction and large-block video memory copying, a seamless switching at the microsecond level is achieved, enhancing the immersive experience of human-computer interaction. By placing the first layer corresponding to the first operating system above the second layer corresponding to the second operating system, the first frame of the second operating system is temporarily obscured. By changing the layer's transparency attribute, the problem of a black screen or flickering on the physical screen due to the destruction of the first operating system before the first frame of the second operating system is successfully prepared is avoided.
[0037] For example, such as Figure 3The diagram illustrates an exemplary hardware layer stack provided in this embodiment. The first layer is located above the second layer. Before the first operating system responds to the end command, the transparency attribute of the first layer is opaque, and the physical screen displays the boot screen. After the first operating system responds to the end command, the transparency attribute of the first layer becomes fully transparent, and the physical screen displays the image to be displayed from the second layer.
[0038] Based on the above embodiments, as one implementable method, in one embodiment, the first operating system is further configured to: In response to the vehicle start command, the startup waiting time of the second operating system is determined by a startup waiting timer; if no end command is received from the second operating system and the startup waiting time of the second operating system is greater than the preset startup waiting threshold, an error message interface is displayed on the physical screen via the display controller.
[0039] Based on the above embodiments, as one implementable method, in one embodiment, the first operating system is further configured to: Upon receiving an error status command from the second operating system, an error message interface is displayed on the physical screen via the display controller; wherein, if the screen to be presented fails to load, the second operating system sends an error status command to the first operating system.
[0040] Specifically, in response to the vehicle start command, the first operating system sends a boot screen to the display controller and starts a wait timer to determine the boot waiting time for the second operating system. If the boot waiting time for the second operating system exceeds a preset boot waiting threshold, it indicates that the second operating system has failed to boot, and the waiting screen fails to load. The first operating system then displays an error message interface on the physical screen via the display controller. Alternatively, if the waiting screen for the second operating system fails to load, it sends an error status command to the first operating system. Upon receiving the error status command from the second operating system, the first operating system displays an error message interface on the physical screen via the display controller or enters a hibernation state.
[0041] Correspondingly, by setting a system startup wait time and displaying an error message interface when the system wait time exceeds a preset startup wait threshold, the physical screen is prevented from being stuck for a long time due to a failure of the second operating system.
[0042] Based on the above embodiments, as one implementable approach, in one embodiment, the first operating system is specifically used for: In response to the vehicle start command, a frame buffer queue is created; the boot screen sequence is stored in the frame buffer queue; based on the frame buffer queue, multiple boot screen frames in the boot screen sequence are sent to the display controller in sequence; upon receiving a stop command, the sequential sending of boot screen frames in the frame buffer queue to the display controller is stopped, and the remaining boot screen frames in the frame buffer queue are cleared; after the frame buffer queue is cleared, the transparency attribute of the first layer is adjusted to full transparency.
[0043] Specifically, in response to vehicle startup, the first operating system creates a frame buffer queue, stores multiple boot screen frames corresponding to the boot screen sequence into the frame buffer queue in sequence, and sends the boot screen frames to the display controller sequentially through the frame buffer queue. Upon receiving a stop command, it stops sending the boot screen frames in the frame buffer queue to the display controller in sequence, clears the remaining boot screen frames in the frame buffer queue, and adjusts the transparency attribute of the first layer to full transparency after the frame buffer queue is cleared.
[0044] Accordingly, upon receiving the end command, the frame buffer queue stops sending boot screen frames to the display controller and clears the remaining boot screen frames to prevent the boot screen frames from being displayed on the physical screen at the moment of transparent switching, thus interfering with the display.
[0045] Based on the above embodiments, as one implementable method, in one embodiment, the first operating system is further configured to: In response to the end command, the update flag of the second layer containing the image to be displayed is polled; if the update flag is valid, the display controller is determined to meet the output conditions of the first frame of the image to be displayed; if the update flag is invalid, the update flag is polled again.
[0046] Based on the above embodiments, as one possible implementation, in one embodiment, the display controller is further configured to: After storing the image to be displayed in the second layer of the hardware layer stack, the update flag of the second layer containing the image to be displayed is set to be valid.
[0047] Based on the above embodiments, as one implementable method, in one embodiment, the first operating system is further configured to: If the update flag is invalid, the polling wait time is determined by polling the wait timer; if the polling wait time is greater than the preset polling wait threshold, an error message interface is displayed on the physical screen by the display controller.
[0048] Specifically, in extreme cases, the second operating system issues a termination command, but the second operating system does not actually successfully store the image to be presented into the second layer. Before changing the transparency attribute, the first operating system first polls and checks the update flag bit, and uses the update flag bit to indicate whether the image to be presented has actually been stored into the second layer.
[0049] After the image to be presented is successfully stored in the second layer, the update flag is confirmed to be valid. If the update flag is valid, the display controller is confirmed to meet the output conditions of the first frame to be presented, and the transparency property is set to fully transparent. Otherwise, an error message interface is displayed or the system enters sleep mode.
[0050] Correspondingly, the update flag indicates whether the image to be presented has been successfully stored in the second layer. By polling the update flag, it is determined whether the first frame of the image to be presented in the second operating system is ready. This avoids the black screen problem caused by the image to be presented not being ready but directly responding to the end command and changing the transparency.
[0051] Specifically, in one embodiment, the hardware foundation is a high-performance SoC including a GPU and a DPU. The DPU does not consume CPU computing power and is responsible for the hardware module for image compositing and Alpha blending. On the software side, the first operating system QNX is responsible for managing the display of the physical screen and displays the boot screen through the pre-image playback process. The second operating system Android runs in a virtual machine and is driven by a Hardware Composer (HWC) to send the image to be presented to the display controller. The first and second operating systems communicate via IPC bus.
[0052] Take VidcScQnxWindow, the window management class for the QNX-side pre-playback process, as an example.
[0053] First, when no termination command is received, the main thread of the first operating system processes the loop VidcScQnxWindow::process, continuously pushing the boot screen frames into the frame buffer queue to keep the boot screen playing.
[0054] Once the Android device successfully renders the first frame of the boot screen, it sends a high-priority IPC STOP message as a termination command. Upon hearing the STOP message, the first operating system's pre-roll image playback process instantly sets its internal flag bThreadExitStart to true, stopping the input of the boot screen frame to the frame buffer queue, and sets bThreadExit to true, modifying the transparency attribute.
[0055] if (bThreadExitStart == false) { mQueueDisplay.push(frameData); / / Enqueue the normal boot screen frame } else { if (!mQueueDisplay.isEmpty()) { mQueueDisplay.pop(); / / Exit state, forcefully discard all remaining frames. } } When the first graphics window sends the boot screen frame to the display controller, the rendering callback function VidcScQnxWindow::commit is called to check bThreadExit. If bThreadExit is false, the boot screen frame is sent to the display controller. If bThreadExit is true, it indicates that the first operating system has received the end command. The window Destroy function is called to modify the transparency attribute of the first layer.
[0056] Because the modification of attribute values takes a short time, the modification command is captured by the DPU within a very short VSYNC cycle. The hybrid rasterization module inside the DPU multiplies the Alpha channel of the graphics layer by 0, making it 100% transparent, while the first frame of the Android image to be displayed on the physical screen is presented.
[0057] After the seamless screen transition is completed, the previous image playback process ends its final rendering. In the cleanup process, the screen_destroy_window interface is called to release memory and destroy the first graphics window.
[0058] For example, such as Figure 4 The diagram illustrates the structure of an exemplary screen switching system provided in this application embodiment. The first operating system, QNX, responds to the vehicle start command by initiating a pre-image playback process, rendering a boot screen frame, and sending it to the first layer of the hardware layer stack via a first graphics window. The boot screen is then displayed on the physical screen via the first layer. The second operating system, also responding to the vehicle start command, initiates an image compositing process, renders the image to be presented, and after successful rendering, sends the image to be presented from the second graphics window to the second layer of the hardware layer stack via the hardware compositor driver. The second operating system sends a termination command to the first operating system via IPC. In response to the termination command, the first operating system changes the transparency attribute to full transparency via Alpha, allowing the image to be presented to be displayed on the physical screen.
[0059] The screen switching system provided in this application includes a display controller, a first operating system, and a second operating system. The first operating system is used to send a boot screen sequence to the display controller in response to a vehicle start command. The display controller is used to receive the boot screen sequence, store the boot screen sequence in a first layer of a hardware layer stack, and display the boot screen sequence on a physical screen through the first layer. The second operating system is used to load the screen to be displayed in response to the vehicle start command, and after the screen to be displayed is loaded, send the screen to be displayed to the display controller and send a stop command to the first operating system. The display controller is used to receive the screen to be displayed and store the screen to be displayed in a second layer of a hardware layer stack, the second layer being the layer below the first layer. The first operating system is used to adjust the transparency attribute of the first layer to full transparency in response to the stop command and when it is determined that the display controller meets the output conditions for the first frame of the screen to be displayed, so that the screen to be displayed is displayed on the physical screen.
[0060] The method provided by the above solution achieves seamless screen switching by sending the boot screen sequence to the first layer of the display controller after the vehicle starts, and displaying the boot screen sequence through the first layer. The second operating system then loads the screen to be displayed, and after loading is complete, sends the screen to be displayed to the second layer of the display controller and sends a stop command to the first operating system. The first operating system responds to the stop command, and when the display controller meets the output conditions for the first frame of the screen to be displayed, it adjusts the transparency attribute of the first layer to be fully transparent to display the screen to be displayed. By having the boot screen located on the first layer and the screen to be displayed located on the second layer, and by adjusting the transparency after the first operating system responds to the stop command and the screen to be displayed meets the output conditions, the black screen problem that may be caused by directly destroying the image window is achieved.
[0061] Furthermore, since the screen switching process does not involve time-consuming system-level process destruction and large-block video memory copying, it achieves seamless switching at the microsecond level, enhancing the immersive experience of human-computer interaction. By placing the first layer corresponding to the first operating system above the second layer corresponding to the second operating system, the first frame of the second operating system is temporarily obscured. By changing the layer's transparency attribute, the problem of a black screen or flickering on the physical screen due to the destruction of the first operating system if the first frame of the second operating system is not ready is avoided. By setting a system startup wait time, and displaying an error message interface when the system wait time exceeds a preset startup wait threshold, the problem of the physical screen being in a sluggish state for a long time due to the failure of the second operating system is avoided. After receiving the end command, the frame buffer queue stops sending boot screen frames to the display controller and stores the remaining boot screen frames to prevent the boot screen frames from being displayed on the physical screen at the moment of transparency switching, thus interfering with the image. The update flag indicates whether the image to be presented has been successfully stored in the second layer. By polling the update flag, it is determined whether the first frame of the second operating system to be presented is ready successfully, avoiding the problem of a black screen caused by directly responding to the end command and changing the transparency when the image to be presented is not ready successfully.
[0062] Through the above description of the embodiments, those skilled in the art can clearly understand that the system according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0063] This application provides a screen switching method, applied to the screen switching system provided in the above embodiments. The executing entity in this application is an electronic device, such as a server, desktop computer, laptop computer, tablet computer, and other electronic devices capable of heterogeneous computing.
[0064] like Figure 5 The diagram shown is a flowchart illustrating a screen switching method provided in an embodiment of this application. The method includes: Step 501: Obtain the vehicle start command; Step 502: Based on the first operating system, in response to the vehicle start command, the boot screen sequence is sent to the display controller; Step 503: Based on the display controller, receive the boot screen sequence and store the boot screen sequence in the first layer of the hardware layer stack so as to display the boot screen sequence on the physical screen through the first layer; Step 504: Based on the second operating system, responding to the vehicle start command, load the screen to be displayed. After the screen to be displayed is loaded, send the screen to be displayed to the display controller and send an end command to the first operating system. Step 505: Based on the display controller, receive the image to be displayed and store the image to be displayed in the second layer of the hardware layer stack. The second layer is the layer below the first layer. Step 506: Based on the first operating system, in response to the end command, and after determining that the display controller meets the output conditions of the first frame to be presented, adjust the transparency attribute of the first layer to be fully transparent so that the image to be presented can be displayed on the physical screen.
[0065] For a description of the features in the embodiment corresponding to the screen switching method, please refer to the relevant description of the embodiment corresponding to the screen switching system, which will not be repeated here.
[0066] The embodiments of this application also provide a screen switching device, applied to the screen switching method provided in the above embodiments.
[0067] like Figure 6 The diagram shown is a structural schematic of a screen switching device provided in an embodiment of this application. The screen switching device 60 includes: an acquisition module 601, a first sending module 602, a first display module 603, a second sending module 604, a layer setting module 605, and a second display module 606.
[0068] The system comprises the following modules: an acquisition module for acquiring a vehicle start command; a first sending module for sending a boot screen sequence to a display controller in response to the vehicle start command, based on a first operating system; a first display module for receiving the boot screen sequence from the display controller, storing the boot screen sequence in the first layer of a hardware layer stack, and displaying the boot screen sequence on a physical screen through the first layer; a second sending module for loading a screen to be displayed in response to the vehicle start command, based on a second operating system, sending the screen to be displayed to the display controller after loading, and sending an end command to the first operating system; a layer setting module for receiving the screen to be displayed from the display controller, storing the screen to be displayed in the second layer of a hardware layer stack, the second layer being the layer below the first layer; and a second display module for adjusting the transparency attribute of the first layer to full transparency in response to the end command and, if the display controller meets the output conditions for the first frame of the screen to be displayed, so that the screen to be displayed is displayed on the physical screen.
[0069] For a description of the features in the embodiment corresponding to the screen switching device, please refer to the relevant description of the embodiment corresponding to the screen switching method, which will not be repeated here.
[0070] Embodiments of this application also provide an electronic device, such as... Figure 7The diagram shown is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, including a processor 10 and a memory 20. The memory 20 stores a computer program, and the processor 10 is configured to run the computer program to execute the steps in any of the above-described screen switching method embodiments.
[0071] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described screen switching method embodiments when it is run.
[0072] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0073] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described screen switching method embodiments.
[0074] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described screen switching method embodiments.
[0075] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0076] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0077] The foregoing has provided a detailed description of a screen switching system, method, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A screen switching system, characterized in that, The system includes: a display controller, a first operating system, and a second operating system; The first operating system is used to send the boot screen sequence to the display controller in response to the vehicle start command; The display controller is used to receive the boot screen sequence and store the boot screen sequence in the first layer of the hardware layer stack so as to display the boot screen sequence on the physical screen through the first layer; The second operating system is used to respond to the vehicle start command and load the screen to be displayed. After the screen to be displayed is loaded, it sends the screen to be displayed to the display controller and sends an end command to the first operating system. The display controller is used to receive the image to be displayed and store the image to be displayed in the second layer of the hardware layer stack, wherein the second layer is the layer below the first layer; In response to the termination command and upon determining that the display controller meets the output conditions for the first frame to be presented, the first operating system adjusts the transparency attribute of the first layer to be fully transparent so that the image to be presented is displayed on the physical screen.
2. The screen switching system according to claim 1, characterized in that, The first operating system is also used for: In response to the vehicle start command, the startup waiting time of the second operating system is determined by starting a waiting timer; If no termination command is received from the second operating system, and the startup waiting time of the second operating system exceeds a preset startup waiting threshold, an error message interface is displayed on the physical screen via the display controller.
3. The screen switching system according to claim 1, characterized in that, The first operating system is also used for: Upon receiving an error status command from the second operating system, the display controller displays an error message interface on the physical screen. In the event that the screen to be displayed fails to load, the second operating system sends the error status command to the first operating system.
4. The screen switching system according to claim 1, characterized in that, The first operating system is specifically used for: In response to the vehicle start command, a frame buffer queue is created; Store the boot screen sequence into a frame buffer queue; Based on the frame buffer queue, multiple boot screen frames in the boot screen sequence are sequentially sent to the display controller. Upon receiving the termination command, the sequential transmission of boot screen frames in the frame buffer queue to the display controller is stopped, and the remaining boot screen frames in the frame buffer queue are cleared. Once the frame buffer queue is emptied, adjust the transparency property of the first layer to full transparency.
5. The screen switching system according to claim 1, characterized in that, The first operating system is also used for: In response to the end command, the update flag of the second layer where the image to be displayed is located is polled and detected. If the update flag is valid, it is determined that the display controller meets the output conditions for the first frame to be displayed. If the update flag is invalid, continue polling to check the update flag.
6. The screen switching system according to claim 5, characterized in that, The display controller is further configured to: After storing the image to be presented in the second layer of the hardware layer stack, the update flag of the second layer containing the image to be presented is determined to be valid.
7. The screen switching system according to claim 5, characterized in that, The first operating system is also used for: If the update flag is invalid, the polling wait time is determined by polling the wait timer; If the polling wait time exceeds a preset polling wait threshold, an error message interface is displayed on the physical screen via the display controller.
8. A screen switching method, applied to the screen switching system as described in any one of claims 1 to 7, characterized in that, The method includes: Obtain the vehicle start command; Based on the first operating system, in response to the vehicle start command, the boot screen sequence is sent to the display controller; Based on the display controller, the boot screen sequence is received and stored in the first layer of the hardware layer stack so that the boot screen sequence can be displayed on the physical screen through the first layer; Based on the second operating system, in response to the vehicle start command, the system loads the screen to be displayed. After the screen to be displayed is loaded, the system sends the screen to be displayed to the display controller and sends an end command to the first operating system. Based on the display controller, the screen to be displayed is received and stored in the second layer of the hardware layer stack, where the second layer is the layer below the first layer; Based on the first operating system, in response to the end command, and after determining that the display controller meets the output conditions for the first frame to be presented, the transparency attribute of the first layer is adjusted to be fully transparent so that the image to be presented is displayed on the physical screen.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the screen switching method as described in claim 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the screen switching method as described in claim 8.