Communication method, board, energy storage valve control system and storage medium

By establishing a unified system communication interface layer in the communication system of the energy storage valve control system, and using the inter -board communication agent to achieve the virtual port mapping of the board and card, the problem of poor flexibility of the communication method of the existing technology in the existing technology in the existing technology, and realized it. High transplantation and flexibility.

WO2025020964A1PCT designated stage expired Publication Date: 2025-01-30CONTEMPORARY AMPEREX FUTURE ENERGY RES INST (SHANGHAI) LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/105524
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-25
Filing Date
2024-07-15
Publication Date
2025-01-30

AI Technical Summary

Technical Problem

The communication method between the boards and cards in existing energy storage valve control systems usually depends on the physical communication interface driven by the same operating system, resulting in poor portability, scalability and flexibility.

Method used

By establishing a unified system communication interface layer between the operating system layer of the communication system and the application layer, the communication agent and virtual port mapping of the board are used to realize the communication between different board and cards, and there is no need to understand the address of the data receiver.

Benefits of technology

The flexible communication between different boards and cards supports different operating system types, improves transplantability, scalability and flexibility, simplifies user operations, and makes communication processes transparent to users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024105524_30012025_PF_FP_ABST
    Figure CN2024105524_30012025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a communication method, a board, an energy storage valve control system and a storage medium. The method comprises: by means of a first process, starting a source port corresponding to the first process, acquiring a first communication channel identifier, and on the basis of the first communication channel identifier, writing first data into a first shared space; by means of an inter-board communication proxy, starting destination ports corresponding to the inter-board communication proxy, acquiring the first communication channel identifier, and on the basis of the first communication channel identifier, reading the first data from the first shared space; by means of the inter-board communication proxy, writing in the first data port numbers of the destination ports corresponding to the inter-board communication proxy, so as to generate first target data; by means of the inter-board communication proxy, sending the first target data to a drive layer; and by means of the drive layer, driving at least one physical communication interface of a board to send the first target data to a physical communication interface of at least one other board. The inter-board communication mode provided by the present application is transparent to users, and have good transportability, expandability and flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method, board, energy storage valve control system and storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on July 25, 2023, with application number 202310921271.X and invention name “Communication method, board, energy storage valve control system and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communications, and in particular provides a communication method, a board, an energy storage valve control system, and a storage medium. Background Art

[0003] Energy storage valve control systems typically utilize a multi-board design (e.g., control board, interface board, input / output board, display panel, etc.), each of which may have different functions or architectures. The application software configured on these boards can run based on an operating system or directly on a processor. The physical communication interface between the boards can be a point-to-point bus interface or a shared bus interface, such as Ethernet, RS485, Controller Area Network (CAN), or Low-Voltage Differential Signaling (LVDS).

[0004] Currently, the communication method between boards is usually based on a physical signal interface driven by the same operating system, which has poor portability, scalability and flexibility.

[0005] Application Contents

[0006] The purpose of this application is to provide a communication method, board, energy storage valve control system and storage medium, aiming to solve the problem that the current communication method between boards is usually based on the physical signal interface driven by the same operating system, with poor portability, scalability and flexibility.

[0007] A first aspect of an embodiment of the present application provides a communication method, which is implemented based on a communication system running on a board. The communication system includes a driver layer, an operating system layer, and an application layer, and also includes a unified system communication interface layer established between the operating system layer and the application layer. The communication method includes:

[0008] Opening, through the first process, a source port corresponding to the first process to obtain a first communication channel identifier, and writing the first data into the first shared space according to the first communication channel identifier;

[0009] Opening a destination port corresponding to the inter-board communication agent through the inter-board communication agent to obtain a first communication channel identifier, and reading first data from the first shared space according to the first communication channel identifier;

[0010] Writing the port number of the destination port corresponding to the inter-board communication agent into the first data through the inter-board communication agent to generate first target data;

[0011] Sending the first target data to the driver layer through the inter-board communication agent;

[0012] driving at least one physical communication interface of the board card to send the first target data to the physical communication interface of at least one other board card through the driver layer;

[0013] The unified system communication interface layer includes an inter-board communication agent, a destination port corresponding to the inter-board communication agent, and a source port corresponding to the first process.

[0014] On the first aspect, a communication method is provided based on a communication system running on a board, a unified system communication interface layer is established between the operating system layer and the application layer of the communication system, and an inter-board communication agent based on the unified system communication interface layer is configured in advance in the unified system communication interface layer according to actual needs, and a communication channel identifier and a shared space are established according to the port number of each group of virtual ports (that is, the source port and the virtual port) to establish a mapping relationship between each group of virtual ports, so that when inter-board communication is required and the user does not know the address of the data recipient, there is no need to know the address of the data recipient, only Based on the mapping relationship between each group of virtual ports, communication between different boards can be achieved, and there is no restriction on the types of operating systems running on different boards. This inter-board communication method is transparent to the user (user transparency means that the user does not need to care about the specific communication implementation method. It is transparent and invisible to the user and the user only needs to use it). Based on this, by pre-establishing the mapping between different virtual ports, the data sender (i.e., the first process) and the data receiver (i.e., at least one other board) can be flexibly bound, thereby enabling different data routing. It can be applied to any board and has good portability, scalability, and flexibility. The first aspect specifically enables a board to send data unidirectionally to at least one other board, that is, one send and one receive or one send and multiple receive.

[0015] In a first implementation of the first aspect, opening, by a first process, a source port corresponding to the first process to obtain a first communication channel identifier, and before writing the first data to the first shared space according to the first communication channel identifier, includes:

[0016] Through the inter-board communication agent, a globally unique first communication channel identifier and a globally unique first shared space are established according to the port number of the source port corresponding to the first process and the port number of the destination port corresponding to the inter-board communication agent.

[0017] The first implementation method of the first aspect is to establish a globally unique first communication channel identifier and a globally unique first shared space based on the inter-board communication agent according to the actual needs of the user before inter-board communication, according to the port number of the source port corresponding to the first process configured by the user and the port number of the destination port corresponding to the inter-board communication agent, so that based on the first communication channel identifier, the mapping between the source port corresponding to the first process and the destination port corresponding to the inter-board communication agent is realized, and based on the first communication channel identifier and the first shared space, the first process writes data and the inter-board communication agent reads data, thereby realizing communication between the first process and the inter-board communication agent, and then realizing communication between the first process and the inter-board communication agent, and further realizing communication between the first process and other boards, with good scalability and flexibility.

