Communication method, communication device, computer-readable storage medium, and program product

CN122845016APending Publication Date: 2026-09-29CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510368389.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

由于通信环境的复杂性以及各种干扰因素的存在,报文在传输过程中可能出现错误、丢失等情况,导致通信失败或系统功能异常

Benefits of technology

[0026]本申请实施例中,当第一报文为数据报文类型时,接收端会其判定传输是否成功。传输成功后,发送类型为确认报文类型的第二报文告知发送端,提升了数据传输的可靠性,通过状态反馈把控数据传输的状态与进程,提高通信效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122845016A_ABST
    Figure CN122845016A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a communication method, a communication device, a computer readable storage medium and a program product, and relate to the field of communication. The communication method comprises determining a message type; and sending a first message, wherein the first message comprises type information and index information, the type information is used to indicate the message type, and the index information is used to confirm whether the message is correctly transmitted. The communication method can improve the integrity of data and the reliability of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more specifically, to a communication method, a communication device, a computer-readable storage medium, and a program product. Background Technology

[0002] Modern communication systems require reliable and efficient data transmission. Different types of messages are transmitted within the system to achieve various functions. Due to the complexity of the communication environment and the presence of various interference factors, messages may be corrupted or lost during transmission, leading to communication failures or abnormal system functions. Summary of the Invention

[0003] This application provides a communication method, communication device, computer-readable storage medium, and program product that can improve data integrity and data transmission reliability.

[0004] In a first aspect, this application provides a communication method, comprising: determining a message type; sending a first message, the first message including type information and index information, the type information being used to indicate the message type, and the index information being used to confirm whether the message is transmitted correctly.

[0005] In the technical solution of this application embodiment, by adding type information and index information to the first message, the sending end and the receiving end can determine the message type through the type information and then perform subsequent processing. The sending end and the receiving end can verify the correctness of message transmission through the index information. If the index is abnormal, remedial measures can be taken, which can reduce the possibility of message loss or out-of-order delivery during transmission, improve data integrity, and enhance the reliability and orderliness of data transmission, thereby improving the stability and efficiency of the overall communication system.

[0006] In some embodiments of the first aspect, the message type includes one of a data message type, an acknowledgment message type, and a synchronization index message type.

[0007] In this embodiment of the application, during the communication process, the data message type can transmit data; the confirmation message type can promptly provide feedback on the data reception or operation execution status, thereby improving communication reliability; and the synchronization index message type is used to realize the synchronization of index information between the two communicating parties, thereby improving the accuracy of data processing. These three message types work together to greatly enhance the stability and reliability of the communication system.

[0008] In some embodiments of the first aspect, the communication method further includes: receiving a second message when the type information of the first message indicates that the type of the first message is a data message type, wherein the type information of the second message is used to indicate that the type of the second message is an acknowledgment message type; and determining, based on the second message, whether the first message was successfully transmitted.

[0009] In this embodiment, after the sending end sends a first message indicating a data packet type, the receiving end, based on the verification result of that message, sends a second message indicating an acknowledgment message type. Based on the second message, the sending end can determine whether the first message was successfully transmitted. This process allows for real-time and accurate feedback on the data packet transmission status. By promptly determining the transmission result, timely countermeasures can be taken, improving the reliability of data transmission.

[0010] In some embodiments of the first aspect, determining whether the first message was successfully transmitted based on the second message includes: determining whether the index information of the second message matches the local index information; if the match is successful, determining that the first message was successfully transmitted.

[0011] In this embodiment, the transmission status of the first message can be determined by comparing the index information of the second message with the local index information. If the index information matches successfully, the transmission can be considered successful. This method provides dual detection for data message transmission, reducing the risk of message loss or out-of-order delivery due to interference, attenuation, and other factors during transmission. It provides reliable transmission status feedback for the communication system, enabling accurate and orderly data transmission and improving the stability of the communication system.

[0012] In some embodiments of the first aspect, determining whether the first message was successfully transmitted based on the second message further includes: in the case of a matching failure, determining that the first message transmission failed; and retransmitting the first message.

[0013] In this embodiment, by comparing the second message with local index information, the transmission status of the first message can be determined. A successful match confirms successful transmission; a failed match indicates transmission failure and the first message is automatically retransmitted. This method, through the retransmission mechanism, ensures orderly and accurate data transmission, reducing the possibility of message loss or out-of-order delivery due to interference, attenuation, or other adverse factors during transmission, thereby reducing the probability of transmission failure and ensuring the safe operation of the system.

[0014] In some embodiments of the first aspect, the communication method further includes: if the type information of the first message indicates that the type of the first message is a data message type, determining that a second message has not been received within a preset time, wherein the type information of the second message is used to indicate that the type of the second message is an acknowledgment message type; and retransmitting the first message.

[0015] In this embodiment, the present invention monitors the reception of acknowledgment messages by setting a preset time and promptly retransmits data messages when no acknowledgment message is received, thus solving the problem of data transmission uncertainty caused by lost or delayed acknowledgment messages. This method improves the reliability and stability of the communication system and reduces system failures and losses caused by data transmission errors or losses.

[0016] In some embodiments of the first aspect, the communication method further includes: sending a third message when the number of times the first message is retransmitted reaches a predetermined number, wherein the type information of the third message indicates that the type of the third message is a synchronization index message type; and resetting the local index information.

[0017] In this embodiment of the application, by resetting the local index information, the index information of both communicating parties is kept consistent, which effectively avoids data transmission errors caused by inconsistent index information and improves the accuracy and reliability of data transmission.

[0018] In some embodiments of the first aspect, the communication method further includes: resetting local index information when the type information of the first message indicates that the type of the first message is a synchronization index message type.

[0019] In this embodiment, by resetting the local index information, the consistency of index information between the communicating parties is ensured, effectively avoiding data transmission errors caused by index inconsistency and improving the accuracy and reliability of data transmission. In fields such as industrial automation and power systems, where data accuracy is extremely important, this can greatly reduce production accidents or system failures caused by communication errors.

[0020] In some embodiments of the first aspect, the communication method further includes: receiving a fourth message, the fourth message including type information and index information; and processing the fourth message.

[0021] In this embodiment of the application, the communication method enables the sending end to switch to the receiving end, receive and process the fourth message with the same structure as the first message frame but different content, and realize the mutual transmission between the sending end and the receiving end by processing its type information and index information, thereby improving the communication flexibility, reliability and efficiency, and is suitable for a variety of complex communication scenarios.

