Data communication method, device, computer equipment, storage medium and program product

By establishing a connection between the server's serial port and the network server, the parallel access problem caused by the server's serial port exclusivity is solved, and efficient data processing is achieved.

CN119094611BActive Publication Date: 2025-05-23JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411507439.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-05-23
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

Due to the server's serial port exclusiveness, multiple clients cannot access the server's serial port in parallel, resulting in inefficient data processing.

Method used

By establishing a connection between the serial port of the server and the network server, the network server receives data transmission requests from multiple clients and sends these requests to the serial port of the server, allowing them to be parsed and processed, and parallel access to the serial port of the server is achieved.

Benefits of technology

It realizes parallel access to the server serial port by multiple clients, improving data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094611B_ABST
    Figure CN119094611B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of servers, and discloses a data communication method, device, computer equipment, storage medium and program product. The method includes: establishing a connection between a serial port of a server and a network service end, receiving a data transmission request, and the network service end sends the data transmission request sent by multiple clients through a client transmission channel to the serial port; parsing the data transmission request to obtain data to be transmitted and a transmission requirement; determining a target data transmission channel based on the transmission requirement; sending the data to be transmitted to the target data transmission channel to process the data to be transmitted, and after the processing is completed, the target data transmission channel sends a response message to the serial port; receiving the response message and sending it to the network service end, so that the network service end parses the response message, obtains the response data, and sends the response data to the corresponding client. The present invention realizes parallel access to the serial port and improves data processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of server technology, and in particular to a data communication method, device, computer equipment, storage medium and program product. Background Art

[0002] In the field of server management, the Intelligent Platform Management Interface (IPMI) has become a standard feature to provide remote monitoring and management capabilities.

[0003] In the related art, when the server has no network, the client uses the ipmitool tool to start the SOL (Serial-over-LAN) function, which allows the client to remotely access the serial interface of the server through the network to achieve communication between the client and the serial port of the server.

[0004] However, due to the exclusivity of the server's serial port, when a client is connected to the server's serial port via SOL, other clients cannot connect to the server's serial port to communicate with the server's serial port, that is, they cannot access the server's serial port in parallel, resulting in low data processing efficiency. Summary of the invention

[0005] In view of this, the present invention provides a data communication method, apparatus, computer equipment, storage medium and program product to solve the problem in the related art that due to the exclusivity of the serial port of the server, multiple clients cannot access the serial port of the server in parallel, resulting in low data processing efficiency.

[0006] In a first aspect, the present invention provides a data communication method, applied to a serial port of a server, the method comprising:

[0007] Establish a connection with the network server;

[0008] Receiving a data transmission request sent by the network server, wherein the network server receives data transmission requests sent by multiple clients through their corresponding client transmission channels, and sends the data transmission request to the serial port of the server;

[0009] Parsing the data transmission request to obtain the data to be transmitted and the transmission requirements;

[0010] Based on the transmission requirement, determining a target data transmission channel;

[0011] Sending the data to be transmitted to the target data transmission channel so that the target data transmission channel processes the data to be transmitted, and after the processing is completed, sending response information to the serial port;

[0012] The response information is received, and the response information is sent to the network service end, so that the network service end receives the response information, parses the response information, obtains response data, and sends the response data to the corresponding client.

[0013] The data communication method provided in this embodiment establishes a connection between the serial port of the server and the network service end, uses the network service end to receive data transmission requests sent by multiple clients through their corresponding client transmission channels, uses the connection channel between the serial port of the server and the network service end to send the received data transmission requests of multiple clients to the serial port of the server, so that the serial port of the server parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, so that the target transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, sends the response message to the network service end, and the network service end parses the response message to obtain the response data, and sends the response data to the corresponding client. By using the only channel between the network service end and the serial port of the server to realize the data transmission of multiple clients, the parallel access to the serial port of the server is realized, and the data processing efficiency is improved.

[0014] In an optional implementation manner, each of the client transmission channels corresponds to a unique client transmission channel identifier, and the parsing of the data transmission request to obtain the data to be transmitted and the transmission requirement includes:

[0015] The data transmission request is parsed to obtain the target client transmission channel identifier, the data to be transmitted and the transmission requirements.

[0016] The data communication method provided in this embodiment can ensure that the response data is accurately sent to the designated client by obtaining the target client transmission channel identifier in the data transmission request, thereby avoiding data transmission errors.

[0017] In an optional implementation, each data transmission channel corresponds to a unique data transmission channel identifier, and before sending the data to be transmitted to the target data transmission channel, the method further includes:

[0018] The correspondence between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel is sent to the network server, so that the network server updates the preset channel correspondence table based on the correspondence between the target client transmission channel identifier and the target data transmission channel identifier; after receiving the response information, the response information is parsed to obtain the response data and the target data transmission channel identifier; based on the preset channel correspondence table, the target client transmission channel identifier corresponding to the target data transmission channel identifier is determined; based on the target client transmission channel identifier, the response data is sent to the corresponding client.

[0019] The data communication method provided in this embodiment maintains and updates the preset channel correspondence table, parses the response information and determines the target client transmission channel identifier based on the preset channel correspondence table, so that the response data can be sent to the corresponding client quickly and accurately, thereby improving processing efficiency and avoiding data transmission errors.

[0020] In an optional implementation manner, determining a target data transmission channel based on the transmission requirement includes:

[0021] In a case where the transmission requirement is to transfer the data to be transmitted to a new data transmission channel, a target data transmission channel is created based on the type of data to be transmitted in the transmission requirement.

[0022] The data communication method provided in this embodiment can meet the needs of data transmission requests sent by multiple clients by creating a target data channel according to the transmission requirements and the type of data to be transmitted, so that multiple clients can transmit data through the channel between the network service end and the serial port of the server, thereby improving data processing efficiency.

[0023] In an optional embodiment, the method further includes:

[0024] If multiple data transmission requests sent by the network service end are received at the same time, the multiple data transmission requests are processed and sorted;

[0025] The multiple data transmission requests are processed in sequence according to the result of the processing sorting.

[0026] The data communication method provided in this embodiment processes and sorts the data transmission requests when multiple data transmission requests sent by the network service end are received at the same time, so as to process the multiple data transmission requests in sequence to prevent data transmission confusion and data transmission errors.

[0027] In an optional implementation, the processing and sorting of the multiple data transmission requests includes:

[0028] Obtaining client transmission channel identifiers corresponding to the multiple data transmission requests;

[0029] The multiple data transmission requests are processed and sorted based on the order of the client transmission channel identifiers.

[0030] The data communication method provided in this embodiment obtains the client transmission channel identifiers corresponding to multiple data transmission requests, and processes and sorts the multiple data transmission requests in the order of the client transmission channel identifiers to ensure the orderly processing of the data transmission requests and avoid data transmission confusion.

[0031] In a second aspect, the present invention provides a data communication method, applied to a network service end, the method comprising:

[0032] Establish a connection with the server's serial port;

[0033] Receiving data transmission requests sent by multiple clients through their corresponding client transmission channels;

[0034] Send the data transmission request to the serial port of the server so that the serial port receives the data transmission request, parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, and sends the response message to the network service end;

[0035] Receiving the response information, parsing the response information, and obtaining response data;

[0036] The response data is sent to the corresponding client.

[0037] The data communication method provided in this embodiment establishes a connection between the serial port of the server and the network service end, uses the network service end to receive data transmission requests sent by multiple clients through their corresponding client transmission channels, uses the connection channel between the serial port of the server and the network service end to send the received data transmission requests of multiple clients to the serial port of the server, so that the serial port of the server parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, so that the target transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, sends the response message to the network service end, and the network service end parses the response message to obtain the response data, and sends the response data to the corresponding client. By using the only channel between the network service end and the serial port of the server to realize the data transmission of multiple clients, the parallel access to the serial port of the server is realized, and the data processing efficiency is improved.

