WO2019179359A1 - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
WO2019179359A1
WO2019179359A1 PCT/CN2019/078268 CN2019078268W WO2019179359A1 WO 2019179359 A1 WO2019179359 A1 WO 2019179359A1 CN 2019078268 W CN2019078268 W CN 2019078268W WO 2019179359 A1 WO2019179359 A1 WO 2019179359A1
Authority
WO
WIPO (PCT)
Prior art keywords
operation instruction
retransmission
time
duration
target
Prior art date
Application number
PCT/CN2019/078268
Other languages
French (fr)
Chinese (zh)
Inventor
刘波
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2019179359A1 publication Critical patent/WO2019179359A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1829Arrangements specially adapted for the receiver end
    • H04L1/1854Scheduling and prioritising arrangements

Definitions

  • Embodiments of the present disclosure relate to the field of communications technologies, and, for example, relate to a data transmission method and apparatus.
  • the vehicle networking equipment is a device that uses the vehicle networking technology to collect, store and transmit all the working conditions of the vehicle, the static information and the dynamic information of the vehicle, and the vehicle networking equipment includes a Micro Controller Unit (MCU) and a vehicle networking unit.
  • MCU Micro Controller Unit
  • the car networking unit and the MCU cooperate, the MCU reports the vehicle data to the car networking unit, and the vehicle network unit uploads the vehicle data to the server through the wireless network, and then the server pushes the message to the mobile phone. application.
  • the user sends the remote control command to the server through the mobile phone application, and then the server sends the remote control command to the car networking unit, and the car network unit sends the remote control command to the MCU, and then the MCU passes the controller area network of the vehicle (Controller Area Network, The CAN) bus sends commands to one or more Electronic Control Units (ECUs) for remote control. Therefore, it can be seen from the above process that the stability of the MCU is particularly important for the normal application of the Internet of Vehicles technology.
  • ECUs Electronic Control Units
  • the car networking unit when the car networking unit sends an operation instruction to the MCU, the MCU replies with the confirmation information for the operation instruction, and when the MCU is in a busy state or other special situation and does not reply the confirmation message within the preset time interval, the car networking unit will Re-send the operation command to the MCU.
  • the embodiments of the present disclosure provide a data transmission method and apparatus, which can dynamically adjust a retransmission interval, thereby reducing the load of the MCU and preventing congestion of the MCU.
  • an embodiment of the present disclosure provides a data transmission method, which is applied to a car networking unit, and includes:
  • an embodiment of the present disclosure further provides a data transmission method, which is applied to an MCU, and includes:
  • an embodiment of the present disclosure further provides a car networking unit, including:
  • a sending module configured to sequentially send a plurality of first operation instructions to the MCU
  • a receiving module configured to receive an acknowledgement message of the at least one first operation instruction of the plurality of first operation instructions
  • a processing module configured to determine a target retransmission interval according to the receiving duration of the acknowledgement message and the current retransmission interval
  • the processing module is further configured to determine, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return an acknowledgement message;
  • the sending module is further configured to resend the first operation instruction of the non-return confirmation message according to the retransmission time.
  • an MCU including:
  • a receiving module configured to receive a plurality of first operation instructions sent by the car networking unit
  • a processing module configured to generate a confirmation message of the at least one first operation instruction of the plurality of first operation instructions
  • a sending module configured to send the generated confirmation message to the car networking unit
  • the receiving module is further configured to receive a first operation instruction that the car networking unit resends the non-return confirmation message according to the obtained retransmission time.
  • FIG. 1 is a schematic flowchart diagram of a data transmission method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic flowchart diagram of another data transmission method according to an embodiment of the present disclosure.
  • FIG. 3 is a schematic flowchart diagram of still another data transmission method according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic flowchart diagram of still another data transmission method according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart of still another data transmission method according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic flowchart diagram of still another data transmission method according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a vehicle networking unit according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of an MCU according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of another vehicle networking unit according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of another MCU according to an embodiment of the present disclosure.
  • the embodiment of the present disclosure provides a data transmission method. As shown in FIG. 1 , the method includes steps 110 to 150.
  • Step 110 The vehicle networking unit sequentially sends a plurality of first operation instructions to the MCU.
  • the operation instruction is an instruction to return the confirmation information after the receiving device receives the operation instruction, and the first operation instruction is to distinguish the second operation instruction sent by the MCU to the car networking unit.
  • Step 120 Receive an acknowledgement message of at least one of the plurality of first operation instructions sent by the MCU.
  • Step 130 Determine a target retransmission interval according to the receiving duration of the acknowledgement message and the current retransmission interval.
  • Step 140 Determine, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return the confirmation message.
  • Step 150 Resend the first operation instruction that does not return the confirmation message according to the retransmission time.
  • resending the first first operation instruction to the MCU according to the first retransmission interval means: after transmitting all the first operation instructions to the MCU, the first retransmission interval is interval, and then resending all the MCUs to the MCU.
  • the first first operational instruction in the first operational instruction is
  • the car networking unit sequentially sends a plurality of first operation instructions to the micro control unit MCU; and receives an acknowledgement message of at least one of the plurality of first operation instructions sent by the MCU; If the confirmation message is an acknowledgement message of any one of the plurality of operation instructions, determining a target retransmission interval according to the reception duration of the confirmation message and the current retransmission interval; determining that the confirmation message is not returned according to the obtained target retransmission interval The retransmission time of the first operation instruction; resending the first operation instruction that does not return the confirmation message according to the obtained retransmission time.
  • the target retransmission interval is re-determined according to the reception duration of the acknowledgment message and the current retransmission interval, and then retransmitted according to the determined target.
  • the interval re-determines the retransmission time of the first operation instruction that does not return the confirmation message, thereby realizing the purpose of adjusting the retransmission frequency of the first operation instruction according to the feedback condition of the first operation instruction, thereby reducing the load of the MCU, and greatly Prevents congestion in the MCU.
  • the method further includes:
  • the first operational instruction that has been issued is placed in a pre-established retransmission queue.
  • the method further includes:
  • Determining, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return the confirmation message including:
  • a retransmission time of the first operation instruction in the retransmission queue is determined according to the target retransmission interval.
  • the first operation instruction when the number of retransmissions of any one of the first operation instructions exceeds the preset number of retransmissions and the acknowledgment message sent by the MCU is still not received, the first operation instruction is not sent; wherein, the number of retransmissions is preset. It can be set to 2 times or other times, which is not limited in the present disclosure.
  • determining, according to the target retransmission interval, a retransmission time of the first operation instruction in the retransmission queue including:
  • the latest transmission time of the first operation instruction in the obtained retransmission queue is added to the target retransmission interval to obtain the retransmission time of the first operation instruction in the retransmission queue.
  • determining a target retransmission interval according to the receiving duration of the acknowledgment message and the current retransmission interval includes:
  • the receiving time of the confirmation message is obtained according to the obtained first sending time and receiving time.
  • the target retransmission interval is set to be larger than the current retransmission interval.
  • the target retransmission interval may be twice the preset retransmission interval, and may be any time interval greater than the preset retransmission interval, which is not limited in the disclosure.
  • the method further includes: setting a target retransmission interval to a preset retransmission interval if a ratio of the receiving duration to the preset retransmission interval is not greater than a preset threshold.
  • the preset retransmission interval may be obtained by calculating a maximum number of bytes allowed by the first operation instruction divided by a baud rate transmitted in the MCU duplex mode and multiplying by 2, wherein the first operation instruction allows The maximum number of bytes is fixed.
  • the method further includes: the current retransmission interval is not a preset retransmission interval, and the receiving duration is greater than a product of the preset retransmission interval and the preset threshold, and the receiving duration is less than the current retransmission interval and the preamble When the product of the threshold is set, the target retransmission interval is set to the current retransmission interval.
  • the current retransmission interval is a preset retransmission interval.
  • the data transmission method provided by the embodiment of the present disclosure can adjust the retransmission interval in real time according to the feedback of the MCU for the confirmation information of the operation instruction, thereby reducing the load of the MCU and greatly preventing the MCU from being congested.
  • the embodiment of the present disclosure further provides an application scenario to describe a data transmission method provided by an embodiment of the present disclosure. As shown in FIG. 2, the method includes steps 201 to 208.
  • Step 201 The vehicle networking unit starts to determine the indication value of the instruction group (request command and response command) according to the definition of the service (usually, each service instruction saves a label value by itself, and automatically increases during the sending process. 0–255 loop assignment), then send the instruction to the MCU, and store the instruction in the retransmission queue.
  • the number of retransmissions is 3, more than 3 times, and the instruction is considered to have failed to be sent.
  • Step 202 Search for a corresponding instruction in the retransmission queue by using the marked value of the instruction group, so as to determine that the confirmation message is an acknowledgement message of the sending instruction in the instruction group, if the identifier value of the confirmation message is in the retransmission queue. If the corresponding instruction is not found, the acknowledgment message is considered invalid and discarded directly. If it is confirmed that the confirmation message is valid, it starts to calculate whether the time when the instruction is sent until the confirmation is received is within the interval of the retransmission time, and if it is within the time interval, it proceeds to step 206, if the time interval is exceeded If the confirmation message is not received, the process proceeds to step 203.
  • Step 203 The instruction to be resent is found in the retransmission queue, and is sent to the MCU again at a interval greater than the retransmission time. After the transmission is completed, the process proceeds to step 204.
  • Step 204 Determine whether the number of retransmissions of the instruction in the current retransmission queue is already 3, and if yes, the instruction is not resent, and the process proceeds to step 205. Otherwise, the process proceeds to step 202 to continue to determine whether the retransmission interval is The MCU confirmation message is received within the time.
  • step 205 it is considered that the currently sent instruction fails to reach the MCU, confirms that the transmission fails, and deletes the instruction in the retransmission queue.
  • Step 206 Determine whether the time from the sending of the instruction to the received MCU is consistent with the condition for adjusting the retransmission interval.
  • This condition includes two cases. First, if the time is greater than 90% of the retransmission interval but still During the retransmission interval, the retransmission interval should be adjusted, and the retransmission interval value is multiplied by 2. This indicates that the current load of the MCU has a tendency to increase, and the speed at which the command is sent should be reduced to prevent the MCU from being heavily loaded. , continue to increase the send command to the MCU, causing a vicious circle; second, if it is less than 90% of the default retransmission interval, proceed to step 208. If the time is less than 90% of the modified retransmission interval but greater than 90% of the default retransmission interval, then proceed to step 207 to keep the retransmission interval unchanged.
  • Step 207 When the car network unit receives the confirmation message of the MCU, first delete the instruction that has been acknowledged by the MCU in the retransmission queue, and keep the retransmission interval unchanged. Then returning to step 202, it continues to determine whether the next acknowledgment message sent by the MCU can be received within the retransmission interval.
  • step 208 the instruction retransmission interval in the retransmission queue is adjusted. If the interval is increased, the retransmission interval is directly multiplied by 2. If the default value is required to be restored, the retransmission interval is directly modified to a default value.
  • Another embodiment of the present disclosure provides a data transmission method. As shown in FIG. 3, the method includes steps 310 to 340.
  • Step 310 The MCU receives a plurality of first operation instructions sent by the car networking unit.
  • Step 320 Generate an acknowledgement message of at least one of the plurality of first operation instructions.
  • Step 330 Send the generated confirmation message to the car networking unit.
  • Step 340 The receiving car networking unit resends the first operation instruction that does not return the confirmation message according to the obtained retransmission time.
  • the retransmission time is determined by the car networking unit according to the receiving duration of the confirmation message and the current retransmission interval.
  • the MCU receives a plurality of first operation instructions sent by the car networking unit; generates a confirmation message of the at least one of the plurality of first operation instructions; when generating any one of the first operations Sending the generated confirmation message to the vehicle networking unit when the confirmation information is instructed; the receiving vehicle networking unit resending the first operation instruction of the non-returning confirmation message according to the obtained retransmission time; wherein, the retransmission time is the vehicle networking unit according to the confirmation message
  • the receiving duration and the current retransmission interval are determined.
  • the retransmission frequency of the first operation instruction is adjusted according to the feedback condition according to the first operation instruction.
  • the purpose is to reduce the load on the MCU and greatly prevent the MCU from being congested.
  • the MCU before or after the first operation instruction sent by the MCU receiving the car networking unit, the MCU further includes:
  • Step 350 Send the data to be reported to the car network unit when the preset reporting period is reached.
  • the preset reporting period may be preset.
  • the MCU sends the to-be-reported data to the vehicle network unit every time the preset reporting period is reached.
  • the data to be reported is the collected vehicle body data, such as fuel consumption data. .
  • Step 360 Send a second operation instruction to the vehicle network unit after the time when the data to be reported is sent and the time before the next preset reporting period arrives.
  • the second operational command is to distinguish the first operational command sent by the car networking unit to the MCU.
  • the second operational command may be a triggering event, such as opening a door and closing a door.
  • the MCU when the preset reporting period is reached, the MCU sends the data to be reported to the vehicle networking unit; and the inbound vehicle network unit is sent to the vehicle before the next preset reporting period is reached after the data to be reported is sent.
  • Send a second operation instruction It can be seen from the embodiment of the present disclosure that the second operation instruction is sent only in the interval after the data to be reported is sent between the two preset reporting periods, so that the data to be reported can be reported to the car networking unit in time; The data to be reported and the second operation instruction can be transmitted in turn, thereby reducing the load on the MCU and greatly preventing the MCU from being congested.
  • the second operation instruction is sent to the vehicle network unit, including:
  • step 360a the length of time after the data to be reported is sent and the time before the next preset reporting period arrives is obtained, and the obtained duration is taken as the first duration.
  • Step 360b Obtain the length of time required to send all the second operation instructions, and use the obtained duration as the second duration.
  • determining whether the first duration is less than the second duration is determining whether the second operation instruction can be sent after the time when the data to be reported is sent and before the arrival of the next preset reporting period is reached.
  • Step 360c Send all second operation instructions to the car networking unit if the first time length is not less than the second time length.
  • all the second operation instructions can be sent within the length of time after the data transmission is completed and until the next preset reporting period arrives.
  • the method further includes:
  • Step 360d Obtain the type of all the second operation instructions.
  • many of the events may be the same type of events, such as changes in the state of the door, etc., so that a certain type of the second operation instruction may be acquired to merge the certain These second operational instructions.
  • Step 360e When there is a second operation instruction of the same type, the second operation instruction of the same type is obtained, and the obtained second operation instruction is used as the operation instruction to be processed.
  • the number of operation instructions to be processed may be two or more, depending on how many second operation instructions of the same type are determined, and the operation instructions to be processed may also include multiple groups.
  • a second operation instruction of the same type For example, assume that all of the second operation instructions include the second operation instruction A, the second operation instruction B, the second operation instruction C, the second operation instruction D, the second operation instruction E, the second operation instruction F, and the second operation instruction G a second operation instruction H, wherein the second operation instruction A and the second operation instruction C have the same type, and the second operation instruction D, the second operation instruction F, and the second operation instruction H have the same type, and the operation instruction to be processed It is the second operation command A, the second operation command C, the second operation command D, the second operation command F, and the second operation command H.
  • Step 360f Obtain an operation instruction with the latest generation time in the to-be-processed operation instruction, and merge with the second operation instruction except the operation instruction to be processed to obtain a target operation instruction.
  • the above-mentioned assumed example is still used, and it is assumed that the second operation instruction A and the second operation instruction C are generated later than the second operation instruction A, and the second operation instruction D and the second operation instruction are F and the second operation instruction H have the latest generation time of the second operation instruction D, then the second operation instruction A, the second operation instruction B, the second operation instruction D, the second operation instruction E, and the second operation instruction G are Target operation instruction.
  • Step 360g Obtain the length of time required to send the target operation instruction, and use the obtained duration as the third duration.
  • Step 360h When the first duration is not less than the third duration, all target operation instructions are sent to the car networking unit.
  • the first duration when the first duration is not less than the third duration, it indicates that all the target operation instructions can be sent after the time when the data to be reported is sent and until the next preset reporting period arrives.
  • the method when the first duration is less than the third duration, the method further includes:
  • step 360i the priority of the type to which the target operation instruction belongs is obtained in the correspondence between the pre-established type and the priority.
  • Step 360j arranging the target operation instructions according to the priority level.
  • Step 360k Obtain the number of operation instructions that can be sent within the first time period, and use the obtained number as the first target number.
  • Step 360l Obtain the target operation instruction with the same number of the first target in the order of priority from the highest to the lower target operation command, and send it to the vehicle network unit.
  • step 360m the remaining target operation instructions are left to be sent to the fourth time length.
  • the fourth duration is the duration of the next preset reporting period after the data is sent to the next (ie, next) preset reporting period.
  • the second operation instruction is sent to the vehicle networking unit within a period of time before the arrival of the next preset reporting period, including:
  • Step 360n Send a second operation instruction in the cache queue to the car network unit after the time when the data to be reported is sent and until the time before the next preset report period arrives.
  • the method further includes:
  • Step 370 If the confirmation information for the second operation instruction sent by the car network unit is not received within the preset time period, the second operation instruction is placed at the end of the cache queue.
  • the preset duration is the maximum number of bytes allowed by the second operational command divided by the baud rate transmitted in the MCU duplex mode and multiplied by two.
  • the MCU when the preset reporting period is reached, the MCU sends the data to be reported to the car network unit; after the data to be reported is sent to the time before the arrival of the next preset reporting period, the in-vehicle network unit Send a second operation instruction.
  • the second operation instruction is sent only in the interval after the data to be reported is sent between the two preset reporting periods, so that the data to be reported can be reported to the car networking unit in time;
  • Some of the second operation instructions enable the data to be reported and the second operation instruction to be transmitted in turn, thereby reducing the load on the MCU and greatly preventing the MCU from being congested.
  • the present disclosure also provides an application scenario (only the second operation instruction is sent) to describe the data transmission method provided by the embodiment of the present disclosure. As shown in FIG. 4, the method includes steps 401 to 406.
  • Step 401 The MCU starts to determine the indication value of the instruction group (request command and response instruction) according to the definition of the service (usually, each service instruction saves a label value by itself, and automatically increases during the sending process, from 0 to – 255 loop assignment), then send the instruction to the car networking unit, and store the instruction in the retransmission queue.
  • the number of retransmissions is 3, more than 3 times, and the instruction is considered to have failed to be sent.
  • Step 402 Searching for a corresponding instruction in the retransmission queue by using the marked value of the instruction group, so as to determine that the confirmation message is an acknowledgement message of the sending instruction in the instruction group, if the identifier value of the confirmation message is in the retransmission queue. If the corresponding instruction is not found, the confirmation message is considered invalid, and is directly discarded, and the process proceeds to step 403. If it is confirmed that this confirmation message is valid, it proceeds to step 405.
  • Step 403 Find the instruction to be resent in the retransmission queue, and send it to the car networking unit again. At the same time, delay the retransmission time of the instruction in the retransmission queue by one retransmission interval. After the transmission is completed, the judgment 404 is entered.
  • Step 404 Determine whether the number of retransmissions of the current retransmission is 3, if not 3, return to the judgment 402, continue to determine whether the confirmation message can be received, and if the number of retransmissions is 3, proceed to step 406.
  • Step 405 Delete the instruction in the retransmission queue because the instruction has been acknowledged to be received.
  • Step 406 because the retransmission is repeated 3 times, no acknowledgement is received that the instruction is received, it is determined that the instruction fails to be sent, and then the instruction in the retransmission queue is deleted.
  • the present disclosure also provides an application scenario (only the data to be reported is sent) to describe the data transmission method provided by the embodiment of the present disclosure. As shown in FIG. 5, the method includes steps 501 to 505.
  • Step 501 The MCU packs data such as vehicle status into a second operation instruction, and estimates a time T1 required for transmitting the data, and prepares to send the instructions through the serial port.
  • Step 502 The MCU determines whether the sending queue has data waiting to be sent. If yes, step 503 is performed; if not, step 504 is performed.
  • Step 503 The MCU sends a second operation instruction through the serial port, and then starts sending the transmission queue data after about T1 seconds.
  • Step 504 The MCU suspends sending the second operation instruction stored in the sending queue to prepare for sending the data to be reported. At this time, the new second operation instruction is still stored in the sending queue and is waiting to be sent.
  • Step 505 The MCU enters the next period of sending the second operation instruction. When the reporting condition is met, step 501 is continued.
  • the present disclosure also provides an application scenario (both to send data to be reported and a second operation command) to describe the data transmission method provided by the embodiment of the present disclosure. As shown in FIG. 6, the method includes steps 601 to 608.
  • Step 601 After the MCU is powered on, calculate the data amount of the second operation instruction periodically reported, and the time T1 taken to send the data, which is calculated according to half of the bandwidth of the serial port (because of the duplex mode), thereby estimating Give a reasonable time value. Then, when the data to be reported is started to be sent, the current time T2 is recorded, and the time T3 reported by the next group of second operation instructions is calculated. The difference between T1 and T2 is subtracted by T3, which is the time when the serial port is relatively idle. Time to send the detected second operation instruction to be reported.
  • Step 602 Detecting that there are second operation instructions to be sent, and storing the instructions into a sending queue.
  • Step 603 Detect whether the current time is reported by the second operation instruction, and if so, wait for the data to complete the transmission, and then read the instruction group in the transmission queue to the transmission buffer, and calculate the time required to send the data.
  • Step 604 If the time required to send the buffered data is less than the time reported by the current time to the next fixed period, all of them are sent out in sequence, and step 605 is performed; if the time is greater than the current time to the next fixed period. Then, step 606 is performed.
  • Step 605 Send the data command in the sending buffer to the car networking unit in sequence.
  • the determination 606 is to first put the instruction with the higher priority into the sending buffer, and then determine whether the instruction in the current sending buffer has an event of the same type. If yes, execute step 608; if not, execute step 607.
  • Step 607 Send the data in the transmission buffer to the car network unit according to the maximum amount of data that can be sent in the time reported by the current time to the next fixed period.
  • the instruction that failed to be sent in the transmission buffer, when executed 603, constitutes the data of the transmission buffer together with the instruction just read from the transmission queue.
  • Step 608 the same type of event, such as multiple right front door state changes, multiple right rear door state changes, multiple hood state changes, etc. are classified into a plurality of consecutive events, because the server's data reporting strategy In the case, these events correspond to one message, so the order of these states, which is based on the last state, is merged into a final state, reducing the amount of data in the send buffer. Go to step 601.
  • the vehicle networking unit 7 includes:
  • the first sending module 701 is configured to sequentially send a plurality of first operation instructions to the MCU.
  • the first receiving module 702 is configured to receive an acknowledgement message of the at least one first operation instruction of the plurality of first operation instructions sent by the MCU.
  • the first processing module 703 is configured to determine a target retransmission interval according to the receiving duration of the acknowledgement message and the current retransmission interval.
  • the first processing module 703 is further configured to determine, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return the confirmation message.
  • the first sending module 701 is further configured to resend the first operation instruction that does not return the confirmation message according to the retransmission time.
  • the first processing module 703 is further configured to:
  • the first operational instruction that has been issued is placed in a pre-established retransmission queue.
  • the first processing module 703 is configured to determine, according to the target retransmission interval, a retransmission time of the first operation instruction in the retransmission queue.
  • the first processing module 703 is configured to:
  • the latest transmission time of the first operation instruction in the obtained retransmission queue is added to the target retransmission interval to obtain the retransmission time of the first operation instruction in the retransmission queue.
  • the first processing module 703 is configured to:
  • the receiving time of the confirmation message is obtained according to the obtained first sending time and receiving time.
  • the target retransmission interval is set to be larger than the current retransmission interval.
  • the first processing module 703 is further configured to set the target retransmission interval to be the preset retransmission interval.
  • the current retransmission interval is not a preset retransmission interval
  • the receiving duration is greater than a product of a preset retransmission interval and a preset threshold
  • the receiving duration is less than a product of a current retransmission interval and a preset threshold.
  • the first processing module 703 is further configured to set the target retransmission interval to the current retransmission interval.
  • the current retransmission interval is a preset retransmission interval.
  • the vehicle networking unit sequentially sends a plurality of first operation instructions to the micro control unit MCU; and receives an acknowledgement message of at least one of the plurality of first operation instructions sent by the MCU; In the case of an acknowledgment message of any one of the plurality of first operation instructions, determining a target retransmission interval according to the reception duration of the acknowledgment message and the current retransmission interval; determining that the acknowledgment message is not returned according to the obtained target retransmission interval The retransmission time of the first operation instruction; resending the first operation instruction that does not return the confirmation message according to the obtained retransmission time.
  • the target retransmission interval is re-determined according to the reception duration of the acknowledgment message and the current retransmission interval, and then retransmitted according to the determined target.
  • the interval re-determines the retransmission time of the first operation instruction that does not return the confirmation message, thereby realizing the purpose of adjusting the retransmission frequency of the first operation instruction according to the feedback condition according to the first operation instruction, thereby reducing the load of the MCU, and greatly The MCU is prevented from being congested.
  • the first sending module 701, the first receiving module 702, and the first processing module 703 may each be a central processing unit (CPU), a microprocessor (Micro Processor Unit, MPU) located in the vehicle networking unit. ), digital signal processor (DSP) or Field Programmable Gate Array (FPGA) implementation.
  • CPU central processing unit
  • MPU Micro Processor Unit
  • DSP digital signal processor
  • FPGA Field Programmable Gate Array
  • an MCU As shown in FIG. 8, the MCU 8 includes:
  • the second receiving module 801 is configured to receive a plurality of first operation instructions sent by the car networking unit.
  • the second processing module 802 is configured to generate confirmation information of at least one of the plurality of first operation instructions.
  • the second sending module 803 is configured to send the generated confirmation message to the car networking unit.
  • the second receiving module 801 is further configured to receive a first operation instruction that the car networking unit resends the non-return confirmation message according to the obtained retransmission time.
  • the retransmission time is determined by the car networking unit according to the receiving duration of the confirmation message and the current retransmission interval.
  • the second sending module 803 is further configured to:
  • the data to be reported is sent to the car networking unit.
  • the second sending module 803 is configured to:
  • the obtained duration is taken as the first duration.
  • the length of time required to send all the second operation instructions is obtained, and the obtained duration is taken as the second duration.
  • the second sending module 803 is further configured to:
  • the second operation instruction of the same type is acquired, and the obtained second operation instruction is taken as the operation instruction to be processed.
  • the operation instruction with the latest generation time is acquired in the to-be-processed operation instruction, and is merged with the second operation instruction except the operation instruction to be processed to obtain the target operation instruction.
  • the length of time required to send the target operation instruction is obtained, and the obtained duration is taken as the third duration.
  • the second sending module 803 is further configured to:
  • the priority of the type to which the target operation instruction belongs is obtained in the correspondence between the pre-established type and the priority.
  • the target operation instructions are arranged according to the priority level.
  • the number of operation instructions that can be transmitted within the first time period is obtained, and the obtained number is used as the first target number.
  • the target operation command having the same number as the first target is acquired in the target operation command after the arrangement in the order of priority from high to low, and transmitted to the car networking unit.
  • the remaining target operation instructions are left until the fourth time period for transmission.
  • the fourth duration is the duration of the next preset reporting period after the data is sent to the next preset reporting period.
  • the second sending module 803 is further configured to:
  • the priority corresponding to the type of the second operation instruction is obtained in the correspondence between the pre-established type and the priority.
  • the second operation instruction is arranged according to the priority level.
  • the number of operation instructions that can be transmitted within the first time period is obtained, and the obtained number is used as the second target number.
  • the second operation instruction having the same number of second targets is acquired in the second operation instruction after the arrangement in order of priority from high to low, and is transmitted to the car network unit.
  • the remaining second operation instruction is left for the fourth time period for transmission.
  • the fourth duration is the duration of the next preset reporting period after the data is sent to the next preset reporting period.
  • the second sending module 803 is further configured to:
  • the second operation instruction in the buffer queue is sent to the car network unit after the time when the data to be reported is sent and the time before the next preset reporting period arrives.
  • the second processing module 802 is further configured to place the second operation instruction at the end of the cache queue when the confirmation information for the second operation instruction sent by the car network unit is not received within the preset time period.
  • the MCU provided by the embodiment of the present disclosure sends the data to be reported to the car network unit when the preset reporting period is reached, and sends the second operation to the car network unit after the data to be reported is sent to the time before the next preset reporting period arrives. instruction. It can be seen from the embodiment of the present disclosure that the second operation instruction is sent only in the interval after the data to be reported is sent between the two preset reporting periods, so that the data to be reported can be reported to the car networking unit in time; The data to be reported and the second operation instruction can be transmitted in turn, thereby reducing the load on the MCU and greatly preventing the MCU from being congested.
  • the first receiving module 801, the second processing module 802, and the second sending module 803 can all be implemented by a CPU, an MPU, a DSP, an FPGA, or the like located in the MCU.
  • the vehicle networking unit 9 includes a third sending module 901, a retransmission queue module 902, a third receiving module 903, and a dynamic adjustment module 904.
  • the third sending module 901 is configured to send the to-be-reported data to the MCU, and store the instructions in the retransmission queue.
  • the retransmission queue module 902 is configured to save an instruction that has not received the confirmation of the MCU, and wait for the retransmission time to be reached, and then send an instruction to the sending module.
  • the third receiving module 903 is configured to receive the response of the MCU, and includes an acknowledgement message received by the instruction, a result of the instruction processing, and a request initiated by the MCU.
  • the dynamic adjustment module 904 is configured to record the duration of the acknowledgment command received by the MCU after the command is sent, and is used to determine whether the current MCU is too busy, thereby notifying the retransmission queue to modify the retransmission time interval.
  • the dynamic adjustment module 904 has the following workflow. First, the retransmission interval is divided by the maximum number of bytes to be reported by the baud rate of the serial port duplex mode and multiplied by 2, according to the response time of the acknowledgment command sent by the MCU. Adjusting the time interval for the car networking unit to resend the command to the MCU. When the response time of the acknowledgment command sent by the MCU is greater than 90% of the default retransmission interval but still within the default retransmission interval, indicating that the MCU is busy processing other instructions, then Multiply the default retransmission interval in the retransmission queue by 2 as the new retransmission interval, thereby reducing the number of instructions sent to the MCU and reducing the burden on the MCU.
  • the retransmission interval is multiplied by 2, it still appears.
  • the response time of the acknowledgment command sent by the MCU is greater than 90% of the modified retransmission interval time but still within the modified retransmission interval time.
  • the retransmission interval time is again multiplied by 2, if it is less than the modified retransmission interval. 90% but greater than 90% of the default retransmission interval, then keep the current retransmission interval unchanged, and so on, after modifying the conditions for modifying the retransmission interval, modify Hair interval, according to the number of retransmissions, retransmission can determine the maximum time interval.
  • the response time of the acknowledgment command sent by the MCU is less than 90% of the default retransmission interval, it indicates whether the retransmission interval is the default value. If it is the default value, no adjustment is made. If it is not the default value, it is restored to the default value.
  • the MCU 10 includes a fourth sending module 1001, a retransmission queue module 1002, a fourth receiving module 1003, and a transmission optimization adjustment module 1004.
  • the fourth sending module 1001 is configured to send the second operation instruction and the data to be reported to the car networking unit, and store the second operation instruction into the retransmission queue, and the data to be reported does not need to be stored in the retransmission queue.
  • the retransmission queue module 1002 is configured to save a second operation instruction that has not received the confirmation of the car network unit, and wait for the retransmission time to be reached, and then send an instruction to the fourth transmission module 1001.
  • the fourth receiving module 1003 is configured to receive a response of the car networking unit, and includes an acknowledgement message received by the instruction, a result of the command processing, and a request instruction initiated by the car networking unit.
  • the transmission optimization adjustment module 1004 is configured to optimize the process of reporting the data to the vehicle networking unit by the MCU, and the data to be reported is reported in strict intervals according to a fixed interval.
  • the instruction in the retransmission queue is first calculated. Sending the amount of data consumed by the instructions in the module, and then determining whether the current queue data can be sent within the time period of the next periodic report. If so, the data is sent directly in order. If the time is not enough to complete the transmission, The second operation instruction of the same type is merged first, and then transmitted by the fourth transmission module 1001.
  • the workflow of the transmission optimization adjustment module 1004 is as follows: First, the data to be reported is sent at a fixed interval, and the second operation instruction is first stored in the queue, which may involve various services, such as door status, theft alarm, etc., before being sent. First, calculate the time for sending all the second operation instruction instructions, and then judge whether the current time can be completed within the time of the next periodic report, if yes, send it to the fourth sending module 1001 to send the instruction to the car networking unit. If the transmission cannot be completed within this time, the priority is first arranged, and the amount of data that can be transmitted according to the current time to the next periodic reporting time is sent from the highest to the lowest, and the remaining second. The operation instruction is then placed back into the queue of service instructions to be sent.
  • An embodiment of the present disclosure further provides an apparatus for implementing data transmission, including a first memory and a first processor, wherein the first memory stores the following instructions executable by the first processor:
  • a plurality of first operation instructions are sequentially transmitted to the MCU.
  • the target retransmission interval is determined according to the reception duration of the acknowledgment message and the current retransmission interval.
  • the retransmission time of the first operation instruction that does not return the confirmation message is determined according to the obtained target retransmission interval.
  • the first operation instruction that does not return the confirmation message is resent according to the obtained retransmission time.
  • the first memory further stores the following instructions executable by the first processor:
  • the first operational instruction that has been issued is placed in a pre-established retransmission queue.
  • the retransmission time of the first operation instruction in the retransmission queue is determined according to the obtained target retransmission interval.
  • the first memory further stores the following instructions executable by the first processor:
  • the latest transmission time of the first operation instruction in the obtained retransmission queue is added to the target retransmission interval to obtain the retransmission time of the first operation instruction in the retransmission queue.
  • the first memory further stores the following instructions executable by the first processor:
  • the receiving time of the confirmation message is obtained according to the obtained first sending time and receiving time.
  • the target retransmission interval is set to be greater than the current retransmission interval.
  • the first memory when the ratio of the receiving duration to the preset retransmission interval is not greater than a preset threshold, the first memory further stores the following instructions executable by the first processor:
  • the current retransmission interval is not the preset retransmission interval
  • the receiving duration is greater than the product of the preset retransmission interval and the preset threshold
  • the receiving duration is less than the product of the current retransmission interval and the preset threshold.
  • the current retransmission interval is a preset retransmission interval.
  • An embodiment of the present disclosure further provides an apparatus for implementing data transmission, including a second memory and a second processor, wherein the second memory stores the following instructions executable by the second processor:
  • Acknowledgement information of at least one of the plurality of first operational instructions is generated.
  • the generated confirmation message is sent to the car networking unit.
  • the receiving car networking unit resends the first operation instruction that does not return the confirmation message according to the obtained retransmission time.
  • the retransmission time is determined by the car networking unit according to the receiving duration of the confirmation message and the current retransmission interval.
  • the second memory further stores the following instructions executable by the second processor:
  • the MCU When the preset reporting period is reached, the MCU sends the data to be reported to the car networking unit.
  • a second operation instruction is sent to the vehicle network unit within a time period after the transmission of the data to be reported is completed until the next preset reporting period arrives.
  • the second memory further stores the following instructions executable by the second processor:
  • the obtained duration is taken as the first duration.
  • the length of time required to send all the second operation instructions is obtained, and the obtained duration is taken as the second duration.
  • the second memory when the first duration is less than the second duration, the second memory further stores the following instructions executable by the second processor:
  • the second operation instruction of the same type is acquired, and the obtained second operation instruction is taken as the operation instruction to be processed.
  • the operation instruction with the latest generation time is acquired in the to-be-processed operation instruction, and is merged with the second operation instruction except the operation instruction to be processed to obtain the target operation instruction.
  • the length of time required to send the target operation instruction is obtained, and the obtained duration is taken as the third duration.
  • the second memory when the first duration is less than the third duration, the second memory further stores the following instructions executable by the second processor:
  • the priority of the type to which the target operation instruction belongs is obtained in the correspondence between the pre-established type and the priority.
  • the target operation instructions are arranged according to the priority level.
  • the number of operation instructions that can be transmitted within the first time period is obtained, and the obtained number is used as the first target number.
  • the target operation command having the same number as the first target is acquired in the target operation command after the arrangement in the order of priority from high to low, and transmitted to the car networking unit.
  • the remaining target operation instructions are left until the fourth time period for transmission.
  • the fourth duration is the duration of the next preset reporting period after the data is sent to the next preset reporting period.
  • the second memory when there is no second operation instruction of the same type, the second memory further stores the following instructions executable by the second processor:
  • the priority corresponding to the type of the second operation instruction is obtained in the correspondence between the pre-established type and the priority.
  • the second operation instruction is arranged according to the priority level.
  • the number of operation instructions that can be transmitted within the first time period is obtained, and the obtained number is used as the second target number.
  • the second operation instruction having the same number of second targets is acquired in the second operation instruction after the arrangement in order of priority from high to low, and is transmitted to the car network unit.
  • the remaining second operation instruction is left for the fourth time period for transmission.
  • the fourth duration is the duration of the next preset reporting period after the data is sent to the next preset reporting period.
  • the second memory further stores the following instructions executable by the second processor:
  • the second operation instruction in the buffer queue is sent to the car network unit after the time when the data to be reported is sent and the time before the next preset reporting period arrives.
  • the second operation instruction is placed at the end of the cache queue.
  • An embodiment of the present disclosure further provides a computer readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the method of any of the above embodiments.
  • Storage medium any one or more types of memory devices or storage devices.
  • the foregoing storage medium may be a volatile memory, such as a random access memory (RAM), or a non-volatile memory, such as a read-only memory.
  • RAM random access memory
  • ROM Read-Only Memory
  • flash memory flash memory
  • HDD Hard Disk Drive
  • SSD Solid-State Drive
  • the storage medium may further include: a compact disc read-only memory (CD-ROM), a floppy disk or a magnetic tape device; a computer system memory or a random access memory such as a dynamic random access memory (Dynamic Random Access Memory, DRAM), (Double Data Rate Random Access Memory, DDR RAM), Static Random Access Memory (SRAM), Extended Data Output Random Access Memory (EDO RAM), Lan A Rambus Random Access Memory (Rambus RAM) or the like; a non-volatile memory such as a flash memory, a magnetic medium such as a hard disk or an optical storage; a register or other similar type of memory element or the like.
  • the storage medium may also include other types of memory or a combination thereof.
  • the processor may be an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), or a Programmable Logic Device (Programmable Logic). Device, PLD), at least one of a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • DSPD Digital Signal Processing Device
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • CPU Central Processing Unit
  • controller a controller
  • microcontroller a microcontroller
  • the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system, the second computer system being coupled to the first computer system via a network, such as the Internet.
  • the second computer system can provide program instructions to the first computer for execution.
  • the term "storage medium" can include two or more storage media that can reside in different locations (eg, in different computer systems connected through a network).
  • a storage medium may store program instructions (eg, a computer program) executable by one or more processors.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed by the present invention is a data transmission method, comprising: sequentially transmitting a plurality of first operation instructions to a micro control unit (MCU); receiving a confirmation message of at least one first operation instruction in the plurality of first operation instructions transmitted by the MCU; determining a target retransmission interval according to the receiving duration of the confirmation message and a current retransmission interval; determining, according to the target retransmission interval, a retransmission time of a first operation instruction which does not return a confirmation message; and retransmitting, according to the obtained retransmission time, the first operation instruction which does not return the confirmation message. Further disclosed is a data transmission device.