[0022] Secondly, this application provides a communication method, including: receiving a first message, the first message including type information and index information, the type information being used to indicate the message type, and the index information being used to confirm whether the message has been transmitted correctly; and processing the first message.

[0023] In this embodiment of the application, by identifying and processing the first message type information and index information, the message can be correctly processed in the communication system. The receiving end can verify the correctness of the message transmission through the index information. When the index information does not match, corresponding measures are taken to reduce the possibility of message loss or out-of-order transmission, improve the integrity and order of data, and enhance the reliability of communication.

[0024] In some embodiments of the second aspect, the message type includes one of a data message type, an acknowledgment message type, and a synchronization index message type.

[0025] In some embodiments of the second aspect, processing the first message includes: determining whether the first message has been successfully transmitted if the type information of the first message indicates that the type of the first message is a data message type; and sending a second message if the type information of the second message indicates that the type of the second message is an acknowledgment message type.

[0026] In this embodiment, when the first message is a data message, the receiving end determines whether the transmission was successful. After successful transmission, a second message of type acknowledgment is sent to inform the sending end, improving the reliability of data transmission. By controlling the status and progress of data transmission through status feedback, communication efficiency is improved.

[0027] In some embodiments of the second aspect, determining whether the first message was successfully transmitted includes: determining whether the index information of the first message matches the local index information; if the match is successful, determining that the first message was successfully transmitted; or if the match fails, determining that the first message was transmitted unsuccessfully.

[0028] In this embodiment of the application, the index information matching method can determine whether the first message has been lost, out of order, or damaged during transmission, thereby improving the accuracy of the communication system in judging the message transmission status and avoiding system failures or data processing errors caused by misjudgment.

[0029] In some embodiments of the second aspect, determining whether the index information of the first message matches the local index information includes: determining whether the cyclic redundancy check of the first message is successful; if the check is successful, determining whether the index information of the first message matches the local index information; or if the check fails, determining that the index information of the first message fails to match the local index information.

[0030] In this embodiment, a dual verification method combining cyclic redundancy check and index information matching can detect whether data errors occur during message transmission and whether the message maintains its order and integrity. This improves the accuracy and integrity of message transmission and reduces data loss due to transmission errors.

[0031] In some embodiments of the second aspect, the communication method further includes: in the event that the transmission of the first message fails, receiving a third message, wherein the type information of the third message indicates that the type of the third message is a synchronization index message type; and resetting the local index information.

[0032] In this embodiment of the application, after receiving the first message and determining that the transmission has failed, the third message is received and the local index information is reset, and the states of both communicating parties are recalibrated to avoid communication interruption caused by index inconsistency or continuous retransmission, thereby significantly improving the stability of the communication system.

[0033] In some embodiments of the second aspect, processing the first message includes: resetting the local index information if the type information of the first message indicates that the type of the first message is a synchronization index message type.

[0034] In this embodiment of the application, by resetting the local index information, the index information of both communicating parties is kept consistent, which effectively avoids data transmission errors caused by inconsistent index information and improves the accuracy and reliability of data transmission.

[0035] In some embodiments of the second aspect, the communication method further includes: sending a fourth message, the fourth message including type information and index information.

[0036] In this embodiment of the application, the communication method enables the receiving end to switch to the sending end and send a fourth message with the same structure as the first message frame but different content, thereby realizing mutual transmission between the sending end and the receiving end, improving communication flexibility, reliability and efficiency, and is suitable for a variety of complex communication scenarios.

[0037] Thirdly, this application provides a communication device, which includes modules or units for performing the methods in the first or second aspect.

[0038] Fourthly, this application provides a communication device including a processor configured to cause the communication device to perform the methods in the first or second aspect.

[0039] Fifthly, this application provides a computer-readable storage medium storing a computer program or instructions that, when executed on a communication device, cause the communication device to perform the method of the first or second aspect.

[0040] In a sixth aspect, this application provides a computer program product, which includes a computer program or instructions that, when executed on a communication device, cause the communication device to perform the method in the first or second aspect. Attached Figure Description

[0041] Figure 1 This is a structural diagram of the message in an embodiment of this application;

[0042] Figure 2 This is a flowchart of a communication method according to an embodiment of this application;

[0043] Figure 3 This is another flowchart of the communication method according to an embodiment of this application;

[0044] Figure 4 This is another flowchart of the communication method according to an embodiment of this application;

[0045] Figure 5 This is another flowchart illustrating the communication method according to an embodiment of this application;

[0046] Figure 6 This is another flowchart illustrating the communication method according to an embodiment of this application;

[0047] Figure 7 This is another flowchart of the communication method according to an embodiment of this application;

[0048] Figure 8 This is another flowchart of the communication method according to an embodiment of this application;

[0049] Figure 9 This is another flowchart illustrating the communication method according to an embodiment of this application;

[0050] Figure 10 This is another flowchart illustrating the communication method according to an embodiment of this application;

[0051] Figure 11 This is another flowchart of the communication method according to an embodiment of this application;

[0052] Figure 12 This is another flowchart of the communication method according to an embodiment of this application;

[0053] Figure 13 This is another flowchart of the communication method according to an embodiment of this application. Detailed Implementation

[0054] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0055] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0056] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used in the description of this application is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms "comprising" and "having," and any variations thereof, in the description, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the description, claims, or accompanying drawings of this application are used to distinguish different objects, not to describe a specific order or hierarchy.

[0057] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0058] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "attachment" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0059] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0060] In the embodiments of this application, the same reference numerals denote the same components, and for the sake of brevity, detailed descriptions of the same components are omitted in different embodiments. It should be understood that the thickness, length, width, and other dimensions of various components in the embodiments of this application shown in the accompanying drawings, as well as the overall thickness, length, width, and other dimensions of the integrated device, are merely illustrative and should not constitute any limitation on this application.

[0061] In this application, "multiple" refers to two or more (including two), and similarly, "multiple groups" refers to two or more (including two), and "multiple pieces" refers to two or more (including two).

[0062] Unless otherwise specified, all embodiments and optional embodiments of this application can be combined to form new technical solutions.

[0063] Unless otherwise specified, all technical features and optional technical features of this application may be combined to form new technical solutions.