[0038] In an optional implementation, establishing a connection with a serial port of a server includes:

[0039] Determining a connection command based on address information of a baseboard management controller of the server;

[0040] The connection command is run to establish a connection between the network server and the baseboard management controller, and the baseboard management controller is connected to the serial port of the server.

[0041] The data communication method provided in this embodiment establishes a connection between a network server and a baseboard management controller, which is connected to a serial port of a server, and then establishes a connection between the network server and the serial port of the server, thereby realizing data communication between multiple clients connected to the network server and the serial port of the server.

[0042] In an optional implementation, sending the data transmission request to the serial port of the server includes:

[0043] For any data transmission request, parse the data transmission request to obtain transmission requirements;

[0044] Determining the serial port of the target server according to the transmission requirement;

[0045] The data transfer request is sent to the serial port of the target server.

[0046] The data communication method provided in this embodiment determines the serial port of the target server according to the transmission requirements, so that the client can communicate data with the serial ports of multiple servers connected to the network service end, thereby realizing data communication between the client and the serial ports of multiple servers.

[0047] In an optional embodiment, the method further includes:

[0048] If multiple data transmission requests are received from multiple clients at the same time, the multiple data transmission requests are sorted for transmission;

[0049] According to the result of the sending sequence, multiple data transmission requests are sent to the serial port of the server in sequence.

[0050] The data communication method provided in this embodiment, when receiving multiple data transmission requests sent by multiple clients at the same time, sorts the data transmission requests so as to send the multiple data transmission requests in sequence, so as to prevent data transmission confusion and data transmission errors.

[0051] In an optional implementation, the sending order of the multiple data transmission requests includes:

[0052] Obtaining client transmission channel identifiers corresponding to the multiple data transmission requests;

[0053] The multiple data transmission requests are sent in a sequence based on the sequence of the client transmission channel identifiers.

[0054] The data communication method provided in this embodiment obtains the client transmission channel identifiers corresponding to multiple data transmission requests, and sorts the multiple data transmission requests in the order of the client transmission channel identifiers to ensure the orderly sending of the data transmission requests and avoid data transmission confusion.

[0055] In an optional implementation manner, parsing the response information to obtain response data includes:

[0056] The response information is parsed to obtain response data and a target data transmission channel identifier.

[0057] The data communication method provided in this embodiment obtains the target data transmission channel identifier in the response information, and then determines the corresponding target client transmission channel identifier, thereby ensuring that the response data can be accurately sent to the specified client and avoiding data transmission errors.

[0058] In an optional implementation, the sending the response data to the corresponding client includes:

[0059] Receive the correspondence between the target client transmission channel identifier and the target data transmission channel identifier;

[0060] Based on the correspondence between the target client transmission channel identifier and the target data transmission channel identifier, updating the preset channel correspondence table;

[0061] Based on the preset channel correspondence table, determining a target client transmission channel identifier corresponding to the target data transmission channel identifier;

[0062] Based on the target client transmission channel identifier, sending the response data to the corresponding client;

[0063] Among them, the serial port of the server parses the data transmission request, obtains the target client transmission channel identifier, the data to be transmitted and the transmission requirements, and sends the correspondence between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel to the network service end.

[0064] The data communication method provided in this embodiment maintains and updates the preset channel correspondence table, parses the response information and determines the target client transmission channel identifier based on the preset channel correspondence table, so that the response data can be sent to the corresponding client quickly and accurately, thereby improving processing efficiency and avoiding data transmission errors.

[0065] In a third aspect, the present invention provides a data communication device, applied to a serial port of a server, the device comprising:

[0066] A first establishing module, used to establish a connection with a network server;

[0067] A first receiving module is used to receive a data transmission request sent by the network server, wherein the network server receives data transmission requests sent by multiple clients through their corresponding client transmission channels, and sends the data transmission requests to the serial port of the server;

[0068] A first parsing module, used to parse the data transmission request to obtain the data to be transmitted and the transmission requirements;

[0069] A first determining module, configured to determine a target data transmission channel based on the transmission requirement;

[0070] A first sending module, used for sending the data to be transmitted to the target data transmission channel, so that the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port;

[0071] The second receiving module is used to receive the response information and send the response information to the network server, so that the network server receives the response information, parses the response information, obtains response data, and sends the response data to the corresponding client.

[0072] In a fourth aspect, the present invention provides a data communication device, applied to a network service end, the device comprising:

[0073] A second establishing module is used to establish a connection with a serial port of a server;

[0074] A third receiving module is used to receive data transmission requests sent by multiple clients through their corresponding client transmission channels;

[0075] A second sending module is used to send the data transmission request to the serial port of the server, so that the serial port receives the data transmission request, parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, and sends the response message to the network service end;

[0076] A fourth receiving module, used to receive the response information, parse the response information, and obtain response data;

[0077] The third sending module is used to send the response data to the corresponding client.

[0078] In a fifth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data communication method of the first aspect or any corresponding embodiment thereof or the data communication method of the second aspect or any corresponding embodiment thereof by executing the computer instructions.

[0079] In a sixth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data communication method of the first aspect or any corresponding embodiment thereof or the data communication method of the second aspect or any corresponding embodiment thereof.

[0080] In a seventh aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the data communication method of the first aspect or any corresponding embodiment thereof or the data communication method of the second aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0082] Figure 1 is a schematic diagram of establishing a SOL connection in the related art;

[0083] Figure 2 is a flow chart of a data communication method according to an embodiment of the present invention;

[0084] Figure 3 is a schematic diagram of a structure for performing data communication according to an embodiment of the present invention;

[0085] Figure 4 is a flow chart of another data communication method according to an embodiment of the present invention;

[0086] Figure 5 is a schematic diagram of a data transmission request according to an embodiment of the present invention;

[0087] Figure 6 is a schematic diagram of a process of performing data communication according to an embodiment of the present invention;

[0088] Figure 7 is a flow chart of another data communication method according to an embodiment of the present invention;

[0089] Figure 8 is a flow chart of yet another data communication method according to an embodiment of the present invention;

[0090] Fig. 9 is a schematic diagram of establishing connections between a network service end and serial ports of different servers according to an embodiment of the present invention;

[0091] Fig.10 is a schematic diagram of establishing connections between another network service end and serial ports of different servers according to an embodiment of the present invention;

[0092] Fig.11 is a structural block diagram of a data communication device according to an embodiment of the present invention;

[0093] Fig.12 is a structural block diagram of another data communication device according to an embodiment of the present invention;

[0094] Fig.13 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0095] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0096] In the field of server management, the Intelligent Platform Management Interface (IPMI) has become standard. IPMI is an open standard hardware management interface specification that defines a specific method for embedded management subsystems to communicate. It allows system administrators to manage computer systems through an interface that is independent of the operating system and hardware manufacturers. IPMI provides a standardized method to monitor system health, event logs, power management, temperature, fan speed, voltage and other information, as well as remote control and recovery of the system.