Description

数据传输方法及装置Data transmission method and device
本申请要求在2018年3月21日提交中国专利局、申请号为201810234061.2的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本公开实施例涉及通信技术领域,例如涉及一种数据传输方法及装置。Embodiments of the present disclosure relate to the field of communications technologies, and, for example, relate to a data transmission method and apparatus.
背景技术Background technique
车联网设备是应用车联网技术以实现对车辆所有工作情况、车辆的静态信息和动态信息进行采集、存储并发送的设备,车联网设备包括微控制单元(Micro Controller Unit,MCU)和车联网单元(即车联网设备中除去MCU的部分),车联网单元和MCU配合使用,MCU上报车辆数据至车联网单元,车辆网单元通过无线网络将车辆数据上传至服务器,再由服务器将消息推送到手机应用。用户通过手机应用将远程控制指令发送给服务器,再由服务器发送远程控制指令给车联网单元,由车联网单元发送远程控制指令给MCU,再由MCU通过车辆的控制器局域网络(Controller Area Network,CAN)总线将指令发送给一个或多个电子控制单元(Electronic Control Unit,ECU),从而完成远程控制。因此,由上述过程可以看出,MCU的稳定性对车联网技术的正常应用显得尤为重要。The vehicle networking equipment is a device that uses the vehicle networking technology to collect, store and transmit all the working conditions of the vehicle, the static information and the dynamic information of the vehicle, and the vehicle networking equipment includes a Micro Controller Unit (MCU) and a vehicle networking unit. (ie, the part of the vehicle networking device that removes the MCU), the car networking unit and the MCU cooperate, the MCU reports the vehicle data to the car networking unit, and the vehicle network unit uploads the vehicle data to the server through the wireless network, and then the server pushes the message to the mobile phone. application. The user sends the remote control command to the server through the mobile phone application, and then the server sends the remote control command to the car networking unit, and the car network unit sends the remote control command to the MCU, and then the MCU passes the controller area network of the vehicle (Controller Area Network, The CAN) bus sends commands to one or more Electronic Control Units (ECUs) for remote control. Therefore, it can be seen from the above process that the stability of the MCU is particularly important for the normal application of the Internet of Vehicles technology.
相关技术中,车联网单元向MCU发送操作指令时,MCU回复针对操作指令的确认信息,当MCU处于繁忙状态或其他特殊情况而没有在预设时间间隔内回复确认消息时,车联网单元就会重新向MCU发送操作指令。In the related art, when the car networking unit sends an operation instruction to the MCU, the MCU replies with the confirmation information for the operation instruction, and when the MCU is in a busy state or other special situation and does not reply the confirmation message within the preset time interval, the car networking unit will Re-send the operation command to the MCU.
而由于预设时间间隔是固定不变的,因此当MCU处于繁忙状态时,以固定的预设时间间隔向MCU重复发送操作指令往往会进一步加剧MCU的负荷,从而造成MCU的拥塞。Since the preset time interval is fixed, when the MCU is in a busy state, repeatedly sending an operation instruction to the MCU at a fixed preset time interval often further aggravates the load of the MCU, thereby causing congestion of the MCU.
发明内容Summary of the invention
本公开实施例提供了一种数据传输方法及装置,能够动态地调整重发间隔, 从而减轻MCU的负荷,防止MCU发生拥塞。The embodiments of the present disclosure provide a data transmission method and apparatus, which can dynamically adjust a retransmission interval, thereby reducing the load of the MCU and preventing congestion of the MCU.
在一实施例中,本公开实施例提供了一种数据传输方法,应用于车联网单元,包括:In an embodiment, an embodiment of the present disclosure provides a data transmission method, which is applied to a car networking unit, and includes:
向MCU依次发送多个第一操作指令;Sending a plurality of first operation instructions to the MCU in sequence;
接收所述MCU发送的所述多个第一操作指令中的至少一个第一操作指令的确认消息;Receiving an acknowledgement message of at least one of the plurality of first operation instructions sent by the MCU;
根据确认消息的接收时长以及当前重发间隔确定目标重发间隔;Determining a target retransmission interval according to the receiving duration of the acknowledgement message and the current retransmission interval;
根据所述目标重发间隔确定未返回确认消息的第一操作指令的重发时间;Determining, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return the confirmation message;
根据所述重发时间重新发送所述未返回确认消息的第一操作指令。And transmitting, by the retransmission time, the first operation instruction that does not return the confirmation message.
在一实施例中,本公开实施例还提供了一种数据传输方法,应用于MCU,包括:In an embodiment, an embodiment of the present disclosure further provides a data transmission method, which is applied to an MCU, and includes:
接收车联网单元发送的多个第一操作指令;Receiving a plurality of first operation instructions sent by the car networking unit;
生成所述多个第一操作指令中的至少一个第一操作指令的确认消息;Generating an acknowledgement message of at least one of the plurality of first operational instructions;
向所述车联网单元发送生成的确认消息;Sending the generated confirmation message to the car networking unit;
接收所述车联网单元根据获得的重发时间重新发送未返回确认消息的第一操作指令。Receiving, by the car networking unit, resending the first operation instruction that does not return the confirmation message according to the obtained retransmission time.
在一实施例中,本公开实施例还提供了一种车联网单元,包括:In an embodiment, an embodiment of the present disclosure further provides a car networking unit, including:
发送模块,设置为向MCU依次发送多个第一操作指令;a sending module, configured to sequentially send a plurality of first operation instructions to the MCU;
接收模块,设置为接收所述多个第一操作指令中的至少一个第一操作指令的确认消息;a receiving module, configured to receive an acknowledgement message of the at least one first operation instruction of the plurality of first operation instructions;
处理模块,设置为根据所述确认消息的接收时长以及当前重发间隔确定目标重发间隔;a processing module, configured to determine a target retransmission interval according to the receiving duration of the acknowledgement message and the current retransmission interval;
所述处理模块,还设置为根据所述目标重发间隔确定未返回确认消息的第一操作指令的重发时间;The processing module is further configured to determine, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return an acknowledgement message;
所述发送模块,还设置为根据所述重发时间重新发送所述未返回确认消息的第一操作指令。The sending module is further configured to resend the first operation instruction of the non-return confirmation message according to the retransmission time.
在一实施例中,本公开实施例还提供了一种MCU,包括:In an embodiment, an embodiment of the present disclosure further provides an MCU, including:
接收模块,设置为接收车联网单元发送的多个第一操作指令;a receiving module, configured to receive a plurality of first operation instructions sent by the car networking unit;
处理模块,设置为生成所述多个第一操作指令中的至少一个第一操作指令的确认消息;a processing module, configured to generate a confirmation message of the at least one first operation instruction of the plurality of first operation instructions;
发送模块,设置为向所述车联网单元发送生成的确认消息;a sending module, configured to send the generated confirmation message to the car networking unit;
所述接收模块,还设置为接收所述车联网单元根据获得的重发时间重新发送未返回确认消息的第一操作指令。The receiving module is further configured to receive a first operation instruction that the car networking unit resends the non-return confirmation message according to the obtained retransmission time.
附图说明DRAWINGS
附图用来提供对本公开技术方案的理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本公开的技术方案,并不构成对本公开技术方案的限制。The drawings are intended to provide an understanding of the technical solutions of the present disclosure, and constitute a part of the specification, and the embodiments of the present application are used to explain the technical solutions of the present disclosure, and do not constitute a limitation of the technical solutions of the present disclosure.
图1为本公开实施例提供的一种数据传输方法的流程示意图;FIG. 1 is a schematic flowchart diagram of a data transmission method according to an embodiment of the present disclosure;
图2为本公开实施例提供的另一种数据传输方法的流程示意图;FIG. 2 is a schematic flowchart diagram of another data transmission method according to an embodiment of the present disclosure;
图3为本公开实施例提供的又一种数据传输方法的流程示意图;FIG. 3 is a schematic flowchart diagram of still another data transmission method according to an embodiment of the present disclosure;
图4为本公开实施例提供的再一种数据传输方法的流程示意图;FIG. 4 is a schematic flowchart diagram of still another data transmission method according to an embodiment of the present disclosure;
图5为本公开实施例提供的还一种数据传输方法的流程示意图;FIG. 5 is a schematic flowchart of still another data transmission method according to an embodiment of the present disclosure;
图6为本公开实施例提供的还一种数据传输方法的流程示意图;FIG. 6 is a schematic flowchart diagram of still another data transmission method according to an embodiment of the present disclosure;
图7为本公开实施例提供的一种车联网单元的结构示意图;FIG. 7 is a schematic structural diagram of a vehicle networking unit according to an embodiment of the present disclosure;
图8为本公开实施例提供的一种MCU的结构示意图;FIG. 8 is a schematic structural diagram of an MCU according to an embodiment of the present disclosure;
图9为本公开实施例提供的另一种车联网单元的结构示意图;FIG. 9 is a schematic structural diagram of another vehicle networking unit according to an embodiment of the present disclosure;
图10为本公开实施例提供的另一种MCU的结构示意图。FIG. 10 is a schematic structural diagram of another MCU according to an embodiment of the present disclosure.
具体实施方式detailed description
下文中将结合附图对本公开的实施例进行说明。在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。Embodiments of the present disclosure will be described hereinafter with reference to the accompanying drawings. The embodiments in the present application and the features in the embodiments may be arbitrarily combined with each other without conflict.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系 统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在部分情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps illustrated in the flowchart of the figures may be implemented in a computer system such as a set of computer executable instructions. Also, although the logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than the ones described herein.
实施例一Embodiment 1
本公开实施例提供一种数据传输方法,如图1所示,该方法包括步骤110至步骤150。The embodiment of the present disclosure provides a data transmission method. As shown in FIG. 1 , the method includes steps 110 to 150.
步骤110、车联网单元向MCU依次发送多个第一操作指令。Step 110: The vehicle networking unit sequentially sends a plurality of first operation instructions to the MCU.
在一实施例中,操作指令是接收设备接收该操作指令后要回复确认信息的指令,第一操作指令是为了区分MCU向车联网单元发送的第二操作指令。In an embodiment, the operation instruction is an instruction to return the confirmation information after the receiving device receives the operation instruction, and the first operation instruction is to distinguish the second operation instruction sent by the MCU to the car networking unit.
步骤120、接收MCU发送的所述多个第一操作指令中的至少一个第一操作指令的确认消息。Step 120: Receive an acknowledgement message of at least one of the plurality of first operation instructions sent by the MCU.
步骤130、根据所述确认消息的接收时长以及当前重发间隔确定目标重发间隔。Step 130: Determine a target retransmission interval according to the receiving duration of the acknowledgement message and the current retransmission interval.
步骤140、根据所述目标重发间隔确定未返回确认消息的第一操作指令的重发时间。Step 140: Determine, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return the confirmation message.
步骤150、根据所述重发时间重新发送未返回确认消息的第一操作指令。Step 150: Resend the first operation instruction that does not return the confirmation message according to the retransmission time.
在一实施例中,根据第一重发间隔向MCU重新发送第一个第一操作指令指的是:向MCU发送完所有第一操作指令后间隔第一重发间隔,再向MCU重新发送所有第一操作指令中第一个第一操作指令。In an embodiment, resending the first first operation instruction to the MCU according to the first retransmission interval means: after transmitting all the first operation instructions to the MCU, the first retransmission interval is interval, and then resending all the MCUs to the MCU. The first first operational instruction in the first operational instruction.
本公开实施例提供的数据传输方法,车联网单元向微控制单元MCU依次发送多个第一操作指令;接收MCU发送的多个第一操作指令中的至少一个第一操作指令的确认消息;在确认消息为多个操作指令中的任何一个操作指令的确认消息的情况下,根据确认消息的接收时长以及当前重发间隔确定目标重发间隔;根据获得的目标重发间隔确定未返回确认消息的第一操作指令的重发时间;根据获得的重发时间重新发送未返回确认消息的第一操作指令。从本公开实施例可见,由于当接收到了任何一个第一操作指令的确认消息时,都会根据该确认消息的接收时长以及当前重发间隔重新确定目标重发间隔,进而根据所确定的目标重发间隔重新确定未返回确认消息的第一操作指令的重发时间,因此实现了根据第一操作指令的反馈情况调整第一操作指令重发频率的目的,从而减轻 了MCU的负荷,极大程度地防止了MCU发生拥塞。In the data transmission method provided by the embodiment of the present disclosure, the car networking unit sequentially sends a plurality of first operation instructions to the micro control unit MCU; and receives an acknowledgement message of at least one of the plurality of first operation instructions sent by the MCU; If the confirmation message is an acknowledgement message of any one of the plurality of operation instructions, determining a target retransmission interval according to the reception duration of the confirmation message and the current retransmission interval; determining that the confirmation message is not returned according to the obtained target retransmission interval The retransmission time of the first operation instruction; resending the first operation instruction that does not return the confirmation message according to the obtained retransmission time. It can be seen from the embodiment of the present disclosure that, when an acknowledgment message of any one of the first operation instructions is received, the target retransmission interval is re-determined according to the reception duration of the acknowledgment message and the current retransmission interval, and then retransmitted according to the determined target. The interval re-determines the retransmission time of the first operation instruction that does not return the confirmation message, thereby realizing the purpose of adjusting the retransmission frequency of the first operation instruction according to the feedback condition of the first operation instruction, thereby reducing the load of the MCU, and greatly Prevents congestion in the MCU.
在一实施例中,车联网单元向MCU依次发送多个第一操作指令之后,还包括:In an embodiment, after the vehicle networking unit sequentially sends the plurality of first operation instructions to the MCU, the method further includes:
将已发出的第一操作指令放入预先建立的重发队列。The first operational instruction that has been issued is placed in a pre-established retransmission queue.
在根据所述确认消息的接收时长以及当前重发间隔确定目标重发间隔之后,还包括:After determining the target retransmission interval according to the receiving duration of the acknowledgment message and the current retransmission interval, the method further includes:
在重发队列中获取并删除确认消息对应的第一操作指令,以及未返回确认消息但重发次数超过预设重发次数的第一操作指令。Acquiring and deleting the first operation instruction corresponding to the confirmation message in the retransmission queue, and the first operation instruction that does not return the confirmation message but the number of retransmissions exceeds the preset number of retransmissions.
根据所述目标重发间隔确定未返回确认消息的第一操作指令的重发时间,包括:Determining, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return the confirmation message, including:
根据所述目标重发间隔确定重发队列中第一操作指令的重发时间。A retransmission time of the first operation instruction in the retransmission queue is determined according to the target retransmission interval.
在一实施例中,当任意一个第一操作指令的重发次数超过预设重发次数且仍然未接收到MCU发送的确认消息,不再发送该第一操作指令;其中,预设重发次数可以设置为2次或其他次数,本公开对此不作限定。In an embodiment, when the number of retransmissions of any one of the first operation instructions exceeds the preset number of retransmissions and the acknowledgment message sent by the MCU is still not received, the first operation instruction is not sent; wherein, the number of retransmissions is preset. It can be set to 2 times or other times, which is not limited in the present disclosure.
在一实施例中,根据所述目标重发间隔确定所述重发队列中第一操作指令的重发时间,包括:In an embodiment, determining, according to the target retransmission interval, a retransmission time of the first operation instruction in the retransmission queue, including:
获取重发队列中第一操作指令的最近一次发送时间;Obtaining the last transmission time of the first operation instruction in the retransmission queue;
将获得的重发队列中第一操作指令的最近一次发送时间加上目标重发间隔,得到重发队列中第一操作指令的重发时间。The latest transmission time of the first operation instruction in the obtained retransmission queue is added to the target retransmission interval to obtain the retransmission time of the first operation instruction in the retransmission queue.
在一实施例中,根据所述确认消息的接收时长以及当前重发间隔确定目标重发间隔,包括:In an embodiment, determining a target retransmission interval according to the receiving duration of the acknowledgment message and the current retransmission interval includes:
获取确认消息对应的第一操作指令的首次发送时间以及确认消息的接收时间。Obtaining the first transmission time of the first operation instruction corresponding to the confirmation message and the reception time of the confirmation message.
根据获得的首次发送时间和接收时间获取确认消息的接收时长。The receiving time of the confirmation message is obtained according to the obtained first sending time and receiving time.
在接收时长不小于当前重发间隔与预设阈值的乘积,且小于当前重发间隔的情况下,设置目标重发间隔大于当前重发间隔。When the receiving duration is not less than the product of the current retransmission interval and the preset threshold, and is smaller than the current retransmission interval, the target retransmission interval is set to be larger than the current retransmission interval.
在一实施例中,此时目标重发间隔可以是预设重发间隔的两倍,还可以是 大于预设重发间隔的任意时间间隔,本公开对此不作限制。In an embodiment, the target retransmission interval may be twice the preset retransmission interval, and may be any time interval greater than the preset retransmission interval, which is not limited in the disclosure.
在一实施例中,所述方法还包括:在接收时长与预设重发间隔的比值不大于预设阈值的情况下,设置目标重发间隔为预设重发间隔。In an embodiment, the method further includes: setting a target retransmission interval to a preset retransmission interval if a ratio of the receiving duration to the preset retransmission interval is not greater than a preset threshold.
在一实施例中,预设重发间隔可以通过计算第一操作指令容许的最大字节数除以MCU双工模式下传输的波特率再乘以2得到,其中,第一操作指令容许的最大字节数是固定的。In an embodiment, the preset retransmission interval may be obtained by calculating a maximum number of bytes allowed by the first operation instruction divided by a baud rate transmitted in the MCU duplex mode and multiplying by 2, wherein the first operation instruction allows The maximum number of bytes is fixed.
在一实施例中,所述方法还包括:在当前重发间隔不是预设重发间隔,且接收时长大于预设重发间隔与预设阈值的乘积,且接收时长小于当前重发间隔与预设阈值的乘积的情况下,设置目标重发间隔为当前重发间隔。In an embodiment, the method further includes: the current retransmission interval is not a preset retransmission interval, and the receiving duration is greater than a product of the preset retransmission interval and the preset threshold, and the receiving duration is less than the current retransmission interval and the preamble When the product of the threshold is set, the target retransmission interval is set to the current retransmission interval.
在一实施例中,在确认消息为第一个确认消息的情况下,当前重发间隔为预设重发间隔。In an embodiment, in the case that the acknowledgement message is the first acknowledgement message, the current retransmission interval is a preset retransmission interval.
本公开实施例提供的数据传输方法,能够根据MCU针对操作指令的确认信息的反馈实时地调整重发间隔,因此减轻了MCU的负荷,极大程度地防止了MCU发生拥塞。The data transmission method provided by the embodiment of the present disclosure can adjust the retransmission interval in real time according to the feedback of the MCU for the confirmation information of the operation instruction, thereby reducing the load of the MCU and greatly preventing the MCU from being congested.
实施例二Embodiment 2
本公开实施例还提供一个应用场景以说明本公开实施例提供的数据传输方法,如图2所示,该方法包括步骤201至步骤208。The embodiment of the present disclosure further provides an application scenario to describe a data transmission method provided by an embodiment of the present disclosure. As shown in FIG. 2, the method includes steps 201 to 208.
步骤201、车联网单元开始根据业务的定义,先确定这个指令组(请求指令和响应指令)的标示值(通常为每个业务指令自己保存一个标示值,在发送的过程中,自动增加,从0–255循环赋值),然后发送指令给MCU,并将这个指令存入到重发队列中,重发次数为3次,超过3次,就认为指令发送失败。Step 201: The vehicle networking unit starts to determine the indication value of the instruction group (request command and response command) according to the definition of the service (usually, each service instruction saves a label value by itself, and automatically increases during the sending process. 0–255 loop assignment), then send the instruction to the MCU, and store the instruction in the retransmission queue. The number of retransmissions is 3, more than 3 times, and the instruction is considered to have failed to be sent.
步骤202、通过指令组的标示值在重发队列中查找对应的指令,以此来判断这个确认消息就是这个指令组中的发送指令的确认消息,如果这个确认消息的标示值在重发队列中找不到对应的指令,则认为这个确认消息是无效的,直接抛弃掉。如果确认这个确认消息是有效的,则开始计算指令发出到收到确认的时间是否在重发时间的间隔内,如果是在这个时间间隔内,则进入到步骤206,如果超过了这个时间间隔都没有收到确认消息,则进入步骤203。Step 202: Search for a corresponding instruction in the retransmission queue by using the marked value of the instruction group, so as to determine that the confirmation message is an acknowledgement message of the sending instruction in the instruction group, if the identifier value of the confirmation message is in the retransmission queue. If the corresponding instruction is not found, the acknowledgment message is considered invalid and discarded directly. If it is confirmed that the confirmation message is valid, it starts to calculate whether the time when the instruction is sent until the confirmation is received is within the interval of the retransmission time, and if it is within the time interval, it proceeds to step 206, if the time interval is exceeded If the confirmation message is not received, the process proceeds to step 203.
步骤203、在重发队列中找到这个要重新发送的指令,以大于重发时间的间 隔再次发送给MCU,发送完成后,进入步骤204。Step 203: The instruction to be resent is found in the retransmission queue, and is sent to the MCU again at a interval greater than the retransmission time. After the transmission is completed, the process proceeds to step 204.
步骤204、判断当前的重发队列中的这个指令重发次数是否已经为3,如果是的话,则不再重发指令,进入步骤205,否则,进入步骤202,继续判断是否在重发间隔的时间内收到MCU的确认消息。Step 204: Determine whether the number of retransmissions of the instruction in the current retransmission queue is already 3, and if yes, the instruction is not resent, and the process proceeds to step 205. Otherwise, the process proceeds to step 202 to continue to determine whether the retransmission interval is The MCU confirmation message is received within the time.
步骤205、认为当前发送的指令,没有能够到达MCU,确认发送失败并在重发队列中删除这个指令。In step 205, it is considered that the currently sent instruction fails to reach the MCU, confirms that the transmission fails, and deletes the instruction in the retransmission queue.
步骤206、判断从发送指令到收到的MCU的确认的时间是否符合调整重发间隔的条件,这个条件包含了两个情况,第一,这个时间如果大于重发间隔时间的90%但是仍然在重发间隔时间内,应该调整重发间隔,将重发间隔数值乘以2,此时说明MCU当前的负荷有加重的趋势,应该降低发送指令的速度,以防止出现MCU负荷已经很重的情况,继续增加发送指令给MCU,造成恶性循环;第二,如果小于默认重发间隔的90%,进入到步骤208。如果时间小于修改后的重发间隔的90%但是大于默认重发间隔的90%,则进入到步骤207,保持重发间隔不变。Step 206: Determine whether the time from the sending of the instruction to the received MCU is consistent with the condition for adjusting the retransmission interval. This condition includes two cases. First, if the time is greater than 90% of the retransmission interval but still During the retransmission interval, the retransmission interval should be adjusted, and the retransmission interval value is multiplied by 2. This indicates that the current load of the MCU has a tendency to increase, and the speed at which the command is sent should be reduced to prevent the MCU from being heavily loaded. , continue to increase the send command to the MCU, causing a vicious circle; second, if it is less than 90% of the default retransmission interval, proceed to step 208. If the time is less than 90% of the modified retransmission interval but greater than 90% of the default retransmission interval, then proceed to step 207 to keep the retransmission interval unchanged.
步骤207、当车联网单元收到MCU的确认消息时,首先在重发队列中删除这个被MCU确认已经收到的指令,保持重发间隔不变。然后回到步骤202,继续判断是否可以在重发间隔内接收到MCU发送的下一个确认消息。Step 207: When the car network unit receives the confirmation message of the MCU, first delete the instruction that has been acknowledged by the MCU in the retransmission queue, and keep the retransmission interval unchanged. Then returning to step 202, it continues to determine whether the next acknowledgment message sent by the MCU can be received within the retransmission interval.
步骤208、调整重发队列中的指令重发间隔,如果是增加间隔,则直接将重发间隔时间乘以2,如果要求恢复默认值,则直接修改重发间隔为默认值。In step 208, the instruction retransmission interval in the retransmission queue is adjusted. If the interval is increased, the retransmission interval is directly multiplied by 2. If the default value is required to be restored, the retransmission interval is directly modified to a default value.
实施例三Embodiment 3
本公开实施例提供又一种数据传输方法,如图3所示,该方法包括步骤310至步骤340。Another embodiment of the present disclosure provides a data transmission method. As shown in FIG. 3, the method includes steps 310 to 340.
步骤310、MCU接收车联网单元发送的多个第一操作指令。Step 310: The MCU receives a plurality of first operation instructions sent by the car networking unit.
步骤320、生成所述多个第一操作指令中的至少一个第一操作指令的确认消息。Step 320: Generate an acknowledgement message of at least one of the plurality of first operation instructions.
步骤330、向车联网单元发送生成的确认消息。Step 330: Send the generated confirmation message to the car networking unit.
步骤340、接收车联网单元根据获得的重发时间重新发送未返回确认消息的第一操作指令。Step 340: The receiving car networking unit resends the first operation instruction that does not return the confirmation message according to the obtained retransmission time.
其中,重发时间为车联网单元根据确认消息的接收时长、当前重发间隔确定的。The retransmission time is determined by the car networking unit according to the receiving duration of the confirmation message and the current retransmission interval.
本公开实施例提供的数据传输方法,MCU接收车联网单元发送的多个第一操作指令;生成多个第一操作指令中的至少一个第一操作指令的确认消息;当生成任何一个第一操作指令的确认信息时,向车联网单元发送生成的确认消息;接收车联网单元根据获得的重发时间重新发送未返回确认消息的第一操作指令;其中,重发时间为车联网单元根据确认消息的接收时长、当前重发间隔确定的。从本公开实施例可见,由于重发时间是车联网单元根据确认消息的接收时长、当前重发间隔确定的,因此实现了根据根据第一操作指令的反馈情况调整第一操作指令重发频率的目的,从而减轻了MCU的负荷,极大程度地防止了MCU发生拥塞。The data transmission method provided by the embodiment of the present disclosure, the MCU receives a plurality of first operation instructions sent by the car networking unit; generates a confirmation message of the at least one of the plurality of first operation instructions; when generating any one of the first operations Sending the generated confirmation message to the vehicle networking unit when the confirmation information is instructed; the receiving vehicle networking unit resending the first operation instruction of the non-returning confirmation message according to the obtained retransmission time; wherein, the retransmission time is the vehicle networking unit according to the confirmation message The receiving duration and the current retransmission interval are determined. It can be seen from the embodiment of the present disclosure that since the retransmission time is determined by the car networking unit according to the receiving duration of the acknowledgment message and the current retransmission interval, the retransmission frequency of the first operation instruction is adjusted according to the feedback condition according to the first operation instruction. The purpose is to reduce the load on the MCU and greatly prevent the MCU from being congested.
在一实施例中,MCU接收车联网单元发送的第一操作指令之前或之后,还包括:In an embodiment, before or after the first operation instruction sent by the MCU receiving the car networking unit, the MCU further includes:
步骤350、在到达预设上报周期的情况下,向车联网单元发送待上报数据。Step 350: Send the data to be reported to the car network unit when the preset reporting period is reached.
在一实施例中,预设上报周期可以是预先设定的,每到预设上报周期,MCU都会向车辆网单元发送待上报数据,其中,待上报数据是所采集的车身数据,例如油耗数据。In an embodiment, the preset reporting period may be preset. The MCU sends the to-be-reported data to the vehicle network unit every time the preset reporting period is reached. The data to be reported is the collected vehicle body data, such as fuel consumption data. .
步骤360、在待上报数据发送完毕后至下一个预设上报周期到达前的时长内,向车辆网单元发送第二操作指令。Step 360: Send a second operation instruction to the vehicle network unit after the time when the data to be reported is sent and the time before the next preset reporting period arrives.
在一实施例中,第二操作指令是为了区分车联网单元向MCU发送的第一操作指令。第二操作指令可以是触发事件,例如开车门、关车门。In an embodiment, the second operational command is to distinguish the first operational command sent by the car networking unit to the MCU. The second operational command may be a triggering event, such as opening a door and closing a door.
本公开实施例提供的数据传输方法,当到达预设上报周期时,MCU向车联网单元发送待上报数据;在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车辆网单元发送第二操作指令。从本公开实施例可见,由于第二操作指令只在两个预设上报周期之间待上报数据发送完后的间隔里发送,因此保证了待上报数据能够及时上报至车联网单元中;并且使得待上报数据和第二操作指令能够轮流进行发送,从而减轻了MCU的负荷,极大程度地防止了MCU发生拥塞。In the data transmission method provided by the embodiment of the present disclosure, when the preset reporting period is reached, the MCU sends the data to be reported to the vehicle networking unit; and the inbound vehicle network unit is sent to the vehicle before the next preset reporting period is reached after the data to be reported is sent. Send a second operation instruction. It can be seen from the embodiment of the present disclosure that the second operation instruction is sent only in the interval after the data to be reported is sent between the two preset reporting periods, so that the data to be reported can be reported to the car networking unit in time; The data to be reported and the second operation instruction can be transmitted in turn, thereby reducing the load on the MCU and greatly preventing the MCU from being congested.
在一实施例中,在待上报数据发送完毕后至下一个预设上报周期到达前的时长内,向车辆网单元发送第二操作指令,包括:In an embodiment, after the data to be reported is sent to the time before the next preset reporting period arrives, the second operation instruction is sent to the vehicle network unit, including:
步骤360a、获取待上报数据发送完毕后至下一个预设上报周期到达前的时长,将获得的时长作为第一时长。In step 360a, the length of time after the data to be reported is sent and the time before the next preset reporting period arrives is obtained, and the obtained duration is taken as the first duration.
步骤360b、获取发送完所有第二操作指令所需的时长,将获得的时长作为第二时长。Step 360b: Obtain the length of time required to send all the second operation instructions, and use the obtained duration as the second duration.
在一实施例中,判断第一时长是否小于第二时长就是判断待上报数据发送完毕后至下一个预设上报周期到达前的时长是否能够发送完所有第二操作指令。In an embodiment, determining whether the first duration is less than the second duration is determining whether the second operation instruction can be sent after the time when the data to be reported is sent and before the arrival of the next preset reporting period is reached.
步骤360c、在第一时长不小于第二时长的情况下,向车联网单元发送所有第二操作指令。Step 360c: Send all second operation instructions to the car networking unit if the first time length is not less than the second time length.
在一实施例中,当第一时长不小于第二时长时,说明待上报数据发送完毕后至下一个预设上报周期到达前的时长内能够发送完所有第二操作指令。In an embodiment, when the first duration is not less than the second duration, all the second operation instructions can be sent within the length of time after the data transmission is completed and until the next preset reporting period arrives.
在一实施例中,在第一时长小于第二时长的情况下,还包括:In an embodiment, if the first duration is less than the second duration, the method further includes:
步骤360d、获取所有第二操作指令的所属类型。Step 360d: Obtain the type of all the second operation instructions.
在一实施例中,当MCU采集到连续的多个触发事件的时候,其中很多事件可能是同一类型的事件,如车门状态的变化等,因此可以通过获取第二操作指令的所属类型来合并某些第二操作指令。In an embodiment, when the MCU collects a plurality of consecutive trigger events, many of the events may be the same type of events, such as changes in the state of the door, etc., so that a certain type of the second operation instruction may be acquired to merge the certain These second operational instructions.
步骤360e、当存在所属类型相同的第二操作指令时,获取所属类型相同的第二操作指令,并将获得的第二操作指令作为待处理操作指令。Step 360e: When there is a second operation instruction of the same type, the second operation instruction of the same type is obtained, and the obtained second operation instruction is used as the operation instruction to be processed.
在一实施例中,待处理操作指令的数量可能是两个,也可能是多个,具体要看有多少个所属类型相同的第二操作指令决定,并且,待处理操作指令还可能包含多组所属类型相同的第二操作指令。例如,假设所有第二操作指令包括第二操作指令A、第二操作指令B、第二操作指令C、第二操作指令D、第二操作指令E、第二操作指令F、第二操作指令G、第二操作指令H,其中,第二操作指令A与第二操作指令C所属类型相同,第二操作指令D、第二操作指令F和第二操作指令H所属类型相同,那么待处理操作指令就是第二操作指令A、第二操作指令C、第二操作指令D、第二操作指令F和第二操作指令H。In an embodiment, the number of operation instructions to be processed may be two or more, depending on how many second operation instructions of the same type are determined, and the operation instructions to be processed may also include multiple groups. A second operation instruction of the same type. For example, assume that all of the second operation instructions include the second operation instruction A, the second operation instruction B, the second operation instruction C, the second operation instruction D, the second operation instruction E, the second operation instruction F, and the second operation instruction G a second operation instruction H, wherein the second operation instruction A and the second operation instruction C have the same type, and the second operation instruction D, the second operation instruction F, and the second operation instruction H have the same type, and the operation instruction to be processed It is the second operation command A, the second operation command C, the second operation command D, the second operation command F, and the second operation command H.
步骤360f、在待处理操作指令中获取生成时间最晚的操作指令,并与除待 处理操作指令外的第二操作指令合并得到目标操作指令。Step 360f: Obtain an operation instruction with the latest generation time in the to-be-processed operation instruction, and merge with the second operation instruction except the operation instruction to be processed to obtain a target operation instruction.
在一实施例中,仍然以上述所假设的例子进行说明,假设第二操作指令A和第二操作指令C中第二操作指令A的生成时间较晚,第二操作指令D、第二操作指令F和第二操作指令H中第二操作指令D的生成时间最晚,那么第二操作指令A、第二操作指令B、第二操作指令D、第二操作指令E和第二操作指令G就是目标操作指令。In an embodiment, the above-mentioned assumed example is still used, and it is assumed that the second operation instruction A and the second operation instruction C are generated later than the second operation instruction A, and the second operation instruction D and the second operation instruction are F and the second operation instruction H have the latest generation time of the second operation instruction D, then the second operation instruction A, the second operation instruction B, the second operation instruction D, the second operation instruction E, and the second operation instruction G are Target operation instruction.
步骤360g、获取发送完目标操作指令所需的时长,将获得的时长作为第三时长。Step 360g: Obtain the length of time required to send the target operation instruction, and use the obtained duration as the third duration.
步骤360h、当第一时长不小于第三时长时,向车联网单元发送所有目标操作指令。Step 360h: When the first duration is not less than the third duration, all target operation instructions are sent to the car networking unit.
在一实施例中,当第一时长不小于第三时长时,说明待上报数据发送完毕后至下一个预设上报周期到达前的时长能够发送完所有目标操作指令。In an embodiment, when the first duration is not less than the third duration, it indicates that all the target operation instructions can be sent after the time when the data to be reported is sent and until the next preset reporting period arrives.
在一实施例中,当第一时长小于第三时长时,还包括:In an embodiment, when the first duration is less than the third duration, the method further includes:
步骤360i、在预先建立的类型与优先级的对应关系中获取目标操作指令所属类型的优先级。In step 360i, the priority of the type to which the target operation instruction belongs is obtained in the correspondence between the pre-established type and the priority.
步骤360j、按照优先级的高低对目标操作指令进行排列。Step 360j, arranging the target operation instructions according to the priority level.
步骤360k、获取在第一时长内能够发送的操作指令的个数,将获得的个数作为第一目标个数。Step 360k: Obtain the number of operation instructions that can be sent within the first time period, and use the obtained number as the first target number.
步骤360l、在排列后的目标操作指令中按照优先级从高往低的顺序获取与第一目标个数相同的目标操作指令,并向车辆网单元发送。Step 360l: Obtain the target operation instruction with the same number of the first target in the order of priority from the highest to the lower target operation command, and send it to the vehicle network unit.
步骤360m、将剩余的目标操作指令留待至第四时长进行发送。In step 360m, the remaining target operation instructions are left to be sent to the fourth time length.
其中,第四时长为下一个预设上报周期待上报数据发送完毕后至再下一个(即,下下一个)预设上报周期到达前的时长。The fourth duration is the duration of the next preset reporting period after the data is sent to the next (ie, next) preset reporting period.
在一实施例中,在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车联网单元发送第二操作指令,包括:In an embodiment, after the sending of the data to be reported is completed, the second operation instruction is sent to the vehicle networking unit within a period of time before the arrival of the next preset reporting period, including:
步骤360n、在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车联网单元发送缓存队列中的第二操作指令。Step 360n: Send a second operation instruction in the cache queue to the car network unit after the time when the data to be reported is sent and until the time before the next preset report period arrives.
在一实施例中,在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车联网单元发送第二操作指令之后,还包括:In an embodiment, after the second operation instruction is sent to the car network unit after the time when the data to be reported is sent and the time before the next preset reporting period is reached, the method further includes:
步骤370、在在预设时长内未接收到车联网单元发送的针对第二操作指令的确认信息的情况下,将第二操作指令放在缓存队列的队尾。Step 370: If the confirmation information for the second operation instruction sent by the car network unit is not received within the preset time period, the second operation instruction is placed at the end of the cache queue.
在一实施例中,预设时长为第二操作指令容许的最大字节数除以MCU双工模式下传输的波特率再乘以2。In one embodiment, the preset duration is the maximum number of bytes allowed by the second operational command divided by the baud rate transmitted in the MCU duplex mode and multiplied by two.
本公开实施例提供的数据传输方法,当到达预设上报周期时,MCU向车联网单元发送待上报数据;在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车联网单元发送第二操作指令。从本公开实施例可见,由于第二操作指令只在两个预设上报周期之间待上报数据发送完后的间隔里发送,因此保证了待上报数据能够及时上报至车联网单元中;并且合并了第二操作指令中的一些指令,使得待上报数据和第二操作指令能够轮流进行发送,从而减轻了MCU的负荷,极大程度地防止了MCU发生拥塞。In the data transmission method provided by the embodiment of the present disclosure, when the preset reporting period is reached, the MCU sends the data to be reported to the car network unit; after the data to be reported is sent to the time before the arrival of the next preset reporting period, the in-vehicle network unit Send a second operation instruction. It can be seen from the embodiment of the present disclosure that the second operation instruction is sent only in the interval after the data to be reported is sent between the two preset reporting periods, so that the data to be reported can be reported to the car networking unit in time; Some of the second operation instructions enable the data to be reported and the second operation instruction to be transmitted in turn, thereby reducing the load on the MCU and greatly preventing the MCU from being congested.
实施例四Embodiment 4
本公开还提供一个应用场景(只发送第二操作指令)以说明本公开实施例提供的数据传输方法,如图4所示,该方法包括步骤401至步骤406。The present disclosure also provides an application scenario (only the second operation instruction is sent) to describe the data transmission method provided by the embodiment of the present disclosure. As shown in FIG. 4, the method includes steps 401 to 406.
步骤401、MCU开始根据业务的定义,先确定这个指令组(请求指令和响应指令)的标示值(通常为每个业务指令自己保存一个标示值,在发送的过程中,自动增加,从0–255循环赋值),然后发送指令给车联网单元,并将这个指令存入到重发队列中,重发次数为3次,超过3次,就认为指令发送失败。Step 401: The MCU starts to determine the indication value of the instruction group (request command and response instruction) according to the definition of the service (usually, each service instruction saves a label value by itself, and automatically increases during the sending process, from 0 to – 255 loop assignment), then send the instruction to the car networking unit, and store the instruction in the retransmission queue. The number of retransmissions is 3, more than 3 times, and the instruction is considered to have failed to be sent.
步骤402、通过指令组的标示值在重发队列中查找对应的指令,以此来判断这个确认消息就是这个指令组中的发送指令的确认消息,如果这个确认消息的标示值在重发队列中找不到对应的指令则认为这个确认消息是无效的,直接抛弃掉,进入步骤403。如果确认这个确认消息是有效的,则进入到步骤405。Step 402: Searching for a corresponding instruction in the retransmission queue by using the marked value of the instruction group, so as to determine that the confirmation message is an acknowledgement message of the sending instruction in the instruction group, if the identifier value of the confirmation message is in the retransmission queue. If the corresponding instruction is not found, the confirmation message is considered invalid, and is directly discarded, and the process proceeds to step 403. If it is confirmed that this confirmation message is valid, it proceeds to step 405.
步骤403、在重发队列中找到这个要重新发送的指令,再次发送给车联网单元,同时,将这个指令在重发队列中的重发时间后延一个重发间隔。发送完成后,进入判断404。Step 403: Find the instruction to be resent in the retransmission queue, and send it to the car networking unit again. At the same time, delay the retransmission time of the instruction in the retransmission queue by one retransmission interval. After the transmission is completed, the judgment 404 is entered.
步骤404、判断当前重发的指令重发次数是否为3,如果不为3,则回到判断 402,继续判断是否可以收到确认消息,如果重发次数为3,则进入步骤406。Step 404: Determine whether the number of retransmissions of the current retransmission is 3, if not 3, return to the judgment 402, continue to determine whether the confirmation message can be received, and if the number of retransmissions is 3, proceed to step 406.
步骤405、删除重发队列中的这个指令,因为这个指令已经确认被收到。Step 405: Delete the instruction in the retransmission queue because the instruction has been acknowledged to be received.
步骤406、因为重发了3次,都没有收到指令被收到的确认,判定这个指令发送失败,然后删除重发队列中的指令。 Step 406, because the retransmission is repeated 3 times, no acknowledgement is received that the instruction is received, it is determined that the instruction fails to be sent, and then the instruction in the retransmission queue is deleted.
本公开还提供一个应用场景(只发送待上报数据)以说明本公开实施例提供的数据传输方法,如图5所示,该方法包括步骤501至步骤505。The present disclosure also provides an application scenario (only the data to be reported is sent) to describe the data transmission method provided by the embodiment of the present disclosure. As shown in FIG. 5, the method includes steps 501 to 505.
步骤501、MCU将车辆状态等数据打包成第二操作指令,并估算出发送这些数据大概所需的时间T1,并准备通过串口发送这些指令。Step 501: The MCU packs data such as vehicle status into a second operation instruction, and estimates a time T1 required for transmitting the data, and prepares to send the instructions through the serial port.
步骤502、MCU判断发送队列是否有数据等待发送,如果是的话,则会执行步骤503;如果否的话,则执行步骤504。Step 502: The MCU determines whether the sending queue has data waiting to be sent. If yes, step 503 is performed; if not, step 504 is performed.
步骤503、MCU通过串口发送第二操作指令,然后在经过大约T1秒后,开启发送队列数据的发送。Step 503: The MCU sends a second operation instruction through the serial port, and then starts sending the transmission queue data after about T1 seconds.
步骤504、MCU暂停发送存于发送队列中的第二操作指令,为发送待上报数据做准备,此时,新的第二操作指令产生后仍然会存入发送队列,等待发送。Step 504: The MCU suspends sending the second operation instruction stored in the sending queue to prepare for sending the data to be reported. At this time, the new second operation instruction is still stored in the sending queue and is waiting to be sent.
步骤505、MCU进入到下一个发送第二操作指令的周期中,当满足上报条件时,继续步骤501。Step 505: The MCU enters the next period of sending the second operation instruction. When the reporting condition is met, step 501 is continued.
本公开还提供一个应用场景(既发送待上报数据,又发送第二操作指令)以说明本公开实施例提供的数据传输方法,如图6所示,该方法包括步骤601至步骤608。The present disclosure also provides an application scenario (both to send data to be reported and a second operation command) to describe the data transmission method provided by the embodiment of the present disclosure. As shown in FIG. 6, the method includes steps 601 to 608.
步骤601、MCU开机后,计算出周期性上报的第二操作指令的数据量,以及发送这些数据要花费的时间T1,根据串口的带宽的一半(因为双工模式)来计算,由此可以估计出一个合理的时间值。然后开始发送待上报数据的时候,记录下当前的时间T2,计算出下一组第二操作指令上报的时间T3,用T3减去T1、T2的差,就是串口相对空闲的时间,用这个空闲时间来发送检测到的要上报的第二操作指令。Step 601: After the MCU is powered on, calculate the data amount of the second operation instruction periodically reported, and the time T1 taken to send the data, which is calculated according to half of the bandwidth of the serial port (because of the duplex mode), thereby estimating Give a reasonable time value. Then, when the data to be reported is started to be sent, the current time T2 is recorded, and the time T3 reported by the next group of second operation instructions is calculated. The difference between T1 and T2 is subtracted by T3, which is the time when the serial port is relatively idle. Time to send the detected second operation instruction to be reported.
步骤602、检测到有要发送的第二操作指令,将这些指令先存入到一个发送队列。Step 602: Detecting that there are second operation instructions to be sent, and storing the instructions into a sending queue.
步骤603、检测当前是否是第二操作指令上报的时间,如果是的话,等待这 些数据完成发送,然后再读取发送队列里的指令组到发送缓冲中,并计算发送这些数据所需的时间。Step 603: Detect whether the current time is reported by the second operation instruction, and if so, wait for the data to complete the transmission, and then read the instruction group in the transmission queue to the transmission buffer, and calculate the time required to send the data.
步骤604、如果发送完发送缓冲的数据所需的时间小于当前时间到下一个固定周期上报的时间,则全部依次发送出去,执行步骤605;如果这个时间大于当前时间到下一个固定周期上报的时间,则执行步骤606。Step 604: If the time required to send the buffered data is less than the time reported by the current time to the next fixed period, all of them are sent out in sequence, and step 605 is performed; if the time is greater than the current time to the next fixed period. Then, step 606 is performed.
步骤605、依次将发送缓冲中的数据指令发送给车联网单元。Step 605: Send the data command in the sending buffer to the car networking unit in sequence.
判断606、先将优先级高的指令放到发送缓冲中,然后判断当前的发送缓冲中的指令,是否有类型相同的事件,如果有,则执行步骤608;如果没有的话,则执行步骤607。The determination 606 is to first put the instruction with the higher priority into the sending buffer, and then determine whether the instruction in the current sending buffer has an event of the same type. If yes, execute step 608; if not, execute step 607.
步骤607、按照当前时间到下一个固定周期上报的时间内能发送的最大数据数量,将发送缓冲中的数据发送给车联网单元。发送缓冲中未能发送完的指令,在执行603时,和刚刚从发送队列中的读取的指令一起构成发送缓冲的数据。Step 607: Send the data in the transmission buffer to the car network unit according to the maximum amount of data that can be sent in the time reported by the current time to the next fixed period. The instruction that failed to be sent in the transmission buffer, when executed 603, constitutes the data of the transmission buffer together with the instruction just read from the transmission queue.
步骤608、相同类型的事件,如多次右前车门状态的变化、多次右后车门状态的变化、多次引擎盖状态的变化等归为一类的多个连续事件,因为服务器的数据上报策略中,这些事件是对应一个消息,所以把这些状态的以最后一次的状态为准,合并成一个最终的状态的指令,减少了发送缓冲中的数据量。执行步骤601。 Step 608, the same type of event, such as multiple right front door state changes, multiple right rear door state changes, multiple hood state changes, etc. are classified into a plurality of consecutive events, because the server's data reporting strategy In the case, these events correspond to one message, so the order of these states, which is based on the last state, is merged into a final state, reducing the amount of data in the send buffer. Go to step 601.
实施例五Embodiment 5
本公开实施例提供一种车联网单元,如图7所示,该车联网单元7包括:An embodiment of the present disclosure provides a vehicle networking unit. As shown in FIG. 7, the vehicle networking unit 7 includes:
第一发送模块701,设置为向MCU依次发送多个第一操作指令。The first sending module 701 is configured to sequentially send a plurality of first operation instructions to the MCU.
第一接收模块702,设置为接收MCU发送的所述多个第一操作指令中的至少一个第一操作指令的确认消息。The first receiving module 702 is configured to receive an acknowledgement message of the at least one first operation instruction of the plurality of first operation instructions sent by the MCU.
第一处理模块703,设置为根据所述确认消息的接收时长以及当前重发间隔确定目标重发间隔。The first processing module 703 is configured to determine a target retransmission interval according to the receiving duration of the acknowledgement message and the current retransmission interval.
第一处理模块703,还设置为根据所述目标重发间隔确定未返回确认消息的第一操作指令的重发时间。The first processing module 703 is further configured to determine, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return the confirmation message.
第一发送模块701,还设置为根据所述重发时间重新发送未返回确认消息的第一操作指令。The first sending module 701 is further configured to resend the first operation instruction that does not return the confirmation message according to the retransmission time.
在一实施例中,第一处理模块703,还设置为:In an embodiment, the first processing module 703 is further configured to:
将已发出的第一操作指令放入预先建立的重发队列。The first operational instruction that has been issued is placed in a pre-established retransmission queue.
在重发队列中获取并删除确认消息对应的第一操作指令,以及未返回确认消息但重发次数超过预设重发次数的第一操作指令。Acquiring and deleting the first operation instruction corresponding to the confirmation message in the retransmission queue, and the first operation instruction that does not return the confirmation message but the number of retransmissions exceeds the preset number of retransmissions.
第一处理模块703,设置为根据所述目标重发间隔确定重发队列中第一操作指令的重发时间。The first processing module 703 is configured to determine, according to the target retransmission interval, a retransmission time of the first operation instruction in the retransmission queue.
在一实施例中,第一处理模块703是设置为:In an embodiment, the first processing module 703 is configured to:
获取重发队列中第一操作指令的最近一次发送时间。Gets the last transmission time of the first operation instruction in the retransmission queue.
将获得的重发队列中第一操作指令的最近一次发送时间加上目标重发间隔,得到重发队列中第一操作指令的重发时间。The latest transmission time of the first operation instruction in the obtained retransmission queue is added to the target retransmission interval to obtain the retransmission time of the first operation instruction in the retransmission queue.
在一实施例中,第一处理模块703是设置为:In an embodiment, the first processing module 703 is configured to:
获取确认消息对应的第一操作指令的首次发送时间以及确认消息的接收时间。Obtaining the first transmission time of the first operation instruction corresponding to the confirmation message and the reception time of the confirmation message.
根据获得的首次发送时间和接收时间获取确认消息的接收时长。The receiving time of the confirmation message is obtained according to the obtained first sending time and receiving time.
在接收时长不小于当前重发间隔与预设阈值的乘积,且小于当前重发间隔的情况下,设置目标重发间隔大于当前重发间隔。When the receiving duration is not less than the product of the current retransmission interval and the preset threshold, and is smaller than the current retransmission interval, the target retransmission interval is set to be larger than the current retransmission interval.
在一实施例中,在接收时长与预设重发间隔的比值不大于预设阈值的情况下,第一处理模块703,还设置为设置目标重发间隔为预设重发间隔。In an embodiment, in a case that the ratio of the receiving duration to the preset retransmission interval is not greater than the preset threshold, the first processing module 703 is further configured to set the target retransmission interval to be the preset retransmission interval.
在一实施例中,在当前重发间隔不是预设重发间隔,且接收时长大于预设重发间隔与预设阈值的乘积,且接收时长小于当前重发间隔与预设阈值的乘积的情况下,第一处理模块703,还设置为设置目标重发间隔为当前重发间隔。In an embodiment, the current retransmission interval is not a preset retransmission interval, and the receiving duration is greater than a product of a preset retransmission interval and a preset threshold, and the receiving duration is less than a product of a current retransmission interval and a preset threshold. Next, the first processing module 703 is further configured to set the target retransmission interval to the current retransmission interval.
在一实施例中,当确认消息为第一个确认消息时,当前重发间隔为预设重发间隔。In an embodiment, when the acknowledgement message is the first acknowledgement message, the current retransmission interval is a preset retransmission interval.
本公开实施例提供的车联网单元,向微控制单元MCU依次发送多个第一操作指令;接收MCU发送的多个第一操作指令中的至少一个第一操作指令的确认消息;在确认消息为多个第一操作指令中的任何一个第一操作指令的确认消息的情况下,根据确认消息的接收时长以及当前重发间隔确定目标重发间隔;根 据获得的目标重发间隔确定未返回确认消息的第一操作指令的重发时间;根据获得的重发时间重新发送未返回确认消息的第一操作指令。从本公开实施例可见,由于当接收到了任何一个第一操作指令的确认消息时,都会根据该确认消息的接收时长以及当前重发间隔重新确定目标重发间隔,进而根据所确定的目标重发间隔重新确定未返回确认消息的第一操作指令的重发时间,因此实现了根据根据第一操作指令的反馈情况调整第一操作指令重发频率的目的,从而减轻了MCU的负荷,极大程度地防止了MCU发生拥塞。The vehicle networking unit provided by the embodiment of the present disclosure sequentially sends a plurality of first operation instructions to the micro control unit MCU; and receives an acknowledgement message of at least one of the plurality of first operation instructions sent by the MCU; In the case of an acknowledgment message of any one of the plurality of first operation instructions, determining a target retransmission interval according to the reception duration of the acknowledgment message and the current retransmission interval; determining that the acknowledgment message is not returned according to the obtained target retransmission interval The retransmission time of the first operation instruction; resending the first operation instruction that does not return the confirmation message according to the obtained retransmission time. It can be seen from the embodiment of the present disclosure that, when an acknowledgment message of any one of the first operation instructions is received, the target retransmission interval is re-determined according to the reception duration of the acknowledgment message and the current retransmission interval, and then retransmitted according to the determined target. The interval re-determines the retransmission time of the first operation instruction that does not return the confirmation message, thereby realizing the purpose of adjusting the retransmission frequency of the first operation instruction according to the feedback condition according to the first operation instruction, thereby reducing the load of the MCU, and greatly The MCU is prevented from being congested.
在实际应用中,第一发送模块701、第一接收模块702和第一处理模块703均可由位于车联网单元中的中央处理器(Central Processing Unit,CPU)、微处理器(Micro Processor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。In a practical application, the first sending module 701, the first receiving module 702, and the first processing module 703 may each be a central processing unit (CPU), a microprocessor (Micro Processor Unit, MPU) located in the vehicle networking unit. ), digital signal processor (DSP) or Field Programmable Gate Array (FPGA) implementation.
实施例六Embodiment 6
本公开实施例提供一种MCU,如图8所示,该MCU 8包括:An embodiment of the present disclosure provides an MCU. As shown in FIG. 8, the MCU 8 includes:
第二接收模块801,设置为接收车联网单元发送的多个第一操作指令。The second receiving module 801 is configured to receive a plurality of first operation instructions sent by the car networking unit.
第二处理模块802,设置为生成所述多个第一操作指令中的至少一个第一操作指令的确认信息。The second processing module 802 is configured to generate confirmation information of at least one of the plurality of first operation instructions.
第二发送模块803,设置为向车联网单元发送生成的确认消息。The second sending module 803 is configured to send the generated confirmation message to the car networking unit.
第二接收模块801,还设置为接收车联网单元根据获得的重发时间重新发送未返回确认消息的第一操作指令。The second receiving module 801 is further configured to receive a first operation instruction that the car networking unit resends the non-return confirmation message according to the obtained retransmission time.
其中,重发时间为车联网单元根据确认消息的接收时长、当前重发间隔确定的。The retransmission time is determined by the car networking unit according to the receiving duration of the confirmation message and the current retransmission interval.
在一实施例中,第二发送模块803还设置为:In an embodiment, the second sending module 803 is further configured to:
在到达预设上报周期的情况下,向车联网单元发送待上报数据。When the preset reporting period is reached, the data to be reported is sent to the car networking unit.
在所述待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车联网单元发送第二操作指令。And sending a second operation instruction to the car networking unit after the time when the to-be-reported data is sent to the time before the next preset reporting period arrives.
在一实施例中,第二发送模块803是设置为:In an embodiment, the second sending module 803 is configured to:
获取待上报数据发送完毕后至下一个预设上报周期到达前的时长,将获得 的时长作为第一时长。After the data to be reported is sent to the time before the next preset reporting period arrives, the obtained duration is taken as the first duration.
获取发送完所有第二操作指令所需的时长,将获得的时长作为第二时长。The length of time required to send all the second operation instructions is obtained, and the obtained duration is taken as the second duration.
在第一时长不小于第二时长的情况下,向车联网单元发送所有第二操作指令。In the case where the first duration is not less than the second duration, all second operational commands are sent to the car networking unit.
在一实施例中,在第一时长小于第二时长的情况下,第二发送模块803还设置为:In an embodiment, when the first duration is less than the second duration, the second sending module 803 is further configured to:
获取所有第二操作指令的所属类型。Get the type of all second operation instructions.
在存在所属类型相同的第二操作指令的情况下,获取所属类型相同的第二操作指令,并将获得的第二操作指令作为待处理操作指令。In the case where there is a second operation instruction of the same type, the second operation instruction of the same type is acquired, and the obtained second operation instruction is taken as the operation instruction to be processed.
在待处理操作指令中获取生成时间最晚的操作指令,并与除待处理操作指令外的第二操作指令合并得到目标操作指令。The operation instruction with the latest generation time is acquired in the to-be-processed operation instruction, and is merged with the second operation instruction except the operation instruction to be processed to obtain the target operation instruction.
获取发送完目标操作指令所需的时长,将获得的时长作为第三时长。The length of time required to send the target operation instruction is obtained, and the obtained duration is taken as the third duration.
在第一时长不小于第三时长的情况下,向车联网单元发送所有目标操作指令。In the case where the first time length is not less than the third time length, all target operation instructions are transmitted to the car network unit.
在一实施例中,在第一时长小于第三时长的情况下,第二发送模块803还设置为:In an embodiment, in a case where the first duration is less than the third duration, the second sending module 803 is further configured to:
在预先建立的类型与优先级的对应关系中获取目标操作指令所属类型的优先级。The priority of the type to which the target operation instruction belongs is obtained in the correspondence between the pre-established type and the priority.
按照优先级的高低对目标操作指令进行排列。The target operation instructions are arranged according to the priority level.
获取在第一时长内能够发送的操作指令的个数,将获得的个数作为第一目标个数。The number of operation instructions that can be transmitted within the first time period is obtained, and the obtained number is used as the first target number.
在排列后的目标操作指令中按照优先级从高往低的顺序获取与第一目标个数相同的目标操作指令,并向车联网单元发送。The target operation command having the same number as the first target is acquired in the target operation command after the arrangement in the order of priority from high to low, and transmitted to the car networking unit.
将剩余的目标操作指令留待至第四时长进行发送。其中,第四时长为下一个预设上报周期待上报数据发送完毕后至再下一个预设上报周期到达前的时长。The remaining target operation instructions are left until the fourth time period for transmission. The fourth duration is the duration of the next preset reporting period after the data is sent to the next preset reporting period.
在一实施例中,在不存在所属类型相同的第二操作指令的情况下,第二发送模块803还设置为:In an embodiment, in the case that there is no second operation instruction of the same type, the second sending module 803 is further configured to:
在预先建立的类型与优先级的对应关系中获取对应第二操作指令所属类型的优先级。The priority corresponding to the type of the second operation instruction is obtained in the correspondence between the pre-established type and the priority.
按照优先级的高低对第二操作指令进行排列。The second operation instruction is arranged according to the priority level.
获取在第一时长内能够发送的操作指令的个数,将获得的个数作为第二目标个数。The number of operation instructions that can be transmitted within the first time period is obtained, and the obtained number is used as the second target number.
在排列后的第二操作指令中按照优先级从高往低的顺序获取与第二目标个数相同的第二操作指令,并向车联网单元发送。The second operation instruction having the same number of second targets is acquired in the second operation instruction after the arrangement in order of priority from high to low, and is transmitted to the car network unit.
将剩余的第二操作指令留待第四时长进行发送。其中,第四时长为下一个预设上报周期待上报数据发送完毕后至下下一个预设上报周期到达前的时长。The remaining second operation instruction is left for the fourth time period for transmission. The fourth duration is the duration of the next preset reporting period after the data is sent to the next preset reporting period.
在一实施例中,第二发送模块803还设置为:In an embodiment, the second sending module 803 is further configured to:
在待上报数据发送完毕后至下一个预设上报周期到达前的时长内,向车联网单元发送缓存队列中的第二操作指令。The second operation instruction in the buffer queue is sent to the car network unit after the time when the data to be reported is sent and the time before the next preset reporting period arrives.
第二处理模块802,还设置为当在预设时长内未接收到车联网单元发送的针对第二操作指令的确认信息时,将第二操作指令放在缓存队列的队尾。The second processing module 802 is further configured to place the second operation instruction at the end of the cache queue when the confirmation information for the second operation instruction sent by the car network unit is not received within the preset time period.
本公开实施例提供的MCU,当到达预设上报周期时向车联网单元发送待上报数据;在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车联网单元发送第二操作指令。从本公开实施例可见,由于第二操作指令只在两个预设上报周期之间待上报数据发送完后的间隔里发送,因此保证了待上报数据能够及时上报至车联网单元中;并且使得待上报数据和第二操作指令能够轮流进行发送,从而减轻了MCU的负荷,极大程度地防止了MCU发生拥塞。The MCU provided by the embodiment of the present disclosure sends the data to be reported to the car network unit when the preset reporting period is reached, and sends the second operation to the car network unit after the data to be reported is sent to the time before the next preset reporting period arrives. instruction. It can be seen from the embodiment of the present disclosure that the second operation instruction is sent only in the interval after the data to be reported is sent between the two preset reporting periods, so that the data to be reported can be reported to the car networking unit in time; The data to be reported and the second operation instruction can be transmitted in turn, thereby reducing the load on the MCU and greatly preventing the MCU from being congested.
在实际应用中,第一接收模块801、第二处理模块802和第二发送模块803均可由位于MCU中的CPU、MPU、DSP或FPGA等实现。In practical applications, the first receiving module 801, the second processing module 802, and the second sending module 803 can all be implemented by a CPU, an MPU, a DSP, an FPGA, or the like located in the MCU.
实施例七Example 7
本公开实施例提供又一种车联网单元,如图9所示,该车联网单元9包括:第三发送模块901,重发队列模块902,第三接收模块903和动态调整模块904。The embodiment of the present disclosure provides another vehicle networking unit. As shown in FIG. 9 , the vehicle networking unit 9 includes a third sending module 901, a retransmission queue module 902, a third receiving module 903, and a dynamic adjustment module 904.
第三发送模块901,设置为发送待上报数据给MCU,并将这些指令存入到重发队列。The third sending module 901 is configured to send the to-be-reported data to the MCU, and store the instructions in the retransmission queue.
重发队列模块902,设置为保存尚未收到MCU的确认的指令,等待重发时 间达到后,发送指令给发送模块。The retransmission queue module 902 is configured to save an instruction that has not received the confirmation of the MCU, and wait for the retransmission time to be reached, and then send an instruction to the sending module.
第三接收模块903,设置为接收MCU的响应,包含了指令收到的确认消息、指令处理的结果以及MCU主动发起的请求。The third receiving module 903 is configured to receive the response of the MCU, and includes an acknowledgement message received by the instruction, a result of the instruction processing, and a request initiated by the MCU.
动态调整模块904,设置为记录指令发送出去后收到MCU的确认指令的时长,用来判断当前的MCU是否过于繁忙,以此来通知重发队列修改重发的时间间隔。The dynamic adjustment module 904 is configured to record the duration of the acknowledgment command received by the MCU after the command is sent, and is used to determine whether the current MCU is too busy, thereby notifying the retransmission queue to modify the retransmission time interval.
动态调整模块904工作流程如下,首先将重发时间间隔默认采用待上报数据的最大字节数除以串口双工模式下传输的波特率再乘以2,根据MCU发送的确认指令响应时间来调整车联网单元向MCU重发指令的时间间隔,当MCU发送的确认指令响应时间大于默认重发间隔时间的90%但是仍然在默认重发间隔时间内,说明MCU正在忙于处理其他的指令,则将重发队列中的默认重发间隔时间乘以2,作为新的重发间隔,以此,降低发送给MCU的指令数量,减轻MCU的负担,如果重发间隔时间乘以2后,仍然出现MCU发送的确认指令响应时间大于修改后的重发间隔时间的90%但是仍然在修改的重发间隔时间内,此时再次用重发间隔时间乘以2,如果在小于修改后的重发间隔的90%但是大于默认重发间隔的90%,则保持现在的重发间隔不变,依次类推,满足修改重发间隔的条件后,修改重发间隔,根据重传的次数,可以得出最大的重发时间间隔。当MCU发送的确认指令响应时间小于默认的重发间隔的90%时,说明要检查重发间隔是否是默认值,如果是默认值,则不作调整,如果不是默认值,则恢复为默认值。The dynamic adjustment module 904 has the following workflow. First, the retransmission interval is divided by the maximum number of bytes to be reported by the baud rate of the serial port duplex mode and multiplied by 2, according to the response time of the acknowledgment command sent by the MCU. Adjusting the time interval for the car networking unit to resend the command to the MCU. When the response time of the acknowledgment command sent by the MCU is greater than 90% of the default retransmission interval but still within the default retransmission interval, indicating that the MCU is busy processing other instructions, then Multiply the default retransmission interval in the retransmission queue by 2 as the new retransmission interval, thereby reducing the number of instructions sent to the MCU and reducing the burden on the MCU. If the retransmission interval is multiplied by 2, it still appears. The response time of the acknowledgment command sent by the MCU is greater than 90% of the modified retransmission interval time but still within the modified retransmission interval time. At this time, the retransmission interval time is again multiplied by 2, if it is less than the modified retransmission interval. 90% but greater than 90% of the default retransmission interval, then keep the current retransmission interval unchanged, and so on, after modifying the conditions for modifying the retransmission interval, modify Hair interval, according to the number of retransmissions, retransmission can determine the maximum time interval. When the response time of the acknowledgment command sent by the MCU is less than 90% of the default retransmission interval, it indicates whether the retransmission interval is the default value. If it is the default value, no adjustment is made. If it is not the default value, it is restored to the default value.
实施例八Example eight
本公开实施例提供又一种MCU,如图10所示,该MCU 10包括:第四发送模块1001,重发队列模块1002,第四接收模块1003,传输优化调整模块1004。The MCU 10 includes a fourth sending module 1001, a retransmission queue module 1002, a fourth receiving module 1003, and a transmission optimization adjustment module 1004.
第四发送模块1001,设置为发送第二操作指令和待上报数据给车联网单元,并将第二操作指令存入到重发队列,待上报数据不需要存入到重发队列。The fourth sending module 1001 is configured to send the second operation instruction and the data to be reported to the car networking unit, and store the second operation instruction into the retransmission queue, and the data to be reported does not need to be stored in the retransmission queue.
重发队列模块1002,设置为保存尚未收到车联网单元的确认的第二操作指令,等待重发时间达到后,发送指令给第四发送模块1001。The retransmission queue module 1002 is configured to save a second operation instruction that has not received the confirmation of the car network unit, and wait for the retransmission time to be reached, and then send an instruction to the fourth transmission module 1001.
第四接收模块1003,设置为接收车联网单元的响应,包含了指令收到的确认消息、指令处理的结果以及车联网单元发起的请求指令。The fourth receiving module 1003 is configured to receive a response of the car networking unit, and includes an acknowledgement message received by the instruction, a result of the command processing, and a request instruction initiated by the car networking unit.
传输优化调整模块1004,设置为优化MCU上报数据到车联网单元的流程,待上报数据都严格按照固定的间隔上报,当有第二操作指令要发送的时候,先计算重发队列里的指令和发送模块里的指令所要耗费的数据量,然后判断当前时间到下一个周期性上报的时间内是否可以完成当前队列数据的发送,如果可以,则直接按次序进行发送,如果时间不够完成发送,则将同一类型的第二操作指令先行合并,然后再由第四发送模块1001进行发送。The transmission optimization adjustment module 1004 is configured to optimize the process of reporting the data to the vehicle networking unit by the MCU, and the data to be reported is reported in strict intervals according to a fixed interval. When a second operation instruction is to be sent, the instruction in the retransmission queue is first calculated. Sending the amount of data consumed by the instructions in the module, and then determining whether the current queue data can be sent within the time period of the next periodic report. If so, the data is sent directly in order. If the time is not enough to complete the transmission, The second operation instruction of the same type is merged first, and then transmitted by the fourth transmission module 1001.
传输优化调整模块1004工作流程如下,首先以固定的间隔发送待上报数据,第二操作指令都先存入到队列中,可能涉及到多种业务,如车门状态、偷盗告警等事件,在发送前,先计算一下发送所有第二操作指令指令的时间,然后判断当前时间到下一个周期性上报的时间内是否可以完成发送,如果可以,则发送给第四发送模块1001将指令发送给车联网单元,如果这个时间内无法完成发送,则先进行优先级排列,就按照当前时间到下一个周期性上报的时间内可以完成传输的数据量从优先级从高往低进行发送,剩下的第二操作指令再放回到待发送的业务指令队列中。The workflow of the transmission optimization adjustment module 1004 is as follows: First, the data to be reported is sent at a fixed interval, and the second operation instruction is first stored in the queue, which may involve various services, such as door status, theft alarm, etc., before being sent. First, calculate the time for sending all the second operation instruction instructions, and then judge whether the current time can be completed within the time of the next periodic report, if yes, send it to the fourth sending module 1001 to send the instruction to the car networking unit. If the transmission cannot be completed within this time, the priority is first arranged, and the amount of data that can be transmitted according to the current time to the next periodic reporting time is sent from the highest to the lowest, and the remaining second. The operation instruction is then placed back into the queue of service instructions to be sent.
实施例九Example nine
本公开实施例还提供一种用于实现数据传输的装置,包括第一存储器和第一处理器,其中,第一存储器中存储有以下可被第一处理器执行的指令:An embodiment of the present disclosure further provides an apparatus for implementing data transmission, including a first memory and a first processor, wherein the first memory stores the following instructions executable by the first processor:
向MCU依次发送多个第一操作指令。A plurality of first operation instructions are sequentially transmitted to the MCU.
接收MCU发送的多个第一操作指令中的至少一个第一操作指令的确认消息。Receiving an acknowledgement message of at least one of the plurality of first operation instructions sent by the MCU.
根据确认消息的接收时长以及当前重发间隔确定目标重发间隔。The target retransmission interval is determined according to the reception duration of the acknowledgment message and the current retransmission interval.
根据获得的目标重发间隔确定未返回确认消息的第一操作指令的重发时间。The retransmission time of the first operation instruction that does not return the confirmation message is determined according to the obtained target retransmission interval.
根据获得的重发时间重新发送未返回确认消息的第一操作指令。The first operation instruction that does not return the confirmation message is resent according to the obtained retransmission time.
在一实施例中,第一存储器中还存储有以下可被第一处理器执行的指令:In an embodiment, the first memory further stores the following instructions executable by the first processor:
将已发出的第一操作指令放入预先建立的重发队列。The first operational instruction that has been issued is placed in a pre-established retransmission queue.
在重发队列中获取并删除确认消息对应的第一操作指令,以及未返回确认消息但重发次数超过预设重发次数的第一操作指令。Acquiring and deleting the first operation instruction corresponding to the confirmation message in the retransmission queue, and the first operation instruction that does not return the confirmation message but the number of retransmissions exceeds the preset number of retransmissions.
根据获得的目标重发间隔确定重发队列中第一操作指令的重发时间。The retransmission time of the first operation instruction in the retransmission queue is determined according to the obtained target retransmission interval.
在一实施例中,第一存储器中进一步存储有以下可被第一处理器执行的指令:In an embodiment, the first memory further stores the following instructions executable by the first processor:
获取重发队列中第一操作指令的最近一次发送时间。Gets the last transmission time of the first operation instruction in the retransmission queue.
将获得的重发队列中第一操作指令的最近一次发送时间加上目标重发间隔,得到重发队列中第一操作指令的重发时间。The latest transmission time of the first operation instruction in the obtained retransmission queue is added to the target retransmission interval to obtain the retransmission time of the first operation instruction in the retransmission queue.
在一实施例中,第一存储器中还进一步存储有以下可被第一处理器执行的指令:In an embodiment, the first memory further stores the following instructions executable by the first processor:
获取确认消息对应的第一操作指令的首次发送时间以及确认消息的接收时间。Obtaining the first transmission time of the first operation instruction corresponding to the confirmation message and the reception time of the confirmation message.
根据获得的首次发送时间和接收时间获取确认消息的接收时长。The receiving time of the confirmation message is obtained according to the obtained first sending time and receiving time.
当接收时长不小于当前重发间隔与预设阈值的乘积,且小于当前重发间隔时,设置目标重发间隔大于当前重发间隔。When the receiving duration is not less than the product of the current retransmission interval and the preset threshold, and is less than the current retransmission interval, the target retransmission interval is set to be greater than the current retransmission interval.
在一实施例中,当接收时长与预设重发间隔的比值不大于预设阈值时,第一存储器中还存储有以下可被第一处理器执行的指令:In an embodiment, when the ratio of the receiving duration to the preset retransmission interval is not greater than a preset threshold, the first memory further stores the following instructions executable by the first processor:
设置目标重发间隔为预设重发间隔。Set the target retransmission interval to the preset retransmission interval.
在一实施例中,当前重发间隔不是预设重发间隔,且接收时长大于预设重发间隔与预设阈值的乘积,且接收时长小于当前重发间隔与预设阈值的乘积时,第一存储器中还存储有以下可被第一处理器执行的指令:In an embodiment, the current retransmission interval is not the preset retransmission interval, and the receiving duration is greater than the product of the preset retransmission interval and the preset threshold, and the receiving duration is less than the product of the current retransmission interval and the preset threshold. The following instructions are also stored in a memory that can be executed by the first processor:
设置目标重发间隔为当前重发间隔。Set the target retransmission interval to the current retransmission interval.
在一实施例中,当确认消息为第一个确认消息时,当前重发间隔为预设重发间隔。In an embodiment, when the acknowledgement message is the first acknowledgement message, the current retransmission interval is a preset retransmission interval.
本公开实施例还提供一种用于实现数据传输的装置,包括第二存储器和第二处理器,其中,第二存储器中存储有以下可被第二处理器执行的指令:An embodiment of the present disclosure further provides an apparatus for implementing data transmission, including a second memory and a second processor, wherein the second memory stores the following instructions executable by the second processor:
接收车联网单元发送的多个第一操作指令。Receiving a plurality of first operation instructions sent by the car networking unit.
生成多个第一操作指令中的至少一个第一操作指令的确认信息。Acknowledgement information of at least one of the plurality of first operational instructions is generated.
向车联网单元发送生成的确认消息。The generated confirmation message is sent to the car networking unit.
接收车联网单元根据获得的重发时间重新发送未返回确认消息的第一操作指令。The receiving car networking unit resends the first operation instruction that does not return the confirmation message according to the obtained retransmission time.
其中,重发时间为车联网单元根据确认消息的接收时长、当前重发间隔确定的。The retransmission time is determined by the car networking unit according to the receiving duration of the confirmation message and the current retransmission interval.
在一实施例中,第二存储器中还存储有以下可被第二处理器执行的指令:In an embodiment, the second memory further stores the following instructions executable by the second processor:
当到达预设上报周期时,MCU向车联网单元发送待上报数据。When the preset reporting period is reached, the MCU sends the data to be reported to the car networking unit.
在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车辆网单元发送第二操作指令。A second operation instruction is sent to the vehicle network unit within a time period after the transmission of the data to be reported is completed until the next preset reporting period arrives.
在一实施例中,第二存储器中还存储有以下可被第二处理器执行的指令:In an embodiment, the second memory further stores the following instructions executable by the second processor:
获取待上报数据发送完毕后至下一个预设上报周期到达前的时长,将获得的时长作为第一时长。After the data to be reported is sent to the time before the next preset reporting period arrives, the obtained duration is taken as the first duration.
获取发送完所有第二操作指令所需的时长,将获得的时长作为第二时长。The length of time required to send all the second operation instructions is obtained, and the obtained duration is taken as the second duration.
当第一时长不小于第二时长时,向车联网单元发送所有第二操作指令。When the first duration is not less than the second duration, all second operational commands are sent to the car networking unit.
在一实施例中,当第一时长小于第二时长时,第二存储器中还存储有以下可被第二处理器执行的指令:In an embodiment, when the first duration is less than the second duration, the second memory further stores the following instructions executable by the second processor:
获取所有第二操作指令的所属类型。Get the type of all second operation instructions.
当存在所属类型相同的第二操作指令时,获取所属类型相同的第二操作指令,并将获得的第二操作指令作为待处理操作指令。When there is a second operation instruction of the same type, the second operation instruction of the same type is acquired, and the obtained second operation instruction is taken as the operation instruction to be processed.
在待处理操作指令中获取生成时间最晚的操作指令,并与除待处理操作指令外的第二操作指令合并得到目标操作指令。The operation instruction with the latest generation time is acquired in the to-be-processed operation instruction, and is merged with the second operation instruction except the operation instruction to be processed to obtain the target operation instruction.
获取发送完目标操作指令所需的时长,将获得的时长作为第三时长。The length of time required to send the target operation instruction is obtained, and the obtained duration is taken as the third duration.
当第一时长不小于第三时长时,向车联网单元发送所有目标操作指令。When the first duration is not less than the third duration, all target operation instructions are sent to the car networking unit.
在一实施例中,当第一时长小于第三时长时,第二存储器中还存储有以下可被第二处理器执行的指令:In an embodiment, when the first duration is less than the third duration, the second memory further stores the following instructions executable by the second processor:
在预先建立的类型与优先级的对应关系中获取目标操作指令所属类型的优 先级。The priority of the type to which the target operation instruction belongs is obtained in the correspondence between the pre-established type and the priority.
按照优先级的高低将目标操作指令进行排列。The target operation instructions are arranged according to the priority level.
获取在第一时长内能够发送的操作指令的个数,将获得的个数作为第一目标个数。The number of operation instructions that can be transmitted within the first time period is obtained, and the obtained number is used as the first target number.
在排列后的目标操作指令中按照优先级从高往低的顺序获取与第一目标个数相同的目标操作指令,并向车联网单元发送。The target operation command having the same number as the first target is acquired in the target operation command after the arrangement in the order of priority from high to low, and transmitted to the car networking unit.
将剩余的目标操作指令留待至第四时长进行发送。其中,第四时长为下一个预设上报周期待上报数据发送完毕后至再下一个预设上报周期到达前的时长。The remaining target operation instructions are left until the fourth time period for transmission. The fourth duration is the duration of the next preset reporting period after the data is sent to the next preset reporting period.
在一实施例中,当不存在所属类型相同的第二操作指令时,第二存储器中还存储有以下可被第二处理器执行的指令:In an embodiment, when there is no second operation instruction of the same type, the second memory further stores the following instructions executable by the second processor:
在预先建立的类型与优先级的对应关系中获取对应第二操作指令所属类型的优先级。The priority corresponding to the type of the second operation instruction is obtained in the correspondence between the pre-established type and the priority.
按照优先级的高低将第二操作指令进行排列。The second operation instruction is arranged according to the priority level.
获取在第一时长内能够发送的操作指令的个数,将获得的个数作为第二目标个数。The number of operation instructions that can be transmitted within the first time period is obtained, and the obtained number is used as the second target number.
在排列后的第二操作指令中按照优先级从高往低的顺序获取与第二目标个数相同的第二操作指令,并向车联网单元发送。The second operation instruction having the same number of second targets is acquired in the second operation instruction after the arrangement in order of priority from high to low, and is transmitted to the car network unit.
将剩余的第二操作指令留待第四时长进行发送。其中,第四时长为下一个预设上报周期待上报数据发送完毕后至再下一个预设上报周期到达前的时长。The remaining second operation instruction is left for the fourth time period for transmission. The fourth duration is the duration of the next preset reporting period after the data is sent to the next preset reporting period.
在一实施例中,第二存储器中还存储有以下可被第二处理器执行的指令:In an embodiment, the second memory further stores the following instructions executable by the second processor:
在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车联网单元发送缓存队列中的第二操作指令。The second operation instruction in the buffer queue is sent to the car network unit after the time when the data to be reported is sent and the time before the next preset reporting period arrives.
当在预设时长内未接收到车联网单元发送的针对第二操作指令的确认信息时,将第二操作指令放在缓存队列的队尾。When the confirmation information for the second operation instruction sent by the car networking unit is not received within the preset time period, the second operation instruction is placed at the end of the cache queue.
实施例十Example ten
本公开实施例还提供一种计算机可读存储介质,该存储介质上存储有计算机指令,该计算机指令被处理器执行时实现上述任一实施例所述的方法。An embodiment of the present disclosure further provides a computer readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the method of any of the above embodiments.
存储介质——任何的一种或多种类型的存储器设备或存储设备。在实际应用中,上述的存储介质可以是易失性存储器(volatile memory),例如随机存取存储器(Random-Access Memory,RAM);或者非易失性存储器(non-volatile memory),例如只读存储器(Read-Only Memory,ROM),快闪存储器(flash memory),硬盘(Hard Disk Drive,HDD)或固态硬盘(Solid-State Drive,SSD);或者上述种类的存储器的组合,并向处理器提供指令和数据。Storage medium - any one or more types of memory devices or storage devices. In practical applications, the foregoing storage medium may be a volatile memory, such as a random access memory (RAM), or a non-volatile memory, such as a read-only memory. Read-Only Memory (ROM), flash memory, Hard Disk Drive (HDD) or Solid-State Drive (SSD); or a combination of the above types of memory, and to the processor Provide instructions and data.
上述存储介质还可以包括:光盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、软盘或磁带装置;计算机系统存储器或随机存取存储器,诸如动态随机存取存储器(Dynamic Random Access Memory,DRAM)、(Double Data Rate Random Access Memory,DDR RAM)、静态随机存取存储器(Static Random-Access Memory,SRAM)、扩展数据输出随机存取存储器(Extended Data Output Random Access Memory,EDO RAM),兰巴斯随机存取存储器(Rambus Random Access Memory,Rambus RAM)等;非易失性存储器,诸如闪存、磁介质(例如硬盘或光存储);寄存器或其它相似类型的存储器元件等。存储介质可以还包括其它类型的存储器或其组合。The storage medium may further include: a compact disc read-only memory (CD-ROM), a floppy disk or a magnetic tape device; a computer system memory or a random access memory such as a dynamic random access memory (Dynamic Random Access Memory, DRAM), (Double Data Rate Random Access Memory, DDR RAM), Static Random Access Memory (SRAM), Extended Data Output Random Access Memory (EDO RAM), Lan A Rambus Random Access Memory (Rambus RAM) or the like; a non-volatile memory such as a flash memory, a magnetic medium such as a hard disk or an optical storage; a register or other similar type of memory element or the like. The storage medium may also include other types of memory or a combination thereof.
上述处理器可以为特定用途集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理装置(Digital Signal Processing Device,DSPD)、可编程逻辑装置(Programmable Logic Device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器中的至少一种。The processor may be an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), or a Programmable Logic Device (Programmable Logic). Device, PLD), at least one of a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor.
另外,存储介质可以位于程序在其中被执行的第一计算机系统中,或者可以位于不同的第二计算机系统中,第二计算机系统通过网络(诸如因特网)连接到第一计算机系统。第二计算机系统可以提供程序指令给第一计算机执行。术语“存储介质”可以包括可以驻留在不同位置中(例如在通过网络连接的不同计算机系统中)的两个或更多存储介质。存储介质可以存储可由一个或多个处理器执行的程序指令(例如计算机程序)。Additionally, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system, the second computer system being coupled to the first computer system via a network, such as the Internet. The second computer system can provide program instructions to the first computer for execution. The term "storage medium" can include two or more storage media that can reside in different locations (eg, in different computer systems connected through a network). A storage medium may store program instructions (eg, a computer program) executable by one or more processors.

