Data transmission method and apparatus

By setting up two I2C buses in the IPMI architecture to achieve full-duplex communication and adopting a preset priority strategy, the problems of low communication efficiency and insufficient timeliness of key information acquisition in the existing IPMI architecture are solved, and efficient and timely data transmission is achieved.

CN116743668BActive Publication Date: 2026-04-14北京东土军悦科技有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
北京东土军悦科技有限公司
Filing Date
2023-05-22
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

The existing IPMI architecture uses a half-duplex communication method via the I2C bus, resulting in low communication efficiency, which cannot meet the needs of high-efficiency data acquisition scenarios, and the timeliness of acquiring key information is also low.

Method used

On the existing communication architecture, one I2C bus is added, and two I2C buses are set up. One is used to send request messages and the other is used to send feedback messages to achieve full-duplex communication. Request messages are classified by a preset priority strategy, and messages with higher priority are communicated first.

Benefits of technology

It improves communication efficiency, meets the needs of high-efficiency data collection scenarios, and enhances the timeliness of obtaining key information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116743668B_ABST
    Figure CN116743668B_ABST
Patent Text Reader

Abstract

The application discloses a data transmission method and device, the data transmission method is applied to a master control end of a data transmission system, the data transmission system comprises at least one master control end and multiple service ends, a first data transmission channel for the master control end to send a request message to the service end and a second data transmission channel for the service end to feed back a message to the master control end, and the method comprises the steps that the master control end sends a first request message to a current communication service end through the first data transmission channel. The technical scheme of the embodiment of the application extends one data transmission channel on the basis of the existing communication architecture, so that the data transmission method of the application comprises two data transmission channels, the first data transmission channel is only responsible for sending a request message, the second data transmission channel is only responsible for feeding back a reply message, a full-duplex communication mode is realized, the communication efficiency is improved, and the demand of an efficient acquisition scene is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method and apparatus. Background Technology

[0002] BMC stands for Baseboard Manage Controller, an embedded management microcontroller that acts as a manager, overseeing the system's power supply, temperature, voltage, current, and other performance parameters. It can also control the main CPU reset in case of a system crash, thus ensuring the normal operation of the entire system. While many dedicated BMC chips have emerged, in many cases, a microcontroller (MCU) performs this role.

[0003] IPMI stands for Intelligent Platform Management Interface. It specifies the interface through which the BMC manages the aforementioned power, temperature, voltage, current, and other performance parameters. In most implementations, the I2C bus is used to manage this information, thus conforming to the IPMI specification.

[0004] In the existing IPMI architecture, the master control terminal and multiple service terminals are connected together through two signals (SCK, SDA) on one I2C bus, which is a star topology. The BMC master control terminal sends various messages to each service terminal in sequence through the I2C bus, including manufacturer equipment messages, heartbeat messages, temperature reading messages, voltage reading messages, service information messages, alarm information messages, status information messages, etc., and even more detailed down to reading specific information of each chip or key module in each service sub-card.

[0005] However, the existing communication method described above is based on half-duplex mode, which results in low communication efficiency and cannot meet the needs of high-efficiency data collection scenarios. Furthermore, the reporting cycle for critical information and information that needs to be acquired quickly is relatively long. Summary of the Invention

[0006] This invention provides a data transmission method and apparatus to improve communication efficiency and meet the needs of high-efficiency data acquisition scenarios.

[0007] To achieve the above objectives, in a first aspect, the present invention provides a data transmission method applied to a master control terminal of a data transmission system, wherein the data transmission system includes at least one master control terminal and multiple service terminals, as well as a first data transmission channel for the master control terminal to send request messages to the service terminals and a second data transmission channel for the service terminals to send feedback messages to the master control terminal, the method comprising: the master control terminal sending a first request message to a current communication service terminal through the first data transmission channel; the master control terminal receiving a first feedback message from the current communication service terminal through the second data transmission channel; wherein the first feedback message is generated by the current communication service terminal based on the first request message.

[0008] In one embodiment of the present invention, after the master control terminal sends a first request message to the current communication service terminal through the first data transmission channel, the method further includes: the master control terminal sending a subsequent request message to the current communication service terminal through the first data transmission channel; wherein the time period occupied by the master control terminal sending the subsequent request message to the current communication service terminal through the first data transmission channel overlaps or partially overlaps with the time period occupied by the current communication service terminal replying to the master control terminal with the first feedback message and / or subsequent feedback message through the second data transmission channel.

[0009] In one embodiment of the present invention, the data transmission method further includes: confirming that the master control terminal has completed all communication with the current communication service terminal; and re-determining one service terminal among multiple service terminals as the current communication service terminal.

[0010] In one embodiment of the present invention, before the master control terminal sends a first request message to the current communication service terminal through the first data transmission channel, the method further includes: determining the current communication service terminal among multiple service terminals; wherein, the method for determining the current communication service terminal among multiple service terminals includes: determining the priority of each service terminal; and determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal.

[0011] In one embodiment of the present invention, the method for determining the priority of each business terminal is as follows: generating the priority of each business terminal according to a preset priority strategy; wherein, the preset priority strategy includes at least one of the following dimensions: the urgency of the request message and the length of the request message.

[0012] In one embodiment of the present invention, the method for determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal is as follows: obtaining the priority of each service terminal, determining the service terminal with the first priority as the current communication service terminal; wherein, when multiple service terminals all have the first priority, obtaining the slot number of the multiple service terminals, determining the service terminal with the first slot number as the current communication service terminal.

[0013] In one embodiment of the present invention, the data transmission method further includes the following steps: the master control terminal sends the last request message of this communication to the current communication service terminal; the master control terminal waits for a preset time; and the master control terminal sends a second request message to the newly determined current communication service terminal.

