WO2021139099A1 - Virtual can port multiplexing technology implementation method based on edge cloud environment - Google Patents

Virtual can port multiplexing technology implementation method based on edge cloud environment Download PDF

Info

Publication number
WO2021139099A1
WO2021139099A1 PCT/CN2020/098661 CN2020098661W WO2021139099A1 WO 2021139099 A1 WO2021139099 A1 WO 2021139099A1 CN 2020098661 W CN2020098661 W CN 2020098661W WO 2021139099 A1 WO2021139099 A1 WO 2021139099A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
virtual
client
server
permission
Prior art date
Application number
PCT/CN2020/098661
Other languages
French (fr)
Chinese (zh)
Inventor
王晔
李琦
巩玉旺
Original Assignee
山东超越数控电子股份有限公司
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 山东超越数控电子股份有限公司 filed Critical 山东超越数控电子股份有限公司
Publication of WO2021139099A1 publication Critical patent/WO2021139099A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Definitions

  • the present invention provides a method for implementing virtual CAN port multiplexing technology based on an edge cloud environment, which belongs to the field of edge cloud computing.
  • Cisco pointed out in the 2016-2021 Global Cloud Index The number of devices connected to the Internet will increase from 17.1 billion in 2016 to 27.1 billion. The amount of data generated every day is also increasing.
  • the traditional cloud computing model uploads all data to the cloud computing center through the network will cause many shortcomings, such as: interconnection real-time requirements, data security issues, energy consumption issues, etc.; in intelligent business scenarios Driven by applications, the "cloud + intelligence" new business format has gradually formed, which has gradually become a long-term choice and industry consensus for business strategy development, and more and more business scenarios have begun to go to the cloud.
  • the edge cloud model has become a supporting platform for new Internet of Everything applications, with broad prospects in the financial, military, industrial, and medical industries.
  • the can bus Due to the high reliability and real-time nature of the can bus, in the edge cloud scenario, specific services require the can bus as a field device and communication support to obtain or collect business-related data information. However, when a large amount of data is transmitted, the can Data transmission between modules is prone to channel congestion.
  • the technical problem to be solved by the present invention is to provide an implementation method of virtual CAN port multiplexing technology based on an edge cloud environment, which is used to solve the problems of error, blockage and inconsistency of CAN port channel data under the traditional model.
  • the technical solution adopted by the present invention is: an implementation method of virtual can port multiplexing technology based on edge cloud environment, including the following steps: S01), creating a virtual can port, the virtual can port includes Virtual can driver, can client and can server, one end of the virtual can driver is connected to the application, the other end is connected to the can client, the can client and the can server are connected through Ethernet, and the can server is connected to the physical can port; S02 ). Specify the application or client with the permission to modify the attributes of the can port through the permission profile, and decide whether to allow the application or client to modify the attributes of the can port according to the permission profile.
  • the client sends the can port attribute modification instruction to complete the modification of the can port attribute; S03).
  • the can client After the virtual can port data service is started in the virtual machine, the can client automatically connects with the can server on the Ethernet to establish a communication channel.
  • the can client sends data to the can server through the network connection, and then sends the data out from the physical can port connected to the can server; when the physical can port receives data, the can service
  • the terminal reads the data from the physical can port, and then sends it to the can client through a network connection.
  • the can client forwards the data to the virtual can driver, and the virtual can driver forwards it to the application.
  • a virtual can port is associated with multiple applications, that is, a virtual can port can be used by multiple applications at the same time.
  • step S02 is specifically: when the virtual can port configuration management service is started in the virtual machine, the can client automatically connects with the can server on the Ethernet to establish a communication channel, and after the connection is established, the can server sends the newly connected can client
  • the client broadcasts permission configuration and can port attribute information. After the can client receives the broadcast, it judges whether it has permission. If it has permission, it sends an attribute modification instruction to the can server according to the can port attribute information configured by the application.
  • the can server receives the can port attribute modification instruction sent by the can client, and first judges whether the can client has permission to modify it, if so Permission, modify the attributes of the can port, and then broadcast the new attributes of the can port to all connected can clients. If there is no permission, the command is ignored.
  • step S03 when the application program writes the virtual can port, the can client captures the data sent by the application program through the virtual can driver, and then sends the data to the can server through the network connection.
  • the data exchange between the can client and the can server is performed through the TCP connection.
  • the virtual can port is a programming interface created by using the underlying device driver technology and has the same behavior characteristics as the traditional can port but without corresponding can port hardware.
  • the virtual can port driver is set to self-start.
  • the present invention provides a virtual can port, which can be used by multiple applications at the same time, and the virtual can port is easy to expand, which can effectively solve the problem that traditional physical can port channels are prone to blockage This leads to data errors, inconsistencies, and unpredictable problems.
  • Figure 1 is a schematic diagram of the principle of a virtual can port
  • Figure 2 is a flow chart of virtual can port command configuration
  • Figure 3 is a flow chart of virtual CAN port data forwarding
  • Figure 4 is a flow chart of virtual can port multiplexing and forwarding.
  • Edge cloud scenarios are mostly applied to terminal layers such as healthcare, video analysis, vehicle interconnection, mobile big data analysis, ocean detection control, etc. Because the physical can port can only be used by one application at a time, this is largely restricted The use of can port resources, and the expansion of the can port of physical equipment is very limited.
  • this embodiment discloses a method for implementing virtual CAN port multiplexing technology based on an edge cloud environment, which includes the following steps:
  • the virtual can port includes a virtual can driver, a can client, and a can server.
  • One end of the virtual can driver is connected to the application, the other end is connected to the can client, and the can client is connected to the can server through the Ethernet.
  • the can server is connected to the physical can port (in Figure 1, only the can driver of the physical can port is shown).
  • the virtual can port is a programming interface that is created by using the underlying device driver technology and can be accessed by applications, and its behavior characteristics are the same as the traditional physical can port, but there is no corresponding can port hardware in the computer.
  • the virtual can port is usually associated with a certain physical can port through other communication methods, so that the access of the application program to the virtual can port is mapped to the access to the physical can port.
  • the communication mode is implemented through the can client and the can server.
  • the can port configuration management service specifies the application or client that has the permission to modify the can port baud rate and other attributes through the permission profile, and decides whether to allow the application or client to modify the can port attributes according to the permission profile. If allowed, then Send the can port attribute modification instruction to the can server according to the permission configuration file to complete the modification of the can port attribute.
  • the virtual can port configuration management service (can client) when the virtual can port configuration management service (can client) is started in the virtual machine, it will automatically connect with the can port networking device (can server) on the Ethernet to establish a communication channel (through the can client and Can server establish communication).
  • the can server broadcasts attribute information such as permission configuration and can port baud rate to the newly connected can client; the can client judges whether it has permission after receiving the broadcast, and if it has permission, it will be based on the can port configured by the application Attributes such as baud rate are sent to the can server to modify the attributes. If there is no permission, the attributes of the can port broadcast by the can server will be recorded, and the can port communication will be carried out subsequently.
  • the can server receives the can port attribute modification instruction sent by the can client, it first determines whether the can client has the authority to modify it, if it has the authority, it modifies the can port attribute, and then broadcasts the new can port attribute to all connected can clients If there is no permission, ignore the instruction.
  • the can port data communication service is based on the can client and the can server.
  • the virtual can port data service (can client) in the virtual machine, it automatically connects with the CAN port networking device (can server) on the Ethernet to establish a communication channel (through the can client and the can service) Establish communication at the end).
  • the data is communicated with the attributes of the can port configured by the can port configuration management service.
  • the can client captures the data sent by the application through the virtual driver, and then sends the data to the can server through the TCP connection; after the can server receives the data, it sends the data from The physical can port device sends it out.
  • the can server will read the data from the physical can port device, and then send it to the can client through the TCP connection, and then the can client forwards the data to the virtual can port, and the virtual can Forwarded to the application.
  • a virtual can port can be associated with multiple applications. That is, a virtual can port can be used by multiple applications at the same time.
  • the virtual can port copies the data sent by each application, and sends it to the corresponding can port networking device through the client and server (TCP/IP), and sends the data through the physical can port. Send it out.
  • the virtual CAN port of the opposite end After receiving the data through the server and client (TCP/IP), the virtual CAN port of the opposite end sends the data to all connected clients and the corresponding applications of the client.
  • the can port tool testCan is used to test and verify the virtual can port.
  • This embodiment provides a virtual can port, the virtual can port can be used by multiple applications at the same time, and the virtual can port can be connected to different applications and associated with different physical can ports, easy to expand, can Effectively solve the problem that the traditional physical CAN port channel is prone to blockage, which leads to data errors, inconsistencies, and unpredictability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

