Message transmission method and electronic device

By using Internet Protocol version 4 (IPL4) address information for address configuration and message transmission in SAN and NAS storage systems, the problem of interoperability between SAN and NAS storage systems is solved, enabling efficient unified storage system development and cross-node process communication, and reducing development difficulty and cost.

CN121309531BActive Publication Date: 2026-03-31INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing SAN and NAS storage systems cannot achieve network interoperability, resulting in complex and costly development. Furthermore, existing technologies require additional server and network configurations, making it impossible to achieve efficient integration.

Method used

By obtaining cluster and node identifiers during the business initialization phase, configuring the address structure using Internet Protocol version 4 (IP4) address information, and controlling the storage area network and network-attached storage to perform message transmission operations during the business execution phase, a unified storage system development for SAN and NAS can be achieved, reducing application-side modification and development costs.

Benefits of technology

It enables the development of a unified storage system for SAN and NAS, reducing development difficulty and cost, while improving integration and supporting cross-node process communication without the need for additional servers and network support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121309531B_ABST
    Figure CN121309531B_ABST
Patent Text Reader

Abstract

The present disclosure provides a message transmission method and electronic equipment, relates to the technical field of communication, is applied to a first node, the first node includes a first storage area network and network attached storage, and comprises the following steps: in a service initialization stage, obtaining a cluster identifier and a node identifier corresponding to the first node; according to the address structure and the address configuration information corresponding to the IPV4 address information, adding the cluster identifier, the node identifier and the service information corresponding to the service into the address structure, obtaining the IPV4 address information corresponding to the service, and storing the IPV4 address information into the first storage area network and the network attached storage; in a service execution stage, according to the IPV4 address information and the message demand information corresponding to the service, controlling the first storage area network and the network attached storage to execute the transmission operation corresponding to the message of the service. The SAN and NAS unified storage system development can be realized, the development difficulty and the development cost can be reduced, and the integration degree can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a message transmission method and an electronic device. Background Technology

[0002] With the development of science and technology, the convenience of data transmission has greatly facilitated users' lives. Storage Area Network (SAN) clusters commonly use technologies such as Non-Transparent Bridge (NTB), Fibre Channel (FC), and Remote Direct Memory Access over Converged Ethernet (RoCE) to interconnect networks. These technologies provide dedicated data paths between nodes, transmitting private data structures, but lack universality and compatibility. Furthermore, distributed systems and clustered file systems cannot achieve network interoperability. Therefore, the development of a unified storage system integrating SAN and Network Attached Storage (NAS) has become a key focus. Summary of the Invention

[0003] This disclosure provides a message transmission method and an electronic device. Its main purpose is to solve the problem of how to improve integration and reduce development difficulty while realizing the development of a unified SAN and NAS storage system.

[0004] According to a first aspect of this disclosure, a message transmission method is provided, applied to a first node, the first node including a first storage area network (SAN) and network-attached storage, comprising:

[0005] During the business initialization phase, obtain the cluster identifier and node identifier corresponding to the first node;

[0006] Based on the address structure and address configuration information corresponding to the Internet Protocol Version 4 (IPM4) address information, the cluster identifier, the node identifier, and the service information corresponding to the service are added to the address structure corresponding to the IPM4 address information to obtain the IPM4 address information corresponding to the service, and the IPM4 address information is stored in the first storage area network and the network attached storage.

[0007] During the service execution phase, based on the Internet Protocol version 4 (IP4) address information and the message requirement information corresponding to the service, the first storage area network and the network attached storage are controlled to perform the transmission operation corresponding to the message of the service. The message requirement information includes at least one of intra-node communication requirement information and inter-node communication requirement information.

[0008] According to a second aspect of this disclosure, a message transmission apparatus is provided, comprising:

[0009] The identifier acquisition unit is used to acquire the cluster identifier and node identifier corresponding to the first node during the business initialization phase.

[0010] The information acquisition unit is used to add the cluster identifier, the node identifier, and the service information corresponding to the service to the address structure corresponding to the Internet Protocol Version 4 (IPM4) address information according to the address structure and address configuration information corresponding to the IPM4 address information, acquire the IPM4 address information corresponding to the service, and store the IPM4 address information to the first storage area network and the network attached storage.

[0011] The message transmission unit is used, during the service execution phase, to control the first storage area network and the network attached storage to perform the message transmission operation corresponding to the service based on the address information of the Internet Protocol version 4 and the message requirement information corresponding to the service, wherein the message requirement information includes at least one of intra-node communication requirement information and inter-node communication requirement information.

