CN117082475A - Data transmission method, apparatus, device, storage medium and program product - Google Patents

Data transmission method, apparatus, device, storage medium and program product Download PDF

Info

Publication number
CN117082475A
CN117082475A CN202311185424.5A CN202311185424A CN117082475A CN 117082475 A CN117082475 A CN 117082475A CN 202311185424 A CN202311185424 A CN 202311185424A CN 117082475 A CN117082475 A CN 117082475A
Authority
CN
China
Prior art keywords
data packet
controller
data
received
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311185424.5A
Other languages
Chinese (zh)
Inventor
缪一鸣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingwei Hirain Tech Co Ltd
Original Assignee
Beijing Jingwei Hirain Tech 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 Beijing Jingwei Hirain Tech Co Ltd filed Critical Beijing Jingwei Hirain Tech Co Ltd
Priority to CN202311185424.5A priority Critical patent/CN117082475A/en
Publication of CN117082475A publication Critical patent/CN117082475A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/44Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for communication between vehicles and infrastructures, e.g. vehicle-to-cloud [V2C] or vehicle-to-home [V2H]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Communication Control (AREA)

Abstract

The application discloses a data transmission method, a data transmission device, a data transmission equipment, a storage medium and a program product. The method comprises the following steps: a first data packet is sent to a second controller, wherein the first data packet is any one of a plurality of data packets arranged according to a preset sequence, and the plurality of data packets are used for upgrading a target application program on a vehicle; and under the condition that the acknowledgement message of the first data packet is received, sending a second data packet to the second controller, wherein the second data packet is the next data packet of the first data packet in the plurality of data packets, and the acknowledgement message of the first data packet is used for representing that the first data packet is received by the second controller. According to the embodiment of the application, the software refreshing efficiency can be improved.

Description