Disclosed is a virtual can port multiplexing technology implementation method based on an edge cloud environment. The method comprises: firstly, creating a virtual can port comprising a virtual can driver, a can client end and a can serving end; and then performing a can port configuration management service and a can port data communication service, wherein the virtual can driver may be associated with a plurality of application programs, that is, one virtual can port may be used by a plurality of application programs at the same time. A virtual can port is provided in the present invention. The present virtual can port can be used by a plurality of application programs at the same time. Moreover, the present virtual can port may be connected to different application programs and associated with different physical can ports, and is easily expanded, such that the problems of data errors, inconsistency and unpredictability caused by the fact that a traditional physical can port channel is easily blocked can be effectively solved.

Description

一种基于边缘云环境的虚拟can口多路复用技术的实现方法Method for implementing virtual CAN port multiplexing technology based on edge cloud environment 技术领域Technical field
本发明提出一种基于边缘云环境的虚拟can口多路复用技术的实现方法,属于边缘云计算领域。The present invention provides a method for implementing virtual CAN port multiplexing technology based on an edge cloud environment, which belongs to the field of edge cloud computing.
背景技术Background technique
思科在2016-2021年的全球云指数中指出:接入互联网的设备数量将从2016年的171亿增加到271亿。每天产生的数据量也在增加,传统的云计算模型将所有数据通过网络上传至云计算中心会产生很多不足,例如:互联实时性需求,数据安全问题,耗能问题等;在智能化业务场景应用驱动下,“云+智能”新业态逐步形成,已经逐步成为业务战略发展的长期选择和行业共识,越来越多的业务场景开始上云。而如今,边缘云模型成为新型万物互联应用的支撑平台,在金融、军队、工业以及医疗行业等前景广阔。Cisco pointed out in the 2016-2021 Global Cloud Index: The number of devices connected to the Internet will increase from 17.1 billion in 2016 to 27.1 billion. The amount of data generated every day is also increasing. The traditional cloud computing model uploads all data to the cloud computing center through the network will cause many shortcomings, such as: interconnection real-time requirements, data security issues, energy consumption issues, etc.; in intelligent business scenarios Driven by applications, the "cloud + intelligence" new business format has gradually formed, which has gradually become a long-term choice and industry consensus for business strategy development, and more and more business scenarios have begun to go to the cloud. Today, the edge cloud model has become a supporting platform for new Internet of Everything applications, with broad prospects in the financial, military, industrial, and medical industries.
由于can总线的高可靠性和实时性,在边缘云场景下,特定业务需要can总线作为现场设备及的通信的支持,以获取或采集业务相关的数据信息,但在大量数据进行传输时,can模块之间的数据传输容易出现信道阻塞。Due to the high reliability and real-time nature of the can bus, in the edge cloud scenario, specific services require the can bus as a field device and communication support to obtain or collect business-related data information. However, when a large amount of data is transmitted, the can Data transmission between modules is prone to channel congestion.
发明内容Summary of the invention
本发明要解决的技术问题是提供一种基于边缘云环境的虚拟can口多路复用技术的实现方法,用来解决传统模型下can口信道数据出错、堵塞、不一致的问题。The technical problem to be solved by the present invention is to provide an implementation method of virtual CAN port multiplexing technology based on an edge cloud environment, which is used to solve the problems of error, blockage and inconsistency of CAN port channel data under the traditional model.
为了解决所述技术问题,本发明采用的技术方案是:一种基于边缘云环境的虚拟can口多路复用技术的实现方法,包括以下步骤:S01)、创建虚拟can口,虚拟can口包括虚拟can驱动、can客户端和can服务端,虚拟can驱动一端与应用程序相连,另一端与can客户端相连,can客户端与can服务端通过以太网相连,can服务端连接物理can口;S02)、通过权限配置文件指定有权限修改can口属性的应用程序或客户端,根据该权限配置文件决定是否允许应用程序或客户端来修改can口属性,若允许,则根据权限配置文件向can服务端发送can口属性修改指令,以完成can口属性的修改;S03)、在虚拟机内启动虚拟can口数据服务后,can客户端自动与以太网上的can服务端连接,建立通信通道,当应用程序对虚拟can口进行写操作时,can客户端通过网络连接将数据发送到can服务端,再从can服务端连接的物理can口将数据发送出去;当物理can口接收到数据时,can服务端从物理can口上读取数据,然后通过网络连接发送给can客户端,由can客户端将数据转发至虚拟can驱动,由虚拟can驱动转发给应用程序。In order to solve the technical problem, the technical solution adopted by the present invention is: an implementation method of virtual can port multiplexing technology based on edge cloud environment, including the following steps: S01), creating a virtual can port, the virtual can port includes Virtual can driver, can client and can server, one end of the virtual can driver is connected to the application, the other end is connected to the can client, the can client and the can server are connected through Ethernet, and the can server is connected to the physical can port; S02 ). Specify the application or client with the permission to modify the attributes of the can port through the permission profile, and decide whether to allow the application or client to modify the attributes of the can port according to the permission profile. If allowed, serve the can port according to the permission profile The client sends the can port attribute modification instruction to complete the modification of the can port attribute; S03). After the virtual can port data service is started in the virtual machine, the can client automatically connects with the can server on the Ethernet to establish a communication channel. When the program writes the virtual can port, the can client sends data to the can server through the network connection, and then sends the data out from the physical can port connected to the can server; when the physical can port receives data, the can service The terminal reads the data from the physical can port, and then sends it to the can client through a network connection. The can client forwards the data to the virtual can driver, and the virtual can driver forwards it to the application.
进一步的,一个虚拟can口与多个应用程序关联,即一个虚拟can口可以同时被多个应用程序使用。Further, a virtual can port is associated with multiple applications, that is, a virtual can port can be used by multiple applications at the same time.
进一步的,步骤S02具体为:当虚拟机内启动虚拟can口配置管理服务后,can客户端自动与以太网上的can服务端连接建立通信通道,连接建立后,can服务端向新连接的can客户端广播权限配置及can口属性信息,can客户端收到广播后判断自己是否有权限,若有权限,则根据应用程序配置的can口属性信息向can服务端发送修改属性指令,若没有权限,则记录can服务端广播的can口属性,后续即以此来进行can口通信;can服务端收到can客户端发送的can口属性修改指令,首先判断该can客户端是否有权限修改,若有权限,则修改can口属性,然后广播新的can口属性至所有连接的can客户端,若没有权限,则忽略该指令。Further, step S02 is specifically: when the virtual can port configuration management service is started in the virtual machine, the can client automatically connects with the can server on the Ethernet to establish a communication channel, and after the connection is established, the can server sends the newly connected can client The client broadcasts permission configuration and can port attribute information. After the can client receives the broadcast, it judges whether it has permission. If it has permission, it sends an attribute modification instruction to the can server according to the can port attribute information configured by the application. If there is no permission, Record the CAN port attributes broadcast by the can server, and then use this to communicate with the CAN port; the can server receives the can port attribute modification instruction sent by the can client, and first judges whether the can client has permission to modify it, if so Permission, modify the attributes of the can port, and then broadcast the new attributes of the can port to all connected can clients. If there is no permission, the command is ignored.
进一步的,步骤S03中,应用程序对虚拟can口进行写操作时,can客户端通过虚拟can驱动捕获应用程序发出的数据,然后通过网络连接将数据发送到can服务端。Further, in step S03, when the application program writes the virtual can port, the can client captures the data sent by the application program through the virtual can driver, and then sends the data to the can server through the network connection.
进一步的,通过TCP连接进行can客户端与can服务端之间的数据交互。Further, the data exchange between the can client and the can server is performed through the TCP connection.
进一步的,虚拟can口是一个利用底层设备驱动技术创建的、行为特性与传统can口一样但并无对应can口硬件的编程接口。Further, the virtual can port is a programming interface created by using the underlying device driver technology and has the same behavior characteristics as the traditional can port but without corresponding can port hardware.
进一步的,虚拟can口驱动设置为自启动。Further, the virtual can port driver is set to self-start.
本发明的有益效果:本发明提供一种虚拟can口,本虚拟can口在同一时间能被多个应用程序使用,并且本虚拟can口易于扩展,可以有效的解决传统物理can口信道容易出现堵塞从而导致数据出错、不一致、不可预测的问题。The beneficial effects of the present invention: the present invention provides a virtual can port, which can be used by multiple applications at the same time, and the virtual can port is easy to expand, which can effectively solve the problem that traditional physical can port channels are prone to blockage This leads to data errors, inconsistencies, and unpredictable problems.
附图说明Description of the drawings
附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention.
图1为虚拟can口的原理示意图;Figure 1 is a schematic diagram of the principle of a virtual can port;
图2为虚拟can口命令配置流程图;Figure 2 is a flow chart of virtual can port command configuration;
图3为虚拟can口数据转发流程图;Figure 3 is a flow chart of virtual CAN port data forwarding;
图4为虚拟can口多路复用转发流程图。Figure 4 is a flow chart of virtual can port multiplexing and forwarding.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施 例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
实施例1Example 1
边缘云场景多被应用在医疗保健、视频分析、车辆互联、移动大数据分析、海洋检测控制等终端层,由于物理can口设置同一时间只能供一个应用程序使用,这很大程度上限制的can口资源的使用,而且物理设备can口的扩展又十分的有限。Edge cloud scenarios are mostly applied to terminal layers such as healthcare, video analysis, vehicle interconnection, mobile big data analysis, ocean detection control, etc. Because the physical can port can only be used by one application at a time, this is largely restricted The use of can port resources, and the expansion of the can port of physical equipment is very limited.
针对此问题,本实施例公开一种基于边缘云环境的虚拟can口多路复用技术的实现方法,包括以下步骤:In response to this problem, this embodiment discloses a method for implementing virtual CAN port multiplexing technology based on an edge cloud environment, which includes the following steps:
S01)、创建虚拟can口S01), create a virtual can port
如图1所示,虚拟can口包括虚拟can驱动、can客户端和can服务端,虚拟can驱动一端与应用程序相连,另一端与can客户端相连,can客户端与can服务端通过以太网相连,can服务端连接物理can口(图1中,只示意出了物理can口的can驱动)。As shown in Figure 1, the virtual can port includes a virtual can driver, a can client, and a can server. One end of the virtual can driver is connected to the application, the other end is connected to the can client, and the can client is connected to the can server through the Ethernet. , The can server is connected to the physical can port (in Figure 1, only the can driver of the physical can port is shown).
本实施例中,所述虚拟can口是利用底层设备驱动技术创建的一个可供应用程序访问的编程接口,其行为特性与传统的物理can口一样,但计算机中并无对应的can口硬件。虚拟can口通常通过其他通讯方式与某一个物理can口关联,使应用程序对虚拟can口的访问映射为对物理can口的访问。本实施例中,所述通讯方式通过can客户端和can服务端实现。In this embodiment, the virtual can port is a programming interface that is created by using the underlying device driver technology and can be accessed by applications, and its behavior characteristics are the same as the traditional physical can port, but there is no corresponding can port hardware in the computer. The virtual can port is usually associated with a certain physical can port through other communication methods, so that the access of the application program to the virtual can port is mapped to the access to the physical can port. In this embodiment, the communication mode is implemented through the can client and the can server.
S02)、进行can口配置管理服务S02), can port configuration management service
can口配置管理服务通过权限配置文件指定有权限修改can口波特率等属性的应用程序或客户端,根据该权限配置文件决定是否允许应用程序或客户端来修改can口属性,若允许,则根据权限配置文件向can服务端发送can口属性修改指令,以完成can口属性的修改。The can port configuration management service specifies the application or client that has the permission to modify the can port baud rate and other attributes through the permission profile, and decides whether to allow the application or client to modify the can port attributes according to the permission profile. If allowed, then Send the can port attribute modification instruction to the can server according to the permission configuration file to complete the modification of the can port attribute.
具体如图2所示,当虚拟机内启动虚拟can口配置管理服务(can客户端)后,自动与以太网上的can口联网设备(can服务端)连接,建立通信通道(通过can客户端与can服务端建立通信)。连接建立后,can服务端向新连接can客户端广播权限配置及can口波特率等属性信息;can客户端收到广播后判断自己是否有权限,若有权限则根据应用程序配置的can口波特率等属性向can服务端发送修改属性指令,若没有权限则记录can服务端广播的can口属性,后续即以此来进行can口通信。若can服务端收到can客户端发送的can口属性修改指令,首先判断该can客户端是否有权限修改,若有权限则修改can口属性,然后广播新的can口属性至所有连接的can客户端,若没有权限则忽略该指令。Specifically, as shown in Figure 2, when the virtual can port configuration management service (can client) is started in the virtual machine, it will automatically connect with the can port networking device (can server) on the Ethernet to establish a communication channel (through the can client and Can server establish communication). After the connection is established, the can server broadcasts attribute information such as permission configuration and can port baud rate to the newly connected can client; the can client judges whether it has permission after receiving the broadcast, and if it has permission, it will be based on the can port configured by the application Attributes such as baud rate are sent to the can server to modify the attributes. If there is no permission, the attributes of the can port broadcast by the can server will be recorded, and the can port communication will be carried out subsequently. If the can server receives the can port attribute modification instruction sent by the can client, it first determines whether the can client has the authority to modify it, if it has the authority, it modifies the can port attribute, and then broadcasts the new can port attribute to all connected can clients If there is no permission, ignore the instruction.
S03)、进行can口数据通信服务S03), can port data communication service
can口数据通信服务基于can客户端和can服务端进行。The can port data communication service is based on the can client and the can server.
如图3所示,在虚拟机内启动虚拟can口数据服务(can客户端)后,自动与以太网上的can口联网设备(can服务端)连接,建立通信通道(通过can客户端与can服务端建立通信)。数据以can口配置管理服务配置的can口属性进行通信。当应用程序进行对虚拟can口的写操作时,can客户端通过虚拟驱动捕获应用程序发出的数据,然后通过TCP连接,将数据发到can服务端;can服务端收到数据后,将数据从物理can口设备发送出去。当物理can口设备接收到数据时,can服务端将从物理can口设备上读取数据,然后通过TCP连接发送给can客户端,然后由can客户端将数据转发至虚拟can口,由虚拟can口转发给应用程序。As shown in Figure 3, after starting the virtual can port data service (can client) in the virtual machine, it automatically connects with the CAN port networking device (can server) on the Ethernet to establish a communication channel (through the can client and the can service) Establish communication at the end). The data is communicated with the attributes of the can port configured by the can port configuration management service. When the application writes to the virtual can port, the can client captures the data sent by the application through the virtual driver, and then sends the data to the can server through the TCP connection; after the can server receives the data, it sends the data from The physical can port device sends it out. When the physical can port device receives data, the can server will read the data from the physical can port device, and then send it to the can client through the TCP connection, and then the can client forwards the data to the virtual can port, and the virtual can Forwarded to the application.
S04)、设置多路复用S04), set multiplexing
一个虚拟can口可以与多个应用程序关联。即一个虚拟can口可以同时被多个应用程序使用。A virtual can port can be associated with multiple applications. That is, a virtual can port can be used by multiple applications at the same time.
如图4所示,多路复用时,虚拟can口将各应用程序发送的数据复制,分别通过client、server(TCP/IP)发送给对应的can口联网设备,并通过物理can口将数据发送出去。对端虚拟can口收到数据后通过server、client(TCP/IP)发送给已连接的所有客户端及客户端对应的应用程序。As shown in Figure 4, when multiplexing, the virtual can port copies the data sent by each application, and sends it to the corresponding can port networking device through the client and server (TCP/IP), and sends the data through the physical can port. Send it out. After receiving the data through the server and client (TCP/IP), the virtual CAN port of the opposite end sends the data to all connected clients and the corresponding applications of the client.
本实施例中,采用can口工具testCan对虚拟can口进行测试验证。In this embodiment, the can port tool testCan is used to test and verify the virtual can port.
本实施例提供一种虚拟can口,本虚拟can口在同一时间能被多个应用程序使用,并且本虚拟can口可以连接不同的应用程序并与不同的物理can口相关联,易于扩展,可以有效的解决传统物理can口信道容易出现堵塞从而导致数据出错、不一致、不可预测的问题。This embodiment provides a virtual can port, the virtual can port can be used by multiple applications at the same time, and the virtual can port can be connected to different applications and associated with different physical can ports, easy to expand, can Effectively solve the problem that the traditional physical CAN port channel is prone to blockage, which leads to data errors, inconsistencies, and unpredictability.
最后应说明的是:以上所述仅为本发明的优选实施例而已,并不用于限制本发明,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员来说,其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。Finally, it should be noted that the above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, it is still for those skilled in the art. The technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalently replaced. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

  1. 一种基于边缘云环境的虚拟can口多路复用技术的实现方法,其特征在于:包括以下步骤:S01)、创建虚拟can口,虚拟can口包括虚拟can驱动、can客户端和can服务端,虚拟can驱动一端与应用程序相连,另一端与can客户端相连,can客户端与can服务端通过以太网相连,can服务端连接物理can口;S02)、通过权限配置文件指定有权限修改can口属性的应用程序或客户端,根据该权限配置文件决定是否允许应用程序或客户端来修改can口属性,若允许,则根据权限配置文件向can服务端发送can口属性修改指令,以完成can口属性的修改;S03)、在虚拟机内启动虚拟can口数据服务后,can客户端自动与以太网上的can服务端连接,建立通信通道,当应用程序对虚拟can口进行写操作时,can客户端通过网络连接将数据发送到can服务端,再从can服务端连接的物理can口将数据发送出去;当物理can口接收到数据时,can服务端从物理can口上读取数据,然后通过网络连接发送给can客户端,由can客户端将数据转发至虚拟can驱动,由虚拟can驱动转发给应用程序。A method for implementing virtual can port multiplexing technology based on an edge cloud environment is characterized in that it includes the following steps: S01), creating a virtual can port, the virtual can port including a virtual can driver, a can client, and a can server One end of the virtual can driver is connected to the application program, the other end is connected to the can client, the can client is connected to the can server through the Ethernet, and the can server is connected to the physical can port; S02), the permission to modify the can is specified through the permission configuration file The application or client with port attributes determines whether to allow the application or client to modify the attributes of the can port according to the permission profile. If allowed, it sends the can port attribute modification instruction to the can server according to the permission profile to complete the can Modification of port attributes; S03). After starting the virtual can port data service in the virtual machine, the can client automatically connects with the can server on the Ethernet to establish a communication channel. When the application writes to the virtual can port, the can The client sends data to the can server through the network connection, and then sends the data out from the physical can port connected to the can server; when the physical can port receives the data, the can server reads the data from the physical can port, and then through The network connection is sent to the can client, and the can client forwards the data to the virtual can driver, and the virtual can driver forwards it to the application.
  2. 根据权利要求1所述的基于边缘云环境的虚拟can口多路复用的实现方法,其特征在于:一个虚拟can口与多个应用程序关联,即一个虚拟can口可以同时被多个应用程序使用。The method for implementing virtual can port multiplexing based on an edge cloud environment according to claim 1, characterized in that: a virtual can port is associated with multiple applications, that is, a virtual can port can be used by multiple applications at the same time. use.
  3. 根据权利要求1所述的基于边缘云环境的虚拟can口多路复用的实现方法,其特征在于:步骤S02具体为:当虚拟机内启动虚拟can口配置管理服务后,can客户端自动与以太网上的can服务端连接建立通信通道,连接建立后,can服务端向新连接的can客户端广播权限配置及can口属性信息,can客户端收到广播后判断自己是否有权限,若有权限,则根据应用程序配置的can口属性信息向can服务端发送修改属性指令,若没有权限,则记录can服务端广播的can口属性,后续即以此来进行can口通信;can服务端收到can客户端发送的can口属性修改指令,首先判断该can客户端是否有权限修改,若有权限,则修改can口属性,然后广播新的can口属性至所有连接的can客户端,若没有权限,则忽略该指令。The method for implementing virtual can port multiplexing based on an edge cloud environment according to claim 1, wherein step S02 is specifically: when the virtual can port configuration management service is started in the virtual machine, the can client automatically communicates with The can server on the Ethernet connects to establish a communication channel. After the connection is established, the can server broadcasts the permission configuration and can port attribute information to the newly connected can client. After the can client receives the broadcast, it judges whether it has permission, and if it has permission , According to the attribute information of the can port configured by the application program, send the attribute modification instruction to the can server. If there is no permission, record the attributes of the can port broadcast by the can server, and then use this to communicate with the can port; the can server receives The can port attribute modification instruction sent by the can client firstly determines whether the can client has the permission to modify, if it has permission, modify the can port attribute, and then broadcast the new can port attribute to all connected can clients, if there is no permission , The instruction is ignored.
  4. 根据权利要求1所述的基于边缘云环境的虚拟can口多路复用的实现方法,其特征在于:步骤S03中,应用程序对虚拟can口进行写操作时,can客户端通过虚拟can驱动捕获应用程序发出的数据,然后通过网络连接将数据发送到can服务端。The method for implementing virtual can port multiplexing based on an edge cloud environment according to claim 1, characterized in that: in step S03, when the application program writes to the virtual can port, the can client drives the capture through the virtual can The data sent by the application program is then sent to the can server through the network connection.
  5. 根据权利要求1或4所述的基于边缘云环境的虚拟can口多路复用的实现方法,其特征在于:通过TCP连接进行can客户端与can服务端之间的数据交互。The method for implementing virtual CAN port multiplexing based on an edge cloud environment according to claim 1 or 4, wherein the data interaction between the can client and the can server is performed through a TCP connection.
  6. 根据权利要求1所述的基于边缘云环境的虚拟can口多路复用的实现方法,其特征在于:虚拟can口是一个利用底层设备驱动技术创建的、行为特性与传统can口一样但并无对应can口硬件的编程接口。The method for implementing virtual can port multiplexing based on an edge cloud environment according to claim 1, characterized in that: the virtual can port is created by using the underlying device driver technology and has the same behavior characteristics as the traditional can port but no Corresponding to the programming interface of the CAN port hardware.
  7. 根据权利要求1所述的基于边缘云环境的虚拟can口多路复用的实现方法,其特征在于:虚拟can口驱动设置为自启动。The method for implementing virtual can port multiplexing based on an edge cloud environment according to claim 1, wherein the virtual can port driver is set to self-start.