[0012] According to a third aspect of this disclosure, an electronic device is provided, comprising:

[0013] At least one processor; and

[0014] A memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect above.

[0016] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method described in the first aspect above.

[0017] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described in the first aspect above.

[0018] Through this disclosure, during the service initialization phase, the cluster identifier and node identifier corresponding to the first node are obtained; according to the address structure and address configuration information corresponding to the Internet Protocol Version 4 (IPM4) address information, the cluster identifier, the node identifier, and the service information corresponding to the service are added to the address structure corresponding to the IPM4 address information, the IPM4 address information corresponding to the service is obtained, and the IPM4 address information is stored in the first storage area network and the network attached storage; during the service execution phase, according to the IPM4 address information and the message requirement information corresponding to the service, the first storage area network and the network attached storage are controlled to perform the message transmission operation corresponding to the service, wherein the message requirement information includes at least one of intra-node communication requirement information and inter-node communication requirement information. Therefore, the cluster file system can be configured accordingly, and message transmission can be performed through the Internet Protocol version 4 (IP4) address information of the business. This can reduce the need for application-side modifications, and without changing the application interface, one process can achieve cross-node process communication by forwarding messages through another process. Furthermore, the NAS process and the SAN process run on the same node, requiring no additional server or interactive network support. The development of a unified SAN and NAS storage system can be achieved without SAN program reconstruction, which can reduce development difficulty and cost while improving integration.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0020] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0021] Figure 1 This is a schematic diagram illustrating an example of a message transmission method provided in an embodiment of this disclosure;

[0022] Figure 2 This is a schematic diagram illustrating another message transmission method provided in an embodiment of the present disclosure;

[0023] Figure 3 This is a schematic diagram illustrating an example of a network stack provided in an embodiment of this disclosure;

[0024] Figure 4 This is a schematic diagram of the structure of a message transmission device provided in an embodiment of the present disclosure. Detailed Implementation

[0025] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0026] In some implementations, SAN storage clusters commonly use technologies such as NTB, FC, and RoCE to interconnect networks, providing dedicated data paths between nodes and transmitting private data structures. These technologies lack universality and compatibility. Meanwhile, distributed and clustered file systems such as Ceph distributed storage systems, Lustre File System (Lustre), and General Parallel File System (GPFS) are all based on Transmission Control Protocol / Internet Protocol (TCP / IP) network connections. These systems cannot interoperate, hindering network infrastructure reuse and integration. Integrating a file system cluster into a SAN storage cluster requires adding network interface cards (NICs) to the SAN storage nodes and network switches to the data center, increasing implementation complexity and cost.

[0027] In some implementations, for example, the same code framework can be used to enable network communication between the SAN and the file system. However, the system architecture design and development need to take into account the differences between file and block management. It is necessary to meet the node communication needs of different scenarios and put both under the same code architecture, which makes the development extremely difficult.

[0028] According to some embodiments, a SAN plus NAS headend solution can be adopted, which requires two additional server nodes and configuring the network interconnection scheme between the nodes, including network switches and network interface cards (NICs). Therefore, the file system and SAN are independent, and Ceph, Lustre, and GPFS, as used in some embodiments, can be directly selected for deployment to achieve unified SAN and NAS storage. However, this requires additional server and network configurations, has poor integration, and is costly.

[0029] Among them, NTB is a Peripheral Component Interconnect Express (PCI Express) bridging technology that allows for high-bandwidth, low-latency point-to-point connections between two independent PCIe systems (typically located in different servers or compute nodes). FC is a high-speed networking technology (typically operating at 1Gbps to 128Gbps or even higher), primarily used to connect computer data storage to servers to build Storage Area Networks (SANs). Remote Direct Memory Access over Converged Ethernet (RoCE) allows standard Ethernet to achieve the extremely high efficiency and extremely low latency of InfiniBand or FC, making it a key technology for achieving data center network convergence.

[0030] The message transmission method and electronic device of the present disclosure are described below with reference to the accompanying drawings.

[0031] Figure 1 This is a flowchart illustrating a message transmission method provided in an embodiment of this disclosure. Figure 1 As shown, the method includes the following steps:

[0032] Step 101: During the business initialization phase, obtain the cluster identifier and node identifier corresponding to the first node;

[0033] According to some embodiments, the execution entity of this disclosure may be, for example, a first node, which does not specifically refer to a fixed node. The first node may be any node in a node cluster, and the second node may be any node in the node cluster different from the first node. The first node does not specifically refer to a fixed node. The first node may include, for example, a first storage area network and network-attached storage. The first storage area network may be, for example, a storage area network included by the first node. The "first" in the first storage area network is used to distinguish it from the other storage area networks.