[0097] Figure 1 FIG. 1 is a schematic diagram of establishing a SOL connection in the related art. Figure 1 As shown in the figure, when the server has no network or the system on the server has no IP address configured, the client uses the ipmitool tool to execute the ipmitool command to establish a SOL connection, that is, to start the SOL function. The SOL function is a remote access technology that allows the client to remotely access the serial port (serial port) of the server through a network (LAN) connection, thereby realizing data transmission between the client and the serial port of the server through the network. This function allows administrators to access the console of the server from a remote location, so it is often used for remote diagnosis and troubleshooting. Among them, the ipmitool tool is a command line tool widely used in Linux systems, allowing users to manage and monitor computer hardware through the IPMI standard.

[0098] It should be noted that Figure 1 The terminal in the example is the client. The serial port is usually the ttyS0 serial port. The program that monitors ttyS0 is used to monitor the status of the ttyS0 serial port.

[0099] The client sends and receives data through the LAN, and the server receives and sends data through the serial port. This is the basic way of a SOL connection.

[0100] Normally, a SOL session is exclusive, that is, only one user or client is allowed to connect to the serial console or serial port of the server through SOL at the same time to avoid command conflicts and data confusion.

[0101] However, due to the exclusivity of the server's serial port (i.e., once a program opens the serial port, other programs cannot open the serial port), when a client connects to the server's serial port through SOL, other clients cannot connect to the server's serial port to communicate with the server's serial port, that is, only one SOL connection can be established. If different scenarios require opening an established SOL connection, the established SOL connection must be closed before a new SOL connection can be established and opened, resulting in the client being unable to access the server's serial port in parallel, resulting in low data processing efficiency.

[0102] An embodiment of the present invention provides a data communication method, which establishes a connection between a serial port of a server and a network service end, uses the network service end to receive data transmission requests sent by multiple clients through their corresponding client transmission channels, and uses the connection channel between the serial port of the server and the network service end to send the received data transmission requests of the multiple clients to the serial port of the server, so that the serial port of the server parses the data transmission request to obtain the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, so that the target transmission channel processes the data to be transmitted, and after the processing is completed, sends response information to the serial port, the serial port receives the response information, and sends the response information to the network service end, the network service end parses the response information to obtain the response data, and sends the response data to the corresponding client to achieve the effect of realizing multiple clients to access the serial port of the server in parallel and improving the data processing efficiency.

[0103] According to an embodiment of the present invention, a data communication method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0104] In this embodiment, a data communication method is provided, which can be used for the serial port of the server. Figure 2 is a flow chart of a data communication method according to an embodiment of the present invention. Figure 2As shown, the process includes the following steps:

[0105] Step S201, establishing a connection with a network server.

[0106] Among them, the network server is the socket server.

[0107] The server is a bare metal node, a node without a network. The server's serial port establishes a SOL connection with the network server, and data communication can be carried out with the network server through LAN.

[0108] Step S202, receiving a data transmission request sent by the network server, wherein the network server receives the data transmission requests sent by multiple clients through their corresponding client transmission channels, and sends the data transmission requests to the serial port of the server.

[0109] in, Figure 3 Schematic diagram of the structure of data communication according to an embodiment of the present invention. Figure 3 As shown, the network server can be accessed by multiple clients, and the multiple clients communicate data with the serial port of the server through the connection channel between the network server and the serial port of the server.

[0110] The client transmission channel may be a virtual device, a virtual socket connection, or an input / output file or other form that can realize input / output functions.

[0111] Multiple clients send data transmission requests for the serial port of the server to the network service end, and the network service end sends the data transmission request to the serial port of the server through a connection channel with the serial port of the server.

[0112] Step S203: parse the data transmission request to obtain the data to be transmitted and the transmission requirements.

[0113] After receiving the data transmission request sent by the network service end, the serial port of the server parses the data transmission request to obtain the data to be transmitted and the transmission requirements in the data transmission request. The serial port of the server is the ttyS0 serial port.

[0114] Step S204: determining a target data transmission channel based on the transmission requirement.

[0115] After the transmission requirement is obtained, a target data transmission channel is determined according to the transmission requirement.

[0116] It should be noted that the data transmission channel can be a virtual serial port, a virtual device, a virtual connection, or an input and output file, etc. Figure 3 As shown, the serial port of the server corresponds to multiple data transmission channels, among which, Figure 3 In the example, a data transmission channel is a virtual serial port. According to the transmission requirements, a target data transmission channel among multiple data transmission channels is determined.

[0117] Each data transmission channel corresponds to a program for monitoring the data transmission channel, and the program for monitoring the data transmission channel is used to monitor the data transmission channel.

[0118] Step S205, sending the data to be transmitted to the target data transmission channel, so that the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends response information to the serial port.

[0119] The program monitoring the target data transmission channel sends a response message to the target data transmission channel after monitoring that the processing of the data to be transmitted is completed, and the target data transmission channel sends the response message to the serial port of the server.

[0120] Step S206, receiving the response information, and sending the response information to the network server, so that the network server receives the response information, parses the response information, obtains response data, and sends the response data to the corresponding client.

[0121] The network server sends the response data in the response information to the client that sends the data transmission request corresponding to the response data, thereby realizing data communication between the serial port of the client and the server.

[0122] The data communication method provided in this embodiment establishes a connection between the serial port of the server and the network service end, uses the network service end to receive data transmission requests sent by multiple clients through their corresponding client transmission channels, uses the connection channel between the serial port of the server and the network service end to send the received data transmission requests of multiple clients to the serial port of the server, so that the serial port of the server parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, so that the target transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, sends the response message to the network service end, and the network service end parses the response message to obtain the response data, and sends the response data to the corresponding client. By using the only channel between the network service end and the serial port of the server to realize the data transmission of multiple clients, the parallel access to the serial port of the server is realized, and the data processing efficiency is improved.

[0123] The data communication method provided in this embodiment, by adding virtual devices or connections, multiple virtual devices and connections transmit data with the serial port of the server through the SOL connection between the network service end and the serial port of the server, thereby realizing expansion on one SOL connection, expanding one SOL connection into multiple communication connections, and maintaining the original SOL function, the effect of communication between multiple clients and the serial port of the server can be carried out at the same time. For example, when a terminal console is opened on a bare metal node (the original function can only open one terminal console), a new terminal console is opened, and the two terminal consoles do not affect each other. On the basis of opening other functions, other applications can be run, such as transferring files, changing passwords, changing configurations, and querying logs.

[0124] In this embodiment, a data communication method is provided, which can be used for the serial port of the server. Figure 4 is a flow chart of a data communication method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0125] Step S401: Establish a connection with the network server. Figure 2 Step S201 of the illustrated embodiment will not be described in detail here.

[0126] Step S402, receiving a data transmission request sent by the network server, wherein the network server receives data transmission requests sent by multiple clients through their corresponding client transmission channels, and sends the data transmission requests to the serial port of the server. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.

[0127] Step S403: parse the data transmission request to obtain the data to be transmitted and the transmission requirements.

[0128] Specifically, the above step S403 includes:

[0129] Step S4031, parsing the data transmission request to obtain the target client transmission channel identifier, the data to be transmitted and the transmission requirements.

[0130] Among them, multiple data transmission requests need to achieve data isolation, otherwise the data transmitted on the same SOL connection will be confused. In this embodiment, each client transmission channel is assigned a unique client transmission channel identifier (ID), and each client and the network server perform data transmission through a unique client transmission channel.

[0131] After receiving the data transmission request sent by the client, the network server encapsulates the client transmission channel identifier corresponding to the client into the data transmission request, and then sends the data transmission request to the serial port of the server. In this way, the serial port of the server can know which client the data transmission request comes from, thereby realizing data isolation.

[0132] Figure 5 FIG. 1 is a schematic diagram of a data transmission request according to an embodiment of the present invention. Figure 5 As shown, the data transmission request may include a channel ID, that is, a client transmission channel identifier, and the channel data, that is, data to be transmitted. The transmission requirements are not shown in the figure.