[0064] Unless otherwise specified, all steps of this application may be performed sequentially or randomly, preferably sequentially. For example, the method includes steps (a) and (b), indicating that the method may include steps (a) and (b) performed sequentially, or it may include steps (b) and (a) performed sequentially. For example, the mention that the method may also include step (c) indicates that step (c) may be added to the method in any order; for example, the method may include steps (a), (b), and (c), or it may include steps (a), (c), and (b), or it may include steps (c), (a), and (b), etc.

[0065] Modern communication systems require reliable and efficient data transmission. Different types of messages are transmitted within the system to achieve various functions. Due to the complexity of the communication environment and the presence of various interference factors, messages may be corrupted or lost during transmission, leading to communication failures or abnormal system functions.

[0066] Based on the above considerations, this application provides a communication method that can solve the problem that individual battery cells in a battery casing are prone to deformation or even damage due to excessive local pressure. The communication method provided in this application includes determining a message type; sending a first message, the first message including type information and index information, the type information indicating the message type, and the index information confirming whether the message was transmitted correctly.

[0067] In this embodiment, by adding type information and index information to the first message, the sending and receiving ends can determine the message type through the type information and then perform subsequent processing. The sending and receiving ends can verify the correctness of message transmission through the index information. If the index is abnormal, remedial measures can be taken, which can reduce the possibility of message loss or out-of-order delivery during transmission, improve data integrity, and enhance the reliability and orderliness of data transmission, thereby improving the stability and efficiency of the overall communication system.

[0068] Figure 1 This is a structural diagram of the message in an embodiment of this application. Figure 2 This is a flowchart illustrating the communication method according to an embodiment of this application. Figure 1 and Figure 2 As shown, the communication method may include the following steps.

[0069] S101: Determine the message type.

[0070] S102: Send the first message. The first message includes type information and index information. The type information is used to indicate the message type, and the index information is used to confirm whether the message has been transmitted correctly.

[0071] In this embodiment, the communication method can be applied to the FT3 communication protocol. The message sent through this communication method can be an FT3 message, that is, the first message can be an FT3 message.

[0072] In some embodiments, the frame structure of the FT3 communication protocol may include a header, type information, index information, data, and a Cyclic Redundancy Check (CRC).

[0073] The header is generally of fixed length and contains information such as start word, length field, link layer control word, destination address, and source address.

[0074] Type information is used to indicate the message type; that is, the message type is determined based on the type information.

[0075] Index information is used to verify that data was sent correctly. For example, the initial value is 0 by default. The sender and receiver count independently, incrementing by 1 if transmission or reception is successful.

[0076] The data includes user data, which is an optional part; that is, the frame structure may or may not include data.

[0077] CRC is used to detect whether errors have occurred during data transmission. By adding a certain number of check bits to the original data, the entire data block is made divisible by a specific generator polynomial. At the receiving end, the received data is divided by the same generator polynomial. If the remainder is zero, the data transmission is considered correct; otherwise, an error has occurred during transmission.

[0078] In some embodiments, S101 and S102 can be performed by the sending end.

[0079] In S101, the sender can determine the message type based on the type information. For example, the sender can parse and judge the message type information using pre-defined rules and algorithms.

[0080] In S102, the sending end sends the first message to the receiving end.

[0081] It should be understood that the message type determined in S101 is the same as the message type of the first message in S102.

[0082] The first message includes type information and index information. The type information indicates the specific type of the first message and corresponds to the message type determined in S101. The type information can be identified in the message through a specific encoding method. For example, a one-byte encoding can be used, with different values ​​representing different message types, or different numbers of bytes can be used to represent different message types.

[0083] The purpose of index information is to confirm whether a message has been transmitted correctly. For example, index information can be an incrementing sequence number, a hash value generated based on the message content, or other uniquely identifying information. Specifically, the sequence number is automatically incremented by 1 each time a new first message is sent. After receiving the first message, the receiver also automatically increments the sequence number of its local index information. The index information is used to check for packet loss, duplicate reception, etc. If the index information received by the receiver is inconsistent with its local index information—for example, if the sequence number jumps or is duplicated—the receiver can determine that a problem occurred during message transmission and take appropriate measures.

[0084] This communication method can be applied to data transmission between a Baseboard Management Controller (BMC) and a Smart Battery Management Unit (SBMU). Specifically, the sending end can be the Baseboard Management Controller (BMC), and the receiving end can be the Smart Battery Management Unit (SBMU). Data transmission between the BMC and SBMU uses the FT3 communication protocol, which employs the following method: The BMC determines the message type and sends a first message to the SBMU. This first message includes type information and index information; the type information indicates the message type, and the index information confirms whether the message was transmitted correctly.

[0085] In this embodiment, by adding type information and index information to the first message, the sending and receiving ends can determine the message type through the type information and then perform subsequent processing. The sending and receiving ends can verify the correctness of message transmission through the index information. If the index is abnormal, remedial measures can be taken, which can reduce the possibility of message loss or out-of-order delivery during transmission, improve data integrity, and enhance the reliability and orderliness of data transmission, thereby improving the stability and efficiency of the overall communication system.

[0086] In this embodiment of the application, the message type includes one of the following: data message type, acknowledgment message type, and synchronization index message type.

[0087] When the message is a data message, it is used to transmit user data. In different application scenarios, this data can be various types of information, such as current and voltage measurements in a power system, and equipment operating status parameters and control commands in an industrial automation system.

[0088] When the message is a data message, its frame structure must include data to carry specific data information. Its format and content can be determined according to the specific application protocol and may include information such as data identifiers, data values, and timestamps.

[0089] When the message is an acknowledgment message, it is used to confirm that data or operations have been received. After the sender sends data or performs an operation, the receiver informs the sender that the data has been successfully received or the operation has been successfully executed by sending an acknowledgment message.

[0090] When the message is an acknowledgment message, the type information can be an ACK signal. ACK is an abbreviation for "Acknowledge," used to confirm that data has been received. When the receiving end determines that the data transmission was successful, it will send a message indicating an ACK signal to the sending end according to the communication protocol, to inform the sending end that the data has been successfully received. The sending end can then decide whether to continue sending the next data message based on this.

[0091] When the message is a synchronization index message type, it is used to synchronize the index information between the communicating parties. Specifically, when the index information of the sending end and the receiving end does not match, causing multiple consecutive data transmission failures, a synchronization index message is sent to synchronize the index information of the sending end and the receiving end before resending the data message, thereby improving the success rate of data transmission.