[0014] Secondly, the present invention provides a data transmission method applied to a service end of a data transmission system, wherein the data transmission system includes at least one master control end and multiple service ends, as well as a first data transmission channel for the service ends to receive request messages sent by the master control end and a second data transmission channel for the service ends to send feedback messages to the master control end. The method includes: the current communication service end receiving a first request message sent by the master control end through the first data transmission channel; the current communication service end generating a first feedback message based on the first request message; and the current communication service end sending the first feedback message to the master control end through the second data transmission channel.

[0015] In one embodiment of the present invention, after the current communication service terminal receives the first request message sent by the master control terminal through the first data transmission channel, the method further includes: the current communication service terminal receiving a subsequent request message sent by the master control terminal through the first data transmission channel; wherein the time period occupied by the current communication service terminal receiving the subsequent request message sent by the master control terminal through the first data transmission channel overlaps or partially overlaps with the time period occupied by the current communication service terminal replying to the master control terminal with the first feedback message and / or subsequent feedback message through the second data transmission channel.

[0016] In one embodiment of the present invention, before the current communication service terminal receives the first request message sent by the master control terminal through the first data transmission channel, the method further includes: determining the current communication service terminal among multiple service terminals; wherein, the method for determining the current communication service terminal among multiple service terminals includes: determining the priority of each service terminal; and determining the service terminal with the highest priority among the multiple service terminals as the current communication service terminal.

[0017] Thirdly, the present invention provides a data transmission device applied to the master control terminal of a data transmission system, wherein the data transmission system includes at least one master control terminal and multiple service terminals, and a first data transmission channel for the master control terminal to send a request message to the service terminals and a second data transmission channel for the service terminals to send a feedback message to the master control terminal. The device includes a data sending module and a first data receiving module. The data sending module is used by the master control terminal to send a first request message to the current communication service terminal through the first data transmission channel; and the first data receiving module is used by the master control terminal to receive a first feedback message from the current communication service terminal through the second data transmission channel; wherein the first feedback message is generated by the current communication service terminal based on the first request message.

[0018] Fourthly, the present invention provides a data transmission device applied to a service terminal of a data transmission system, wherein the data transmission system includes at least one master control terminal and multiple service terminals, and a first data transmission channel for the service terminals to receive request messages sent by the master control terminal and a second data transmission channel for the service terminals to send feedback messages to the master control terminal. The device includes: a second data receiving module, a data generating module, and a data feedback module. The second data receiving module is used for the current communication service terminal to receive the first request message sent by the master control terminal through the first data transmission channel; the data generating module is used for the current communication service terminal to generate a first feedback message based on the first request message; and the data feedback module is used for the current communication service terminal to send the first feedback message back to the master control terminal through the second data transmission channel.

[0019] Fifthly, the present invention provides an electronic device including at least one processor and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, which, when executed, enable the at least one processor to perform a data transmission method according to any embodiment of the present invention.

[0020] In a sixth aspect, the present invention provides a computer-readable storage medium including a computer program and instructions, which, when executed on a computer, cause the computer to perform a data transmission method according to any embodiment of the present invention.

[0021] The technical solution of this invention sets up two I2C buses, one for sending request messages and the other for sending feedback messages, thereby achieving full-duplex communication and improving communication efficiency to meet the needs of high-efficiency data acquisition scenarios. By classifying request messages through a preset priority strategy, messages with higher priority are communicated first, thereby improving the timeliness of message acquisition and meeting the needs of the master control end. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the existing IPMI architecture;

[0023] Figure 2 This is a schematic diagram of the existing half-duplex communication method of the I2C bus based on the IPMI architecture;

[0024] Figure 3 This is a flowchart of a data transmission method according to Embodiment 1 of the present invention;

[0025] Figure 4 This is a schematic diagram of the full-duplex communication mode of two I2C buses in Embodiment 1 of the present invention;

[0026] Figure 5 This is a schematic diagram of the structure of a data transmission system according to Embodiment 1 of the present invention;

[0027] Figure 6 This is a flowchart of a data transmission method according to Embodiment 2 of the present invention;

[0028] Figure 7 This is a flowchart of a data transmission method according to Embodiment 3 of the present invention;

[0029] Figure 8 This is a schematic diagram of the structure of a data transmission device according to Embodiment 4 of the present invention;

[0030] Figure 9 This is a schematic diagram of the structure of a data transmission device according to Embodiment 5 of the present invention;

[0031] Figure 10 This is a schematic diagram of the structure of an electronic device according to Embodiment Six of the present invention. Detailed Implementation

[0032] The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and not intended to limit the scope of the invention. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the embodiments of the present invention, and not all structures.

[0033] To facilitate understanding, the main implementation concepts of the various embodiments of the present invention will be briefly described first.

[0034] IPMI stands for Intelligent Platform Management Interface. It is an industry standard for managing peripheral devices used in Intel-based enterprise systems. This standard was developed by companies such as Intel, HP, NEC, Dell, and SuperMicro. Users can use IPMI to monitor the physical health characteristics of servers, such as temperature, voltage, fan status, and power supply status.

[0035] At the core of IPMI is a dedicated chip / controller (called a server processor or baseboard management controller (BMC)). It operates independently of the server's processor, BIOS, or operating system, functioning as a separate, agentless management subsystem. It only requires the BMC and IPMI firmware to function. The BMC is typically a separate board mounted on the server motherboard, although some server motherboards provide IPMI support. IPMI's strong autonomy overcomes the limitations of traditional operating system-based management methods; for example, it can still perform power-on / off and information retrieval operations even when the operating system is unresponsive or unloaded. During operation, all IPMI functions are accomplished by sending commands to the BMC using instructions defined in the IPMI specification. The BMC receives these commands, records event messages in the system event log, and maintains sensor data records describing the status of sensors in the system. In simple terms, the BMC is the overall manager of the server board. From the moment a server powers on, all its components are managed and controlled by the BMC.

[0036] Having discovered the technical deficiencies described in the background section, the inventors sought a way to improve or upgrade existing communication architectures without disrupting them. Based on this, the inventors creatively proposed a data transmission method and apparatus for achieving full-duplex communication by setting up two data transmission channels (extending one channel) on top of an existing device system. Both data transmission channels are I2C buses.