[0133] Step S404: determine a target data transmission channel based on the transmission requirement.

[0134] Specifically, the above step S404 includes:

[0135] Step S4041: When the transmission requirement is to transfer the data to be transmitted to a new data transmission channel, a target data transmission channel is created based on the type of data to be transmitted in the transmission requirement.

[0136] The data transmission request is parsed to obtain the data to be transmitted, the transmission requirement and the target client transmission channel identifier. If the transmission requirement is to transfer the data to be transmitted to a new data transmission channel, a target data transmission channel is created according to the type of data to be transmitted in the transmission requirement, and a corresponding target data transmission channel identifier is allocated to the target data transmission channel.

[0137] It can be understood that, if the transmission requirement is to transmit the data to be transmitted to an existing data transmission channel, the target data transmission channel is determined according to the target data transmission channel identifier in the transmission requirement.

[0138] It should be noted that the transmission requirement may be to transfer the data to be transmitted to multiple new data transmission channels, and then multiple target data transmission channels are created according to the multiple types of data to be transmitted in the transmission requirement.

[0139] The transmission requirement may also be to transmit the data to be transmitted to multiple existing data transmission channels, and then multiple target data transmission channels are determined according to multiple target data transmission channel identifiers in the transmission requirement.

[0140] The transmission requirement may also be to transmit the data to be transmitted to several new data transmission channels and several existing data transmission channels. Then, the corresponding target data transmission channel is determined according to several target data transmission channel identifiers in the transmission requirement and several target data transmission channels created according to several types of data to be transmitted in the transmission requirement.

[0141] Step S405, sending the data to be transmitted to the target data transmission channel, so that the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port. Figure 2 Step S205 of the illustrated embodiment will not be described in detail here.

[0142] Step S406: Receive the response information and send the response information to the network server, so that the network server receives the response information, parses the response information, obtains the response data, and sends the response data to the corresponding client. Figure 2 Step S206 of the illustrated embodiment will not be described in detail here.

[0143] The data communication method provided in this embodiment can ensure that the response data is accurately sent to the specified client by obtaining the target client transmission channel identifier in the data transmission request, thereby avoiding data transmission errors. By adding the target client transmission channel identifier in the data transmission request to control the accurate link of the data transmission, the isolation of multi-channel data is achieved.

[0144] The data communication method provided in this embodiment can meet the needs of data transmission requests sent by multiple clients by creating a target data channel according to the transmission requirements and the type of data to be transmitted, so that multiple clients can transmit data through the channel between the network service end and the serial port of the server, thereby improving data processing efficiency.

[0145] In some optional implementations, each data transmission channel corresponds to a unique data transmission channel identifier, and before sending the data to be transmitted to the target data transmission channel, the data communication method further includes:

[0146] Step a1, sending the correspondence between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel to the network server, so that the network server updates the preset channel correspondence table based on the correspondence between the target client transmission channel identifier and the target data transmission channel identifier, and after receiving the response information, parsing the response information to obtain the response data and the target data transmission channel identifier, based on the preset channel correspondence table, determining the target client transmission channel identifier corresponding to the target data transmission channel identifier, and based on the target client transmission channel identifier, sending the response data to the corresponding client.

[0147] The preset channel correspondence table is initially empty. The network client updates the preset channel correspondence table based on the correspondence between the target client transmission channel identifier and the target data transmission channel identifier, including:

[0148] If the preset channel correspondence table does not contain the target client transmission channel identifier and the target data transmission channel identifier, the correspondence between the target client transmission channel identifier and the target data transmission channel identifier is added to the preset channel correspondence table.

[0149] If the target client transmission channel identifier exists in the preset channel correspondence table, the existing correspondence of the target client transmission channel identifier in the preset channel correspondence table is updated to the correspondence between the target client transmission channel identifier and the target data transmission channel identifier.

[0150] If the target data transmission channel identifier exists in the preset channel correspondence table, the existing correspondence of the target data transmission channel identifier in the preset channel correspondence table is updated to the correspondence between the target client transmission channel identifier and the target data transmission channel identifier.

[0151] In order to make the data communication method provided by this embodiment clearer, it is described in conjunction with a specific example.

[0152] Figure 6 FIG. 1 is a flow chart of data communication according to an embodiment of the present invention. Figure 6As shown, 1. The access client, i.e., terminal A, on the network server sends the data "hello" through its corresponding client transmission channel. It should be noted that a transmission requirement is also sent at the same time, which is not shown here. The client transmission channel corresponding to the client transmission channel is identified as 100001. 2. The network server encapsulates the data "hello" sent by the client as "100001+hello". 3. The network server sends "100001+hello" to the serial port ttyS0 of the server through the LAN. 4. After receiving "100001+hello", the serial port ttyS0 of the server unpacks it and obtains "hello". According to the transmission requirement, the target data transmission channel is determined to be virtual serial port 1, wherein the data transmission channel identification of virtual serial port 1 is 200001. 5. The serial port ttyS0 of the server sends "hello" to virtual serial port 1. After receiving "hello", virtual serial port 1 processes it. After the program that monitors virtual serial port 1 completes the processing of virtual serial port 1, it sends the response message "welcome" to virtual serial port 1 as the program's response to "hello". 6. Virtual serial port 1 encapsulates "welcome" as "200001+welcome" and sends the encapsulated data to serial port ttyS0. 7. Serial port ttyS0 sends "200001+welcome" to the network server through LAN. 8. The network server receives "200001+welcome", decapsulates it, obtains "welcome", and determines that the client transmission channel identifier is 100001 according to the preset channel correspondence table and 200001. 9. The network server determines the target client transmission channel according to the client transmission channel identifier 100001, and sends "welcome" to terminal A through the target client transmission channel to achieve data communication.

[0153] The data communication method provided in this embodiment maintains and updates the preset channel correspondence table, parses the response information and determines the target client transmission channel identifier based on the preset channel correspondence table, so that the response data can be sent to the corresponding client quickly and accurately, thereby improving processing efficiency and avoiding data transmission errors.

[0154] In some optional implementations, the data communication method further includes:

[0155] Step b1: if multiple data transmission requests sent by the network server are received at the same time, the multiple data transmission requests are processed and sorted.

[0156] Among them, since multiple clients correspond to one SOL connection in this embodiment, the network server may receive multiple data transmission requests simultaneously. If the network server sends the multiple received data transmission requests to the serial port of the server at the same time, it will cause the serial port of the server to be unable to process the data transmission requests orderly, resulting in data chaos.

[0157] In this embodiment, when the serial port of the server receives multiple data transmission requests sent by the network server at the same time, the multiple data transmission requests are sorted for processing, and the multiple data transmission requests are cached.

[0158] Step b2: Process the multiple data transmission requests in sequence according to the result of the processing sorting.

[0159] After sorting the processing of the multiple data transmission requests, according to the result of the sorted processing, the multiple data transmission requests are processed in order.

[0160] The data communication method provided by this embodiment, by sorting the processing of the data transmission requests when receiving multiple data transmission requests sent by the network server at the same time, so as to process the multiple data transmission requests in sequence, in case of data transmission chaos, resulting in data transmission errors.

[0161] In some alternative embodiments, step b1 above includes:

[0162] Step b11: Obtain the client transmission channel identifiers corresponding to the multiple data transmission requests.

[0163] Among them, the multiple data transmission requests are parsed to obtain the client transmission channel identifiers in each data transmission request.