[0092] In this embodiment of the application, during the communication process, the data message type can transmit data; the confirmation message type can promptly provide feedback on the data reception or operation execution status, thereby improving communication reliability; and the synchronization index message type is used to realize the synchronization of index information between the two communicating parties, thereby improving the accuracy of data processing. These three message types work together to greatly enhance the stability and reliability of the communication system.

[0093] Figure 3 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 3 As shown, the communication method also includes the following steps.

[0094] S201: If the type information of the first message indicates that the type of the first message is a data message type, a second message is received, wherein the type information of the second message is used to indicate that the type of the second message is an acknowledgment message type.

[0095] In S201, the type information of the second message is used to indicate that the type of the second message is an acknowledgment message, that is, the second message is a message sent by the receiving end to the sending end after confirming that the first message has been successfully transmitted.

[0096] Specifically, once the receiving end successfully receives and confirms that the first message was transmitted successfully, it will generate and send a second message according to pre-set rules. The type information of the second message indicates that it is an acknowledgment message. The main function of the acknowledgment message is to provide feedback to the sending end regarding the reception status of the first message.

[0097] S202: Based on the second message, determine whether the first message was successfully transmitted.

[0098] In S202, the acknowledgment information in the second message indicates that the first message has been successfully transmitted, thus confirming that the first message was successfully transmitted.

[0099] In this embodiment, within the FT3 communication protocol framework, after the sending end sends a first message indicating a data packet type based on its type information, the receiving end, based on the verification result of that message, sends a second message indicating an acknowledgment message type based on its type information. The sending end can then determine whether the first message was successfully transmitted based on the second message. This process allows for real-time and accurate feedback on the data packet transmission status. By promptly determining the transmission result, timely countermeasures can be taken, improving the reliability of data transmission.

[0100] Figure 4 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 4 As shown, S202 may include the following steps.

[0101] S301: Determine whether the index information of the second message matches the local index information.

[0102] In S301, the index information of the second message corresponds to the local index information. The local index information refers to the index information of the sending end, and the index information of the second message refers to the index information of the receiving end.

[0103] Once the receiving end confirms that the first message has been successfully transmitted, it will send a second message as confirmation feedback according to the FT3 communication protocol rules. The second message also includes index information, which is used to compare it with the local index information of the sending end.

[0104] After receiving the second message, the sending end extracts the index information from it and compares it with the local index information of the record to determine whether the two match according to the corresponding relationship.

[0105] S302: If the match is successful, determine that the first message was successfully transmitted.

[0106] In S302, if the comparison in S301 confirms that the index information of the second message matches the local index information, it indicates that the receiving end confirms that the first message was successfully transmitted, and the sending end also confirms that the first message was successfully transmitted.

[0107] In this embodiment of the application, the communication method can directly determine that the first message has been successfully transmitted according to the steps in S202. That is, after receiving the second message of the type of acknowledgment message, no other operations are performed, and the first message is directly determined to have been successfully transmitted.

[0108] Optionally, the communication method may also match the index information of the second message with the local index information, and then determine whether the first message was successfully transmitted based on the matching result.

[0109] In this embodiment of the application, in the FT3 communication protocol, the transmission status of the first message can be determined by comparing the index information of the second message with the local index information. If the index information matches successfully, the transmission can be considered successful. This method can provide dual detection for data message transmission, reducing the risk of message loss or out-of-order delivery due to interference, attenuation, and other factors during transmission. It provides reliable transmission status feedback for the communication system, enabling accurate and orderly data transmission and improving the stability of the communication system.

[0110] Continue to refer to Figure 4 S202 may also include the following steps.

[0111] S303: If a match fails, determine that the first message transmission failed.

[0112] In S303, if the index information of the second message differs from the local index information during the index information matching process in S301, and they cannot be matched (i.e., the matching fails), it indicates that the transmission of the second message has failed. Therefore, it cannot be determined whether the receiving end has confirmed successful data transmission, and consequently, it cannot be determined whether the first message was successfully transmitted. To improve the accuracy of data transmission, it is determined that the first message transmission failed.

[0113] S304: Resend the first message.

[0114] In S304, when it is determined that the first message transmission failed, the sending end initiates a retransmission mechanism to ensure that the data is eventually delivered accurately to the receiving end. The sending end reorganizes the first message, using the same message generation rules and data content as the initial transmission, and retransmits it to the receiving end through the communication link.

[0115] During the retransmission process, the sending end can adjust the sending strategy appropriately according to the actual communication situation, such as adjusting the sending time interval or increasing the signal strength, in order to increase the probability of successful message transmission.

[0116] After retransmission, the sending end will continuously track the transmission status of the retransmitted first message and repeat the above steps until the index information of the second message successfully matches the local index information.

[0117] In this embodiment, by comparing the second message with local index information, the transmission status of the first message can be determined. A successful match confirms successful transmission; a failed match indicates transmission failure and the first message is automatically retransmitted. This method, through the retransmission mechanism, ensures orderly and accurate data transmission, reducing the possibility of message loss or out-of-order delivery due to interference, attenuation, or other adverse factors during transmission, thereby reducing the probability of transmission failure and ensuring the safe operation of the system.

[0118] Figure 5This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 5 As shown, the communication method also includes the following steps.

[0119] S401: If the type information of the first message indicates that the type of the first message is a data message type, determine that no second message has been received within a preset time. The type information of the second message is used to indicate that the type of the second message is an acknowledgment message type.

[0120] In S401, when the sending end sends the first message of a data packet type, a preset timer mechanism will be started.

[0121] This preset time can be set in advance based on factors such as the characteristics of the communication system, network conditions, and data processing requirements. Its purpose is to reasonably determine whether the receiving end can return an acknowledgment message in a timely manner. For example, when the BMC sends the first message to the SBMU, this preset time can be set to 20ms.

[0122] Within the preset time period, the sending end will continuously monitor whether a second message is received, and the type information of the second message is used to indicate that it is an acknowledgment message. If the sending end still does not receive the second message by the end of the preset time, it indicates that there may be a loss of the acknowledgment message, transmission delay, or failure of the receiving end. At this time, the sending end determines that the transmission of the first message has failed.

[0123] S402: Resend the first message.

