[go: up one dir, main page]

CN118796504A - A middleware communication system, method, vehicle-mounted terminal and storage medium - Google Patents

A middleware communication system, method, vehicle-mounted terminal and storage medium Download PDF

Info

Publication number
CN118796504A
CN118796504A CN202410684363.5A CN202410684363A CN118796504A CN 118796504 A CN118796504 A CN 118796504A CN 202410684363 A CN202410684363 A CN 202410684363A CN 118796504 A CN118796504 A CN 118796504A
Authority
CN
China
Prior art keywords
communication
middleware
client
server
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410684363.5A
Other languages
Chinese (zh)
Inventor
郭超
张劲松
宋卫桥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Kafrog Technology Co ltd
Original Assignee
Chengdu Kafrog Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Kafrog Technology Co ltd filed Critical Chengdu Kafrog Technology Co ltd
Priority to CN202410684363.5A priority Critical patent/CN118796504A/en
Publication of CN118796504A publication Critical patent/CN118796504A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请提出一种中间件通信系统、方法、车载终端及存储介质,所述中间件通信系统包括服务端层、客户端层和中间件通信接口层;服务端层包括服务端,客户端层包括客户端;服务端和客户端分别来自不同系统,或同一系统不同进程;服务端层经过中间件通信接口层后与客户端层建立连接;中间件通信接口层用于不同系统之间的通信,以及同一系统不同进程之间的通信提供统一通信接口;中间件通信接口层包括:通信中间件管理单元、第一连接单元和第二连接单元;服务端、第一连接单元、通信中间件管理单元、第二连接单元和客户端依次建立连接。本申请通过设计统一通信接口层来处理不同系统,或同一系统不同进程的通信,大大提高了通信效率和信息传递安全性。

The present application proposes a middleware communication system, method, vehicle-mounted terminal and storage medium, wherein the middleware communication system includes a server layer, a client layer and a middleware communication interface layer; the server layer includes a server, and the client layer includes a client; the server and the client come from different systems, or different processes of the same system; the server layer establishes a connection with the client layer after passing through the middleware communication interface layer; the middleware communication interface layer is used for communication between different systems, and provides a unified communication interface for communication between different processes of the same system; the middleware communication interface layer includes: a communication middleware management unit, a first connection unit and a second connection unit; the server, the first connection unit, the communication middleware management unit, the second connection unit and the client establish connections in sequence. The present application greatly improves the communication efficiency and information transmission security by designing a unified communication interface layer to handle the communication between different systems or different processes of the same system.

Description

一种中间件通信系统、方法、车载终端及存储介质A middleware communication system, method, vehicle-mounted terminal and storage medium

技术领域Technical Field

本申请属于中间件技术领域,尤其涉及一种中间件通信系统、方法、车载终端及存储介质。The present application belongs to the technical field of middleware, and in particular, relates to a middleware communication system, method, vehicle-mounted terminal and storage medium.

背景技术Background Art

目前各车辆内部进行不同进程间数据或信号传输通信,可以将其概括为片间通信和IPC通信。其中,片间通信指各个系统之间的通信,如车机中控和TBOX通信,一般是基于以太网;IPC通信指系统内部进程间通信,例如一个操作系统内部有很多业务进程需要通信。然而,虽然现有技术中实现通信采取的方式方法较多,比如SomeIP、DDS、FDBUS等,但其中间件接口较为复杂,“片间通信”和“IPC通信”没有统一的接口,使得开发者在接收到新的需求时,常常需要设计一套“片间通信”和“IPC通信”库,或者接入已有的通信库,由于传统的库接口复杂,暴露过多的底层细节给开发者,“片间通信”和“IPC通信”未融合为一体,使得开发调试成本居高不下。At present, data or signal transmission and communication between different processes in each vehicle can be summarized as inter-chip communication and IPC communication. Among them, inter-chip communication refers to the communication between various systems, such as the communication between the vehicle central control and TBOX, which is generally based on Ethernet; IPC communication refers to the communication between processes within the system, for example, there are many business processes that need to communicate within an operating system. However, although there are many ways and methods to achieve communication in the prior art, such as SomeIP, DDS, FDBUS, etc., the middleware interface is relatively complex, and there is no unified interface for "inter-chip communication" and "IPC communication". When developers receive new requirements, they often need to design a set of "inter-chip communication" and "IPC communication" libraries, or access existing communication libraries. Due to the complexity of traditional library interfaces, too many underlying details are exposed to developers, and "inter-chip communication" and "IPC communication" are not integrated into one, which makes the development and debugging costs high.

发明内容Summary of the invention

针对上述现有技术的缺陷,本申请提供了一种中间件通信系统、方法、车载终端及存储介质,通过设计了统一通信接口层来处理车辆内部不同系统间,或同一系统不同进程间的通信,大大提高了通信效率和信息传递安全性,使得开发人员无需关注底层通信细节,能够更加专注于上层逻辑的开发。In response to the defects of the above-mentioned prior art, the present application provides a middleware communication system, method, vehicle-mounted terminal and storage medium. By designing a unified communication interface layer to handle the communication between different systems inside the vehicle, or between different processes in the same system, the communication efficiency and information transmission security are greatly improved, so that developers do not need to pay attention to the underlying communication details and can focus more on the development of upper-level logic.

为实现上述目的,本申请提供了一种中间件通信系统,包括:任一服务端层和任一客户端层;其中,所述服务端层包括任意数量用于服务提供端的服务端,所述客户端层包括任意数量用于服务请求端的客户端;其中,所述服务端和客户端分别来自不同系统,或同一系统不同进程。To achieve the above-mentioned purpose, the present application provides a middleware communication system, including: any server layer and any client layer; wherein the server layer includes any number of servers for the service provider end, and the client layer includes any number of clients for the service requester end; wherein the server and the client are from different systems, or different processes of the same system.

所述中间件通信系统还包括:The middleware communication system also includes:

中间件通信接口层;所述服务端层经过所述中间件通信接口层后与所述客户端层建立连接;所述中间件通信接口层用于不同系统之间的通信,以及同一系统不同进程之间的通信提供统一通信接口。Middleware communication interface layer; the server layer establishes a connection with the client layer after passing through the middleware communication interface layer; the middleware communication interface layer is used for communication between different systems, and provides a unified communication interface for communication between different processes in the same system.

其中,所述中间件通信接口层至少包括:通信中间件管理单元、第一连接单元和第二连接单元;第一连接单元的一端与所述服务端连接,第一连接单元的另一端与通信中间件管理单元的一端连接,通信中间件管理单元的另一端与第二连接单元的一端连接,第二连接单元的另一端与所述客户端连接。Among them, the middleware communication interface layer at least includes: a communication middleware management unit, a first connection unit and a second connection unit; one end of the first connection unit is connected to the server, the other end of the first connection unit is connected to one end of the communication middleware management unit, the other end of the communication middleware management unit is connected to one end of the second connection unit, and the other end of the second connection unit is connected to the client.

在本申请中,所述通信中间件管理单元包括:In the present application, the communication middleware management unit includes:

注册模块,用于注册预设服务函数,生成可供客户端调用的接口。The registration module is used to register preset service functions and generate interfaces that can be called by clients.

调用模块,用于根据输出自客户端的调用请求,匹配服务端与客户端的连接接口。The calling module is used to match the connection interface between the server and the client according to the calling request output from the client.

消息发布模块,用于接收来自服务端的数据信息,并根据所述数据信息生成目标信息。The message publishing module is used to receive data information from the server and generate target information according to the data information.

