Bus communication system and method, electronic equipment and storage medium

By adding a forwarding layer in the LPC bus communication system and dynamically selecting the target communication module, the problem of low resource utilization of the LPC bus communication module is solved, and communication efficiency is improved and BMC chip resources is effectively utilized.

CN120448131AInactive Publication Date: 2025-08-08SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510874696.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The resource utilization rate of the LPC bus communication module is low, resulting in a decrease in communication efficiency.

Method used

A forwarding layer is added between the application layer and the driving layer, and the target communication module is dynamically selected based on the service type and the remaining amount of communication modules to avoid excessive occupation or idleness of a single communication module.

Benefits of technology

It improves the resource utilization rate of the LPC bus communication module, improves communication efficiency, and effectively utilizes existing BMC chip resources, expanding the scope of application of BMC chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448131A_ABST
    Figure CN120448131A_ABST
Patent Text Reader

Abstract

The invention discloses a bus communication system and method, electronic equipment and a storage medium, and relates to the technical field of computers, a forwarding layer is additionally arranged between an application layer and a driving layer, and a target communication module is dynamically selected based on a service type and communication module surplus, so that a single communication module is prevented from being excessively occupied or idle. Therefore, the technical problem of low resource utilization rate of the communication module of the LPC bus in the prior art can be solved, and the technical effect of improving the communication efficiency of the LPC bus is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a bus communication system, method, electronic device, and storage medium. Background Art

[0002] The server baseboard management controller (BMC), an independent system, is primarily responsible for hardware monitoring, upgrades, and management of servers and other computer systems. The BMC primarily communicates in-band with the host via the Low Pin Count (LPC) bus. Currently, multiple in-band communication modes exist based on the LPC bus.

[0003] In related technologies, each in-band communication mode on the LPC bus needs to be implemented based on a corresponding communication module. Since the number of communication modules used to implement each in-band communication mode on the LPC bus varies, during in-band communication between the BMC and the host, some communication modules often have insufficient remaining resources, while others have a large amount of remaining resources. This reduces the utilization rate of LPC bus communication resources and also reduces the communication efficiency of the LPC bus. Summary of the Invention

[0004] The present application provides a bus communication system, method, electronic device and storage medium to at least solve the problem in the related art that the utilization rate of LPC bus communication resources is reduced and the communication efficiency of the LPC bus is also reduced.

[0005] The present application provides a bus communication system, comprising: a host-side forwarding layer, a bus driver layer, and a peer-side forwarding layer; wherein the bus driver layer includes multiple communication modules; The host-side forwarding layer is used to receive the host-side service message sent by the host process, and select the target communication module corresponding to the host-side service message in the bus driver layer according to the service type of the host-side service message and the remaining amount of each communication module in the bus driver layer; The bus driver layer is used to transmit the host-side service message to the peer forwarding layer through the target communication module; The peer forwarding layer is used to receive the host-side service message transmitted by the target communication module and send the host-side service message to the corresponding target peer process; The host-side service message includes a host-side service request and a host-side service response.

[0006] The present application also provides a bus communication method, comprising: Receive host-side service messages sent by the host process; According to the service type of the host-side service message and the remaining capacity of each communication module in the bus driver layer, the target communication module corresponding to the host-side service message is selected in the bus driver layer; Transmit the host-side service message to the target peer process through the target communication module; The host-side service message includes a host-side service request and a host-side service response.

[0007] The present application also provides a bus communication device, comprising: Receiving module, receiving host-side business messages sent by the host process; A selection module is used to select a target communication module corresponding to the host-side service message in the bus driver layer according to the service type of the host-side service message and the remaining amount of each communication module in the bus driver layer; The communication module is used to transmit the host-side service message to the target peer process through the target communication module; The host-side service message includes a host-side service request and a host-side service response.

[0008] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above bus communication methods when executing the computer program.

[0009] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned bus communication methods are implemented.

[0010] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above bus communication methods when executed by a processor.