[0124] In S402, after determining that the first message transmission failed, the sending end will retransmit the first message in order to ensure that the data carried by the first message can be correctly received by the receiving end. During the retransmission process, the sending end will operate according to the same message format, data content and communication protocol as the initial transmission, so that the receiving end can correctly identify and process the retransmitted message.

[0125] After resending the first message, the sending end will restart the preset timer mechanism and continue to wait for the second message returned by the receiving end, repeating the above judgment and processing process until it is determined that the first message was sent successfully.

[0126] In this embodiment, the present invention monitors the reception of acknowledgment messages by setting a preset time and promptly retransmits data messages when no acknowledgment message is received, thus solving the problem of data transmission uncertainty caused by lost or delayed acknowledgment messages. This method improves the reliability and stability of the communication system and reduces system failures and losses caused by data transmission errors or losses.

[0127] Figure 6 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 6As shown, the communication method also includes the following steps.

[0128] S501: If the number of times the first message is retransmitted reaches a predetermined number, a third message is sent, and the type information of the third message indicates that the type of the third message is a synchronization index message type.

[0129] In S501, after sending the first message, the sending end continuously monitors whether the receiving end sends a second message. If the second message is not received within a preset time, the sending end will resend the first message according to the above steps and record the number of retransmissions. When the cumulative number of retransmissions of the first message reaches a predetermined number, in order to avoid the receiving end being unable to correctly receive the first message and return an acknowledgment information due to incorrect index information, the sending end will generate and send a third message.

[0130] The type information of the third message indicates that the type of the third message is a synchronization index message. The function of the synchronization index message is to synchronize the index information between the sending end and the receiving end, so that subsequent data messages can be transmitted correctly.

[0131] The predetermined number of times can be set according to factors such as the characteristics of the communication system, network conditions, and data processing requirements. For example, when the BMC sends the first message to the SBMU, the predetermined number of times can be set to three.

[0132] S502: Reset local index information.

[0133] In S502, the sending end resets its local index information while sending the third message. Since previous retransmissions may have caused index information corruption, the sending end restores the local index information to its initial state or regenerates new index information according to specific rules to avoid communication errors caused by inconsistent index information. The receiving end also resets its local index information when receiving the third message.

[0134] For example, assuming the previous index information was a sequence number that was incremented sequentially based on the message sending order, when the sending end resets the local index information, it can reset the sequence number to the initial value 1, or generate a brand new index identifier using a new algorithm according to the current communication requirements and system settings. In subsequent communication processes, the sending end will identify and manage newly sent messages based on the reset local index information, so that the index information between the sending end and the receiving end is synchronized, thereby improving the accuracy and reliability of data transmission.

[0135] In some embodiments, the transmission ends when the maximum number of retransmissions of the first message is reached. This maximum number can be set based on factors such as the characteristics of the communication system, network conditions, and data processing requirements; this application does not impose any limitations on it.

[0136] In this embodiment, when the number of retransmissions of the first message reaches a predetermined number, a third message is sent in a timely manner and the local index information is reset to recalibrate the status of both communicating parties, thereby avoiding communication interruption caused by index inconsistency or continuous retransmission and significantly improving the stability of the communication system.

[0137] In this embodiment of the application, the communication method further includes the following steps.

[0138] If the type information of the first message indicates that the type of the first message is a synchronization index message type, reset the local index information.

[0139] In some embodiments, the type of the first message sent by the sender can be a synchronization index message type, and the step of resetting the local index information is the same as S502, and will not be repeated here.

[0140] For example, once the sending end determines that the data packet transmission is successful, it sends a synchronization index message to the receiving end to reset the index information of the sending end and the receiving end, thus ending the transmission.

[0141] For example, before the sending end sends a data packet, in order to prevent the index information from interfering with the transmission result, a synchronization index message can be sent first to reset the index information of the sending end and the receiving end before sending the data packet.

[0142] In this embodiment of the application, by resetting the local index information, the index information of both communicating parties is kept consistent, which effectively avoids data transmission errors caused by inconsistent index information and improves the accuracy and reliability of data transmission.

[0143] In this embodiment of the application, the communication method further includes the following steps.

[0144] Receive the fourth message, which includes type information and index information.

[0145] In some embodiments, the frame structure of the fourth message is the same as that of the first message, but the content contained is different.

[0146] In some embodiments, the sender can both send the first message and receive the fourth message.

[0147] When the sending end receives the fourth message received by the receiving end, the sending end and the receiving end can communicate with each other.

[0148] For example, when the BMC acts as the sender, it may send a first message to the SBMU to query real-time battery status information, such as battery level, voltage, and temperature. Upon receiving the query request, the SBMU collects the relevant data and encapsulates it into a fourth message (data message type) to send back to the BMC. At this point, the BMC switches from being the sender to being the receiver, receiving and processing the fourth message sent by the SBMU to obtain battery status information for monitoring and management of the battery system.

[0149] Process the fourth message.

[0150] The processing of the fourth message can be referenced as the receiving end processes the first message as described below.

[0151] In this embodiment of the application, the communication method enables the sending end to switch to the receiving end, receive and process the fourth message with the same structure as the first message frame but different content, and realize the mutual transmission between the sending end and the receiving end by processing its type information and index information, thereby improving the communication flexibility, reliability and efficiency, and is suitable for a variety of complex communication scenarios.

[0152] Figure 7 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 7 As shown, taking the FT3 communication protocol as an example, after the process begins, the sending end first receives background data and checks whether the FT3 link is in an "occupied" state. If the FT3 link is in an "occupied" state, meaning that the current link is transmitting data and cannot immediately process new data, the sending end will save the received background data to a queue and wait for the link to become idle. If the FT3 link is not in an "occupied" state, that is, it is in an idle state, the sending end will send the packaged data to the FT3 link, send the data packet, and set the FT3 link to an "occupied" state to prevent other data from occupying the link at the same time.

[0153] It should be understood that this communication method can also be applied to other communication protocols, such as Controller Area Network (CAN) protocols, wireless communication protocols, etc.

[0154] After sending a data packet, the sender waits for an acknowledgment packet from the receiver. When the sender receives the acknowledgment packet within the predetermined time, it first checks if there is data in the queue. If there is data in the queue, it means that the data temporarily stored due to link busy is still waiting to be sent. In this case, the sender sends the data in the queue to the FT3 link and keeps the FT3 link in an "occupied" state. If there is no data in the queue, it means that all data has been sent. The sender sets the FT3 link to an "idle" state and then continues to receive background data, repeating the above process.