[0164] Step b12: Sort the processing of the multiple data transmission requests based on the order of the client transmission channel identifiers.

[0165] When the client transmission channel identifiers in the multiple data transmission requests are obtained, the processing of the multiple data transmission requests is sorted according to the order of the client transmission channel identifiers.

[0166] It should be noted that the technical personnel assign corresponding client transmission channel identifiers to each client transmission channel and set the sequence of the client transmission channel identifiers.

[0167] The data communication method provided by this embodiment, by obtaining the client transmission channel identifiers corresponding to the multiple data transmission requests and sorting the processing of the multiple data transmission requests according to the order of the client transmission channel identifiers, to ensure the orderly processing of the data transmission requests and avoid data transmission chaos.

[0168] In this embodiment, a data communication method is provided, which can be used in a network service end. Figure 7 is a flow chart of a data communication method according to an embodiment of the present invention. Figure 7 As shown, the process includes the following steps:

[0169] Step S701: Establish a connection with a serial port of a server.

[0170] Step S702: receiving data transmission requests sent by multiple clients through their corresponding client transmission channels.

[0171] Step S703, sending a data transmission request to the serial port of the server so that the serial port receives the data transmission request, parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, and sends the response message to the network server.

[0172] Step S704, receiving response information, parsing the response information, and obtaining response data.

[0173] Step S705: sending the response data to the corresponding client.

[0174] The detailed description of each step of the data communication method is as follows Figure 2 The detailed description of the corresponding steps in the embodiment is the same and will not be repeated here.

[0175] The data communication method provided in this embodiment establishes a connection between the serial port of the server and the network service end, uses the network service end to receive data transmission requests sent by multiple clients through their corresponding client transmission channels, uses the connection channel between the serial port of the server and the network service end to send the received data transmission requests of multiple clients to the serial port of the server, so that the serial port of the server parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, so that the target transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, sends the response message to the network service end, and the network service end parses the response message to obtain the response data, and sends the response data to the corresponding client. By using the only channel between the network service end and the serial port of the server to realize the data transmission of multiple clients, the parallel access to the serial port of the server is realized, and the data processing efficiency is improved.

[0176] In this embodiment, a data communication method is provided, which can be used in a network service end. Figure 8 is a flow chart of a data communication method according to an embodiment of the present invention. Figure 8 As shown, the process includes the following steps:

[0177] Step S801: Establish a connection with a serial port of a server.

[0178] Specifically, the above step S801 includes:

[0179] Step S8011: determining a connection command based on the address information of the baseboard management controller of the server.

[0180] Wherein, establishing a connection between the network service end and the serial port of the server is essentially establishing a connection between the network service end and the baseboard management controller, and establishing a connection between the baseboard management controller and the serial port of the server.

[0181] Taking establishing a connection between a network service end and a serial port of any server as an example, illustratively, the address information of the baseboard management controller of the server is 10.10.10.10, and the connection command is determined to be ipmitool –I lanplus –H10.10.10.10 –L ADMINISTRATOR –U user –U password sol active.

[0182] Step S8012, running a connection command to establish a connection between the network server and the baseboard management controller, and the baseboard management controller is connected to the serial port of the server.

[0183] Among them, a connection command is run on the machine where the network server is located to establish a connection between the network server and the baseboard management controller, and the baseboard management controller is connected to the serial port of the server, thereby realizing the connection between the network server and the serial port of the server.

[0184] Step S802: Receive data transmission requests sent by multiple clients through their corresponding client transmission channels. Figure 7 Step S702 of the illustrated embodiment will not be described in detail here.

[0185] Step S803, sending a data transmission request to the serial port of the server so that the serial port receives the data transmission request, parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, and sends the response message to the network server.

[0186] Specifically, the above step S803 includes:

[0187] Step S8031: for any data transmission request, parse the data transmission request to obtain the transmission requirement.

[0188] The network service end can establish connections with serial ports of multiple servers. In order to determine the serial port of the target server to which the data transmission request is to be transmitted, the data transmission request needs to be parsed to obtain the transmission requirement.

[0189] Fig. 9 FIG. 1 is a schematic diagram of establishing a connection between a network service end and serial ports of different servers according to an embodiment of the present invention. Fig. 9 As shown, the network service end establishes a SOL connection with the serial port of one of the servers, and the data transmission requests issued by the three clients connected to the network service end can communicate data through the three data transmission channels corresponding to the serial port ttyS0 of the server through the LAN. Among them, the client transmission channel identifiers corresponding to the client transmission channels corresponding to the three clients are A-1-1, A-1-2, and A-1-3 respectively, and the data transmission channel identifiers corresponding to the three data transmission channels are S-1-1, S-1-2, and S-1-3 respectively.

[0190] The network service end establishes a SOL connection with the serial port of another server, and the data transmission requests issued by the three clients connected to the network service end can communicate data through the three data transmission channels corresponding to the serial port ttyS0 of the server through the LAN. The client transmission channel identifiers corresponding to the client transmission channels corresponding to the three clients are A-2-1, A-2-2, and A-2-3, respectively, and the data transmission channel identifiers corresponding to the three data transmission channels are S-2-1, S-2-2, and S-2-3, respectively.

[0191] In this case, the client in one SOL connection corresponding to the network server cannot communicate with the data channel in another SOL connection.

[0192] To solve this problem, the embodiment of the present invention connects data between different SOL connections of the network server. Fig.10Schematic diagram of establishing connection between a network service end and serial ports of different servers according to an embodiment of the present invention, such as Fig.10 As shown, the embodiment of the present invention realizes data connectivity by forwarding different SOL connections of the network service end through multiple SOL connections.

[0193] When the data transmission request of channel A1-1-1 needs to be sent to channel S-2-1, the data transmission request of channel A1-1-1 is forwarded to the SOL2 connection through the multi-SOL connection forwarding in the network server, that is, the data transmission request of channel A1-1-1 can be sent to channel S-2-1 through the SOL2 connection. The response information of channel S-2-1, after being transmitted through the SOL2 connection, also needs to be forwarded to channel A1-1-1.

[0194] It should be noted that to achieve cross-SOL connection communication, it is necessary to ensure that the client transmission channel identifier and the data transmission channel identifier are globally unique.

[0195] Step S8032, determining the serial port of the target server according to the transmission requirements.

[0196] After the transmission request is obtained, the serial port of the target server in the transmission request is obtained, that is, the serial port to which the data transmission request is to be transmitted.

[0197] Step S8033, sending a data transmission request to the serial port of the target server so that the serial port of the target server receives the data transmission request, parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, and sends the response message to the network server.

[0198] After the serial port to which the data transmission request is to be transmitted is known, the data transmission request is sent to the serial port of the corresponding target server.

[0199] Step S804: Receive response information, parse the response information, and obtain response data. Figure 7 Step S704 of the illustrated embodiment will not be described in detail here.

[0200] Step S805: Send the response data to the corresponding client. Figure 7 Step S705 of the illustrated embodiment will not be described in detail here.

[0201] The data communication method provided in this embodiment establishes a connection between a network server and a baseboard management controller, which is connected to a serial port of a server, and then establishes a connection between the network server and the serial port of the server, thereby realizing data communication between multiple clients connected to the network server and the serial port of the server.

[0202] The data communication method provided in this embodiment can connect through a node that can establish an SOL connection when a certain node cannot establish an SOL connection. For example, a command can be executed on a terminal that cannot establish an SOL connection, and then communication can be carried out through other nodes that can establish an SOL connection.

[0203] In some optional implementations, the data communication method further includes:

[0204] Step c1: if multiple data transmission requests sent by multiple clients are received at the same time, the multiple data transmission requests are sorted for sending.