[0011] This application adds a forwarding layer between the application layer and the driver layer, dynamically selecting a target communication module based on service type and remaining communication modules, preventing a single communication module from being overused or idle. This solves the technical problem of low resource utilization of communication modules on the LPC bus in related technologies, thereby improving LPC bus communication efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0013] Figure 1A schematic diagram of the interaction flow of the bus communication system provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a bus communication system provided in an embodiment of the present application; Figure 3 A schematic diagram of the process of sending a message from the host side provided in an embodiment of the present application; Figure 4 A schematic diagram of the format of a host-side service message provided in an embodiment of the present application; Figure 5 A schematic diagram of the process of receiving a message on the host side provided in an embodiment of the present application; Figure 6 A schematic diagram of the process of sending a message to the other end provided in an embodiment of the present application; Figure 7 A schematic diagram of the process of receiving a message from the other end provided in an embodiment of the present application; Figure 8 A flowchart of a bus communication method provided in an embodiment of the present application; Figure 9 A schematic diagram of the structure of a bus communication device provided in an embodiment of the present application; Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0014] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0015] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0016] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0017] As an independent system, BMC is mainly used for hardware monitoring, upgrading and management of servers and other computer systems.

[0018] One of the main ways for BMC to communicate in-band with the host is through the LPC bus. Currently, there are multiple in-band communication methods based on the LPC bus, mainly KCS, BT, Snoop, and MBOX. These four methods exist in independent driver modules (communication modules).

[0019] Currently, when BMC applications communicate with the host, upper-layer applications typically rely on LPC bus communication. For example, the Snoop module is often used to send post codes, and the KCS module is often used to send asset information. However, some BMC chips have insufficient KCS channels, or the BMC chip already supports faster communication modules, such as BT, but the application layer does not have such a feature. Therefore, due to historical issues and different levels of LPC bus support among different manufacturers, there are two major problems with current LPC-based in-band communication: 1) Different applications have different communication frequencies and intensities, which may lead to insufficient utilization of some modules; 2) If a certain driver module does not exist for a certain BMC chip, the BMC application layer needs to be re-adapted to communicate based on other modules.

[0020] To solve the above technical problems, the embodiments of the present application provide a bus communication system, method, electronic device and storage medium, including: a host-side forwarding layer, a bus driver layer and a peer-side forwarding layer; wherein the bus driver layer includes multiple communication modules; the host-side forwarding layer is used to receive host-side service messages sent by the host process, and select the target communication module corresponding to the host-side service message in the bus driver layer according to the service type of the host-side service message and the remaining amount of each communication module in the bus driver layer; the bus driver layer is used to transmit the host-side service message to the peer-side forwarding layer through the target communication module; the peer-side forwarding layer is used to receive the host-side service message transmitted by the target communication module and send the host-side service message to the corresponding target peer-side process; wherein the host-side service message includes a host-side service request and a host-side service response. The system provided by the above scheme, by adding a forwarding layer between the application layer and the driver layer, dynamically selects the target communication module based on the service type and the remaining amount of the communication module, thereby avoiding excessive occupation or idleness of a single communication module. Therefore, the technical problem of low resource utilization of the communication module of the LPC bus in the related art can be solved, and the technical effect of improving the communication efficiency of the LPC bus can be achieved.

[0021] An embodiment of the present application provides a bus communication system for implementing message data transmission between a host end and a BMC peer end.

[0022] like Figure 1The figure shows an interactive process diagram of a bus communication system provided in an embodiment of the present application. The system includes: a host-side forwarding layer, a bus driver layer and a peer-side forwarding layer; wherein the bus driver layer includes multiple communication modules.

[0023] Among them, the host-side forwarding layer is used to receive the host-side business message sent by the host process, and select the target communication module corresponding to the host-side business message in the bus driver layer according to the business type of the host-side business message and the remaining amount of each communication module in the bus driver layer; the bus driver layer is used to transmit the host-side business message to the opposite-end forwarding layer through the target communication module; the opposite-end forwarding layer is used to receive the host-side business message transmitted by the target communication module, and send the host-side business message to the corresponding target opposite-end process.

[0024] The host-side service message includes a host-side service request and a host-side service response.

[0025] It should be noted that the bus driver layer is divided into the host LPC driver layer and the BMC LPC driver layer. The bus driver layer encapsulates LPC bus communication modules such as KCS, BT, Snoop, and MBOX. The host and BMC initialize the LPC modules supported by the bus driver layer, and the forwarding layer records this information for subsequent selection of the target communication module.