[0037] Specifically, such as Figure 1 As shown, Figure 1 The N service terminals and the master control terminal are all connected together via two signals (SCK and SDA) on the I2C bus, forming a star topology. The BMC master control terminal sends various message packets to each service terminal sequentially via the I2C bus, including manufacturer equipment packets, heartbeat packets, temperature reading packets, voltage reading packets, service information packets, alarm information packets, status information packets, etc. It can even be further subdivided to read specific information of each chip or key module within each service terminal. Therefore, the amount of communication is generally selected reasonably according to the actual application.

[0038] Figure 1 This is a commonly used architecture, where information is collected by the master control terminal polling each service terminal sequentially. Existing multi-slot BMC systems include a master control terminal and multiple service terminals corresponding to service slots. Most service terminals and the master control terminal manage IPMI information via I2C. The BMC master control terminal sends and receives information from each service terminal through two I2C signal lines.

[0039] like Figure 2 As shown, when the master control terminal collects information from the business terminals, it uses a half-duplex working mode to poll each business terminal sequentially. That is, after the master control terminal sends a message to a business terminal, it needs to receive a reply to message 1 before sending message 2, and then receive a reply to message 2 before sending message 3, and so on, until the business terminal has sent all of message n and received a reply to message n before it can collect information from the next business terminal 2. Assuming that each message has the same length, the total time consumed by a business terminal in this communication method is (t1+t2)*n, where t1 is the time spent sending the message and t2 is the time spent sending the reply message. Obviously, this information collection method has low communication efficiency and is difficult to meet the requirements of efficient collection scenarios. Furthermore, suppose the master control terminal urgently needs to obtain the manufacturer information of the last slot's business terminal. Since the master control terminal uses a half-duplex mode to poll each business terminal sequentially, the messages returned by the multiple business terminals in the slots before the last slot are all long messages. Therefore, by the time the master control terminal polls the last slot's business terminal, a long communication time has already elapsed before it can finally obtain the manufacturer information of the last slot. In other words, the reporting cycle for the key information or information that the master control terminal needs to obtain or needs to obtain quickly is relatively long, and the timeliness is low, which cannot meet the needs of the master control terminal.

[0040] In order to address the technical problems existing in the prior art, such as the low communication efficiency caused by the half-duplex communication of the existing IPMI architecture via the I2C bus, which fails to meet the requirements of high-efficiency data acquisition scenarios, and the long reporting cycle for acquiring key information and information that needs to be acquired quickly, which results in low timeliness of message acquisition and fails to meet the requirements of the master control end, the inventors of this invention have, through creative work, obtained a data transmission method and device of this invention.

[0041] The data transmission method and apparatus of this invention extend the original communication architecture with an additional I2C bus. By setting up two I2C buses—one for sending request messages and the other for sending feedback messages—full-duplex communication is achieved, thereby improving communication efficiency and meeting the needs of high-efficiency data acquisition scenarios. Furthermore, by classifying request messages through a preset priority strategy, higher-priority messages are communicated first, improving the timeliness of message acquisition and thus meeting the requirements of the master control end.

[0042] Example 1

[0043] Figure 3 This is a schematic flowchart of a data transmission method according to an embodiment of the present invention. Figure 5 This is a schematic diagram of a data transmission system according to Embodiment 1 of the present invention. Figure 3 and Figure 5As shown, Embodiment 1 provides a data transmission method applied to a data transmission system, wherein the data transmission system includes at least one master control terminal 1 and multiple service terminals 2, as well as a first data transmission channel 3 (solid line) for the master control terminal 1 to send request messages to the service terminals 2 and a second data transmission channel 4 (dashed line) for the service terminals 2 to send feedback messages to the master control terminal 1.

[0044] Specifically, such as Figure 5 As shown, the data transmission system used in the data transmission method provided in this embodiment includes a master control terminal 1 and multiple service terminals 2. The master control terminal 1 communicates with the multiple service terminals 2 through a first data transmission channel 3 and a second data transmission channel 4, respectively. Both the first data transmission channel 3 and the second data transmission channel 4 are I2C buses; that is, the first data transmission channel 3 is the first I2C bus, and the second data transmission channel 4 is the second I2C bus. Both the first and second I2C buses have an SCL (clock line) and an SDA (data line). The clock line is used to transmit the CLK (clock) signal and is the channel through which the master control terminal 1 provides the clock to the multiple service terminals 2. The data line is used for communication data. When the master control terminal 1 communicates with the multiple service terminals 2, the communication is initiated and dominated by the master control terminal 1. The multiple service terminals 2 passively accept the communication from the master control terminal 1 according to the I2C protocol and respond promptly. Only one pair of devices can transmit communication information on the I2C bus at a time, so only one service terminal 2 can communicate with the master control terminal 1 at any given time; the other service terminals are in a "dormant" state. Each service terminal 2 has an I2C service terminal address during communication. The I2C bus has two states: idle (all service terminals 2 are not communicating with master terminal 1, the bus is idle) and busy (one service terminal 2 is communicating with master terminal 1, the bus is occupied by this pair). SDA and SCL may be high simultaneously during communication, but if SDA and SCL are high for several consecutive cycles, the bus is definitely in an idle state. During I2C bus data transmission, data sent to SDA is in bytes, each byte must be 8 bits, and the most significant bit (MSB) is first, followed by the least significant bit (LSB). The number of bytes sent each time is unlimited. The first and second data transmission channels described above can be not only I2C buses but also other types of data buses; this embodiment is not limited to these.

[0045] Example 1 provides a data transmission method including:

[0046] Step S110: The master control terminal sends a first request message to the current communication service terminal through the first data transmission channel;