PCT/CN2020/098661 2020-01-09 2020-06-29 Virtual can port multiplexing technology implementation method based on edge cloud environment WO2021139099A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010019898.2A CN111131520B (en) 2020-01-09 2020-01-09 Method for realizing virtual can mouth multiplexing technology based on edge cloud environment
CN202010019898.2 2020-01-09

Publications (1)

Publication Number Publication Date
WO2021139099A1 true WO2021139099A1 (en) 2021-07-15

Family

ID=70487459

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098661 WO2021139099A1 (en) 2020-01-09 2020-06-29 Virtual can port multiplexing technology implementation method based on edge cloud environment

Country Status (2)

Country Link
CN (1) CN111131520B (en)
WO (1) WO2021139099A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131520B (en) * 2020-01-09 2021-06-01 山东超越数控电子股份有限公司 Method for realizing virtual can mouth multiplexing technology based on edge cloud environment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130120893A (en) * 2012-04-26 2013-11-05 주식회사 케이티 System and method for providing cloud computing service using virtual machine
CN103414605A (en) * 2013-08-14 2013-11-27 上海兆民云计算科技有限公司 Desktop cloud monitoring method based on exchange gateway
EP3007408B1 (en) * 2014-10-08 2017-04-26 Korea Advanced Institute of Science and Technology Service method for managing transactions using application properties and system therefor
CN110365521A (en) * 2019-06-18 2019-10-22 上海电器科学研究所(集团)有限公司 Equipment remote debugging method based on cloud gateway in a kind of novel maintenance system
CN111131520A (en) * 2020-01-09 2020-05-08 山东超越数控电子股份有限公司 Method for realizing virtual can mouth multiplexing technology based on edge cloud environment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000052706A2 (en) * 1999-02-26 2000-09-08 Siemens Aktiengesellschaft Method of transmitting ethernet frames
CN101488941A (en) * 2008-01-18 2009-07-22 中兴通讯股份有限公司 Method and system for implementing USB equipment shared using
CN102255800B (en) * 2011-06-24 2014-04-02 中国人民解放军国防科学技术大学 Method for converting data format between IP (Internet Protocol) data packages on CAN (Control Area Network) bus and CAN messages
CN109684148B (en) * 2018-11-08 2022-03-15 中国航空工业集团公司洛阳电光设备研究所 Airborne embedded software virtual bus communication construction method based on ARINC653

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130120893A (en) * 2012-04-26 2013-11-05 주식회사 케이티 System and method for providing cloud computing service using virtual machine
CN103414605A (en) * 2013-08-14 2013-11-27 上海兆民云计算科技有限公司 Desktop cloud monitoring method based on exchange gateway
EP3007408B1 (en) * 2014-10-08 2017-04-26 Korea Advanced Institute of Science and Technology Service method for managing transactions using application properties and system therefor
CN110365521A (en) * 2019-06-18 2019-10-22 上海电器科学研究所(集团)有限公司 Equipment remote debugging method based on cloud gateway in a kind of novel maintenance system
CN111131520A (en) * 2020-01-09 2020-05-08 山东超越数控电子股份有限公司 Method for realizing virtual can mouth multiplexing technology based on edge cloud environment