[0026] Specifically, the host-side business message can be a hardware monitoring request and a power-on self-test request, etc. Host-side business messages of different business types correspond to different communication requirements. Therefore, the host-side forwarding layer flexibly selects the target communication module corresponding to the host-side business message in the bus driver layer according to the business type of the host-side business message and the remaining amount of each communication module in the bus driver layer, thereby improving the resource utilization of the communication module in the bus driver layer and improving the communication efficiency.

[0027] It should be further explained that in the related art, the communication modules in the bus driver layer are bound to the service types. For example, a host-side service message sent by the host to the other end must be transmitted through the KCS communication module. If there is no idle KCS communication module, even if there are idle Snoop communication modules, BT communication modules, and MBOX communication modules, the message must wait for the KCS communication module to transmit the message. The embodiment of the present application adopts a standardized LPC bus driver call architecture, which adds a forwarding layer between the application layer and the LPC driver layer. Based on the communication requirements of the application layer and the activation status and remaining capacity of the current communication module, it automatically matches and calls the appropriate driver module (target communication module). This can effectively solve the above technical problems, improve communication efficiency, maximize the utilization of existing communication module resources, and can adapt to various BMC chips, reducing the difficulty of adapting to different BMC chips.

[0028] Specifically, in an embodiment of the present application, when the host communicates with the BMC, the underlying driver for sending and receiving messages does not need to be fixed, that is, the communication module in the bus driver layer is not bound to the business type, but the upper-layer business needs to be clear. When the host or BMC actively sends a message to the other end, it is necessary to clearly mark the business that handles the request, so it is necessary to clarify the business types supported by both ends during initialization. For example, the business types on the host side are A, B, C, D and E, and the business types on the BMC side are a, b, c, and d. If the host side actively initiates an access, it is necessary to clarify which BMC service (target peer process) will handle it, that is, the corresponding relationship, such as business type A corresponds to business process b, business type C corresponds to business type a, etc. Therefore, both ends sort out the corresponding relationship in advance and save it locally, and fill in the corresponding business type when issuing a request. For example, if the host side business type is A (when initiating access), the business type filled in the message is b (target peer process).

[0029] Based on the above embodiments, Figure 2 The schematic diagram of the structure of the bus communication system provided in the embodiment of the present application is as an implementable manner. In one embodiment, the system further includes: The host-side application layer is used to determine whether the data communication on the host side is actively initiated by the host side. If it is determined that the data communication on the host side is actively initiated by the host side, it generates a unique message identifier and a service type identifier; and encapsulates the host-side service message based on the unique message identifier and the service type identifier.

[0030] The host-side data communication actively initiated by the host side means that the host side actively initiates a service request to the other side, rather than responding to a service request previously sent by the other side, that is, the host-side service message is a host-side service request.

[0031] Specifically, the host-side application layer encapsulates the message by determining the initiator of data communication (either the host itself or responding to the peer). When the communication is initiated, a globally unique sequence number (a unique identifier for the message) and a service type identifier (a service type) are generated. The generation strategy for the sequence number can be customized, for example, by incrementing it.

[0032] Accordingly, in one embodiment, when it is determined that the data communication on the host side is not actively initiated by the host side, the peer service message that triggers the data communication on the host side is obtained; the message unique identifier and service type identifier in the peer service message are encapsulated into the host side service message.

[0033] Among them, if the data communication of the host side is not initiated by the host side, the host side service message is a host side service response.

[0034] Specifically, if the request is not initiated actively but responded to by the BMC side, the seq number and service type sent by the BMC are encapsulated and the request is sent in a package.

[0035] Based on the above embodiments, Figure 3 The schematic diagram of the process flow of the host-side message transmission provided in the embodiment of the present application is an implementable method. In one embodiment, the host-side forwarding layer is specifically used to: According to the service type represented by the service type identifier in the host-side service message, the target communication module selection criteria of the host-side service message are determined; according to the target communication module selection criteria of the host-side service message and the remaining quantity of each communication module in the bus driver layer, the target communication module corresponding to the host-side service message is selected in the bus driver layer.