[0034] In some embodiments, service initialization may be a preparatory process performed before providing the service externally. The name of this service initialization is not limited; for example, it may also be called a service initialization process. Furthermore, there is no limitation on the specific service being provided. The service may also change accordingly if its type or name changes. Similarly, the service may change accordingly if the services it provides change.

[0035] According to some embodiments, a cluster can be, for example, a device that connects multiple independent devices together via a network as a whole, enabling it to provide more services. The cluster identifier can be, for example, a unique identifier for the cluster. This cluster identifier does not refer to a specific fixed representation. For example, when the cluster changes, the cluster identifier can also change accordingly. For example, when the composition of the identifier corresponding to the cluster identifier changes, the cluster identifier can also change accordingly. In this context, SAN network clusters can be interconnected using, for example, NTB, FC, or RoCE.

[0036] In some embodiments, a node identifier can be used to uniquely identify a node. This node identifier does not specifically refer to a fixed identifier. For example, the node identifier can change accordingly when its composition changes. For instance, the node identifier can change accordingly when the first node changes.

[0037] According to some embodiments, the cluster identifier and node identifier corresponding to the first node can be obtained during the business initialization phase.

[0038] Step 102: Based on the address structure and address configuration information corresponding to the Internet Protocol Version 4 (IPM) address information, add the cluster identifier, node identifier, and service information corresponding to the service to the address structure corresponding to the IPM address information, obtain the IPM address information corresponding to the service, and store the IPM address information to the first storage area network and network attached storage.

[0039] According to some embodiments, service information may be used to identify the order or position of the service within the first node. This service information does not specifically refer to any fixed information. For example, the service information may change accordingly when a modification instruction is received. Similarly, the service information may change accordingly when the service's access time changes.

[0040] In some embodiments, the Internet Protocol version 4 (IP4) address information may be information used to identify modules related to the service. This IPM address information does not refer to any specific, fixed information. For example, when the method of obtaining the IPM address information changes, the IPM address information may also change accordingly. Similarly, when the information used to obtain the IPM address information changes, the IPM address information may also change accordingly.

[0041] According to some embodiments, the IPv4 address structure can be, for example, AAA.BBB.CCC.DDD, divided into four parts, each capable of representing a number from 0 to 255. This IPv4 address structure can be used for service communication between cluster nodes. The address needs to store three parts of information: first, cluster information, assuming it occupies the first part of the IPv4 address, representing the cluster identifier, supporting a maximum of 256 clusters communicating; second, node information, occupying the second part of the IPv4 address, representing the node identifier, with a maximum of 256 nodes per cluster communicating; and third, service information, occupying the last two parts of the IPv4 address, representing service module information. Since it occupies two parts of the IPv4 address, a single node can support 65,536 service modules (256 * 256). The positions of each piece of information within the IPv4 address structure can be adjusted accordingly; the above is merely an example.

[0042] In some embodiments, during the service initialization phase, the service can proactively obtain the cluster and node identifiers from the intra-node communication module and register its own service module information. This information can be recorded in the intra-node communication modules on both the NAS and SAN sides. For example, service 3 on the second node of cluster 1, after its address is converted to IPv4 format, becomes 1.2.0.3. The service module can then use the IPv4 address to perform service listening through binding (bind) and listening (listen) to send and receive messages.

[0043] According to some embodiments, based on the address structure and address configuration information corresponding to the Internet Protocol Version 4 (IPM4) address information, the cluster identifier, node identifier, and service information corresponding to the service are added to the address structure corresponding to the IPM4 address information to obtain the IPM4 address information corresponding to the service, and the IPM4 address information is stored in the first storage area network and the network attached storage.

[0044] Step 103: During the service execution phase, based on the Internet Protocol version 4 (IPL4) address information and the message requirement information corresponding to the service, control the first storage area network and the network attached storage to perform the transmission operation corresponding to the service message. The message requirement information includes at least one of intra-node communication requirement information and inter-node communication requirement information.

[0045] According to some embodiments, the business execution phase may be, for example, the phase of providing services corresponding to the business. This business execution phase is not specifically defined as a fixed phase. For example, the business execution phase may change accordingly when the time of entry into this phase changes. Similarly, the business execution phase may change accordingly when the business itself changes.

[0046] According to some embodiments, message request information may include, for example, message sending request information and message receiving request information. That is, different message request information can correspond to different message transmission directions.