[0018] Based on the first or second implementation of the first aspect, in the second implementation of the first aspect, the number of destination ports corresponding to the inter-board communication agent is multiple, and each destination port corresponding to the inter-board communication agent is mapped to a source port corresponding to the first process;

[0019] The communication method also includes:

[0020] In the case where a plurality of first target data are generated through the inter-board communication agent, all the first target data are packaged and sent to the driver layer through the inter-board communication agent.

[0021] A second implementation of the first aspect, when there are multiple destination ports corresponding to the inter-board communication agent, based on a pre-established mapping relationship between each destination port corresponding to the inter-board communication agent and a source port corresponding to a first process, enables the inter-board communication agent to generate multiple first target data based on the first data sent by the multiple first processes, and package and send them to the driver layer for transmission to other boards via the driver layer, thereby enabling unidirectional batch data communication between different boards. The second implementation of the first aspect can specifically enable unidirectional batch data transmission from a board to at least one other board.

[0022] Based on the first aspect, or the first or second implementation of the first aspect, in a third implementation of the first aspect, the communication method further includes:

[0023] The physical communication interface of the driving board receives, through the driving layer, second target data sent by the physical communication interface of at least one other board;

[0024] Obtaining the second target data through the inter-board communication agent and parsing the data to obtain the port number of the destination port corresponding to the other inter-board communication agent and the second data, the port number of the destination port corresponding to the other inter-board communication agent being the same as the port number of the source port corresponding to the inter-board communication agent, and the other inter-board communication agent running on other boards;

[0025] Opening the source port corresponding to the inter-board communication agent according to the port number of the destination port corresponding to the other inter-board communication agent through the inter-board communication agent to obtain the second communication channel identifier, and writing the second data into the second shared space according to the second communication channel identifier;

[0026] Opening, by the second process, a destination port corresponding to the second process to obtain a second communication channel identifier, and reading second data from the second shared space according to the second communication channel identifier;

[0027] The unified system communication interface layer further includes a source port corresponding to the inter-board communication agent and a destination port corresponding to the second process.

[0028] The third implementation of the first aspect is based on a pre-established mapping relationship between each group of virtual ports of the board, by making the port number of the source port corresponding to the inter-board communication agent of the board the same as the port number of the destination port corresponding to other inter-board communication agents of other boards, a mapping relationship between the virtual ports of different boards can be established. This allows the user to achieve inter-board communication based on the mapping relationship between the virtual ports of different boards without knowing the address of the data receiver, without having to know the address of the data receiver. There is no restriction on the type of operating system running on different boards. This inter-board communication method is transparent to the user. Based on this, by pre-establishing the mapping between the virtual ports of different boards, the data sender (i.e., the other board) and the data receiver (i.e., the second process) can be flexibly bound, thereby enabling different data routing. It can be applied to any board and has good portability, scalability and flexibility. The third implementation of the first aspect, based on the first aspect, can further achieve a board receiving data sent by at least one other board in a unidirectional manner, i.e., one send and one receive or multiple send and one receive, thereby achieving bidirectional data communication between different boards as a whole.

[0029] Based on the third implementation of the first aspect, in a fourth implementation of the first aspect, before the physical communication interface of the driving board receives, through the driver layer, the second target data sent by the physical communication interface of the other board, the method includes:

[0030] Through the inter-board communication agent, a globally unique second communication channel identifier and a globally unique second shared space are established according to the port number of the source port corresponding to the inter-board communication agent and the port number of the destination port corresponding to the second process.

[0031] The fourth implementation method of the first aspect is to establish a common and globally unique second communication channel identifier and a common and globally unique second shared space based on the inter-board communication agent according to the actual needs of the user before inter-board communication, according to the port number of the source port corresponding to the inter-board communication agent configured by the user and the port number of the destination port corresponding to the second process, so that based on the second communication channel identifier, the mapping between the source port corresponding to the inter-board communication agent and the destination port corresponding to the second process is realized, and based on the second communication channel identifier and the second shared space, the inter-board communication agent writes data and the second process reads data, thereby realizing communication between the inter-board communication agent and the second process, and then realizing communication between the second process and other boards, with good scalability and flexibility.

[0032] Based on the third or fourth implementation of the first aspect, in a fifth implementation of the first aspect, the number of source ports corresponding to the inter-board communication agent is multiple, and each source port corresponding to the inter-board communication agent is mapped to a destination port corresponding to the second process;

[0033] The communication method also includes:

[0034] When multiple packaged second target data are obtained through the inter-board communication agent, the inter-board communication agent is used to unpack and parse all the second target data to obtain the port numbers of multiple source ports corresponding to the inter-board communication agent and multiple second data.

[0035] The fifth implementation method of the first aspect is that, when there are multiple source ports corresponding to the inter-board communication agent, based on the pre-established mutual mapping relationship between each source port corresponding to the inter-board communication agent and the destination port corresponding to a second process, the inter-board communication agent can, when receiving multiple packaged second target data sent by at least one other board, unpack the package to obtain the port numbers of the multiple destination ports corresponding to the other inter-board communication agents and multiple second data, and then distribute the multiple second data to each second process based on the mapping relationship between each group of virtual ports of different boards and the mapping relationship between each group of virtual ports of the same board, thereby realizing unidirectional batch data communication between different boards. The fifth implementation method of the first aspect can specifically realize the unidirectional reception of batch data sent by at least one other board by the board.

[0036] Based on the third or fourth implementation of the first aspect, in a sixth implementation of the first aspect, the second process and the first process are the same process.

[0037] A sixth implementation of the first aspect, when the second process and the first process are the same process, can implement bidirectional communication between the same process within the board and the inter-board communication agent.

[0038] Based on the first aspect, or any one of the first to sixth implementations of the first aspect, in a seventh implementation of the first aspect, the communication method further includes:

[0039] Opening, by the third process, a source port corresponding to the third process to obtain a third communication channel identifier, and writing the third data into the third shared space according to the third communication channel identifier;

[0040] Opening, by the fourth process, a destination port corresponding to the fourth process to obtain a third communication channel identifier, and reading third data from the third shared space according to the third communication channel identifier;