[0036] Specifically, after receiving the host-side service message, the host-side forwarding layer first parses the message and saves the correspondence between the application layer process ID (host process) and the seq number in a pre-allocated ring buffer. When the buffer space is insufficient, the previously saved correspondence is deleted to ensure that the correspondence of the host-side service message can be successfully cached in the ring buffer.

[0037] Among them, when the host-side forwarding layer determines that the data communication on the host side is not actively initiated by the host side, it calls the communication module used for the transmission of the opposite-end business message that triggered the data communication on the user side as the target communication module for the data communication on the host side, and ends the sending process.

[0038] Specifically, in one embodiment, the host-side forwarding layer is specifically configured to: When the service type of the host-side service message indicates that the host-side service message does not require a response from the other end, the target communication module selection standard of the host-side service message is determined to be the first standard; according to the first standard, based on the remaining amount of each communication module in the bus driver layer, it is judged whether the remaining amount of the first communication module in the bus driver layer is 0; when the remaining amount of the first communication module in the bus driver layer is not 0, the first communication module is used as the target communication module corresponding to the host-side service message; when the remaining amount of the first communication module in the bus driver layer is 0, it is judged whether the remaining amount of the second communication module in the bus driver layer is 0; when the remaining amount of the second communication module is not 0, the second communication module is used as the target communication module corresponding to the host-side service message.

[0039] The first communication module and the second communication module are lightweight communication modules, and the first communication module is a unidirectional communication module from the host end to the opposite end.

[0040] Specifically, when the host-side forwarding layer determines that the data communication is initiated by the host and the host-side service message does not require a response from the other end, it waits for one of Snoop (the first communication module) or MBOX (the second communication module) to be available, that is, the remaining amount is not 0, and gives priority to Snoop and then MBOX.

[0041] For example, Figure 4 The figure shows a schematic diagram of the format of the host-side service message provided in an embodiment of the present application. The host-side service message includes a seq number (message unique identifier), which refers to the globally unique identifier ID of this communication; a datapointer (data pointer), which refers to the storage address of the data to be transmitted; a length (data amount), which refers to the length of the data to be transmitted; a model type, which refers to the specific driver module (target communication module) of the communication, and is also called a module identifier; a reply (response identifier), which indicates whether the peer end needs to respond to this communication; and a service type (service type identifier), which refers to the service type.

[0042] Specifically, in one embodiment, the host-side forwarding layer is further configured to: When the service type of the host-side service message indicates that the host-side service message does not require a response from the other end, the message unique identifier in the host-side service message is preprocessed to indicate that the host-side service message does not require a response from the other end through the preprocessed message unique identifier.

[0043] The pre-processing of the unique identifier of the message in the host-side service message includes setting the unique identifier of the message to 0.

[0044] Specifically, in one embodiment, the host-side forwarding layer is specifically configured to: In the case where the service type of the host-side service message indicates that the host-side service message requires a response from the other end, the message category to which the host-side service message belongs is determined based on the data volume of the host-side service message; wherein the message categories are divided into at least two categories: first-category messages and second-category messages, and the data volume of the first-category messages is greater than the data volume of the second-category messages; in the case where the host-side service message belongs to the first-category message, the target communication module selection standard of the host-side service message is determined to be the third standard; according to the third standard, based on the remaining amount of each communication module in the bus driver layer, it is determined whether the remaining amount of the third communication module in the bus driver layer is 0; if the remaining amount of the third communication module is not 0, the third communication module is used as the target communication module corresponding to the host-side service message; if the remaining amount of the third communication module is 0, it is determined whether the remaining amount of the fourth communication module and the second communication module in the bus driver layer is 0; if the remaining amount of the fourth communication module or the second communication module is not 0, the fourth communication module or the second communication module is used as the target communication module corresponding to the host-side service message.

[0045] The communication rate of the third communication module is greater than the communication rate of the fourth communication module.

[0046] Specifically, if the host-side forwarding layer determines that a host-side service message requires a peer response, and if the length of the host-side service message exceeds the first threshold value, threshold_1, then the host-side service message is considered a first-class message. Threshold_1 is an empirical threshold, such as 64 bits. In this case, BT (the third communication module) is prioritized as the target communication module. If it is unavailable (the remaining capacity of the third communication module is 0), KCS (the fourth communication module) or MBOX (the second communication module) is selected as the target communication module.