消息订阅模块,用于接收所述目标信息,并将其向所述客户端进行广播传递。The message subscription module is used to receive the target information and broadcast it to the client.

异常监测模块,用于通过预设规则监测服务端与客户端之间的连接状态,输出异常指令。The abnormal monitoring module is used to monitor the connection status between the server and the client through preset rules and output abnormal instructions.

异常处理模块,用于当接收到所述异常指令时,根据对应的预设机制进入异常处理模式。The exception handling module is used to enter the exception handling mode according to the corresponding preset mechanism when receiving the exception instruction.

以及,加密设置模块,用于对在输出所述目标信息至所述第二连接单元之前,对所述目标信息设置预设加密属性。And, an encryption setting module is used to set a preset encryption attribute for the target information before outputting the target information to the second connection unit.

在本申请中,所述第一连接单元用于同步启动若干个所述服务端,以及传递所述数据信息,并向服务端输出来自客户端的服务请求;所述第二连接单元用于同步启动若干个所述客户端,以及传递所述服务请求,并向客户端输出所述目标信息。In the present application, the first connection unit is used to synchronously start several of the server terminals, transmit the data information, and output the service request from the client to the server terminal; the second connection unit is used to synchronously start several of the client terminals, transmit the service request, and output the target information to the client terminal.

为实现上述目的,本申请还提供了一种中间件通信系统的方法,所述方法包括:To achieve the above object, the present application also provides a method of a middleware communication system, the method comprising:

通过所述中间件通信接口层,根据预设规则为服务端与客户端提供统一的通信接口;其中,所述服务端与客户端分别来自不同系统,或同一系统不同进程。所述中间件通信接口层至少包括通信中间件管理中心。The middleware communication interface layer provides a unified communication interface for the server and the client according to preset rules; wherein the server and the client are from different systems, or different processes of the same system. The middleware communication interface layer at least includes a communication middleware management center.

获取通信中间件管理中心中通信信息的传递状态;当所述传递状态指在所述通信中间件管理中心接收到任一服务端输出的数据信息时,通过所述通信接口向所述客户端输出目标信息;当所述传递状态指在所述通信中间件管理中心介接收到任一客户端输出的服务请求时,通过所述通信接口向所述服务端传递。Acquire the transmission status of communication information in the communication middleware management center; when the transmission status refers to the communication middleware management center receiving data information output by any server, output the target information to the client through the communication interface; when the transmission status refers to the communication middleware management center receiving a service request output by any client, transmit it to the server through the communication interface.

其中,所述预设规则具体为:The preset rules are specifically:

通过所述服务端输出的数据信息注册预设服务函数,生成可供客户端调用的接口;根据所述输出自客户端的调用请求,匹配服务端与客户端之间的连接,以生成所述通信接口。The preset service function is registered through the data information output by the server to generate an interface that can be called by the client; according to the call request output from the client, the connection between the server and the client is matched to generate the communication interface.

为实现上述目的,本申请还提供了一种车载终端,包括多个系统,其内包括若干进程;其中,所述多个系统间,以及所述进程间基于上述任一项所述的中间件通信方法进行通信。To achieve the above objectives, the present application also provides a vehicle-mounted terminal, including multiple systems, each of which includes a number of processes; wherein the multiple systems and the processes communicate with each other based on any of the middleware communication methods described above.

为实现上述目的,本申请还提供了一种存储介质,为计算机可读存储介质中的一种,其上存储有计算机程序,所述计算机程序被处理器执行时,实现如上任一所述的中间件通信方法。To achieve the above objectives, the present application also provides a storage medium, which is a type of computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the middleware communication methods described above.

与现有技术相比,本申请有益效果在于:Compared with the prior art, the present invention has the following beneficial effects:

本申请提出的一种中间件通信系统、方法、车载终端及存储介质,本申请通过提供一个统一的中间件通信接口层,实现了融合车辆内不同系统或同一系统不同进程之间服务端与客户端的通信,大大简化了简化了不同系统或进程间的通信,减少了开发者必须编写的特定代码量,从而提高了开发效率。并且,本申请提出的中间件通信系统隐藏了底层通信的复杂性,使得开发者不必处理诸如网络编程、数据序列化、错误处理等底层细节,有助于开发者专注于上层逻辑,而无需关注底层通信细节,从而降低了出错的可能性和调试成本。The present application proposes a middleware communication system, method, vehicle-mounted terminal and storage medium. The present application realizes the communication between the server and the client between different systems in the vehicle or different processes in the same system by providing a unified middleware communication interface layer, which greatly simplifies the communication between different systems or processes, reduces the amount of specific code that developers must write, and thus improves development efficiency. In addition, the middleware communication system proposed in the present application hides the complexity of the underlying communication, so that developers do not have to deal with underlying details such as network programming, data serialization, error handling, etc., which helps developers focus on the upper-level logic without paying attention to the underlying communication details, thereby reducing the possibility of errors and debugging costs.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请一实施例中服务端层与客户端层的来源的框架示意图。FIG. 1 is a schematic diagram of a framework of sources of a server layer and a client layer in one embodiment of the present application.

图2为本申请一实施例中一种中间件通信系统的框架示意图。FIG. 2 is a schematic diagram of a framework of a middleware communication system in an embodiment of the present application.

图3为本申请一实施例中通信中间件管理单元的示意图。FIG3 is a schematic diagram of a communication middleware management unit in an embodiment of the present application.

图4为本申请一实施例中一种中间件通信方法的流程图。FIG. 4 is a flow chart of a middleware communication method in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例对技术方案进行清楚、完整地描述。显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme will be clearly and completely described below in conjunction with the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

实施例一:Embodiment 1:

为了解决上述技术问题,本申请提供了一种中间件通信系统,通过设计采用接单而同一的接口去处理通信,使得片间通信和IPC通信接口融合为一体,形成统一的中间件通信接口层,比现有技术中的通信库接口更加简化,开发成本更低。In order to solve the above technical problems, the present application provides a middleware communication system, which is designed to use a single and identical interface to handle communication, so that inter-chip communication and IPC communication interface are integrated into one to form a unified middleware communication interface layer, which is simpler than the communication library interface in the prior art and has lower development cost.

在本实施例中,如附图1所示,所述中间件通信系统包括:任一服务端层和任一客户端层;其中,所述服务端层包括任意数量用于服务提供端的服务端,所述客户端层包括任意数量用于服务请求端的客户端;其中,所述服务端和客户端分别来自不同系统,或同一系统不同进程。所述中间件通信系统还包括:In this embodiment, as shown in FIG1, the middleware communication system includes: any server layer and any client layer; wherein the server layer includes any number of servers for service providers, and the client layer includes any number of clients for service requesters; wherein the servers and clients are from different systems, or different processes of the same system. The middleware communication system also includes:

中间件通信接口层;所述服务端层经过所述中间件通信接口层后与所述客户端层建立连接;所述中间件通信接口层用于不同系统之间的通信,以及同一系统不同进程之间的通信提供统一通信接口。Middleware communication interface layer; the server layer establishes a connection with the client layer after passing through the middleware communication interface layer; the middleware communication interface layer is used for communication between different systems, and provides a unified communication interface for communication between different processes in the same system.

其中,通信过程中可以采用任意的通信协议来实现数据传输,如TCP协议或以太网方式等等,均不限于此。In the communication process, any communication protocol may be used to implement data transmission, such as TCP protocol or Ethernet, etc., but are not limited thereto.