[0047] In some embodiments, a transmission operation may be, for example, the transmission of messages, and different message requirements may correspond to different transmission operations. Intra-node communication requirements may, for example, be information requiring communication between a SAN and a NAS. Inter-node communication requirements may, for example, be information requiring communication between different nodes.

[0048] According to some embodiments, during the service execution phase, the transmission operations corresponding to the messages of the service are controlled by the first storage area network and the network attached storage based on the Internet Protocol version 4 address information and the message requirement information corresponding to the service. The message requirement information includes at least one of intra-node communication requirement information and inter-node communication requirement information.

[0049] Through this disclosure, during the service initialization phase, the cluster identifier and node identifier corresponding to the first node are obtained; according to the address structure and address configuration information corresponding to the Internet Protocol Version 4 (IPM4) address information, the cluster identifier, node identifier, and service information corresponding to the service are added to the address structure corresponding to the IPM4 address information, the IPM4 address information corresponding to the service is obtained, and the IPM4 address information is stored in the first storage area network and network-attached storage; during the service execution phase, according to the IPM4 address information and the message requirement information corresponding to the service, the first storage area network and network-attached storage are controlled to perform the message transmission operation corresponding to the service, wherein the message requirement information includes at least one of intra-node communication requirement information and inter-node communication requirement information. Therefore, the cluster file system can be configured accordingly, and message transmission can be performed through the Internet Protocol version 4 (IP4) address information of the business. This can reduce the need for application-side modifications, and without changing the application interface, one process can achieve cross-node process communication by forwarding messages through another process. Furthermore, the NAS process and the SAN process run on the same node, requiring no additional server or interactive network support. The development of a unified SAN and NAS storage system can be achieved without SAN program reconstruction, which can reduce development difficulty and cost while improving integration.

[0050] Furthermore, in one possible implementation of this embodiment, Figure 2 This is a flowchart illustrating another message transmission method provided in an embodiment of this disclosure. Figure 2 As shown, the method includes the following steps:

[0051] Step 201: During the business initialization phase, obtain the cluster identifier and node identifier corresponding to the first node;

[0052] The relevant processes can be as described above, and will not be repeated here.

[0053] According to some embodiments, Figure 3 This is a schematic diagram illustrating a network stack provided in an embodiment of this disclosure. Figure 3 As shown, the network stack may include an address translation module, a network interface translation module, an intra-node communication module, and an inter-node communication module. The address translation module and the network interface translation module are implemented on the NAS side. The intra-node communication module facilitates communication between SAN and NAS nodes, while the inter-node communication module enables communication between SAN nodes. The inter-node communication module is adapted to this technical solution. The network stack may refer to basic network components used by applications, such as the transport and network layers similar to TCP / IP.

[0054] The relevant processes can be as described above, and will not be repeated here.

[0055] According to some embodiments, such as Figure 3 As shown, the NAS side also includes a network interface conversion module, which may include, for example, functions such as bind, listen, accept, connect, receive recv, and send. Specifically:

[0056] Bind: A listening file descriptor (fd) is generated using an event file descriptor (eventfd). This fd is associated with the converted address within the same structure object, allowing subsequent connection requests to be received. For example, upon receiving a message, the address is parsed, and based on this association, the associated fd is found. The message can then be sent to that fd, and the listener can listen for the message using the event polling interface (epoll interface).

[0057] Listen: It can register the object generated by Bind and the Internet Protocol Version 4 (IP4) address information to the communication module within the node. It compares the first node index with the IPM4 address information. After verification, the correspondence between the object and the address is saved in a vector container, with the business module identifier ID as the index of the vector.

[0058] Accept: Generates a file descriptor (fd) using eventfd, and simultaneously stores the local Internet Protocol version 4 (IP4) address information and the peer's IPC address information in a socket object (sock object), creating a ConnectedSocket object. This can be used to send messages to the peer.

[0059] Connect: Actively initiates a connection to the business modules of other nodes. An fd is generated using eventfd, and the local Internet Protocol version 4 (IP4) address information and the peer's IPM address information are stored together in a sock object, generating a ConnectedSocket object.

[0060] Send: When a business module needs to send a message, it writes the message to the file descriptor (fd). The intra-node communication module combines the local and peer Internet Protocol version 4 (IP4) address information from the socket object into the message header, forming a message corresponding to the business, and sends it to the intra-node communication module of the SAN.

[0061] Recv: After receiving a message, the intra-node communication module of the SAN parses the message header and sends the message content to the file descriptor (fd) through the association between the address and the sock object. At this time, the business module can obtain the message content by reading the file descriptor.