[0155] Optionally, the sender can also verify the acknowledgment message, that is, determine whether the index information of the acknowledgment message matches the local index information. If the match is successful, check whether there is data in the queue and perform subsequent operations. If the match fails, resend the data message.

[0156] If the sender does not receive an acknowledgment message from the receiver, it will retransmit the data packet after a predetermined time has elapsed. During the retransmission process, after each predetermined number of consecutive retransmissions, provided that all retransmissions have received acknowledgment messages, the sender will send an additional synchronization index message.

[0157] It should be understood that the data message can be the first message mentioned above, the acknowledgment message can be the second message mentioned above, and the synchronization index message can be the third message mentioned above.

[0158] Figure 8 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 8 As shown, the communication method may include the following steps.

[0159] S601: Receive the first message. The first message includes type information and index information. The type information is used to indicate the message type, and the index information is used to confirm whether the message has been transmitted correctly.

[0160] In some embodiments, S601 and S602 can be executed by the receiving end.

[0161] S601 corresponds to S102 of the sending end, that is, the sending end sends the first message to the receiving end, and the receiving end receives the first message sent by the sending end.

[0162] S602: Process the first message.

[0163] In S602, the receiving end can take appropriate processing measures based on the type information of the first message; and determine whether the first message has been successfully transmitted based on the index information of the first message.

[0164] In this embodiment of the application, by identifying and processing the first message type information and index information, the message can be correctly processed in the communication system. The receiving end can verify the correctness of the message transmission through the index information. When the index information does not match, corresponding measures are taken to reduce the possibility of message loss or out-of-order transmission, improve the integrity and order of data, and enhance the reliability of communication.

[0165] In this embodiment of the application, the message type includes one of the following: data message type, acknowledgment message type, and synchronization index message type.

[0166] The message type in this embodiment is the same as the message type in the sending end, and will not be described again here.

[0167] Figure 9 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 9 As shown, S602 may include the following steps.

[0168] S701: If the type information of the first message indicates that the type of the first message is a data message type, determine whether the first message has been successfully transmitted.

[0169] In S701, when the first message is a data message (meaning its frame structure includes data), the receiving end needs to process and verify the message. If the verification passes, the first message is considered successfully transmitted; if the verification fails, the first message is considered to have failed to transmit.

[0170] S702: If the transmission of the first message is confirmed to be successful, a second message is sent. The type information of the second message is used to indicate that the type of the second message is an acknowledgment message.

[0171] S702 corresponds to S201 on the sending end, that is, after the receiving end determines that the first message has been successfully transmitted, it sends a second message to the sending end. The purpose of the second message is to inform the sending end that the first message has been successfully transmitted.

[0172] In this embodiment, when the first message is a data message, the receiving end determines whether the transmission was successful. After successful transmission, a second message of type acknowledgment is sent to inform the sending end, improving the reliability of data transmission. By controlling the status and progress of data transmission through status feedback, communication efficiency is improved.

[0173] Figure 10 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 10 As shown, S701 may include the following steps.

[0174] S801: Determine whether the index information of the first message matches the local index information.

[0175] In S801, the index information of the first message corresponds to the local index information. The local index information refers to the index information of the receiving end, and the index information of the first message refers to the index information of the sending end.

[0176] When the sending end sends the first message, it simultaneously generates and records the corresponding local index information. The index information of the first message is the sending end's local index information. When the receiving end receives the first message, it also simultaneously generates and records the corresponding local index information and matches it with the index information of the first message according to the correspondence between the two.

[0177] S802: If the match is successful, determine that the first message was successfully transmitted.

[0178] In S802, if the comparison in S801 determines that the index information of the first message matches the local index information, it indicates that the receiving end determines that the first message was successfully transmitted.

[0179] S803: If a match fails, determine that the first message transmission failed.

[0180] In S803, if the index information of the first message differs from the local index information during the index information matching process in S801 and cannot be matched, the matching fails, indicating that the transmission of the first message has failed.

[0181] It should be understood that S802 and S803 are ORed, meaning they cannot be executed simultaneously.

[0182] In some embodiments, after determining that the first message transmission has failed, no further action is required. If the sender does not receive the second message, it will resend the first message to the receiver.

[0183] In this embodiment of the application, the index information matching method can determine whether the first message has been lost, out of order, or damaged during transmission, thereby improving the accuracy of the communication system in judging the message transmission status and avoiding system failures or data processing errors caused by misjudgment.

[0184] Figure 11 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 11 As shown, S801 may include the following steps.

[0185] S901: Determine whether the cyclic redundancy check of the first message was successful.

[0186] In S901, when the sending end generates the first message, it calculates a CRC checksum for the message data portion according to the CRC algorithm and appends this checksum to the end of the message before sending it. Upon receiving the first message, the receiving end first recalculates the received message data portion (excluding the existing CRC checksum) using the same CRC algorithm to obtain a locally calculated CRC checksum. Then, it compares the locally calculated CRC checksum with the CRC checksum carried in the message to determine whether the cyclic redundancy check of the first message was successful.

[0187] S902: If the verification is successful, determine whether the index information of the first message matches the local index information.

[0188] In S902, if the cyclic redundancy check of the first message is successful as determined in S901, it indicates that the first message likely did not experience any data bit errors during transmission. At this point, the receiving end performs index information matching, i.e., S801.

[0189] S903: In the event of a verification failure, it is determined that the index information of the first message fails to match the local index information.

[0190] In step S903, if it is determined in step S901 that the cyclic redundancy check of the first message failed, it indicates that data errors may have occurred during the transmission of the message, such as data bit flipping, loss, or addition, i.e., the message transmission failed. In this case, there is no need to perform index information matching; it can be directly determined that the index information of the first message fails to match the local index information.

[0191] It should be understood that S902 and S903 are in an OR relationship, meaning they cannot be executed simultaneously.

[0192] In some embodiments, after determining that the first message transmission has failed, no further action is required. If the sender does not receive the second message, it will resend the first message to the receiver.

[0193] In this embodiment, a dual verification method combining cyclic redundancy check and index information matching can detect whether data errors occur during message transmission and whether the message maintains its order and integrity. This improves the accuracy and integrity of message transmission and reduces data loss due to transmission errors.