[0047] It should be noted that in this embodiment of the application, the BT module (the third communication module) is preferred for large file transfers (length > 64 bytes), leveraging its block transfer characteristics to improve throughput. If the BT module is fully busy, it automatically switches to the KCS or MBOX module to avoid transmission interruptions caused by module congestion and ensure business continuity.

[0048] Specifically, in one embodiment, the host-side forwarding layer is specifically configured to: In the case where the host-side business message belongs to the second category of messages, the target communication module selection standard for the host-side business message is determined to be the fourth standard; according to the fourth standard, based on the remaining amount of each communication module in the bus driver layer, it is judged whether the remaining amount of the fourth communication module in the bus driver layer is 0; if the remaining amount of the fourth communication module is not 0, the fourth communication module is used as the target communication module corresponding to the host-side business message; if the remaining amount of the fourth communication module is 0, it is judged whether the remaining amount of the third communication module and the second communication module in the bus driver layer is 0; if the remaining amount of the third communication module or the second communication module is not 0, the third communication module or the second communication module is used as the target communication module corresponding to the host-side business message.

[0049] Specifically, if the host-side forwarding layer determines that a host-side service message requires a peer response, and if the length of the host-side service message exceeds the second threshold value, threshold_2, then the host-side service message is considered a second-class message. Threshold_2 is an empirical threshold, such as a 32-bit value. In this case, the KCS (fourth communication module) is prioritized as the target communication module. If it is unavailable (the remaining capacity of the fourth communication module is 0), the BT (third communication module) and the MBOX (second communication module) are then selected as the target communication module.

[0050] Specifically, for small data interactions (length ≤ 64 bytes), the KCS module (the fourth communication module) is prioritized, leveraging its low latency to handle real-time interactive services (such as hardware status inquiries). When all KCS modules are busy, the BT or MBOX module is switched to ensure fast transmission of small data services, avoiding the communication delays caused by fixed module binding in traditional solutions.

[0051] Specifically, in one embodiment, in order to further improve the accuracy of the message category identification results of the host-side business messages, historical communication data volume samples of the host side can be collected, and the information entropy of the data distribution can be calculated. The entropy maximum method automatically determines the dual thresholds (threshold_1 and threshold_2) by finding the optimal segmentation point of the data distribution, and periodically updates threshold_1 and threshold_2 to ensure that the adopted threshold_1 and threshold_2 match the actual application scenario, thereby improving the accuracy of the message category identification results of the host-side business messages.

[0052] Accordingly, in one embodiment, if Figure 5The figure shows a schematic diagram of the process of receiving a host-side message provided by an embodiment of the present application. The host-side forwarding layer receives a message from the LPC driver layer (a peer service message); parses the message to obtain a seq number and a service type; if a local correspondence exists between the seq number and the host-side process ID, extracts the content and sends it to the target host-side process corresponding to the seq number; otherwise, extracts the content and, based on the extracted content, sends the peer service message to the target host-side process that handles the corresponding service type. If a local correspondence exists between the seq number and the host-side process ID, this indicates that the peer service message is a peer service response sent by the peer to the host. Therefore, the peer service message is sent to the host-side process that originally issued the request.

[0053] Based on the above embodiments, Figure 6 The flowchart of the peer message transmission provided in the embodiment of the present application is as an implementable manner. In one embodiment, the peer forwarding layer is further configured to: Receive the peer service message sent by the peer process to the host, and determine whether the peer data communication is actively initiated by the peer; if the peer data communication is not actively initiated by the peer, obtain the host service message that triggers the peer data communication; use the target communication module used by the host service message in the bus driver layer as the target communication module of the peer service message.

[0054] Specifically, in one embodiment, the system further includes: a peer application layer, configured to: Determine whether the data communication with the other end is actively initiated by the other end. If it is determined that the data communication with the other end is actively initiated by the other end, generate a message unique identifier and a service type identifier; encapsulate the service message of the other end according to the message unique identifier and the service type identifier, so that the forwarding layer of the other end can determine whether the data communication with the other end is actively initiated by the other end by parsing the service message of the other end.