[0062] Step 202: Based on the address structure and address configuration information corresponding to the Internet Protocol Version 4 (IPM) address information, add the cluster identifier, node identifier, and service information corresponding to the service to the address structure corresponding to the IPM address information, obtain the IPM address information corresponding to the service, and store the IPM address information in the first storage area network and the network attached storage.

[0063] The relevant processes can be as described above, and will not be repeated here.

[0064] Step 203: During the business execution phase, the first node communication module of the first storage area network is controlled to receive the second message sent by the second node.

[0065] The relevant processes can be as described above, and will not be repeated here.

[0066] Step 204: Based on the message type corresponding to the second message, determine the message requirement information corresponding to the service, including the inter-node communication requirement information, and control the first inter-node communication module of the first storage area network to send the second message to the network additional storage via shared memory.

[0067] According to some embodiments, controlling the inter-node communication module of the first storage area network to send the second message to the network-attached storage via shared memory includes:

[0068] The control first storage area network obtains the listening file descriptor corresponding to the Internet Protocol version 4 (IP4) address information based on the correspondence between IPC address information and listening file descriptors and the IPC address information.

[0069] The second message is sent to the listening file descriptor of the network attached storage via shared memory.

[0070] According to some embodiments, the method further includes:

[0071] Generate a listener file descriptor corresponding to the network attached storage using event file descriptors;

[0072] The monitoring file descriptor is bound to the Internet Protocol version 4 (IP4) address information corresponding to the service. The correspondence between the IPM4 address information and the monitoring file descriptor is obtained. If the IPM4 address information is verified, the correspondence between the IPM4 address information and the monitoring file descriptor is stored in the communication module of the first node in the first storage area network and the communication module of the second node in the network attached storage.

[0073] According to some embodiments, the first intra-node communication module and the second intra-node communication module can be used, for example, to indicate different intra-node communication modules on the NAS side and the SAN side.

[0074] According to some embodiments, the correspondence between Internet Protocol version 4 (IPv4) address information and listening file descriptors can be, for example, a correspondence between one IPV4 address and one listening file descriptor. This correspondence is not specifically fixed. For instance, when the generation time of the listening file descriptor changes, or when listening file descriptors are generated for different IPv4 addresses, the correspondence between the IPV4 address information and the listening file descriptor may also change accordingly.

[0075] According to some embodiments, during the business execution phase, the technical solution of this disclosure may further include:

[0076] Based on the address information and message requirement information corresponding to the service in Internet Protocol version 4 (IPv4), the system controls the first storage area network and network-attached storage to perform the message transmission operations corresponding to the service, including:

[0077] When the message requirement information corresponding to the service includes intra-node communication requirement information, control the network attached storage to write the data corresponding to the service into shared memory.

[0078] Control the first storage area network to read data from shared memory and obtain message headers based on the data data type;

[0079] The control network in the first storage area sends service messages to the target device based on the Internet Protocol Version 4 (IP4) address information in the message header. Therefore, during intra-node communication, message transmission can be performed based on the IPM4 address information in the message header, improving the accuracy and convenience of message transmission.

[0080] According to some embodiments, the data corresponding to the service may be, for example, the data written to shared memory during message transmission. The data corresponding to the service does not specifically refer to any particular fixed data.

[0081] In some embodiments, the target device may be, for example, a message receiving device for a service. The target device does not specifically refer to a particular fixed device. For example, the target device may change accordingly when its device identifier changes.

[0082] According to some embodiments, controlling the first storage area network to send service messages to the target device corresponding to the Internet Protocol version 4 (IP4) address information includes:

[0083] When the address information of Internet Protocol version 4 corresponds to the first service of the second node, the first node communication module of the first storage area network controls the first message of the service to be sent to the second node communication module of the second storage area network of the second node.

[0084] In some embodiments, the second node may be a node in a node cluster that is different from the first node. The "second" in "second node" is used to distinguish it from the first node and does not specifically refer to a particular fixed node. Specifically, the second node may be determined, for example, through Internet Protocol version 4 (IPL) address information.

[0085] According to some implementations, intra-node communication modules can be divided into SAN and NAS based on the communication target. These belong to two different processes, achieving isolation and parallel development, and allowing for pre-negotiated interfaces. Intra-node inter-process communication can use shared content, consistent with data I / O channels. NAS can directly write shared content, which is then read and parsed by SAN. After reading data through shared memory, SAN parses the message header based on the data type and, based on the node's Internet Protocol version 4 (IPL4) address information in the message, selects the appropriate module to pass the information to the SAN's inter-node communication module. This module then uses the information channel between SAN nodes to send the information to other nodes.