需要说明的是,服务端层包含多个服务端,这些服务端可以是提供特定功能或服务的应用程序、服务或组件。这些服务端可以是来自不同系统的应用程序,例如一个运行在Windows操作系统上的服务端,与一个运行在Linux上的服务端进行通信。服务端也可以是同一系统中的不同进程,例如一个运行在主控制进程中的服务端,与运行在子进程中的服务端进行通信,均不限于此。It should be noted that the server layer includes multiple servers, which can be applications, services or components that provide specific functions or services. These servers can be applications from different systems, such as a server running on the Windows operating system communicating with a server running on Linux. The servers can also be different processes in the same system, such as a server running in the main control process communicating with a server running in a subprocess, but are not limited to this.

客户端层包含多个客户端,这些客户端是请求服务端的服务的应用程序、服务或组件。同理,客户端同样可以是来自不同系统的应用程序,也可以是同一系统中的不同进程。The client layer contains multiple clients, which are applications, services or components that request services from the server. Similarly, clients can also be applications from different systems or different processes in the same system.

例如,处于不同系统的客户端:假设车辆有一个基于Linux的底盘域控制器,它管理车辆的制动系统、悬挂系统和转向系统。同时,还有一个基于QNX的动力总成域控制器,它负责管理发动机、变速箱和车辆的电气系统。这两个域控制器作为服务端,提供特定的控制和监控服务。来自不同系统的客户端,如基于Android的信息娱乐系统或基于Windows的远程诊断工具,可以请求这些服务端提供的服务,如获取车辆状态信息、执行诊断测试等。For example, clients in different systems: Suppose a vehicle has a Linux-based chassis domain controller that manages the vehicle's braking system, suspension system, and steering system. At the same time, there is a QNX-based powertrain domain controller that manages the engine, transmission, and electrical system of the vehicle. These two domain controllers act as servers and provide specific control and monitoring services. Clients from different systems, such as Android-based infotainment systems or Windows-based remote diagnostic tools, can request services provided by these servers, such as obtaining vehicle status information, performing diagnostic tests, etc.

处于同一系统不同进程的客户端:在车辆的车身域控制器中,可能会有多个进程运行在同一台微控制器上。例如,一个进程负责监控车门和车窗的状态,而另一个进程负责监控车辆的灯光系统。当车门状态发生变化时,车门监控进程作为客户端,请求车身域控制器提供的服务,以更新车门状态信息,并将其传递给灯光监控进程。Clients in different processes of the same system: In the body domain controller of a vehicle, there may be multiple processes running on the same microcontroller. For example, one process is responsible for monitoring the status of the doors and windows, while another process is responsible for monitoring the vehicle's lighting system. When the door status changes, the door monitoring process, as a client, requests the service provided by the body domain controller to update the door status information and pass it to the lighting monitoring process.

本申请中间件通信系统提供了一个平台,使得不同系统或同一系统不同进程之间的服务通信变得更加简单、高效和可扩展,同时降低了开发和维护的复杂性;并且,其跨越不同系统和同一系统内的不同进程,提供服务请求和数据传输的能力,通过该方式,车辆内部域控制器的集成和通信变得更加灵活和高效。The middleware communication system of the present application provides a platform that makes service communication between different systems or different processes of the same system simpler, more efficient and scalable, while reducing the complexity of development and maintenance; and it provides the ability to provide service requests and data transmission across different systems and different processes within the same system. In this way, the integration and communication of domain controllers within the vehicle become more flexible and efficient.

其中,如附图2所示,所述中间件通信接口层至少包括:通信中间件管理单元、第一连接单元和第二连接单元;第一连接单元的一端与所述服务端连接,第一连接单元的另一端与通信中间件管理单元的一端连接,通信中间件管理单元的另一端与第二连接单元的一端连接,第二连接单元的另一端与所述客户端连接。As shown in FIG2, the middleware communication interface layer includes at least: a communication middleware management unit, a first connection unit and a second connection unit; one end of the first connection unit is connected to the server, the other end of the first connection unit is connected to one end of the communication middleware management unit, the other end of the communication middleware management unit is connected to one end of the second connection unit, and the other end of the second connection unit is connected to the client.

在本实施例中,中间件通信接口层相当于简化后的通信库。优选地,通信中间件管理单元可以通过IpcContext单元实现统一管理,在IpcContext单元中可以采用模板函数,即在实际使用过程中,通过模板函数,可以在不修改代码的情况下处理不同类型的数据。开发者可以创建可重用的通信逻辑,这些逻辑可以应用于不同的数据类型和通信模式。同时,模板函数可以确保在编译时检查数据类型的兼容性,减少运行时错误。In this embodiment, the middleware communication interface layer is equivalent to a simplified communication library. Preferably, the communication middleware management unit can be managed uniformly through the IpcContext unit, and template functions can be used in the IpcContext unit, that is, in actual use, different types of data can be processed without modifying the code through template functions. Developers can create reusable communication logic that can be applied to different data types and communication modes. At the same time, template functions can ensure that the compatibility of data types is checked at compile time, reducing runtime errors.

如果需要支持新的数据类型或通信模式,只需在IpcContext单元中添加新的模板函数实现,而不需要重复去修改代码;并且,模板函数提供了一个更高层次的抽象,使得开发者可以专注于业务逻辑,而不是底层的通信细节。If you need to support new data types or communication modes, you only need to add new template function implementations in the IpcContext unit without having to modify the code repeatedly. In addition, the template function provides a higher level of abstraction, allowing developers to focus on business logic rather than underlying communication details.

进一步地,如附图3所示,所述通信中间件管理单元包括:Further, as shown in FIG. 3, the communication middleware management unit includes:

注册模块,用于注册预设服务函数,生成可供客户端调用的接口。The registration module is used to register preset service functions and generate interfaces that can be called by clients.

优选地,注册模块可以包括funcName(函数名)、f(函数实体)和可选的nodeName(服务名称),均不限于此。Preferably, the registration module may include funcName (function name), f (function entity) and optional nodeName (service name), but are not limited thereto.

其中,函数实体f是一个模板参数,则本实施例可以注册任何类型的函数,而不需要为每种函数类型提供一个特定的注册方法。Among them, the function entity f is a template parameter, so this embodiment can register any type of function without providing a specific registration method for each function type.

IpcContext单元负责存储注册的服务函数及其相关信息,如函数名、函数指针、服务名称等,还负责处理客户端的调用请求,根据函数名找到对应的函数实体,并执行它。The IpcContext unit is responsible for storing registered service functions and related information, such as function name, function pointer, service name, etc. It is also responsible for processing client call requests, finding the corresponding function entity according to the function name, and executing it.

例如,当开发者注册一个服务函数时,IpcContext单元会记录该函数的详细信息,并将函数指针存储起来。如果提供了一个服务名称时,那么该函数将被绑定到指定的服务名称。For example, when a developer registers a service function, the IpcContext unit records the detailed information of the function and stores the function pointer. If a service name is provided, the function will be bound to the specified service name.

当客户端通过指令调用一个服务时,它会传递函数名和参数。IpcContext单元根据函数名找到对应的函数实体,并执行它,将结果返回给客户端。When a client calls a service through an instruction, it passes the function name and parameters. The IpcContext unit finds the corresponding function entity according to the function name, executes it, and returns the result to the client.

本实施例的注册模块能够注册任意类型的函数,无需为每种函数类型提供特定的注册方法。这简化了开发流程,开发者不再需要为不同的函数类型编写不同的注册代码。The registration module of this embodiment can register any type of function, and there is no need to provide a specific registration method for each function type. This simplifies the development process, and developers no longer need to write different registration codes for different function types.