Claims (18)

  1. 一种数据传输方法,应用于车联网单元,包括:A data transmission method for a vehicle networking unit, comprising:
    向微控制单元MCU依次发送多个第一操作指令;Sending a plurality of first operation instructions to the micro control unit MCU in sequence;
    接收所述MCU发送的所述多个第一操作指令中的至少一个第一操作指令的确认消息;Receiving an acknowledgement message of at least one of the plurality of first operation instructions sent by the MCU;
    根据所述确认消息的接收时长以及当前重发间隔确定目标重发间隔;Determining a target retransmission interval according to the receiving duration of the acknowledgement message and the current retransmission interval;
    根据所述目标重发间隔确定未返回确认消息的第一操作指令的重发时间;Determining, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return the confirmation message;
    根据所述重发时间重新发送所述未返回确认消息的第一操作指令。And transmitting, by the retransmission time, the first operation instruction that does not return the confirmation message.
  2. 根据权利要求1所述的方法,在所述向MCU依次发送多个第一操作指令之后,还包括:The method of claim 1, after the sending the plurality of first operation instructions to the MCU in sequence, further comprising:
    将已发出的第一操作指令放入预先建立的重发队列;Putting the issued first operation instruction into a pre-established retransmission queue;
    在所述根据所述确认消息的接收时长以及当前重发间隔确定目标重发间隔之后,还包括:After determining the target retransmission interval according to the receiving duration of the acknowledgment message and the current retransmission interval, the method further includes:
    在所述重发队列中获取并删除所述确认消息对应的第一操作指令,以及未返回确认消息但重发次数超过所述预设重发次数的第一操作指令;Acquiring and deleting the first operation instruction corresponding to the confirmation message in the retransmission queue, and the first operation instruction that does not return the confirmation message but the number of retransmissions exceeds the preset number of retransmissions;
    所述根据所述目标重发间隔确定未返回确认消息的第一操作指令的重发时间,包括:Determining, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return an acknowledgement message, including:
    根据所述目标重发间隔确定所述重发队列中第一操作指令的重发时间。And determining, according to the target retransmission interval, a retransmission time of the first operation instruction in the retransmission queue.
  3. 根据权利要求2所述的方法,其中,所述根据所述目标重发间隔确定所述重发队列中第一操作指令的重发时间,包括:The method of claim 2, wherein the determining, according to the target retransmission interval, a retransmission time of the first operation instruction in the retransmission queue comprises:
    获取所述重发队列中第一操作指令的最近一次发送时间;Obtaining the last transmission time of the first operation instruction in the retransmission queue;
    将获得的所述重发队列中第一操作指令的最近一次发送时间加上所述目标重发间隔,得到所述重发队列中第一操作指令的重发时间。Adding the obtained last transmission time of the first operation instruction in the retransmission queue to the target retransmission interval to obtain a retransmission time of the first operation instruction in the retransmission queue.
  4. 根据权利要求1所述的方法,其中,所述根据所述确认消息的接收时长以及当前重发间隔确定目标重发间隔,包括:The method according to claim 1, wherein the determining the target retransmission interval according to the receiving duration of the acknowledgment message and the current retransmission interval comprises:
    获取所述确认消息对应的第一操作指令的首次发送时间以及所述确认消息的接收时间;Obtaining a first sending time of the first operation instruction corresponding to the confirmation message and a receiving time of the confirmation message;
    根据获得的首次发送时间和接收时间获取所述确认消息的接收时长;Obtaining a receiving duration of the confirmation message according to the obtained first sending time and receiving time;
    在所述接收时长不小于所述当前重发间隔与预设阈值的乘积,且小于所述当前重发间隔的情况下,设置所述目标重发间隔大于所述当前重发间隔。And when the receiving duration is not less than a product of the current retransmission interval and a preset threshold, and is smaller than the current retransmission interval, setting the target retransmission interval to be greater than the current retransmission interval.
  5. 根据权利要求4所述的方法,还包括:在所述接收时长与预设重发间隔的比值不大于所述预设阈值的情况下,设置所述目标重发间隔为所述预设重发间隔。The method according to claim 4, further comprising: setting the target retransmission interval to the preset retransmission if a ratio of the reception duration to a preset retransmission interval is not greater than the preset threshold interval.
  6. 根据权利要求4或5所述的方法,还包括:在所述当前重发间隔不是所述预设重发间隔,且所述接收时长大于预设重发间隔与所述预设阈值的乘积,且所述接收时长小于所述当前重发间隔与所述预设阈值的乘积的情况下,设置所述目标重发间隔为所述当前重发间隔。The method according to claim 4 or 5, further comprising: when the current retransmission interval is not the preset retransmission interval, and the receiving duration is greater than a product of a preset retransmission interval and the preset threshold, And if the receiving duration is less than a product of the current retransmission interval and the preset threshold, setting the target retransmission interval to the current retransmission interval.
  7. 根据权利要求4或5所述的方法,其中,在所述确认消息为第一个确认消息的情况下,所述当前重发间隔为预设重发间隔。The method according to claim 4 or 5, wherein, in the case that the acknowledgement message is the first acknowledgement message, the current retransmission interval is a preset retransmission interval.
  8. 一种数据传输方法,应用于微控制单元MCU,包括:A data transmission method applied to a micro control unit MCU, comprising:
    接收车联网单元发送的多个第一操作指令;Receiving a plurality of first operation instructions sent by the car networking unit;
    生成所述多个第一操作指令中的至少一个第一操作指令的确认消息;Generating an acknowledgement message of at least one of the plurality of first operational instructions;
    向所述车联网单元发送生成的确认消息;Sending the generated confirmation message to the car networking unit;
    接收所述车联网单元根据获得的重发时间重新发送未返回确认消息的第一操作指令。Receiving, by the car networking unit, resending the first operation instruction that does not return the confirmation message according to the obtained retransmission time.
  9. 根据权利要求8所述的方法,在所述接收车联网单元发送的多个第一操作指令之前或之后,还包括:The method of claim 8, before or after the receiving the plurality of first operation instructions sent by the car networking unit, further comprising:
    在到达预设上报周期的情况下,向所述车联网单元发送待上报数据;Sending data to be reported to the vehicle networking unit when the preset reporting period is reached;
    在所述待上报数据发送完毕后至下一个预设上报周期到达前的时长内,向所述车辆网单元发送第二操作指令。And transmitting, after the sending of the data to be reported, to the time period before the next preset reporting period arrives, sending a second operation instruction to the vehicle network unit.
  10. 根据权利要求9所述的方法,其中,所述在所述待上报数据发送完毕后至下一个预设上报周期到达前的时长内,向所述车辆网单元发送第二操作指令,包括:The method according to claim 9, wherein the sending, after the sending of the data to be reported, to the time before the arrival of the next preset reporting period, sends a second operation instruction to the vehicle network unit, including:
    获取所述待上报数据发送完毕后至下一个预设上报周期到达前的时长,将 获得的时长作为第一时长;Obtaining, before the arrival of the to-be-reported data, the time before the next preset reporting period arrives, and taking the obtained duration as the first duration;
    获取发送完所有所述第二操作指令所需的时长,将所述发送完所有所述第二操作指令所需的时长作为第二时长;Obtaining a length of time required to send all the second operation instructions, and using the duration required to send all the second operation instructions as a second duration;
    在所述第一时长不小于所述第二时长的情况下,向所述车联网单元发送所有所述第二操作指令。And transmitting, in the case where the first duration is not less than the second duration, all of the second operation instructions to the vehicle networking unit.
  11. 根据权利要求10所述的方法,还包括:The method of claim 10 further comprising:
    在所述第一时长小于所述第二时长的情况下,获取所有所述第二操作指令的所属类型;And acquiring, in the case that the first duration is less than the second duration, the type of all the second operation instructions;
    在存在所属类型相同的第二操作指令的情况下,获取所属类型相同的第二操作指令,并将获得的第二操作指令作为待处理操作指令;If there is a second operation instruction of the same type, the second operation instruction of the same type is acquired, and the obtained second operation instruction is used as the operation instruction to be processed;
    在所述待处理操作指令中获取生成时间最晚的操作指令,并与除所述待处理操作指令外的第二操作指令合并得到目标操作指令;Obtaining an operation instruction with the latest generation time in the to-be-processed operation instruction, and combining the second operation instruction other than the to-be-processed operation instruction to obtain a target operation instruction;
    获取发送完所述目标操作指令所需的时长,将所述发送完所述目标操作指令所需的时长作为第三时长;Obtaining a length of time required to send the target operation instruction, and using the duration required to send the target operation instruction as a third duration;
    在所述第一时长不小于所述第三时长的情况下,向所述车联网单元发送所有所述目标操作指令。In a case where the first duration is not less than the third duration, all of the target operation instructions are transmitted to the vehicle networking unit.
  12. 根据权利要求11所述的方法,还包括:The method of claim 11 further comprising:
    在所述第一时长小于所述第三时长的情况下,在预先建立的类型与优先级的对应关系中获取所述目标操作指令所属类型的优先级;If the first duration is less than the third duration, the priority of the type to which the target operation instruction belongs is obtained in a correspondence between the pre-established type and the priority;
    按照优先级的高低对所述目标操作指令进行排列;Arranging the target operation instructions according to the priority level;
    获取在所述第一时长内能够发送的操作指令的个数,将获得的个数作为第一目标个数;Obtaining, by using the number of operation instructions that can be sent in the first duration, the number of obtained instructions as the first target number;
    在排列后的所述目标操作指令中按照优先级从高往低的顺序获取与所述第一目标个数相同的目标操作指令,并向所述车辆网单元发送;Obtaining, in the target operation instruction after the arrangement, the same target operation instruction as the first target number according to the priority from high to low, and transmitting to the vehicle network unit;
    将剩余的目标操作指令留待至第四时长进行发送;其中,所述第四时长为下一个预设上报周期待上报数据发送完毕后至再下一个预设上报周期到达前的时长。The remaining target operation instruction is sent to the fourth time period for transmission; wherein the fourth time length is the length of time until the next preset reporting period is reached after the data transmission is completed in the next preset reporting period.
  13. 根据权利要求11所述的方法,还包括:在不存在所属类型相同的第二操作指令的情况下,在预先建立的类型与优先级的对应关系中获取对应所述第二操作指令所属类型的优先级;The method according to claim 11, further comprising: obtaining, in a correspondence between the pre-established type and the priority, a type corresponding to the type of the second operation instruction, in the case that the second operation instruction of the same type is not present priority;
    按照优先级的高低对所述第二操作指令进行排列;Arranging the second operation instructions according to a priority level;
    获取在所述第一时长内能够发送的操作指令的个数,将获得的个数作为第二目标个数;Obtaining the number of operation instructions that can be sent in the first duration, and using the obtained number as the second target number;
    在排列后的所述第二操作指令中按照优先级从高往低的顺序获取与所述第二目标个数相同的第二操作指令,并向所述车辆网单元发送;Acquiring, in the second operation instruction after the arrangement, the second operation instruction that is the same as the second target number according to the priority from high to low, and transmitting to the vehicle network unit;
    将剩余的第二操作指令留待第四时长进行发送;其中,所述第四时长为下一个预设上报周期待上报数据发送完毕后至再下一个预设上报周期到达前的时长。The remaining second operation instruction is sent to the fourth time length for transmission; wherein the fourth time length is the length of time after the data transmission is completed in the next preset reporting period and before the next preset reporting period arrives.
  14. 根据权利要求9所述的方法,其中,所述在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车辆网单元发送第二操作指令,包括:The method according to claim 9, wherein the transmitting, after the transmission of the data to be reported, to the time before the arrival of the next preset reporting period, the second operation instruction is sent to the vehicle network unit, including:
    在所述待上报数据发送完毕后至下一个预设上报周期到达前的时长内,向所述车联网单元发送缓存队列中的第二操作指令。And sending, after the sending of the data to be reported, to the time period before the next preset reporting period arrives, sending a second operation instruction in the cache queue to the vehicle networking unit.
  15. 根据权利要求14所述的方法,在所述在待上报数据发送完毕后至下一个预设上报周期到达前的时长内向车辆网单元发送第二操作指令之后,还包括:The method of claim 14, after the sending of the second operation instruction to the vehicle network unit in the time period after the transmission of the data to be reported is completed and before the arrival of the next preset reporting period, the method further includes:
    在所述预设时长内未接收到所述车联网单元发送的针对所述第二操作指令的确认信息的情况下,将所述第二操作指令放在所述缓存队列的队尾。If the confirmation information for the second operation instruction sent by the car network unit is not received within the preset time period, the second operation instruction is placed at the end of the cache queue.
  16. 一种车联网单元,包括:A vehicle networking unit comprising:
    发送模块,设置为向MCU依次发送多个第一操作指令;a sending module, configured to sequentially send a plurality of first operation instructions to the MCU;
    接收模块,设置为接收所述多个第一操作指令中的至少一个第一操作指令的确认消息;a receiving module, configured to receive an acknowledgement message of the at least one first operation instruction of the plurality of first operation instructions;
    处理模块,设置为,根据所述确认消息的接收时长以及当前重发间隔确定目标重发间隔;a processing module, configured to determine a target retransmission interval according to the receiving duration of the acknowledgement message and the current retransmission interval;
    所述处理模块,还设置为根据所述目标重发间隔确定未返回确认消息的第一操作指令的重发时间;The processing module is further configured to determine, according to the target retransmission interval, a retransmission time of the first operation instruction that does not return an acknowledgement message;
    所述发送模块,还设置为根据所述重发时间重新发送所述未返回确认消息的第一操作指令。The sending module is further configured to resend the first operation instruction of the non-return confirmation message according to the retransmission time.
  17. 一种微控制单元,包括:A micro control unit comprising:
    接收模块,设置为接收车联网单元发送的多个第一操作指令;a receiving module, configured to receive a plurality of first operation instructions sent by the car networking unit;
    处理模块,设置为生成所述多个第一操作指令中的至少一个第一操作指令的确认消息;a processing module, configured to generate a confirmation message of the at least one first operation instruction of the plurality of first operation instructions;
    发送模块,设置为向所述车联网单元发送生成的确认消息;a sending module, configured to send the generated confirmation message to the car networking unit;
    所述接收模块,还设置为接收所述车联网单元根据获得的重发时间重新发送未返回确认消息的第一操作指令。The receiving module is further configured to receive a first operation instruction that the car networking unit resends the non-return confirmation message according to the obtained retransmission time.
  18. 一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行权利要求1-7中任一项所述的方法或者权利要求8-15中任一项所述的方法。A storage medium having stored therein a computer program, wherein the computer program is configured to perform the method of any one of claims 1-7 or any one of claims 8-15 at runtime Said method.
