A plug-in data communication method, device and medium
By adopting a plug-in data communication method in the vehicle system, and obtaining and loading the plug-in configuration file through the information forwarding unit, data communication between systems is realized, which solves the problems of low code reuse rate and heavy system modification workload in the existing technology, and improves Improves the stability and development efficiency of communication between systems.
Patent Information
- Application Number
- CN202410814237.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-24
AI Technical Summary
Communication between existing vehicle systems is scattered in various functional modules, resulting in low code reuse rate, inflexible transplantation and customization, and heavy workload of system modification when business function requirements change.
The plug-in data communication method is adopted, the plug-in configuration file is obtained through the information forwarding unit, the target plug-in is loaded to realize data communication between systems, and the plug-inization of the communication module is realized.
It improves the code reuse rate between projects, reduces development costs, improves the stability of communication between systems, and facilitates division of labor and maintenance among different developers.
Smart Images

Figure CN118394547B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle-mounted communication technology, and in particular to a plug-in data communication method, device and medium. Background Art
[0002] At present, the communication between existing systems in a vehicle is generally scattered among various functional modules, or all the data of communication between systems is processed by an independent module.
[0003] This will result in low code reuse between projects, inflexible migration and customization, and a large amount of system modification workload when business function requirements change. Summary of the invention
[0004] In order to overcome the above technical defects, the purpose of this application is to provide a plug-in data communication method, device and medium, the method comprising: obtaining a plug-in configuration file through the first information forwarding unit and the second information forwarding unit; loading a target plug-in according to the plug-in configuration file; and executing data communication between the first system and the second system through the target plug-in. The technical solution of this application can improve the code reuse rate between projects, reduce development costs, and improve the stability of communication between systems by implementing plug-in for the communication module.
[0005] The specific technical solutions provided by the embodiments of this application are as follows:
[0006] In a first aspect, a plug-in data communication method is provided, the method being applied to a vehicle system, the vehicle system comprising a first system and a second system, the first system being communicatively connected to the second system, the first system comprising a first system communication module, the first system communication module comprising a first information forwarding unit and a plurality of first plug-ins, the output end of the first information forwarding unit being connected to the input ends of the plurality of first plug-ins, the second system comprising a second system communication module, the second system communication module comprising a second information forwarding unit and a plurality of second plug-ins, the output end of the second information forwarding unit being connected to the input ends of the plurality of second plug-ins, the first plug-in corresponding to the second plug-in one by one, the method comprising:
[0007] Obtaining a plug-in configuration file through the first information forwarding unit and the second information forwarding unit, wherein the plug-in configuration file is used to perform service configuration on each plug-in;
[0008] Load the target plug-in according to the plug-in configuration file;
[0009] Data communication between the first system and the second system is performed through the target plug-in.
[0010] Furthermore, the vehicle system further includes a virtual machine manager, and the first system and the second system are communicatively connected via the virtual machine manager;
[0011] or,
[0012] The first system is communicatively connected with the second system via inter-process communication.
[0013] Further, the plug-in includes an input plug-in, the input plug-in of the first system includes an input cross-system server, and the input plug-in of the second system includes an input cross-system client;
[0014] The first system includes a first application terminal, an output terminal of the first application terminal is connected to an input terminal of the first system communication module;
[0015] The second system includes a second application end, a framework end and a hardware abstraction layer, and the output ends of the second application end, the framework end and the hardware abstraction layer are respectively connected to the input end of the second system communication module.
[0016] Further, the hardware abstraction layer includes a virtual touch device, and the loading of a target plug-in according to the plug-in configuration file and the execution of data communication between the first system and the second system through the target plug-in include:
[0017] Loading an input plug-in through a first information forwarding unit of the first system, and creating an input cross-system server through the input plug-in;
[0018] Loading an input plug-in through a second information forwarding unit of the second system, and creating an input cross-system client and a virtual touch device through the input plug-in;
[0019] A communication connection is established between the input cross-system server and the input cross-system client according to the virtual touch device.
[0020] Furthermore, the first application end includes a human-machine interface and an input server end, the framework end includes an input event processing distributor, and after establishing a communication connection between the input cross-system server end and the input cross-system client end according to the virtual touch device, the method includes:
[0021] Receive touch event instructions;
[0022] Determining, through the human-machine interface, whether the touch event is displayed in the second system;
[0023] If yes, the touch event instruction is sent to the second system for consumption through the input plug-in; if no, the touch event instruction is consumed by the first system;
[0024] The step of sending the touch event instruction to the second system for consumption through the input plug-in includes:
[0025] Sending the touch event to the input cross-system server through the input server;
[0026] The input cross-system server sends the touch event to the input cross-system client;
[0027] The input cross-system client writes the touch event into the virtual touch device;
[0028] In response to the input event processing distributor acquiring the touch event, the input event processing distributor sends the touch event to the framework end and the second application end, and consumes the touch event through the second system.
[0029] Furthermore, the plug-in further includes a vehicle control plug-in, the vehicle control plug-in of the first system includes a vehicle control cross-system server, the vehicle control plug-in of the second system includes a vehicle control cross-system client, and the target plug-in is loaded according to the plug-in configuration file, and data communication between the first system and the second system is performed through the target plug-in, and further includes:
[0030] Loading a vehicle control plug-in through the first information forwarding unit of the first system, and creating a vehicle control cross-system server through the vehicle control plug-in;
[0031] Loading a vehicle control plug-in through the second information forwarding unit of the second system, and creating a vehicle control cross-system client through the vehicle control plug-in;
[0032] A communication connection is established between the vehicle control cross-system server and the vehicle control cross-system client through inter-process communication.
[0033] Further, the first application end includes a vehicle control server end, the second application end includes a vehicle control application end, the framework end includes a vehicle framework end, the hardware abstraction layer includes a vehicle control abstraction layer, and after establishing a communication connection between the vehicle control cross-system server end and the vehicle control cross-system client end through inter-process communication, the method includes:
[0034] Receiving control instructions from the vehicle control application terminal;
[0035] Sending the control instruction to the vehicle control abstraction layer through the vehicle framework end;
[0036] The vehicle control abstraction layer sends the control instruction to the vehicle control cross-system client;
[0037] The vehicle control cross-system client sends the control instruction to the vehicle control cross-system server;
[0038] In response to the vehicle control cross-system server receiving the control instruction, the vehicle control cross-system server sends the control instruction to the vehicle control server, and the vehicle control server consumes the control instruction through a controller area network.
[0039] Furthermore, before obtaining the plug-in configuration file through the first information forwarding unit and the second information forwarding unit, the method further includes:
[0040] According to the business function of the plug-in, configure the business function of each plug-in in the plug-in configuration file;
[0041] The plug-in configuration file is stored in the mirror configuration directory of the first information forwarding unit and the second information forwarding unit.
[0042] In a second aspect, a plug-in data communication device is provided, the device comprising:
[0043] An acquisition module, used to acquire a plug-in configuration file through the first information forwarding unit and the second information forwarding unit, wherein the plug-in configuration file is used to perform service configuration for each plug-in;
[0044] A loading module, used to load a target plug-in according to the plug-in configuration file;
[0045] A communication module is used to perform data communication between the first system and the second system through the target plug-in.
[0046] According to a third aspect, a computer device is provided, the device comprising:
[0047] A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the plug-in data communication method as described in any one of the first aspects.
[0048] In a fourth aspect, a computer storage medium is provided, the medium comprising:
[0049] A computer program is stored thereon, and when the computer program is executed by a processor, the steps of any plug-in data communication method described in the first aspect are implemented.
[0050] Compared with the prior art, the plug-in data communication method of the technical solution provided in the embodiment of the present application includes: obtaining the plug-in configuration file through the first information forwarding unit and the second information forwarding unit; loading the target plug-in according to the plug-in configuration file; and executing data communication between the first system and the second system through the target plug-in. The technical solution of the present application can improve the code reuse rate between projects, reduce development costs, and improve the stability of communication between systems by implementing plug-in-based communication modules.
[0051] The common parts of the technical solutions provided in the embodiments of the present application are integrated into common plug-ins for use by other functional plug-ins, thereby improving the reuse rate of plug-ins. At the same time, there is no compile-time dependency between the functional plug-ins, and the plug-ins are provided in the form of dynamic libraries, which can facilitate the division of labor and maintenance by different developers. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0053] Figure 1 A first structural block diagram of the plug-in data communication system provided in Embodiment 1 of the present application;
[0054] Figure 2 A second structural block diagram of the plug-in data communication system provided in the first embodiment of the present application;
[0055] Figure 3 A first flow chart of the plug-in data communication method provided in the first embodiment of the present application;
[0056] Figure 4 A second flow chart of the plug-in data communication method provided in the second embodiment of the present application;
[0057] Figure 5 A touch event data communication block diagram provided in Embodiment 2 of the present application;
[0058] Figure 6 A touch event data communication flow chart provided in Embodiment 2 of the present application;
[0059] Figure 7 A vehicle control data communication block diagram provided in Example 2 of the present application;
[0060] Figure 8 A vehicle control data communication flow chart provided in Example 2 of the present application;
[0061] Fig. 9 A structural diagram of a plug-in data communication device provided in Embodiment 3 of the present application;
[0062] Fig.10 The exemplary system provided for the fifth embodiment of the present application can be used to implement the various embodiments described in the present application. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0064] It should be noted that, unless the context clearly requires otherwise, words such as “include”, “including” and similar words throughout the specification and claims should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is “including but not limited to”.
[0065] Furthermore, in the description of the present application, unless otherwise specified, “plurality” means two or more.
[0066] Embodiment 1
[0067] The present application embodiment provides a plug-in data communication method, such as Figure 1 , 2 As shown in , the method is applied to a vehicle system, the vehicle system includes a first system and a second system, the first system is communicatively connected to the second system, the first system includes a first system communication module, the first system communication module includes a first information forwarding unit and a plurality of first plug-ins, the output end of the first information forwarding unit is connected to the input end of the plurality of first plug-ins, the second system includes a second system communication module, the second system communication module includes a second information forwarding unit and a plurality of second plug-ins, the output end of the second information forwarding unit is connected to the input end of the plurality of second plug-ins, the first plug-in corresponds to the second plug-in one by one, the method includes:
[0068] Obtaining a plug-in configuration file through the first information forwarding unit and the second information forwarding unit, wherein the plug-in configuration file is used to perform service configuration on each plug-in;
[0069] Load the target plug-in according to the plug-in configuration file;
[0070] Data communication between the first system and the second system is performed through the target plug-in.
[0071] Specifically, the vehicle system of the present application is a vehicle system with multiple operating systems, the first system is one operating system, and the second system is another operating system. For example, the first system may be a Linux system as the main system, and the second system may be an Android system as the secondary system. It should be noted that the aforementioned Linux system and Android system are only introduced as examples. In actual applications, the first system or the second system may also be other existing or future operating systems, and the present application does not limit this.
[0072] In a possible design, the vehicle system further includes a virtual machine manager, and the first system and the second system are connected to each other through the virtual machine manager. Specifically, for example, the vehicle system of the present application may be a Linux+Android dual system, and the operation of the dual system is supported by a virtual machine manager (Hypervisor).
[0073] Alternatively, in another possible design, the first system and the second system are communicatively connected via inter-process communication.
[0074] During the operation of the vehicle system, a large amount of data needs to be exchanged between the main system and the secondary system, such as navigation GPS (Global Positioning System), input, tracking points, vehicle data, display control data, etc. By making the communication module plug-in-based, the required functional plug-ins can be configured according to the needs of different projects; the shared tool classes are integrated together into a common plug-in, which can be used by other functional plug-ins. At the same time, there is no compile-time dependency between the functional plug-ins.
[0075] Here, the present application can be applied to at least two system architectures, such as Figure 1 The first architecture shown is a dual-system architecture (general architecture) based on the virtual machine manager transmission hardware virtualization; Figure 2 The second architecture shown is a dual-system architecture with direct hardware resource allocation. The two architectures use different methods of inter-system communication.
[0076] The system communication module in the first system and the second system is an executable program, and the main program is responsible for loading the required plug-ins according to the project configuration file;
[0077] Each plug-in is in the form of a dynamic library, exposing a unified loading interface to the main program of the system communication module so that the main program can manage and use the plug-in;
[0078] Each plug-in implements the main business functions, including exchanging data with the upper-level business module and communicating with the second system through the process communication mode (IPC);
[0079] At the same time, the functional plug-ins have no dependencies in compilation and can be maintained by different developers.
[0080] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0081] The technical solution provided in the embodiment of the present application can improve the code reuse rate between projects, reduce development costs, and improve the stability of communication between systems by implementing plug-ins for communication modules.
[0082] The common parts of the technical solutions provided in the embodiments of the present application are integrated into common plug-ins for use by other functional plug-ins, thereby improving the reuse rate of plug-ins. At the same time, there is no compile-time dependency between the functional plug-ins, and the plug-ins are provided in the form of dynamic libraries, which can facilitate the division of labor and maintenance by different developers.
[0083] Embodiment 2
[0084] The present application embodiment provides a plug-in data communication method, such as Figure 1 , 4 As shown, the method includes:
[0085] Step S01, configuring the business function of each plug-in in the plug-in configuration file according to the business function of the plug-in;
[0086] The plug-in configuration file is stored in the mirror configuration directory of the first information forwarding unit and the second information forwarding unit.
[0087] Specifically, plugins can be configured quickly and flexibly according to project requirements:
[0088] Each product provides an information forwarding unit to load configuration files as needed;
[0089] The plug-in configuration file is located inside the information forwarding unit (Gateway module), which is packaged and deployed to the image configuration directory during compilation. The plug-in configuration file is used to configure the business functions of each plug-in.
[0090] The configuration file format and content are as follows:
[0091] #handwriting plugin
[0092] [handwriting]
[0093] Enabled = true
[0094] ID = gateway.plugin.handwriting
[0095] The common parts are integrated into commonly used common plug-ins for use by other functional plug-ins, which can improve the plug-in reuse rate, such as the encapsulation of communication methods, tool classes, etc.
[0096] Here, the common parts are integrated into common plug-ins for use by other functional plug-ins to improve the reuse rate of plug-ins. At the same time, there is no compile-time dependency between the functional plug-ins, and the plug-ins are provided in the form of dynamic libraries, which is convenient for different developers to divide the work and maintain.
[0097] Step S02: obtaining the plug-in configuration file through the first information forwarding unit and the second information forwarding unit, and loading the target plug-in according to the plug-in configuration file.
[0098] Step S03: executing data communication between the first system and the second system through the target plug-in.
[0099] Step S03 also includes:
[0100] Step S031, as Figure 5 , 6 As shown, an input plug-in is loaded through a first information forwarding unit of the first system, and an input cross-system server is created through the input plug-in;
[0101] Loading an input plug-in through a second information forwarding unit of the second system, and creating an input cross-system client and a virtual touch device through the input plug-in;
[0102] A communication connection is established between the input cross-system server and the input cross-system client according to the virtual touch device.
[0103] Specifically, the touch screen is connected to the first system through virtualization or direct connection. Here, only the first system can directly receive touch events. However, if the second system is to be displayed on the touch screen, the touch events need to be forwarded to the second system in real time through the information forwarding unit. (For example, touching the screen to open the application of the second system, play songs, navigate, etc.)
[0104] When the system is started, the first information forwarding unit (Gateway main 1OS) of the first system will load the input plug-in, and create an input cross-system server (InputCrossSystemService) through the input plug-in to provide services to the second system, and establish a connection with the input server of the first system to receive original touch data; when the system starts, the second information forwarding unit main program of the second system will also load the input plug-in, create a virtual touch device (virtual touchpad dev) through the input plug-in, and establish a connection with the input cross-system server of the first system.
[0105] Here, data communication between the first system and the second system is performed through the input plug-in, which can improve the stability of touch event communication between the systems.
[0106] Step S0311, receiving a touch event instruction;
[0107] Determining, through the human-machine interface, whether the touch event is displayed in the second system;
[0108] If yes, the touch event instruction is sent to the second system for consumption through the input plug-in; if no, the touch event instruction is consumed by the first system;
[0109] The step of sending the touch event instruction to the second system for consumption through the input plug-in includes:
[0110] Sending the touch event to the input cross-system server through the input server;
[0111] The input cross-system server sends the touch event to the input cross-system client;
[0112] The input cross-system client writes the touch event into the virtual touch device;
[0113] In response to the input event processing distributor acquiring the touch event, the input event processing distributor sends the touch event to the framework end and the second application end, and consumes the touch event through the second system.
[0114] Specifically, when a finger is pressed on the touch screen, the touch event will be given to the human-machine interface (HMI) of the first system. The human-machine interface will determine which system's screen is currently displayed. If it is the second system, the touch event will be distributed to the input cross-system server of the first information forwarding unit through the input service (InputService).
[0115] At this time, the input cross-system client (inputCrossSystemClient) of the second system will write the received touch event into the created virtual touch device, the input event processing distributor (EventHub) listens and reads, and sends the touch event to the framework end and the second application end, completing the touch event consumption of the second system.
[0116] It is understandable that by implementing the communication module as a plug-in, the code reuse rate between projects can be improved, the data communication of touch events can be completed, and the development cost can be reduced.
[0117] Step S032, as Figure 7 , 8 As shown, a vehicle control plug-in is loaded through the first information forwarding unit of the first system, and a vehicle control cross-system server is created through the vehicle control plug-in;
[0118] Loading a vehicle control plug-in through the second information forwarding unit of the second system, and creating a vehicle control cross-system client through the vehicle control plug-in;
[0119] A communication connection is established between the vehicle control cross-system server and the vehicle control cross-system client through an IPC control signal.
[0120] Specifically, other ECUs of the vehicle are connected to the first system of the vehicle computer through the Controller Area Network (CAN), and the application in the second system provides functional instructions for controlling the vehicle air conditioning, lights, door locks, etc.
[0121] When the system starts, the main program of the first information forwarding unit of the first system will load the vehicle control plug-in, and create a vehicle control cross-system server (VehicleCrossSystemService) through the vehicle control plug-in to provide services to the second system, and establish a connection with the vehicle control server of the first system to transmit vehicle data; when the system starts, the second information forwarding unit of the second system will also load the vehicle plug-in, and establish a connection with the vehicle control cross-system server of the first system through inter-process communication.
[0122] Here, the data communication between the first system and the second system is realized through the vehicle plug-in. For developers, the form is concise and easy to develop; for system communication, the plug-in communication mode is concise and can be called through the mode requested by the customer.
[0123] Step S0321, receiving a control instruction from the vehicle control application terminal;
[0124] Sending the control instruction to the vehicle control abstraction layer through the vehicle framework end;
[0125] The vehicle control abstraction layer sends the control instruction to the vehicle control cross-system client;
[0126] The vehicle control cross-system client sends the control instruction to the vehicle control cross-system server;
[0127] In response to the vehicle control cross-system server receiving the control instruction, the vehicle control cross-system server sends the control instruction to the vehicle control server, and the vehicle control server consumes the control instruction through a controller area network.
[0128] Specifically, users can control the vehicle by operating the vehicle control application, such as setting the air conditioning temperature. The control signal will be given to the Vehicle plug-in through the vehicle control abstraction layer (Vehicle HAL), and the vehicle control cross-system client in the Vehicle plug-in will send the control signal to the first system.
[0129] The vehicle control cross-system server in the first system will receive the control signal and forward it to the vehicle control server (Vehicle service), and then complete the air conditioning control through the Can signal.
[0130] It can be understood that the data communication of the control instructions of the vehicle control application end is completed here, and the distributed call between systems is realized in the microservice mode, which improves the user experience and does not require major changes to the operating systems during control.
[0131] The technical solution of the present application proposes a method for plug-in data communication, which obtains the plug-in configuration file through the first information forwarding unit and the second information forwarding unit; loads the target plug-in according to the plug-in configuration file; and executes data communication between the first system and the second system through the target plug-in. The technical solution provided by the embodiment of the present application can improve the code reuse rate between projects, reduce development costs, and improve the stability of communication between systems by implementing plug-in for the communication module.
[0132] The plug-in data communication method provided in the embodiment of the present application may be further improved and optimized without departing from the technical solution of the present application, and these improvements and optimizations should also be regarded as within the scope of protection of the present application.
[0133] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0134] The technical solution provided in the embodiment of the present application can improve the code reuse rate between projects, reduce development costs, and improve the stability of communication between systems by implementing plug-ins for communication modules.
[0135] The common parts of the technical solutions provided in the embodiments of the present application are integrated into common plug-ins for use by other functional plug-ins, thereby improving the reuse rate of plug-ins. At the same time, there is no compile-time dependency between the functional plug-ins, and the plug-ins are provided in the form of dynamic libraries, which can facilitate the division of labor and maintenance by different developers.
[0136] Embodiment 3
[0137] The present application provides a plug-in data communication device, such as Fig. 9 As shown, the device includes a configuration module, an acquisition module, a loading module, and a communication disconnection module.
[0138] In this embodiment, the acquisition module is used to acquire the plug-in configuration file through the first information forwarding unit and the second information forwarding unit;
[0139] A loading module, used to load a target plug-in according to the plug-in configuration file;
[0140] A communication module is used to perform data communication between the first system and the second system through the target plug-in.
[0141] Further, a configuration module is used to configure the business function of each plug-in in the plug-in configuration file according to the business function of the plug-in;
[0142] The plug-in configuration file is stored in the mirror configuration directory of the first information forwarding unit and the second information forwarding unit.
[0143] Furthermore, the communication module is further used to load an input plug-in through the first information forwarding unit of the first system, and create an input cross-system server through the input plug-in;
[0144] Loading an input plug-in through a second information forwarding unit of the second system, and creating an input cross-system client and a virtual touch device through the input plug-in;
[0145] A communication connection is established between the input cross-system server and the input cross-system client according to the virtual touch device.
[0146] Furthermore, the communication module is also used to receive touch event instructions;
[0147] Determining, through the human-machine interface, whether the touch event is displayed in the second system;
[0148] If yes, the touch event instruction is sent to the second system for consumption through the input plug-in; if no, the touch event instruction is consumed by the first system;
[0149] The step of sending the touch event instruction to the second system for consumption through the input plug-in includes:
[0150] Sending the touch event to the input cross-system server through the input server;
[0151] The input cross-system server sends the touch event to the input cross-system client;
[0152] The input cross-system client writes the touch event into the virtual touch device;
[0153] In response to the input event processing distributor acquiring the touch event, the input event processing distributor sends the touch event to the framework end and the second application end, and consumes the touch event through the second system.
[0154] Further, a communication module is used to load a vehicle control plug-in through a first information forwarding unit of the first system, and create a vehicle control cross-system server through the vehicle control plug-in;
[0155] Loading a vehicle control plug-in through the second information forwarding unit of the second system, and creating a vehicle control cross-system client through the vehicle control plug-in;
[0156] A communication connection is established between the vehicle control cross-system server and the vehicle control cross-system client through inter-process communication.
[0157] Furthermore, the communication module is also used to receive control instructions from the vehicle control application terminal;
[0158] Sending the control instruction to the vehicle control abstraction layer through the vehicle framework end;
[0159] The vehicle control abstraction layer sends the control instruction to the vehicle control cross-system client;
[0160] The vehicle control cross-system client sends the control instruction to the vehicle control cross-system server;
[0161] In response to the vehicle control cross-system server receiving the control instruction, the vehicle control cross-system server sends the control instruction to the vehicle control server, and the vehicle control server consumes the control instruction through a controller area network.
[0162] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0163] The technical solution provided in the embodiment of the present application can improve the code reuse rate between projects, reduce development costs, and improve the stability of communication between systems by implementing plug-ins for communication modules.
[0164] The common parts of the technical solutions provided in the embodiments of the present application are integrated into common plug-ins for use by other functional plug-ins, thereby improving the reuse rate of plug-ins. At the same time, there is no compile-time dependency between the functional plug-ins, and the plug-ins are provided in the form of dynamic libraries, which can facilitate the division of labor and maintenance by different developers.
[0165] Embodiment 4
[0166] The present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following plug-in data communication method can be executed:
[0167] Obtaining a plug-in configuration file through the first information forwarding unit and the second information forwarding unit, wherein the plug-in configuration file is used to perform service configuration on each plug-in;
[0168] Load the target plug-in according to the plug-in configuration file;
[0169] Data communication between the first system and the second system is performed through the target plug-in.
[0170] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0171] The technical solution provided in the embodiment of the present application can improve the code reuse rate between projects, reduce development costs, and improve the stability of communication between systems by implementing plug-ins for communication modules.
[0172] The common parts of the technical solutions provided in the embodiments of the present application are integrated into common plug-ins for use by other functional plug-ins, thereby improving the reuse rate of plug-ins. At the same time, there is no compile-time dependency between the functional plug-ins, and the plug-ins are provided in the form of dynamic libraries, which can facilitate the division of labor and maintenance by different developers.
[0173] Embodiment 5
[0174] The present application provides a computer storage medium, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0175] Obtaining a plug-in configuration file through the first information forwarding unit and the second information forwarding unit, wherein the plug-in configuration file is used to perform service configuration on each plug-in;
[0176] Load the target plug-in according to the plug-in configuration file;
[0177] Data communication between the first system and the second system is performed through the target plug-in.
[0178] Furthermore, the vehicle system further includes a virtual machine manager, and the first system and the second system are communicatively connected via the virtual machine manager;
[0179] or,
[0180] The first system is communicatively connected with the second system via inter-process communication.
[0181] Further, the plug-in includes an input plug-in, the input plug-in of the first system includes an input cross-system server, and the input plug-in of the second system includes an input cross-system client;
[0182] The first system includes a first application end, an output end of the first application end is connected to an input end of the first system communication module;
[0183] The second system includes a second application end, a framework end and a hardware abstraction layer, and the output ends of the second application end, the framework end and the hardware abstraction layer are respectively connected to the input end of the second system communication module.
[0184] Further, the hardware abstraction layer includes a virtual touch device, and the loading of a target plug-in according to the plug-in configuration file and the execution of data communication between the first system and the second system through the target plug-in include:
[0185] Loading an input plug-in through a first information forwarding unit of the first system, and creating an input cross-system server through the input plug-in;
[0186] Loading an input plug-in through a second information forwarding unit of the second system, and creating an input cross-system client and a virtual touch device through the input plug-in;
[0187] A communication connection is established between the input cross-system server and the input cross-system client according to the virtual touch device.
[0188] Furthermore, the first application end includes a human-machine interface and an input server end, the framework end includes an input event processing distributor, and after establishing a communication connection between the input cross-system server end and the input cross-system client end according to the virtual touch device, the method includes:
[0189] Receive touch event instructions;
[0190] Determining, through the human-machine interface, whether the touch event is displayed in the second system;
[0191] If yes, the touch event instruction is sent to the second system for consumption through the input plug-in; if no, the touch event instruction is consumed by the first system;
[0192] The step of sending the touch event instruction to the second system for consumption through the input plug-in includes:
[0193] Sending the touch event to the input cross-system server through the input server;
[0194] The input cross-system server sends the touch event to the input cross-system client;
[0195] The input cross-system client writes the touch event into the virtual touch device;
[0196] In response to the input event processing distributor acquiring the touch event, the input event processing distributor sends the touch event to the framework end and the second application end, and consumes the touch event through the second system.
[0197] Furthermore, the plug-in further includes a vehicle control plug-in, the vehicle control plug-in of the first system includes a vehicle control cross-system server, the vehicle control plug-in of the second system includes a vehicle control cross-system client, and the target plug-in is loaded according to the plug-in configuration file, and data communication between the first system and the second system is performed through the target plug-in, and further includes:
[0198] Loading a vehicle control plug-in through the first information forwarding unit of the first system, and creating a vehicle control cross-system server through the vehicle control plug-in;
[0199] Loading a vehicle control plug-in through the second information forwarding unit of the second system, and creating a vehicle control cross-system client through the vehicle control plug-in;
[0200] A communication connection is established between the vehicle control cross-system server and the vehicle control cross-system client through inter-process communication.
[0201] Further, the first application end includes a vehicle control server end, the second application end includes a vehicle control application end, the framework end includes a vehicle framework end, the hardware abstraction layer includes a vehicle control abstraction layer, and after establishing a communication connection between the vehicle control cross-system server end and the vehicle control cross-system client end through inter-process communication, the method includes:
[0202] Receiving control instructions from the vehicle control application terminal;
[0203] Sending the control instruction to the vehicle control abstraction layer through the vehicle framework end;
[0204] The vehicle control abstraction layer sends the control instruction to the vehicle control cross-system client;
[0205] The vehicle control cross-system client sends the control instruction to the vehicle control cross-system server;
[0206] In response to the vehicle control cross-system server receiving the control instruction, the vehicle control cross-system server sends the control instruction to the vehicle control server, and the vehicle control server consumes the control instruction through a controller area network.
[0207] Furthermore, before obtaining the plug-in configuration file through the first information forwarding unit and the second information forwarding unit, the method further includes:
[0208] According to the business function of the plug-in, configure the business function of each plug-in in the plug-in configuration file;
[0209] The plug-in configuration file is stored in the mirror configuration directory of the first information forwarding unit and the second information forwarding unit.
[0210] The technical solution provided in the embodiment of the present application can improve the code reuse rate between projects, reduce development costs, and improve the stability of communication between systems by implementing plug-ins for communication modules.
[0211] The common parts of the technical solutions provided in the embodiments of the present application are integrated into common plug-ins for use by other functional plug-ins, thereby improving the reuse rate of plug-ins. At the same time, there is no compile-time dependency between the functional plug-ins, and the plug-ins are provided in the form of dynamic libraries, which can facilitate the division of labor and maintenance by different developers.
[0212] Fig.10 An exemplary system provided for Embodiment 5 of the present application that can be used to implement various embodiments described in the present application;
[0213] like Fig.10 As shown, in some embodiments, the system can be used as any of the above-mentioned devices for plug-in data communication in each of the described embodiments. In some embodiments, the system may include one or more computer-readable media (e.g., system memory or NVM / storage device) having results and one or more processors (e.g., (one or more) processors) coupled to the one or more computer-readable media and configured to execute the results to implement the module to perform the actions described in this application.
[0214] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by computer programs in combination with relevant hardware. The above-mentioned computer programs can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0215] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0216] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A plug-in data communication method, characterized in that: The method is applied to a vehicle system, the vehicle system includes a first system and a second system, the first system is communicatively connected with the second system, the first system includes a first system communication module, the first system communication module includes a first information forwarding unit and a plurality of first plug-ins, the output end of the first information forwarding unit is connected with the input end of the plurality of first plug-ins, the second system includes a second system communication module, the second system communication module includes a second information forwarding unit and a plurality of second plug-ins, the output end of the second information forwarding unit is connected with the input end of the plurality of second plug-ins, the first plug-in corresponds to the second plug-in one by one, the method includes: Obtaining a plug-in configuration file through the first information forwarding unit and the second information forwarding unit, wherein the plug-in configuration file is used to perform service configuration on each plug-in; Load the target plug-in according to the plug-in configuration file; performing data communication between the first system and the second system through the target plug-in; The plug-in includes an input plug-in, the input plug-in of the first system includes an input cross-system server, and the input plug-in of the second system includes an input cross-system client; The first system includes a first application end, an output end of the first application end is connected to an input end of the first system communication module; The second system includes a second application end, a framework end and a hardware abstraction layer, and the output ends of the second application end, the framework end and the hardware abstraction layer are respectively connected to the input end of the second system communication module; The hardware abstraction layer includes a virtual touch device, and the target plug-in is loaded according to the plug-in configuration file, and data communication between the first system and the second system is performed through the target plug-in, including: Loading an input plug-in through a first information forwarding unit of the first system, and creating an input cross-system server through the input plug-in; Loading an input plug-in through a second information forwarding unit of the second system, and creating an input cross-system client and a virtual touch device through the input plug-in; Establishing a communication connection between the input cross-system server and the input cross-system client according to the virtual touch device; The plug-in data communication method further includes: The common parts are integrated into common plug-ins for use by other functional plug-ins. At the same time, there is no compile-time dependency between the functional plug-ins, and the plug-ins are provided in the form of dynamic libraries.
2. The plug-in data communication method according to claim 1, characterized in that: The vehicle system further includes a virtual machine manager, and the first system and the second system are communicatively connected via the virtual machine manager; Alternatively, the first system and the second system are communicatively connected via inter-process communication.
3. The plug-in data communication method according to claim 1, characterized in that: The first application end includes a human-machine interface and an input server end, the framework end includes an input event processing distributor, and after establishing a communication connection between the input cross-system server end and the input cross-system client end according to the virtual touch device, the method includes: Receive touch event instructions; Determining, through the human-machine interface, whether the touch event is displayed in the second system; If yes, the touch event instruction is sent to the second system for consumption through the input plug-in; if no, the touch event instruction is consumed by the first system; The step of sending the touch event instruction to the second system for consumption through the input plug-in includes: Sending the touch event to the input cross-system server through the input server; The input cross-system server sends the touch event to the input cross-system client; The input cross-system client writes the touch event into the virtual touch device; In response to the input event processing distributor acquiring the touch event, the input event processing distributor sends the touch event to the framework end and the second application end, and consumes the touch event through the second system.
4. The plug-in data communication method according to claim 1, characterized in that: The plug-in further includes a vehicle control plug-in, the vehicle control plug-in of the first system includes a vehicle control cross-system server, the vehicle control plug-in of the second system includes a vehicle control cross-system client, the target plug-in is loaded according to the plug-in configuration file, and data communication between the first system and the second system is performed through the target plug-in, and further includes: Loading a vehicle control plug-in through the first information forwarding unit of the first system, and creating a vehicle control cross-system server through the vehicle control plug-in; Loading a vehicle control plug-in through the second information forwarding unit of the second system, and creating a vehicle control cross-system client through the vehicle control plug-in; A communication connection is established between the vehicle control cross-system server and the vehicle control cross-system client through inter-process communication.
5. The plug-in data communication method according to claim 4, characterized in that: The first application end includes a vehicle control server end, the second application end includes a vehicle control application end, the framework end includes a vehicle framework end, the hardware abstraction layer includes a vehicle control abstraction layer, and after establishing a communication connection between the vehicle control cross-system server end and the vehicle control cross-system client end through inter-process communication, the method includes: Receiving control instructions from the vehicle control application terminal; Sending the control instruction to the vehicle control abstraction layer through the vehicle framework end; The vehicle control abstraction layer sends the control instruction to the vehicle control cross-system client; The vehicle control cross-system client sends the control instruction to the vehicle control cross-system server; In response to the vehicle control cross-system server receiving the control instruction, the vehicle control cross-system server sends the control instruction to the vehicle control server, and the vehicle control server consumes the control instruction through a controller area network.
6. The plug-in data communication method according to claim 1, characterized in that: Before obtaining the plug-in configuration file through the first information forwarding unit and the second information forwarding unit, the method further includes: According to the business function of the plug-in, configure the business function of each plug-in in the plug-in configuration file; The plug-in configuration file is stored in the mirror configuration directory of the first information forwarding unit and the second information forwarding unit.
7. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the plug-in data communication method according to any one of claims 1 to 6.
8. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the plug-in data communication method according to any one of claims 1 to 6 are implemented.
