A multi-modal data transmission method, system and device
Through dynamic threshold judgment and network status adjustment, combined with BASE64 encoding and cloud storage, it solves the limitations of the SSE protocol in transmitting binary data, achieves efficient and reliable multi-modal data transmission, and adapts to multi-modal interaction needs.
Patent Information
- Application Number
- CN202410993351.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-24
AI Technical Summary
The SSE protocol has limitations when transmitting binary data, including only supporting text data streams, data encoding complexity, performance inefficiency, and client decoding complexity, making it difficult to meet the needs of multi-modal data transmission.
Through dynamic threshold judgment and network status adjustment, select the best transmission method, use BASE64 encoding or cloud storage binary data, and use request headers to mark data types, cut and block data, the client reorganizes data units, integrates breakpoint reconnection and Dynamic window algorithm to improve transmission efficiency.
It improves the efficiency and reliability of multi-modal data transmission, reduces the load on servers and clients, optimizes the data transmission experience, and adapts to complex network environments and large-scale data processing needs.
Smart Images

Figure CN118540330B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of multimodal data transmission, and in particular relates to a multimodal data transmission method, system and device. Background Art
[0002] SSE (Server-Sent Events) is a server push technology based on the HTTP protocol, which enables the server to actively push data to the client in real time. By establishing a persistent connection, the server can send data directly to the client without waiting for the client request. However, the SSE protocol was originally designed mainly for transmitting text data, so it has many limitations in handling binary data transmission. First, SSE only supports text data streams: The SSE protocol stipulates that the data sent by the server must be in text format, which means that binary data (such as images, videos, etc.) cannot be directly transmitted through SSE. Second, data encoding issues: In order to transmit binary data through SSE, the binary data must first be converted to text format, such as using Base64 encoding. This conversion increases the size of the data, thereby increasing the burden of transmission. Third, performance issues: Since binary data needs to be converted to text format, this will lead to reduced data transmission efficiency, especially when transmitting large files or high-frequency data streams, this performance problem is particularly obvious. Fourth, decoding complexity: After the client receives the encoded binary data, it needs to decode it to restore it to the original binary format, which increases the processing complexity and delay of the client.
[0003] With the rapid development of artificial intelligence technology, especially the emergence of large language models represented by CHATGPT, the SSE protocol provides an efficient and low-latency data push method in the AI question-and-answer scenarios that process plain text, which perfectly meets the needs of these scenarios. The one-way communication characteristics of the SSE protocol enable the server to actively and continuously send the latest data to the client without the client constantly polling requests, thereby significantly improving the response speed of the application and user experience. However, with the continuous evolution of AI technology, the next generation of AI is moving towards multimodal interaction, that is, not only processing text information, but also processing multiple data types such as images, audio, and video. In this context, the limitations of the SSE protocol in processing binary data began to emerge. Traditional SSE push is mainly limited to text data. For multimodal data transmission with both text and pictures or audio and video, SSE has many problems. Summary of the invention
[0004] In order to solve the above technical problems, the present invention proposes a multimodal data transmission method, system and device, which select the best transmission mode according to the real-time network status, improve the transmission efficiency, reduce the load of the server and the client, and improve the stability of the system.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A multimodal data transmission method comprises the following steps:
[0007] Receive connection requests from clients;
[0008] Assembling multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: performing dynamic threshold judgment on the multimodal data to be spliced to obtain the coded data and the cloud address; splicing the multimodal data that does not need to be spliced, the coded data and the cloud address into the data sequence to be sent;
[0009] Cutting the data sequence into multiple data segments to obtain a data array that is finally sent;
[0010] Using different request headers to mark different data types of the data array;
[0011] Each piece of data is assigned a unique identifier and the data array is sent to the client.
[0012] Furthermore, the method further comprises:
[0013] After receiving the sent data array, the client uses the identifier to rearrange the data and parses the data type according to the request header;
[0014] The sorted data fragments are used to assemble the data fragments into complete data units according to a predetermined reorganization logic.
[0015] Furthermore, after receiving the transmitted data array, the client further comprises: constructing a reorganized data buffer; the data buffer is used to temporarily store the data fragments received from the server.
[0016] Furthermore, after assembling into a complete data unit, it also includes performing an integrity check on the data unit. If data missing or error is detected, a retransmission request is triggered, and an identifier is used to locate the data segment that needs to be retransmitted in the server data buffer.
[0017] Furthermore, the process of performing dynamic threshold judgment on the multimodal data to be spliced to obtain the coded data and the cloud address includes:
[0018] Convert the multimodal data to be spliced into binary data and set the basic threshold according to the current network status;
[0019] If the size of the binary data is lower than the basic threshold, performing BASE64 encoding on the binary data to obtain encoded data;
[0020] If the size of the binary data is higher than the basic threshold, the binary data is stored in the cloud and the corresponding cloud address is obtained.
[0021] Furthermore, the formula for determining the basic threshold is: T_base=K*F;
[0022] Among them, T_base is the basic threshold; K is the threshold coefficient; F is the number of bytes of multimodal data.
[0023] Furthermore, the method also includes dynamically adjusting the basic threshold according to the client network speed, server occupancy rate and historical transmission efficiency;
[0024] The adjusted base threshold is calculated as:
[0025] T_adjusted=T_base+α*C+β*(1-S)+γ*H;
[0026] Among them, T_adjusted is the adjusted basic threshold; C is the client network speed; α is the weight coefficient of the client network speed; S is the server occupancy rate; β is the weight coefficient of the server occupancy rate; H is the historical transmission efficiency; γ is the weight coefficient of the historical transmission efficiency; and α+β+γ=1.
[0027] Furthermore, the process of cutting the data sequence into a plurality of data segments includes:
[0028] Set the minimum data block size MBS and the maximum data block size MXS; calculate the network environment status NES coefficient NTC:
[0029] NTC = (w1 * (1 / (1 + Latency)) + w2 * (Bandwidth / Max Bandwidth) +w3 * (1 - Packet Loss Rate));
[0030] Among them, Latency is network delay; Bandwidth is bandwidth; Max Bandwidth is the preset maximum bandwidth; Packet Loss Rate is packet loss rate; w1 is the weight coefficient of network delay; w2 is the weight coefficient of bandwidth; w3 is the weight coefficient of packet loss rate; and w1+w2+w3=1.
[0031] Adjust the block size BS according to the network environment status NES coefficient NTC;
[0032] Among them, BS = MBS + (MXS - MBS) * NTC;
[0033] The overall size of the data block GDS is divided into n data blocks of size BS; each data block is assigned a unique number BN, where BN is an increasing sequence number 1 to n.
[0034] The present invention also proposes a multimodal data transmission system, comprising a receiving module, an assembling module, a cutting module, a marking module and a sending module;
[0035] The receiving module is used to receive a connection request from a client;
[0036] The assembly module is used to assemble multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: dynamic threshold judgment is performed on the multimodal data to be spliced to obtain the coded data and the cloud address; the multimodal data that does not need to be spliced, the coded data and the cloud address are spliced into the data sequence to be sent;
[0037] The cutting module is used to cut the data sequence into multiple data segments to obtain a data array that is finally sent;
[0038] The labeling module is used to label different data types of the data array using different request headers;
[0039] The sending module is used to assign a unique identifier to each data segment and then send the data array to the client.
[0040] The present invention also proposes a multimodal data transmission device, comprising a server and a client;
[0041] The server is used to receive a connection request from a client; assemble multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: perform dynamic threshold judgment on the multimodal data to be spliced to obtain coded data and a cloud address; splice the multimodal data that does not need to be spliced, the coded data and the cloud address into a data sequence to be sent; cut the data sequence into multiple data segments to obtain a data array that is finally sent; use different request headers to mark different data types of the data array; assign a unique identifier to each data segment and send the data array to the client;
[0042] The client is used to rearrange the data using the identifier after receiving the sent data array, and parse the data type according to the request header; and assemble the data fragments into complete data units according to a predetermined reorganization logic using the sorted data fragments.
[0043] The effects provided in the content of the invention are only the effects of the embodiments, not all the effects of the invention. One of the above technical solutions has the following advantages or beneficial effects:
[0044] The present invention proposes a multimodal data transmission method, system and device, which belongs to the technical field of multimodal data transmission. The method comprises the following steps: receiving a connection request from a client; assembling multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: performing dynamic threshold judgment on the multimodal data to be spliced to obtain coded data and cloud addresses; splicing the multimodal data, coded data and cloud addresses that do not need to be spliced into a data sequence to be sent; cutting the data sequence into multiple data fragments to obtain a data array that is finally sent; using different request headers to mark different data types of the data array; assigning a unique identifier to each data fragment and sending the data array to the client. After receiving the sent data array, the client uses the identifier to rearrange the data and parses the data type according to the request header; using the sorted data fragments, assembling the data fragments into complete data units according to a predetermined reorganization logic. Based on a multimodal data transmission method, a multimodal data transmission system and device are also proposed. The present invention selects the most suitable data transmission mode by dynamically judging the client network speed, server occupancy and the like, effectively improving the efficiency of multimodal data transmission and reducing data delay.
[0045] The present invention greatly improves the efficiency and reliability of data transmission by integrating breakpoint reconnection, dynamic window algorithm, and intelligent block segmentation and reorganization algorithm in the process of binary to text encoding, data block identification and transmission, and client receiving data blocks and reorganizing. In the face of complex and changeable network environments and large-scale data processing requirements, this solution can ensure efficient and stable data transmission experience, and provide a comprehensive optimized solution for multimodal data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flow chart of a multimodal data transmission method proposed in Embodiment 1 of the present invention;
[0047] Figure 2 A schematic diagram of a multimodal data transmission system proposed in Embodiment 2 of the present invention;
[0048] Figure 3 This is a schematic diagram of a multimodal data transmission device proposed in Example 3 of the present invention. DETAILED DESCRIPTION
[0049] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. In addition, the present invention may repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed. It should be noted that the components illustrated in the accompanying drawings are not necessarily drawn to scale. The present invention omits the description of known components and processing techniques and processes to avoid unnecessary limitations on the present invention.
[0050] Example 1
[0051] A multimodal data transmission method proposed in Example 1 of the present invention is used to solve the transmission problem of binary data under the SSE protocol. A multimodal data transmission method proposed in Example 1 of the present invention is specifically:
[0052] Receive connection requests from clients;
[0053] Assembling multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: performing dynamic threshold judgment on the multimodal data to be spliced to obtain the coded data and the cloud address; splicing the multimodal data that does not need to be spliced, the coded data and the cloud address into the data sequence to be sent;
[0054] Cutting the data sequence into multiple data segments to obtain a data array that is finally sent;
[0055] Using different request headers to mark different data types of the data array;
[0056] Each piece of data is assigned a unique identifier and the data array is sent to the client.
[0057] After receiving the sent data array, the client uses the identifier to rearrange the data and parses the data type according to the request header;
[0058] The sorted data fragments are used to assemble the data fragments into complete data units according to a predetermined reorganization logic.
[0059] Embodiment 1 of the present invention takes the SSE protocol as an example to illustrate that in order to solve the transmission problem of binary data pushed by the server, developers will use the Web Socket protocol. However, in scenarios where only the server needs to push data to the client in one direction, the use of Web Socket may introduce unnecessary complexity and resource consumption. The SSE protocol has advantages in one-way data push scenarios due to its simplicity and ease of use. In specific scenarios, using this solution to push binary data is simpler and more convenient for developers, while also ensuring the stability and transmission efficiency of the system.
[0060] The protection scope of the present invention is not limited to the SSE protocol proposed in Example 1, and those skilled in the art can make reasonable choices based on actual conditions.
[0061] Figure 1 A flow chart of a multimodal data transmission method proposed in Embodiment 1 of the present invention;
[0062] In step 1, a server-sent event (SSE) connection is established between the client and the server, and the connection is used to implement real-time data push from the server to the client.
[0063] In step 2, the server receives the SSE connection request.
[0064] In step 3, after receiving the connection request from the client, the server starts to assemble a multimodal data set, which contains multiple types of data elements, such as text, images, videos, etc.
[0065] In step 4, during the assembly process, if there is multimodal data that needs to be spliced, the server needs to perform data conversion and threshold judgment, that is, make binary data processing decisions based on current network status parameters, such as client network speed, server resource occupancy rate, etc., and preset threshold standards.
[0066] For text data, dynamic threshold judgment does not need to be performed. Dynamic threshold judgment needs to be performed for images, videos, and collections of various data.
[0067] The dynamic judgment threshold algorithm mainly considers the impact of file size on transmission efficiency, and dynamically adjusts the threshold based on the client network speed, server occupancy rate and historical transmission efficiency. The dynamic judgment threshold algorithm calculates a basic threshold based on the file size and threshold coefficient, and then adjusts it based on other factors.
[0068] The formula for determining the basic threshold is: T_base = K * F;
[0069] Wherein, T_base is the base threshold; K is the threshold coefficient; and F is the number of bytes of multimodal data.
[0070] The present invention also includes dynamically adjusting the basic threshold according to the client network speed, server occupancy rate and historical transmission efficiency; the calculation method of the adjusted basic threshold is:
[0071] T_adjusted= T_base +α* C +β* (1 - S) +γ* H;
[0072] Among them, T_adjusted is the adjusted basic threshold; C is the client network speed; α is the weight coefficient of the client network speed; S is the server occupancy rate; β is the weight coefficient of the server occupancy rate; H is the historical transmission efficiency; γ is the weight coefficient of the historical transmission efficiency; and α+β+γ=1.
[0073] In the present invention, the multimodal data to be spliced is converted into binary data, and a basic threshold is set according to the current network status; if the size of the binary data is lower than the basic threshold, the binary data is BASE64 encoded to obtain encoded data; if the size of the binary data is higher than the basic threshold, the binary data is stored in the cloud to obtain the corresponding cloud address.
[0074] In step 5a, if the size of the binary data is lower than the basic threshold, the binary data is BASE64 encoded to obtain encoded data;
[0075] When the network conditions are good, the server resources are sufficient, and the transcoded content is small, the multimodal content (images, videos, etc.) is encoded into a Base64 string and then pushed to the client through the SSE protocol. After receiving it, the client decodes and restores it to the original multimedia content, thus achieving fast and efficient information transmission.
[0076] In step 5b, if the size of the binary data is higher than the basic threshold, the binary data is stored in the cloud and the corresponding cloud address is obtained;
[0077] When the network conditions are average, the server resources are tight, and the transcoded content is large, the multimodal content is uploaded to the public cloud or private cloud, and the resource address stored in the cloud is pushed to the client through the SSE protocol. The client downloads or views the content online by resolving the address, thereby reducing the resource usage of the server.
[0078] In step 6, the multimodal data [data], the encoded data [base] and the cloud address [url] that do not need to be spliced are spliced into a data sequence [Array] to be sent;
[0079] The above dynamic judgment threshold algorithm can ensure that when the file is large, it is more likely to choose to upload to the cloud to avoid the pressure on the network and server caused by large file transfer. On the contrary, for smaller files, Base64 encoding can be selected to send directly to reduce the use of cloud storage and potential network delays. Such a dynamic adjustment mechanism can better adapt to different network and server conditions and optimize the overall data transmission efficiency.
[0080] In step 7, the data sequence [Array] is cut into multiple data fragments to obtain the final data array [res] to be sent, which contains multiple cut data fragments, such as [data-1], ..., [data-n], [base-1],..., [base-n], [url-1], ..., [url-n], etc.
[0081] The server cuts the elements in [Array] into multiple data fragments in sequence. The specific process includes:
[0082] Set the minimum data block size MBS and the maximum data block size MXS; calculate the network environment status NES coefficient NTC:
[0083] NTC = (w1 * (1 / (1 + Latency)) + w2 * (Bandwidth / Max Bandwidth) +w3 * (1 - Packet Loss Rate));
[0084] Among them, Latency is network delay; Bandwidth is bandwidth; Max Bandwidth is the preset maximum bandwidth; Packet Loss Rate is packet loss rate; w1 is the weight coefficient of network delay; w2 is the weight coefficient of bandwidth; w3 is the weight coefficient of packet loss rate; and w1+w2+w3=1;
[0085] Adjust the block size BS according to the network environment status NES coefficient NTC;
[0086] Where, BS = MBS + (MXS - MBS) * NTC;
[0087] The overall data block size GDS is divided into n data blocks of size BS; each data block is assigned a unique number BN, where BN is an increasing sequence number 1 to n.
[0088] The present invention can dynamically adjust the size of data blocks according to the real-time network environment status, thereby optimizing the efficiency and reliability of data transmission. The block numbering mechanism ensures that if packet loss occurs during data transmission, the lost data blocks can be quickly located and retransmitted, thereby improving the robustness of transmission.
[0089] In step 8a, different request headers are used to mark different data types of the data array. The server uses the SSE protocol to push data [res] to the client, and uses different request headers ('data', 'base', 'url') to mark the data type so that the client can parse it correctly.
[0090] In step 8b, a unique identifier is assigned to each data fragment. The server assigns a unique identifier id to each data fragment in the format of ijn, where i represents the sequence number in [res], j represents the sequence number in [Array], and n represents the cutting sequence number of the dynamic window algorithm.
[0091] In step 9, the final data array is sent to the client.
[0092] In step 10, the client feeds back to the server the final data array received.
[0093] In step 11, after receiving the data, the client uses the id to rearrange the data to ensure the correct order of the data. The data rearrangement process includes:
[0094] Initialization: In the initialization phase, the client builds a data structure called the Reassembly Buffer, which is used to temporarily store the data fragments received from the server. The client initializes an empty Reassembly Buffer RDB, which has a data structure for fast search and insertion operations, such as a hash table.
[0095] Data fragment reception: When the client receives a new data fragment through the SSE connection, it parses the identifier id attached to the data fragment and stores the data fragment and its identifier in the reassembled data buffer. After the client receives the data fragment DP and its identifier id, it stores DP in the RDB with id as the key.
[0096] Data sorting: The client sorts the data fragments in the RDB according to the sorting information in the identifier id (such as i and j values) to ensure that the data fragments can be processed in the order in which they appear in the original data sequence.
[0097] Data reassembly: The algorithm assembles the sorted data fragments into complete data units DU according to the predetermined reassembly logic.
[0098] Data integrity check: The algorithm performs integrity checks on the DU, for example, by verifying the number of checksums or data segments. If data is missing or erroneous, a retransmission request can be automatically or manually triggered based on demand, using the identifier id to locate the data segment that needs to be retransmitted in the server cache.
[0099] Data scheduling: Once a data unit is confirmed to be complete, the algorithm will schedule it according to the data type (specified by the request headers 'data', 'base', and 'url') to determine the data processing and display strategy.
[0100] In step 12, the data type is parsed.
[0101] In step 13a, the text data data is directly displayed.
[0102] In step 13b, the presentation media data base is decoded.
[0103] In step 13c, the presentation media data URL is downloaded from the cloud.
[0104] A multimodal data transmission method proposed in Example 1 of the present invention selects the most appropriate data transmission method by dynamically judging the client network speed, server occupancy, etc., thereby effectively improving the efficiency of multimodal data transmission and reducing data delay.
[0105] A multimodal data transmission method proposed in Example 1 of the present invention greatly improves the efficiency and reliability of data transmission by integrating breakpoint reconnection, dynamic window algorithm, and intelligent block segmentation and reorganization algorithm in the process of binary to text encoding, identification and transmission of data blocks, and reception and reorganization of data blocks by the client. In the face of complex and changeable network environments and large-scale data processing requirements, this solution can ensure an efficient and stable data transmission experience, and provides a comprehensive optimized solution for multimodal data transmission.
[0106] Example 2
[0107] Based on a multimodal data transmission method proposed in Embodiment 1 of the present invention, Embodiment 2 of the present invention further proposes a multimodal data transmission system. Figure 2 This is a schematic diagram of a multimodal data transmission system proposed in Embodiment 2 of the present invention; the system includes a receiving module, an assembling module, a cutting module, a marking module and a sending module;
[0108] The receiving module is used to receive the connection request from the client;
[0109] The assembly module is used to assemble multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: dynamic threshold judgment is performed on the multimodal data that needs to be spliced to obtain the coded data and the cloud address; the multimodal data that does not need to be spliced, the coded data and the cloud address are spliced into the data sequence to be sent;
[0110] The cutting module is used to cut the data sequence into multiple data segments to obtain the data array that is finally sent;
[0111] The marking module is used to mark different data types of the data array using different request headers;
[0112] The sending module is used to assign a unique identifier to each data fragment and then send the data array to the client.
[0113] In the assembly module: the process of performing dynamic threshold judgment on the multimodal data that need to be spliced to obtain the encoded data and the cloud address includes: converting the multimodal data that need to be spliced into binary data, and setting the basic threshold according to the current network status; if the size of the binary data is lower than the basic threshold, the binary data is BASE64 encoded to obtain the encoded data; if the size of the binary data is higher than the basic threshold, the binary data is stored in the cloud to obtain the corresponding cloud address; the multimodal data that does not need to be spliced, the encoded data and the cloud address are spliced into a data sequence to be sent.
[0114] The formula for determining the basic threshold is: T_base = K * F; where T_base is the basic threshold; K is the threshold coefficient; and F is the number of bytes of multimodal data.
[0115] It also includes dynamically adjusting the basic threshold according to the client network speed, server occupancy rate and historical transmission efficiency; the calculation method of the adjusted basic threshold is:
[0116] T_adjusted= T_base +α* C +β* (1 - S) +γ* H;
[0117] Among them, T_adjusted is the adjusted basic threshold; C is the client network speed; α is the weight coefficient of the client network speed; S is the server occupancy rate; β is the weight coefficient of the server occupancy rate; H is the historical transmission efficiency; γ is the weight coefficient of the historical transmission efficiency; and α+β+γ=1.
[0118] In the cutting module, the process of cutting a data sequence into multiple data segments includes:
[0119] Set the minimum data block size MBS and the maximum data block size MXS; calculate the network environment status NES coefficient NTC:
[0120] NTC = (w1 * (1 / (1 + Latency)) + w2 * (Bandwidth / Max Bandwidth) +w3 * (1 - Packet Loss Rate));
[0121] Among them, Latency is network delay; Bandwidth is bandwidth; Max Bandwidth is the preset maximum bandwidth; Packet Loss Rate is packet loss rate; w1 is the weight coefficient of network delay; w2 is the weight coefficient of bandwidth; w3 is the weight coefficient of packet loss rate; and w1+w2+w3=1;
[0122] Adjust the block size BS according to the network environment status NES coefficient NTC;
[0123] Where, BS = MBS + (MXS - MBS) * NTC;
[0124] The overall data block size GDS is divided into n data blocks of size BS; each data block is assigned a unique number BN, where BN is an increasing sequence number 1 to n.
[0125] After receiving the sent data array, the client further includes: constructing a reassembled data buffer for temporarily storing the data fragments received from the server.
[0126] After assembling into a complete data unit, the data unit is also subjected to an integrity check. If data missing or error is detected, a retransmission request is triggered, and an identifier is used to locate the data fragment that needs to be retransmitted in the server cache.
[0127] A multimodal data transmission system proposed in Example 2 of the present invention selects the most appropriate data transmission method by dynamically judging the client network speed, server occupancy, etc., thereby effectively improving the efficiency of multimodal data transmission and reducing data delay.
[0128] A multimodal data transmission system proposed in Example 2 of the present invention greatly improves the efficiency and reliability of data transmission by integrating breakpoint reconnection, dynamic window algorithm, and intelligent block segmentation and reorganization algorithm in the process of binary to text encoding, identification and transmission of data blocks, and reception and reorganization of data blocks by the client. In the face of complex and changeable network environments and large-scale data processing requirements, this solution can ensure an efficient and stable data transmission experience, and provides a comprehensive optimized solution for multimodal data transmission.
[0129] For the description of the relevant parts of a multimodal data transmission system provided in Example 2 of the present invention, reference can be made to the detailed description of the corresponding parts in a multimodal data transmission method provided in Example 1 of the present invention, which will not be repeated here.
[0130] Example 3
[0131] Based on a multimodal data transmission method proposed in Embodiment 1 of the present invention, Embodiment 3 of the present invention further proposes a multimodal data transmission device. Figure 3 This is a connection diagram of a multimodal data transmission device proposed in Example 3 of the present invention; the device includes a server and a client; the server and the client are connected via wireless communication.
[0132] The server is used to receive a connection request from a client; assemble multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: perform dynamic threshold judgment on the multimodal data to be spliced to obtain coded data and a cloud address; splice the multimodal data that does not need to be spliced, the coded data and the cloud address into a data sequence to be sent; cut the data sequence into multiple data segments to obtain a data array that is finally sent; use different request headers to mark different data types of the data array; assign a unique identifier to each data segment and send the data array to the client;
[0133] The process in which the server performs dynamic threshold judgment on the multimodal data to be spliced to obtain the encoded data and the cloud address includes: converting the multimodal data to be spliced into binary data, and setting a basic threshold according to the current network status; if the size of the binary data is lower than the basic threshold, performing BASE64 encoding on the binary data to obtain the encoded data; if the size of the binary data is higher than the basic threshold, storing the binary data in the cloud and obtaining the corresponding cloud address.
[0134] The formula for determining the basic threshold is: T_base=K*F; where T_base is the basic threshold; K is the threshold coefficient; and F is the number of bytes of multimodal data.
[0135] It also includes dynamically adjusting the basic threshold according to the client network speed, server occupancy rate and historical transmission efficiency; the calculation method of the adjusted basic threshold is:
[0136] T_adjusted=T_base+α*C+β*(1-S)+γ*H;
[0137] Among them, T_adjusted is the adjusted basic threshold; C is the client network speed; α is the weight coefficient of the client network speed; S is the server occupancy rate; β is the weight coefficient of the server occupancy rate; H is the historical transmission efficiency; γ is the weight coefficient of the historical transmission efficiency; and α+β+γ=1.
[0138] After receiving the sent data array, the client is used to rearrange the data using the identifier and parse the data type according to the request header; using the sorted data fragments, the data fragments are assembled into complete data units according to a predetermined reorganization logic.
[0139] The process of the client cutting the data sequence into multiple data fragments includes: setting the minimum data block size MBS and the maximum data block size MXS; calculating the network environment status NES coefficient NTC:
[0140] NTC=(w1* (1 / (1+ Latency))+w2*(Bandwidth / Max Bandwidth)+w3*(1- PacketLoss Rate));
[0141] Among them, Latency is network delay; Bandwidth is bandwidth; Max Bandwidth is the preset maximum bandwidth; Packet Loss Rate is packet loss rate; w1 is the weight coefficient of network delay; w2 is the weight coefficient of bandwidth; w3 is the weight coefficient of packet loss rate; and w1+w2+w3=1;
[0142] Adjust the block size BS according to the network environment status NES coefficient NTC;
[0143] Among them, BS=MBS+(MXS-MBS)*NTC;
[0144] The overall data block size GDS is divided into n data blocks of size BS; each data block is assigned a unique number BN, where BN is an increasing sequence number 1 to n.
[0145] After receiving the sent data array, the client further includes: constructing a reassembled data buffer for temporarily storing the data fragments received from the server.
[0146] After assembling a complete data unit, the client also performs an integrity check on the data unit. If data is missing or erroneous, a retransmission request is triggered, and the identifier is used to locate the data fragment that needs to be retransmitted in the server cache. Once the data unit is confirmed to be complete, the algorithm will schedule it according to the data type and determine the data processing and display strategy.
[0147] The device also includes a cloud, and the server and the cloud are connected via wireless communication. In the case of general network conditions, tight server resources, and large transcoded content, the multimodal content is uploaded to a public cloud or a private cloud, and the resource address stored in the cloud is pushed to the client via the SSE protocol. The client downloads or views the content online by resolving the address, thereby reducing the resource usage of the server.
[0148] A multimodal data transmission device proposed in Example 3 of the present invention selects the most appropriate data transmission method by dynamically judging the client network speed, server occupancy, etc., thereby effectively improving the efficiency of multimodal data transmission and reducing data delay.
[0149] A multimodal data transmission device proposed in Example 3 of the present invention greatly improves the efficiency and reliability of data transmission by integrating breakpoint reconnection, dynamic window algorithm, and intelligent block segmentation and reorganization algorithm in the process of binary to text encoding, identification and transmission of data blocks, and reception and reorganization of data blocks by the client. In the face of complex and changeable network environments and large-scale data processing requirements, this solution can ensure an efficient and stable data transmission experience, and provides a comprehensive optimized solution for multimodal data transmission.
[0150] For the description of the relevant parts in a multimodal data transmission device provided in Example 3 of the present invention, reference can be made to the detailed description of the corresponding parts in a multimodal data transmission method provided in Example 1 of the present invention, which will not be repeated here.
[0151] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment that includes a series of elements are inherent to the elements. In the absence of more restrictions, the elements limited by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or equipment that includes the elements. In addition, the above-mentioned technical solution provided in the embodiment of the present application is consistent with the corresponding technical solution in the prior art in principle, and the part is not described in detail, so as not to repeat too much.
[0152] Although the above describes the specific implementation of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. For those skilled in the art, other different forms of modifications or deformations can be made on the basis of the above description. It is not necessary and impossible to list all the implementation methods here. On the basis of the technical solution of the present invention, various modifications or deformations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.
Claims
1. A multimodal data transmission method, characterized in that: The following steps are involved: Receive connection requests from clients; Assembling multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: performing dynamic threshold judgment on the multimodal data to be spliced to obtain coded data and a cloud address; splicing the multimodal data that does not need to be spliced, the coded data and the cloud address into a data sequence to be sent; the process of performing dynamic threshold judgment on the multimodal data to be spliced to obtain the coded data and the cloud address includes: converting the multimodal data to be spliced into binary data, and setting a basic threshold according to the current network status; if the size of the binary data is lower than the basic threshold, performing BASE64 encoding on the binary data to obtain the coded data; if the size of the binary data is higher than the basic threshold, storing the binary data in the cloud to obtain the corresponding cloud address; Among them, the multimodal data that does not need to be spliced is text data; Cutting the data sequence into multiple data segments to obtain a data array that is finally sent; Using different request headers to mark different data types of the data array; Each piece of data is assigned a unique identifier and the data array is sent to the client.
2. A multimodal data transmission method according to claim 1, characterized in that: The method further comprises: After receiving the sent data array, the client uses the identifier to rearrange the data and parses the data type according to the request header; The sorted data fragments are used to assemble the data fragments into complete data units according to a predetermined reorganization logic.
3. A multimodal data transmission method according to claim 2, characterized in that: After receiving the sent data array, the client further includes: constructing a reorganized data buffer; the data buffer is used to temporarily store the data fragments received from the server.
4. A multimodal data transmission method according to claim 3, characterized in that: After assembling into a complete data unit, the data unit is also subjected to an integrity check. If data missing or error is detected, a retransmission request is triggered, and an identifier is used to locate the data segment that needs to be retransmitted in the server data buffer.
5. A multimodal data transmission method according to claim 1, characterized in that: The formula for determining the basic threshold is: T_base=K*F; Among them, T_base is the basic threshold; K is the threshold coefficient; F is the number of bytes of multimodal data.
6. A multimodal data transmission method according to claim 5, characterized in that: The method also includes dynamically adjusting the basic threshold value according to the client network speed, server occupancy rate and historical transmission efficiency; The adjusted base threshold is calculated as: T_adjusted=T_base+α*C+β*(1-S)+γ*H; Among them, T_adjusted is the adjusted basic threshold; C is the client network speed; α is the weight coefficient of the client network speed; S is the server occupancy rate; β is the weight coefficient of the server occupancy rate; H is the historical transmission efficiency; γ is the weight coefficient of the historical transmission efficiency; and α+β+γ=1.
7. A multimodal data transmission method according to claim 1, characterized in that: The process of cutting the data sequence into multiple data segments includes: Set the minimum data block size MBS and the maximum data block size MXS; calculate the network environment status NES coefficient NTC: NTC = (w1 * (1 / (1 + Latency)) + w2 * (Bandwidth / Max Bandwidth) + w3 *(1 - Packet Loss Rate)); Among them, Latency is network delay; Bandwidth is bandwidth; Max Bandwidth is the preset maximum bandwidth; PacketLoss Rate is packet loss rate; w1 is the weight coefficient of network delay; w2 is the weight coefficient of bandwidth; w3 is the weight coefficient of packet loss rate; and w1+w2+w3=1; Adjust the block size BS according to the network environment status NES coefficient NTC; Among them, BS = MBS + (MXS - MBS) * NTC; The overall size of the data block GDS is divided into n data blocks of size BS; each data block is assigned a unique number BN, where BN is an increasing sequence number 1 to n.
8. A multimodal data transmission system, used to execute a multimodal data transmission method according to any one of claims 1 to 7, characterized in that: It includes a receiving module, an assembling module, a cutting module, a marking module and a sending module; The receiving module is used to receive a connection request from a client; The assembly module is used to assemble multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: dynamic threshold judgment is performed on the multimodal data to be spliced to obtain the coded data and the cloud address; the multimodal data that does not need to be spliced, the coded data and the cloud address are spliced into the data sequence to be sent; The cutting module is used to cut the data sequence into multiple data segments to obtain a data array that is finally sent; The labeling module is used to label different data types of the data array using different request headers; The sending module is used to assign a unique identifier to each data segment and then send the data array to the client.
9. A multimodal data transmission device, used to execute a multimodal data transmission method according to any one of claims 1 to 7, characterized in that: Including server and client; The server is used to receive a connection request from a client; assemble multimodal data according to the connection request to obtain a data sequence to be sent; the assembly process is: perform dynamic threshold judgment on the multimodal data to be spliced to obtain coded data and a cloud address; splice the multimodal data that does not need to be spliced, the coded data and the cloud address into a data sequence to be sent; cut the data sequence into multiple data segments to obtain a data array that is finally sent; use different request headers to mark different data types of the data array; assign a unique identifier to each data segment and send the data array to the client; The client is used to rearrange the data using the identifier after receiving the sent data array, and parse the data type according to the request header; and assemble the data fragments into complete data units according to a predetermined reorganization logic using the sorted data fragments.
Citation Information
Patent Citations
Method and system for reducing effective load
CN101047663A
Binary data optimized transmission system
CN102970378A
Method and device for efficiently storing digital slices by server
CN113505254A
Virtual desktop image processing method and related device
CN114339305A
Data transmission method and data transmission system
JP2002051027A