[0041] The unified system communication interface layer further includes a source port corresponding to the third process and a destination port corresponding to the fourth process.

[0042] The seventh implementation method of the first aspect is based on the pre-established mapping relationship between each group of virtual ports, so that when intra-board communication is required and the user does not know the address of the data recipient, the user does not need to know the address of the data recipient to achieve communication between different processes in the same board card. This intra-board communication method is transparent to the user. Based on this, by pre-establishing the mapping between different virtual ports, the data sender (that is, the third process) and the data receiver (that is, the fourth process) can be flexibly bound, so that different data routing can be performed. It can be applied to any board card and has good portability, scalability and flexibility.

[0043] Based on the seventh implementation of the first aspect, in the eighth implementation of the first aspect, the unified system communication interface layer further includes an intra-board communication agent;

[0044] Opening a source port corresponding to the third process by the third process to obtain a third communication channel identifier, and before writing the third data into the third shared space according to the third communication channel identifier, includes:

[0045] Through the intra-board communication agent, a globally unique third communication channel identifier and a globally unique third shared space are established according to the port number of the source port corresponding to the third process and the port number of the destination port corresponding to the fourth process.

[0046] The eighth implementation method of the first aspect is to establish a common and globally unique third communication channel identifier and a common and globally unique third shared space before conducting intra-board communication based on the intra-board communication agent according to the actual needs of the user, according to the port number of the source port corresponding to the third process and the port number of the destination port corresponding to the fourth process configured by the user, so that based on the third communication channel identifier, the mapping between the source port corresponding to the third process and the destination port corresponding to the fourth process is realized, and based on the third communication channel identifier and the third shared space, the third process writes data and the fourth process reads data, thereby realizing communication between the third process and the fourth process, that is, realizing communication between different processes within the board, with good scalability and flexibility.

[0047] Based on the seventh or eighth implementation manner of the first aspect, in a ninth implementation manner of the first aspect, the third process and the first process are the same process.

[0048] An eighth implementation of the first aspect, when the third process and the first process are the same process, can enable the same process within the board to communicate with other processes within the board and other processes outside the board respectively.

[0049] The second aspect of an embodiment of the present application provides a board card, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the steps of the communication method provided in the first aspect of the embodiment of the present application are implemented.

[0050] A third aspect of the embodiments of the present application provides an energy storage valve control system, comprising the board provided in the second aspect of the embodiments of the present application and at least one other board.

[0051] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the communication method provided in the first aspect of the embodiments of the present application.

[0052] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or related technologies. 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.

[0054] FIG1 is a schematic diagram of the architecture of a communication system running on a board provided in an embodiment of the present application;

[0055] FIG2 is a schematic diagram of a first flow chart of a communication method provided in an embodiment of the present application;

[0056] FIG3 is a schematic diagram of a second flow chart of a communication method provided in an embodiment of the present application;

[0057] FIG4 is a diagram of a bidirectional communication architecture between two different boards provided in an embodiment of the present application;

[0058] FIG5 is a schematic diagram of a third flow chart of the communication method provided in an embodiment of the present application;

[0059] FIG6 is a fourth flow chart of the communication method provided in an embodiment of the present application;

[0060] FIG7 is a diagram of a bidirectional communication architecture between different processes within the same board provided by an embodiment of the present application;

[0061] FIG8 is a schematic diagram of the structure of the board provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the accompanying drawings are intended to cover non-exclusive inclusions.

[0064] In the description of the embodiments of the present application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0065] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0066] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0067] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0068] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0069] In order to make the purpose, technical solutions and advantages of this application more clear, this application is further described in detail below with reference to the accompanying drawings and embodiments.

[0070] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

[0071] The embodiment of the present application provides a communication method, which is implemented based on a communication system running on a board card and can be executed by a processor of the board card when running a computer program with corresponding functions. A unified system communication interface (USCI) layer is established between the operating system layer and the application layer of the communication system, and an intra-board communication agent or an inter-board communication agent based on the USCI layer is configured in advance on the USCI layer. A common communication channel identifier (Identity) is established based on each group of source ports and destination ports. Document, ID) and shared space are used to establish a mapping relationship between each group of virtual ports (i.e., source port and virtual port). This makes it possible to establish a mapping relationship between each group of virtual ports (i.e., source port and virtual port) when intra-board communication or inter-board communication is required and the user does not know the address of the data receiver, without having to know the address of the data receiver. Only based on the mapping relationship between each group of virtual ports, communication between different processes within the board or between different boards can be achieved. There is no restriction on the types of operating systems running on different boards. This communication method is transparent to the user. Based on this, by pre-establishing mappings between different virtual ports, the data sender and the data receiver can be flexibly bound, thereby enabling different data routing. This method can be applied to any board, has good portability, scalability, and flexibility, can effectively shorten the R&D cycle, and is easy to maintain and test.

[0072] In applications, the types of operating systems running on different boards can be the same or different. The operating systems can be Microsoft Windows, macOS, Linux, Google Chrome OS, iOS, Android, Huawei Hongmeng System, KaiOS, iPad OS, Fuchsia OS, etc.

[0073] As shown in FIG1 , an exemplary architecture of a communication system 101 running on a board is shown. The communication system 101 includes a driver layer 11 , an operating system layer 12 , a USCI layer 13 and an application layer arranged in sequence;

[0074] The USCI layer 13 includes an inter-board communication agent 131, an intra-board communication agent 132, and at least one group of virtual ports. FIG1 exemplarily shows four groups of virtual ports, namely, a source port 133-1 and a destination port 134-1, a source port 134-2 and a destination port 133-2, a source port 134-3 and a destination port 135-1, and a source port 135-2 and a destination port 134-4.

[0075] The application layer is used to run multiple processes or tasks. FIG1 exemplarily shows two processes, namely process 141 and process 142 .

[0076] The board 100 is provided with at least one physical communication interface, and FIG1 exemplarily shows a physical communication interface 102 ;

[0077] The source port 133-1 corresponding to the process 141 and the destination port 134-1 corresponding to the process 142 are mapped to each other to implement unidirectional data transmission from the process 141 to the process 142.

[0078] The source port 134-2 corresponding to process 142 and the destination port 133-2 corresponding to process 141 are mapped to each other to implement unidirectional data transmission from process 142 to process 141;