Data transmission method, apparatus, device, storage medium and program product
Technical Field
The present application relates to the field of embedded software technologies, and in particular, to a data transmission method, apparatus, device, storage medium, and program product.
Background
At present, the method of upgrading The Over-The-Air (OTA) or (Firmware Over-The-Air (FOTA)) of The electronic control unit of The automobile in The market is mature, the upgrade package of The automobile can be transmitted on The information network of The automobile at a higher speed, and The Over-The-Air upgrade can basically meet The high-speed iteration of automobile software, so that brand new experience is brought to consumers.
However, as the number of electronic control units in a vehicle increases, there are often multiple gateways on the link from the remote diagnostic box of the vehicle to the electronic control units of the vehicle at the terminal, thus causing a large delay in the data on the transmission link; on the other hand, the object of OTA or FOTA upgrade is updated and developed from the independent electronic control unit to the whole vehicle, and the current vehicle-mounted Ethernet can reach hundred megabytes or even gigabytes, so that the transmitted data packet is larger, if the data reading and writing speed in the upgrading process is slower, the condition that the data reading and writing time is far longer than the time consumed by a transmission link exists, and at the moment, the remote diagnosis box always waits for the response after the data writing is finished, and then the next data packet can be sent, so that the software writing and reading speed is lower.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a device, equipment, a storage medium and a program product, which can solve the problem of low refreshing speed of the existing software.
In a first aspect, an embodiment of the present application provides a data transmission method, including:
a first data packet is sent to a second controller, wherein the first data packet is any one of a plurality of data packets arranged according to a preset sequence, and the plurality of data packets are used for upgrading a target application program on a vehicle;
and under the condition that the acknowledgement message of the first data packet is received, sending a second data packet to the second controller, wherein the second data packet is the next data packet of the first data packet in the plurality of data packets, and the acknowledgement message of the first data packet is used for representing that the first data packet is received by the second controller.
In some embodiments, the sending, when receiving the acknowledgement packet of the first data packet, a second data packet to the second controller includes:
judging whether a response message of a third data packet is received under the condition that the acknowledgement message of the first data packet is received, wherein the third data packet is a last data packet of the first data packet in the plurality of data packets, and the response message of the third data packet is used for representing that after the third data packet is received by the second controller, one data packet is written into a target application program;
and sending the second data packet to the second controller under the condition that the response message of the third data packet is received.
In a second aspect, an embodiment of the present application further provides a data transmission method, where the method includes:
under the condition that a first data packet sent by a first controller is received, sending a confirmation message of the first data packet to the first controller;
the acknowledgement message of the first data packet is used for indicating the first controller to send a second data packet to the second controller.
In some embodiments, the method further comprises:
under the condition that a third data packet sent by the first controller is received, storing the third data packet into a tail position of a preset target queue;
acquiring a fourth data packet from the target queue, and writing the fourth data packet into a target application program to obtain a response message of the third data packet;
transmitting a response message of the third data packet to the first controller;
the response message of the third data packet and the acknowledgement message of the first data packet are used for indicating the first controller to send a second data packet to the second controller.
In some embodiments, the obtaining the fourth data packet from the target queue includes:
and acquiring a fourth data packet positioned at the head position of the target queue.
In some embodiments, when receiving the third data packet sent by the first controller, storing the third data packet in a tail position of a preset target queue, where the tail position includes:
checking whether the execution of the third data packet has a fault or not under the condition that the third data packet is received;
and storing the third data packet into a preset tail position of a target queue under the condition that the check result is that no fault exists in the third data packet.
In a third aspect, an embodiment of the present application provides a data transmission apparatus, including:
the system comprises a first sending module, a second controller and a first control module, wherein the first sending module is used for sending a first data packet to the second controller, the first data packet is any one of a plurality of data packets arranged according to a preset sequence, and the plurality of data packets are used for upgrading a target application program on a vehicle;
and the second sending module is used for sending a second data packet to the second controller under the condition that the acknowledgement message of the first data packet is received, wherein the second data packet is the next data packet of the first data packet in the plurality of data packets, and the acknowledgement message of the first data packet is used for representing that the first data packet is received by the second controller.
In a fourth aspect, an embodiment of the present application provides a data transmission apparatus, including: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the data transmission method as described above.
In a fifth aspect, embodiments of the present application provide a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement a data transmission method as above.
In a sixth aspect, embodiments of the present application provide a computer program product comprising computer program instructions which, when executed by a processor, implement a data transmission method as above.
In the application, in the process of continuously transmitting the multi-packet data packets, the first controller only confirms that the first data packet is received by the second controller, then the next packet data packet of the first data packet is transmitted, and the next packet data packet of the first data packet is transmitted without waiting for a response message of the first data packet. Compared with the related art, the method has the advantages that the separation of data packet transmission and writing is realized, and the transmission of the next data packet and the writing of the last data packet can be simultaneously carried out, so that the time required by the whole writing process is greatly shortened, and the software writing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a schematic view of a scenario of a data transmission method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a scenario of a data transmission method according to another embodiment of the present application;
fig. 3 is a flow chart of a data transmission method according to an embodiment of the application;
fig. 4 is a schematic view of a scenario of a data transmission method according to another embodiment of the present application;
fig. 5 is a schematic view of a scenario of a data transmission method according to another embodiment of the present application;
fig. 6 is a schematic hardware structure of a data transmission device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a data transmission device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail below with reference to the accompanying drawings and the detailed embodiments. It should be understood that the particular embodiments described herein are meant to be illustrative of the application only and not limiting. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the application by showing examples of the application.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The embodiments will be described in detail below with reference to the accompanying drawings.
In the prior art, the procedure of upgrading an OTA or FOTA in a vehicle is generally that a first controller divides an upgrade packet to be transmitted into a plurality of data packets, and sequentially sends the data packets to a second controller. Specifically, after the first controller sends the first data packet, the second controller feeds back a confirmation message of the first data packet to the first controller after receiving the first data packet, stores the first data packet in a preset target queue, acquires a data packet from the target queue, writes the data packet into an application program to be upgraded, generates a response message according to the writing result of the data packet under the condition of no writing error, and sends the response message to the first controller. After receiving the response message, the first controller sends the next data packet of the first data packet to the second controller.
As such, the time required for the first controller and the second controller to make a request and a response of data in the prior art is approximately composed of the following parts:
the time period 1, the diagnostic request sent by the first controller arrives at the second controller, passes through a plurality of gateways and the time spent on the transmission link;
the time period 2, the acknowledgement message replied by the second controller reaches the first controller, passes through a plurality of gateways and consumes time on a transmission link;
time period 3, time spent by the second controller writing data;
the response message replied by the second controller reaches the first controller in the time period 4, and passes through a plurality of gateways and the time consumed on the transmission link;
and 5, the time interval between the processing after the first controller receives the response message and the transmission of the next packet of data.
The time taken to perform a packet data transmission can be represented by fig. 1, where the numbers 1-5 are the fractional times described above; as such, as shown in fig. 2, the time consumption for continuously transmitting a plurality of data packets is clear from fig. 2, and is a completely serial process when continuously transmitting a plurality of data packets. The first controller is in an idle state after the period 2 in practice, the next packet of data can not be sent until the period 5 is waited, and the first controller is in an idle state for each 3-5 period of packet data transmission. For the current use requirement, when the amount of data to be transmitted is large, the data needs to be transmitted in thousands of packets, so that a great amount of time is wasted, and the transmission efficiency is low.
Specifically, in order to solve the problems in the prior art, embodiments of the present application provide a data transmission method, apparatus, device, storage medium, and program product. The following first describes a data transmission method provided by an embodiment of the present application.
Fig. 3 is a schematic flow chart of a data transmission method according to an embodiment of the present application. The method is applied to a first controller, and comprises the following steps:
and S310, sending a first data packet to a second controller, wherein the first data packet is any one of a plurality of data packets arranged according to a preset sequence, and the plurality of data packets are used for upgrading a target application program on a vehicle.
In this embodiment, the data transmission method is applied to an OTA (Over-The-Air) or FOTA (Firmware Over-The-Air) upgrading process of a vehicle, where The first controller refers to a remote diagnosis box in The vehicle, and The remote diagnosis box can communicate with The internet and other vehicles to collect and transmit vehicle data; the second controller refers to an electronic control unit in the vehicle, such as an engine control unit, a brake control unit, an air conditioner control unit, and the like. They are responsible for controlling various parts and systems of the vehicle and receiving OTA or FOTA upgrade instructions from the first controller to implement the update to the firmware or software.
In the process of upgrading the OTA or the FOTA of the vehicle, the first controller can acquire an upgrade package generated by the cloud or the server side and used for upgrading the OTA or the FOTA, and the upgrade package is transmitted to the second controller in the vehicle through the vehicle network, so that the firmware or the software of the vehicle is updated.
In addition, since the amount of data contained in the upgrade package is large, there may be a problem in that data is lost or the transmission speed is too slow during transmission if the upgrade package is transmitted at one time in the vehicle network. Therefore, the first controller needs to split the upgrade package into a plurality of data packages of smaller data volume according to a given plurality of data packages, and transmit only one of the plurality of data packages at a time in the vehicle network. The first data packet is any one of a plurality of data packets obtained by splitting the upgrade packet.
And S320, under the condition that the acknowledgement message of the first data packet is received, sending a second data packet to the second controller, wherein the second data packet is the next data packet of the first data packet in the plurality of data packets, and the acknowledgement message of the first data packet is used for representing that the first data packet is received by the second controller.
In this embodiment, after the first controller sends the first data packet to the second controller, if the second controller successfully receives the first data packet, an acknowledgement message is fed back to the first controller to confirm that the first data packet has been successfully received, and after the first controller receives the acknowledgement message of the first data packet, the next data packet of the first data packet may be continuously sent to the second controller.
In the application, in the process of continuously transmitting the multi-packet data packets, the first controller only confirms that the first data packet is received by the second controller, then the next packet data packet of the first data packet is transmitted, and the next packet data packet of the first data packet is transmitted without waiting for a response message of the first data packet. Compared with the related art, the method has the advantages that the separation of data packet transmission and writing is realized, and the transmission of the next data packet and the writing of the last data packet can be simultaneously carried out, so that the time required by the whole writing process is greatly shortened, and the writing efficiency is improved.
As an alternative embodiment, S120 may include:
judging whether a response message of a third data packet is received under the condition that the acknowledgement message of the first data packet is received, wherein the third data packet is a last data packet of the first data packet in the plurality of data packets, and the response message of the third data packet is used for representing that after the third data packet is received by the second controller, one data packet is written into a target application program;
and sending the second data packet to the second controller under the condition that the response message of the third data packet is received.
In this embodiment, before the first controller sends the first data packet, the second controller receives the third data packet, after receiving the third data packet, the first controller stores the third data packet in a preset target queue, then obtains a data packet from the target queue and writes the data packet into a target application program to be upgraded, if the writing is correct, the second controller generates a response message of the third data packet according to the writing result of the data packet, and sends the response message of the third data packet to the first controller. After receiving the response message of the third data packet and receiving the acknowledgement message of the first data packet, the first controller sends the second data packet to the second controller.
In this embodiment, the conditions for the first controller to send the data packet to the second controller are: the first controller receives the confirmation message of the previous packet data and the response message of the previous packet data, even if the mode limits the response of the data packet to wait for the previous packet data, compared with the prior art, the time consumed by the whole data transmission is greatly reduced, the optimized effect is gradually increased along with the increase of the transmission times, and in addition, the data transmission and writing are linked, so that the first controller still continuously transmits the data when the target application program can not respond to the upgrading requirement.
The application also provides a data transmission method. The method is applied to a second controller, and comprises the following steps:
under the condition that a first data packet sent by a first controller is received, sending a confirmation message of the first data packet to the first controller;
the confirmation message is used for indicating the first controller to send a second data packet to the second controller.
In this embodiment, the time required for the first controller and the second controller to make a request and a response of data may still be approximately composed of the following parts:
the time period 1, the diagnostic request sent by the first controller arrives at the second controller, passes through a plurality of gateways and the time spent on the transmission link;
the time period 2, the acknowledgement message replied by the second controller reaches the first controller, passes through a plurality of gateways and consumes time on a transmission link;
time period 3, time spent by the second controller writing data;
the response message replied by the second controller reaches the first controller in the time period 4, and passes through a plurality of gateways and the time consumed on the transmission link;
and 5, the time interval between the processing after the first controller receives the response message and the transmission of the next packet of data.
When continuous multi-packet data transmission is performed, as shown in fig. 4, the overall time consumption is compared with the traditional data transmission time consumption, so long as the first controller confirms that the second controller has received the last packet data, the next packet data is sent, and the time period 3-5 corresponding to the last packet data packet and the time period 1-2 corresponding to the next packet data packet can be performed simultaneously. Therefore, the steps of data packet transmission and writing are separated, the transmission and writing processes of different data packets can be simultaneously carried out, the time consumed by data transmission can be greatly shortened, and the software refreshing speed is improved.
As an alternative embodiment, the method may further include:
under the condition that a third data packet sent by the first controller is received, storing the third data packet into a tail position of a preset target queue;
acquiring a fourth data packet from the target queue, and writing the fourth data packet into a target application program to obtain a response message of the third data packet;
transmitting a response message of the third data packet to the first controller;
the response message of the third data packet and the acknowledgement message of the first data packet are used for indicating the first controller to send a second data packet to the second controller.
In this embodiment, the first controller continuously transmits two packets, namely, the third packet and the first packet, to the second controller. After receiving the third data packet and the first data packet, the second controller sequentially feeds back a confirmation message of the third data packet and the confirmation message of the first data packet to the first controller, sequentially responds to the third data packet and the first data packet, and sequentially feeds back a response message of the third data packet and a response message of the first data packet to the first controller. After receiving the acknowledgement message of the first data packet and the response message of the third data packet, the first controller sends the second data packet to the second controller.
When continuous multi-packet data transmission is performed, the overall time consumption is compared with the time consumption of conventional data transmission, as shown in fig. 5, and the data transmission optimization time is still the time period 3-5, namely the time consumed by the second controller for writing data, the time consumed by the response replied by the second controller on the network link, and the processing time after the first controller receives the response.
Even if the response of the data package to wait for the data package is limited in this way, compared with the prior art, the time consumed by the whole data transmission is still greatly reduced, and the optimizing effect is gradually increased along with the increase of the transmission times.
As an optional embodiment, the obtaining the fourth data packet from the target queue includes:
and acquiring a fourth data packet positioned at the head position of the target queue.
In this embodiment, the target Queue may be a FIFO Queue (First-In, first-Out Queue) In which the insertion and deletion operations of the data items are performed at one end of the Queue. The new data item is always inserted at the end of the queue, while the data items in the queue are sequentially arranged in the order of insertion, i.e. the first-inserted data item is first-out. Therefore, the sequence of the data writing target application program in the second controller and the sequence of the data transmission are ensured to be the same, and the accuracy of software refreshing is ensured.
As an optional embodiment, when receiving the third data packet sent by the first controller, storing the third data packet in a tail position of a preset target queue, where the tail position includes:
checking whether the execution of the third data packet has a fault or not under the condition that the third data packet is received;
and storing the third data packet into a preset tail position of a target queue under the condition that the check result is that no fault exists in the third data packet.
In this embodiment, the second controller may include a daemon process and an application program process. Daemons are a special process that automatically starts when the operating system is started. It is generally responsible for monitoring the state and operation of the system, as well as handling various system-level tasks such as device management, network connections, file systems, etc. The application program process comprises a target application program to be upgraded.
Specifically, after the first controller sends the third data packet to the second controller, the daemon receives the third data packet, then generates a confirmation message of the third data packet and sends the confirmation message to the first controller, then checks whether the third data packet has a fault, that is, whether the third data packet cannot be executed or causes an execution error, and if the check result is that the third data packet has no fault, the daemon may insert the third data packet into the tail position of the target queue.
And then, the daemon process can acquire a data packet from the queue head of the target queue and send the data packet to the application program process, the application program process can write the received data packet into the target application program and send the written result to the daemon process, and the daemon process generates a response message of a third data packet according to the written result.
Based on the data transmission method provided by the embodiment, correspondingly, the application further provides a specific implementation mode of the data transmission device. Please refer to the following examples.
Referring first to fig. 6, a data transmission apparatus 600 provided in an embodiment of the present application includes the following modules:
a first sending module 601, configured to send a first data packet to a second controller, where the first data packet is any one of a plurality of data packets arranged according to a preset sequence, and the plurality of data packets are used to upgrade a target application program on a vehicle;
and a second sending module 602, configured to send a second data packet to the second controller when receiving an acknowledgement packet of the first data packet, where the second data packet is a next data packet of the first data packets in the plurality of data packets, and the acknowledgement packet of the first data packet is used to characterize that the first data packet is received by the second controller.
The device can send the next packet of the first data packet by the first controller as long as the first controller confirms that the first data packet is received by the second controller in the process of continuously transmitting the multi-packet data packet, without waiting for a response message of the first data packet, and then send the next packet of the first data packet. Compared with the related art, the method has the advantages that the separation of data packet transmission and writing is realized, and the transmission of the next data packet and the writing of the last data packet can be simultaneously carried out, so that the time required by the whole writing process is greatly shortened, and the writing efficiency is improved.
As an implementation manner of the present application, the second sending module 602 may be further configured to:
judging whether a response message of a third data packet is received under the condition that the acknowledgement message of the first data packet is received, wherein the third data packet is a last data packet of the first data packet in the plurality of data packets, and the response message of the third data packet is used for representing that after the third data packet is received by the second controller, one data packet is written into a target application program;
and sending the second data packet to the second controller under the condition that the response message of the third data packet is received.
As an implementation manner of the present application, the data transmission apparatus 600 may further include:
the third sending module is used for sending a confirmation message of the first data packet to the first controller under the condition that the first data packet sent by the first controller is received;
the acknowledgement message of the first data packet is used for indicating the first controller to send a second data packet to the second controller.
As an implementation manner of the present application, the data transmission apparatus 600 may be further configured to:
under the condition that a third data packet sent by the first controller is received, storing the third data packet into a tail position of a preset target queue;
acquiring a fourth data packet from the target queue, and writing the fourth data packet into a target application program to obtain a response message of the third data packet;
transmitting a response message of the third data packet to the first controller;
the response message of the third data packet and the acknowledgement message of the first data packet are used for indicating the first controller to send a second data packet to the second controller.
As an implementation manner of the present application, the data transmission apparatus 600 may further include:
and the acquisition unit is used for acquiring the fourth data packet positioned at the head position of the target queue.
As an implementation manner of the present application, the data transmission apparatus 600 may be further configured to:
checking whether the execution of the third data packet has a fault or not under the condition that the third data packet is received;
and storing the third data packet into a preset tail position of a target queue under the condition that the check result is that no fault exists in the third data packet.
The data transmission device provided by the embodiment of the present application can implement each step in the above method embodiment, and in order to avoid repetition, the description is omitted here.
Fig. 7 is a schematic diagram of a hardware structure of a data transmission device according to an embodiment of the present application.
A processor 701 may be included in the data transmission device, as well as a memory 702 in which computer program instructions are stored.
In particular, the processor 701 may comprise a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits implementing embodiments of the present application.
Memory 702 may include mass storage for data or instructions. By way of example, and not limitation, memory 702 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. The memory 702 may include removable or non-removable (or fixed) media, where appropriate. Memory 702 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 702 is a non-volatile solid state memory.
The memory may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to methods in accordance with aspects of the present disclosure.
The processor 701 implements any of the data transmission methods of the above embodiments by reading and executing computer program instructions stored in the memory 702.
In one example, the data transfer device may also include a communication interface 703 and a bus 710. As shown in fig. 7, the processor 701, the memory 702, and the communication interface 703 are connected by a bus 710 and perform communication with each other.
The communication interface 703 is mainly used for implementing communication between each module, device, unit and/or apparatus in the embodiment of the present application.
Bus 710 includes hardware, software, or both that couple the components of the data transfer device to one another. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 710 may include one or more buses, where appropriate. Although embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect.
The data transmission device may be based on the above embodiments, thereby implementing the data transmission method and apparatus described above in combination.
In addition, in combination with the data transmission method in the above embodiment, the embodiment of the present application may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by the processor, implement any one of the data transmission methods in the above embodiments, and achieve the same technical effects, and in order to avoid repetition, will not be described herein. The computer readable storage medium may include a non-transitory computer readable storage medium, such as Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk, and the like, but is not limited thereto.
In addition, the embodiment of the application also provides a computer program product, which comprises computer program instructions, wherein the computer program instructions can realize the steps and corresponding contents of the embodiment of the method when being executed by a processor.
It should be understood that the application is not limited to the particular arrangements and instrumentality described above and shown in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this disclosure describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, or may be performed in a different order from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any equivalent modifications or substitutions can be easily made by those skilled in the art within the technical scope of the present application, and they should be included in the scope of the present application.