[0205] Among them, since multiple clients correspond to one SO1 connection in this embodiment, the network server may receive multiple data transmission requests sent by multiple clients at the same time. In this case, if the multiple data transmission requests are sent to the corresponding server's port serial port, data confusion may occur. Therefore, when the network server receives multiple data transmission requests sent by multiple clients at the same time, it sorts the multiple data transmission requests and caches the data transmission requests.

[0206] Step c2: sending multiple data transmission requests to the serial port of the server in sequence according to the result of the sending sorting.

[0207] After the multiple data transmission requests are sorted for transmission, the multiple data transmission requests are sequentially sent to the serial ports of the corresponding servers according to the result of the sending sorting.

[0208] The data communication method provided in this embodiment, when receiving multiple data transmission requests sent by multiple clients at the same time, sorts the data transmission requests so as to send the multiple data transmission requests in sequence, so as to prevent data transmission confusion and data transmission errors.

[0209] In some optional implementations, the above step c1 includes:

[0210] Step c11: obtaining client transmission channel identifiers corresponding to multiple data transmission requests.

[0211] The multiple data transmission requests are parsed to obtain the client transmission channel identifier in each data transmission request.

[0212] Step c12: sorting the multiple data transmission requests based on the order of the client transmission channel identifiers.

[0213] When the client transmission channel identifiers in the multiple data transmission requests are obtained, the multiple data transmission requests are sorted for sending according to the order of the client transmission channel identifiers.

[0214] The data communication method provided in this embodiment obtains the client transmission channel identifiers corresponding to multiple data transmission requests, and sorts the multiple data transmission requests in the order of the client transmission channel identifiers to ensure the orderly sending of the data transmission requests and avoid data transmission confusion.

[0215] In some optional implementations, the above step S804 includes:

[0216] Step d1, parse the response information to obtain the response data and the target data transmission channel identifier.

[0217] Each data transmission channel corresponds to a unique data transmission channel identifier. After receiving the response information, the serial port of the server encapsulates the target data transmission channel identifier of the target data transmission channel corresponding to the response information in the response information, and then sends the response information to the network service end.

[0218] The network server parses the response information, obtains the response data and the target data transmission channel identifier, and then determines the corresponding target client transmission channel identifier based on the target data transmission channel identifier, and then determines the target client, and sends the response data to the target client.

[0219] The data communication method provided in this embodiment obtains the target data transmission channel identifier in the response information, and then determines the corresponding target client transmission channel identifier, thereby ensuring that the response data can be accurately sent to the specified client and avoiding data transmission errors.

[0220] In some optional implementations, the above step S805 includes:

[0221] Step e1: receiving a correspondence between a target client transmission channel identifier and a target data transmission channel identifier.

[0222] Step e2: updating the preset channel correspondence table based on the correspondence between the target client transmission channel identifier and the target data transmission channel identifier.

[0223] Step e3: determining the target client transmission channel identifier corresponding to the target data transmission channel identifier based on the preset channel correspondence table.

[0224] After the target data transmission channel identifier is obtained, the target client transmission channel identifier corresponding to the target data transmission channel identifier is determined according to a preset channel correspondence table.

[0225] Step e4: based on the target client transmission channel identifier, send the response data to the corresponding client.

[0226] Among them, the server's serial port parses the data transmission request, obtains the target client transmission channel identifier, the data to be transmitted and the transmission requirements, and sends the correspondence between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel to the network service end.

[0227] After the target client transmission channel identifier is determined, that is, the target client transmission channel is determined, the response data is sent to the corresponding client, that is, the target client, through the target client transmission channel to achieve communication between the serial ports of the client and the server.

[0228] It is understandable that, with respect to the data communication method provided in this embodiment, relevant technical standards and communication protocols for data transmission may be formulated so as to carry out technical development and expansion on this basis.

[0229] The data communication method provided in this embodiment maintains and updates the preset channel correspondence table, parses the response information and determines the target client transmission channel identifier based on the preset channel correspondence table, so that the response data can be sent to the corresponding client quickly and accurately, thereby improving processing efficiency and avoiding data transmission errors.

[0230] In the present embodiment, a data communication device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0231] This embodiment provides a data communication device, which is applied to a serial port of a server, such as Fig.11 As shown, including:

[0232] The first establishing module 1101 is used to establish a connection with a network server.

[0233] The first receiving module 1102 is used to receive a data transmission request sent by a network server, wherein the network server receives data transmission requests sent by multiple clients through their corresponding client transmission channels, and sends the data transmission requests to the serial port of the server.

[0234] The first parsing module 1103 is used to parse the data transmission request to obtain the data to be transmitted and the transmission requirements.

[0235] The first determination module 1104 is configured to determine a target data transmission channel based on a transmission requirement.

[0236] The first sending module 1105 is used to send the data to be transmitted to the target data transmission channel, so that the target data transmission channel processes the data to be transmitted, and sends response information to the serial port after the processing is completed.

[0237] The second receiving module 1106 is used to receive the response information and send the response information to the network server, so that the network server receives the response information, parses the response information, obtains response data, and sends the response data to the corresponding client.

[0238] In some optional implementations, the first determining module 1104 includes:

[0239] The first creating unit is configured to create a target data transmission channel based on the type of data to be transmitted in the transmission requirement when the transmission requirement is to transfer the data to be transmitted to a new data transmission channel.

[0240] In some optional implementations, the first parsing module 1103 includes:

[0241] The first parsing unit is used to parse the data transmission request to obtain the target client transmission channel identifier, the data to be transmitted and the transmission requirement.

[0242] In some optional implementations, before sending the data to be transmitted to the target data transmission channel, the data communication device further includes:

[0243] The first sending unit is used to send the correspondence between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel to the network server, so that the network server updates the preset channel correspondence table based on the correspondence between the target client transmission channel identifier and the target data transmission channel identifier, and after receiving the response information, parses the response information to obtain the response data and the target data transmission channel identifier, determines the target client transmission channel identifier corresponding to the target data transmission channel identifier based on the preset channel correspondence table, and sends the response data to the corresponding client based on the target client transmission channel identifier.

[0244] In some optional implementations, the data communication device further includes:

[0245] The first sorting unit is used to process and sort multiple data transmission requests if multiple data transmission requests sent by the network service end are received at the same time.

[0246] The first processing unit is used to process multiple data transmission requests in sequence according to the result of processing sorting.

[0247] In some optional implementations, the first sorting unit includes:

[0248] The first acquisition unit is used to acquire client transmission channel identifiers corresponding to multiple data transmission requests.

[0249] The second sorting unit is used to process and sort the multiple data transmission requests based on the order of the client transmission channel identifiers.

[0250] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0251] The data communication device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0252] This embodiment provides a data communication device, which is applied to a network service end, such as Fig.12 As shown, including:

[0253] The second establishing module 1201 is used to establish a connection with a serial port of a server.

[0254] The third receiving module 1202 is configured to receive data transmission requests sent by multiple clients through their corresponding client transmission channels.

[0255] The second sending module 1203 is used to send a data transmission request to the serial port of the server, so that the serial port receives the data transmission request, parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, and sends the response message to the network server.

[0256] The fourth receiving module 1204 is used to receive the response information, parse the response information, and obtain the response data.

[0257] The third sending module 1205 is used to send the response data to the corresponding client.

[0258] In some optional implementations, the second establishing module 1201 includes:

[0259] The first determining unit is used to determine a connection command based on address information of a baseboard management controller of the server.