[0079] The source port 134-3 corresponding to the process 142 and the destination port 135-1 corresponding to the inter-board communication agent 131 are mapped to each other, so as to implement unidirectional data transmission from the process 142 to the inter-board communication agent 131;

[0080] The source port 135-2 corresponding to the inter-board communication agent 131 and the destination port 134-4 corresponding to the process 142 are mapped to each other to implement unidirectional data transmission from the inter-board communication agent 131 to the process 142;

[0081] The driver layer 11 is used for:

[0082] Drive the physical communication interface 102 provided on the board to send the data sent unidirectionally by the process 142 to the inter-board communication agent 131 to the physical communication interface of at least one other board;

[0083] Drive the physical communication interface 102 to receive data sent by the physical communication interface of at least one other board;

[0084] The inter-board communication agent 131 is used to obtain data sent by the physical communication interface of at least one other board from the driver layer 11 and send the data to the process 142 .

[0085] In applications, when a board is provided with multiple physical communication interfaces, the types of the multiple physical communication interfaces may be the same or different. The physical communication interface may be a point-to-point communication bus interface or a shared bus interface, such as an Ethernet interface, an RS485 interface, a Controller Area Network (CAN) interface, a Low-Voltage Differential Signaling (LVDS) interface, etc.

[0086] In applications, the driver layer, operating system layer, USIC layer, application layer, and the inter-board communication agent and intra-board communication agent of the USIC layer are all computer programs running on the processor of the board. The physical communication interface is a physical interface set on the board and connected to the processor for communication.

[0087] The driver layer is used to run the software driver of the physical communication interface to drive the physical communication interface to communicate with the physical communication interfaces of other boards;

[0088] The operating system layer is used to run the operating system to create processes or tasks and manage them;

[0089] The application layer is used to run processes or tasks to implement corresponding application functions;

[0090] The USIC layer is used to run inter-board communication agents and intra-board communication agents, and provides multiple groups of virtual ports for data communication between inter-board communication agents and different processes or tasks, between intra-board communication agents and different processes or tasks, between different processes, between different tasks, and between processes and tasks. Each group of virtual ports is mapped to each other.

[0091] In the USIC layer, the inter-board communication agent is used to implement communication between different boards. Specifically, it is used for:

[0092] At the USCI layer, one or more virtual ports are configured between the inter-board communication agent and the process or task. Each virtual port group includes a source port and a destination port that are mapped to each other, and data is sent unidirectionally from the source port to the destination port.

[0093] In response to a port number configuration operation by a user, configuring the port number of each group of virtual ports;

[0094] According to the port number of each group of virtual ports, a globally unique communication channel ID and a globally unique shared space corresponding to each group of virtual ports are established, and the communication channel ID is stored in the shared space;

[0095] Read the data written into the shared space by the process or task from the shared space according to the communication channel ID;

[0096] Write the port number of the destination port corresponding to itself into the data, generate target data and send it to the driver layer, so as to trigger the driver layer to drive at least one physical communication interface of the board card to send the data to the physical communication interface of at least one other board card. If there are multiple target data, the multiple target data are packaged and then sent to the driver layer;

[0097] The trigger driver layer drives at least one physical communication interface of the board to receive and parse target data sent by the physical communication interface of at least one other board, obtain the port number and data of the source port corresponding to the other inter-board communication agent, and unpack and parse the received multiple packaged target data before parsing; write the parsed data into the shared space according to the communication channel ID;

[0098] In the USIC layer, the intra-board communication agent is used to implement communication between different processes on the same board. Specifically, it is used for:

[0099] One or more virtual ports are configured between different processes or tasks at the USCI layer. Each virtual port group includes a source port and a destination port that are mapped to each other, and data is sent unidirectionally from the source port to the destination port.

[0100] In response to a port number configuration operation by a user, configuring the port number of each group of virtual ports;

[0101] According to the port number of each group of virtual ports, a globally unique communication channel ID and a globally unique shared space corresponding to each group of virtual ports are established, and the communication channel ID is stored in the shared space;

[0102] The intra-board and inter-board communication agents are also used to:

[0103] Configure the communication channel within the same board or between different boards. The specific configuration content includes but is not limited to: source port, destination port, port number of the source port, port number of the destination port, communication channel ID, port type, data size, channel depth, driver type, etc.

[0104] In application, the communication method provided in the embodiment of the present application can be applied to different boards of the energy storage valve control system (including the above-mentioned boards and at least one other board), and the energy storage valve control system can be applied to flight equipment in the aviation / aerospace field, electric vehicles or car batteries in the automotive field, etc.

[0105] As shown in FIG2 , the communication method provided in an embodiment of the present application includes the following steps S101 to S105 for implementing a first type of unidirectional inter-board communication (specifically, a board sending data unidirectionally to at least one other board):

[0106] Step S101: Open the source port corresponding to the first process through the first process to obtain the first communication channel ID, and write the first data into the first shared space according to the first communication channel ID, and then proceed to step S102;

[0107] Step S102: Open the destination port corresponding to the inter-board communication agent through the inter-board communication agent to obtain the first communication channel ID, and read the first data from the first shared space according to the first communication channel ID, and then enter step S103.

[0108] In an application, the first process can be any process running on a board that needs to send data to other processes running on other boards. Based on the user's actual needs, a set of virtual ports, consisting of a source port corresponding to the first process and a destination port corresponding to the inter-board communication agent, is configured in advance at the USCI layer of the board via the inter-board communication agent. The inter-board communication agent then establishes a globally unique first communication channel ID and a globally unique first shared space based on the port numbers of these virtual ports. The first communication channel ID is stored in the first shared space.

[0109] In the application, the process of the first process unidirectionally sending the first data to the inter-board communication agent is as follows:

[0110] The first process opens the source port corresponding to the first process, reads the globally unique first communication channel ID from the first shared space, and writes the first data into the first shared space according to the first communication channel ID;

[0111] The inter-board communication agent opens the destination port corresponding to the inter-board communication agent, reads the globally unique first communication channel ID from the first shared space, and reads the first data from the first shared space according to the first communication channel ID, thereby realizing the unidirectional sending of the first data by the first process to the inter-board communication agent.

[0112] Step S103: Write the port number of the destination port corresponding to the inter-board communication agent into the first data through the inter-board communication agent to generate first target data, and then proceed to step S104;