[0086] According to some embodiments, controlling the first storage area network to send service messages to the target device corresponding to the Internet Protocol version 4 (IP4) address information includes:

[0087] In the case where the address information of Internet Protocol version 4 corresponds to the second service of the first node, the control of the first storage area network sends the first message of the service to the target electronic device corresponding to the first node.

[0088] In some embodiments, the first message of the service is sent to the target electronic device corresponding to the first node, for example, the two ends of the communication corresponding to the service may belong to the first node.

[0089] According to some embodiments, controlling the first storage area network to send the first message of the service to the target electronic device corresponding to the first node further includes:

[0090] Control the network attached storage to write the message content of the first message to the file descriptor corresponding to the network attached storage;

[0091] The control network attached storage adds the file descriptor and the connection socket object corresponding to the network attached storage to the message header to obtain the first message, wherein the connection socket object includes the Internet Protocol version 4 (IP4) address information of the first node and the IPM address information of the second node.

[0092] The system controls the network-attached storage to send the first message to the communication module within the first node of the first storage area network, and controls the communication module within the first node of the first storage area network to send the first message to the communication module between the first nodes of the first storage area network.

[0093] In some embodiments, a file descriptor may, for example, be a file index corresponding to network attached storage. This file descriptor does not specifically refer to a particular fixed file descriptor. For example, the file descriptor may change accordingly when the method of generating the file descriptor changes. For example, the file descriptor may change accordingly when the network attached storage changes.

[0094] According to some embodiments, the Internet Protocol version 4 (IP4) address information of the first node may be, for example, the local IPM4 address information, and the IPM4 address information of the second node may be, for example, the peer IPM4 address information.

[0095] According to some embodiments, the method further includes:

[0096] Generate file descriptors corresponding to network attached storage using event file descriptors;

[0097] Store the local Internet Protocol version 4 (IP4) address information of the first node, the peer IPC address information of the second node, and the file descriptor into a socket object to generate a connection socket object.

[0098] According to some embodiments, based on Internet Protocol version 4 (IP4) address information and message demand information corresponding to the service, the transmission operations corresponding to the messages of the service are controlled to be performed by the first storage area network and the network attached storage, including:

[0099] The first node communication module of the first storage area network receives the second message sent by the second node;

[0100] Based on the message type corresponding to the second message, the message requirement information corresponding to the business is determined, including the inter-node communication requirement information, and the first inter-node communication module of the first storage area network is controlled to send the second message to the network additional storage via shared memory.

[0101] In one or related embodiments, the inter-node communication module of the first storage area network can be controlled to receive a second message sent by a second node; based on the message type corresponding to the second message, the message requirement information corresponding to the service, including inter-node communication requirement information, can be determined, and the inter-node communication module of the first storage area network can be controlled to send the second message to the network-attached storage via shared memory. Therefore, the inter-node communication requirement information can be determined by the message type, and corresponding operations can be performed, improving the accuracy and convenience of message transmission.

[0102] According to embodiments of this disclosure, this disclosure also provides a message transmission device.

[0103] For example, Figure 4 This is a schematic diagram of a message transmission device provided in an embodiment of the present disclosure. The message transmission device 400 includes: an identifier acquisition unit 401, an information acquisition unit 402, and a message transmission unit 403; wherein,

[0104] The identifier acquisition unit 401 is used to acquire the cluster identifier and node identifier corresponding to the first node during the business initialization phase.

[0105] The information acquisition unit 402 is used to add the cluster identifier, node identifier and service information corresponding to the service to the address structure corresponding to the address information of Internet Protocol Version 4 (IPM4) address information according to the address structure and address configuration information corresponding to the address information of the Internet Protocol Version 4 (IPM4), acquire the IPM4 address information corresponding to the service, and store the IPM4 address information to the first storage area network and the network attached storage.

[0106] The message transmission unit 403 is used to control the transmission operation of the message corresponding to the service executed by the first storage area network and the network attached storage during the service execution phase, based on the address information of Internet Protocol version 4 and the message requirement information corresponding to the service. The message requirement information includes at least one of intra-node communication requirement information and inter-node communication requirement information.

[0107] Furthermore, when the message transmission unit 403 controls the first storage area network and network-attached storage to perform the message transmission operation corresponding to the service based on the Internet Protocol version 4 (IPL4) address information and the message requirement information corresponding to the service, it is specifically used for:

[0108] When the message requirement information corresponding to the service includes intra-node communication requirement information, control the network attached storage to write the data corresponding to the service into shared memory.

[0109] Control the first storage area network to read data from shared memory and obtain message headers based on the data data type;

[0110] Retrieve the Internet Protocol version 4 (IP4) address information from the message header;

[0111] The control system sends the service messages to the target device corresponding to the Internet Protocol version 4 (IP4) address information.

[0112] Furthermore, the message transmission unit 403, used to control the first storage area network to send service messages to the target device corresponding to the Internet Protocol version 4 (IP4) address information, specifically for:

[0113] When the address information of Internet Protocol version 4 corresponds to the first service of the second node, the first node communication module of the first storage area network controls the first message of the service to be sent to the second node communication module of the second storage area network of the second node.

[0114] Furthermore, the message transmission unit 403 is used to control the first storage area network to send the service message to the target device corresponding to the Internet Protocol version 4 (IP4) address information, including:

[0115] In the case where the address information of Internet Protocol version 4 corresponds to the second service of the first node, the control of the first storage area network sends the first message of the service to the target electronic device corresponding to the first node.

[0116] Furthermore, the message transmission unit 403 is used to control the first storage area network to send the first message of the service to the target electronic device corresponding to the first node, and is also specifically used for:

[0117] Control the network attached storage to write the message content of the first message to the file descriptor corresponding to the network attached storage;

[0118] The control network attached storage adds the file descriptor and the connection socket object corresponding to the network attached storage to the message header to obtain the first message, wherein the connection socket object includes the Internet Protocol version 4 (IP4) address information of the first node and the IPM address information of the second node.

[0119] The system controls the network-attached storage to send the first message to the communication module within the first node of the first storage area network, and controls the communication module within the first node of the first storage area network to send the first message to the communication module between the first nodes of the first storage area network.

[0120] Furthermore, the message transmission unit 403 is also used for:

[0121] Generate file descriptors corresponding to network attached storage using event file descriptors;

[0122] Store the local Internet Protocol version 4 (IP4) address information of the first node, the peer IPC address information of the second node, and the file descriptor into a socket object to generate a connection socket object.

[0123] Furthermore, the message transmission unit 403, when controlling the first storage area network and network-attached storage to perform message transmission operations corresponding to the service based on the Internet Protocol version 4 (IPL4) address information and the message requirement information corresponding to the service, is specifically used for:

[0124] The first node communication module of the first storage area network receives the second message sent by the second node;

[0125] Based on the message type corresponding to the second message, the message requirement information corresponding to the business is determined, including the inter-node communication requirement information, and the first inter-node communication module of the first storage area network is controlled to send the second message to the network additional storage via shared memory.

[0126] Furthermore, the message transmission unit 403, used to control the inter-node communication module of the first storage area network to send the second message to the network-attached storage via shared memory, specifically is used for:

[0127] The control first storage area network obtains the listening file descriptor corresponding to the Internet Protocol version 4 (IP4) address information based on the correspondence between IPC address information and listening file descriptors and the IPC address information.

[0128] The second message is sent to the listening file descriptor of the network attached storage via shared memory.

[0129] Furthermore, the message transmission unit 403 is also used for:

[0130] Generate a listener file descriptor corresponding to the network attached storage using event file descriptors;

[0131] The monitoring file descriptor is bound to the Internet Protocol version 4 (IP4) address information corresponding to the service. The correspondence between the IPM4 address information and the monitoring file descriptor is obtained. If the IPM4 address information is verified, the correspondence between the IPM4 address information and the monitoring file descriptor is stored in the communication module of the first node in the first storage area network and the communication module of the second node in the network attached storage.

[0132] It should be noted that the description of the features in the embodiment corresponding to the message transmission device can be found in the relevant description of the embodiment corresponding to the message transmission method, and will not be repeated here.

[0133] Embodiments of this disclosure also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described message transmission method embodiments.

[0134] Embodiments of this disclosure also provide a computer-readable storage medium storing a computer program configured to execute the steps in any of the above-described message transmission method embodiments at runtime.

[0135] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0136] Embodiments of this disclosure also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described message transmission method embodiments.

[0137] Embodiments of this disclosure also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above-described message transmission method embodiments.

[0138] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.

[0139] The above provides a detailed description of a message transmission method provided by this disclosure. Specific examples have been used to illustrate the principles and implementation methods of this disclosure. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this disclosure without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this disclosure.

Claims