[0194] Figure 12 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 12 As shown, after receiving a data packet, the receiving end first performs a CRC check on the data. If the CRC check fails, it indicates that an error may have occurred during data transmission. The receiving end determines that the transmission has failed, discards the data packet without responding, and waits for the sending end to retransmit. If the CRC check passes, the receiving end determines whether the transmission was successful by checking whether the received index matches its local index. Specifically, if the match is successful, the receiving end determines that the transmission was successful and sends an acknowledgment message to the sending end; if the match fails, the receiving end determines that the transmission has failed, discards the data packet without responding, and waits for the sending end to retransmit.

[0195] Figure 13 This is another flowchart illustrating the communication method according to an embodiment of this application. Figure 13 As shown, the communication method may include the following steps.

[0196] S1001: If the transmission of the first message fails, a third message is received. The type information of the third message indicates that the type of the third message is a synchronization index message type.

[0197] S1001 corresponds to S501. The third message is sent when the sending end retransmits the first message a predetermined number of times. Correspondingly, the receiving end receives the third message.

[0198] S1002: Reset local index information.

[0199] In S1002, the receiving end resets its local index information upon receiving the third message. Since multiple receiving operations may cause index information corruption, to avoid communication errors caused by inconsistent index information, the receiving end restores its local index information to its initial state or regenerates new index information according to specific rules. The sending end also resets its local index information upon receiving the third message.

[0200] In this embodiment of the application, after receiving the first message and determining that the transmission has failed, the third message is received and the local index information is reset, and the states of both communicating parties are recalibrated to avoid communication interruption caused by index inconsistency or continuous retransmission, thereby significantly improving the stability of the communication system.

[0201] In this embodiment of the application, S602 may include the following steps.

[0202] If the type information of the first message indicates that the type of the first message is a synchronization index message type, reset the local index information.

[0203] In some embodiments, the type of the first message sent by the sender can be a synchronization index message type, and the step of resetting the local index information is the same as S1002, and will not be repeated here.

[0204] In this embodiment of the application, by resetting the local index information, the index information of both communicating parties is kept consistent, which effectively avoids data transmission errors caused by inconsistent index information and improves the accuracy and reliability of data transmission.

[0205] In this embodiment of the application, the communication method further includes the following steps.

[0206] Send the fourth message, which includes type information and index information.

[0207] In some embodiments, the fourth message is the same as the fourth message received by the sending end, that is, the receiving end sends the fourth message to the sending end. The frame structure of the fourth message is the same as that of the first message, but the content it contains is different.

[0208] In some embodiments, the receiving end can either receive the first message or act as the sending end to send the fourth message. When the receiving end receives the fourth message sent by the sending end, the sending end and the receiving end achieve mutual transmission.

[0209] In this embodiment of the application, the communication method enables the receiving end to switch to the sending end and send a fourth message with the same structure as the first message frame but different content, thereby realizing mutual transmission between the sending end and the receiving end, improving communication flexibility, reliability and efficiency, and is suitable for a variety of complex communication scenarios.

[0210] This application also provides a communication device, which may include a transmitting module, a processing module, and a receiving module.

[0211] The sending module is used to determine the message type and send the first message. The first message includes type information and index information. The type information is used to indicate the message type, and the index information is used to confirm whether the message is transmitted correctly.

[0212] If the type information of the first message indicates that the first message is a data packet, the receiving module can be used to receive the second message, whose type information indicates that the second message is an acknowledgment message. The processing module can be used to determine whether the index information of the second message matches the local index information. If the match is successful, the first message is determined to have been transmitted successfully; otherwise, if the match fails, the first message is determined to have been transmitted unsuccessfully, and the first message is retransmitted.

[0213] If the type information of the first message indicates that the type of the first message is a data message, the processing module is used to determine that the second message has not been received within a preset time; the sending module is used to resend the first message.

[0214] If the number of times the first message is resent reaches a predetermined number, the sending module can also be used to send a third message. The type information of the third message indicates that the type of the third message is a synchronization index message type; and the local index information is reset.

[0215] If the type information of the first message indicates that the type of the first message is a synchronization index message type, reset the local index information.

[0216] The receiving module can also be used to receive a fourth message, which includes type information and index information; the processing module is used to process the fourth message.

[0217] Optionally, the transmitting module, processing module, and receiving module of the communication device may also include other functions. The receiving module may be used to receive a first message, which includes type information and index information. The type information is used to indicate the message type, and the index information is used to confirm whether the message is transmitted correctly. The message type includes one of a data message type, an acknowledgment message type, and a synchronization index message type.

[0218] The processing module can be used to process the first message.

[0219] Specifically, when the type information of the first message indicates that the type of the first message is a data message, the processing module can determine whether the cyclic redundancy check of the first message was successful. If the check is successful, it determines whether the index information of the first message matches the local index information; if the match is successful, it determines that the first message was transmitted successfully; or if the match fails, it determines that the first message was transmitted unsuccessfully. Alternatively, if the check fails, it determines that the index information of the first message does not match the local index information, and thus determines that the first message was transmitted unsuccessfully.

[0220] If the transmission of the first message fails, the receiving module can be used to receive the third message. The type information of the third message indicates that the type of the third message is a synchronization index message. The processing module is used to reset the local index information.

[0221] Optionally, if the type information of the first message indicates that the type of the first message is a synchronization index message type, the processing module is used to reset the local index information.

[0222] The sending module can also be used to send a fourth message, which includes type information and index information.

[0223] This application also provides a communication device, which includes a processor configured to cause the communication device to perform the communication method of any of the above embodiments.

[0224] This application also provides a computer-readable storage medium storing a computer program or instructions, which, when executed on a communication device, cause the communication device to perform the communication method of any of the above embodiments.

[0225] Computer-readable storage media can be any available medium that a computing device can store, or a data storage device such as a data center that contains one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives).

[0226] This application also provides a computer program product, which includes a computer program or instructions that, when executed on a communication device, cause the communication device to perform the communication method of any of the above embodiments.

[0227] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0228] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0229] According to some embodiments of this application, see Figures 1 to 13 This application provides a communication method in which the sending end includes the following steps.

[0230] Determine the message type, which includes one of the following: data message type, acknowledgment message type, or synchronization index message type.

[0231] Send the first message, which includes type information and index information. The type information is used to indicate the message type, and the index information is used to confirm whether the message has been transmitted correctly.