PCT/CN2019/078268 2018-03-21 2019-03-15 Data transmission method and device WO2019179359A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810234061.2 2018-03-21
CN201810234061.2A CN108599904B (en) 2018-03-21 2018-03-21 Data transmission method and device

Publications (1)

Publication Number Publication Date
WO2019179359A1 true WO2019179359A1 (en) 2019-09-26

Family

ID=63627056

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/078268 WO2019179359A1 (en) 2018-03-21 2019-03-15 Data transmission method and device

Country Status (2)

Country Link
CN (1) CN108599904B (en)
WO (1) WO2019179359A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111404872A (en) * 2019-11-21 2020-07-10 杭州海康威视系统技术有限公司 Message processing method, device and system
CN112769895A (en) * 2020-12-18 2021-05-07 杭州涂鸦信息技术有限公司 Group or scene control method and related device
CN114401292A (en) * 2022-01-10 2022-04-26 徐工汉云技术股份有限公司 Equipment message acquisition system and method based on object shadow
CN114844740A (en) * 2022-04-29 2022-08-02 东风电驱动系统有限公司 Communication method between double chips and chip
CN114928431A (en) * 2022-06-30 2022-08-19 南斗六星系统集成有限公司 Method and system for preventing packet loss communication of Internet of vehicles terminal
CN115019494A (en) * 2022-06-02 2022-09-06 武汉领普科技有限公司 Wireless switch, processing method of wireless switch and control system

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108599904B (en) * 2018-03-21 2021-09-28 中兴通讯股份有限公司 Data transmission method and device
CN109921967B (en) * 2019-03-08 2021-05-07 美智光电科技股份有限公司 Instruction processing method and system, gateway device and computer readable storage medium
CN110113495A (en) * 2019-05-10 2019-08-09 北京奇艺世纪科技有限公司 Long-range control method, device, electronic equipment and the system of APP
CN111131001A (en) * 2019-12-25 2020-05-08 南京甄视智能科技有限公司 Message sending method, device, storage medium and server
CN112256447A (en) * 2020-09-11 2021-01-22 上海汇付数据服务有限公司 Message notification method and system
CN112804326B (en) * 2021-01-12 2022-07-22 重庆贵飞科技有限公司 Internet of things data transmission method and lighting system
CN114257561B (en) * 2021-12-17 2023-02-07 东土科技(宜昌)有限公司 Data transparent transmission method, device, equipment and storage medium for serial port and network port
CN114567630B (en) * 2022-04-29 2022-07-19 南京信思顺信息技术有限公司 Intelligent form generation method based on process engine

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651527A (en) * 2008-08-11 2010-02-17 华为技术有限公司 Data processing method, retransmitting and reporting method, equipment and data transmission system
CN105245470A (en) * 2015-11-05 2016-01-13 深圳市网心科技有限公司 Data transmission method and device
CN107070990A (en) * 2011-03-17 2017-08-18 华为技术有限公司 The method and apparatus of transmitting data resources
CN108599904A (en) * 2018-03-21 2018-09-28 中兴通讯股份有限公司 a kind of data transmission method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100735346B1 (en) * 2004-05-04 2007-07-04 삼성전자주식회사 A method and apparatus for TTI change considering HARQ process for Enhanced uplink dedicated channel
CN101459496B (en) * 2008-12-18 2011-05-04 北京大学 Regulating method and apparatus for timeout interval for messages
JP2012120029A (en) * 2010-12-02 2012-06-21 Mitsubishi Electric Corp Control system, communication device and communication method
CN103138899A (en) * 2011-11-28 2013-06-05 中兴通讯股份有限公司 Retransmission method and retransmission device for communication packs in communication link layer
CN107276728B (en) * 2017-06-12 2019-05-31 北京三快在线科技有限公司 A kind of data transmission method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651527A (en) * 2008-08-11 2010-02-17 华为技术有限公司 Data processing method, retransmitting and reporting method, equipment and data transmission system
CN107070990A (en) * 2011-03-17 2017-08-18 华为技术有限公司 The method and apparatus of transmitting data resources
CN105245470A (en) * 2015-11-05 2016-01-13 深圳市网心科技有限公司 Data transmission method and device
CN108599904A (en) * 2018-03-21 2018-09-28 中兴通讯股份有限公司 a kind of data transmission method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111404872A (en) * 2019-11-21 2020-07-10 杭州海康威视系统技术有限公司 Message processing method, device and system
CN112769895A (en) * 2020-12-18 2021-05-07 杭州涂鸦信息技术有限公司 Group or scene control method and related device
CN112769895B (en) * 2020-12-18 2023-10-13 杭州涂鸦信息技术有限公司 Group or scene control method and related device
CN114401292A (en) * 2022-01-10 2022-04-26 徐工汉云技术股份有限公司 Equipment message acquisition system and method based on object shadow
CN114401292B (en) * 2022-01-10 2023-06-06 徐工汉云技术股份有限公司 Equipment message acquisition system and method based on object shadow
CN114844740A (en) * 2022-04-29 2022-08-02 东风电驱动系统有限公司 Communication method between double chips and chip
CN114844740B (en) * 2022-04-29 2024-01-30 东风电驱动系统有限公司 Dual-chip communication method and chip
CN115019494A (en) * 2022-06-02 2022-09-06 武汉领普科技有限公司 Wireless switch, processing method of wireless switch and control system
CN115019494B (en) * 2022-06-02 2024-02-06 武汉领普科技有限公司 Wireless switch, processing method and control system of wireless switch
CN114928431A (en) * 2022-06-30 2022-08-19 南斗六星系统集成有限公司 Method and system for preventing packet loss communication of Internet of vehicles terminal