在其他实施例中,开发者可以在一个进程中注册多个服务函数,这些函数可以通过IpcContext单元统一管理。这样的管理方式使得服务函数的注册、查找和执行更加高效和集中。另外,客户端在调用服务时,只需要知道函数名和参数,无需关心函数的具体实现位置。这简化了客户端的代码,使得客户端的调用更加直观和易于理解。In other embodiments, developers can register multiple service functions in one process, and these functions can be managed uniformly through the IpcContext unit. This management method makes the registration, search and execution of service functions more efficient and centralized. In addition, when calling a service, the client only needs to know the function name and parameters, and does not need to care about the specific implementation location of the function. This simplifies the client code and makes the client call more intuitive and easy to understand.

调用模块,用于根据输出自客户端的调用请求,匹配服务端与客户端的连接接口。The calling module is used to match the connection interface between the server and the client according to the calling request output from the client.

需要说明的是,当客户端发送一个调用请求时,调用模块会解析这个请求,提取函数名和参数。根据函数名,调用模块会查找注册在服务端的服务函数。如果找到匹配的服务函数,调用模块会构建一个调用上下文,并将参数传递给服务函数。最后,调用模块会处理服务函数的返回值,并将其返回给客户端。It should be noted that when the client sends a call request, the call module will parse the request and extract the function name and parameters. Based on the function name, the call module will search for the service function registered on the server. If a matching service function is found, the call module will build a call context and pass the parameters to the service function. Finally, the call module will process the return value of the service function and return it to the client.

在本实施例中,客户端可以通过调用模块方便地调用服务端的功能,而不需要知道服务端的具体实现细节。调用模块提供了一个抽象层,隐藏了服务端实现的复杂性,使得客户端调用更加简单和统一。In this embodiment, the client can conveniently call the server's functions through the calling module without knowing the specific implementation details of the server. The calling module provides an abstract layer that hides the complexity of the server's implementation, making the client call simpler and more unified.

消息发布模块,用于接收来自服务端的数据信息,并根据所述数据信息生成目标信息。The message publishing module is used to receive data information from the server and generate target information according to the data information.

需要说明的是,当服务端产生数据信息时,会通过消息发布模块来处理这些信息。消息发布模块会根据数据信息生成目标信息,该过程还可以包括数据的格式转换、过滤等,均不限于此。然后,消息发布模块会将目标信息发送给消息订阅模块。It should be noted that when the server generates data information, the information will be processed by the message publishing module. The message publishing module will generate target information based on the data information. The process may also include data format conversion, filtering, etc., which are not limited to this. Then, the message publishing module will send the target information to the message subscription module.

在本实施例中,服务端可以灵活地发布数据信息,而不需要担心如何将其传递给客户端。消息发布模块确保了数据信息在发布之前已经经过了必要的处理,提高了数据的可靠性和一致性。In this embodiment, the server can flexibly publish data information without worrying about how to pass it to the client. The message publishing module ensures that the data information has undergone necessary processing before being published, thereby improving the reliability and consistency of the data.

消息订阅模块,用于接收所述目标信息,并将其向所述客户端进行广播传递。The message subscription module is used to receive the target information and broadcast it to the client.

需要说明的是,消息订阅模块会监听来自消息发布模块的目标信息。当接收到目标信息时,消息订阅模块会将这些信息广播给所有订阅的客户端。客户端可以通过订阅特定的消息类型来接收感兴趣的数据。It should be noted that the message subscription module will listen to the target information from the message publishing module. When receiving the target information, the message subscription module will broadcast this information to all subscribed clients. Clients can receive the data of interest by subscribing to specific message types.

在本实施例中,客户端可以动态地订阅感兴趣的消息类型,而不需要知道消息的具体内容。消息订阅模块实现了消息的广播机制,使得数据能够高效地分发给所有订阅的客户端。In this embodiment, the client can dynamically subscribe to the message type it is interested in without knowing the specific content of the message. The message subscription module implements a message broadcast mechanism, so that data can be efficiently distributed to all subscribed clients.

异常监测模块,用于通过预设规则监测服务端与客户端之间的连接状态,输出异常指令。The abnormal monitoring module is used to monitor the connection status between the server and the client through preset rules and output abnormal instructions.

需要说明的是,异常监测模块会根据预设规则监测服务端与客户端之间的连接状态。如果监测到异常,异常监测模块会输出异常指令,通知其他模块采取相应的措施。It should be noted that the abnormal monitoring module will monitor the connection status between the server and the client according to the preset rules. If an abnormality is detected, the abnormal monitoring module will output an abnormal instruction to notify other modules to take corresponding measures.

优选地,预设规则可以采用心跳机制、断线重连机制,以实现检测连接是否正常,均不限于此。Preferably, the preset rule may adopt a heartbeat mechanism or a disconnection reconnection mechanism to detect whether the connection is normal, but is not limited thereto.

在本实施例中,异常监测模块可以及时发现并报告系统中的潜在问题,提高了系统的健壮性和稳定性。通过预设规则,异常监测模块可以自动响应各种异常情况,减少了人工干预的需求。In this embodiment, the abnormal monitoring module can timely discover and report potential problems in the system, improving the robustness and stability of the system. Through preset rules, the abnormal monitoring module can automatically respond to various abnormal situations, reducing the need for manual intervention.

异常处理模块,用于当接收到所述异常指令时,根据对应的预设机制进入异常处理模式。The exception handling module is used to enter the exception handling mode according to the corresponding preset mechanism when receiving the exception instruction.

需要说明的是,当接收到异常指令时,异常处理模块会根据预设机制进入异常处理模式。在异常处理模式下,异常处理模块会采取一系列措施来恢复系统状态或通知用户。It should be noted that when an exception instruction is received, the exception handling module will enter the exception handling mode according to a preset mechanism. In the exception handling mode, the exception handling module will take a series of measures to restore the system state or notify the user.

优选地,通过设置客户端和服务端断开连接时的回调函数,来实现应用程序在网络连接断开时及时响应,并采取相应的异常处理措施。Preferably, by setting a callback function when the client and server are disconnected, the application can respond in time when the network connection is disconnected and take corresponding exception handling measures.

该异常处理模式可以统一管理所有客户端和服务端的断开连接回调函数。这意味着无论客户端还是服务端,其断开连接的回调函数都可以通过一个统一的接口进行设置和管理。This exception handling mode can uniformly manage the disconnection callback functions of all clients and servers. This means that the disconnection callback functions of both the client and the server can be set and managed through a unified interface.

当会话连接断开时,对应的回调函数将被立即调用,应用层可以快速知道断开事件,从而可以采取及时的应对措施。异常事件触发后,则根据之前设置的回调函数和节点名称,调用相应的回调函数。回调函数可以执行任何应用程序特定的逻辑,如通知用户、记录日志、尝试重新连接等。When the session connection is disconnected, the corresponding callback function will be called immediately, and the application layer can quickly know the disconnection event so that timely countermeasures can be taken. After the abnormal event is triggered, the corresponding callback function is called according to the previously set callback function and node name. The callback function can execute any application-specific logic, such as notifying the user, recording logs, and trying to reconnect.

进一步地,在回调函数中,应用程序可以尝试恢复连接,如发送重连请求或重启服务。如果恢复连接失败,应用程序可以重定向到备用服务或采取其他容错措施。Furthermore, in the callback function, the application can try to restore the connection, such as sending a reconnection request or restarting the service. If the connection restoration fails, the application can redirect to an alternative service or take other fault-tolerant measures.