[0047] Specifically, at least one master control terminal is a master control board, while multiple service terminals are multiple service boards. The master control terminal and the multiple service terminals communicate through a first data transmission channel, which is used solely by the master control terminal to send first request messages to the multiple service terminals; that is, it is unidirectional communication. This first data transmission channel is a first I2C bus, which is only responsible for sending request messages. Specifically, the first request message can be a manufacturer's equipment message, a heartbeat message, a temperature read message, a voltage read message, a service information message, an alarm information message, a status information message, etc.

[0048] Step S120: The current communication service terminal receives the first request message and generates a first feedback message based on the first request message;

[0049] Specifically, the current communication service receives a first request message through the first I2C bus, and then generates a first feedback message based on the received first request message. For example, the master control end sends a first request message requesting to obtain the voltage information of the current communication service, and after receiving the first request message, the current communication service generates a first feedback message containing the voltage information.

[0050] Step S130: The current communication service terminal sends a first feedback message to the main control terminal through the second data transmission channel.

[0051] Specifically, the current communication service terminal generates a first feedback message and sends it back to the master control terminal through a second data transmission channel. This second data transmission channel is solely used for the current communication service terminal to send the first feedback message to the master control terminal, constituting a one-way communication transmission. This second data transmission channel is a second I2C bus, which is only responsible for sending the feedback message generated by the service terminal back to the master control terminal.

[0052] Based on the above analysis, it can be seen that the present invention extends the existing communication architecture by adding one I2C bus, so that the present invention includes two I2C buses, including a first I2C bus that is only responsible for sending request messages and a second I2C bus that is only responsible for sending response messages, thereby realizing a full-duplex communication mode and improving communication efficiency.

[0053] In this embodiment, after the master control terminal sends a first request message to the current communication service terminal through the first data transmission channel, it further includes: the master control terminal sending a subsequent request message to the current communication service terminal through the first data transmission channel; wherein, the time period occupied by the master control terminal sending the subsequent request message to the current communication service terminal through the first data transmission channel overlaps or partially overlaps with the time period occupied by the current communication service terminal replying to the master control terminal with the first feedback message and / or subsequent feedback message through the second data transmission channel.

[0054] Specifically, after the master control terminal sends a first request message to the currently communicating service terminal via the first I2C bus, it can directly continue sending subsequent request messages to the currently communicating service terminal without waiting for the first feedback message from the service terminal. This allows the time periods occupied by subsequent request messages and the first and / or subsequent feedback messages to overlap or partially overlap. Here, there can be multiple subsequent feedback messages, and the overlap may occur in various ways. The first I2C bus is configured so that the master control terminal can continuously send request messages to a specific service terminal without waiting for a response (feedback message) for each request message before sending the next. The second I2C bus is configured so that after receiving a request message from the master control terminal, the service terminal sends (generates) a corresponding feedback message for each request message. That is, while the master control terminal is sending the second request message, the service terminal will send back the first feedback message for the first request message to the master control terminal. Assuming all messages have the same length, the time it takes for the master end to send a request message is t1, and the time it takes for the service end to reply with a feedback message is t2. Therefore, the time for one message communication is t1 + t2. Thus, the total time for n messages from the same service end is (t1 + t2) * n. If the full-duplex communication method of this invention is used, the approximate time is t1 * n + t2, where n > 1, and t2 refers to the time spent waiting for the last feedback message. Therefore, the full-duplex communication method of this invention reduces the time by approximately (n - 1) * t2, thus improving communication efficiency.

[0055] Based on the above analysis, it can be seen that the present invention adopts a full-duplex communication mode. While the master control end sends the second request message, the current communication service end will send back the reply information (first feedback message) to the master control end in response to the first request message. Assuming that all messages have the same length, the data collection time of the master control end for each service end becomes t1*n+t2, saving (n-1)*t2, which greatly improves the communication efficiency and meets the needs of high-efficiency data collection scenarios.

[0056] In this embodiment, before the master control terminal sends the first request message to the current communication service terminal through the first data transmission channel, the method further includes: determining the current communication service terminal among multiple service terminals; wherein, the method for determining the current communication service terminal among multiple service terminals includes: determining the priority of each service terminal; and determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal.

[0057] Specifically, before the master control terminal communicates with multiple service terminals through the first I2C bus and the second I2C bus, the master control terminal needs to poll multiple service terminals to determine the priority of each service terminal, and then determine the service terminal with the highest priority as the first service terminal to communicate (the current communication service terminal).

[0058] Based on the above analysis, it can be seen that before the main control terminal communicates with multiple service terminals, the priority of each service terminal needs to be determined so that subsequent communication with each service terminal can be carried out in order of priority. This can avoid the situation of communication chaos between the main control terminal and multiple service terminals. Furthermore, the conditions for judging priority can be defined according to customer needs, thereby better meeting user needs.

[0059] In this embodiment, the data transmission method further includes: confirming that the master control terminal has completed all communication with the current communication service terminal; and re-determining one service terminal among multiple service terminals as the current communication service terminal.

[0060] Specifically, the master control terminal includes a termination flag in its last request message after sending all request messages to the current communication service. Once the master control terminal sends this termination flag, it confirms the completion of all communication with the current communication service. At this point, the master control terminal, based on the priority of the remaining services, identifies the service with the highest priority as the current communication service, and communication can then commence with that service. After sending the last request message to the current communication service, the master control terminal waits a preset time before sending request messages to the next service. This preset time is sufficient to ensure the receipt of all feedback messages. The process of re-determining a service provider among multiple service providers includes considering the previous service provider. This can be divided into two scenarios: First, when the master control unit confirms completion of all communication with the current service provider, it re-determines a service provider through polling. In this case, if the previous service provider has the highest priority, it remains the current service provider. Second, when the master control unit confirms completion of all communication with the current service provider, it re-determines a service provider through polling. In this case, if the previous service provider does not have the highest priority, the master control unit selects the service provider with the highest priority as the current service provider.

[0061] If all request and feedback messages take the same amount of time to transmit, the preset time is at least the transmission time of one feedback message (i.e., the transmission time of the data content requested by the last request message).