[0232] If the type information of the first message indicates that the type of the first message is a data message type, a second message is received, and the type information of the second message is used to indicate that the type of the second message is an acknowledgment message type.

[0233] Determine whether the index information of the second message matches the local index information.

[0234] If a match is found, the first message is confirmed to have been successfully transmitted.

[0235] Alternatively, if a match fails, determine that the first message transmission failed and resend the first message.

[0236] If the type information of the first message indicates that the type of the first message is a data message, and it is determined that no second message has been received within a preset time, the type information of the second message is used to indicate that the type of the second message is an acknowledgment message; then the first message is retransmitted.

[0237] If the number of times the first message is retransmitted reaches a predetermined number, a third message is sent, and the type information of the third message indicates that the type of the third message is a synchronization index message type; the local index information is reset.

[0238] If the type information of the first message indicates that the type of the first message is a synchronization index message type, reset the local index information.

[0239] Receive the fourth message, which includes type information and index information.

[0240] Process the fourth message.

[0241] The receiving end of this communication method may include the following steps.

[0242] Receive the first message, which includes type information and index information. The type information is used to indicate the message type, and the index information is used to confirm whether the message has been transmitted correctly. The message type includes one of the following: data message type, acknowledgment message type, and synchronization index message type.

[0243] If the type information of the first message indicates that the type of the first message is a data message, determine whether the cyclic redundancy check of the first message was successful.

[0244] If the verification is successful, determine whether the index information of the first message matches the local index information.

[0245] If a match is successful, the transmission of the first message is determined to be successful; otherwise, if a match fails, the transmission of the first message is determined to have failed.

[0246] Alternatively, if the verification fails, it can be determined that the index information of the first message fails to match the local index information, thus determining that the transmission of the first message has failed.

[0247] If the transmission of the first message fails, a third message is received. The type information of the third message indicates that the type of the third message is a synchronization index message type; the local index information is reset.

[0248] If the type information of the first message indicates that the type of the first message is a synchronization index message type, reset the local index information.

[0249] Send the fourth message, which includes type information and index information.

[0250] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no structural conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A communication method, characterized in that, include: Determine the message type; Send a first message, which includes type information and index information. The type information is used to indicate the message type, and the index information is used to confirm whether the message is transmitted correctly.

2. The communication method according to claim 1, characterized in that, The message type includes one of the following: data message type, acknowledgment message type, and synchronization index message type.

3. The communication method according to claim 2, characterized in that, The communication method further includes: If the type information of the first message indicates that the type of the first message is the data message type, a second message is received, wherein the type information of the second message is used to indicate that the type of the second message is the acknowledgment message type; Based on the second message, determine whether the first message was successfully transmitted.

4. The communication method according to claim 3, characterized in that, The step of determining whether the first message was successfully transmitted based on the second message includes: Determine whether the index information of the second message matches the local index information; If a match is found, the first message is determined to have been successfully transmitted.

5. The communication method according to claim 4, characterized in that, The step of determining whether the first message was successfully transmitted based on the second message further includes: If a match fails, it is determined that the transmission of the first message failed. Resend the first message.

6. The communication method according to claim 2, characterized in that, The communication method further includes: If the type information of the first message indicates that the type of the first message is the data message type, it is determined that no second message is received within a preset time, and the type information of the second message is used to indicate that the type of the second message is the acknowledgment message type; Resend the first message.

7. The communication method according to claim 5 or 6, characterized in that, The communication method further includes: If the number of times the first message is retransmitted reaches a predetermined number, a third message is sent, wherein the type information of the third message indicates that the type of the third message is the synchronization index message type; Reset local index information.

8. The communication method according to claim 2, characterized in that, The communication method further includes: If the type information of the first message indicates that the type of the first message is the synchronization index message type, reset the local index information.

9. The communication method according to any one of claims 1 to 6, characterized in that, The communication method further includes: Receive a fourth message, the fourth message including the type information and the index information; The fourth message is processed.

10. A communication method, characterized in that, include: Receive a first message, the first message including type information and index information, the type information being used to indicate the message type, and the index information being used to confirm whether the message was transmitted correctly; The first message is processed.

11. The communication method according to claim 10, characterized in that, The message type includes one of the following: data message type, acknowledgment message type, and synchronization index message type.

12. The communication method according to claim 11, characterized in that, The processing of the first message includes: If the type information of the first message indicates that the type of the first message is a data message, determine whether the first message was successfully transmitted. If the first message is successfully transmitted, a second message is sent, wherein the type information of the second message is used to indicate that the type of the second message is an acknowledgment message.

13. The communication method according to claim 12, characterized in that, Determining whether the first message was successfully transmitted includes: Determine whether the index information of the first message matches the local index information; If a match is successful, the transmission of the first message is determined to be successful; or if a match fails, the transmission of the first message is determined to be unsuccessful.

14. The communication method according to claim 13, characterized in that, Determining whether the index information of the first message matches the local index information includes: Determine whether the cyclic redundancy check of the first message was successful; If the verification is successful, determine whether the index information of the first message matches the local index information; or If the verification fails, it is determined that the index information of the first message fails to match the local index information.

15. The communication method according to claim 13, characterized in that, The communication method further includes: If it is determined that the first message transmission failed, a third message is received, wherein the type information of the third message indicates that the type of the third message is the synchronization index message type; Reset local index information.

16. The communication method according to claim 11, characterized in that, The processing of the first message includes: If the type information of the first message indicates that the type of the first message is the synchronization index message type, reset the local index information.

17. The communication method according to any one of claims 10 to 16, characterized in that, The communication method further includes: Send a fourth message, the fourth message including the type information and the index information.

18. A communication device, characterized in that, The communication device includes modules or units for performing the methods as claimed in claims 1 to 9 or for performing the methods as claimed in any one of claims 10 to 17.

19. A communication device, characterized in that, The communication device includes a processor configured to cause the communication device to perform the method as claimed in claims 1 to 9 or as claimed in any one of claims 10 to 17.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or instructions that, when executed on a communication device, cause the communication device to perform the method as claimed in claims 1 to 9 or as claimed in any one of claims 10 to 17.

21. A computer program product, characterized in that, The computer program product includes a computer program or instructions that, when executed on a communication device, cause the communication device to perform the method as claimed in claims 1 to 9 or as claimed in any one of claims 10 to 17.