1. A message transmission method, characterized by, The application is applied to a first node, the first node comprises a first storage area network and a network-attached storage, and comprises: In a service initialization stage, a cluster identifier and a node identifier corresponding to the first node are acquired; According to an address structure and address configuration information corresponding to Internet communication protocol version 4 address information, the cluster identifier, the node identifier, and service information corresponding to the service are added to the address structure corresponding to the Internet communication protocol version 4 address information, the Internet communication protocol version 4 address information corresponding to the service is acquired, and the Internet communication protocol version 4 address information is stored to the first storage area network and the network-attached storage; A listening file descriptor corresponding to the network-attached storage is generated in the form of an event file descriptor, the listening file descriptor and the Internet communication protocol version 4 address information corresponding to the service are bound, a corresponding relationship between the Internet communication protocol version 4 address information and the listening file descriptor is acquired, and the corresponding relationship is stored to a first node-in-communication module of the first storage area network and a second node-in-communication module of the network-attached storage in the case that the Internet communication protocol version 4 address information passes verification; In a service execution stage, according to the Internet communication protocol version 4 address information and message requirement information corresponding to the service, a transmission operation corresponding to a message of the service is controlled to be executed by the first storage area network and the network-attached storage, wherein the message requirement information comprises at least one of node-in-communication requirement information and inter-node communication requirement information.

2. The method of claim 1, wherein, The control of the transmission operation corresponding to the message of the service by the first storage area network and the network-attached storage according to the Internet communication protocol version 4 address information and the message requirement information corresponding to the service comprises: In the case that the message requirement information corresponding to the service comprises the node-in-communication requirement information, the network-attached storage is controlled to write data corresponding to the service into a shared memory; The first storage area network is controlled to read the data from the shared memory and acquire a message header according to a data type of the data; The Internet communication protocol version 4 address information in the message header is acquired; The first storage area network is controlled to send the message of the service to a target device corresponding to the Internet communication protocol version 4 address information.

3. The method of claim 2, wherein, The control of the first storage area network to send the message of the service to the target device corresponding to the Internet communication protocol version 4 address information comprises: In the case that the Internet communication protocol version 4 address information corresponds to a first service of a second node, a first node-in-communication module of the first storage area network is controlled to send a first message of the service to a second node-in-communication module of a second storage area network of the second node.

4. The method of claim 2, wherein, The control of the first storage area network to send the message of the service to the target device corresponding to the Internet communication protocol version 4 address information comprises: In a case where the Internet Protocol version 4 address information corresponding to the first node corresponds to a second service, the first storage area network is controlled to send a first message of the service to a target electronic device corresponding to the first node.

5. The method of claim 4, wherein, Before the control of the first storage area network to send the first message of the service to the target electronic device corresponding to the first node, the method further includes: controlling the network-attached storage to write message content of the first message to a file descriptor corresponding to the network-attached storage; controlling the network-attached storage to add the file descriptor and a connection socket object corresponding to the network-attached storage to a message header to obtain the first message, wherein the connection socket object includes Internet Protocol version 4 address information of the first node and Internet Protocol version 4 address information of a second node; controlling the network-attached storage to send the first message to an intra-node communication module of the first storage area network, and controlling the intra-node communication module of the first storage area network to send the first message to an inter-node communication module of the first storage area network.

6. The method of claim 5, wherein, The method further includes: generating a file descriptor corresponding to the network-attached storage through an event file descriptor; storing local Internet Protocol version 4 address information of the first node, opposite Internet Protocol version 4 address information of the second node, and the file descriptor into a socket object to generate a connection socket object.

7. The method of claim 1, wherein, The control of the first storage area network and the network-attached storage to perform transmission operations of messages corresponding to the service according to the Internet Protocol version 4 address information and message requirement information corresponding to the service includes: controlling an inter-node communication module of the first storage area network to receive a second message sent by a second node; determining, according to a message type corresponding to the second message, that the message requirement information corresponding to the service includes inter-node communication requirement information, and controlling the inter-node communication module of the first storage area network to send the second message to the network-attached storage through a shared memory.

8. The method of claim 7, wherein, The control of the inter-node communication module of the first storage area network to send the second message to the network-attached storage through a shared memory includes: controlling the first storage area network to obtain a listening file descriptor corresponding to the Internet Protocol version 4 address information according to the correspondence and the Internet Protocol version 4 address information; sending the second message to the listening file descriptor corresponding to the network-attached storage through a shared memory.

9. An electronic device, comprising: include: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the message transmission method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data accessing method, NAS head and SAN

    CN104539746A

  • NAS storage system

    CN107463339A