Claims (10)

1. A method of data transmission, the method being applied to a first controller, the method comprising:
a first data packet is sent to a second controller, wherein the first data packet is any one of a plurality of data packets arranged according to a preset sequence, and the plurality of data packets are used for upgrading a target application program on a vehicle;
and under the condition that the acknowledgement message of the first data packet is received, sending a second data packet to the second controller, wherein the second data packet is the next data packet of the first data packet in the plurality of data packets, and the acknowledgement message of the first data packet is used for representing that the first data packet is received by the second controller.
2. The method according to claim 1, wherein the sending the second data packet to the second controller in the case of receiving the acknowledgement packet of the first data packet includes:
judging whether a response message of a third data packet is received under the condition that the acknowledgement message of the first data packet is received, wherein the third data packet is a last data packet of the first data packet in the plurality of data packets, and the response message of the third data packet is used for representing that one data packet is written into a target application program after the third data packet is received by the second controller;
and sending the second data packet to the second controller under the condition that the response message of the third data packet is received.
3. A method of data transmission, the method being applied to a second controller, the method comprising:
under the condition that a first data packet sent by a first controller is received, sending a confirmation message of the first data packet to the first controller;
the acknowledgement message of the first data packet is used for indicating the first controller to send a second data packet to the second controller.
4. A data transmission method according to claim 3, characterized in that the method further comprises:
under the condition that a third data packet sent by the first controller is received, storing the third data packet into a tail position of a preset target queue;
acquiring a fourth data packet from the target queue, and writing the fourth data packet into a target application program to obtain a response message of the third data packet;
transmitting a response message of the third data packet to the first controller;
the response message of the third data packet and the acknowledgement message of the first data packet are used for indicating the first controller to send a second data packet to the second controller.
5. The method of claim 4, wherein the obtaining the fourth data packet from the target queue comprises:
and acquiring a fourth data packet positioned at the head position of the target queue.
6. The method according to claim 4, wherein storing the third data packet in the tail position of the target queue set in advance when the third data packet sent by the first controller is received, comprises:
checking whether the execution of the third data packet has a fault or not under the condition that the third data packet is received;
and storing the third data packet into a preset tail position of a target queue under the condition that the check result is that no fault exists in the third data packet.
7. A data transmission apparatus, the apparatus comprising:
the system comprises a first sending module, a second controller and a first control module, wherein the first sending module is used for sending a first data packet to the second controller, the first data packet is any one of a plurality of data packets arranged according to a preset sequence, and the plurality of data packets are used for upgrading a target application program on a vehicle;
and the second sending module is used for sending a second data packet to the second controller under the condition that the acknowledgement message of the first data packet is received, wherein the second data packet is the next data packet of the first data packet in the plurality of data packets, and the acknowledgement message of the first data packet is used for representing that the first data packet is received by the second controller.
8. A data transmission apparatus, characterized in that the data transmission apparatus comprises: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the data transmission method according to any one of claims 1-6.
9. A computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement the data transmission method according to any of claims 1-6.
10. A computer program product, characterized in that it comprises computer program instructions which, when executed by a processor, implement the data transmission method of any one of claims 1-6.
CN202311185424.5A 2023-09-14 2023-09-14 Data transmission method, apparatus, device, storage medium and program product Pending CN117082475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311185424.5A CN117082475A (en) 2023-09-14 2023-09-14 Data transmission method, apparatus, device, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311185424.5A CN117082475A (en) 2023-09-14 2023-09-14 Data transmission method, apparatus, device, storage medium and program product

