[go: up one dir, main page]

CN114553373A - Data transmission method, device, equipment and storage medium - Google Patents

Data transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN114553373A
CN114553373A CN202210169950.1A CN202210169950A CN114553373A CN 114553373 A CN114553373 A CN 114553373A CN 202210169950 A CN202210169950 A CN 202210169950A CN 114553373 A CN114553373 A CN 114553373A
Authority
CN
China
Prior art keywords
data
data transmission
frame
flow control
transmission device
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.)
Granted
Application number
CN202210169950.1A
Other languages
Chinese (zh)
Other versions
CN114553373B (en
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202210169950.1A priority Critical patent/CN114553373B/en
Publication of CN114553373A publication Critical patent/CN114553373A/en
Application granted granted Critical
Publication of CN114553373B publication Critical patent/CN114553373B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0078Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application is applicable to the technical field of data transmission, and provides a data transmission method, a data transmission device, data transmission equipment and a storage medium. After receiving the first frame of data sent by the data sending device, the first data transmission device may return the proxy flow control frame to the data sending device according to the collision judgment result, and send the first frame of data to the second data transmission device; the second data transmission equipment sends the first frame data to the data receiving equipment, receives the target flow control frame sent by the data receiving equipment, and then returns the target flow control frame to the first data transmission equipment when the first frame data corresponding to the target flow control frame exists; and then the first data transmission equipment sends the target flow control frame to the data sending equipment, and the data sending equipment sends the continuous frame of the target data to the first data transmission equipment according to the target flow control frame and sends the continuous frame of the target data to the data receiving equipment through the second data transmission equipment so as to ensure that the remote data transmission is successfully completed.

Description

Data transmission method, device, equipment and storage medium
Technical Field
The present application belongs to the field of data transmission technologies, and in particular, to a data transmission method, apparatus, device, and storage medium.
Background
Remote data transmission is very time-delay demanding, typically requiring response times of no more than 55 ms, and transmission fails upon timeout. To solve this problem, the data transmission device will replace the flow control frame data in the remote data transmission to avoid response time timeout. However, in practical applications, it is found that when the data transmission device replaces the flow control frame data, it is difficult to avoid that the preset can id conflicts to replace the wrong flow control frame data, thereby causing a failure in remote data transmission.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a data transmission device, data transmission equipment and a storage medium, which can solve the technical problem that remote data transmission fails due to the fact that false flow control frame data is generated due to the fact that preset can ids conflict.
A first aspect of an embodiment of the present application provides a data transmission method, where the method is applied to a data transmission system, where the data transmission system includes a data sending device, a first data transmission device, a second data transmission device, and a data receiving device, where the data sending device is connected to the first data transmission device, the first data transmission device is connected to the second data transmission device, and the second data transmission device is connected to the data receiving device, and the method includes:
the first data transmission equipment receives the first frame data of the target data sent by the data sending equipment;
the first data transmission equipment judges whether the request can id of the first frame data is matched with a preset response can id; if the first frame data is matched with the second frame data, further judging whether the matched response canids have conflict, returning a proxy flow control frame to the data sending equipment according to a conflict judgment result, and sending the first frame data to the second data transmission equipment;
the second data transmission equipment caches the first frame data, then sends the first frame data to the data receiving equipment, and receives a target flow control frame sent by the data receiving equipment; judging whether the response can id of the target flow control frame is matched with a preset request can id, if so, further determining whether corresponding first frame data exists, and if so, returning the target flow control frame to the first data transmission equipment;
the first data transmission device sends the target flow control frame to the data sending device;
and the data sending equipment sends continuous frames of target data to the first data transmission equipment according to the target flow control frames and sends the continuous frames of the target data to the data receiving equipment through the second data transmission equipment.
A second aspect of the embodiments of the present application provides a data transmission method, where the method is applied to a first data transmission device, the first data transmission device is connected to a data sending device, the first data transmission device is connected to a second data transmission device, and the second data transmission device is connected to a data receiving device, and the method includes:
receiving first frame data of target data sent by the data sending equipment;
judging whether the request can id of the first frame data is matched with a preset response can id;
if so, further judging whether the matched answer can ids have conflict or not;
returning the agent flow control frame to the data sending equipment according to the conflict judgment result;
sending the first frame data to the second data transmission equipment, wherein the first frame data is cached by the second data transmission equipment and then sent to the data receiving equipment;
receiving a target flow control frame; the target flow control frame is sent to the second data transmission device by the data receiving device according to the first frame data, and when the second data transmission device judges that a response can id of the target flow control frame matches a preset request can id, the second data transmission device further determines that corresponding first frame data exists and sends the corresponding first frame data to the first data transmission device;
transmitting the target flow control frame to the data transmission device;
and receiving continuous frames of target data sent by the sending equipment according to the target flow control frames, and sending the continuous frames of the target data to the second data transmission equipment so as to send the continuous frames of the target data to the data receiving equipment through the second data transmission equipment.
A third aspect of the embodiments of the present application provides a data transmission method, where the method is applied to a second data transmission device, the second data transmission device is connected to a data receiving device, the second data transmission device is connected to a first data transmission device, and the first data transmission device is connected to a data sending device, and the method includes:
receiving first frame data of target data sent by the first data transmission equipment, wherein the first frame data is sent to the first data transmission equipment by the data sending equipment;
caching the first frame data;
sending the first frame data to the data receiving equipment;
receiving a target flow control frame sent by the data receiving equipment based on the first frame data;
judging whether the response can id of the target flow control frame is matched with a preset request can id, and if so, further determining whether corresponding first frame data exists;
if yes, returning the target flow control frame to the first data transmission equipment;
receiving continuous frames of target data sent by the first data transmission equipment, wherein the continuous frames are sent to the first data transmission equipment by the data sending equipment according to the target flow control frames after the data sending equipment receives the target flow control frames sent by the first data transmission equipment;
sending successive frames of the target data to the data receiving device.
A data transmission apparatus provided in a fourth aspect of the embodiments of the present application, where the apparatus is configured in a first data transmission device, the first data transmission device is connected to a data sending device, the first data transmission device is connected to a second data transmission device, and the second data transmission device is connected to a data receiving device, the apparatus includes:
a first frame data receiving unit, configured to receive first frame data of target data sent by the data sending device; a first frame data query unit, configured to determine whether a request can id of the first frame data matches a preset response can id; a conflict detection unit for further judging whether a conflict exists in the matched response can id if the matching is performed; the proxy flow control unit is used for returning a proxy flow control frame to the data sending equipment according to the conflict judgment result; a first frame data sending unit, configured to send the first frame data to the second data transmission device, where the first frame data is cached by the second data transmission device and then sent to the data receiving device; a target flow control frame receiving unit, configured to receive a target flow control frame; the target flow control frame is sent to the second data transmission device by the data receiving device according to the first frame data, and when the second data transmission device judges that a response can id of the target flow control frame matches a preset request can id, the second data transmission device further determines that corresponding first frame data exists and sends the corresponding first frame data to the first data transmission device; a target flow control frame sending unit, configured to send the target flow control frame to the data sending device; and the continuous frame processing unit is used for receiving continuous frames of target data sent by the sending equipment according to the target flow control frame and sending the continuous frames of the target data to the second data transmission equipment so as to enable the continuous frames of the target data to be sent to the data receiving equipment through the second data transmission equipment.
A data transmission apparatus provided in a fifth aspect of an embodiment of the present application, where the apparatus is configured in a second data transmission device, the second data transmission device is connected to a data receiving device, the second data transmission device is connected to a first data transmission device, the first data transmission device is connected to a data sending device, and the apparatus includes:
a first frame data receiving unit, configured to receive first frame data of target data sent by the first data transmission device, where the first frame data is sent to the first data transmission device by the data sending device; a buffer unit, configured to buffer the first frame data; a first frame data transmitting unit, configured to transmit the first frame data to the data receiving device; a target flow control frame receiving unit, configured to receive a target flow control frame sent by the data receiving device based on the first frame data; a can id matching unit, configured to determine whether a response can id of the target flow control frame matches a preset request can id, and if so, further determine whether corresponding first frame data exists; a target stream control frame sending unit, configured to return the target stream control frame to the first data transmission device if the target stream control frame exists; a continuous frame receiving unit, configured to receive a continuous frame of target data sent by the first data transmission device, where the continuous frame is sent to the first data transmission device according to the target flow control frame after the data sending device receives the target flow control frame sent by the first data transmission device; a continuous frame transmitting unit configured to transmit continuous frames of the target data to the data receiving apparatus.
A sixth aspect of the embodiments of the present application provides a data transmission device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the above method when executing the computer program.
A seventh aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the above method.
An eighth aspect of the embodiments of the present application provides a computer program product, which when running on a data transmission device, causes the data transmission device to implement the steps of the method when executed.
In the embodiment of the application, after receiving the first frame of data sent by the data sending device, the first data transmission device may return the proxy flow control frame to the data sending device according to the collision determination result, and send the first frame of data to the second data transmission device; the second data transmission equipment sends the first frame data to the data receiving equipment, receives the target flow control frame sent by the data receiving equipment, and then returns the target flow control frame to the first data transmission equipment when the first frame data corresponding to the target flow control frame exists; and then the first data transmission equipment sends the target flow control frame to the data sending equipment, the data sending equipment sends the continuous frame of the target data to the first data transmission equipment according to the target flow control frame and sends the continuous frame of the target data to the data receiving equipment through the second data transmission equipment, so that the first data transmission equipment can feed back the correct flow control frame data to the data sending equipment, the data receiving equipment can receive the first frame data and the continuous frame, and the problem of remote data transmission failure caused by the fact that the preset can id conflicts to reply the wrong proxy flow control frame is avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic structural diagram of a data transmission system provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a first implementation of a data transmission method according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a remote diagnosis system provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of a second implementation of a data transmission method according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a third implementation of a data transmission method according to an embodiment of the present application;
fig. 6 is a schematic diagram of a first structure of a data transmission device according to an embodiment of the present application;
fig. 7 is a second structural schematic diagram of a data transmission device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a data transmission device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall be protected by the present application.
When data transmission is performed between a data sending device and a data receiving device, since there may be a device without telecommunication capability in the two devices, or in order to meet the requirement of a data transmission protocol, remote data transmission is often assisted by the data transmission device connected with the two devices as an intermediary.
In the process of remote data transmission, when the data sending device sends the first frame of data, the data sending device needs to receive the flow control frame data sent by the data receiving device, and then the data sending device continues to send the continuous frames corresponding to the first frame of data. Considering the problem of transmission delay, it is generally required that the response time from the time when the first frame of data is sent to the time when the flow control frame data is received does not exceed a time threshold (for example, 55 ms), and if the response time is exceeded, the response time is invalid. In order to avoid timeout, the data transmission device needs to reply the proxy flow control frame to solve the problem, that is, the data transmission device queries a response can id corresponding to the request can id of the first-visit data in the configuration file, and then sends flow control frame data associated with the response can id to the data sending device instead of the data receiving device.
Each pair of can ids used between each type of data sending device (or data transmission device) and the other end is unique. In practical applications, when a configuration file is written, a series of data transmission devices (or data transmission devices) generally correspond to the same configuration file, and the series of data transmission devices (or data transmission devices) may include multiple types of data transmission devices (or data transmission devices). Therefore, it is inevitable that a plurality of corresponding response canids appear for the same request can id, that is, a problem of bus id collision occurs. This will cause an error in the proxy flow control frame returned by the data transmission device, and the data receiving device cannot receive the continuous frame corresponding to the first frame of data.
Taking the data sending device as the diagnostic device and the data receiving device as the vehicle as an example, when the vehicle or the diagnostic device sends the first frame of data, it needs to receive the flow control frame data sent by the other end, and then it will continue to send the continuous frame corresponding to the first frame of data. For remote diagnosis, even if the data transmission devices all adopt wired ethernet transmission, it is difficult to ensure that the time delay does not exceed 55 ms, and even if the data transmission devices connected to the vehicle do not necessarily have ethernet, wireless connections such as WIFI or 5G are likely to be used.
The pair of can ids used between the vehicle of each vehicle type and the diagnostic apparatus is unique. For the convenience of users, a certain brand or a certain vehicle family will share a configuration file, and the configuration file may include tens, hundreds, or even hundreds of mapping relationships, which respectively correspond to different vehicle types. Each mapping has a pair of matching request can id and response can id. In this case, there is a problem that a plurality of response canids are often found in the same request can id, that is, a bus id collision occurs.
For example, the diagnostic device sends the first frame data of which the requested can id is 0x0632, the can id required to be responded to the a vehicle type is 0x0486, the can id required to be responded to the B vehicle type is 0x05B2, and the data transmission device does not know what vehicle type actually is, so that it is not known which proxy flow control frame corresponding to the can id should be replied, and if the response can id corresponding to the replied proxy flow control frame is wrong, the data transmission device will not reply to the continuous frames, resulting in failure of diagnosis.
Similarly, when the opposite end receives the actual flow control frame, finding the continuous frame corresponding to the can id in the buffer area will also encounter the same problem, resulting in that the correct continuous frame cannot be found, and further causing the failure of diagnosis.
In view of the above problems, it is not possible to configure a configuration file for each vehicle model, which results in too many configuration files and is difficult for manufacturers to maintain and manage. For the user, the user can easily select the wrong configuration file in the using process.
In order to solve the above problem, fig. 1 shows a schematic structural diagram of a data transmission system provided in an embodiment of the present application, where the data transmission system includes a data sending device, a first data transmission device, a second data transmission device, and a data receiving device.
The data transmission device is connected with the first data transmission device, the first data transmission device is connected with the second data transmission device, and the second data transmission device is connected with the data receiving device.
It should be noted that the connection mode between the above devices may be selected according to actual situations. In some specific embodiments, the data sending device and the first data transmission device and the second data transmission device and the data receiving device may be communicatively connected by close-range communication, and the first data transmission device and the second data transmission device may be communicatively connected by remote communication.
In the embodiment of the present application, a data interaction process between the devices in the data transmission system is shown in fig. 2, and specifically includes the following steps S201 to S205.
In step S201, the first data transmission device receives the first frame data of the target data sent by the data sending device.
The target data refers to data which is required to be sent to the data receiving device by the data sending device. In an embodiment of the present application, the target data may include multiple frames of data, and each frame of data may include multiple bytes, for example, 8 bytes, where the first frame of data may refer to the first frame of data of the target data.
In the embodiment of the present application, the data sending device needs to send the first frame of data of the target data to the first data transmission device, and after the data sending device receives the correct flow control frame, the remaining continuous frames in the target data are sent to the first data transmission device, and then the complete target data are transmitted to the data receiving device through the first transmission device.
Step S202, the first data transmission equipment judges whether the request can id of the first frame data is matched with a preset response can id; and if the answer canids are matched, further judging whether the matched answer canids have conflict, returning the proxy flow control frame to the data sending equipment according to a conflict judgment result, and sending the first frame data to the second data transmission equipment.
The CAN id may be carried in a message frame in a data transmission process, and is used to identify a message frame that each node needs to acquire when transmitting on the CAN bus. That is, a node (e.g., the first data transmission device) on the CAN bus CAN obtain the message frame of the CAN id that should be taken on the bus.
In the embodiment of the application, the first data transmission device needs to return the proxy flow control frame to the data sending device after receiving the first frame of data, where the proxy flow control frame is a flow control frame sent to the data sending device instead of the data receiving device, and thus, the data sending device can avoid receiving the target flow control frame returned by the data receiving device and being overtime.
When the first data transmission device returns the proxy flow control frame, it needs to search according to the request can id of the first frame data. Specifically, in the embodiment of the present application, the first data transmission device may determine whether the request can id of the first frame data matches the preset response can id. The preset response can id is a response can id corresponding to the request can id in a pair of can ids respectively used by the two devices in the data interaction process, which are acquired in advance.
If the request can id of the first frame data is not matched with the preset response can id, it indicates that the first frame data is data which does not need to return the proxy flow control frame, at this time, the first data transmission device may directly transmit the first frame data to the data receiving device, that is, transmit the first frame data to the second data transmission device, and transmit the first frame data to the data receiving device by the second data transmission device.
If the request can id of the first frame data is matched with the preset response can id, it indicates that the first frame data is data which needs to return the proxy flow control frame, and the first data transmission device needs to further judge whether the matched response can id has a conflict, so as to return the proxy flow control frame to the data transmission device according to the conflict judgment result.
And the first data transmission device also needs to send the first frame data to the second data transmission device so that the second data transmission device responds to the first frame data.
Step S203, the second data transmission device caches the first frame data, then sends the first frame data to the data receiving device, and receives the target flow control frame sent by the data receiving device; and judging whether the response can id of the target flow control frame is matched with the preset request can id, if so, further determining whether corresponding first frame data exists, and if so, returning the target flow control frame to the first data transmission equipment.
In an embodiment of the present application, the second data transmission device may buffer the first frame of data, and then send the first frame of data to the data receiving device. And after receiving the first frame data, the data receiving equipment sends a target flow control frame for responding to the first frame data to the second data transmission equipment. Wherein, the target flow control frame is the flow control frame which should reply the data sending device actually.
After receiving the target flow control frame sent by the data receiving device, the second data transmission device needs to determine whether the response can id of the target flow control frame matches with the preset request can id.
The preset request can id is a request can id corresponding to a response can id in a pair of pre-acquired can ids used by the two devices respectively in the data interaction process.
If the response can id of the target flow control frame is not matched with the preset request can id, it indicates that the target flow control frame does not have the first frame data corresponding to the target flow control frame, and the first data transmission device can directly transmit the target flow control frame to the first data transmission device. That is, the target flow control frame is transmitted to the first data transmission device, and the first data transmission device transmits the target flow control frame to the data sending device.
If the response can id of the target flow control frame matches the preset request can id, it needs to further determine whether there is corresponding first frame data. That is, it is determined whether there is first frame data having the same request can id as the matching request can id in the buffered first frame data.
If the corresponding first frame data does not exist, it indicates that an error occurs in the communication process, the target flow control frame is invalid data, the second data transmission device can discard the target flow control frame data, end the transmission process, and notify the data transmission device to restart the data transmission process through the first data transmission device.
If the corresponding first frame data exists, the target flow control frame is the actual flow control frame which needs to be returned in response to the first frame data, so that the second data transmission device can return the target flow control frame to the first data transmission device.
Step S204, the first data transmission device sends the target flow control frame to the data sending device.
That is, after receiving the target flow control frame that should actually answer the data sending device, the first data transmission device may send the target flow control frame to the data sending device.
Step S205, the data sending device sends the continuous frames of the target data to the first data transmission device according to the target flow control frame, and sends the continuous frames of the target data to the data receiving device via the second data transmission device.
In the embodiment of the present application, since the target stream control frame is the stream control frame that should be actually responded to the data sending device, when the data sending device receives the target stream control frame, the data sending device sends a continuous frame of the target data to the first data transmission device according to the target stream control frame, and the continuous frame is sent to the data receiving device through the second data transmission device, at this time, the data receiving device receives the first frame data and the continuous frame, and obtains the complete target data.
In the embodiment of the application, after receiving the first frame of data sent by the data sending device, the first data transmission device may return the proxy flow control frame to the data sending device according to the collision determination result, and send the first frame of data to the second data transmission device; the second data transmission equipment sends the first frame data to the data receiving equipment, receives the target flow control frame sent by the data receiving equipment, and then returns the target flow control frame to the first data transmission equipment when the first frame data corresponding to the target flow control frame exists; and then the first data transmission equipment sends the target flow control frame to the data sending equipment, the data sending equipment sends the continuous frame of the target data to the first data transmission equipment according to the target flow control frame and sends the continuous frame of the target data to the data receiving equipment through the second data transmission equipment, so that the first data transmission equipment can feed back the correct flow control frame data to the data sending equipment, the data receiving equipment can receive the first frame data and the continuous frame, and the problem of remote data transmission failure caused by the fact that the preset can id conflicts to reply the wrong proxy flow control frame is avoided.
In some embodiments of the present application, as shown in fig. 3, the data transmission system may be a remote diagnosis system for performing remote diagnosis on the vehicle.
Wherein, the data transmitting device and the data receiving device may be a vehicle and a diagnostic device, respectively. The vehicle may transmit data such as temperature and tire pressure as target data to the diagnostic device, and in this case, the vehicle is a data transmitting device and the diagnostic device is a data receiving device. The diagnostic device may send a diagnostic result obtained by data analysis to the vehicle as target data, where the diagnostic device is a data sending device and the vehicle is a data receiving device.
The first data transmission device and the second data transmission device may be devices with obd (on Board diagnostics) connectors, and can be connected to the vehicle or the diagnostic device to transmit data of the vehicle or the diagnostic device to the other end. The two data transmission devices may be identical or different in structure and function.
In fig. 3, the terminal B is a data transmission device connected to the diagnostic device, and the terminal C is a data transmission device connected to the diagnostic device. Correspondingly, if the diagnosis device is a data sending device, the terminal B is a first data transmission device, and the terminal C is a second data transmission device. And if the vehicle is a data sending device, the terminal C is a first data transmission device, and the terminal B is a second data transmission device.
The data transmission system can further comprise a cloud platform, wherein the cloud platform can be a cloud server and can realize data transmission between the first data transmission device and the second data transmission device.
Referring to fig. 2 and fig. 3, a data transmission process of the present application is described by taking a remote diagnosis system as an example. Assuming that the diagnostic device sends the first frame data with the request can id of 0x04E8, the B-end header determines that the response can id conflicts, and the matching response identifiers are: 0x06C8 and 0x07C 8. At this time, the B-end connector may return the proxy flow control frame to the diagnostic device according to the result of the collision determination, and then send the first frame data to the C-end connector. After the C-end connector caches the first frame data, the first frame data can be sent to the vehicle so as to receive the target flow control frame sent by the vehicle. And the C-end connector returns the target flow control frame to the B-end connector according to the target flow control frame if the matched request can id and the corresponding first frame data exist, the B-end connector sends the continuous frames of the target data to the C-end connector according to the target flow control frame and sends the continuous frames of the target data to the vehicle through the C-end connector, and the vehicle can finally receive the first frame data and the continuous frames of the target data.
The vehicle can also send the first frame of data and consecutive frames of target data to the diagnostic device in the same manner. Furthermore, data transmission interaction can be completed between the vehicle and the diagnosis equipment, and remote diagnosis is realized.
In order to more clearly explain the technical solution of the present application, the following description is made by taking the first transmission device of the data transmission system as a main body and through a specific embodiment.
Fig. 4 is a schematic diagram illustrating an implementation flow of a data transmission method provided in an embodiment of the present application, where the method may be applied to a first data transmission device and is applicable to a situation that a data receiving device needs to be solved and cannot receive a continuous frame corresponding to a first frame of data.
The first data transmission equipment is connected with the data sending equipment, the first data transmission equipment is connected with the second data transmission equipment, and the second data transmission equipment is connected with the data receiving equipment.
Specifically, the data transmission method may include the following steps S401 to S408.
Step S401, receives the first frame data of the target data sent by the data sending device.
Step S402, determine whether the request can id of the first frame data matches the preset response can id.
In step S403, if there is a match, it is further determined whether there is a conflict in the matched response can id.
And step S404, returning the proxy flow control frame to the data sending equipment according to the collision judgment result.
Step S405, sending the first frame data to the second data transmission device.
And the first frame data is cached by the second data transmission equipment and then is sent to the data receiving equipment.
Step S406, receiving a target flow control frame.
And when the second data transmission equipment judges that the response can id of the target flow control frame is matched with the preset request can id, the second data transmission equipment further determines that the corresponding first frame data exists and then transmits the first frame data to the first data transmission equipment.
Step S407, transmits the target flow control frame to the data transmission apparatus.
Step S408, receiving the continuous frames of the target data sent by the sending device according to the target flow control frame, and sending the continuous frames of the target data to the second data transmission device, so that the continuous frames of the target data are sent to the data receiving device via the second data transmission device.
It should be noted that, reference may be made to the description of fig. 1 for the implementation process of step S401 to step S408, which is not described herein again.
In some embodiments of the present application, the determining whether the request can id of the first frame data matches the preset response can id may specifically include: and traversing a preset first configuration file, and judging whether a corresponding response can id exists in the request can id of the first frame data according to the first mapping relation. If the request can id of the first frame data exists, the request can id of the first frame data is judged to be matched with a preset response can id; if not, the request can id of the first frame data is judged not to match the preset response can id.
Wherein the first configuration file may be retrieved by the first data transfer device from a cloud server or a local storage. The first configuration file includes a first mapping of request can ids and answer can ids.
That is, the preset answer can id is the answer can id recorded in the first configuration file. The first data transmission device may traverse the first mapping relationship recorded in the first configuration file, and query whether there is a response can id matching the request can id according to the request can id of the first frame data.
For example, the first mapping relationship may be in the form of:
<CAN_LEN>2</CAN_LEN>
<CAN_C_ID>0x05B7</CAN_C_ID>
<CAN_C_FC>3008000000000000</CAN_C_FC>
<CAN_B_ID>0x0637</CAN_B_ID>
<CAN_B_FC>3008000000000000</CAN_B_FC>;
the first mapping relationship indicates that if the C-end connector receives the first frame data of which the request can id is 0x05B7, the corresponding response can id is found: 0x0637, and returns the proxy flow control frame 3008000000000000 with can id 0x0637 to the data sending device.
Correspondingly, the determining whether there is a conflict in the matched response can ids may specifically include: determining whether the number of matching answer canids is greater than 1; if yes, determining that the matched response can id has conflict; if not, it is determined that there is no conflict for the matching response can ids.
Specifically, if the number of matching response canids is equal to 1, the collision determination result is that there is no collision for the matching response canids. If there is no conflict in the matched response cand, the first data transmission device may determine, in a preset first configuration file, that the flow control frame corresponding to the matched response cand is a proxy flow control frame, and send the proxy flow control frame to the data sending device.
And under the condition that the answer can id has no conflict, the returned proxy flow control frame is the correct flow control frame, so that the data receiving equipment continues to send continuous frames of the target data to the first data transmission equipment according to the proxy flow control frame, and finally the target data normally passes through the first transmission equipment and the second transmission equipment to reach the data receiving equipment to finish data transmission.
And if the number of the matched response canids is more than 1, the collision determination result is that the matched response canids have collision. If the matched response canid has a conflict, the first data transmission device may determine, in a preset first configuration file, a flow control frame set corresponding to the matched response canid, select any flow control frame from the flow control frame set to determine as an agent flow control frame, and send the agent flow control frame to the data sending device.
The selection mode can be selected according to actual conditions.
If the selected agent flow control frame is exactly the same as the target flow control frame, that is, the flow control frame to be replaced is the correct flow control frame, the data sending device will send the continuous frame of the target data to the first data transmission device. If the selected agent flow control frame is different from the target flow control frame, the data sending device needs to receive the target flow control frame which is received and sent by the first data transmission device from the second data transmission device, and then send the continuous frame of the target data to the first data transmission device. Furthermore, the first data transmission device may transmit the continuous frames to the second data transmission device, and the second data transmission device transmits the continuous frames to the data receiving device, so that the data receiving device completely receives the first frame data and the continuous frames of the target data.
In some embodiments of the present application, the first data transmission device may further send the proxy flow control frame to the second data transmission device together when sending the first frame data, so that the second data transmission device can determine whether the proxy flow control frame fed back by the first data transmission device is a correct flow control frame.
In some embodiments of the present application, when receiving the target flow control frame, the first data transmission device may further keep the response can id that matches the can id of the target flow control frame, and delete other response can ids.
Specifically, the first data transmission device may delete the first mapping relationship between the response can id of the target flow control frame and the response can id of the target flow control frame from the configuration file according to the response can id of the target flow control frame.
When the first transmission device receives the first frame data of the same request can, the first transmission device can feed back the proxy flow control frame which is the same as the target flow control frame according to the remaining first mapping relation, so that the problem of can id collision will not occur in the next data transmission process, and correspondingly, in the next data transmission process, the data receiving device will smoothly receive the continuous frames corresponding to the first frame data.
In order to more clearly explain the technical solution of the present application, the second transmission device of the data transmission system is mainly described below by using a specific embodiment.
Fig. 5 is a schematic diagram illustrating an implementation flow of a data transmission method provided in an embodiment of the present application, where the method may be applied to a second data transmission device and is applicable to a situation that a data receiving device cannot receive a continuous frame corresponding to a first frame of data.
The second data transmission equipment is connected with the data receiving equipment, the second data transmission equipment is connected with the first data transmission equipment, and the first data transmission equipment is connected with the data sending equipment.
Specifically, the data transmission method may include the following steps S501 to S508.
Step S501, receives first frame data of target data sent by the first data transmission device.
And the first frame data is sent to the first data transmission equipment by the data sending equipment.
Step S502, the first frame data is buffered.
Step S503, sending the first frame data to the data receiving device.
Step S504, receiving a target stream control frame sent by the data receiving device based on the first frame data.
Step S505, determining whether the response can id of the target flow control frame matches the preset request can id, and if so, further determining whether corresponding first frame data exists.
Step S506, if yes, returning the target flow control frame to the first data transmission device.
Step S507, receiving consecutive frames of the target data sent by the first data transmission device.
And the data sending equipment sends the continuous frames to the first data transmission equipment according to the target flow control frame after receiving the target flow control frame sent by the first data transmission equipment.
Step S508, sending successive frames of the target data to the data receiving device.
It should be noted that, reference may be made to the description of fig. 1 for the implementation process of step S501 to step S508, which is not described herein again.
In some embodiments of the present application, the determining whether the response can id of the target flow control frame matches the preset request id may specifically include: and traversing a preset second configuration file, and judging whether the response can id of the target flow control frame has a corresponding request can id according to the second mapping relation. If yes, judging that the response can id of the target flow control frame is matched with the preset request can id; and if not, judging that the response id of the target flow control frame is not matched with the preset request id.
The second configuration file may be obtained by the second data transmission device from the cloud server or the local storage, and the second configuration file includes a second mapping relationship between the response can id and the request can id.
For example, the second mapping relationship may be in the form of:
<CAN_LEN>2</CAN_LEN>
<CAN_C_ID>0x05B7</CAN_C_ID>
<CAN_C_FC>3008000000000000</CAN_C_FC>
<CAN_B_ID>0x0637</CAN_B_ID>
<CAN_B_FC>3008000000000000</CAN_B_FC>;
this second mapping relationship indicates that the C-side header searches the buffer for the first frame data of the request can id 0x0637 if the flow control frame data of the response can id 0x05B7 is received.
That is, the preset request can id is the request can id recorded in the second configuration file. The second data transmission device may traverse the second mapping relationship recorded in the second configuration file, and query whether there is a request can id matching the response can id according to the response can id of the target flow control frame.
Correspondingly, the determining whether the corresponding first frame data exists may specifically include: searching whether first frame data with consistent can id exists in a cache of the second data transmission equipment according to the matched request can id; if the first frame data with consistent can id exists, the second data transmission device can determine that the corresponding first frame data exists, and then return the target flow control frame to the first data transmission device.
If the first frame data with consistent can id does not exist, the second data transmission device can determine that the corresponding first frame data does not exist, at this time, the second data transmission device can discard the target flow control frame data, end the transmission process, and notify the data sending device to restart the data sending process through the first data transmission device.
In some embodiments of the present application, when determining that there is corresponding first frame data, the second data transmission device may determine whether the number of preset request can ids matching with the response can id of the target flow control frame is greater than 1.
If yes, it indicates that there is a collision of answer canids, so the second data transmission device may keep the request can id that is consistent with the first frame data can id and delete the other request can ids. Correspondingly, when the second data transmission device queries the continuous frames corresponding to the response can id in the buffer, the second data transmission device can find the correct continuous frames, and then feed back the continuous frames related to the target flow control frame to the data receiving device, so as to realize data transmission.
If not, the problem of collision of the response canids does not exist, so that the second data transmission device does not need to perform processing, and when the second data transmission device queries the continuous frames corresponding to the response canids in the buffer, the second data transmission device can find correct continuous frames because only the uniquely matched response canids exist, and then the continuous frames related to the target flow control frame are fed back to the data receiving device, so that data transmission is realized.
In other embodiments of the present application, considering that the first data transmission device may determine and return the proxy flow control frame in the preset first configuration file according to the collision determination result, in order to avoid occupying network resources, the first data transmission device may send the proxy flow control frame to the second data transmission device together when sending the first frame data to the second data transmission device.
The second data transmission device may receive the proxy flow control frame sent by the first data transmission device while receiving the first frame data sent by the first data transmission device, and may further determine whether the response can id of the proxy flow control frame is consistent with the response can id of the target flow control frame.
If so, it is indicated that the proxy flow control frame is correctly replaced by the first data transmission device, and the first data transmission device may receive a continuous frame corresponding to the current first frame of data, so that the second data transmission device may stop sending the target flow control frame to the first data transmission device, thereby reducing occupation of network resources.
If not, it is stated that the first data transmission device replaces an erroneous proxy flow control frame, the first data transmission device cannot receive the continuous frame corresponding to the current first frame data temporarily, so that the second data transmission device may send the target flow control frame to the first data transmission device, so that the first data transmission device sends the target flow control frame to the data sending device, and the first data transmission device obtains the continuous frame of the target data.
For ease of understanding, the description will be continued by taking as an example the process in fig. 3 in which the diagnostic apparatus transmits data to the vehicle. Assuming that the diagnostic device sends the current first frame data with the request can id of 0x04E8, the B-side header determines that the response can id matching the request can id has: 0x06C8 and 0x07C 8. At this time, the B-side connector may select one of the frames (for example, select 0x06C8) to return to the proxy flow control frame, and then send 0x06C8 and the current first frame data to the C-side connector. After the C-end buffer buffers the first frame data, the first frame data may be sent to the vehicle to receive the target flow control frame sent by the vehicle (assuming that the answer can id is 0x07C 8). And the C-end connector returns the target flow control frame to the B-end connector according to the target flow control frame if the matched request can id and the corresponding first frame data exist, and the B-end connector sends the continuous frames of the target data to the C-end connector according to the target flow control frame and sends the continuous frames of the target data to the vehicle through the C-end connector. After receiving the target flow control frame, the B-end adapter may also keep the correct can id 0x07C8 and delete the incorrect can id 0x06C8 according to its response can id.
After receiving the target flow control frame, the C-end connector may determine that the request can id matching the response can id of the target flow control frame includes: 0x04E8 and 0x05E 8. The C-side header can look up the first frame data in the buffer, and because there is the current first frame data with the first bus id 0x04E8, the C-side header can keep the correct request can id 0x04E8 and reject the wrong request can id 0x05E 8. Because the answer can id 0x07C8 of the target flow control frame and the answer can id 0x06C8 of the proxy flow control frame are different, which indicates that the B-end connector has returned the wrong proxy flow control frame, the C-end connector can send the target flow control frame to the B-end connector, the B-end connector sends the target flow control frame to the diagnostic device, if the response time of the whole process is not overtime, the diagnostic device still feeds back the continuous frames of the target data to the B-end connector after receiving the target flow control frame, the B-end connector sends the continuous frames of the target data to the C-end connector, and the C-end connector sends the continuous frames of the target data to the vehicle to complete data transmission.
When the data is transmitted next time, because all the false canids causing the conflict are deleted, the problem of canid conflict can not occur, and the effectiveness of the next data transmission is ensured.
It should be noted that, for simplicity of description, the foregoing method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders.
Fig. 6 is a schematic structural diagram of a data transmission apparatus 600 according to an embodiment of the present application, where the data transmission apparatus 600 is configured on a first data transmission device. The first data transmission equipment is connected with the data sending equipment, the first data transmission equipment is connected with the second data transmission equipment, and the second data transmission equipment is connected with the data receiving equipment.
Specifically, the data transmission apparatus 600 may include:
a first frame data receiving unit 601, configured to receive first frame data of target data sent by the data sending device; a can id matching unit 602, configured to determine whether a request can id of the first frame data matches a preset response can id; a conflict detection unit 603 configured to further determine whether a conflict exists in the matched response can id if the matching is performed; a proxy flow control unit 604, configured to return a proxy flow control frame to the data sending device according to the collision determination result; a first frame data sending unit 605, configured to send the first frame data to the second data transmission device, where the first frame data is cached by the second data transmission device and then sent to the data receiving device; a target flow control frame receiving unit 606, configured to receive a target flow control frame; the target flow control frame is sent to the second data transmission device by the data receiving device according to the first frame data, and when the second data transmission device judges that a response can id of the target flow control frame matches a preset request can id, the second data transmission device further determines that corresponding first frame data exists and sends the corresponding first frame data to the first data transmission device; a target flow control frame sending unit 607, configured to send the target flow control frame to the data sending apparatus; a continuous frame processing unit 608, configured to receive a continuous frame of target data sent by the sending device according to the target flow control frame, and send the continuous frame of the target data to the second data transmission device, so that the continuous frame of the target data is sent to the data receiving device via the second data transmission device.
In some embodiments of the present application, the can id matching unit 602 may be specifically configured to: traversing a preset first configuration file, wherein the first configuration file comprises a first mapping relation between a request can id and a response can id; judging whether a corresponding response can id exists in the request can id of the first frame data according to the first mapping relation; if the request can id of the first frame data exists, the request can id of the first frame data is judged to be matched with a preset response can id; if not, the request can id of the first frame data is judged not to be matched with the preset response can id.
In some embodiments of the present application, the collision detection unit 603 may be specifically configured to: determining whether the number of matching answer canids is greater than 1; if yes, determining that the matched response can id has conflict; if not, it is determined that there is no conflict for the matching response can ids.
In some embodiments of the present application, the aforementioned generation backflow control unit 604 may be specifically configured to: if the matched answer can id has no conflict, determining the flow control frame corresponding to the matched answer can id in a preset first configuration file as a proxy flow control frame; if the matched answer can id conflicts, determining a flow control frame set corresponding to the matched answer can id in the first configuration file, and selecting any flow control frame from the flow control frame set to be determined as a proxy flow control frame; and sending the agent flow control frame to the data sending equipment.
It should be noted that, for convenience and simplicity of description, the specific working process of the data transmission device 600 may refer to the corresponding process of the method described in fig. 1 to 4, and is not described herein again.
Fig. 7 is a schematic structural diagram of a data transmission apparatus 700 according to an embodiment of the present application, where the data transmission apparatus 700 is configured on a second data transmission device. The second data transmission equipment is connected with the data receiving equipment, the second data transmission equipment is connected with the first data transmission equipment, and the first data transmission equipment is connected with the data sending equipment.
Specifically, the data transmission apparatus 700 may include:
a first frame data receiving unit 701, configured to receive first frame data of target data sent by the first data transmission device, where the first frame data is sent to the first data transmission device by the data sending device; a buffering unit 702, configured to buffer the first frame data; a first frame data sending unit 703, configured to send the first frame data to the data receiving device; a target flow control frame receiving unit 704, configured to receive a target flow control frame sent by the data receiving device based on the first frame data; a first frame data query unit 705, configured to determine whether a response can id of the target flow control frame matches a preset request can id, and if so, further determine whether corresponding first frame data exists; a target flow control frame sending unit 706, configured to return the target flow control frame to the first data transmission device if the target flow control frame exists; a continuous frame receiving unit 707, configured to receive a continuous frame of target data sent by the first data transmission device, where the continuous frame is sent to the first data transmission device according to the target flow control frame after the data sending device receives the target flow control frame sent by the first data transmission device; a continuous frame transmitting unit 708, configured to transmit continuous frames of the target data to the data receiving apparatus.
In some embodiments of the present application, the first frame data querying unit 705 may be specifically configured to: traversing a preset second configuration file, wherein the second configuration file comprises a second mapping relation of the response can id and the request can id; judging whether a corresponding request can id exists in the response id of the target flow control frame according to the second mapping relation; if yes, judging that the response can id of the target flow control frame is matched with a preset request id; and if not, judging that the response can id of the target flow control frame is not matched with the preset request id.
In some embodiments of the present application, the first frame data querying unit 705 may be specifically configured to: searching whether first frame data with consistent can id exists in a cache of the second data transmission equipment according to the matched request can id; if so, determining that corresponding first frame data exists; and if not, determining that the corresponding first frame data does not exist.
In some embodiments of the present application, when determining that there is corresponding first frame data, the data transmission apparatus 700 may further include a can id processing unit configured to: judging whether the number of preset request can ids matched with the response can ids of the target flow control frame is more than 1; if yes, the request can id consistent with the first frame data can id is reserved, and other request can ids are deleted.
In some embodiments of the present application, the target flow control frame sending unit 706 is configured to: receiving an agent flow control frame sent by the first data transmission device, wherein the agent flow control frame is determined by the first data transmission device in a preset first configuration file according to a collision judgment result; judging whether the response can id of the agent flow control frame is consistent with the response can id of the target flow control frame; if yes, stopping sending the target flow control frame to the first data transmission equipment; and if not, sending the target flow control frame to the first data transmission equipment.
It should be noted that, for convenience and simplicity of description, the specific working process of the data transmission apparatus 700 may refer to the corresponding process of the method described in fig. 1 to 3 and 5, and is not described herein again.
Fig. 8 is a schematic diagram of a data transmission device according to an embodiment of the present application. The data transmission device 8 may be the first data transmission device or the second data transmission device.
Specifically, the data transmission device 8 may include: a processor 80, a memory 81 and a computer program 82, such as a data transfer program, stored in said memory 81 and operable on said processor 80. The processor 80, when executing the computer program 82, implements the steps in the above-described embodiments of the data transmission method, such as the steps S401 to S408 shown in fig. 4. Alternatively, the processor 80 implements the steps in the above-mentioned embodiments of the data transmission method, such as the steps S501 to S508 shown in fig. 5, when executing the computer program 82.
Further alternatively, when the processor 80 executes the computer program 82, the functions of each module/unit in each device embodiment described above are implemented, for example, the first frame data receiving unit 601, the first frame data querying unit 602, the collision detecting unit 603, the substitute flow control unit 604, the first frame data transmitting unit 605, the target flow control frame receiving unit 606, the target flow control frame transmitting unit 607, and the continuous frame processing unit 608 shown in fig. 6. Alternatively, when the processor 80 executes the computer program 82, the functions of the modules/units in the device embodiments described above are implemented, for example, the first frame data receiving unit 701, the buffer unit 702, the first frame data transmitting unit 703, the target flow control frame receiving unit 704, the can id matching unit 705, the target flow control frame transmitting unit 706, the continuous frame receiving unit 707, and the continuous frame transmitting unit 708 shown in fig. 7.
The computer program may be divided into one or more modules/units, which are stored in the memory 81 and executed by the processor 80 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the data transmission device.
For example, the computer program may be divided into: the system comprises a first frame data receiving unit, a first frame data query unit, a collision detection unit, a substitute backflow control unit, a first frame data sending unit, a target flow control frame receiving unit, a target flow control frame sending unit and a continuous frame processing unit. The specific functions of the units can be referred to the description of fig. 6.
For another example, the computer program may be divided into: the system comprises a first frame data receiving unit, a buffer unit, a first frame data sending unit, a target flow control frame receiving unit, a can id matching unit, a target flow control frame sending unit, a continuous frame receiving unit and a continuous frame sending unit. The specific functions of the units can be referred to the description of fig. 7 above as follows.
The data transmission device may include, but is not limited to, a processor 80, a memory 81. Those skilled in the art will appreciate that fig. 8 is merely an example of a data transmission device and does not constitute a limitation of the data transmission device, and may include more or less components than those shown, or combine certain components, or different components, for example, the data transmission device may also include input output devices, network access devices, buses, etc.
The Processor 80 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 81 may be an internal storage unit of the data transmission device, such as a hard disk or a memory of the data transmission device. The memory 81 may also be an external storage device of the data transmission device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the data transmission device. Further, the memory 81 may also include both an internal storage unit and an external storage device of the data transmission device. The memory 81 is used for storing the computer program and other programs and data required by the data transmission device. The memory 81 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for convenience and simplicity of description, the structure of the data transmission device may also refer to the specific description of the structure in the method embodiment, and details are not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/data transmission device and method may be implemented in other ways. For example, the above-described apparatus/data transmission device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when the actual implementation is performed, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signal, telecommunications signal, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (14)

1. A data transmission method, which is applied to a data transmission system, where the data transmission system includes a data sending device, a first data transmission device, a second data transmission device, and a data receiving device, where the data sending device is connected to the first data transmission device, the first data transmission device is connected to the second data transmission device, and the second data transmission device is connected to the data receiving device, the method includes:
the first data transmission equipment receives the first frame data of the target data sent by the data sending equipment;
the first data transmission equipment judges whether the request can id of the first frame data is matched with a preset response can id; if the first frame data is matched with the second frame data, further judging whether the matched response canids have conflict, returning a proxy flow control frame to the data sending equipment according to a conflict judgment result, and sending the first frame data to the second data transmission equipment;
the second data transmission equipment caches the first frame data, then sends the first frame data to the data receiving equipment, and receives a target flow control frame sent by the data receiving equipment; judging whether the response candid of the target flow control frame is matched with a preset request candid or not, if so, further determining whether corresponding first frame data exists or not, and if so, returning the target flow control frame to the first data transmission equipment;
the first data transmission device sends the target flow control frame to the data sending device;
and the data sending equipment sends continuous frames of target data to the first data transmission equipment according to the target flow control frames and sends the continuous frames of the target data to the data receiving equipment through the second data transmission equipment.
2. A data transmission method, wherein the method is applied to a first data transmission device, the first data transmission device is connected to a data sending device, the first data transmission device is connected to a second data transmission device, and the second data transmission device is connected to a data receiving device, and the method includes:
receiving first frame data of target data sent by the data sending equipment;
judging whether the request can id of the first frame data is matched with a preset response can id;
if so, further judging whether the matched answer can ids have conflict or not;
returning the agent flow control frame to the data sending equipment according to the conflict judgment result;
sending the first frame data to the second data transmission equipment, wherein the first frame data is cached by the second data transmission equipment and then sent to the data receiving equipment;
receiving a target flow control frame; the target flow control frame is sent to the second data transmission device by the data receiving device according to the first frame data, and when the second data transmission device judges that a response can id of the target flow control frame matches a preset request can id, the second data transmission device further determines that corresponding first frame data exists and sends the corresponding first frame data to the first data transmission device;
transmitting the target flow control frame to the data transmission device;
and receiving continuous frames of target data sent by the sending equipment according to the target flow control frames, and sending the continuous frames of the target data to the second data transmission equipment so as to send the continuous frames of the target data to the data receiving equipment through the second data transmission equipment.
3. The method according to claim 2, wherein the determining whether the request can id of the first frame data matches a preset response can id comprises:
traversing a preset first configuration file, wherein the first configuration file comprises a first mapping relation between a request can id and a response can id;
judging whether a corresponding response canid exists in the request canid of the first frame data according to the first mapping relation;
if the request can id of the first frame data exists, the request can id of the first frame data is judged to be matched with a preset response can id;
if not, the request can id of the first frame data is judged not to be matched with the preset response can id.
4. The data transmission method according to claim 2, wherein the determining whether there is a collision in the matched response canids includes:
determining whether the number of matching answer canids is greater than 1;
if yes, determining that the matched response canids have conflict;
if not, it is determined that there is no conflict for the matching response can ids.
5. The data transmission method according to claim 4, wherein the returning of the proxy flow control frame to the data sending device according to the collision determination result specifically includes:
if the matched answer can id has no conflict, determining the flow control frame corresponding to the matched answer can id in a preset first configuration file as a proxy flow control frame;
if the matched response canid has conflict, determining a flow control frame set corresponding to the matched response canid in the first configuration file, and selecting any flow control frame from the flow control frame set to be determined as a proxy flow control frame;
and sending the agent flow control frame to the data sending equipment.
6. A data transmission method, applied to a second data transmission device, where the second data transmission device is connected to a data receiving device, the second data transmission device is connected to a first data transmission device, and the first data transmission device is connected to a data sending device, the method comprising:
receiving first frame data of target data sent by the first data transmission equipment, wherein the first frame data is sent to the first data transmission equipment by the data sending equipment;
caching the first frame data;
sending the first frame data to the data receiving equipment;
receiving a target flow control frame sent by the data receiving equipment based on the first frame data;
judging whether the response can id of the target flow control frame is matched with a preset request can id, and if so, further determining whether corresponding first frame data exists;
if yes, returning the target flow control frame to the first data transmission equipment;
receiving continuous frames of target data sent by the first data transmission equipment, wherein the continuous frames are sent to the first data transmission equipment by the data sending equipment according to the target flow control frames after the data sending equipment receives the target flow control frames sent by the first data transmission equipment;
sending successive frames of the target data to the data receiving device.
7. The data transmission method according to claim 6, wherein the determining whether the response can id of the target flow control frame matches a preset request can id specifically comprises:
traversing a preset second configuration file, wherein the second configuration file comprises a second mapping relation of the response can id and the request can id;
judging whether a corresponding request can exists in the response id of the target flow control frame according to the second mapping relation;
if yes, judging that the response can id of the target flow control frame is matched with a preset request id;
and if not, judging that the response can id of the target flow control frame is not matched with the preset request id.
8. The data transmission method according to claim 6, wherein the determining whether the corresponding first frame data exists specifically includes:
searching whether first frame data with consistent candid exists in a cache of the second data transmission equipment according to the matched request cand id;
if so, determining that corresponding first frame data exists;
and if not, determining that the corresponding first frame data does not exist.
9. The data transmission method according to claim 6, wherein when it is determined that the corresponding first frame data exists, the method further comprises:
judging whether the number of preset request can-ids matched with the response can-ids of the target flow control frame is more than 1;
if yes, the request can id consistent with the first frame data can id is reserved, and other request can ids are deleted.
10. The method according to any one of claims 6-11, further comprising:
receiving an agent flow control frame sent by the first data transmission device, wherein the agent flow control frame is determined by the first data transmission device in a preset first configuration file according to a collision judgment result;
judging whether the response can id of the agent flow control frame is consistent with the response can id of the target flow control frame;
if yes, stopping sending the target flow control frame to the first data transmission equipment;
and if not, sending the target flow control frame to the first data transmission equipment.
11. A data transmission apparatus, wherein the apparatus is configured to a first data transmission device, the first data transmission device is connected to a data sending device, the first data transmission device is connected to a second data transmission device, and the second data transmission device is connected to a data receiving device, the apparatus comprising:
a first frame data receiving unit, configured to receive first frame data of target data sent by the data sending device;
a first frame data query unit, configured to determine whether a request can id of the first frame data matches a preset response can id;
a conflict detection unit for further judging whether a conflict exists in the matched response can id if the matching is performed;
the proxy flow control unit is used for returning a proxy flow control frame to the data sending equipment according to the conflict judgment result;
a first frame data sending unit, configured to send the first frame data to the second data transmission device, where the first frame data is cached by the second data transmission device and then sent to the data receiving device;
a target flow control frame receiving unit, configured to receive a target flow control frame; the target flow control frame is sent to the second data transmission device by the data receiving device according to the first frame data, and when the second data transmission device judges that the response candid of the target flow control frame matches with the preset request candid, the second data transmission device further determines that the corresponding first frame data exists and sends the first frame data to the first data transmission device;
a target flow control frame sending unit, configured to send the target flow control frame to the data sending device;
and the continuous frame processing unit is used for receiving continuous frames of target data sent by the sending equipment according to the target flow control frame and sending the continuous frames of the target data to the second data transmission equipment so as to enable the continuous frames of the target data to be sent to the data receiving equipment through the second data transmission equipment.
12. A data transmission apparatus, wherein the apparatus is configured to a second data transmission device, the second data transmission device is connected to a data receiving device, the second data transmission device is connected to a first data transmission device, and the first data transmission device is connected to a data sending device, the apparatus comprising:
a first frame data receiving unit, configured to receive first frame data of target data sent by the first data transmission device, where the first frame data is sent to the first data transmission device by the data sending device;
a buffer unit, configured to buffer the first frame data;
a first frame data transmitting unit, configured to transmit the first frame data to the data receiving device;
a target flow control frame receiving unit, configured to receive a target flow control frame sent by the data receiving device based on the first frame data;
a can id matching unit, configured to determine whether a response can id of the target flow control frame matches a preset request can id, and if so, further determine whether corresponding first frame data exists;
a target stream control frame sending unit, configured to return the target stream control frame to the first data transmission device if the target stream control frame exists;
a continuous frame receiving unit, configured to receive a continuous frame of target data sent by the first data transmission device, where the continuous frame is sent to the first data transmission device according to the target flow control frame after the data sending device receives the target flow control frame sent by the first data transmission device;
a continuous frame transmitting unit configured to transmit continuous frames of the target data to the data receiving apparatus.
13. A data transmission device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 2 to 5 when executing the computer program or implements the steps of the method according to any one of claims 6 to 10 when executing the computer program.
14. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 2 to 5 or which, when being executed by a processor, carries out the steps of the method according to any one of claims 6 to 10.
CN202210169950.1A 2022-02-23 2022-02-23 Data transmission method, device, equipment and storage medium Active CN114553373B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210169950.1A CN114553373B (en) 2022-02-23 2022-02-23 Data transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210169950.1A CN114553373B (en) 2022-02-23 2022-02-23 Data transmission method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114553373A true CN114553373A (en) 2022-05-27
CN114553373B CN114553373B (en) 2024-07-12

Family

ID=81676883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210169950.1A Active CN114553373B (en) 2022-02-23 2022-02-23 Data transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114553373B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115032973A (en) * 2022-08-11 2022-09-09 深圳市星卡软件技术开发有限公司 Data transmission system, method, device, equipment and medium
CN115065699A (en) * 2022-06-08 2022-09-16 深圳市元征科技股份有限公司 Route activation method, device, equipment and medium based on remote diagnosis
CN115396529A (en) * 2022-08-25 2022-11-25 深圳市元征科技股份有限公司 Multichannel communication method, device, terminal equipment and storage medium
CN115633075A (en) * 2022-09-30 2023-01-20 深圳数马电子技术有限公司 Device communication method, device, terminal device and storage medium
CN115834281A (en) * 2022-11-03 2023-03-21 深圳市元征科技股份有限公司 Data transmission method and device, electronic equipment and storage medium
CN116132290A (en) * 2023-02-06 2023-05-16 深圳市元征科技股份有限公司 Diagnostic profile generation method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140337680A1 (en) * 2013-05-07 2014-11-13 Electronics And Telecommunications Research Institute Can communication apparatus and method thereof
CN108631816A (en) * 2017-03-24 2018-10-09 华为技术有限公司 The method and apparatus of transmission data, and receive data method and apparatus
CN108989169A (en) * 2018-08-23 2018-12-11 成都圭目机器人有限公司 The method of CAN bus based module intelligence ad hoc network
CN110798464A (en) * 2019-10-28 2020-02-14 东风电子科技股份有限公司 Universal client system based on UDS protocol communication
US20200380796A1 (en) * 2019-06-03 2020-12-03 Hyundai Motor Company Controller diagnostic device and method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140337680A1 (en) * 2013-05-07 2014-11-13 Electronics And Telecommunications Research Institute Can communication apparatus and method thereof
CN108631816A (en) * 2017-03-24 2018-10-09 华为技术有限公司 The method and apparatus of transmission data, and receive data method and apparatus
CN108989169A (en) * 2018-08-23 2018-12-11 成都圭目机器人有限公司 The method of CAN bus based module intelligence ad hoc network
US20200380796A1 (en) * 2019-06-03 2020-12-03 Hyundai Motor Company Controller diagnostic device and method thereof
CN112034811A (en) * 2019-06-03 2020-12-04 现代自动车株式会社 Controller diagnostic device and method
CN110798464A (en) * 2019-10-28 2020-02-14 东风电子科技股份有限公司 Universal client system based on UDS protocol communication

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115065699A (en) * 2022-06-08 2022-09-16 深圳市元征科技股份有限公司 Route activation method, device, equipment and medium based on remote diagnosis
CN115065699B (en) * 2022-06-08 2024-06-07 深圳市元征科技股份有限公司 Routing activation method, device, equipment and medium based on remote diagnosis
CN115032973A (en) * 2022-08-11 2022-09-09 深圳市星卡软件技术开发有限公司 Data transmission system, method, device, equipment and medium
CN115032973B (en) * 2022-08-11 2022-11-15 深圳市星卡软件技术开发有限公司 Data transmission system, method, device, equipment and medium
CN115396529A (en) * 2022-08-25 2022-11-25 深圳市元征科技股份有限公司 Multichannel communication method, device, terminal equipment and storage medium
CN115633075A (en) * 2022-09-30 2023-01-20 深圳数马电子技术有限公司 Device communication method, device, terminal device and storage medium
CN115834281A (en) * 2022-11-03 2023-03-21 深圳市元征科技股份有限公司 Data transmission method and device, electronic equipment and storage medium
CN115834281B (en) * 2022-11-03 2024-09-10 深圳市元征科技股份有限公司 Data transmission method, device, electronic equipment and storage medium
CN116132290A (en) * 2023-02-06 2023-05-16 深圳市元征科技股份有限公司 Diagnostic profile generation method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN114553373B (en) 2024-07-12

Similar Documents

Publication Publication Date Title
CN114553373A (en) Data transmission method, device, equipment and storage medium
CN113341906B (en) Fault processing method, device and equipment and automobile
CN108964972B (en) Method, device and system for managing computing nodes
US20230412742A1 (en) Apparatus, method, and system for monitoring image-forming apparatus, and storage medium
CN112927392A (en) Communication method, vehicle communication interface device and readable storage medium
CN115390546A (en) Vehicle diagnostic communication method, device, equipment and medium
CN116126613A (en) Position detection method and device of PCIe (peripheral component interconnect express) equipment, electronic equipment and storage medium
KR20180074128A (en) Diagnosis message routing system and method for gateway of vehicle
CN112445630A (en) Information interaction method and device and terminal equipment
CN110825309B (en) Data reading method, device and system and distributed system
CN113177015B (en) Frame header-based serial port communication method and serial port chip
CN114338270A (en) Data communication method, device, electronic equipment and storage medium
CN107171915B (en) Communication protocol changing method and device
CN115695077A (en) Bus data receiving method and device, electronic equipment and storage medium
US20190286599A1 (en) Dual way communication method, system, and master device thereof
CN114637275A (en) Vehicle remote diagnosis method and device, electronic equipment and storage medium
CN111351669A (en) Fault diagnosis method and device, storage medium and vehicle
CN114338271A (en) Data processing method, device, terminal and computer readable storage medium
CN114513385A (en) Data transmission method and device, electronic equipment and storage medium
CN113395264A (en) Communication connection method, apparatus, server and medium
CN113556294A (en) Data transmitting/receiving method, data transmitting/receiving device, server, and storage medium
CN114097588B (en) Networking method and device of irrigation device
CN115834281B (en) Data transmission method, device, electronic equipment and storage medium
CN118260221B (en) Communication method, device, equipment and storage medium based on CAN bus
CN112566082B (en) Data transmission method, device, equipment and medium

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
GR01 Patent grant
GR01 Patent grant