[0062] For cases where the transmission times for request messages and feedback messages are not exactly the same, the preset time is obtained by calculating the difference between the total transmission time of the feedback information and the total transmission time of all request messages after the second request message. Specifically, let the transmission time of each request message be t. 11 t 12 t 13 t 14 ...t 1n Let t be the transmission time of the feedback message corresponding to each request message.21 t 22 t 23 t 24 ...t 2n The preset time is at least (t) 21 +t 22 +……+t 2n )-(t 12 +t 13 +……t 1n ).

[0063] If the master control terminal does not receive a feedback message from the current communication service terminal within a preset time, the master control terminal will record the service terminal as abnormal, but will still continue to send a request message to the next service terminal; if the master control terminal receives a feedback message from the current communication service terminal within a preset time, it will continue to send a request message to the next service terminal.

[0064] Based on the above analysis, it can be seen that when the master control end completes communication with the current communication service end (after the master control end sends a request message with a termination marker), it waits for a preset time before sending a request message to the next service end, regardless of whether a feedback message is received, thereby further improving communication efficiency.

[0065] In this embodiment, the method for determining the priority of each service terminal is as follows: generate the priority of each service terminal according to a preset priority strategy.

[0066] Specifically, before the main control terminal communicates with multiple business terminals, it is necessary to generate the priority of each business terminal according to the preset priority strategy and sort them for subsequent use.

[0067] Based on the above analysis, it can be seen that before the main control terminal communicates with multiple service terminals, the present invention first determines the first service terminal to communicate with according to a preset priority strategy, thereby further improving the timeliness of customers obtaining messages and thus meeting different customer needs.

[0068] In this embodiment, the method for determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal is as follows: obtain the priority of each service terminal, determine the service terminal with the first priority as the current communication service terminal; wherein, when multiple service terminals all have the first priority, obtain the slot number of multiple service terminals, determine the service terminal with the first slot number as the current communication service terminal.

[0069] Specifically, after the master control terminal obtains the priority of each service terminal, it sorts them and selects the service terminal with the highest priority as the current communication service terminal. When multiple service terminals have the same priority, the master control terminal sorts them according to the slot number of each service terminal, and the service terminal with the earlier slot number becomes the current communication service terminal.

[0070] Based on the above analysis, it can be seen that after the master control terminal of the present invention obtains the priority of each service terminal, it determines the current communication service terminal for the first communication. If multiple service terminals have the same priority, the slot number of these service terminals will be considered. By combining the priority level with the slot number, the current communication service terminal can be obtained. In addition, after completing communication with a service terminal, the master control terminal will determine the next service terminal to communicate with based on the priority and slot number of the remaining service terminals, thereby further improving the timeliness of customers obtaining messages and thus meeting different customer needs.

[0071] In this embodiment, the preset priority strategy is divided into multiple categories, and each preset priority strategy includes at least one of the following dimensions: the urgency of the request message and the length of the request message.

[0072] Specifically, to further meet users' need for timely access to key information, messages are categorized into four types—"urgent short messages, urgent long messages, non-urgent short messages, and non-urgent long messages"—through a preset priority strategy (as shown in Table 1). When the main control terminal polls each business terminal, it sends urgent short message messages to the business terminal in the first cycle, urgent long messages in the second cycle, non-urgent short messages in the third cycle, and non-urgent long messages in the fourth cycle, thereby accelerating the timeliness of key information acquisition.

[0073] Table 1

[0074] Serial Number Message Classification illustrate 1 Urgent text message The master control unit needs to obtain this information immediately, and the communication time is short. 2 Urgent long message The master control unit needs to obtain this information immediately, but the communication time is long. 3 Non-urgent text messages The master control unit does not need to obtain it immediately, but the communication is short. 4 Non-urgent long message The master control unit does not need to obtain it immediately, but the communication time is long.

[0075] Based on the above analysis, it can be seen that, in order to meet the customer's need for timely access to key information, this invention divides communication messages into four categories through a preset priority strategy: urgent short messages, urgent long messages, non-urgent short messages, and non-urgent long messages. That is to say, as... Figure 4 As shown, in the first cycle, when all slots are polled, an urgent short message is sent first; in the second cycle, an urgent long message is sent; in the third cycle, a non-urgent short message is sent; and finally, in the fourth cycle, a non-urgent long message is sent. This configuration further improves the timeliness of message delivery for customers, thus meeting their diverse needs.

[0076] In this embodiment, the first data transmission channel is a first I2C bus, and the second data transmission channel is a second I2C bus.

[0077] Specifically, this invention extends the existing communication architecture by adding an I2C bus, resulting in two I2C buses: a first I2C bus responsible only for sending requests and a second I2C bus responsible only for sending response messages. This achieves full-duplex communication mode and improves communication efficiency.

[0078] In this embodiment, the data transmission method further includes the following steps: the master control terminal sends the last request message of this communication to the current communication service terminal; the master control terminal waits for a preset time; the master control terminal sends a second request message to the newly determined current communication service terminal.