[0113] Step S104: Send the first target data to the driver layer through the inter-board communication agent, and proceed to step S105;

[0114] Step S105 : driving at least one physical communication interface of the board through the driver layer to send the first target data to the physical communication interface of at least one other board.

[0115] In the application, according to the actual needs of the user, the port number of the destination port corresponding to the inter-board communication agent and the port number of the source port corresponding to other inter-board communication agents of other boards are set to be the same and globally unique in advance, so as to establish a mutual mapping relationship between the destination port corresponding to the inter-board communication agent and the source port corresponding to the other inter-board communication agents, so that after the other boards receive the first target data carrying the port number of the destination port corresponding to the inter-board communication agent, they can open the source port corresponding to the other inter-board communication agent with the mapping relationship according to the port number of the destination port corresponding to the inter-board communication agent, and send the first data to the other processes according to the correspondence between the source port corresponding to the other inter-board communication agent and the destination ports corresponding to other processes running on the other boards.

[0116] In an application, the inter-board communication agent triggers the driver layer to drive at least one physical communication interface of a board to send first target data to the physical communication interface of at least one other board, implementing a one-transmit-one-receive or one-transmit-multiple-receive scenario. When implementing a one-transmit-multiple-receive scenario, each physical communication interface of a board sends the first target data to a physical communication interface on one other board.

[0117] In one embodiment, before step S101, the following steps are included:

[0118] Through the inter-board communication agent, a globally unique first communication channel ID and a globally unique first shared space are established according to the port number of the source port corresponding to the first process and the port number of the destination port corresponding to the inter-board communication agent.

[0119] In the application, before performing the first type of inter-board communication, the port number of the source port corresponding to the first process and the port number of the destination port corresponding to the inter-board communication agent are configured in advance according to the actual needs of the user through the inter-board communication agent, and then a globally unique first communication channel ID and a globally unique first shared space are established based on the port numbers of this group of virtual ports. The first communication channel ID is used to achieve the mapping between the source port corresponding to the first process and the destination port corresponding to the inter-board communication agent, so that the first process can, after opening the corresponding source port, send the first data to the destination port corresponding to the mutually mapped inter-board communication agent in a targeted manner. The specific implementation method is: the first process writes the first data to the first shared space according to the first communication channel ID, and the inter-board communication agent reads the first data from the first shared space according to the first communication channel ID, thereby realizing communication between the first process and the inter-board communication agent, and then realizing communication between the first process and other boards, with good scalability and flexibility.

[0120] In one embodiment, the inter-board communication agent corresponds to multiple destination ports, and each destination port corresponding to the inter-board communication agent is mapped to a source port corresponding to the first process;

[0121] The above communication method further includes the following steps for implementing the second type of unidirectional inter-board communication (specifically, a board sending unidirectional batch data to at least one other board):

[0122] In the case where a plurality of first target data are generated through the inter-board communication agent, all the first target data are packaged and sent to the driver layer through the inter-board communication agent.

[0123] In an application, if the inter-board communication proxy corresponds to multiple destination ports, multiple first processes can simultaneously send data unidirectionally to the inter-board communication proxy via the corresponding source ports. The principle of each first process sending data unidirectionally to the inter-board communication proxy is the same as steps S101 to S103 and will not be repeated here. The inter-board communication proxy can generate multiple first target data corresponding to the first data sent by the multiple first processes, and then package all the first target data and send them to the driver layer for transmission to other boards via the driver layer, thereby achieving unidirectional batch data communication between different boards.

[0124] As shown in FIG3 , the communication method provided in the embodiment of the present application further includes the following steps S201 to S204 for implementing a third type of unidirectional inter-board communication (specifically, a board unidirectionally receives data sent by at least one other board):

[0125] Step S201: The physical communication interface of the driving board receives second target data sent by the physical communication interface of at least one other board through the driving layer, and then proceeds to step S202.

[0126] In an application, the inter-board communication agent triggers the driver layer to drive at least one physical communication interface of a board to receive second target data sent by the physical communication interface of at least one other board, implementing a one-transmit-one-receive or multiple-transmit-one-receive scenario. When multiple-transmit-one-receive is implemented, each physical communication interface of the driver board receives the second target data sent by a physical communication interface on one other board.

[0127] Step S202: Obtain the second target data through the inter-board communication agent and parse it to obtain the port number of the source port corresponding to the other inter-board communication agent and the second data, and then proceed to step S203.

[0128] In the application, the port number of the source port corresponding to the inter-board communication agent and the port number of the destination port corresponding to other inter-board communication agents are set to be the same and globally unique in advance according to the actual needs of the user, so as to establish a mutual mapping relationship between the source port corresponding to the inter-board communication agent and the destination port corresponding to the other inter-board communication agents, so that after the inter-board communication agent obtains the second data carrying the port number of the destination port corresponding to the other inter-board communication agent, it can open the source port corresponding to the inter-board communication agent with the mapping relationship according to the port number of the destination port corresponding to the other inter-board communication agent, and send the second data to the second process according to the correspondence between the source port corresponding to the inter-board communication agent and the destination port corresponding to the second process running on the board.

[0129] Step S203: Open the source port corresponding to the inter-board communication agent according to the port number of the source port corresponding to the other inter-board communication agent through the inter-board communication agent to obtain the second communication channel ID, and write the second data into the second shared space according to the second communication channel ID, and then proceed to step S204;

[0130] Step S204: Open the destination port corresponding to the second process through the second process to obtain the second communication channel ID, and read the second data from the second shared space according to the second communication channel ID.

[0131] In an application, the second process can be any process running on a board that needs to receive data sent by other processes running on other boards. Based on the user's actual needs, a virtual port pair consisting of a destination port corresponding to the second process and a source port corresponding to the inter-board communication agent is configured in advance at the USCI layer of the board via the inter-board communication agent. The inter-board communication agent then establishes a globally unique second communication channel ID and a globally unique second shared space based on the port numbers of these virtual ports. The second communication channel ID is stored in the second shared space.

[0132] In the application, the process of the inter-board communication agent unidirectionally sending the second data to the second process is as follows:

[0133] The inter-board communication agent opens the source port corresponding to the inter-board communication agent according to the port number of the destination port corresponding to the other inter-board communication agent, reads the globally unique second communication channel ID from the second shared space, and writes the second data into the second shared space according to the second communication channel ID;