[0260] The first operation unit is used to execute a connection command to establish a connection between the network server and the baseboard management controller, and the baseboard management controller is connected to the serial port of the server.

[0261] In some optional implementations, the second sending module 1203 includes:

[0262] The second acquisition unit is used to parse any data transmission request to obtain a transmission requirement.

[0263] The second determining unit is used to determine the serial port of the target server according to the transmission requirement.

[0264] The second sending unit is used to send the data transmission request to the serial port of the target server.

[0265] In some optional implementations, the data communication device further includes:

[0266] The third sorting unit is used to sort the multiple data transmission requests if multiple data transmission requests sent by multiple clients are received at the same time.

[0267] The third sending unit is used to send multiple data transmission requests to the serial port of the server in sequence according to the result of the sending sorting.

[0268] In some optional implementations, the third sorting unit includes:

[0269] The third acquisition unit is used to acquire the client transmission channel identifiers corresponding to the multiple data transmission requests.

[0270] The fourth sorting unit is used to sort the multiple data transmission requests based on the order of the client transmission channel identifiers.

[0271] In some optional implementations, the fourth receiving module 1204 includes:

[0272] The second parsing unit is used to parse the response information to obtain the response data and the target data transmission channel identifier.

[0273] In some optional implementations, the third sending module 1205 includes:

[0274] The first receiving unit is configured to receive a correspondence between a target client transmission channel identifier and a target data transmission channel identifier.

[0275] The first updating unit is configured to update a preset channel correspondence table based on a correspondence between a target client transmission channel identifier and a target data transmission channel identifier.

[0276] The third determining unit is configured to determine a target client transmission channel identifier corresponding to a target data transmission channel identifier based on a preset channel correspondence table.

[0277] The fourth sending unit is used to send the response data to the corresponding client based on the target client transmission channel identifier.

[0278] Among them, the server's serial port parses the data transmission request, obtains the target client transmission channel identifier, the data to be transmitted and the transmission requirements, and sends the correspondence between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel to the network service end.

[0279] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0280] The data communication device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0281] The embodiment of the present invention also provides a computer device having the above Fig.11 The data communication device shown or Fig.12 The data communication device shown.

[0282] See also Fig.13 , Fig.13 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.13As shown, the computer device includes: one or more processors 1301, memory 1302, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.13 A processor 1301 is taken as an example.

[0283] The processor 1301 may be a central processing unit, a network processor or a combination thereof. The processor 1301 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0284] The memory 1302 stores instructions executable by at least one processor 1301 , so that the at least one processor 1301 executes the method shown in the above embodiment.

[0285] The memory 1302 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 1302 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 1302 may optionally include a memory remotely arranged relative to the processor 1301, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0286] The memory 1302 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 1302 may also include a combination of the above types of memory.

[0287] The computer device also includes a communication interface 1303, which is used for the computer device to communicate with other devices or a communication network.

[0288] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0289] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0290] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A data communication method, characterized in that: Applied to a serial port of a server, the method comprises: Establish a connection with the network server; Receiving a data transmission request sent by the network service end, wherein the network service end receives the data transmission requests sent by multiple clients through their corresponding client transmission channels, and sends the data transmission requests to the serial port of the server, and the multiple clients perform data communication with the serial port of the server through the connection channel between the network service end and the serial port of the server; Parsing the data transmission request to obtain the data to be transmitted and the transmission requirements; Based on the transmission requirement, determining a target data transmission channel, wherein the serial port of the server corresponds to multiple data transmission channels; Sending the data to be transmitted to the target data transmission channel so that the target data transmission channel processes the data to be transmitted, and after the processing is completed, sending response information to the serial port; Receive the response information, and send the response information to the network server, so that the network server receives the response information, parses the response information, obtains response data, and sends the response data to the corresponding client, wherein sending the response data to the corresponding client includes: sending the response data in the response information to the client that sends the data transmission request corresponding to the response data; Each of the client transmission channels corresponds to a unique client transmission channel identifier, and the data transmission request is parsed to obtain the data to be transmitted and the transmission requirements, including: Parsing the data transmission request to obtain the target client transmission channel identifier, the data to be transmitted and the transmission requirements, wherein after receiving the data transmission request sent by the client, the network service end encapsulates the client transmission channel identifier corresponding to the client into the data transmission request, and sends the data transmission request to the serial port of the server; Each data transmission channel corresponds to a unique data transmission channel identifier. Before sending the data to be transmitted to the target data transmission channel, the method further includes: Sending the correspondence between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel to the network server, so that the network server updates the preset channel correspondence table based on the correspondence between the target client transmission channel identifier and the target data transmission channel identifier; after receiving the response information, parsing the response information to obtain the response data and the target data transmission channel identifier; determining the target client transmission channel identifier corresponding to the target data transmission channel identifier based on the preset channel correspondence table; and sending the response data to the corresponding client based on the target client transmission channel identifier; After receiving the response information, the serial port of the server encapsulates the target data transmission channel identifier of the target data transmission channel corresponding to the response information in the response information, and sends the response information to the network service end; The determining a target data transmission channel based on the transmission requirement includes: If the transmission requirement is to transmit the data to be transmitted to an existing data transmission channel, the target data transmission channel is determined according to the target data transmission channel identifier in the transmission requirement.

2. The method according to claim 1, characterized in that The determining a target data transmission channel based on the transmission requirement includes: In a case where the transmission requirement is to transfer the data to be transmitted to a new data transmission channel, a target data transmission channel is created based on the type of data to be transmitted in the transmission requirement.

3. The method according to claim 1, characterized in that The method further comprises: If multiple data transmission requests sent by the network service end are received at the same time, the multiple data transmission requests are processed and sorted; The multiple data transmission requests are processed in sequence according to the result of the processing sorting.

4. The method according to claim 3, characterized in that The processing and sorting of the multiple data transmission requests includes: Obtaining client transmission channel identifiers corresponding to the multiple data transmission requests; The multiple data transmission requests are processed and sorted based on the order of the client transmission channel identifiers.

5. A data communication method, characterized in that: Applied to a network server, the method comprises: Establish a connection with the server's serial port; Receiving data transmission requests sent by multiple clients through their corresponding client transmission channels; Sending the data transmission request to the serial port of the server so that the serial port receives the data transmission request, parsing the data transmission request, obtaining the data to be transmitted and the transmission requirements, determining the target data transmission channel based on the transmission requirements, sending the data to be transmitted to the target data transmission channel, the target data transmission channel processes the data to be transmitted, and after the processing is completed, sending a response message to the serial port, the serial port receives the response message, and sending the response message to the network service end, wherein multiple clients communicate data with the serial port of the server through the connection channel between the network service end and the serial port of the server, and the serial port of the server corresponds to multiple data transmission channels; Receiving the response information, parsing the response information, and obtaining response data; Sending the response data to the corresponding client, wherein sending the response data to the corresponding client includes: sending the response data in the response information to the client that sent the data transmission request corresponding to the response data; Each of the client transmission channels corresponds to a unique client transmission channel identifier, and the parsing of the data transmission request to obtain the data to be transmitted and the transmission requirements includes: Parsing the data transmission request to obtain the target client transmission channel identifier, the data to be transmitted and the transmission requirements, wherein after receiving the data transmission request sent by the client, the network service end encapsulates the client transmission channel identifier corresponding to the client into the data transmission request, and sends the data transmission request to the serial port of the server; The step of parsing the response information to obtain response data includes: Parse the response information to obtain response data and a target data transmission channel identifier, each data transmission channel corresponding to a unique data transmission channel identifier; The sending the response data to the corresponding client includes: Receive the correspondence between the target client transmission channel identifier and the target data transmission channel identifier; Based on the correspondence between the target client transmission channel identifier and the target data transmission channel identifier, updating the preset channel correspondence table; Based on the preset channel correspondence table, determining a target client transmission channel identifier corresponding to the target data transmission channel identifier; Based on the target client transmission channel identifier, sending the response data to the corresponding client; The serial port of the server parses the data transmission request, obtains the target client transmission channel identifier, the data to be transmitted and the transmission requirement, and sends the corresponding relationship between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel to the network service end; After receiving the response information, the serial port of the server encapsulates the target data transmission channel identifier of the target data transmission channel corresponding to the response information in the response information, and sends the response information to the network service end; The determining a target data transmission channel based on the transmission requirement includes: If the transmission requirement is to transmit the data to be transmitted to an existing data transmission channel, the target data transmission channel is determined according to the target data transmission channel identifier in the transmission requirement.

