Message transmission method and device, vehicle, storage medium and program product
By obtaining the set of messages to be transmitted and the association relationship, it determines whether the message is sent successfully or not, and resends the unsuccessful messages based on the association relationship. This solves the problem of low re-sending efficiency of frame-lost messages in the vehicle Internet of Things, and improves the efficiency of re-sending messages. Detection and resending efficiency.
Patent Information
- Application Number
- CN202410764821.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-08-27
AI Technical Summary
In the Internet of Vehicles, the efficiency of retransmitting lost frame messages is low, resulting in excessive sending pressure on the message sending device and the inability to quickly resend lost frame messages.
By obtaining the set of messages to be transmitted and the association relationship, it determines whether the message is successfully sent based on the reception result, and resends unsuccessful messages based on the association relationship, optimizing the transmission sequence to improve detection and resending efficiency.
It improves the efficiency of frame loss detection and the re-transmission efficiency of lost frame messages, and solves the problem of low re-transmission efficiency of lost frame messages.
Smart Images

Figure CN118555253A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of message transmission, and in particular to a message transmission method, device, vehicle, storage medium and program product. Background Art
[0002] With the development of new energy vehicles, the degree of intelligent networking of vehicles is getting higher and higher. The functions configured in the vehicle Internet of Things, the types and quantities of on-board controllers, etc. are increasing. The messages transmitted between different devices are also increasing. In the process of message transmission, if a message is not sent successfully, it is usually determined by the message sending device that the message receiving device has not executed the information corresponding to the message for a long time. The message sending device determines that the current message has a frame loss and has not been sent successfully. The message sending device can resend the message, but this method will cause the message sending device to send too much pressure on sending messages, and it cannot quickly resend the message with frame loss. Summary of the invention
[0003] Embodiments of the present invention provide a message transmission method, device, vehicle, storage medium and program product to at least solve the technical problem of low efficiency in retransmitting lost frame messages in the related art.
[0004] According to one aspect of an embodiment of the present invention, a message transmission method is provided, including: obtaining multiple messages to be transmitted included in a first message set to be transmitted in multiple groups of message sets to be transmitted, and a first association relationship between the multiple messages to be transmitted; sending the multiple messages to be transmitted to a message receiving device based on the first association relationship, and determining whether all of the multiple messages to be transmitted are successfully sent based on a message reception result fed back by the message receiving device, wherein the message reception result at least includes a first message header of a second message received by the message receiving device; in response to a first message among the multiple messages to be transmitted not being sent successfully, resending the first message to the message receiving device based on the association relationship corresponding to the first message; in response to all of the multiple messages to be transmitted being sent successfully, starting to transmit a second message set to be transmitted, wherein the transmission order of the second message set to be transmitted is after the transmission order of the first message set to be transmitted.
[0005] Further, sending multiple messages to be transmitted to a message receiving device based on the first association relationship includes: generating multiple continuous message codes based on the first association relationship and message parameters of the multiple messages to be transmitted, wherein the number of the multiple message codes is the same as the number of the multiple messages to be transmitted; sorting the multiple messages to be transmitted based on the first association relationship to obtain a sequence of messages to be transmitted; filling the message headers of the multiple messages to be transmitted in turn based on the multiple message codes and the sequence of messages to be transmitted to obtain multiple target messages; and sending the multiple target messages to the message receiving device.
[0006] Furthermore, based on the message reception result fed back by the message receiving device, it is determined whether all of the multiple messages to be transmitted are sent successfully, including: matching the first message header with the target message headers of the multiple target messages to obtain a header matching result; in response to the header matching result that the first message header contains multiple target message headers, determining that all of the multiple messages to be transmitted are sent successfully; in response to the header matching result that the first message header does not contain multiple target message headers, determining that not all of the multiple messages to be transmitted are sent successfully.
[0007] Further, based on the association relationship corresponding to the first message, the first message is resent to the message receiving device, including: determining the second message header of the first message based on the first message header and target message headers of multiple target messages; performing continuity detection based on the second message header to obtain a detection result; in response to the detection result that the second message header is continuous, sending the first message header to the message receiving device based on the second message header; in response to the detection result that the second message header is discontinuous, adjusting the second message header based on the association relationship corresponding to the first message to obtain a continuous third message header, and sending the first message to the message receiving device based on the third message header.
[0008] Furthermore, the message header is a byte segment of a preset byte length in the message to be transmitted, and the message header includes at least: a normal sending message status bit, used to indicate the sending status of the message to be transmitted; a resending message status bit, used to indicate whether the message to be transmitted needs to be resent; a request to resend message status bit, used to indicate whether it is determined to resend the message to be transmitted; a resent message receiving status bit, used to indicate whether the message to be transmitted is resent successfully; and a message sequence number bit, used to store a message code.
[0009] According to another aspect of an embodiment of the present invention, a message transmission device is also provided, including: a parameter acquisition module, used to obtain multiple messages to be transmitted contained in a first message set to be transmitted in multiple groups of message sets to be transmitted, and a first association relationship between the multiple messages to be transmitted; a first sending module, used to send the multiple messages to be transmitted to a message receiving device based on the first association relationship, and determine whether all of the multiple messages to be transmitted are successfully sent based on the message reception result fed back by the message receiving device, wherein the message reception result at least includes a first message header of a second message received by the message receiving device; a second sending module, used to resend the first message to the message receiving device in response to the first message among the multiple messages to be transmitted not being sent successfully, based on the association relationship corresponding to the first message; a message transmission module, used to start transmitting the second message set to be transmitted in response to the multiple messages to be transmitted being all sent successfully, wherein the transmission order of the second message set to be transmitted is after the transmission order of the first message set to be transmitted.
[0010] Further, the first sending module includes: a code generating unit, used to generate a plurality of continuous message codes based on the first association relationship and message parameters of a plurality of messages to be transmitted, wherein the number of the plurality of message codes is the same as the number of the plurality of messages to be transmitted; a message sorting unit, used to sort the plurality of messages to be transmitted based on the first association relationship to obtain a sequence of messages to be transmitted; a message generating unit, used to fill in the message headers of the plurality of messages to be transmitted in sequence based on the plurality of message codes and the sequence of messages to be transmitted to obtain a plurality of target messages; and a message sending unit, used to send the plurality of target messages to a message receiving device.
[0011] Furthermore, the first sending module also includes: a header matching unit, used to match the first message header with the target message headers of multiple target messages to obtain a header matching result; a first determination unit, used to determine that all the multiple messages to be transmitted are successfully sent in response to the header matching result that the first message header contains multiple target message headers; and a second determination unit, used to determine that all the multiple messages to be transmitted are not successfully sent in response to the header matching result that the first message header does not contain multiple target message headers.
[0012] Further, the first sending module includes: a header detection unit, used to determine the second message header of the first message based on the first message header and target message headers of multiple target messages; perform continuity detection based on the second message header to obtain a detection result; a first starting unit, used to send the first message header to the message receiving device based on the second message header in response to the detection result that the second message header is continuous; a second sending unit, used to adjust the second message header based on the association relationship corresponding to the first message in response to the detection result that the second message header is discontinuous, obtain a continuous third message header, and send the first message to the message receiving device based on the third message header.
[0013] Furthermore, the message header is a byte segment of a preset byte length in the message to be transmitted, and the message header includes at least: a normal sending message status bit, used to indicate the sending status of the message to be transmitted; a resending message status bit, used to indicate whether the message to be transmitted needs to be resent; a request to resend message status bit, used to indicate whether it is determined to resend the message to be transmitted; a resent message receiving status bit, used to indicate whether the message to be transmitted is resent successfully; and a message sequence number bit, used to store a message code.
[0014] According to another aspect of an embodiment of the present invention, a vehicle is further provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.
[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0016] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0017] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0018] According to another aspect of the embodiments of the present invention, a computer program is further provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.
[0019] In an embodiment of the present invention, a plurality of messages to be transmitted included in a first message set to be transmitted in a plurality of message sets to be transmitted and a first association relationship between the plurality of messages to be transmitted are obtained; based on the first association relationship, the plurality of messages to be transmitted are sent to a message receiving device, and based on a message reception result fed back by the message receiving device, it is determined whether all of the plurality of messages to be transmitted are successfully transmitted; in response to a first message among the plurality of messages to be transmitted not being successfully transmitted, based on the association relationship corresponding to the first message, the first message is resent to the message receiving device; in response to a plurality of messages to be transmitted being successfully transmitted, a second message set to be transmitted is started to be transmitted, by quickly determining whether all of the plurality of messages to be transmitted are successfully transmitted according to the message reception result fed back by the message receiving device, thereby improving the efficiency of frame loss detection for the transmitted messages, and in the case of unsuccessful transmission, directly resending the first message according to the association relationship of the first message that was not successfully transmitted, thereby improving the transmission efficiency of resending the frame loss message, i.e., the first message, thereby solving the technical problem of low efficiency of resending the frame loss message in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0021] Figure 1 is a schematic diagram of a message transmission method according to an embodiment of the present invention;
[0022] Figure 2It is a schematic diagram of a message transmission process according to an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of the operation process of a message sending device according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of an operation process of a message receiving device according to an embodiment of the present application;
[0025] Figure 5 It is a schematic diagram of a message transmission device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Example 1
[0029] According to an embodiment of the present invention, a method embodiment of message transmission is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 1 is a schematic diagram of a message transmission method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0031] Step S102: acquiring a plurality of messages to be transmitted included in a first set of messages to be transmitted in a plurality of sets of messages to be transmitted, and a first association relationship between the plurality of messages to be transmitted.
[0032] The above-mentioned message set to be transmitted may refer to a message set that needs to be sent in a message sending device. A group of message sets may include multiple messages to be transmitted. The association relationship between different messages to be transmitted may be the above-mentioned first association relationship, which may include but is not limited to: the relationship between the causal relationship of message generation time, the relationship between the size of message data volume, the combination relationship between different messages, the dependency relationship, etc.
[0033] In an optional scheme of the present embodiment, when the message sending device currently needs to send multiple groups of message sets to be transmitted, it can first determine the priorities of different message sets to be transmitted according to the preset transmission order, message importance, set generation time, etc. among the multiple message sets to be transmitted, and then determine a first message set to be transmitted with a larger priority from the multiple groups of messages to be transmitted according to the determined priority, and obtain the multiple messages to be transmitted contained in the first message set to be transmitted, as well as the first association relationship between different messages to be transmitted.
[0034] Step S104: sending a plurality of messages to be transmitted to a message receiving device based on the first association relationship, and determining whether all of the plurality of messages to be transmitted are successfully sent based on a message receiving result fed back by the message receiving device.
[0035] The message receiving result at least includes the first message header of the second message received by the message receiving device.
[0036] After obtaining the first association relationship between the multiple messages to be transmitted and different messages to be transmitted included in the first message set to be transmitted, the multiple messages to be transmitted can be sent to the message receiving device according to the first association relationship. For example, the multiple messages to be transmitted can be sent to the message receiving device in sequence according to the generation time between different messages, or the multiple messages to be transmitted can be sent to the message receiving device in combination according to the dependency relationship between different messages. At the same time, the message sending device can also receive the reception result of the message receiving device for the multiple messages to be transmitted, that is, the above-mentioned message reception result, to determine whether the message sending device currently sends all the messages to be transmitted to the message receiving device. In order to improve the efficiency of the message receiving device in feeding back the received messages, the message receiving device can only store the first message header of the currently received second message in the message reception result, and feed back the first message header to the message sending device. The corresponding message sending device can determine whether to send all the messages to be transmitted to the message receiving device according to the first message header in the message reception result.
[0037] Step S106: in response to a first message among the multiple messages to be transmitted not being sent successfully, resending the first message to the message receiving device based on the association relationship corresponding to the first message.
[0038] In an optional scheme of the present embodiment, if the message sending device determines that not all messages to be transmitted have been sent to the message receiving device, it can further determine the first message that has not been successfully sent from the messages to be transmitted, and obtain the association relationship corresponding to the first message screened out from the first association relationship, and resend the first message to the message receiving device according to the association relationship corresponding to the first message, that is, repeat the above-mentioned sending process until it is determined that multiple messages to be transmitted are sent successfully, and then it can be correspondingly confirmed that the current first set of messages to be transmitted has occurred successfully.
[0039] Step S108: in response to all the multiple messages to be transmitted being sent successfully, starting to transmit a second set of messages to be transmitted.
[0040] The transmission order of the second set of messages to be transmitted is after the transmission order of the first set of messages to be transmitted.
[0041] In an optional scheme of the present embodiment, after determining that multiple messages to be transmitted are all sent successfully, that is, the first set of messages to be transmitted is sent successfully, the message sending device can start sending the next second set of messages to be transmitted, that is, the set of messages whose transmission order is after the transmission order of the first set of messages to be transmitted, and continue to determine whether the second set of messages to be transmitted is sent successfully according to the aforementioned process.
[0042] In an embodiment of the present invention, a plurality of messages to be transmitted included in a first message set to be transmitted in a plurality of message sets to be transmitted and a first association relationship between the plurality of messages to be transmitted are obtained; based on the first association relationship, the plurality of messages to be transmitted are sent to a message receiving device, and based on a message reception result fed back by the message receiving device, it is determined whether all of the plurality of messages to be transmitted are successfully transmitted; in response to a first message among the plurality of messages to be transmitted not being successfully transmitted, based on the association relationship corresponding to the first message, the first message is resent to the message receiving device; in response to a plurality of messages to be transmitted being successfully transmitted, a second message set to be transmitted is started to be transmitted, by quickly determining whether all of the plurality of messages to be transmitted are successfully transmitted according to the message reception result fed back by the message receiving device, thereby improving the efficiency of frame loss detection for the transmitted messages, and in the case of unsuccessful transmission, directly resending the first message according to the association relationship of the first message that was not successfully transmitted, thereby improving the transmission efficiency of resending the frame loss message, i.e., the first message, thereby solving the technical problem of low efficiency of resending the frame loss message in the related art.
[0043] Further, sending multiple messages to be transmitted to a message receiving device based on the first association relationship includes: generating multiple continuous message codes based on the first association relationship and message parameters of the multiple messages to be transmitted, wherein the number of the multiple message codes is the same as the number of the multiple messages to be transmitted; sorting the multiple messages to be transmitted based on the first association relationship to obtain a sequence of messages to be transmitted; filling the message headers of the multiple messages to be transmitted in turn based on the multiple message codes and the sequence of messages to be transmitted to obtain multiple target messages; and sending the multiple target messages to the message receiving device.
[0044] In an optional scheme of the present embodiment, in order to facilitate the determination of the sending status of multiple messages to be transmitted, when sending multiple messages to be transmitted to a message receiving device, multiple continuous message codes equal to the number of the multiple messages to be transmitted can be generated according to the first association relationship between different messages and the message parameters of different messages to be transmitted, such as the generation time of the message to be transmitted itself, the data volume size and other parameters, and then the multiple messages to be transmitted are sorted according to the above-mentioned first association relationship to obtain a sequence of messages to be transmitted, and the multiple continuous message codes generated above are used to fill the message headers of the messages to be transmitted in sequence according to the message transmission order of the sequence of messages to be transmitted to generate multiple target messages, and finally the multiple target messages are sent to the message receiving device, thereby realizing the operation of sending multiple messages to be transmitted. Correspondingly, according to the target message headers of the target messages corresponding to the different messages to be transmitted, it can be intuitively judged whether the multiple messages to be transmitted have been sent out.
[0045] Furthermore, based on the message reception result fed back by the message receiving device, it is determined whether all of the multiple messages to be transmitted are sent successfully, including: matching the first message header with the target message headers of the multiple target messages to obtain a header matching result; in response to the header matching result that the first message header contains multiple target message headers, determining that all of the multiple messages to be transmitted are sent successfully; in response to the header matching result that the first message header does not contain multiple target message headers, determining that not all of the multiple messages to be transmitted are sent successfully.
[0046] In an optional scheme of the present embodiment, when determining whether all the messages to be transmitted are successfully sent based on the message reception result fed back by the message receiving device, the first message header contained in the message reception result can be first matched with the target message headers of the above-mentioned multiple target messages to determine whether the first message header is the same as the target message header; if they are the same, it can be considered that the message receiving device has currently received all the messages to be transmitted, and correspondingly it can be determined that all the above-mentioned multiple messages to be transmitted are successfully sent; if they are different, it can be considered that the message receiving device has not currently received all the messages to be transmitted, and correspondingly it can be determined that not all the above-mentioned multiple messages to be transmitted are successfully sent. Taking into account the interference of some network factors, such as network fluctuation interference, communication protocol implementation errors, etc., the message receiving device may also add the message headers of other messages to the above-mentioned message receiving results. At this time, the first message header in the message receiving result may be different from the target message header of the target message. Therefore, in the actual process, it can be determined whether the above-mentioned first message header contains the above-mentioned target message header. If it does, it can be determined that multiple messages to be transmitted are all sent successfully; if not, it can be determined that multiple messages to be transmitted are not all sent successfully.
[0047] Further, based on the association relationship corresponding to the first message, the first message is resent to the message receiving device, including: determining the second message header of the first message based on the first message header and target message headers of multiple target messages; performing continuity detection based on the second message header to obtain a detection result; in response to the detection result that the second message header is continuous, sending the first message header to the message receiving device based on the second message header; in response to the detection result that the second message header is discontinuous, adjusting the second message header based on the association relationship corresponding to the first message to obtain a continuous third message header, and sending the first message to the message receiving device based on the third message header.
[0048] In an optional scheme of the present embodiment, when the first message is resent to the message receiving device according to the association relationship corresponding to the first message, the message header that is the same as the first message header can be removed from the target message headers of the multiple target messages, and the corresponding retained message header can be the second message header of the first message. When sending the first message, the determined second message header can be firstly tested for continuity to obtain the above-mentioned test result. If the test result shows that the above-mentioned second message header is continuous, the message sending device can directly resend the corresponding first message to the message receiving device according to the second message header. , and there is no need to adjust the second message header of the first message, thereby improving the efficiency of sending the first message again; if the detection result shows that the above-mentioned second message header is discontinuous, the message sending device can adjust the second message header according to the above-mentioned process using the association relationship corresponding to the first message, so that the message codes contained in different second message headers can be continuous, that is, construct the above-mentioned continuous third message header, and then use the constructed third message header to adjust the message header of the first message, and finally the message sending device can send the first message to the message receiving device according to the third message header.
[0049] Furthermore, the message header is a byte segment of a preset byte length in the message to be transmitted, and the message header includes at least: a normal sending message status bit, used to indicate the sending status of the message to be transmitted; a resending message status bit, used to indicate whether the message to be transmitted needs to be resent; a request to resend message status bit, used to indicate whether it is determined to resend the message to be transmitted; a resent message receiving status bit, used to indicate whether the message to be transmitted is resent successfully; and a message sequence number bit, used to store a message code.
[0050] In an optional scheme of the present implementation, in order to improve the efficiency of detecting the message header, the above-mentioned message header can be a preset byte length in the message to be transmitted, such as a byte segment of 1 byte, and the message header can at least include: a normal transmission message status bit, a retransmission message status bit, a request retransmission message status bit, a retransmission message reception status bit and a message sequence number bit. Among them, the normal transmission message status bit can be used to indicate the transmission status of the message to be transmitted; the retransmission message status bit can be used to indicate whether the message to be transmitted needs to be retransmitted; the request retransmission message status bit can be used to indicate whether it is determined to retransmit the message to be transmitted; the retransmission message reception status bit can be used to indicate whether the message to be transmitted is successfully retransmitted; the message sequence number bit can be used to store the message code.
[0051] Table 1
[0052] TX reTX request_reTX reTX_ACK Index
[0053] For ease of understanding, the above Table 1 may be a schematic diagram of a message header shown in an embodiment of the present application, as shown in Table 1, wherein TX may refer to a normal sending message status bit, reTX may refer to a resending message status bit, request_reTX may refer to a request to resend a message status bit, reTX_ACK may refer to a resending message receiving status bit, and Index may refer to a message sequence number bit, wherein the lengths of TX, reTX, request_reTX, and reTX_ACK may all be 1 bit, and the length of Index may be 4 bits.
[0054] In an optional solution of this embodiment, the message receiving device can realize the operation of actively detecting whether all the messages to be transmitted are received by detecting the Index contained in the first message header of the received second message. If there is a discontinuous Index in the second message, for example, there is no second message with a message code of 5 in the second message, that is, in the first message header corresponding to the second message, the Index directly jumps from 10000100 to 10000110, but there is no 10000101, then the message receiving device can directly determine that all the messages to be transmitted are not received at present, and the corresponding message with a message code of 5 is a lost frame message. Correspondingly, the message sending device can quickly determine the message sequence number of the first message that is not successfully sent at present, such as the first message with a message sequence number of 5, based on the first message header contained in the message reception result and in combination with the target message headers of multiple target messages, and then quickly resend the first message to the message receiving device, thereby improving the efficiency of resending the lost frame message.
[0055] In addition, if the message receiving device can directly obtain the relevant information of all the messages to be transmitted sent by the message sending device, the message receiving device can also actively determine the message that is not successfully sent at present, and feed back the unsuccessfully sent message to the message sending device to resend the message. Based on this, Figure 2 is a schematic diagram of a message transmission process according to an embodiment of the present application. Figure 2The left side 201 represents a message sending device, and the right side 202 represents a message receiving device. The solid line represents a successfully sent message, and the dotted line represents an unsuccessfully sent message. The message sending device can send the filled target messages in sequence according to the generated message code, for example, sending message index1, message index2, and message index3. Assuming that message index4 is not successfully sent, and then message index5 is successfully sent, the message receiving device, after receiving the message, quickly determines the unsuccessfully sent message index4 according to the message header of the received message, and generates a retransmission code corresponding to the message index4. The resending request corresponds to the message to be transmitted. The message header of the resending request may include the message code of index4 that was not successfully received. The message sending device may replace request_reTX in the message header with the resending bit, and then send the resending request to the message sending device. After receiving the request, the message sending device may determine from the corresponding message header that the message index4 currently fails to be sent, and then directly resend the message index4, thereby improving the efficiency of resending the lost frame message index4, until the message receiving device feeds back feedback information of successfully receiving the message index4.
[0056] Based on this, Figure 3 is a schematic diagram showing the operation process of a message sending device according to an embodiment of the present application, such as Figure 3 As shown, the message sending device can normally send multiple messages to be transmitted, and then determine whether a message resending request is received. If received, the message that needs to be resent can be determined from the message resending request, and the message can be directly resent, thereby improving the sending efficiency, until the message receiving device feedbacks that all messages have been received successfully; if not received, it can be confirmed that the message to be transmitted has been sent successfully.
[0057] Figure 4 is a schematic diagram showing the operation process of a message receiving device according to an embodiment of the present application, such as Figure 4 As shown, the message receiving device can normally receive multiple messages to be transmitted, and perform continuity detection on the message headers of the received messages. If it is detected that the message is discontinuous, the discontinuous message can be directly determined as a lost frame message and a corresponding resending request can be generated. The message is then sent to the message sending device to resend the message, and the message resent by the message sending device is received until the received message is continuous. If it is detected that the message is continuous, it can be determined that the message is received successfully, and feedback information of successful message sending can be fed back to the message sending device.
[0058] Example 2
[0059] According to another aspect of an embodiment of the present invention, corresponding to the above-mentioned message transmission method, a message transmission device is also provided. Figure 5 is a schematic diagram of a message transmission device according to an embodiment of the present application, such as Figure 5 As shown, the device includes: a parameter acquisition module 502 , a first sending module 504 , a second sending module 506 and a message transmission module 508 .
[0060] Among them, the parameter acquisition module 502 is used to obtain multiple messages to be transmitted contained in the first message set to be transmitted in multiple groups of message sets to be transmitted, and the first association relationship between the multiple messages to be transmitted; the first sending module 504 is used to send multiple messages to be transmitted to the message receiving device based on the first association relationship, and determine whether all of the multiple messages to be transmitted are successfully sent based on the message reception result fed back by the message receiving device, wherein the message reception result at least includes the first message header of the second message received by the message receiving device; the second sending module 506 is used to respond to the failure to send the first message among the multiple messages to be transmitted, and resend the first message to the message receiving device based on the association relationship corresponding to the first message; the message transmission module 508 is used to respond to the successful sending of all the multiple messages to be transmitted, and start transmitting the second message set to be transmitted, wherein the transmission order of the second message set to be transmitted is after the transmission order of the first message set to be transmitted.
[0061] Further, the first sending module includes: a code generating unit, used to generate a plurality of continuous message codes based on the first association relationship and message parameters of a plurality of messages to be transmitted, wherein the number of the plurality of message codes is the same as the number of the plurality of messages to be transmitted; a message sorting unit, used to sort the plurality of messages to be transmitted based on the first association relationship to obtain a sequence of messages to be transmitted; a message generating unit, used to fill in the message headers of the plurality of messages to be transmitted in sequence based on the plurality of message codes and the sequence of messages to be transmitted to obtain a plurality of target messages; and a message sending unit, used to send the plurality of target messages to a message receiving device.
[0062] Furthermore, the first sending module also includes: a header matching unit, used to match the first message header with the target message headers of multiple target messages to obtain a header matching result; a first determination unit, used to determine that all the multiple messages to be transmitted are successfully sent in response to the header matching result that the first message header contains multiple target message headers; and a second determination unit, used to determine that all the multiple messages to be transmitted are not successfully sent in response to the header matching result that the first message header does not contain multiple target message headers.
[0063] Further, the first sending module includes: a header detection unit, used to determine the second message header of the first message based on the first message header and target message headers of multiple target messages; perform continuity detection based on the second message header to obtain a detection result; a first starting unit, used to send the first message header to the message receiving device based on the second message header in response to the detection result that the second message header is continuous; a second sending unit, used to adjust the second message header based on the association relationship corresponding to the first message in response to the detection result that the second message header is discontinuous, obtain a continuous third message header, and send the first message to the message receiving device based on the third message header.
[0064] Furthermore, the message header is a byte segment of a preset byte length in the message to be transmitted, and the message header includes at least: a normal sending message status bit, used to indicate the sending status of the message to be transmitted; a resending message status bit, used to indicate whether the message to be transmitted needs to be resent; a request to resend message status bit, used to indicate whether it is determined to resend the message to be transmitted; a resent message receiving status bit, used to indicate whether the message to be transmitted is resent successfully; and a message sequence number bit, used to store a message code.
[0065] Example 3
[0066] An embodiment of the present application further provides a vehicle, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.
[0067] Example 4
[0068] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0069] Example 5
[0070] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.
[0071] Example 6
[0072] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0073] Example 7
[0074] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.
[0075] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0076] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0077] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0078] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0079] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0080] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0081] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A message transmission method, characterized in that: include: Acquire a plurality of messages to be transmitted included in a first set of messages to be transmitted among a plurality of sets of messages to be transmitted, and a first association relationship between the plurality of messages to be transmitted; Sending the multiple messages to be transmitted to a message receiving device based on the first association relationship, and determining whether all of the multiple messages to be transmitted are successfully sent based on a message reception result fed back by the message receiving device, wherein the message reception result at least includes a first message header of a second message received by the message receiving device; In response to a first message among the multiple messages to be transmitted not being sent successfully, resending the first message to the message receiving device based on the association relationship corresponding to the first message; In response to all of the multiple messages to be transmitted being sent successfully, starting to transmit a second set of messages to be transmitted, wherein a transmission order of the second set of messages to be transmitted is after a transmission order of the first set of messages to be transmitted.
2. The method according to claim 1, characterized in that Sending the plurality of to-be-transmitted messages to a message receiving device based on the first association relationship includes: Based on the first association relationship and the message parameters of the multiple messages to be transmitted, generating a plurality of continuous message codes, wherein the number of the multiple message codes is the same as the number of the multiple messages to be transmitted; Sort the multiple messages to be transmitted based on the first association relationship to obtain a sequence of messages to be transmitted; Based on the multiple message codes and the sequence of messages to be transmitted, filling the message headers of the multiple messages to be transmitted in sequence to obtain the multiple target messages; The multiple target messages are sent to the message receiving device.
3. The method according to claim 1, characterized in that Determining whether all of the plurality of messages to be transmitted are successfully sent based on the message reception result fed back by the message receiving device includes: Matching the first message header with the target message headers of the multiple target messages to obtain a header matching result; In response to the header matching result being that the first message header includes the multiple target message headers, determining that all the multiple messages to be transmitted are sent successfully; In response to the header matching result being that the first message header does not include the multiple target message headers, it is determined that not all of the multiple messages to be transmitted are sent successfully.
4. The method according to claim 1, characterized in that: Resending the first message to the message receiving device based on the association relationship corresponding to the first message includes: Determine a second message header of the first message based on the first message header and target message headers of multiple target messages; Performing a continuity test based on the second message header to obtain a test result; In response to the detection result that the second message header is continuous, sending the first message header to the message receiving device based on the second message header; In response to the detection result that the second message header is discontinuous, the second message header is adjusted based on the association relationship corresponding to the first message to obtain a continuous third message header, and the first message is sent to the message receiving device based on the third message header.
5. The method according to claim 2, characterized in that: The message header is a byte segment of a preset byte length in the message to be transmitted, and the message header at least includes: A normal message sending status bit, used to indicate the sending status of the message to be transmitted; A message resending status bit is used to indicate whether the message to be transmitted needs to be resent; A message resending request status bit, used to indicate whether to resend the message to be transmitted; A resent message receiving status bit, used to indicate whether the message to be transmitted is successfully resent; The message sequence number bit is used to store the message code.
6. A message transmission method, characterized in that: include: A parameter acquisition module, used to acquire a plurality of messages to be transmitted included in a first set of messages to be transmitted among a plurality of sets of messages to be transmitted, and a first association relationship between the plurality of messages to be transmitted; A first sending module, configured to send the multiple messages to be transmitted to a message receiving device based on the first association relationship, and determine whether all of the multiple messages to be transmitted are successfully sent based on a message reception result fed back by the message receiving device, wherein the message reception result at least includes a first message header of a second message received by the message receiving device; A second sending module, configured to, in response to a first message among the multiple messages to be transmitted not being sent successfully, resend the first message to the message receiving device based on an association relationship corresponding to the first message; The message transmission module is used to start transmitting a second set of messages to be transmitted in response to all the multiple messages to be transmitted being sent successfully, wherein the transmission order of the second set of messages to be transmitted is after the transmission order of the first set of messages to be transmitted.
7. The method according to claim 6, characterized in that The first sending module includes: a code generating unit, configured to generate a plurality of continuous message codes based on the first association relationship and message parameters of the plurality of messages to be transmitted, wherein the number of the plurality of message codes is the same as the number of the plurality of messages to be transmitted; A message sorting unit, configured to sort the plurality of messages to be transmitted based on the first association relationship to obtain a sequence of messages to be transmitted; A message generating unit, configured to fill the message headers of the plurality of messages to be transmitted in sequence based on the plurality of message codes and the sequence of messages to be transmitted, so as to obtain the plurality of target messages; A message sending unit is used to send the multiple target messages to the message receiving device.
8. A vehicle, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 6 when running.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