[0134] The second process opens the destination port corresponding to the second process, reads the globally unique second communication channel ID from the second shared space, and reads the second data from the second shared space according to the second communication channel ID, thereby realizing the inter-board communication agent unidirectionally sending the second data to the second process.

[0135] In one embodiment, before step S201, the following steps are included:

[0136] Through the inter-board communication agent, a globally unique second communication channel ID and a globally unique second shared space are established according to the port number of the source port corresponding to the inter-board communication agent and the port number of the destination port corresponding to the second process.

[0137] In the application, before performing the third type of inter-board communication, the port number of the destination port corresponding to the first process and the port number of the source port corresponding to the inter-board communication agent are configured in advance according to the actual needs of the user through the inter-board communication agent, and then a globally unique second communication channel ID and a globally unique second shared space are established based on the port numbers of this group of virtual ports. The second communication channel ID is used to achieve the mapping between the destination port corresponding to the second process and the source port corresponding to the inter-board communication agent, so that the inter-board communication agent can, after opening the corresponding source port, send the second data to the destination port corresponding to the first process that is mapped to each other. The specific implementation method is: the inter-board communication agent writes the second data to the second shared space according to the second communication channel ID, and the second process reads the second data from the second shared space according to the second communication channel ID, thereby realizing communication between the inter-board communication agent and the second process, and then realizing communication between the second process and other boards, with good scalability and flexibility.

[0138] In one embodiment, the number of source ports corresponding to the inter-board communication agent is multiple, and each source port corresponding to the inter-board communication agent is mapped to a destination port corresponding to the second process;

[0139] The above communication method further includes the following steps for implementing the fourth type of unidirectional inter-board communication (specifically, a board receiving data sent in batches unidirectionally by at least one other board):

[0140] When multiple packaged second target data are obtained through the inter-board communication agent, the inter-board communication agent is used to unpack and parse all the second target data to obtain the port numbers of multiple destination ports corresponding to other inter-board communication agents and multiple second data.

[0141] In an application, when there are multiple source ports corresponding to the inter-board communication agent, the inter-board communication agent can receive multiple packaged second target data sent by at least one other board, and then unpack them to obtain the port numbers and multiple second data of the multiple destination ports corresponding to the other inter-board communication agents. Then, based on the mapping relationship between each group of virtual ports of different boards and the mapping relationship between each group of virtual ports of the same board, the multiple source ports corresponding to the inter-board communication agent can simultaneously send data unidirectionally to multiple second processes, thereby realizing unidirectional batch data communication between different boards. The principle of each source port of the inter-board communication agent sending data unidirectionally to the second process is the same as steps S203 and S204, and will not be repeated here.

[0142] In one embodiment, the second process and the first process can be the same process. Based on the above-mentioned steps of the first one-way inter-board communication and the fourth one-way inter-board communication, two-way communication between the same process in the board card and the inter-board communication agent can be realized, and then two-way communication between the same process of the board card and other boards can be realized.

[0143] In application, the board communicates with other boards based on the aforementioned communication method. When a board uses the communication method shown in FIG2 to unidirectionally send data to at least one other board, the other board can use the communication method shown in FIG3 to receive the data sent unidirectionally by the board. Similarly, when a board uses the communication method shown in FIG3 to receive data sent unidirectionally by at least one other board, the other board can use the communication method shown in FIG2 to unidirectionally send data to the board.

[0144] Based on FIG1 , FIG4 exemplarily shows a bidirectional communication architecture diagram between two different boards when the second process and the first process are the same process;

[0145] Wherein, the board 100 is the board in the embodiment corresponding to FIG1 ;

[0146] In the board 200, the source port 235-1 corresponding to the inter-board communication agent 231 and the destination port 234-3 corresponding to the process 242 are mapped to each other, so as to implement unidirectional data transmission from the inter-board communication agent 231 to the process 242;

[0147] The source port 234-4 corresponding to the process 242 and the destination port 235-2 corresponding to the inter-board communication agent 231 are mapped to each other, so as to implement unidirectional data transmission from the process 242 to the inter-board communication agent 231;

[0148] The port number of the destination port 135-1 corresponding to the inter-board communication agent 131 is the same as the port number of the source port 235-1 corresponding to the inter-board communication agent 231, and the port number of the destination port 235-2 corresponding to the inter-board communication agent 231 is the same as the port number of the source port 135-2 corresponding to the inter-board communication agent 131;

[0149] The physical communication interface 102 is connected to the physical communication interface 202 .

[0150] As shown in FIG5 , the communication method provided in the embodiment of the present application further includes the following steps S301 and S302 for implementing a first type of unidirectional intra-board communication (specifically, unidirectional data transmission from the third process to the fourth process):

[0151] Step S301: Open the source port corresponding to the third process through the third process to obtain the third communication channel ID, and write the third data into the third shared space according to the third communication channel ID, and then proceed to step S302;

[0152] Step S302: Open the destination port corresponding to the fourth process through the fourth process to obtain the third communication channel ID, and read the third data from the third shared space according to the third communication channel ID.

[0153] In an application, the third process and the fourth process can be two different arbitrary processes running on the board. The third process sends third data to the fourth process, and the fourth process receives the third data sent by the third process. Based on the user's actual needs, a set of virtual ports, namely the source port corresponding to the third process and the destination port corresponding to the fourth process, is configured in advance at the USCI layer of the board via an intra-board communication agent. The intra-board communication agent then establishes a globally unique third communication channel ID and a globally unique third shared space based on the port numbers of these virtual ports. The third communication channel ID is stored in the third shared space.

[0154] In the application, the process of the third process sending the third data to the fourth process unidirectionally is as follows:

[0155] The third process opens the source port corresponding to the third process, reads the globally unique third communication channel ID from the third shared space, and writes the third data into the third shared space according to the third communication channel ID;

[0156] The fourth process opens the destination port of the fourth process, reads the globally unique third communication channel ID from the third shared space, and reads the third data from the third shared space according to the third communication channel ID, thereby enabling the third process to unidirectionally send the third data to the inter-board communication agent.

[0157] In one embodiment, before step S301, the following steps are included:

[0158] Through the intra-board communication agent, a globally unique third communication channel ID and a globally unique third shared space are established according to the port number of the source port corresponding to the third process and the port number of the destination port corresponding to the fourth process.