在本实施例中,异常处理模块提供了一种自动化的机制来应对系统异常,减少了故障对系统的影响。通过预设机制,异常处理模块可以快速响应并处理各种异常情况,提高了系统的可靠性。In this embodiment, the exception handling module provides an automated mechanism to deal with system exceptions, reducing the impact of failures on the system. Through the preset mechanism, the exception handling module can quickly respond to and handle various abnormal situations, improving the reliability of the system.

以及,加密设置模块,用于对在输出所述目标信息至所述第二连接单元之前,对所述目标信息设置预设加密属性。And, an encryption setting module is used to set a preset encryption attribute for the target information before outputting the target information to the second connection unit.

需要说明的是,在目标信息传递到客户端之前,加密设置模块会对目标信息设置预设加密属性。这可以包括对数据进行加密、设置加密密钥或加密算法等,均不限于此。It should be noted that before the target information is transmitted to the client, the encryption setting module will set a preset encryption attribute for the target information, which may include encrypting the data, setting an encryption key or encryption algorithm, etc., but are not limited thereto.

在本实施例中,加密设置模块确保了数据在传输过程中的安全性和隐私性,防止数据被未授权的第三方截获或篡改。通过加密,加密设置模块增强了系统的安全性,保护了敏感数据不被泄露。In this embodiment, the encryption setting module ensures the security and privacy of data during transmission, preventing data from being intercepted or tampered by unauthorized third parties. Through encryption, the encryption setting module enhances the security of the system and protects sensitive data from being leaked.

在本申请中,所述第一连接单元用于同步启动若干个所述服务端,以及传递所述数据信息,并向服务端输出来自客户端的服务请求;所述第二连接单元用于同步启动若干个所述客户端,以及传递所述服务请求,并向客户端输出所述目标信息。In the present application, the first connection unit is used to synchronously start several of the server terminals, transmit the data information, and output the service request from the client to the server terminal; the second connection unit is used to synchronously start several of the client terminals, transmit the service request, and output the target information to the client terminal.

需要说明的是,第一连接单元首先负责启动多个服务端。It should be noted that the first connection unit is firstly responsible for starting multiple servers.

它可以通过任意启动脚本或程序来确保所有服务端在系统启动时被同步启动。当服务端需要与客户端或其他服务端交换数据时,第一连接单元负责将这些数据信息传递给相应的目标。优选地,它还可以使用某种消息队列、共享内存或其他通信机制来实现这一点。It can ensure that all servers are started synchronously when the system starts up through any startup script or program. When the server needs to exchange data with the client or other servers, the first connection unit is responsible for passing the data information to the corresponding target. Preferably, it can also use some message queue, shared memory or other communication mechanism to achieve this.

当客户端发送服务请求时,第一连接单元接收这些请求,并将其传递给适当的服务端,再通过负载均衡机制来决定将请求发送给哪个服务端。When the client sends a service request, the first connection unit receives the request and passes it to the appropriate server, and then determines to which server the request is sent through the load balancing mechanism.

在本实施例中,服务端可以被同步启动,确保系统在启动时所有服务端都已经就绪。In this embodiment, the servers can be started synchronously to ensure that all servers are ready when the system is started.

第一连接单元提供了服务端之间的数据传递和请求传递,使得服务端之间的通信更加高效和可靠。通过负载均衡机制,第一连接单元可以优化服务端的利用率,避免某些服务端过载。The first connection unit provides data transmission and request transmission between the servers, making the communication between the servers more efficient and reliable. Through the load balancing mechanism, the first connection unit can optimize the utilization of the servers and avoid overloading of some servers.

进一步地,第二连接单元负责启动多个客户端,其也是可以通过任意启动脚本或程序来确保所有客户端在系统启动时被同步启动。当服务端需要将数据或响应传递给客户端时,第二连接单元负责接收这些信息,并将其传递给客户端。服务端处理客户端的请求后,会产生目标信息。第二连接单元将这些目标信息输出给客户端。Furthermore, the second connection unit is responsible for starting multiple clients, and it can also ensure that all clients are started synchronously when the system starts through any startup script or program. When the server needs to pass data or responses to the client, the second connection unit is responsible for receiving this information and passing it to the client. After the server processes the client's request, it will generate target information. The second connection unit outputs this target information to the client.

第二连接单元提供了客户端之间的数据传递和服务请求的传递,使得客户端之间的通信更加高效和可靠。通过第二连接单元,服务端可以将处理结果快速地传递给客户端,提高了客户端的响应速度和用户体验。The second connection unit provides data transmission and service request transmission between clients, making communication between clients more efficient and reliable. Through the second connection unit, the server can quickly transmit the processing results to the client, improving the client's response speed and user experience.

需要说明的是,第一和第二连接单元均是由IpcContext单元统一管理,而上层逻辑无需额外去管理这些服务,优选地,在该单元中可以通过一个hash表用来存储当前所有的服务端节点,通过高效的数据和服务请求的传递,提高了系统的整体性能和用户体验。It should be noted that the first and second connection units are uniformly managed by the IpcContext unit, and the upper-level logic does not need to manage these services additionally. Preferably, a hash table can be used to store all current server nodes in the unit, thereby improving the overall performance of the system and user experience through efficient transmission of data and service requests.

综上,本申请实施例中间件通信系统通过IpcContext单元进行统一的管理和处理,使得客户端调用变得更加简单和高效,其设计实现了高效、安全、灵活和可靠的通信机制,提高了系统的可维护性和可扩展性,同时也为开发者提供了更强的控制力和灵活性。In summary, the middleware communication system in the embodiment of the present application is uniformly managed and processed through the IpcContext unit, making client calls simpler and more efficient. Its design implements an efficient, secure, flexible and reliable communication mechanism, improves the maintainability and scalability of the system, and also provides developers with greater control and flexibility.

实施例二:Embodiment 2:

如附图4所示,为了解决上述技术问题,本申请还提出了一种中间件通信系统的方法,所述方法包括:As shown in FIG. 4 , in order to solve the above technical problem, the present application also proposes a method of a middleware communication system, the method comprising:

通过所述中间件通信接口层,根据预设规则为服务端与客户端提供统一的通信接口;其中,所述服务端与客户端分别来自不同系统,或同一系统不同进程。所述中间件通信接口层至少包括通信中间件管理中心。The middleware communication interface layer provides a unified communication interface for the server and the client according to preset rules; wherein the server and the client are from different systems, or different processes of the same system. The middleware communication interface layer at least includes a communication middleware management center.

需要说明的是,本实施例方法提供了中间件通信接口层为服务端和客户端提供了一套统一的通信接口。这套接口定义了服务端和客户端之间进行数据交换的标准格式和方法。通信中间件管理中心是中间件通信接口层的一部分,它负责管理和协调服务端与客户端之间的通信。管理中心维护了一个通信信息的传递状态,记录了数据信息和服务请求的流动情况。It should be noted that the method of this embodiment provides a set of unified communication interfaces for the server and the client by providing a middleware communication interface layer. This set of interfaces defines the standard format and method for data exchange between the server and the client. The communication middleware management center is part of the middleware communication interface layer, which is responsible for managing and coordinating the communication between the server and the client. The management center maintains the transmission status of a communication information and records the flow of data information and service requests.

进一步地,获取通信中间件管理中心中通信信息的传递状态;当所述传递状态指在所述通信中间件管理中心接收到任一服务端输出的数据信息时,通过所述通信接口向所述客户端输出目标信息;当所述传递状态指在所述通信中间件管理中心介接收到任一客户端输出的服务请求时,通过所述通信接口向所述服务端传递。Furthermore, the transmission status of the communication information in the communication middleware management center is obtained; when the transmission status refers to the communication middleware management center receiving data information output by any server, the target information is output to the client through the communication interface; when the transmission status refers to the communication middleware management center receiving a service request output by any client, it is transmitted to the server through the communication interface.