Also Published As

Publication number Publication date
CN111131520A (en) 2020-05-08
CN111131520B (en) 2021-06-01

Similar Documents

Publication Publication Date Title
WO2021143462A1 (en) Front end processor-based data exchange system and method
CN107634984B (en) File synchronization method based on one-way transmission channel
CN111158865A (en) Method for realizing multiplexing virtual serial port
WO2021135950A1 (en) Data management method and system, associated subsystem and computer readable medium
KR20050003346A (en) Network attached storage snmp single system image
WO2021223454A1 (en) Screen projection method and system
CN110636127B (en) Communication processing method and system between information data
CN104184663A (en) Communication method and device based on software-defined network and integrated identification network
CN105607606B (en) A kind of data acquisition device and method based on double mainboard frameworks
CN112073212B (en) Parameter configuration method, device, terminal equipment and storage medium
CN107682460A (en) A kind of distributed storage trunked data communication method and system
WO2021139099A1 (en) Virtual can port multiplexing technology implementation method based on edge cloud environment
CN102833092A (en) Method and system for managing cloud nodes and central server
CN115348126A (en) Network target range entity equipment access method, device and implementation system
CN112351106B (en) Service grid platform containing event grid and communication method thereof
CN104468232A (en) Method and system for using xml file and mib to complete network device configuration
CN108632075B (en) Method and device for programming video network terminal
CN111711532B (en) Unified management method for heterogeneous network equipment
WO2019100364A1 (en) Dynamic resource allocation method in cloud video platform
CN112422395A (en) Data transmission method, device, terminal equipment and storage medium
CN110708209A (en) Virtual machine flow acquisition method and device, electronic equipment and storage medium
US7548966B2 (en) Multi-layer user management method for multicasting proxy
CN109413142A (en) A kind of iSCSI virtual protocol implementation method under Linux
CN111880769B (en) Abstract description method suitable for Internet of things application system interface and application thereof
CN113836223A (en) Heterogeneous database data synchronization method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20912303

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20912303

Country of ref document: EP

Kind code of ref document: A1