[0055] Specifically, similar to the host-side application layer described above, the peer-side application layer selects different strategies for message encapsulation depending on whether the communication is initiated. If so, a sequence number is generated, a service type is selected, and the request (peer-side service message) is packaged and delivered. The sequence number generation strategy is customizable, for example, incremental generation. If the communication is not initiated, but is responding to a host request, the sequence number and service type sent by the host are encapsulated and the request is packaged and delivered.

[0056] Specifically, the peer forwarding layer receives the request, parses the message, and saves the correspondence between the peer application layer's process ID and the sequence number in a pre-allocated circular buffer. If the buffer runs out of space, the previously saved correspondence is deleted. If the current communication is not initiated by the peer application layer, the sequence number and service type are prepended to the outgoing data segment (the peer service message). The communication module used to receive the message is called to send a response message as the target communication module, and the current transmission process ends.

[0057] Accordingly, in one embodiment, the peer forwarding layer is further configured to: In the case that the data communication with the opposite end is initiated by the opposite end, the second communication module in the bus driver layer is used as the standard communication module of the opposite end service message.

[0058] Specifically, it waits for the MBOX (second communication module) in the bus driver layer to be available, so as to send the peer service message based on the MBOX.

[0059] Specifically, in one embodiment, Figure 7 The figure shows a schematic diagram of the process of receiving a peer-end message provided in an embodiment of the present application. The peer-end forwarding layer receives a message from the LPC driver layer (a host-end service message), parses the message to obtain the seq number and service type, and if a local correspondence exists between the seq number and the process ID, extracts the content and sends it to the process corresponding to the seq number (the target peer-end process). Otherwise, the content is extracted and, based on the extracted content, the host-end service message is sent to the target peer-end process that handles the corresponding service type. If a local correspondence exists between the seq number and the host-end process ID, this indicates that the host-end service message is a host-end service response sent by the host to the peer-end. Therefore, the host-end service message is sent to the peer-end process that originally issued the request.

[0060] The bus communication system provided by the embodiment of the present application includes: a host-side forwarding layer, a bus driver layer and a peer-side forwarding layer; wherein the bus driver layer includes multiple communication modules; the host-side forwarding layer is used to receive the host-side service message sent by the host process, and select the target communication module corresponding to the host-side service message in the bus driver layer according to the service type of the host-side service message and the remaining amount of each communication module in the bus driver layer; the bus driver layer is used to transmit the host-side service message to the peer-side forwarding layer through the target communication module; the peer-side forwarding layer is used to receive the host-side service message transmitted by the target communication module and send the host-side service message to the corresponding target peer-side process; wherein the host-side service message includes a host-side service request and a host-side service response. The system provided by the above scheme dynamically selects the target communication module based on the service type and the remaining amount of the communication module by adding a forwarding layer between the application layer and the driver layer, thereby avoiding excessive occupation or idleness of a single communication module. Therefore, the technical problem of low resource utilization of the communication module of the LPC bus in the related technology can be solved, and the technical effect of improving the communication efficiency of the LPC bus can be achieved. In addition, it can effectively utilize existing BMC chip resources to improve the efficiency of BMC in-band communication; expand the scope of application of BMC chips, no longer limited by the presence or absence of a certain in-band communication module; there is no need to change the original driver layer code and communication protocol, only a small amount of application layer communication transceiver interface needs to be modified to adapt to the current solution, that is, the adaptation cost is low.

[0061] Through the description of the above implementation methods, those skilled in the art can clearly understand that the system according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0062] The embodiment of the present application provides a bus communication method for implementing message data transmission between a host end and a BMC peer end. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices capable of bus communication.

[0063] like Figure 8 FIG. 1 is a flow chart of a bus communication method provided in an embodiment of the present application, the method comprising: Step 801: receiving a host-side service message sent by a host process; Step 802: Select a target communication module corresponding to the host-side service message in the bus driver layer according to the service type of the host-side service message and the remaining amount of each communication module in the bus driver layer; Step 803: Transmit the host-side service message to the target peer process through the target communication module.

[0064] The host-side service message includes a host-side service request and a host-side service response.