需要说明的是,当服务端输出数据信息时,通信中间件管理中心接收到这些信息。管理中心根据预设规则处理这些数据信息,并将其转换为目标信息。然后,通过通信接口将目标信息输出给客户端。It should be noted that when the server outputs data information, the communication middleware management center receives the information. The management center processes the data information according to preset rules and converts it into target information. Then, the target information is output to the client through the communication interface.

当客户端输出服务请求时,通信中间件管理中心接收到这些请求。管理中心根据预设规则处理这些请求,并将其转换为服务端可以理解的形式。然后,通过通信接口将服务请求传递给服务端。When the client outputs service requests, the communication middleware management center receives these requests. The management center processes these requests according to preset rules and converts them into a form that the server can understand. Then, the service requests are passed to the server through the communication interface.

优选地,可以通过对中间件系统的监控和数据跟踪来实现通信信息的传递状态的获取。例如,通信中间件管理中心可以设置一个状态机,用于跟踪数据包或消息的状态。状态机可以记录数据从发送到接收的每个阶段,如创建、发送、接收、处理等。通过查询状态机,可以获取当前的通信状态。Preferably, the transmission status of the communication information can be obtained by monitoring and tracking the data of the middleware system. For example, the communication middleware management center can set a state machine to track the status of the data packet or message. The state machine can record each stage of the data from sending to receiving, such as creation, sending, receiving, processing, etc. By querying the state machine, the current communication status can be obtained.

通信中间件还可以从记录详细的日志信息来获取所需信息传递状态,包括消息的发送和接收时间、发送和接收的节点、消息的ID、状态变化等。通过分析日志文件,可以了解通信中间件管理中心的当前状态,均不限于此。The communication middleware can also obtain the required information transmission status from the detailed log information, including the sending and receiving time of the message, the sending and receiving nodes, the message ID, the status change, etc. By analyzing the log file, the current status of the communication middleware management center can be understood, which is not limited to this.

其中,所述预设规则具体为:The preset rules are specifically:

通过所述服务端输出的数据信息注册预设服务函数,生成可供客户端调用的接口;根据所述输出自客户端的调用请求,匹配服务端与客户端之间的连接,以生成所述通信接口。The preset service function is registered through the data information output by the server to generate an interface that can be called by the client; according to the call request output from the client, the connection between the server and the client is matched to generate the communication interface.

需要说明的是,预设规则涉及服务端输出的数据信息注册预设服务函数,以及根据客户端的调用请求匹配服务端和客户端之间的连接,生成通信接口。It should be noted that the preset rules involve registering a preset service function with the data information output by the server, and matching the connection between the server and the client according to the call request of the client to generate a communication interface.

服务端输出的数据信息首先需要被注册到一个预设的服务函数中。这个服务函数可以是预先定义好的,也可以是根据服务端输出数据信息动态生成的。注册过程可以是将数据信息映射到一个函数或方法上,以便后续可以通过该函数或方法来处理这些数据信息。The data information output by the server must first be registered in a preset service function. This service function can be pre-defined or dynamically generated based on the data information output by the server. The registration process can be to map the data information to a function or method so that the data information can be processed by the function or method later.

通过注册预设服务函数,可以为客户端生成一个可供调用的接口。这个接口可以是API、Web服务或其他形式的接口,它定义了客户端如何调用服务端的功能。生成的接口需要确保客户端可以通过该接口安全、高效地访问服务端的功能。By registering a preset service function, you can generate a callable interface for the client. This interface can be an API, Web service, or other form of interface, which defines how the client calls the server's functions. The generated interface needs to ensure that the client can access the server's functions safely and efficiently through the interface.

当客户端发起调用请求时,通信接口负责匹配这些请求到对应的服务端。匹配过程可以涉及负载均衡、服务发现或直接根据请求内容进行匹配。通过匹配,通信接口确保客户端的请求能够被正确地路由到服务端。When the client initiates a call request, the communication interface is responsible for matching these requests to the corresponding server. The matching process can involve load balancing, service discovery, or matching directly based on the request content. Through matching, the communication interface ensures that the client's request can be correctly routed to the server.

根据匹配的结果,通信接口会生成一个具体的通信路径,用于客户端和服务端之间的数据交换。这个通信接口定义了数据传输的格式、协议、安全措施等,确保通信过程的安全性和可靠性。Based on the matching results, the communication interface will generate a specific communication path for data exchange between the client and the server. This communication interface defines the format, protocol, security measures, etc. of data transmission to ensure the security and reliability of the communication process.

在本实施例中,通过预设服务函数的注册,服务端的功能被抽象化,使得客户端不需要关心服务端的具体实现细节。这简化了客户端的开发过程,客户端开发者可以更加专注于业务逻辑。另外,生成的客户端调用接口提供了灵活的服务访问方式,客户端可以根据需要调用不同的服务端功能。这种灵活性也使得系统更加易于扩展和维护。In this embodiment, by registering the preset service function, the function of the server is abstracted, so that the client does not need to care about the specific implementation details of the server. This simplifies the client development process, and the client developer can focus more on the business logic. In addition, the generated client call interface provides a flexible service access method, and the client can call different server functions as needed. This flexibility also makes the system easier to expand and maintain.

综上,实施例二中间件通信方法通过提供了一个统一的通信接口,使得服务端和客户端可以跨系统或跨进程进行通信,无论它们运行在什么样的操作系统或进程环境中。通过预设规则,服务端输出的数据信息被注册到预设服务函数中,生成可供客户端调用的接口。这种服务注册与发现机制简化了客户端对服务端功能的访问。中间件通信方法可以根据客户端的调用请求,匹配服务端与客户端之间的连接,以生成通信接口。这种请求匹配与路由机制确保了客户端的请求能够高效、准确地路由到正确的服务端。具体的实现过程和原理在实施例一中已经详细介绍,在本实施例中不再赘述。In summary, the middleware communication method in Example 2 provides a unified communication interface so that the server and the client can communicate across systems or processes, regardless of the operating system or process environment they are running in. Through preset rules, the data information output by the server is registered in the preset service function to generate an interface that can be called by the client. This service registration and discovery mechanism simplifies the client's access to the server function. The middleware communication method can match the connection between the server and the client according to the client's call request to generate a communication interface. This request matching and routing mechanism ensures that the client's request can be efficiently and accurately routed to the correct server. The specific implementation process and principle have been introduced in detail in Example 1 and will not be repeated in this embodiment.

实施例三:Embodiment three:

本申请还提供了一种车载终端,包括多个系统,其内包括若干进程;其中,所述多个系统间,以及所述进程间基于上述任一项所述的中间件通信方法进行通信。The present application also provides a vehicle-mounted terminal, including multiple systems, each of which includes a number of processes; wherein the multiple systems and the processes communicate with each other based on any of the middleware communication methods described above.

需要说明的是,本实施例中的一种车载终端可以被划分为多个系统,每个系统负责不同的功能,如导航系统、娱乐系统、安全系统等。每个系统内部又包含若干进程,进程负责执行系统的具体任务。It should be noted that a vehicle terminal in this embodiment can be divided into multiple systems, each system is responsible for different functions, such as navigation system, entertainment system, security system, etc. Each system contains several processes, and the process is responsible for executing specific tasks of the system.

