Screen dynamic switching system and method based on extended Wayland protocol
By extending the Wayland protocol and introducing the "specify mode" layout mode, the problem of the inability to realize dual-screen dynamic display switching in Weston's IVI Shell environment is solved, and more flexible screen control and personalized display needs are achieved.
Patent Information
- Application Number
- CN202411858589.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-05-16
AI Technical Summary
In Weston's IVI Shell environment, the HMI Control module cannot realize dynamic switching of the specified screen display content in a dual-screen display scenario, and cannot meet the driver's flexibility in information display.
By extending the Wayland protocol, a new layout mode "specify mode" is introduced, and the coordinated work of parsing modules, clients and servers is realized to dynamically switch to the specified display screen at runtime.
It realizes dynamic screen display switching in dual-screen display scenarios, provides more detailed and flexible screen control capabilities, and meets users' personalized display needs.
Smart Images

Figure CN120010801A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent automobile display, and in particular relates to a screen dynamic switching system and method based on an extended Wayland protocol. Background Art
[0002] With the rapid development of the automotive industry, the advancement and flexibility of automotive infotainment systems are particularly critical to improving driving experience and meeting user needs. In this context, Wayland, as a graphics display protocol, has gradually been widely used in the automotive field. Compared with other technologies, it adopts a lighter and more flexible design. This lightweight design makes Wayland more suitable for embedded systems and automotive infotainment systems with high performance requirements. Wayland has strong scalability and supports plug-in mechanisms. This means that in specific scenarios, such as automotive infotainment systems, more customized functions can be achieved through customized plug-ins to meet special needs.
[0003] In this advanced technical context, Weston, as a reference implementation of the Wayland server, has become an ideal choice for automotive infotainment systems. However, in the IVI Shell environment of Weston, the HMI Control module has a prominent technical problem: it is impossible to dynamically switch the display content of a specified screen in a dual-screen display scenario, and it cannot meet the driver's demand for information display flexibility. Summary of the invention
[0004] In order to solve the problem that the HMI Control module cannot realize the dynamic switching of the display content of a specified screen in the dual-screen display scenario under the IVI Shell environment of Weston proposed in the background technology, a first aspect of the present invention provides a screen dynamic switching system based on the extended Wayland protocol, including: a parsing module, which is used to extend the Wayland protocol based on the dynamic display request of the dual-screen display; encapsulating the extended protocol into an application program interface; a client, which is used to respond to the display content switching requests of multiple applications, call the application program interface of the parsing module, create display interface parameters and layout mode parameters for each application; and transmit the display interface parameters and layout mode parameters to a server; the server is used to match the display screen for each application according to the display interface parameters and the layout mode parameters, and display the content of each application on the corresponding screen.
[0005] In some embodiments of the present invention, the parsing module includes: an extension unit, which is used to add layout mode enumeration and screen display switching requests to the Wayland protocol based on dynamic requests for dual-screen display; and an encapsulation unit, which is used to encapsulate the extended protocol into an application interface through a Wayland-scanner.
[0006] In some embodiments of the present invention, the client includes: a calling unit, used to respond to display content switching requests of multiple applications, call the application interface of the parsing module, and create display interface parameters and layout mode parameters for each application; and a transmission unit, used to transmit the display interface parameters and layout mode parameters to the server.
[0007] Furthermore, the transmission unit transmits the display interface parameters and layout mode parameters to the server through the wayland library function.
[0008] In some embodiments of the present invention, the server includes: a matching unit for matching a display screen for each application according to the display interface parameters and the layout mode parameters; and a display unit for displaying the content of each application on a corresponding screen.
[0009] Furthermore, the matching unit assigns an identification code to each application according to the display interface parameters and the layout mode parameters, and matches the display screen according to the display identification code.
[0010] A second aspect of the present invention provides a method for dynamic screen switching based on an extended Wayland protocol, comprising: extending the Wayland protocol based on a dynamic display request for dual-screen display; encapsulating the extended protocol into an application program interface; a client responding to display content switching requests of multiple applications, calling the application program interface of a parsing module, creating display interface parameters and layout mode parameters for each application; and transmitting the display interface parameters and layout mode parameters to a server; the server matches a display screen for each application according to the display interface parameters and the layout mode parameters, and displays the content of each application on the corresponding screen.
[0011] Furthermore, the dynamic display request based on dual-screen display extends the Wayland protocol, and encapsulates the extended protocol as an application program interface, including: adding layout mode enumeration and screen display switching requests to the Wayland protocol based on the dynamic request for dual-screen display; and encapsulating the extended protocol as an application program interface through a Wayland-scanner.
[0012] The third aspect of the present invention provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the screen dynamic switching method based on the extended Wayland protocol provided in the second aspect of the present invention.
[0013] A fourth aspect of the present invention provides a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for dynamic screen switching based on the extended Wayland protocol provided in the second aspect of the present invention is implemented.
[0014] The beneficial effects of the present invention are: The present invention introduces a new layout mode "specify mode" by extending the Wayland protocol, so that users can specify the screen to be displayed more specifically. Through the newly added layout mode "specify mode", a method that can dynamically switch to a specified display screen at runtime is implemented. This provides users with more detailed and flexible screen control capabilities to meet personalized display needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A basic structural diagram of a screen dynamic switching system based on an extended Wayland protocol in some embodiments of the present invention; Figure 2 It is a specific structural schematic diagram of a screen dynamic switching system based on the extended Wayland protocol in some embodiments of the present invention; Figure 3 A specific flow chart of a method for dynamic screen switching based on the extended Wayland protocol in some embodiments of the present invention; Figure 4 It is a structural schematic diagram of a screen dynamic switching method based on an extended Wayland protocol in some embodiments of the present invention; Figure 5 It is a schematic diagram of the structure of an electronic device in some embodiments of the present invention. DETAILED DESCRIPTION
[0016] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0017] refer to Figure 1 and Figure 2In a first aspect of the present invention, a screen dynamic switching system 1 based on an extended Wayland protocol is provided, comprising: a parsing module 11, for extending the Wayland protocol based on a dynamic display request of a dual-screen display; encapsulating the extended protocol into an application program interface; a client 12, for responding to display content switching requests of multiple applications, calling the application program interface of the parsing module, creating display interface parameters and layout mode parameters for each application; and transmitting the display interface parameters and layout mode parameters to a server; a server 13, for matching a display screen for each application according to the display interface parameters and the layout mode parameters, and displaying the content of each application on a corresponding screen.
[0018] In some embodiments of the present invention, the parsing module 11 includes: an extension unit, which is used to add layout mode enumeration and screen display switching requests in the Wayland protocol based on the dynamic request of dual-screen display; and an encapsulation unit, which is used to encapsulate the extended protocol into an application interface through a Wayland-scanner.
[0019] Specifically, the existing Wayland protocol is expanded: including new layout modes and related requests to meet the dynamic display requirements in dual-screen display scenarios. It is necessary to add new information such as enumeration of layout modes and requests for switching screen displays in the corresponding protocol according to the specifications. The protocol definition tool, wayland-scanner, is used to parse the protocol. The content in the protocol is provided to the client in the form of an API for calling.
[0020] Understandably, Figure 2 An implementation of the parsing module is shown in FIG. 1 , that is, an intermediate layer existing in the client and the server; the intermediate layer can exist independently or be integrated in one of the client and the server, and does not affect the implementation of the screen dynamic switching system based on the extended Wayland protocol provided by the present invention.
[0021] In some embodiments of the present invention, the client 12 includes: a calling unit, used to respond to display content switching requests of multiple applications, call the application interface of the parsing module, and create display interface parameters and layout mode parameters for each application; a transmission unit, used to transmit the display interface parameters and layout mode parameters to the server.
[0022] Specifically, the client references the generated interface file, calls the corresponding request interface, creates the surface, sets the layout mode and related parameters. The client passes the parameters related to the creation of the surface and the layout mode to the server-side weston through the Wayland libraries libwayland-client.so and libwayland-server.so.
[0023] In some embodiments of the present invention, the server 13 includes: a matching unit, used to match a display screen for each application according to the display interface parameters and the layout mode parameters; and a display unit, used to display the content of each application on a corresponding screen.
[0024] Specifically, IVI Shell.so in ]weston creates a surface according to the surface-related parameters set by the client, and finally passes all the surface information created by the client to the HMI Controller plug-in; HMI Controller.so combines the Layout setting information on the App side and the Surface information passed by IVI Shell.so to perform layout control operations. Currently, the HMI Controller plug-in only supports 4 layout modes, such as Figure 2 As shown in Layout Mode, the specify mode is the additional implementation content of this design.
[0025] In the wayland / weston architecture, each client app needs to draw the display content to its own surface, that is, each client app corresponds to a surface, and each surface has an id, which can be set by the client when it is created. Weston can identify the number of currently connected displays and assign a screen id to each display. Weston will associate a display layer with each screen by default. That is, each layer also has a corresponding layer id.
[0026] For example, screen 1 and screen 2 each have their own layers, layer1 and layer2 respectively. When the client calls the API, it only needs to pass the parameters surface id and screen id to the HMI Controller plug-in. The HMI Controller can find the corresponding layer id through the screen id, and then associate the client's surface id with the layer to achieve the effect of specifying the screen display. Figure 2 as shown in the Layout Control.
[0027] Example 2 refer to Figure 3 and Figure 4 According to a second aspect of the present invention, a method for dynamic screen switching based on an extended Wayland protocol is provided, comprising: S100. Based on a dynamic display request for dual-screen display, the Wayland protocol is extended; and the extended protocol is encapsulated as an application program interface; further, the dynamic display request based on the dual-screen display is extended to the Wayland protocol, and the extended protocol is encapsulated as an application program interface, including: based on the dynamic request for dual-screen display, the enumeration of layout modes and the request for switching screen display are added to the Wayland protocol; and the extended protocol is encapsulated as an application program interface through a Wayland-scanner; S200. The client responds to display content switching requests of multiple applications, calls the application program interface of the parsing module, creates display interface parameters and layout mode parameters for each application, and transmits the display interface parameters and layout mode parameters to the server; S300. The server matches the display screen for each application according to the display interface parameters and the layout mode parameters, and displays the content of each application on the corresponding screen.
[0028] In step S100 of some embodiments of the present invention, the dynamic display request based on dual-screen display, extending the Wayland protocol, and encapsulating the extended protocol as an application interface includes: adding layout mode enumeration and screen display switching requests to the Wayland protocol based on the dynamic request for dual-screen display; and encapsulating the extended protocol as an application interface through a Wayland-scanner.
[0029] Example 3 refer to Figure 5According to a third aspect of the present invention, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the screen dynamic switching method based on the extended Wayland protocol according to the second aspect of the present invention.
[0030] The electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0031] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0032] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium described in the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus, or a device. In an embodiment of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus, or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
[0033] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device. The computer-readable medium carries one or more computer programs. When the one or more programs are executed by the electronic device, the electronic device: Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, Python, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0034] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0035] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A screen dynamic switching system based on the extended Wayland protocol, characterized in that: include: Parsing module, used to extend the Wayland protocol based on dynamic display requests for dual-screen display; Encapsulate the extended protocol as an application program interface; The client is used to respond to display content switching requests of multiple applications, call the application program interface of the parsing module, create display interface parameters and layout mode parameters for each application; and transmit the display interface parameters and layout mode parameters to the server; The server is used to match a display screen for each application according to the display interface parameters and the layout mode parameters, and display the content of each application on the corresponding screen.
2. The screen dynamic switching system based on the extended Wayland protocol according to claim 1, characterized in that: The parsing module comprises: Extension unit, used for dynamic requests based on dual-screen display, adding layout mode enumeration and screen display switching requests in the Wayland protocol; The encapsulation unit is used to encapsulate the extended protocol into an application program interface through the Wayland-scanner.
3. The screen dynamic switching system based on the extended Wayland protocol according to claim 1, characterized in that: The client comprises: A calling unit, used to respond to display content switching requests of multiple applications, call the application program interface of the parsing module, and create display interface parameters and layout mode parameters for each application; The transmission unit is used to transmit the display interface parameters and layout mode parameters to the server.
4. The screen dynamic switching system based on the extended Wayland protocol according to claim 3 is characterized in that: The transmission unit transmits the display interface parameters and layout mode parameters to the server through the wayland library function.
5. The screen dynamic switching system based on the extended Wayland protocol according to claim 1, characterized in that: The server includes: a matching unit, configured to match a display screen for each application according to the display interface parameters and the layout mode parameters; The display unit is used to display the content of each application on a corresponding screen.
6. The screen dynamic switching system based on the extended Wayland protocol according to claim 5, characterized in that: The matching unit assigns an identification code to each application according to the display interface parameters and the layout mode parameters, and matches the display screen according to the display identification code.
7. A screen dynamic switching method based on the extended Wayland protocol, characterized in that: include: Based on the dynamic display request of dual-screen display, the Wayland protocol is extended; the extended protocol is encapsulated as an application program interface; The client responds to display content switching requests of multiple applications, calls the application program interface of the parsing module, creates display interface parameters and layout mode parameters for each application, and transmits the display interface parameters and layout mode parameters to the server; The server matches a display screen for each application according to the display interface parameters and the layout mode parameters, and displays the content of each application on the corresponding screen.
8. The screen dynamic switching method based on the extended Wayland protocol according to claim 7 is characterized in that: The dynamic display request based on dual-screen display, extending the Wayland protocol, and encapsulating the extended protocol into an application program interface includes: Based on the dynamic request of dual-screen display, the enumeration of layout modes and the request of switching screen display are added to the Wayland protocol; The extended protocol is encapsulated as an application programming interface through Wayland-scanner.
9. An electronic device, comprising: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the screen dynamic switching method based on the extended Wayland protocol as described in any one of claims 7 to 8.
10. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method for dynamic screen switching based on the extended Wayland protocol as described in any one of claims 7 to 8 is implemented.