Multi-concurrent call communication method under unreliable physical transmission channel
By adopting the multi-concurrent call communication method of unreliable physical transmission channels in the PCI-E dedicated data processing card, the problem of slow speed of traditional PCI-E cards is solved, high concurrency and high-speed data transmission are achieved, and it is suitable for massive data processing and high-speed computing needs.
Patent Information
- Application Number
- CN202210918020.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-01
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-08-01
AI Technical Summary
The speed of traditional PCI-E dedicated data processing cards is not high and cannot support massive data reading and high concurrency and high-speed dedicated computing requirements.
Using a multi-concurrent call communication method under unreliable physical transmission channels, the decapsulation, transmission and retransmission of data packets are realized through the collaborative work of user data processing services, downlink data processing components, device data processing services and uplink data processing components. , ensuring the reliability and concurrency of data transmission.
In the case of limited device resources, high-concurrency communication services are achieved, communication quality and transmission efficiency are improved, and massive data reading and high-speed dedicated computing are supported.
Smart Images

Figure CN115297193B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of cloud computing, and in particular relates to a multi-concurrent call communication method under an unreliable physical transmission channel. Background Art
[0002] With the development of cloud computing and big data, the data in data centers is getting bigger and bigger, including both structured and unstructured data. All these data need to be processed by servers and stored in large-capacity storage devices. Cloud computing and big data provide a practical solution to maximize the utilization of resources on physical servers. On the other hand, high-performance hardware devices are expensive now. Without high-performance communication technology, the performance of such expensive hardware devices is not fully utilized. PCI-E dedicated data processing card is one of them.
[0003] Traditional PCI-E dedicated data processing cards are mostly used to provide services based on PCI-E protocol dedicated channels, with short development cycles and high stability, which provides a basis for the present invention.
[0004] Currently, most of the PCI-E dedicated data processing cards on the market that can provide call-based services have simple structures and single functions. The service speed is generally several megabytes to tens of megabytes per second. The speed is not high, and it cannot support massive data reading, and cannot use a large number of dedicated service requests for high concurrency and high-speed dedicated computing needs. Summary of the invention
[0005] 1. Technical issues to be resolved
[0006] The technical problem to be solved by the present invention is how to provide a multi-concurrency call communication method under an unreliable physical transmission channel to solve the problems that traditional PCI-E dedicated data processing cards have low speed, cannot support massive data reading, and cannot use a large number of dedicated service requests for high concurrency and high-speed dedicated computing.
[0007] (II) Technical solution
[0008] In order to solve the above technical problems, the present invention proposes a multi-concurrent call communication method under an unreliable physical transmission channel, the method comprising the following steps:
[0009] The user data processing service receives the request data sent by the user entity, records the user entity information and I / O port information, and processes the request data sent by the user entity accordingly and hands it over to the downlink data processing component;
[0010] The downlink data processing component receives the request data, decapsulates and encapsulates the request data according to the needs of the service entity, organizes the metadata in the request data into a request data packet that can be recognized by the service entity, and delivers the processed request data packet to the device data processing service;
[0011] The device data processing service receives the request data packet and sends it to the service entity through the reliable transmission protocol between the device data processing service and the service entity. At the same time, the device data processing service also asynchronously receives the response data packet from the service entity. After receiving the response data packet, it will notify the uplink data processing component and hand over the response data packet to the uplink data processing component.
[0012] The uplink data processing component receives the notification, receives the response data packet, parses the data packet, encapsulates the metadata in the response data into response data that can be parsed by the user entity, and hands it over to the user data processing service;
[0013] The user data processing service receives the response data, searches for the user information, finds the matching I / O port, and asynchronously sends the response data to the user;
[0014] Among them, the TCP server and user API call are user entities, and the PCI-E data processing device is a service entity.
[0015] Furthermore, the service establishment process of the user data processing service includes the following steps:
[0016] Step S21, initialize the communication service, create a TCP listening service; and create the following data structure:
[0017] Create and initialize the request data queue sort_q_s for serial processing of multi-user parallel data;
[0018] Create and initialize the sliding window queue wind_q_s to achieve reliable transmission of user data processing services to physical devices;
[0019] Create a client queue clients_s and initialize it to manage users and user data;
[0020] Step S22, start the communication service and wait for receiving a client request, that is, a user's request to call the service;
[0021] Step S23: If a user invokes a service request, a user connection information structure is created, which includes the following information:
[0022] Save the handle for communicating with the user, which is used to receive the user's call request data and respond to the user's data;
[0023] User request data ID, used to uniquely indicate the connection established by the user request;
[0024] The user call service request packet queue req_q_cli is used to store valid user call request data;
[0025] The response message is waiting for the sending queue send_pading_cli;
[0026] Response message sending queue send_do_cli;
[0027] Mount the created user connection information structure to the data structure client queue clients_s created by the communication service; if no user calls the service request, execute step S22;
[0028] Step S23: Receive user call request data and execute subsequent processes.
[0029] Furthermore, the service processing flow of the device data processing service includes the following steps:
[0030] Step S31: Initialize device information and create a Device information structure according to the actual situation of the PCI-E data processing device, including the following information:
[0031] The unique device identifier cid_dev is used by user data processing services to identify specific devices;
[0032] Initialize the device service channel read and write handle fd_dev, which is used for device data processing service to communicate with physical device service;
[0033] The synchronization mechanism write_cond is used to obtain notifications of the synchronization user data processing service;
[0034] The user calls the request data sending queue write_q_dev, which is used to obtain the user request data output by the user data processing service;
[0035] The synchronization mechanism write_lock is used to synchronize the user data processing service with the device data processing service and operate the user call request data sending queue;
[0036] The user calls the response data receiving queue read_q_dev to obtain the response data of the physical device service;
[0037] The synchronization mechanism resp_lock is used to synchronize the user data processing service with the device data processing service and operate the user call response data receiving queue;
[0038] Step S32: Create an independent read / write thread, create a device service channel read / write handle, and assign it to the device information;
[0039] Step S33: start the read and write threads, and the threads respectively execute the data receiving and sending processes of the user calling service downlink data processing and the user calling service uplink data processing;
[0040] Step S34: Notify the user of the data processing service and return to step S31.
[0041] Furthermore, the write thread processing steps are as follows:
[0042] Step S3311: the write thread waits for the notification of write_cond;
[0043] Step S3312: The writing thread gets the write_cond notification.
[0044] Step S3313: Acquire the write_lock, cache all req_nodes in the user call request data sending queue, and release the write_lock;
[0045] Step S3314: Send the cached req_node to the device service channel; return to step S3311.
[0046] Furthermore, the read thread processing steps are as follows:
[0047] Step S3321: the reading thread waits for the device service channel to return data;
[0048] Step S3322: the device service channel returns service response data and creates a resp_node structure;
[0049] Step S3323: Get resp_lock and add resp_node to the user call response data receiving queue;
[0050] Step S34: Notify the user of the data processing service and return to step S31.
[0051] Furthermore, the reliable transmission protocol under the unreliable physical transmission channel is defined as follows:
[0052] A-side initialization:
[0053] Initialize the send buffer packet mark;
[0054] Start the interval timer;
[0055] End A sends data:
[0056] Add message to temporary buffer;
[0057] If the current sliding window buff is full, do nothing;
[0058] Get the message from the temporary buffer;
[0059] Use the message to construct a packet, put it into the sliding window buff and send it to the B end;
[0060] Set the current packet timeout to the current time plus TIMEOUT;
[0061] End B receives data:
[0062] Receive a packet and discard it if it is damaged;
[0063] Calculate whether there is a response packet in the cache location according to the packet sequence number. If so, send ACK. The function returns and hands the packet over to the business for processing. ACK is sent and the ACK is cached to the specified location according to the request packet sequence number.
[0064] End A receives data:
[0065] Receive a packet and discard it if it is damaged;
[0066] If the ACK confirmation sequence number is not expected, do nothing;
[0067] Check whether there is a packet at the earliest position of the sliding window buff and it has been confirmed, scan all cached packets, and send packets with consecutive sequence numbers to business processing, that is, sliding the window at the same time;
[0068] Check whether there is any message in the temporary buffer, if so, continue to call end A to send data;
[0069] Timeout processing at end A:
[0070] Maintaining logical clocks;
[0071] Scan all packets in the sliding window buff. If any packet times out, it will be resent and the next timeout logic time for the resent packet will be recalculated.
[0072] Furthermore, the downlink data processing component and the uplink data processing component jointly complete the reliable transmission protocol.
[0073] Furthermore, the process of the downlink data processing component includes the following steps:
[0074] Step S41: receiving request data sent by the user entity, creating a downlink data request packet req_node, and entering it into the user request data queue;
[0075] Step S42: at the same time, the downlink data request packet is queued into a queue sort_q, and the queue and the user request data queue are associated with the same request packet req_node;
[0076] Step S43: Check whether the sliding window wind_q is idle. If it is idle, continue. If not, execute step S47;
[0077] Step S44: dequeue the request data in the sort_q queue, and then enqueue it into the wind_q queue, and apply for a timeout timer retry_tm for the request data packet;
[0078] Step S45: Get write_lock, put req_node into the sending queue, and release write_lock;
[0079] Step S46: repeat steps S43, S44, and S45 until the window queue wind_q is full or the queue is empty;
[0080] Step S47: Activate the device data processing service write thread through write_cond.
[0081] Furthermore, the process of the uplink data processing component includes the following steps:
[0082] Step S51: the user data processing service receives the notification from the device data processing service reading thread and activates the process;
[0083] Step S52: Acquire resp_queue lock;
[0084] Step S53: Cache all resp_node data in the user call response data receiving queue into the resp_swap queue;
[0085] Step S54: Release the resp_queue lock;
[0086] Step S55: traverse the resp_node data in the resp_swap queue. If matching request data is found in the wind_q queue, stop the retry timing of the request data and execute step S56. If there is no configuration, discard the resp_node.
[0087] Step S56: If the matched request data is the head node of the wind_q queue, the matched resp_node data is sent to the user;
[0088] Step S57: Repeat steps S55 and S56 until the resp_swap queue is empty.
[0089] Furthermore, the service entity is a high-speed cryptographic card in a server cryptographic machine device.
[0090] (III) Beneficial effects
[0091] The present invention proposes a multi-concurrent call-based communication method under an unreliable physical transmission channel. The present invention provides a method for realizing reliable data transmission in an unreliable transmission channel by relying on software when the device resources are limited and complex communication protocols cannot be implemented, and on this basis, provides a call-based communication service that supports concurrency.
[0092] The communication method of the present invention has high adaptability and relies less on high-speed hardware device resources. In the reliable transmission protocol of the present invention, the high-speed hardware device only needs to provide a small amount of data packet buffering and a passive retransmission mechanism.
[0093] The communication method of the present invention supports high concurrency and provides high concurrency communication services in a single server. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 This is the main process of the present invention;
[0095] Figure 2 A flow chart of a user call request data processing service of the present invention;
[0096] Figure 3 It is a flow chart of the device data processing service of the present invention;
[0097] Figure 4 It is a downlink data processing flow chart of the present invention;
[0098] Figure 5 This is a flow chart of uplink data processing of the present invention. DETAILED DESCRIPTION
[0099] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.
[0100] The present invention designs a multi-concurrent call-type communication method under an unreliable physical transmission channel. The communication method of the present invention can realize the ability of multiple users to concurrently call the services of the peer device of the unreliable physical transmission channel. The present invention serializes the parallel data of multiple users through user data processing services, while ensuring the independence and integrity of all users' concurrent data streams, and realizes a single process supporting high-concurrency call-type service; the present invention can provide device virtualization and improve the utilization rate of device services through device management services; the present invention can realize high-quality reliable transmission under the premise of limited resources of the peer service device through an optimized reliable transmission protocol.
[0101] The method of the present invention can significantly improve the communication quality, communication transmission efficiency and service concurrency of device services when the resources of the opposite-end service device of the unreliable physical transmission channel are limited.
[0102] The multi-concurrent call communication method under the unreliable physical transmission channel of the present invention is mainly used in the communication system without reliable transmission protocol protection. The typical application is the communication scenario between the user and the high-speed password card in the server cryptographic machine device. The high-speed password card is usually a PCI-E data processing card. This article takes the PCI-E data processing card as an example to describe the communication method. Figure 1 shown.
[0103] exist Figure 1 In the application scenario shown, this method designs user data processing services, uplink data processing components, device data processing services, downlink data processing components and device management components to achieve the high-speed data processing requirements of the server cryptographic machine. This invention only describes a simple data processing method. Figure 1 The communication between the TCP server and the user API and the access method of the PCI-E device shown in are not within the scope of the present invention. For the convenience of description, the TCP server and the user API call are abstracted as user entities, and the PCI-E data processing device is a service entity. Multiple concurrent calls can be described as concurrent communication between multiple user entities and user data processing services. Unless otherwise specified below, this can be understood.
[0104] The overall process of PCI-E data processing card application data processing includes five parts:
[0105] The user data processing service receives the request data sent by the user entity, records the user entity information and I / O port (socket) information, processes the request data sent by the user entity accordingly, and hands it over to the downlink data processing component.
[0106] The downlink data processing component receives the request data, decapsulates and encapsulates the request data according to the needs of the service entity, organizes the metadata in the request data into a request data packet that the service entity can recognize, and hands the processed request data packet to the device data processing service.
[0107] The device data processing service receives the request data packet and sends it to the service entity through the reliable transmission protocol between the device data processing service and the service entity. At the same time, the device data processing service also asynchronously receives the response data packet from the service entity. After receiving the response data packet, it will notify the uplink data processing component and hand over the response data packet to the uplink data processing component.
[0108] The uplink data processing component receives the notification, collects the response data packet, parses the data packet, encapsulates the metadata in the response data into response data that can be parsed by the user entity, and hands it over to the user data processing service.
[0109] The user data processing service receives the response data, searches for the user information, finds the matching I / O port (socket), and asynchronously sends the response data to the user.
[0110] In the above process, the method of the present invention requires the user entity to provide necessary communication interface and communication related information. The following will describe the five parts of the PCI-E data processing card application processing flow respectively.
[0111] The main process of user data processing service is as follows: Figure 2 , the service establishment process includes the following steps:
[0112] Step S21, initialize the communication service, create a TCP listening service; and create the following data structure:
[0113] Create and initialize the request data queue sort_q_s for serial processing of multi-user parallel data.
[0114] Create and initialize the sliding window queue wind_q_s to implement reliable transmission of user data processing services to physical devices.
[0115] Create and initialize the client queue clients_s to manage users and user data.
[0116] Step S22: Start the communication service and wait for receiving a client request, that is, a user's request to call the service.
[0117] Step S23: If a user invokes a service request, a user connection information structure is created, which includes the following information:
[0118] Save the handle for communicating with the user, which is used to receive the user's call request data and respond to the user's data;
[0119] User request data ID, used to uniquely indicate the connection established by the user request;
[0120] The user call service request packet queue req_q_cli is used to store valid user call request data;
[0121] The response message is waiting for the sending queue send_pading_cli;
[0122] Response message sending queue send_do_cli;
[0123] The created user connection information structure is mounted to the data structure client queue clients_s created by the communication service. If there is no user calling the service request, step S22 is executed.
[0124] Step S23: Receive user call request data and execute subsequent processes.
[0125] Device data processing service is responsible for handling PCI-E channel communication. The main process of service processing is as follows: Figure 3 ,Service establishment includes write thread processing and read thread processing.
[0126] The write thread processing steps are as follows:
[0127] Step S31: Initialize device information and create a Device information structure according to the actual situation of the PCI-E data processing device, including the following information:
[0128] The unique device identifier cid_dev is used by user data processing services to identify specific devices;
[0129] Initialize the device service channel read and write handle fd_dev, which is used for device data processing service to communicate with physical device service;
[0130] Synchronous mechanism write_cond, such as conditional variables, is used to obtain notifications of synchronous user data processing services;
[0131] The user calls the request data sending queue write_q_dev, which is used to obtain the user request data output by the user data processing service;
[0132] The synchronization mechanism write_lock, such as a mutex lock, is used to synchronize user data processing services with device data processing services and operate the user call request data sending queue;
[0133] The user calls the response data receiving queue read_q_dev to obtain the response data of the physical device service;
[0134] The synchronization mechanism resp_lock, such as a mutex lock, is used to synchronize the user data processing service with the device data processing service and operate the user call response data receiving queue;
[0135] Step S32: Create an independent read / write thread, create a device service channel read / write handle, and assign it to the device information;
[0136] Step S33: Start the read and write threads, and the threads respectively execute the data receiving and sending processes of the user calling service downlink data processing and the user calling service uplink data processing.
[0137] The write thread processing steps are as follows:
[0138] Step S3311: The writing thread waits for notification of write_cond.
[0139] Step S3312: The writing thread gets the write_cond notification.
[0140] Step S3313: Acquire the write_lock, cache all req_nodes in the user call request data sending queue, and release the write_lock.
[0141] Step S3314: Send the cached req_node to the device service channel. Return to step S3311.
[0142] Read thread processing flow:
[0143] Step S3321: The read thread waits for the device service channel to return data.
[0144] Step S3322: The device service channel returns service response data and creates a resp_node structure.
[0145] Step S3323: Get the resp_lock lock and add resp_node to the user call response data receiving queue
[0146] Step S34: Notify the user of the data processing service and return to step S31.
[0147] The uplink data processing component mainly completes the reliable transmission protocol under the unreliable physical transmission channel. The protocol requires few physical device resources, and the part of the protocol that needs to be implemented by the device is simple. The uplink data processing component is referred to as A, and the device service entity is referred to as B. The reliable transmission protocol under the unreliable physical transmission channel is defined as follows:
[0148] A-side initialization:
[0149] Initialize the send buffer packet mark;
[0150] Start the interval timer;
[0151] End A sends data:
[0152] Add message to temporary buffer;
[0153] If the current sliding window buff is full, do nothing;
[0154] Get the message from the temporary buffer;
[0155] Use the message to construct a packet, put it into the sliding window buff and send it to the B end;
[0156] Set the current packet timeout to the current time plus TIMEOUT;
[0157] End B receives data:
[0158] Receive a packet and discard it if it is damaged;
[0159] Calculate whether there is a response packet in the cache location according to the packet sequence number. If so, send ACK. The function returns and hands the packet over to the business for processing. ACK is sent and the ACK is cached to the specified location according to the request packet sequence number.
[0160] End A receives data:
[0161] Receive a packet and discard it if it is damaged;
[0162] If the ACK confirmation sequence number is not expected (1. Not within the sliding window range, 2. Duplicate ACK), do nothing;
[0163] Check whether there is a packet at the earliest position of the sliding window buff and it has been confirmed, scan all cached packets, and send packets with consecutive sequence numbers to business processing, that is, sliding the window at the same time;
[0164] Check whether there is any message in the temporary buffer, if so, continue to call end A to send data;
[0165] Timeout processing at end A:
[0166] Maintaining logical clocks;
[0167] Scan all packets in the sliding window buff. If any packet times out, it will be resent and the next timeout logic time for the resent packet will be recalculated.
[0168] The downlink data processing component and the uplink data processing component jointly complete the reliable transmission protocol. The main process of the downlink data processing component is as follows: Figure 4 , including the following steps:
[0169] Step S41: receiving request data sent by the user entity, creating a downlink data request packet req_node, and entering it into the user request data queue;
[0170] Step S42: at the same time, the downlink data request packet is queued into a queue sort_q, and the queue and the user request data queue are associated with the same request packet req_node;
[0171] Step S43: Check whether the sliding window wind_q is idle. If it is idle, continue. If not, execute step S47.
[0172] Step S44: dequeue the request data in the sort_q queue, and then enqueue it into the wind_q queue, and apply for a timeout timer retry_tm for the request data packet;
[0173] Step S45: Get write_lock, put req_node into the sending queue, and release write_lock;
[0174] Step S46: repeat steps S43, S44, and S45 until the window queue wind_q is full or the queue is empty;
[0175] Step S47: Activate the device data processing service write thread through write_cond.
[0176] The main process of the uplink data processing component is as follows Figure 5 , including the following steps:
[0177] Step S51: the user data processing service receives the notification from the device data processing service reading thread and activates the process;
[0178] Step S52: Acquire resp_queue lock;
[0179] Step S53: Cache all resp_node data in the user call response data receiving queue into the resp_swap queue;
[0180] Step S54: Release the resp_queue lock;
[0181] Step S55: traverse the resp_node data in the resp_swap queue. If matching request data is found in the wind_q queue, stop the retry timing of the request data and execute step S56. If there is no configuration, discard the resp_node.
[0182] Step S56: If the matched request data is the head node of the wind_q queue, the matched resp_node data is sent to the user;
[0183] Step S57: Repeat steps S55 and S56 until the resp_swap queue is empty.
[0184] The present invention provides a method for realizing reliable data transmission in an unreliable transmission channel by relying on software when the equipment resources are limited and complex communication protocols cannot be realized, and on this basis, provides a call-type communication service supporting concurrency.
[0185] The communication method of the present invention has high adaptability and relies less on high-speed hardware device resources. In the reliable transmission protocol of the present invention, the high-speed hardware device only needs to provide a small amount of data packet buffering and a passive retransmission mechanism.
[0186] The communication method of the present invention supports high concurrency and provides high concurrency communication services in a single server.
[0187] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A multi-concurrent call communication method under an unreliable physical transmission channel, characterized in that: The method comprises the following steps: The user data processing service receives the request data sent by the user entity, records the user entity information and I / O port information, and processes the request data sent by the user entity accordingly and hands it over to the downlink data processing component; The downlink data processing component receives the request data, decapsulates and encapsulates the request data according to the needs of the service entity, organizes the metadata in the request data into a request data packet that can be recognized by the service entity, and delivers the processed request data packet to the device data processing service; The device data processing service receives the request data packet and sends it to the service entity through the reliable transmission protocol between the device data processing service and the service entity. At the same time, the device data processing service also asynchronously receives the response data packet from the service entity. After receiving the response data packet, it will notify the uplink data processing component and hand over the response data packet to the uplink data processing component. The uplink data processing component receives the notification, receives the response data packet, parses the data packet, encapsulates the metadata in the response data into response data that can be parsed by the user entity, and hands it over to the user data processing service; The user data processing service receives the response data, searches for the user information, finds the matching I / O port, and asynchronously sends the response data to the user; Among them, the TCP server and user API call are user entities, and the PCI-E data processing device is a service entity; in, The service processing flow of the device data processing service includes the following steps: Step S31: Initialize device information and create a Device information structure according to the actual situation of the PCI-E data processing device, including the following information: The unique device identifier cid_dev is used by user data processing services to identify specific devices; Initialize the device service channel read and write handle fd_dev, which is used for device data processing service to communicate with physical device service; The synchronization mechanism write_cond is used to obtain notifications of the synchronization user data processing service; The user call request data sending queue write_q_dev is used to obtain the user request data output by the user data processing service; The synchronization mechanism write_lock is used to synchronize the user data processing service with the device data processing service and operate the user call request data sending queue; The user calls the response data receiving queue read_q_dev to obtain the response data of the physical device service; The synchronization mechanism resp_lock is used to synchronize the user data processing service with the device data processing service and operate the user call response data receiving queue; Step S32: Create an independent read / write thread, create a device service channel read / write handle, and assign it to the device information; Step S33: start the read and write threads, and the threads respectively execute the data receiving and sending processes of the user calling service downlink data processing and the user calling service uplink data processing; Step S34: Notify the user of the data processing service and return to step S31.
2. The multi-concurrent call communication method under an unreliable physical transmission channel according to claim 1, characterized in that: The service establishment process of the user data processing service includes the following steps: Step S21, initialize the communication service, create a TCP listening service; and create the following data structure: Create and initialize the request data queue sort_q_s for serial processing of multi-user parallel data; Create and initialize the sliding window queue wind_q_s to achieve reliable transmission of user data processing services to physical devices; Create a client queue clients_s and initialize it to manage users and user data; Step S22, start the communication service and wait for receiving a client request, that is, a user's request to call the service; Step S23: If a user invokes a service request, a user connection information structure is created, including the following information: Save the handle for communicating with the user, which is used to receive the user's call request data and respond to the user's data; User request data ID, used to uniquely indicate the connection established by the user request; The user call service request packet queue req_q_cli is used to store valid user call request data; The response message waits for the sending queue send_pading_cl i; Response message sending queue send_do_cl i; Mount the created user connection information structure to the data structure client queue clients_s created by the communication service; if no user calls the service request, execute step S22; Step S23: receiving user call request data; executing subsequent processes.
3. The multi-concurrent call communication method under the unreliable physical transmission channel according to claim 2, characterized in that: The write thread processing steps are as follows: Step S3311: the write thread waits for the notification of write_cond; Step S3312: The writing thread gets the write_cond notification. Step S3313: Acquire write_lock, cache all req_node in the user call request data sending queue, and release write_lock; Step S3314: Send the cached req_node to the device service channel; return to step S3311.
4. The multi-concurrent call communication method under an unreliable physical transmission channel according to claim 2, characterized in that: The read thread processing steps are as follows: Step S3321: the reading thread waits for the device service channel to return data; Step S3322: the device service channel returns service response data and creates a resp_node structure; Step S3323: Get resp_lock and add resp_node to the user call response data receiving queue; Step S34: Notify the user of the data processing service and return to step S31.
5. The multi-concurrent call communication method under an unreliable physical transmission channel according to any one of claims 1 to 4, characterized in that: The reliable transmission protocol under the unreliable physical transmission channel is defined as follows: A-side initialization: Initialize the send buffer packet mark; Start the interval timer; End A sends data: Add message to temporary buffer; If the current sliding window buff is full, do nothing; Get the message from the temporary buffer; Use the message to construct a packet, put it into the sliding window buff and send it to the B end; Set the current packet timeout to the current time plus TIMEOUT; End B receives data: Receive a packet and discard it if it is damaged; Calculate whether there is a response packet in the cache location according to the packet sequence number. If so, send ACK. The function returns and hands the packet over to the business for processing. ACK is sent and the ACK is cached to the specified location according to the request packet sequence number. End A receives data: Receive a packet and discard it if it is damaged; If the ACK confirmation sequence number is not expected, do nothing; Check whether there is a packet at the earliest position of the sliding window buff and it has been confirmed, scan all cached packets, and send packets with consecutive sequence numbers to business processing, that is, sliding the window at the same time; Check whether there is any message in the temporary buffer, if so, continue to call end A to send data; Timeout processing at end A: Maintaining logical clocks; Scan all packets in the sliding window buff. If any packet times out, it will be resent and the next timeout logic time for the resent packet will be recalculated.
6. The multi-concurrent call communication method under an unreliable physical transmission channel according to claim 5, characterized in that: The downlink data processing component and the uplink data processing component jointly complete the reliable transmission protocol.
7. The multi-concurrent call communication method under an unreliable physical transmission channel as claimed in claim 5, characterized in that: The process of the downlink data processing component includes the following steps: Step S41: receiving request data sent by the user entity, creating a downlink data request packet req_node, and entering it into the user request data queue; Step S42: at the same time, the downlink data request packet is queued into a queue sort_q, and the queue and the user request data queue are associated with the same request packet req_node; Step S43: Check whether the sliding window wind_q is idle. If it is idle, continue. If not, execute step S47; Step S44: dequeue the request data in the sort_q queue, and then enqueue it into the wind_q queue, and apply for a timeout timer retry_tm for the request data packet; Step S45: Get write_lock, put req_node into the sending queue, and release write_lock; Step S46: repeat steps S43, S44, and S45 until the window queue wind_q is full or the queue is empty; Step S47: Activate the device data processing service write thread through write_cond.
8. The multi-concurrent call communication method under an unreliable physical transmission channel as claimed in claim 5, characterized in that: The process of the uplink data processing component includes the following steps: Step S51: the user data processing service receives the notification from the device data processing service reading thread and activates the process; Step S52: Acquire resp_queue lock; Step S53: Cache all resp_node data in the user call response data receiving queue into the resp_swap queue; Step S54: Release the resp_queue lock; Step S55: traverse the resp_node data in the resp_swap queue. If matching request data is found in the wind_q queue, stop the retry timing of the request data and execute step S56. If there is no configuration, discard the resp_node. Step S56: If the matched request data is the head node of the wind_q queue, the matched resp_node data is sent to the user; Step S57: Repeat steps S55 and S56 until the resp_swap queue is empty.
9. The multi-concurrent call communication method under an unreliable physical transmission channel according to claim 1, characterized in that: The service entity is a high-speed cryptographic card in a server cryptographic machine device.