6. The method according to claim 5, characterized in that The step of establishing a connection with a serial port of a server comprises: Determining a connection command based on address information of a baseboard management controller of the server; The connection command is run to establish a connection between the network server and the baseboard management controller, and the baseboard management controller is connected to the serial port of the server.

7. The method according to claim 5, characterized in that The step of sending the data transmission request to the serial port of the server comprises: For any data transmission request, parse the data transmission request to obtain transmission requirements; Determining the serial port of the target server according to the transmission requirement; The data transfer request is sent to the serial port of the target server.

8. The method according to claim 5, characterized in that The method further comprises: If multiple data transmission requests are received from multiple clients at the same time, the multiple data transmission requests are sorted for transmission; According to the result of the sending sequence, multiple data transmission requests are sent to the serial port of the server in sequence.

9. The method according to claim 8, characterized in that The sending order of the multiple data transmission requests comprises: Obtaining client transmission channel identifiers corresponding to the multiple data transmission requests; The multiple data transmission requests are sent in a sequence based on the sequence of the client transmission channel identifiers.

10. A data communication device, characterized in that: Applied to a serial port of a server, the device comprises: A first establishing module, used to establish a connection with a network server; A first receiving module is used to receive a data transmission request sent by the network server, wherein the network server receives data transmission requests sent by multiple clients through their corresponding client transmission channels, sends the data transmission requests to the serial port of the server, and multiple clients perform data communication with the serial port of the server through the connection channel between the network server and the serial port of the server; A first parsing module, used to parse the data transmission request to obtain the data to be transmitted and the transmission requirements; A first determination module is used to determine a target data transmission channel based on the transmission requirement, wherein the serial port of the server corresponds to multiple data transmission channels; A first sending module, used for sending the data to be transmitted to the target data transmission channel, so that the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port; A second receiving module is used to receive the response information, send the response information to the network server, so that the network server receives the response information, parses the response information, obtains response data, and sends the response data to the corresponding client, wherein sending the response data to the corresponding client includes: sending the response data in the response information to the client that sends the data transmission request corresponding to the response data; Each of the client transmission channels corresponds to a unique client transmission channel identifier, and the first parsing module includes: A first parsing unit is used to parse the data transmission request to obtain the target client transmission channel identifier, the data to be transmitted and the transmission requirement, wherein after receiving the data transmission request sent by the client, the network server encapsulates the client transmission channel identifier corresponding to the client into the data transmission request, and sends the data transmission request to the serial port of the server; Each data transmission channel corresponds to a unique data transmission channel identifier. Before sending the data to be transmitted to the target data transmission channel, the device further includes: A first sending unit is used to send the correspondence between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel to the network server, so that the network server updates the preset channel correspondence table based on the correspondence between the target client transmission channel identifier and the target data transmission channel identifier, and after receiving the response information, parses the response information to obtain the response data and the target data transmission channel identifier, determines the target client transmission channel identifier corresponding to the target data transmission channel identifier based on the preset channel correspondence table, and sends the response data to the corresponding client based on the target client transmission channel identifier; After receiving the response information, the serial port of the server encapsulates the target data transmission channel identifier of the target data transmission channel corresponding to the response information in the response information, and sends the response information to the network service end; The first determining module is specifically configured to determine a target data transmission channel according to a target data transmission channel identifier in the transmission requirement if the transmission requirement is to transmit the data to be transmitted to an existing data transmission channel.

11. A data communication device, characterized in that: Applied to a network server, the device comprises: A second establishing module is used to establish a connection with a serial port of a server; A third receiving module is used to receive data transmission requests sent by multiple clients through their corresponding client transmission channels; A second sending module is used to send the data transmission request to the serial port of the server so that the serial port receives the data transmission request, parses the data transmission request, obtains the data to be transmitted and the transmission requirements, determines the target data transmission channel based on the transmission requirements, sends the data to be transmitted to the target data transmission channel, the target data transmission channel processes the data to be transmitted, and after the processing is completed, sends a response message to the serial port, the serial port receives the response message, and sends the response message to the network service end, wherein multiple clients communicate data with the serial port of the server through the connection channel between the network service end and the serial port of the server, and the serial port of the server corresponds to multiple data transmission channels; A fourth receiving module, used to receive the response information, parse the response information, and obtain response data; A third sending module is used to send the response data to the corresponding client, wherein sending the response data to the corresponding client includes: sending the response data in the response information to the client that sends the data transmission request corresponding to the response data; Each of the client transmission channels corresponds to a unique client transmission channel identifier, and the parsing of the data transmission request to obtain the data to be transmitted and the transmission requirements includes: Parsing the data transmission request to obtain the target client transmission channel identifier, the data to be transmitted and the transmission requirements, wherein after receiving the data transmission request sent by the client, the network service end encapsulates the client transmission channel identifier corresponding to the client into the data transmission request, and sends the data transmission request to the serial port of the server; The fourth receiving module includes: A second parsing unit is used to parse the response information to obtain the response data and the target data transmission channel identifier, each data transmission channel corresponds to a unique data transmission channel identifier; The third sending module includes: A first receiving unit, configured to receive a correspondence between a target client transmission channel identifier and a target data transmission channel identifier; A first updating unit, configured to update a preset channel correspondence table based on a correspondence between a target client transmission channel identifier and a target data transmission channel identifier; A third determining unit, configured to determine a target client transmission channel identifier corresponding to the target data transmission channel identifier based on the preset channel correspondence table; A fourth sending unit, configured to send the response data to a corresponding client based on the target client transmission channel identifier; The serial port of the server parses the data transmission request, obtains the target client transmission channel identifier, the data to be transmitted and the transmission requirement, and sends the corresponding relationship between the target client transmission channel identifier and the target data transmission channel identifier corresponding to the target data transmission channel to the network service end; After receiving the response information, the serial port of the server encapsulates the target data transmission channel identifier of the target data transmission channel corresponding to the response information in the response information, and sends the response information to the network service end; The determining a target data transmission channel based on the transmission requirement includes: If the transmission requirement is to transmit the data to be transmitted to an existing data transmission channel, the target data transmission channel is determined according to the target data transmission channel identifier in the transmission requirement.

12. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data communication method according to any one of claims 1 to 4 or the data communication method according to any one of claims 5 to 9 by executing the computer instructions.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data communication method according to any one of claims 1 to 4 or the data communication method according to any one of claims 5 to 9.

14. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the data communication method according to any one of claims 1 to 4 or the data communication method according to any one of claims 5 to 9.

Citation Information

Patent Citations

  • Server serial console redirection method, device and system and electronic equipment

    CN114020678A

  • Data transmission method and device, computer equipment and storage medium

    CN118075054A