Also Published As

Publication number Publication date
CN108599904B (en) 2021-09-28
CN108599904A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
WO2019179359A1 (en) Data transmission method and device
US5664091A (en) Method and system for a voiding unnecessary retransmissions using a selective rejection data link protocol
JP4283589B2 (en) COMMUNICATION DEVICE, COMMUNICATION CONTROL METHOD, AND PROGRAM
US11792682B2 (en) Packet sending method, apparatus, and device
JP2925678B2 (en) Data communication method and data communication system
JP5057304B2 (en) In-vehicle communication system and in-vehicle communication method
JP2834210B2 (en) Message control method in ring network
US7821937B1 (en) Network protocol with damage loss resilient congestion control algorithm
CN111327402B (en) Method, device and system for retransmitting data
US8526464B2 (en) Adaptive contention window in discontinuous wireless communication channels
US9798680B2 (en) Policy control method and apparatus for terminal peripheral
US20090268747A1 (en) Communication apparatus
KR101524029B1 (en) Link Layer Control Protocol Implementation
KR19980702323A (en) Network adapter apparatus for automatic retransmission of packets and a method thereof
US20160094608A1 (en) Proactive TCP Connection Stall Recovery for HTTP Streaming Content Requests
CN114915394B (en) Dual mode communication device, dual mode communication method, and storage medium
CN112261142B (en) RDMA network data retransmission method, device and FPGA
WO2018014552A1 (en) Method and apparatus for data transmission
US20120158957A1 (en) Relay apparatus and communication method
JP2014086812A (en) Can system and node
CN110825505B (en) Task scheduling method, device, computer equipment and storage medium
US7639628B2 (en) Response time detection in a network having shared interfaces
KR102132460B1 (en) Method and apparatus for selective energy transmission in wireless network
JP2003218936A (en) Transmission/reception method and transmission/reception apparatus for variable length message
WO2019109559A1 (en) Method and device for setting network disorderliness value

Legal Events

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

Ref document number: 19770994

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 04.02.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19770994

Country of ref document: EP

Kind code of ref document: A1