[0065] For the description of the features in the embodiment corresponding to the bus communication method, reference can be made to the relevant description of the embodiment corresponding to the bus communication system, which will not be repeated here.

[0066] An embodiment of the present application further provides a bus communication device for executing the bus communication method provided in the above embodiment.

[0067] like Figure 9 FIG. 1 is a schematic diagram of the structure of a bus communication device according to an embodiment of the present application. The bus communication device 90 includes a receiving module 901 , a selecting module 902 and a communication module 903 .

[0068] Among them, the receiving module receives the host-side business message sent by the host process; the selection module is used to select the target communication module corresponding to the host-side business message in the bus driver layer according to the business type of the host-side business message and the remaining amount of each communication module in the bus driver layer; the communication module is used to transmit the host-side business message to the target opposite-end process through the target communication module.

[0069] The host-side service message includes a host-side service request and a host-side service response.

[0070] For the description of the features in the embodiment corresponding to the bus communication device, reference can be made to the relevant description of the embodiment corresponding to the bus communication system, which will not be repeated here.

[0071] The embodiment of the present application also provides an electronic device, such as Figure 10 As shown, it is a structural diagram of an electronic device provided in an embodiment of the present application, including a processor 10 and a memory 20, wherein the memory 20 stores a computer program, and the processor 10 is configured to run the computer program to execute the steps in any of the above-mentioned bus communication method embodiments.

[0072] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above bus communication method embodiments when running.

[0073] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0074] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above bus communication method embodiments are implemented.

[0075] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above bus communication method embodiments are implemented.

[0076] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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.

[0077] The above is a detailed introduction to a bus communication system, method, electronic device, and storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be noted that, for those skilled in the art, without departing from the principles of the present application, several improvements and modifications may be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A bus communication system, characterized in that: include: Host-side forwarding layer, bus driver layer and peer-side forwarding layer; wherein the bus driver layer includes multiple communication modules; The host-side forwarding layer is used to receive the host-side service message sent by the host process, and select the target communication module corresponding to the host-side service message in the bus driver layer according to the service type of the host-side service message and the remaining capacity of each communication module in the bus driver layer; The bus driver layer is used to transmit the host-side service message to the opposite-end forwarding layer through the target communication module; The peer forwarding layer is used to receive the host-side service message transmitted by the target communication module, and send the host-side service message to the corresponding target peer process; The host-side service message includes a host-side service request and a host-side service response.

2. The bus communication system according to claim 1, wherein: The system further includes: The host application layer is used to determine whether the data communication of the host side is initiated by the host side, and generate a unique message identifier and a service type identifier when it is determined that the data communication of the host side is initiated by the host side; The host-side service message is encapsulated according to the message unique identifier and the service type identifier.

3. The bus communication system according to claim 2, characterized in that: The host-side application layer is further used to: When it is determined that the data communication of the host end is not initiated by the host end, obtaining the opposite end service message that triggers the data communication of the host end; The host-side service message is encapsulated with the message unique identifier and the service type identifier in the peer-side service message.

4. The bus communication system according to claim 1, wherein: The host-side forwarding layer is specifically used to: Determining a target communication module selection criterion for the host-side service message according to a service type represented by a service type identifier in the host-side service message; According to the target communication module selection standard of the host-side service message and the remaining quantity of each communication module in the bus driver layer, the target communication module corresponding to the host-side service message is selected in the bus driver layer.

5. The bus communication system according to claim 4, characterized in that: The host-side forwarding layer is specifically used to: When the service type of the host-side service message indicates that the host-side service message does not require a response from the opposite end, determining the target communication module selection standard of the host-side service message to be the first standard; According to the first standard, judging whether the remaining quantity of the first communication module in the bus driver layer is 0 according to the remaining quantity of each communication module in the bus driver layer; When the remaining amount of the first communication module in the bus driver layer is not 0, the first communication module is used as the target communication module corresponding to the host-side service message; When the remaining quantity of the first communication module in the bus driver layer is 0, determining whether the remaining quantity of the second communication module in the bus driver layer is 0; When the remaining amount of the second communication module is not 0, the second communication module is used as the target communication module corresponding to the host-side service message; The first communication module and the second communication module are lightweight communication modules, and the first communication module is a one-way communication module from the host end to the opposite end.