[0159] In the application, before the first type of intra-board communication is performed, the port number of the source port corresponding to the third process and the port number of the destination port corresponding to the fourth process are configured in advance through the intra-board communication agent according to the actual needs of the user. Then, based on the port numbers of this set of virtual ports, a globally unique third communication channel ID and a globally unique third shared space are established. The third communication channel ID is used to implement a mapping between the source port corresponding to the third process and the destination port corresponding to the fourth process, so that after the third process opens the corresponding source port, it can send third data to the mutually mapped destination port corresponding to the fourth process.

[0160] As shown in FIG6 , the communication method provided in the embodiment of the present application further includes the following steps S401 and S402 for implementing the second unidirectional intra-board communication (specifically, the fourth process unidirectionally sending data to the third process):

[0161] Step S401: Open the source port corresponding to the fourth process through the fourth process to obtain the fourth communication channel ID, and write the fourth data into the fourth shared space according to the fourth communication channel ID, and then proceed to step S402;

[0162] Step S402: Open the destination port corresponding to the third process through the third process to obtain a fourth communication channel ID, and read fourth data from the fourth shared space according to the fourth communication channel ID.

[0163] In applications, based on the same principle, the fourth process can also send fourth data to the third process, and the third process can receive the fourth data sent by the fourth process. Based on the user's actual needs, a virtual port pair consisting of a source port corresponding to the fourth process and a destination port corresponding to the third process is configured in advance at the USCI layer of the board through the intra-board communication agent. The intra-board communication agent then establishes a globally unique fourth communication channel ID and a globally unique fourth shared space based on the port numbers of these virtual ports. The fourth communication channel ID is stored in the fourth shared space.

[0164] In the application, the process of the fourth process sending the fourth data to the third process unidirectionally is as follows:

[0165] The fourth process opens a source port corresponding to the fourth process, reads a globally unique fourth communication channel ID from the fourth shared space, and writes the fourth data into the fourth shared space according to the fourth communication channel ID;

[0166] The third process opens the destination port of the third process, reads the globally unique fourth communication channel ID from the fourth shared space, and reads the fourth data from the fourth shared space according to the fourth communication channel ID, thereby enabling the fourth process to unidirectionally send the fourth data to the inter-board communication agent.

[0167] In one embodiment, before step S401, the following steps are included:

[0168] Through the intra-board communication agent, a globally unique fourth communication channel ID and a globally unique fourth shared space are established according to the port number of the source port corresponding to the fourth process and the port number of the destination port corresponding to the third process.

[0169] In the application, before performing the second type of intra-board communication, the port number of the source port corresponding to the fourth process and the port number of the destination port corresponding to the third process are configured in advance through the intra-board communication agent according to the actual needs of the user. Then, based on the port numbers of this set of virtual ports, a globally unique fourth communication channel ID and a globally unique fourth shared space are established. The fourth communication channel ID is used to implement a mapping between the source port corresponding to the fourth process and the destination port corresponding to the third process. After the fourth process opens the corresponding source port, it can send fourth data to the mapped destination port corresponding to the third process.

[0170] In application, based on the above steps of the first unidirectional intra-board communication and the second unidirectional intra-board communication, bidirectional communication between different processes in the board can be achieved.

[0171] Based on Figure 1, Figure 7 exemplarily shows a bidirectional communication architecture diagram between different processes in the same board;

[0172] The source port 133-1 corresponding to the process 141 and the destination port 134-1 corresponding to the process 142 are mapped to each other to implement unidirectional data transmission from the process 141 to the process 142.

[0173] The source port 134 - 2 corresponding to the process 142 and the destination port 133 - 2 corresponding to the process 141 are mapped to each other, so as to implement unidirectional data transmission from the process 142 to the process 141 .

[0174] In one embodiment, the third process or the fourth process and the first process may be the same process, and the same process within the board may communicate with other processes within the board and other processes outside the board.

[0175] In applications, data transmitted between processes and inter-board communication agents, or between different processes within the same board, can be messages. Users can control the communication system based on actual needs, using any human-computer interaction method supported by the energy storage valve control system. Communication channels within the same board or between different boards can be configured through the intra-board and inter-board communication agents. Specific configuration details include, but are not limited to, source port, destination port number, source port number, destination port number, communication channel ID, port type, data size, channel depth, and driver type. The port type identifies whether each source and destination port is used for intra-board or inter-board communication. The channel depth defines how much data can be stored in each shared space. The driver type defines the type of physical communication interface.

[0176] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0177] As shown in Figure 8, an embodiment of the present application also provides a board 300 including: at least one processor 301 (only one processor is shown in Figure 8), a memory 302, and a computer program 303 stored in the memory 302 and capable of running on at least one processor 301, and also includes at least one physical communication interface 304. When the processor 301 executes the computer program 303, the steps in any of the above-mentioned communication method embodiments are implemented.

[0178] In applications, the board may include, but is not limited to, a processor, a memory, and a physical communication interface. Those skilled in the art will understand that FIG8 is merely an example of a board and does not constitute a limitation on the board. The board may include more or fewer components than shown in the figure, or a combination of certain components, or different components.

[0179] In applications, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0180] In applications, in some embodiments, the memory can be an internal storage unit of the board, such as the board's hard drive or memory. In other embodiments, the memory can also be an external storage device of the board, such as a plug-in hard drive equipped on the board, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Furthermore, the memory can include both the board's internal storage unit and an external storage device. The memory is used to store operating systems, application programs, boot loaders, data, and other programs, such as the program code of computer programs. The memory can also be used to temporarily store data that has been output or is about to be output.

[0181] In applications, the energy storage valve control system may also include human-computer interaction equipment, network access equipment, etc. The human-computer interaction equipment may include a display screen, a touch screen, a touch display screen, an audio player, a mouse, a keyboard, buttons, a communication module, etc.

[0182] In applications, the display screen can be a thin film transistor liquid crystal display (TFT-LCD), a liquid crystal display (LCD), an organic electroluminesence display (OLED), a quantum dot light emitting diode (QLED) display screen, a seven-segment or eight-segment digital tube, etc.