在车载终端中集成上述任一项所述的中间件通信方法。这包括为每个系统提供统一的通信接口,以及实现服务注册、请求匹配、通信状态管理等功能。Integrate any of the above middleware communication methods in the vehicle terminal, which includes providing a unified communication interface for each system, and realizing functions such as service registration, request matching, and communication status management.

各个系统之间以及进程之间基于中间件通信方法进行通信。通过通信接口,系统之间可以交换数据,进程之间可以传递服务请求。The communication between systems and processes is based on the middleware communication method. Through the communication interface, data can be exchanged between systems and service requests can be transmitted between processes.

其中,系统之间可以共享数据,如导航系统可以提供位置信息给娱乐系统,以便在导航时显示相关信息。进程之间可以传递控制命令,如安全系统中的进程可以发送安全警告给娱乐系统的进程,以调整显示内容。Data can be shared between systems, such as a navigation system can provide location information to an entertainment system so that relevant information can be displayed during navigation. Control commands can be passed between processes, such as a process in a security system can send a security warning to a process in an entertainment system to adjust the displayed content.

中间件通信方法中的异常监测和处理机制可以应用于车载终端,确保系统在遇到异常情况时能够自动响应和恢复。The abnormality monitoring and processing mechanism in the middleware communication method can be applied to the vehicle terminal to ensure that the system can automatically respond and recover when encountering abnormal situations.

加密设置模块可以保护车载终端在传输敏感数据时的安全性,如用户个人信息、车辆状态等。The encryption setting module can protect the security of the vehicle terminal when transmitting sensitive data, such as user personal information, vehicle status, etc.

优选地,在一个现代车载终端中,多个系统之间可以通过中间件通信方法进行通信。导航系统提供位置信息和路线规划服务。它可以通过中间件通信方法与其他系统共享位置数据,如娱乐系统可以显示附近的餐厅或景点信息;娱乐系统负责提供音乐、视频等娱乐内容。它可以通过中间件通信方法接收来自导航系统的位置信息,以便在导航时提供相关的娱乐内容。Preferably, in a modern vehicle terminal, multiple systems can communicate with each other through middleware communication methods. The navigation system provides location information and route planning services. It can share location data with other systems through middleware communication methods, such as the entertainment system can display information about nearby restaurants or attractions; the entertainment system is responsible for providing entertainment content such as music and videos. It can receive location information from the navigation system through the middleware communication method to provide relevant entertainment content during navigation.

安全系统负责监测车辆的安全状态,如碰撞预警、车道偏离预警等。它可以通过中间件通信方法向其他系统发送安全警告,如娱乐系统可以暂停播放内容以提高驾驶员的注意力。The safety system is responsible for monitoring the safety status of the vehicle, such as collision warning, lane departure warning, etc. It can send safety warnings to other systems through middleware communication methods, such as the entertainment system can pause the content to improve the driver's attention.

车载终端的多个系统和进程之间可以高效地进行数据交换和协同工作,提高了系统的整体性能和用户体验。基于中间件通信方法,车载终端的设计具有较高的灵活性和扩展性,可以轻松添加新的系统或进程,无需大规模修改现有系统。中间件通信方法中的安全机制确保了数据在传输过程中的安全性,保护了用户隐私和车载终端的安全。Multiple systems and processes in the vehicle terminal can exchange data and work together efficiently, improving the overall performance of the system and user experience. Based on the middleware communication method, the design of the vehicle terminal has high flexibility and scalability, and new systems or processes can be easily added without large-scale modifications to the existing system. The security mechanism in the middleware communication method ensures the security of data during transmission, protecting user privacy and the security of the vehicle terminal.

通过中间件通信方法,车载终端可以高效地处理和传输大量数据,如高清地图数据、多媒体内容等。中间件通信方法的统一接口和模块化设计简化了车载终端的维护和升级过程,降低了维护成本。Through the middleware communication method, the vehicle terminal can efficiently process and transmit large amounts of data, such as high-definition map data, multimedia content, etc. The unified interface and modular design of the middleware communication method simplify the maintenance and upgrade process of the vehicle terminal and reduce maintenance costs.

综上,车载终端的多个系统和进程可以基于中间件通信方法高效、安全地进行通信,为用户提供一个集成、智能的驾驶体验。In summary, multiple systems and processes of the vehicle terminal can communicate efficiently and securely based on the middleware communication method, providing users with an integrated and intelligent driving experience.

实施例四:Embodiment 4:

本申请还提供了一种存储介质,为计算机可读存储介质中的一种,其上存储有计算机程序,所述计算机程序被处理器执行时,实现如上任一所述的中间件通信方法。The present application also provides a storage medium, which is a type of computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the middleware communication methods described above.

优选地,一种计算机可读的存储介质,如硬盘驱动器(HDD)、固态驱动器(SSD)、闪存卡、光盘等,在存储介质上存储实现中间件通信方法的计算机程序代码。Preferably, a computer-readable storage medium, such as a hard disk drive (HDD), a solid state drive (SSD), a flash memory card, an optical disk, etc., stores computer program codes for implementing the middleware communication method on the storage medium.

本实施例通过编写计算机程序,实现中间件通信方法中的各个功能,如服务注册、请求匹配、通信接口生成、状态管理等,以确保程序代码遵循相应的编程语言和开发标准。其中,将编写好的程序代码进行编译,生成可执行文件。将编译后的可执行文件和必要的库文件部署到存储介质上。将存储介质的设备连接到处理器所在的计算机系统。处理器读取存储介质上的可执行文件,并执行程序代码。This embodiment implements various functions in the middleware communication method, such as service registration, request matching, communication interface generation, state management, etc., by writing a computer program to ensure that the program code complies with the corresponding programming language and development standards. Among them, the written program code is compiled to generate an executable file. The compiled executable file and necessary library files are deployed to a storage medium. The storage medium device is connected to the computer system where the processor is located. The processor reads the executable file on the storage medium and executes the program code.

在本实施例中,当处理器执行计算机程序时,实现中间件通信方法的功能。程序通过处理器执行,与车载终端或其他系统的硬件和软件进行交互,实现通信过程。In this embodiment, when the processor executes the computer program, the function of the middleware communication method is realized. The program is executed by the processor and interacts with the hardware and software of the vehicle terminal or other systems to realize the communication process.

通过执行存储介质上的程序,实现数据在服务端和客户端之间的传输,确保数据能够高效、安全地在系统之间交换。程序实现服务注册与发现功能,使得服务端的功能可以被客户端访问,而不需要关心服务端的具体实现细节。程序实现请求匹配与路由功能,确保客户端的请求能够高效、准确地路由到正确的服务端。By executing the program on the storage medium, data is transmitted between the server and the client, ensuring that data can be exchanged between systems efficiently and securely. The program implements service registration and discovery functions, so that the server's functions can be accessed by the client without having to worry about the specific implementation details of the server. The program implements request matching and routing functions, ensuring that client requests can be efficiently and accurately routed to the correct server.

优选地,程序可以实现通信状态管理功能,监控和管理通信过程,确保通信过程的透明性和可控性。程序可以实现加密设置模块,保护数据在传输过程中的安全性和可靠性。程序可以实现服务函数的注册,使得系统能够灵活地添加新的服务,具有较高的可扩展性。程序还可以实现异常监测和处理功能,提高系统的健壮性和稳定性。Preferably, the program can implement the communication status management function, monitor and manage the communication process, and ensure the transparency and controllability of the communication process. The program can implement the encryption setting module to protect the security and reliability of data during transmission. The program can implement the registration of service functions, so that the system can flexibly add new services and has high scalability. The program can also implement the abnormal monitoring and processing functions to improve the robustness and stability of the system.