6. The bus communication system according to claim 5, characterized in that: The host-side forwarding layer is further configured to: When the service type of the host-side service message indicates that the host-side service message does not require a response from the opposite end, the message unique identifier in the host-side service message is preprocessed to indicate that the host-side service message does not require a response from the opposite end through the preprocessed message unique identifier.

7. The bus communication system according to claim 4, characterized in that: The host-side forwarding layer is specifically used to: In a case where the service type of the host-side service message indicates that the host-side service message requires a response from the peer end, determining the message category to which the host-side service message belongs based on the data volume of the host-side service message; wherein the message categories are divided into at least two categories: first category messages and second category messages, and the data volume of the first category messages is greater than the data volume of the second category messages; In a case where the host-side service message belongs to the first category of messages, determining that the target communication module selection standard of the host-side service message is the third standard; According to the third standard, judging whether the remaining quantity of the third communication module in the bus driver layer is 0 according to the remaining quantity of each communication module in the bus driver layer; When the remaining amount of the third communication module is not 0, the third communication module is used as the target communication module corresponding to the host-side service message; When the remaining amount of the third communication module is 0, determining whether the remaining amounts of the fourth communication module and the second communication module in the bus driver layer are 0; When the remaining amount of the fourth communication module or the second communication module is not 0, the fourth communication module or the second communication module is used as the target communication module corresponding to the host-side service message; The communication rate of the third communication module is greater than the communication rate of the fourth communication module.

8. The bus communication system according to claim 7, characterized in that: The host-side forwarding layer is specifically used to: In the case where the host-side service message belongs to the second category of messages, determining that the target communication module selection standard of the host-side service message is the fourth standard; According to the fourth criterion, judging whether the remaining quantity of the fourth communication module in the bus driver layer is 0 according to the remaining quantity of each communication module in the bus driver layer; When the remaining amount of the fourth communication module is not 0, the fourth communication module is used as the target communication module corresponding to the host-side service message; When the remaining amount of the fourth communication module is 0, determining whether the remaining amounts of the third communication module and the second communication module in the bus driver layer are 0; When the remaining amount of the third communication module or the second communication module is not 0, the third communication module or the second communication module is used as the target communication module corresponding to the host-side service message.

9. The bus communication system according to claim 1, wherein: The peer forwarding layer is further configured to: Receive the peer service message sent by the peer process to the host, and determine whether the data communication with the peer is initiated by the peer; When the data communication with the other end is not initiated by the other end, obtaining the host-side service message that triggers the data communication with the other end; The target communication module used by the host-side service message in the bus driver layer is used as the target communication module of the opposite-side service message.

10. The bus communication system according to claim 9, characterized in that: The peer forwarding layer is further configured to: In the case that the data communication with the opposite end is actively initiated by the opposite end, the second communication module in the bus driver layer is used as the target communication module of the opposite end service message.

11. The bus communication system according to claim 9, characterized in that: The system further comprises: The peer application layer is used to determine whether the data communication with the peer is initiated by the peer, and generate a unique message identifier and a service type identifier when it is determined that the data communication with the peer is initiated by the peer; The peer service message is encapsulated according to the message unique identifier and the service type identifier, so that the peer forwarding layer determines whether the peer data communication is actively initiated by the peer by parsing the peer service message.

12. A bus communication method, characterized in that: include: Receive host-side service messages sent by the host process; Selecting a target communication module corresponding to the host-side service message in the bus driver layer according to the service type of the host-side service message and the remaining amount of each communication module in the bus driver layer; Transmitting the host-side service message to the target peer process through the target communication module; The host-side service message includes a host-side service request and a host-side service response.

13. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the bus communication method according to claim 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the bus communication method according to claim 12 when executed by a processor.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the bus communication method according to claim 12 are implemented.

Citation Information

Patent Citations

  • Data sending system and data sending method

    CN108881014A

  • Data transmission method based on CAN bus, electronic equipment and storage medium

    CN116074154A

  • Message transmission method and device of network card, computer equipment and storage medium

    CN116545932A

  • Data communication method and system, vehicle and storage medium

    CN116866432A

  • Distributed transaction processing method and device, equipment and storage medium

    CN117437048A