[0183] In applications, the communication module can be set to any device that can directly or indirectly perform long-distance wired or wireless communication according to actual needs. For example, the communication module can provide communication solutions including Wireless Local Area Networks (WLAN) (such as Wi-Fi networks), Bluetooth, Zigbee, mobile communication networks, GNSS, Frequency Modulation (FM), Near Field Communication (NFC), infrared technology (IR), etc., which are applied to network devices. The communication module may include an antenna, which may have only one element or an antenna array including multiple elements. The communication module can receive electromagnetic waves through the antenna, frequency modulate and filter the electromagnetic wave signals, and send the processed signals to the processor. The communication module can also receive signals to be sent from the processor, frequency modulate and amplify them, and convert them into electromagnetic waves for radiation through the antenna.

[0184] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various communication method embodiments can be implemented.

[0185] An embodiment of the present application provides a computer program product. When the computer program product runs on a board, the board can implement the steps in the above-mentioned various communication method embodiments when executing the computer program product.

[0186] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera board, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.

[0187] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

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

[0189] In the embodiments provided herein, it should be understood that the disclosed boards and methods can be implemented in other ways. For example, the board embodiments described above are merely illustrative. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0190] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

Claims

1. A communication method, implemented based on a communication system running on a board, the communication system comprising a driver layer, an operating system layer and an application layer, and also comprising a unified system communication interface layer established between the operating system layer and the application layer, the communication method comprising: Opening, through a first process, a source port corresponding to the first process to obtain a first communication channel identifier, and writing first data into a first shared space according to the first communication channel identifier; By means of an inter-board communication agent, a destination port corresponding to the inter-board communication agent is opened to obtain the first communication channel identifier, and the first data is read from the first shared space according to the first communication channel identifier; By means of the inter-board communication agent, the port number of the destination port corresponding to the inter-board communication agent is written into the first data to generate first target data; Sending the first target data to the driver layer through the inter-board communication agent; By means of the driver layer, driving at least one physical communication interface of the board to send the first target data to a physical communication interface of at least one other board; The unified system communication interface layer includes the inter-board communication agent, a destination port corresponding to the inter-board communication agent, and a source port corresponding to the first process.

2. The communication method according to claim 1, wherein: The method of opening a source port corresponding to the first process through the first process to obtain a first communication channel identifier and writing the first data into the first shared space according to the first communication channel identifier includes: Through the inter-board communication agent, a globally unique first communication channel identifier and a globally unique first shared space are established according to the port number of the source port corresponding to the first process and the port number of the destination port corresponding to the inter-board communication agent.

3. The communication method according to claim 1 or 2, wherein: The number of destination ports corresponding to the inter-board communication agent is multiple, and each destination port corresponding to the inter-board communication agent is mapped to a source port corresponding to the first process; The communication method further comprises: In the case where a plurality of first target data are generated by the inter-board communication agent, all the first target data are packaged and sent to the driver layer by the inter-board communication agent.

4. The communication method according to claim 1 or 2, wherein: Also includes: By means of the driver layer, driving the physical communication interface of the board to receive second target data sent by the physical communication interface of at least one other board; The second target data is acquired and parsed through the inter-board communication agent to obtain the port number of the destination port corresponding to the other inter-board communication agent and the second data, the port number of the destination port corresponding to the other inter-board communication agent is the same as the port number of the source port corresponding to the inter-board communication agent, and the other inter-board communication agent runs on the other board card; By means of the inter-board communication agent, according to the port number of the destination port corresponding to the other inter-board communication agent, the source port corresponding to the inter-board communication agent is opened to obtain a second communication channel identifier, and the second data is written into the second shared space according to the second communication channel identifier; Opening, by the second process, a destination port corresponding to the second process to obtain the second communication channel identifier, and reading the second data from the second shared space according to the second communication channel identifier; The unified system communication interface layer further includes a source port corresponding to the inter-board communication agent and a destination port corresponding to the second process.

5. The communication method according to claim 4, wherein: Before the physical communication interface of the board is driven by the driver layer to receive the second target data sent by the physical communication interface of other boards, the method includes: Through the inter-board communication agent, a globally unique second communication channel identifier and a globally unique second shared space are established according to the port number of the source port corresponding to the inter-board communication agent and the port number of the destination port corresponding to the second process.

6. The communication method according to claim 4 or 5, wherein: The number of source ports corresponding to the inter-board communication agent is multiple, and each source port corresponding to the inter-board communication agent is mapped to a destination port corresponding to the second process; The communication method further comprises: When multiple packaged second target data are obtained through the inter-board communication agent, all the second target data are unpacked and parsed through the inter-board communication agent to obtain the port numbers of multiple source ports corresponding to the inter-board communication agent and multiple second data.

7. The communication method according to claim 4 or 5, wherein: The second process and the first process are the same process.

8. The communication method according to any one of claims 1 to 7, wherein: Also includes: Opening, through a third process, a source port corresponding to the third process to obtain a third communication channel identifier, and writing the third data into a third shared space according to the third communication channel identifier; Opening, through a fourth process, a destination port corresponding to the fourth process to obtain the third communication channel identifier, and reading the third data from the third shared space according to the third communication channel identifier; The unified system communication interface layer further includes a source port corresponding to the third process and a destination port corresponding to the fourth process.

9. The communication method according to claim 8, wherein: The unified system communication interface layer also includes an intra-board communication agent; The method of opening the source port corresponding to the third process through the third process to obtain the third communication channel identifier and writing the third data into the third shared space according to the third communication channel identifier includes: Through the intra-board communication agent, a globally unique third communication channel identifier and a globally unique third shared space are established according to the port number of the source port corresponding to the third process and the port number of the destination port corresponding to the fourth process.

10. The communication method according to claim 8 or 9, wherein: The third process and the first process are the same process.

11. A board comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and also comprising at least one physical communication interface, wherein when the processor executes the computer program, the steps of the communication method according to any one of claims 1 to 10 are implemented.

12. An energy storage valve control system, comprising the board card according to claim 11 and the at least one other board card.

13. A storage medium, wherein the storage medium is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the communication method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Centralized debug system and method of equipment plate card in distributed equipment

    CN101286883A

  • Method for inter-board communication

    CN102821055A

  • Virtual exchange method, related device and computer system

    CN103346981A

  • Method for realizing handshaking system in distributed network access equipment

    CN1503520A

  • Inter-Board Communication Apparatus, Method for Transmitting and Receiving Message of Inter-Board Communication

    US20120102149A1