[0079] Specifically, the aforementioned "current communication" refers to the complete communication process between the master control terminal and the current communication service terminal. That is, the master control terminal sending the last request message of this communication to the current communication service terminal can be understood as: the master control terminal sending the last request message for the current communication service terminal. The aforementioned preset time determination method can adopt a fixed delay, such as 3 seconds; or it can be achieved by calculating the difference between the total transmission time of feedback information and the total transmission time of all request messages after the second request message. Specifically, let the transmission time of each request message be t. 11 t 12 t 13 t 14 ...t 1n Let t be the transmission time of the feedback message corresponding to each request message. 21 t 22 t 23 t 24 ...t 2n The preset time is at least (t) 21 +t 22 +……+t 2n )-(t 12 +t 13 +……t 1n In practical applications, it can be calculated separately for each type of communication service and can be used as an independent parameter for communication delay. That is, it can be pre-calculated and set. When the master control terminal knows the specific communication service to be communicated, it can directly call up the preset communication delay parameter of the communication service for use.

[0080] Example 2

[0081] Figure 6 This is a flowchart of a data transmission method according to Embodiment 2 of the present invention. Figure 6 As shown, Embodiment 2 provides a data transmission method applied to the master control terminal of a data transmission system. The data transmission system includes at least one master control terminal and multiple service terminals, as well as a first data transmission channel for the master control terminal to send request messages to the service terminals and a second data transmission channel for the service terminals to send feedback messages to the master control terminal. The method includes:

[0082] Step S210: The master control terminal sends a first request message to the current communication service terminal through the first data transmission channel;

[0083] Step S220: The master control terminal receives the first feedback message from the current communication service terminal through the second data transmission channel;

[0084] The first feedback message is generated by the current communication service terminal based on the first request message.

[0085] In this embodiment, after the master control terminal sends a first request message to the current communication service terminal through the first data transmission channel, it further includes: the master control terminal sending a subsequent request message to the current communication service terminal through the first data transmission channel; wherein, the time period occupied by the master control terminal sending the subsequent request message to the current communication service terminal through the first data transmission channel overlaps or partially overlaps with the time period occupied by the current communication service terminal replying to the master control terminal with the first feedback message and / or subsequent feedback message through the second data transmission channel.

[0086] In this embodiment, before the master control terminal sends the first request message to the current communication service terminal through the first data transmission channel, the method further includes: determining the current communication service terminal among multiple service terminals; wherein, the method for determining the current communication service terminal among multiple service terminals includes: determining the priority of each service terminal; and determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal.

[0087] In this embodiment, the data transmission method further includes: confirming that the master control terminal has completed all communication with the current communication service terminal. Then, among multiple service terminals, a new service terminal is determined as the current communication service terminal.

[0088] In this embodiment, the method for determining the priority of each service terminal is as follows: generate the priority of each service terminal according to a preset priority strategy.

[0089] In this embodiment, the method for determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal is as follows: obtain the priority of each service terminal, determine the service terminal with the first priority as the current communication service terminal; wherein, when multiple service terminals all have the first priority, obtain the slot number of multiple service terminals, determine the service terminal with the first slot number as the current communication service terminal.

[0090] In this embodiment, the preset priority strategy includes at least one of the following dimensions: the urgency of the request message and the length of the request message.

[0091] In this embodiment, the data transmission method further includes the following steps: the master control terminal sends the last request message of this communication to the current communication service terminal; the master control terminal waits for a preset time; the master control terminal sends a second request message to the newly determined current communication service terminal.

[0092] Example 3

[0093] Figure 7 This is a flowchart of a data transmission method according to Embodiment 3 of the present invention. Figure 7 As shown, Embodiment 3 provides a data transmission method applied to the service end of a data transmission system. The data transmission system includes at least one master control terminal and multiple service terminals, as well as a first data transmission channel for the service terminals to receive request messages sent by the master control terminal and a second data transmission channel for the service terminals to send feedback messages to the master control terminal. The method includes:

[0094] Step S310: The current communication service terminal receives the first request message sent by the master control terminal through the first data transmission channel;

[0095] Step S320: The current communication service terminal generates a first feedback message based on the first request message;

[0096] Step S330: The current communication service terminal sends the first feedback message to the main control terminal through the second data transmission channel.

[0097] In this embodiment, after the current communication service terminal receives the first request message sent by the master control terminal through the first data transmission channel, the method further includes: the current communication service terminal receiving subsequent request messages sent by the master control terminal through the first data transmission channel. The time period occupied by the current communication service terminal receiving subsequent request messages sent by the master control terminal through the first data transmission channel overlaps or partially overlaps with the time period occupied by the current communication service terminal replying to the master control terminal with the first feedback message and / or subsequent feedback messages through the second data transmission channel.

[0098] In this embodiment, before the current communication service terminal receives the first request message sent by the master control terminal through the first data transmission channel, the method further includes: determining the current communication service terminal among multiple service terminals; wherein, the method for determining the current communication service terminal among multiple service terminals includes: determining the priority of each service terminal; and determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal.

[0099] In this embodiment, the data transmission method further includes: confirming that the master control terminal has completed all communication with the current communication service terminal; and re-determining one service terminal among multiple service terminals as the current communication service terminal.

[0100] In this embodiment, the method for determining the priority of each service terminal is as follows: generate the priority of each service terminal according to a preset priority strategy.

[0101] In this embodiment, the method for determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal is as follows: obtain the priority of each service terminal, determine the service terminal with the first priority as the current communication service terminal; wherein, when multiple service terminals all have the first priority, obtain the slot number of multiple service terminals, determine the service terminal with the first slot number as the current communication service terminal.

[0102] In this embodiment, the preset priority strategy is divided into multiple categories, and each preset priority strategy includes at least one of the following dimensions: the urgency of the request message and the length of the request message.

[0103] In this embodiment, the data transmission method further includes the following steps: the current communication service terminal receives the last request message of this communication sent by the master control terminal; the master control terminal waits for a preset time; and the master control terminal sends a second request message to the newly determined current communication service terminal.

[0104] Example 4

[0105] Figure 8 This is a schematic diagram of the structure of a data transmission device according to Embodiments 4 and 5 of the present invention. Figure 8 As shown in Embodiment 4, a data transmission device is provided, applied to the master control terminal of a data transmission system. The data transmission system includes at least one master control terminal and multiple service terminals, as well as a first data transmission channel for the master control terminal to send request messages to the service terminals and a second data transmission channel for the service terminals to send feedback messages to the master control terminal. The device includes a data sending module 801 and a first data receiving module 802. The data sending module 801 is used by the master control terminal to send a first request message to the current communication service terminal through the first data transmission channel; and the first data receiving module 802 is used by the master control terminal to receive a first feedback message from the current communication service terminal through the second data transmission channel; wherein, the first feedback message is generated by the current communication service terminal based on the first request message.

[0106] In this embodiment, after the master control terminal sends a first request message to the current communication service terminal through the first data transmission channel, it further includes: the master control terminal sending a second request message to the current communication service terminal through the first data transmission channel.

[0107] In this embodiment, before the master control terminal sends the first request message to the current communication service terminal through the first data transmission channel, the method further includes: determining the current communication service terminal among multiple service terminals; wherein, the method for determining the current communication service terminal among multiple service terminals includes: determining the priority of each service terminal; and determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal.

[0108] In this embodiment, it also includes: confirming that the master control terminal has completed all communication with the current communication service terminal; and re-determining one service terminal among multiple service terminals as the current communication service terminal.

[0109] In this embodiment, the method for determining the priority of each service terminal is as follows: generate the priority of each service terminal according to a preset priority strategy.

[0110] In this embodiment, determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal involves: obtaining the priority of each service terminal, determining the service terminal with the first priority as the current communication service terminal; wherein, when multiple service terminals all have the first priority, obtaining the slot number of multiple service terminals, determining the service terminal with the first slot number as the current communication service terminal.

[0111] In this embodiment, the preset priority strategy is divided into multiple categories, and each preset priority strategy includes at least one of the following dimensions: the urgency of the request message and the length of the request message.

[0112] In this embodiment, the data transmission method further includes the following steps: the master control terminal sends the last request message of this communication to the current communication service terminal; the master control terminal waits for a preset time; the master control terminal sends a second request message to the newly determined current communication service terminal.

[0113] Example 5

[0114] Figure 9 This is a schematic diagram of the structure of a data transmission device according to Embodiments 4 and 5 of the present invention. Figure 9 As shown in Embodiment 5, a data transmission device is provided, applied to the service end of a data transmission system. The data transmission system includes at least one master control terminal and multiple service terminals, as well as a first data transmission channel for the service terminals to receive request messages sent by the master control terminal and a second data transmission channel for the service terminals to send feedback messages to the master control terminal. The device includes: a second data receiving module 901, a data generation module 902, and a data feedback module 903. The second data receiving module 901 is used for the current communication service terminal to receive the first request message sent by the master control terminal through the first data transmission channel; the data generation module 902 is used for the current communication service terminal to generate a first feedback message based on the first request message; and the data feedback module 903 is used for the current communication service terminal to send the first feedback message back to the master control terminal through the second data transmission channel.

[0115] In this embodiment, after the master control terminal sends a first request message to the current communication service terminal through the first data transmission channel, it further includes: the master control terminal sending a second request message to the current communication service terminal through the first data transmission channel.

[0116] In this embodiment, before the master control terminal sends the first request message to the current communication service terminal through the first data transmission channel, the method further includes: determining the current communication service terminal among multiple service terminals; wherein, the method for determining the current communication service terminal among multiple service terminals includes: determining the priority of each service terminal; and determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal.

[0117] In this embodiment, it also includes: confirming that the master control terminal has completed all communication with the current communication service terminal; and re-determining one service terminal among multiple service terminals as the current communication service terminal.

[0118] In this embodiment, the method for determining the priority of each service terminal is as follows: generate the priority of each service terminal according to a preset priority strategy.

[0119] In this embodiment, the method for determining the service terminal with the highest priority among multiple service terminals as the current communication service terminal is as follows: obtain the priority of each service terminal, determine the service terminal with the first priority as the current communication service terminal; wherein, when multiple service terminals all have the first priority, obtain the slot number of multiple service terminals, determine the service terminal with the first slot number as the current communication service terminal.

[0120] In this embodiment, the preset priority strategy is divided into multiple categories, and each preset priority strategy includes at least one of the following dimensions: the urgency of the request message and the length of the request message.

[0121] In this embodiment, the data transmission method further includes the following steps: the master control terminal sends the last request message of this communication to the current communication service terminal; the master control terminal waits for a preset time; the master control terminal sends a second request message to the newly determined current communication service terminal.

[0122] Example 6

[0123] Figure 10 This is a schematic diagram of the structure of an electronic device according to Embodiment Six of the present invention. Figure 10 As shown, Embodiment Six also provides an electronic device 1000, which may include a processor 1001 and a memory 1002.

[0124] Memory 1002 is used to store programs. Memory 1002 may include volatile memory, such as random-access memory (RAM), such as static random-access memory (SRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), etc.; memory may also include non-volatile memory, such as flash memory. Memory 1002 is used to store computer programs (such as application programs, functional modules, etc. that implement the above methods), computer instructions, etc. The computer programs, computer instructions, etc., can be partitioned and stored in one or more memories 1002. Furthermore, the computer programs, computer instructions, data, etc., can be accessed by processor 1001.

[0125] The aforementioned computer programs and instructions can be stored in one or more partitions of memory 1002. Furthermore, the aforementioned computer programs and instructions can be invoked by processor 1001.

[0126] The processor 1001 is configured to execute the computer program stored in the memory 1002 to implement the various steps in the methods described in the above embodiments.

[0127] For details, please refer to the relevant descriptions in the preceding method embodiments.

[0128] The processor 1001 and the memory 1002 can be independent structures or integrated structures. When the processor 1001 and the memory 1002 are independent structures, the memory 1002 and the processor 1001 can be coupled together via the bus 1003.

[0129] The electronic device in this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principle are the same, and will not be repeated here.

[0130] Example 7

[0131] Embodiment 7 also provides a computer-readable storage medium including a computer program and instructions, which, when executed on a computer, cause the computer to perform the data transmission method of any embodiment of the present invention.

[0132] Computer-readable storage media include various media that can store program code, such as USB flash drives, external hard drives, ROM, RAM, magnetic disks, or optical disks.

[0133] This embodiment also provides a computer program product, which includes: a computer program stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the electronic device to perform the solution provided in any of the above embodiments.

[0134] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention disclosure can be executed in parallel, sequentially, or in different orders.

[0135] This document does not impose any restrictions as long as the desired results of the technical solution disclosed in this invention can be achieved.

[0136] In summary, the data transmission method and apparatus of the present invention achieve full-duplex communication by setting up two I2C buses, one for sending request messages and the other for sending feedback messages, thereby improving communication efficiency and meeting the needs of high-efficiency data acquisition scenarios. By classifying request messages through a preset priority strategy, messages with higher priority are communicated first, thereby improving the timeliness of message acquisition and meeting the needs of the master control end.

[0137] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A data transmission method, characterized in that, The method is applied to the master control terminal of a data transmission system, wherein the data transmission system includes at least one master control terminal and multiple service terminals, and a first data transmission channel for the master control terminal to send request messages to the service terminals and a second data transmission channel for the service terminals to send feedback messages to the master control terminal, the method comprising: The master control terminal sends a first request message to the current communication service terminal through the first data transmission channel; The master control terminal receives the first feedback message from the current communication service terminal through the second data transmission channel; The first feedback message is generated by the current communication service terminal based on the first request message; Before the master control terminal sends the first request message to the current communication service terminal through the first data transmission channel, it further includes: The current communication service terminal is determined from the plurality of service terminals; The method for determining the current communication service terminal among the plurality of service terminals includes: Determine the priority of each of the aforementioned business units; The service terminal with the highest priority among the multiple service terminals is determined as the current communication service terminal; The method for determining the highest-priority service among multiple service terminals as the current communication service terminal is as follows: Obtain the priority of each of the service terminals, and determine the service terminal with the first priority as the current communication service terminal; Wherein, when multiple service terminals have the first priority, the slot number of the multiple service terminals is obtained, and the service terminal with the first slot number is determined as the current communication service terminal; The method further includes the following steps: The master control terminal sends the last request message of this communication to the current communication service terminal; The main control terminal waits for a preset time; The master control terminal sends a second request message to the newly determined current communication service terminal.

2. The data transmission method as described in claim 1, characterized in that, After the master control terminal sends a first request message to the current communication service terminal through the first data transmission channel, it also includes: The master control terminal sends a subsequent request message to the current communication service terminal through the first data transmission channel; The time period occupied by the master control terminal sending the subsequent request message to the current communication service terminal through the first data transmission channel overlaps or partially overlaps with the time period occupied by the current communication service terminal replying to the master control terminal with the first feedback message and / or subsequent feedback message through the second data transmission channel.

3. The data transmission method as described in claim 1, characterized in that, Also includes: Confirm that the main control terminal has completed all communication with the current communication service terminal; Among the multiple service terminals, one service terminal is re-determined as the current communication service terminal.

4. The data transmission method as described in claim 1, characterized in that, The method for determining the priority of each business terminal is as follows: generate the priority of each business terminal according to a preset priority strategy; The preset priority strategy includes at least one of the following dimensions: the urgency of the request message and the length of the request message.

5. A data transmission method, characterized in that, The method is applied to a service terminal of a data transmission system, wherein the data transmission system includes at least one master control terminal and multiple service terminals, as well as a first data transmission channel for the service terminals to receive request messages sent by the master control terminal and a second data transmission channel for the service terminals to send feedback messages to the master control terminal, the method comprising: The current communication service terminal receives the first request message sent by the master control terminal through the first data transmission channel; The current communication service terminal generates a first feedback message based on the first request message; The current communication service terminal sends the first feedback message back to the main control terminal through the second data transmission channel; Wherein, after the current communication service terminal receives the first request message sent by the master control terminal through the first data transmission channel, it further includes: The current communication service terminal receives subsequent request messages sent by the master control terminal through the first data transmission channel; The time period occupied by the current communication service terminal receiving the subsequent request message sent by the master control terminal through the first data transmission channel overlaps or partially overlaps with the time period occupied by the current communication service terminal replying to the master control terminal with the first feedback message and / or subsequent feedback message through the second data transmission channel. Before the current communication service terminal receives the first request message sent by the master control terminal through the first data transmission channel, it further includes: The current communication service terminal is determined from the plurality of service terminals; The method for determining the current communication service terminal among the plurality of service terminals includes: Determine the priority of each of the aforementioned business units; The service terminal with the highest priority among the multiple service terminals is determined as the current communication service terminal.

6. A data transmission device, characterized in that, Based on the data transmission method according to any one of claims 1-4, the apparatus is applied to the master control terminal of a data transmission system, wherein the data transmission system includes at least one master control terminal and multiple service terminals, and a first data transmission channel for the master control terminal to send request messages to the service terminals and a second data transmission channel for the service terminals to send feedback messages to the master control terminal, the apparatus comprising: The data transmission module is used to send a first request message from the main control terminal to the current communication service terminal through the first data transmission channel; and The first data receiving module is used for the main control terminal to receive the first feedback message fed back by the current communication service terminal through the second data transmission channel; The first feedback message is generated by the current communication service terminal based on the first request message.

7. A data transmission device, characterized in that, Based on the data transmission method as described in claim 5, the apparatus is applied to a service terminal of a data transmission system, wherein the data transmission system includes at least one master control terminal and multiple service terminals, and a first data transmission channel for the service terminal to receive a request message sent by the master control terminal and a second data transmission channel for the service terminal to send a feedback message to the master control terminal, the apparatus comprising: The second data receiving module is used to receive the first request message sent by the master control terminal through the first data transmission channel at the current communication service terminal. The data generation module is used by the current communication service terminal to generate a first feedback message based on the first request message; The data feedback module is used by the current communication service terminal to send the first feedback message back to the main control terminal through the second data transmission channel.

8. An electronic device, characterized in that, include: At least one processor; as well as A memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the data transmission method according to any one of claims 1-5.

9. A computer-readable storage medium, characterized in that, It includes computer programs and instructions that, when run on a computer, cause the computer to perform the data transmission method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Enhanced bus architecture for posted read operation between masters and slaves

    US6807593B1