Publications (1)

Publication Number Publication Date
CN117082475A true CN117082475A (en) 2023-11-17

Family

ID=88709817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311185424.5A Pending CN117082475A (en) 2023-09-14 2023-09-14 Data transmission method, apparatus, device, storage medium and program product

Country Status (1)

Country Link
CN (1) CN117082475A (en)

Similar Documents

Publication Publication Date Title
EP3657757B1 (en) Illegality detection electronic control unit, car onboard network system, and illegality detection method
US10153825B2 (en) Vehicle-mounted control device
EP3496369A1 (en) In-vehicle relay device, information processing device, relay device, information processing method, non-transitory storage medium storing program executable by relay device, information processing system, vehicle, and external device
US10274919B2 (en) Method, device and computer program product for programming a plurality of control units
CN115202943A (en) Data accelerator card, chip test system, method and electronic equipment
US11190332B2 (en) Operation method of communication node for time synchronization in vehicle network
CN117082475A (en) Data transmission method, apparatus, device, storage medium and program product
US20120096195A1 (en) Data transfer device and data transfer method
KR101612825B1 (en) Can controller, gateway for internal vehicle communication and control method the same
JP2009253464A (en) Gateway device and gateway method
EP4040735A1 (en) Vehicle control device and data transfer control method
CN113572817B (en) Vehicle-mounted interface platform system and communication system under cloud platform
CN115032962A (en) Calibration system and method of vehicle ECU, signal transceiver and storage medium
CN114338270A (en) Data communication method, device, electronic equipment and storage medium
KR20160140038A (en) Vehicle Terminal System for Freight Transport Safety
US9794197B2 (en) Method and apparatus for transmitting can frame
JP2013082352A (en) Communication equipment for vehicle
CN106685584B (en) HDLC transceiver controller based on FPGA
CN113485412B (en) Method and system for distinguishing return by using multilink data signal source by unmanned aerial vehicle
CN111338680B (en) Firmware upgrading method, firmware upgrading device and terminal of slave station
CN112732429A (en) Task scheduling method, device, equipment and storage medium
EP4224801A1 (en) Data communication methods and apparatuses, electronic device and storage medium
CN116931982A (en) Configuration method and device and vehicle
CN117421267A (en) Data channel deadlock prevention method, device, equipment and medium
CN113556294A (en) Data transmitting/receiving method, data transmitting/receiving device, server, and storage 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