综上,本实施例的存储介质上的计算机程序通过执行实现了高效、安全、灵活和可靠的通信机制,有助于构建稳定、易用和安全的分布式系统。In summary, the computer program on the storage medium of this embodiment realizes an efficient, secure, flexible and reliable communication mechanism through execution, which helps to build a stable, easy-to-use and secure distributed system.

所称处理器可以是中央处理单元(CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。所述存储器用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,例如所述计算机程序的程序代码等。所述存储器还可以用于暂时地存储已经输出或者将要输出的数据。The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The memory is used to store an operating system, an application program, a boot loader, data, and other programs, such as the program code of the computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.

在本申请所提供的几个实施例中,可以理解的是,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意的是,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。In several embodiments provided in the present application, it is understood that 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, a program segment or a part of a 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 that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.

所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

以上所述的具体实施例,对本申请的目的、技术方案和有益效果进行了进一步的详细说明,应当理解,以上所述仅为本申请的具体实施例而已,并不用于限定本申请的保护范围。特别指出,对于本领域技术人员来说,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A middleware communication system, comprising: any service layer and any client layer; wherein the service end layer comprises any number of service ends for service providing ends, the client layer comprises any number of clients for servicing the request end; it is characterized in that the method comprises the steps of,
The server and the client are respectively from different systems or different processes of the same system; the middleware communication system further includes:
A middleware communication interface layer; the server layer establishes connection with the client layer after passing through the middleware communication interface layer; the middleware communication interface layer is used for communication between different systems and communication between different processes of the same system to provide a unified communication interface;
The middleware communication interface layer at least comprises: the communication middleware management unit, the first connection unit and the second connection unit; one end of the first connecting unit is connected with the service end, the other end of the first connecting unit is connected with one end of the communication middleware management unit, the other end of the communication middleware management unit is connected with one end of the second connecting unit, and the other end of the second connecting unit is connected with the client.
2. The middleware communication system according to claim 1, wherein said communication middleware management unit comprises:
The registration module is used for registering a preset service function and generating an interface which can be called by the client;
And the calling module is used for matching the connection interface between the server and the client according to the calling request output from the client.
3. The middleware communication system according to claim 2, wherein said communication middleware management unit further comprises:
The message publishing module is used for receiving the data information from the server and generating target information according to the data information;
and the message subscription module is used for receiving the target information and broadcasting and transmitting the target information to the client.
4. A middleware communication system according to claim 3 wherein said communication middleware management unit further comprises:
The abnormality monitoring module is used for monitoring the connection state between the server and the client through a preset rule and outputting an abnormality instruction; and the exception handling module is used for entering an exception handling mode according to a corresponding preset mechanism when the exception instruction is received.
5. The middleware communication system of claim 4, wherein the communication middleware management unit further comprises:
And the encryption setting module is used for setting preset encryption attributes for the target information before outputting the target information to the second connection unit.
6. A middleware communication system in accordance with claim 5, wherein,
The first connection unit is used for synchronously starting a plurality of service ends, transmitting the data information and outputting a service request from a client to the service ends;
the second connection unit is used for synchronously starting a plurality of clients, transmitting the service request and outputting the target information to the clients.
7. A method of a middleware communication system according to any of claims 1-6, comprising:
Providing a unified communication interface for the server and the client according to a preset rule through the middleware communication interface layer; the server and the client are respectively from different systems or different processes of the same system; the middleware communication interface layer at least comprises a communication middleware management center;
acquiring a transmission state of communication information in a communication middleware management center;
When the transfer state refers to the data information output by any server is received by the communication middleware management center, outputting target information to the client through the communication interface;
and when the transfer state refers to that the communication middleware management center receives a service request output by any client, the service request is transferred to the server through the communication interface.
8. The middleware communication method according to claim 7, wherein the preset rule is specifically: registering a preset service function through the data information output by the service end to generate an interface which can be called by the client;
and according to the call request output from the client, matching the connection between the server and the client to generate the communication interface.
9. The vehicle-mounted terminal is characterized by comprising a plurality of systems, wherein a plurality of processes are included in the systems; wherein the plurality of systems, and the process communicate based on the middleware communication method of any one of claims 7 to 8.
10. A storage medium, being one of computer readable storage media, having stored thereon a computer program which, when executed by a processor, implements the middleware communication method according to any of claims 7-8.
CN202410684363.5A 2024-05-30 2024-05-30 A middleware communication system, method, vehicle-mounted terminal and storage medium Pending CN118796504A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410684363.5A CN118796504A (en) 2024-05-30 2024-05-30 A middleware communication system, method, vehicle-mounted terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410684363.5A CN118796504A (en) 2024-05-30 2024-05-30 A middleware communication system, method, vehicle-mounted terminal and storage medium

Publications (1)

Publication Number Publication Date
CN118796504A true CN118796504A (en) 2024-10-18

Family

ID=93024427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410684363.5A Pending CN118796504A (en) 2024-05-30 2024-05-30 A middleware communication system, method, vehicle-mounted terminal and storage medium

Country Status (1)

Country Link
CN (1) CN118796504A (en)

Similar Documents

Publication Publication Date Title
US7673029B2 (en) Grid automation bus to integrate management frameworks for dynamic grid management
CN108566290B (en) Service configuration management method, system, storage medium and server
CN112491948B (en) Non-invasive monomer application micro-service method, device and computer equipment
US20080288622A1 (en) Managing Server Farms
WO2006130265A2 (en) Split download for electronic software downloads
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN115167985A (en) Virtualized computing power providing method and system
CN112698838B (en) Multi-cloud container deployment system and container deployment method thereof
CN108496157B (en) System and method for providing runtime trace using an extended interface
CN116016667A (en) A unified management method and system for multiple types of registration centers on a cloud native platform
CN113760562A (en) Link tracking method, apparatus, system, server and storage medium
CN118796504A (en) A middleware communication system, method, vehicle-mounted terminal and storage medium
CN114615138B (en) Service containerization platform, service containerization method, device and electronic equipment
CN112764995B (en) Server hardware resource monitoring method, device and medium
CN112448854B (en) Kubernetes complex network policy system and implementation method thereof
CN113741912A (en) Model management system, method, device and equipment
US11734058B2 (en) Systems and methods of a virtualized management operation engine of a distributed system
CN116560756B (en) Service arrangement method, electronic device, and computer-readable storage medium
US11928044B1 (en) Batching event data in an event-driven architecture
US11836545B1 (en) Integration of cloud entities in an event architecture
US11861421B1 (en) Controlling timing of event data transmissions in an event architecture
US11941385B1 (en) Transforming data between cloud entities in an event architecture
CN114579387B (en) Customized nginx system configuration method, data processing method, and device
CN117336256A (en) Resource scheduling method, device, server and storage medium
CN118473773A (en) Flow analysis method and device of cloud primary environment and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: Floor 1-5, Building 2, No. 171 Hele Er Street, Chengdu High tech Zone, China (Sichuan) Pilot Free Trade Zone, Chengdu City, Sichuan Province, 610000

Applicant after: Chengdu Desai Xiweika Frog Technology Co.,Ltd.

Address before: Floor 1-5, Building 2, No. 171 Hele Er Street, Chengdu High tech Zone, China (Sichuan) Pilot Free Trade Zone, Chengdu City, Sichuan Province, 610000

Applicant before: Chengdu kafrog Technology Co.,Ltd.

Country or region before: China