Function-based Data Sending Method, Apparatus, Device, and Data Receiving Method

By splitting data in TCP/IP transmission and using the TCP/IP connection establishment process to determine the digital equivalent and functional relationship, obtaining coded information for transmission, the problem of low data transmission efficiency is solved and more efficient data transmission is achieved.

CN116260896BActive Publication Date: 2025-07-18SHENZHEN ZHI HUI LIN NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210023690.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-10
Publication Date
2025-07-18
Estimated Expiration
2042-01-10

AI Technical Summary

Technical Problem

In the TCP/IP transmission process, the data transmission efficiency is low, especially for the transmission effect of large data blocks.

Method used

By splitting the data to be sent into multiple data shards, and using the TCP/IP connection establishment process between the sending end and the receiving end to determine the digital equivalent, establish the relationship between the data shard and the function, obtain the encoded information for transmission, and reduce the actual data transmission amount.

Benefits of technology

This improves data transmission efficiency and reduces data transmission volume, especially for the transmission of large data blocks, which significantly improves efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116260896B_ABST
    Figure CN116260896B_ABST
Patent Text Reader

Abstract

The present application provides a function-based data sending method, apparatus, device, and data receiving method. The implementation of the data sending method includes: obtaining data to be sent and splitting the data to be sent into X data shards; determining a digital equivalent, which is determined during the TCP / IP connection establishment process between the sending end and the receiving end; obtaining a first data shard among the X data shards and determining a first functional relationship satisfied by the value of the first data shard and the data equivalent; obtaining first coding information of the first functional relationship in a data dictionary, where the data dictionary includes coding information corresponding to multiple functional relationships; and sending the first coding information. By using the data sending method of the embodiments of the present application, during the TCP / IP transmission process, coding information is determined in the data dictionary according to the functional relationship satisfied by the value of the data shard and the data equivalent and the coding information is sent, reducing a large amount of data transmission volume and thus improving the data transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing, and in particular, to a function-based data sending method, apparatus, device, and data receiving method. Background Art

[0002] With the rapid development of the social economy and the continuous improvement of people's living standards, data communication technology has been widely popularized and applied in all walks of life. The data transmission volume has entered an era of unprecedented growth. Moreover, the types of information content that people can access are becoming increasingly rich and colorful, and the size of data blocks in the data transmission process is correspondingly getting larger and larger.

[0003] Data, that is, files in a device with data storage capacity, is usually transmitted through a network using a certain established data transmission protocol. Among them, the TCP / IP (Transmission Control Protocol / Internet Protocol) protocol is one of the most commonly used data transmission protocols. At present, the requirements for data transmission efficiency in the market are getting higher and higher. If data is still transmitted according to the initial size of the data block during TCP / IP transmission, the data transmission efficiency will be severely reduced. Summary of the Invention

[0004] Embodiments of the present application provide a function-based data sending method, apparatus, device, and data receiving method. Implementing the embodiments of the present application can improve the data transmission efficiency during TCP / IP transmission.

[0005] In a first aspect, an embodiment of the present application provides a function-based data sending method, which is applied to a sending end. The method includes:

[0006] Obtain data to be sent, and split the data to be sent into X data shards;

[0007] Determine a digital equivalent item, which is determined by the TCP / IP connection establishment process between the sending end and the receiving end;

[0008] Obtain a first data shard among the X data shards, and determine a first functional relationship satisfied by the value of the first data shard and the digital equivalent item;

[0009] Obtain first coding information of the first functional relationship in a data dictionary, where the data dictionary includes coding information corresponding to multiple functional relationships;

[0010] Send the first coding information.

[0011] In a second aspect, an embodiment of the present application provides a function-based data sending apparatus, which is applied to a sending end. The apparatus includes:

[0012] An acquisition unit, configured to acquire data to be sent and split the data to be sent into X data shards;

[0013] A digital unit, configured to determine a digital equivalent, which is determined by the TCP / IP connection establishment process between the sender and the receiver;

[0014] A function unit, configured to acquire a first data shard among the X data shards and determine a first functional relationship satisfied by the value of the first data shard and the digital equivalent;

[0015] An encoding unit, configured to acquire first encoding information of the first functional relationship in a data dictionary, where the data dictionary includes encoding information corresponding to multiple functional relationships;

[0016] A sending unit, configured to send the first encoding information.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, and computer execution instructions stored on the memory and executable on the processor. When the computer execution instructions are run, the electronic device is caused to execute some or all of the steps described in any method of the first aspect of the embodiments of the present application.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are run on a communication device, the communication device is caused to execute some or all of the steps described in any method of the first aspect of the embodiments of the present application.

[0019] In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.

[0020] In a sixth aspect, an embodiment of the present application provides a function-based data receiving method, which is applied to a receiver. The method includes:

[0021] Receiving X encoding information;

[0022] Determining a digital equivalent, which is determined by the TCP / IP connection establishment process between the sender and the receiver;

[0023] Determining a target functional relationship according to each encoding information among the X encoding information in a data dictionary;

[0024] Restoring the X encoding information according to the target functional relationship and the digital equivalent to obtain X data shards;

[0025] Splice X data shards to obtain the original data.

[0026] It can be seen that in the embodiments of the present application, the digital equivalent is determined by the TCP / IP connection establishment process between the sender and the receiver, and then the first functional relationship satisfied by the value of the first data shard and the data equivalent is determined. Thus, the first coding information in the data dictionary of the first functional relationship is obtained and the first coding information is sent, and the transmission of X data shards is finally completed by sending X coding information. By using the method of the embodiments of the present application, during the TCP / IP transmission process, the coding information is determined and sent in the data dictionary according to the functional relationship satisfied by the value of the data shard and the data equivalent. Since only the coding information needs to be sent instead of the data blocks that occupy a large amount of space, a large amount of data transmission volume is reduced, thereby improving the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0028] Figure 1 is a structural deployment diagram of a data transmission system;

[0029] Figure 2 is a schematic flowchart of a function-based data sending method provided by an embodiment of the present application;

[0030] Figure 3 is an example schematic diagram of the TCP / IP connection establishment process;

[0031] Figure 4 is an example schematic diagram of a function-based data sending method provided by an embodiment of the present application;

[0032] Figure 5 is an example schematic diagram of a function-based data sending method provided by an embodiment of the present application;

[0033] Figure 6 is an example schematic diagram of a function-based data sending method provided by an embodiment of the present application;

[0034] Figure 7 is a schematic structural diagram of a function-based data sending device provided by an embodiment of the present application;

[0035] Figure 8 is a schematic server structure diagram of the hardware operating environment of an electronic device provided by an embodiment of the present application;

[0036] Figure 9 It is a schematic flow chart of a data receiving method based on a function provided by an embodiment of the present application. Specific embodiments

[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.

[0038] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps is not limited to the listed steps, but optionally further includes steps not listed, or optionally further includes other steps inherent to these processes, methods, products or devices.

[0039] Referring to "embodiment" herein means that a specific feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0040] The application scenarios related to the embodiments of the present application are introduced below in conjunction with the accompanying drawings.

[0041] Figure 1 It is a structural deployment diagram of a data transmission system. As Figure 1 shown, the first end of the system is connected to the sending end and the second end is connected to the receiving end.

[0042] Among them, the sending end refers to the role that wants to send the original data to the receiving end and thus send the original data to the data transmission system for compression;

[0043] Among them, the data transmission system is used to receive the original data from the sending end, compress the original data through a traditional compression algorithm, and send the compressed original data to the receiving end;

[0044] Among them, the receiving end refers to the role that receives the compressed original data from the data transmission system and restores the compressed original data to obtain the original data;

[0045] During the data transmission process of the above system, since the original data is only compressed by traditional compression algorithms, new compression redundancy will be generated. Moreover, the compression effect of traditional compression algorithms on data blocks with large occupied space is limited. It can be seen that the above process does not have a sufficient improvement effect on data transmission efficiency.

[0046] Based on this, the embodiments of the present application provide a function-based data sending method, which is applied to the sending end. Please refer to Figure 2 , Figure 2 is a schematic flowchart of a function-based data sending method provided by the embodiments of the present application. As Figure 2 shown, the method includes the following steps:

[0047] 101: Obtain the data to be sent and split the data to be sent into X data shards.

[0048] Among them, the data to be sent can be decimal data. In a specific implementation, the binary data corresponding to the original data can be converted into decimal data through the number system to obtain the data to be sent. The data forms of the original data include forms such as numbers, texts, symbols, images, voices, videos, etc.

[0049] Among them, for the X data shards, if the data to be sent is decimal data, each of the X data shards obtained by corresponding splitting should also be decimal data.

[0050] Among them, splitting the data to be sent into X data shards can be splitting it into multiple data shards of the same size or splitting it into multiple data shards of different sizes.

[0051] 102: Determine the digital equivalent, which is determined by the TCP / IP connection establishment process between the sending end and the receiving end.

[0052] Among them, TCP / IP (Transmission Control Protocol / Internet Protocol) refers to the communication protocol for networking communication between computers, which defines how computers and other electronic devices are networked and the standards for how data is transmitted between them.

[0053] Please refer to Figure 3 , Figure 3 is an example schematic diagram of the TCP / IP connection establishment process. As Figure 3As shown, during the TCP / IP transmission process, the sender and the receiver use the three-way handshake method to confirm the successful establishment of the connection between the two parties. In the first handshake, the sender generates a synchronization sequence number, which includes a synchronization flag SYN (synchronous) = 1 and a synchronization sequence number SynNumber. The sender sends the synchronization sequence number and the first random sequence number SEQ1 (Sequence number) = x to the receiver; in the second handshake, the receiver receives the synchronization sequence number and knows from SYN = 1 in the synchronization sequence number that the sender requests to establish a connection. Therefore, the receiver sends an acknowledgement flag ACK (acknowledgement) = 1 and SYN = 1 to the sender, and sends the first acknowledgement number ACKnumber1 (Acknowledge number) = x + 1 to the sender according to SEQ1, and then randomly generates a second random sequence number SEQ2 = y and sends it to the sender; in the third handshake, the sender checks whether the received ACKnumber1 is correct, that is, checks whether ACKnumber1 is equal to SEQ1 + 1, that is, x + 1, and whether ACK is 1. If so, the sender sends ACK = 1 and the second acknowledgement number ACKnumber2 = y + 1 to the receiver. The receiver confirms whether ACKnumber2 is equal to SEQ2 + 1, that is, y + 1, and whether ACK is 1. If so, the sender and the receiver successfully establish a data transmission connection.

[0054] Among them, the digital equivalent is determined by the TCP / IP connection establishment process between the sender and the receiver. It can refer to that the digital equivalent is determined respectively according to the first digits of the synchronization sequence number SynNumber, the first acknowledgement number ACKnumber1, and the second acknowledgement number ACKnumber2 generated during the TCP / IP connection establishment process. Since the first digits of SynNumber, ACKnumber1, and ACKnumber2 may all be 0-9, the possible values of the digital equivalent are 000-999. That is to say, there are 1000 possible values for the digital equivalent. Since the numbers generated during the above connection establishment process will not change until the connection is disconnected after the connection between the sender and the receiver is successfully established, there is only one digital equivalent during a single connection establishment process. Therefore, the sender and the receiver jointly correspond to the same digital equivalent.

[0055] 103: Obtain the first data fragment among X data fragments and determine the first functional relationship satisfied by the value of the first data fragment and the digital equivalent.

[0056] Among them, the first data fragment can be any one of the X data fragments.

[0057] Among them, determining the first functional relationship satisfied by the value of the first data shard and the data equivalent item. In specific implementation, it can refer to the functional relationship where the arithmetic formula holds when the data equivalent item is used as the independent variable and the value of the first data shard is used as the dependent variable, or it can also refer to the functional relationship where the arithmetic formula holds when the value of the first data shard is used as the independent variable and the data equivalent item is used as the dependent variable.

[0058] Exemplarily, the first functional relationship refers to the functional relationship where the arithmetic formula holds when the data equivalent item is used as the independent variable and the value of the first data shard is used as the dependent variable. If the value of the first data shard is 256 and the data equivalent item is 004, considering 004 as 4, since 4 4 = 256, in this case, the first functional relationship is: the value of the data shard is the value of the power function with the data equivalent item as the base and 4 as the exponent. It can be obtained that the first functional relationship is: the value of the data shard = (data equivalent item) 4 .

[0059] Another exemplarily, similarly, the first functional relationship refers to the functional relationship where the arithmetic formula holds when the data equivalent item is used as the independent variable and the value of the first data shard is used as the dependent variable. If the value of the first data shard is 28657 and the data equivalent item is 023, considering 023 as 23, since in the Fibonacci sequence when the independent variable is 23 the dependent variable is 28657, then in this case, the first functional relationship is: the value of the data shard is the value of the Fibonacci sequence with the data equivalent item as the number of terms. It can be obtained that the first functional relationship is:

[0060] 104: Obtain the first coding information of the first functional relationship in the data dictionary. The data dictionary includes coding information corresponding to multiple functional relationships.

[0061] Among them, the first coding information of the first functional relationship in the data dictionary can be the size of 4 bits. That is to say, the number of space bits occupied by the first coding information can be 4 bits. In specific implementation, the number of space bits occupied by the first coding information can be specifically determined according to the number of the first functional relationships. The fewer the number of the first functional relationships, the smaller the number of space bits occupied by the first coding information.

[0062] Exemplarily, based on the above exemplary embodiments, if the first coding information is 4 bits and the data dictionary includes coding information corresponding to multiple functional relationships. In a specific implementation, it can be that when the first functional relationship is that the value of the data shard is the value of a power function with the data equivalent term as the base and 4 as the exponent, the corresponding first coding information is 0001; when the first functional relationship is that the value of the data shard is the value of the Fibonacci sequence with the data equivalent term as the number of terms, the corresponding coding information is 0101. It should be noted that the coding information corresponding to the functional relationship described in this exemplary embodiment in the data dictionary is only an example. In a specific application, the coding information corresponding to the functional relationship in the data dictionary can also exist in other coding forms.

[0063] 105: Send the first coding information.

[0064] Among them, if the first data shard is one of the X data shards, there is a one-to-one correspondence between the first coding information and the first data shard. When the first coding information is sent X times, the sending end successfully sends the data to be sent to the receiving end. After that, the receiving end only needs to restore each of the X first coding information to obtain X data shards, and then splice the X data shards to restore the data to be sent.

[0065] Exemplarily, please refer to Figure 4 , Figure 4 which is an example schematic diagram of a data sending method based on functions provided by an embodiment of the present application. As Figure 4As shown in the figure, assume that the number of bits occupied by the first coding information is 4 bits, and the original data is 00100110100001010111... After converting the original data to decimal, the decimal data, i.e., the data to be sent, is 28657... The server obtains the data to be sent from the sending end and splits the data to be sent into X data shards. If the first digits of SynNumber, ACKnumber1, and ACKnumber2 generated during the TCP / IP connection establishment process between the sending end and the receiving end are 0, 2, and 3 respectively, then the server determines that the digital equivalent is 023, and obtains the first data shard as 26857 among the X data shards. Since in the Fibonacci sequence, the sequence value corresponding to the term number 23 is 26857, therefore, the server determines that the first function relationship satisfied by the value of the first data shard and the digital equivalent is: the value of the data shard is the value of the Fibonacci sequence with the digital equivalent as the term number. And the first coding information of the first function relationship in the data dictionary is 0101, then the server sends the first coding information, that is, sends 0101 to the receiving end; Similarly, for the remaining data, the server can send the remaining coding information in the same way. It can be seen that if the method of this application embodiment is not adopted, then the original sending data corresponding to the data shard 28657 should be 00100110100001010111, which occupies 20 bits of space. After adopting the method of this application embodiment, only the first coding information that occupies 4 bits or other fewer bits of space needs to be sent. Even for data shards that occupy more space and larger space, only 4 bits or other fewer bits of the first coding information need to be sent. Obviously, the method of this application embodiment significantly reduces the amount of data to be sent for data shards that occupy a large amount of space, and greatly improves the data transmission efficiency.

[0066] It can be seen that in the embodiment of this application, the digital equivalent is determined by the TCP / IP connection establishment process between the sending end and the receiving end, and then the first function relationship satisfied by the value of the first data shard and the digital equivalent is determined, so as to obtain the first coding information of the first function relationship in the data dictionary and send the first coding information, and finally complete the sending of X data shards by sending X coding information. By adopting the method of this application embodiment, during the TCP / IP transmission process, the coding information is determined and sent in the data dictionary according to the function relationship satisfied by the value of the data shard and the digital equivalent. Since only the coding information needs to be sent instead of the data block that occupies a large amount of space, a large amount of data transmission volume is reduced, thereby improving the data transmission efficiency.

[0067] In a possible example, the above method further includes:

[0068] Send the data dictionary;

[0069] Or send the identification information of the data dictionary, where the identification information of the data dictionary characterizes the data dictionary corresponding to X pieces of first coding information.

[0070] Wherein, the data dictionary occupies a space of a coding space, and the occupied space of the coding space and the X pieces of first coding information is smaller than the occupied space of sending X data shards.

[0071] In a specific implementation, the data transmission volume of sending the identification information of the data dictionary is smaller than the data transmission volume of directly sending the data dictionary. If the receiving end locally stores the data dictionary, the method of sending the identification information of the data dictionary can be adopted to further improve the data transmission efficiency.

[0072] It can be seen that in the embodiments of the present application, by sending the data dictionary or the identification information of the data dictionary, the data conversion basis between the X pieces of first coding information sent and the X data shards is informed to the receiving end, so that the receiving end can restore the X pieces of first coding according to the data dictionary to obtain the original data corresponding to the data to be sent.

[0073] In a possible example, the above method further includes:

[0074] Obtain the first possible value of the digital equivalent;

[0075] Obtain the second possible value of the first data shard;

[0076] Determine at least one functional relationship that the first possible value and the second possible value can satisfy;

[0077] Encode at least one functional relationship to obtain coding information, and obtain a data dictionary according to the coding information.

[0078] Wherein, for the first possible value of the digital equivalent, if it is determined by the first digits of the synchronization sequence number SynNumber, ACKnumber1, and ACKnumber2 generated respectively during the TCP / IP connection establishment process for the digital equivalent, then as can be seen from the above, the first possible value of the digital equivalent is 1000 possible values from 000 to 999.

[0079] Wherein, the second possible value of the first data shard is determined by the number of bits of the occupied space of the first data shard.

[0080] Exemplarily, if the first data shard is decimal data, when the number of bits of the occupied space of the first data shard is 3 bits, the second possible value of the first data shard is 1000 possible values from 0 to 999; if the number of bits of the occupied space of the first data shard is 5 bits, the second possible value of the first data shard is 100000 possible values from 0 to 99999.

[0081] Among them, determining at least one functional relationship that the first possible value and the second possible value can satisfy may be determining at least one functional relationship that can be satisfied when the first possible value is the independent variable and the second possible value is the dependent variable, or may be determining at least one functional relationship that can be satisfied when the first possible value is the dependent variable and the second possible value is the independent variable.

[0082] Exemplarily, please refer to Figure 5 , Figure 5 FIG. is a schematic diagram of an example of a data sending method based on a function provided by an embodiment of the present application. As Figure 5 shown, if it is determined that the functional relationships that the first possible value and the second possible value can satisfy are functional relationship 1, functional relationship 2... functional relationship N, then functional relationship 1 is encoded as encoding information 1, functional relationship 2 is encoded as encoding information 2... functional relationship N is encoded as encoding information N, so as to obtain a data dictionary including the N encoding information corresponding to the above N functional relationships.

[0083] It can be seen that in the embodiment of the present application, by obtaining the first possible value of the digital equivalent and the second possible value of the first data shard, determining at least one functional relationship that the first possible value and the second possible value can satisfy, encoding at least one functional relationship to obtain encoding information, and then obtaining a data dictionary according to the encoding information. Thus, when there is already a given digital equivalent in the TCP / IP transmission process, through the functional relationship, there is a data conversion basis for one-to-one correspondence between each of the X data shards and the encoding information. In a possible example, the above encoding at least one functional relationship to obtain encoding information includes:

[0084] Obtaining the first identifier of each functional relationship in at least one functional relationship;

[0085] Obtaining the encoding information of each functional relationship in at least one functional relationship, where the encoding information includes the binary value corresponding to the first identifier.

[0086] Exemplarily, if the first identifier of a functional relationship is the decimal data 5, and the decimal data 5 is converted to binary data 0101 through binary conversion, then the encoding information of this functional relationship is 0101.

[0087] It can be seen that in the embodiment of the present application, the encoding information of each functional relationship in at least one functional relationship is the binary data corresponding to the first identifier of each functional relationship, and the encoding information is represented in the form of binary data to facilitate the direct sending of the encoding information.

[0088] In a possible example, the above method further includes:

[0089] Obtain a second identifier, where the second identifier is used to represent the difference between the value of each function relationship in at least one function relationship and the second possible value of the first data shard when the first possible value of the digital equivalent and the second possible value of the first data shard satisfy at least one function relationship;

[0090] Obtain the second identifier corresponding to the difference;

[0091] The encoding the at least one function relationship to obtain encoding information includes:

[0092] Obtain the encoding information of each function relationship in the at least one function relationship, where the encoding information includes the binary values corresponding to the first identifier and the second identifier.

[0093] Among them, the difference can be the value obtained by subtracting the second possible value of the first data shard from the value of the function relationship, or the value obtained by subtracting the value of the function relationship from the second possible value of the first data shard.

[0094] Among them, if the existing difference is only a positive number, the number of bits occupied by the second identifier corresponding to the remainder can be 2 bits, 4 bits, or other numbers of bits.

[0095] Exemplarily, if the existing difference is only a positive number, when the number of bits occupied by the second identifier is 2 bits, 00 can represent a difference of 0, 01 can represent a difference of 1, 10 can represent a difference of 2, and 11 can represent a difference of 3. That is to say, it can represent a total of 4 differences from 0 to 3; when the number of bits occupied by the second identifier is 4 bits, similarly, it can represent a total of 16 differences from 0 to 15.

[0096] Among them, if the existing difference includes both positive and negative numbers, the space occupied by the second identifier corresponding to the remainder can be 3 bits, 5 bits, or other numbers of bits.

[0097] Exemplarily, if the existing difference includes both positive and negative numbers, the first bit of the second identifier is used to represent the positive or negative of the difference. For example, 0 is used to represent a positive difference and 1 is used to represent a negative difference. When the number of bits occupied by the second identifier is 3 bits, 000 to 011 can represent differences from 0 to 3, and 101 to 111 can represent (-1) to (-3), a total of 8 differences; when the number of bits occupied by the second identifier is 5 bits, similarly, 00000 to 01111 can represent 0 to 15, and 10001 to 11111 can represent (-1) to (-15), a total of 32 differences.

[0098] Among them, the encoding information is formed by connecting the binary data corresponding to the first identifier and the second identifier adjacent to each other. That is to say, the binary data corresponding to the second identifier can be located in front of or behind the first identifier.

[0099] Exemplarily, based on the above exemplary embodiments, when the difference is only a positive number, the number of bits occupied by the second identifier corresponding to the remainder is 2 bits, and the binary data corresponding to the second identifier is in front of the first identifier. If the first data shard is 255, the digital equivalent is 4, and the functional relationship satisfied by the first possible value of the digital equivalent and the second possible value of the first data shard is: value of the functional relationship = (digital equivalent) 4 , since 4 4 = 256, and 256 - 255 = 1. It can be seen that the difference is 1, so the second identifier corresponding to the difference is 01. Thus, in this case, the encoded information can be obtained as 010001, and this encoded information can represent that when the value of the first data shard is incremented by 1, the functional relationship can be satisfied: value of the data shard = (digital equivalent) 4 .

[0100] It can be seen that in the embodiments of the present application, when the value of the first data shard can satisfy a certain functional relationship with the digital equivalent only after the difference within a certain range is increased or decreased, the binary value corresponding to the second identifier corresponding to the difference and the first identifier are obtained to form the encoded information. Thus, when there is a predetermined digital equivalent during the TCP / IP transmission process, even when there is a certain deviation between the value of the first data shard and the functional relationship, the encoded information can accurately represent the value of the first data shard, so that there is a data conversion basis for one-to-one correspondence between each of the X data shards and the encoded information.

[0101] In a possible example, the number of bits occupied by each encoded information is less than the number of bits occupied by each of the X data shards.

[0102] Among them, the number of bits occupied by each of the X data shards can refer to the number of bits occupied when each data shard is a decimal data, or can refer to the number of bits occupied after each data shard is converted from decimal data to binary data. Obviously, the number of bits occupied by binary data is greater than the number of bits occupied by decimal data.

[0103] It can be seen that in the embodiments of the present application, by ensuring that the number of bits occupied by each encoded information is less than the number of bits occupied by each of the X data shards, when sending the content of the data shard by sending the encoded information, the data transmission volume is less than the data transmission volume when directly sending the data shard, thereby improving the data transmission efficiency.

[0104] In a possible example, if the first functional relationship satisfied by the value of the first data shard and the data equivalent is a combination of multiple functional relationships, the obtaining of the first encoded information of the first functional relationship in the data dictionary includes:

[0105] Obtain the combination ways of multiple functional relationships and the coding information of each functional relationship in the multiple functional relationships;

[0106] Obtain first coding information, where the first coding information includes the coding information of each functional relationship in the multiple functional relationships and the coding information of the combination way of the multiple functional relationships.

[0107] Among them, the combination way of functional relationships refers to the operation rules between functional relationships, and the operation rules include addition, subtraction, multiplication, division or other rules. If the operation rules are only the four types of addition, subtraction, multiplication, and division, the coding information of the combination way of functional relationships can be represented by 2-bit binary data.

[0108] Among them, the arrangement way of the coding information of each functional relationship included in the first coding information and the coding information of the combination way of the multiple functional relationships can be, in specific implementation, arranged in sequence according to the combination way of the multiple functional relationships and the operation rules therebetween.

[0109] Exemplarily, please refer to Figure 6 , Figure 6 which is a schematic diagram of an example of a data sending method based on functions provided by an embodiment of the present application. As Figure 6 shown, if the first functional relationship satisfied by the value of the first data shard and the data equivalent item is: functional relationship 1 ÷ functional relationship 2, where the coding information of functional relationship 1 is 0001, the coding information of functional relationship 2 is 0101, and the operation rule of division is represented by binary data 11, then the first coding information can be 0001110101.

[0110] It can be seen that in the embodiment of the present application, when the first functional relationship satisfied by the value of the first data shard and the data equivalent item is a combination of multiple functional relationships, by obtaining the combination ways of the multiple functional relationships and the coding information of each functional relationship in the multiple functional relationships, the first coding information includes the coding information of each functional relationship in the multiple functional relationships and the coding information of the combination way of the multiple functional relationships. Thus, the first functional relationship can represent more corresponding functional relationships between the value of the first data shard and the data equivalent item, improve the coverage range of the value of the numerical shard by the first functional relationship, and further reduce the number of functional relationships. Correspondingly, the number of coding information included in the data dictionary also decreases, and in some possible cases, it can play a role in reducing the space size occupied by the first coding information and further improving the data transmission efficiency.

[0111] Consistent with the above Figure 2 shown embodiment, please refer to Figure 7 , Figure 7 which is a schematic structural diagram of a data sending device based on functions provided by an embodiment of the present application. As Figure 7 shown:

[0112] A function-based data sending device is applied to a sending end. The device includes:

[0113] 201: An acquisition unit, configured to acquire data to be sent and split the data to be sent into X data shards.

[0114] 202: A digital unit, configured to determine a digital equivalent, which is determined by the TCP / IP connection establishment process between the sending end and the receiving end.

[0115] 203: A function unit, configured to acquire a first data shard among the X data shards and determine a first functional relationship satisfied by the value of the first data shard and the data equivalent.

[0116] 204: An encoding unit, configured to acquire first encoding information of the first functional relationship in a data dictionary, where the data dictionary includes encoding information corresponding to multiple functional relationships.

[0117] 205: A sending unit, configured to send the first encoding information.

[0118] It can be seen that in the device provided in the embodiment of the present application, the digital equivalent is determined by the TCP / IP connection establishment process between the sending end and the receiving end, and then the first functional relationship satisfied by the value of the first data shard and the data equivalent is determined, so as to acquire the first encoding information of the first functional relationship in the data dictionary and send the first encoding information, and finally complete the sending of the X data shards by sending X encoding information. By using the device in the embodiment of the present application, during the TCP / IP transmission process, the encoding information is determined and sent in the data dictionary according to the functional relationship satisfied by the value of the data shard and the data equivalent. Since only the encoding information needs to be sent instead of the large data blocks that occupy a large space, a large amount of data transmission volume is reduced, thereby improving the data transmission efficiency.

[0119] Specifically, the embodiment of the present application can divide the function units of the function-based data sending device according to the above method example. For example, each function unit can be corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of a software function unit. It should be noted that the division of units in the embodiment of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation.

[0120] Consistent with the above Figure 2 shown embodiment, the embodiment of the present application provides an electronic device. Please refer to Figure 8 , Figure 8The following is a schematic diagram of the server structure of the hardware operating environment of an electronic device provided by an embodiment of the present application. As Figure 8 shown, the electronic device includes a processor, a memory, and computer-executable instructions stored on the memory and executable on the processor. When the computer-executable instructions are run, the electronic device is caused to execute instructions for performing the steps of any one of the data sending methods based on functions.

[0121] Among them, the processor is a CPU.

[0122] Among them, the memory, optionally, the memory can be a high-speed RAM memory or a stable memory, such as a disk memory.

[0123] Those skilled in the art can understand that Figure 8 the structure of the server shown in

[0124] does not constitute a limitation thereto, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 8 As

[0125] shown in Figure 8In the server shown, the processor is used to execute the computer-executable instructions for personnel management stored in the memory, and implement the following steps: obtain the data to be sent, and split the data to be sent into X data shards; determine the digital equivalent, which is determined by the TCP / IP connection establishment process between the sending end and the receiving end; obtain the first data shard among the X data shards, and determine the first functional relationship satisfied by the value of the first data shard and the data equivalent; obtain the first coding information of the first functional relationship in the data dictionary, where the data dictionary includes coding information corresponding to multiple functional relationships; send the first coding information.

[0126] For the specific implementation of the server involved in this application, reference can be made to the various embodiments of the above-mentioned function-based data sending method, which will not be elaborated here.

[0127] An embodiment of this application provides a computer-readable storage medium. Computer instructions are stored in the computer-readable storage medium. When the computer instructions run on a communication device, the communication device is caused to execute the following steps: obtain the data to be sent, and split the data to be sent into X data shards; determine the digital equivalent, which is determined by the TCP / IP connection establishment process between the sending end and the receiving end; obtain the first data shard among the X data shards, and determine the first functional relationship satisfied by the value of the first data shard and the data equivalent; obtain the first coding information of the first functional relationship in the data dictionary, where the data dictionary includes coding information corresponding to multiple functional relationships; send the first coding information. The above computer includes an electronic device.

[0128] Among them, the electronic terminal device includes a mobile phone, a tablet computer, a personal digital assistant, a wearable device, etc.

[0129] Among them, the computer-readable storage medium may be an internal storage unit of the electronic device described in the above embodiment, such as the hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the above electronic device, such as a plug-in hard disk equipped on the electronic device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the computer-readable storage medium may also include both the internal storage unit and the external storage device of the electronic device. The computer-readable storage medium is used to store computer-executable instructions and other computer-executable instructions and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or will be output.

[0130] For the specific implementation of the computer-readable storage medium involved in this application, reference can be made to the various embodiments of the above-mentioned function-based data sending method, which will not be elaborated here.

[0131] An embodiment of the present application provides a computer program product. The computer program product includes a computer program, and the computer program is operable to cause a computer to perform some or all of the steps of any one of the function-based data sending methods described in the foregoing method embodiments. The computer program product may be a software installation package.

[0132] It should be noted that for any of the foregoing embodiments of the function-based data sending methods, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to the present application.

[0133] The foregoing Figure 2 The embodiments shown are applied to the sending end. For the corresponding receiving end, an embodiment of the present application provides a function-based data receiving method, which is applied to the receiving end. Please refer to Figure 9 , Figure 9 which is a schematic flowchart of a function-based data receiving method provided by an embodiment of the present application. As Figure 9 shown, the method includes the following steps:

[0134] 301: Receive X encoded messages.

[0135] 302: Determine the digital equivalent, which is determined by the TCP / IP connection establishment process between the sending end and the receiving end.

[0136] 303: Determine the target function relationship in the data dictionary according to each of the X encoded messages.

[0137] Among them, the target function relationship may include the function relationships of each of the X encoded messages in the data dictionary.

[0138] 304: Restore the X encoded messages according to the target function relationship and the digital equivalent to obtain X data fragments.

[0139] 305: Concatenate the X data fragments to obtain the original data.

[0140] It can be seen that in the embodiments of the present application, the digital equivalent is determined by the TCP / IP connection establishment process between the sending end and the receiving end. The target function relationship is determined in the data dictionary according to each of the X coding information, and then X data shards are obtained according to the target function relationship and the digital equivalent. Finally, the original data can be obtained by splicing the multiple data shards. By using the data receiving method of the embodiments of the present application, in the TCP / IP transmission process, since only the received coding information and the data dictionary are required to obtain the original data through data restoration, it is no longer necessary to receive large data blocks that occupy a large space, reducing a large amount of data transmission volume, thereby improving the data transmission efficiency.

[0141] In a possible example, before determining the target function relationship in the data dictionary according to each of the X coding information, the above method further includes:

[0142] Receiving the data dictionary;

[0143] Or receiving the identification information of the data dictionary;

[0144] The above determining the target function relationship in the data dictionary according to each of the X coding information includes:

[0145] Determining the data dictionary according to the identification information of the data dictionary, and determining the target function relationship in the data dictionary according to each of the X coding information.

[0146] It can be seen that in the embodiments of the present application, when receiving X data codings, the data dictionary can also be received, or the identification information of the data dictionary can be received to obtain the data dictionary stored locally, which is convenient for the receiving end to restore the X data codings according to the data dictionary as the data restoration basis to obtain the original data.

[0147] The above embodiments of the present application have been introduced in detail. In this article, specific examples are used to elaborate on the principles and implementation manners of a data sending method, device, equipment, and data receiving method based on functions of the present application. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of a data sending method, device, equipment, and data receiving method based on functions of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation on the present application.

[0148] This application is described with reference to the flowcharts and / or block diagrams of methods, hardware products, and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one or more of the processes and / or blocks Figure 1 one process or multiple processes and / or blocks Figure 1 means for implementing the functions specified in one or more of the blocks or multiple blocks

[0149] Although this application is described in conjunction with various embodiments herein, however, in the process of implementing the claimed application, those skilled in the art can understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude a plurality. Certain measures are recited in mutually different dependent claims, but this does not mean that these measures cannot be combined to produce good results

[0150] Obviously, those skilled in the art can make various changes and modifications to a data sending method, device, equipment, and data receiving method based on functions provided by this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these changes and modifications

Claims

1. A function-based data sending method, characterized in that Applied to the sending end, the method includes: Obtain the data to be sent, and split the data to be sent into X data shards according to the sequence bits; Determine digital equivalents, which are respectively determined according to the first digits of the synchronization sequence number SynNumber, the first acknowledgment number ACKnumber1, and the second acknowledgment number ACKnumber2 generated during the TCP / IP connection establishment process; Obtain the first data shard among the X data shards, and determine the first functional relationship satisfied by the value of the first data shard and the digital equivalent, where the value of the data shard refers to the decimal value of the data shard; Obtain the first coding information of the first functional relationship in the data dictionary, where the data dictionary includes coding information corresponding to multiple functional relationships; Send the first coding information, and the number of bits occupied by the first coding information is less than the number of bits occupied by the first data shard.

2. The method according to claim 1, wherein The method further includes: Obtain the first possible value of the digital equivalent; Obtain the second possible value of the first data shard; Determine at least one functional relationship satisfied by the first possible value and the second possible value; Encode the at least one functional relationship to obtain coding information, and obtain the data dictionary according to the coding information.

3. The method according to claim 2, wherein The encoding the at least one functional relationship to obtain coding information includes: Obtain the first identifier of each functional relationship in the at least one functional relationship; Obtain the coding information of each functional relationship in the at least one functional relationship, where the coding information includes the binary value corresponding to the first identifier.

4. The method according to claim 3, characterized in that, The method further includes: Obtain a second identifier, which is used to characterize the difference between the value of each functional relationship in at least one functional relationship and the second possible value of the first data shard when the first possible value of the digital equivalent and the second possible value of the first data shard satisfy at least one functional relationship; Obtain the second identifier corresponding to the difference; The encoding the at least one functional relationship to obtain coding information includes: Obtain the coding information of each functional relationship in the at least one functional relationship, where the coding information includes the binary values corresponding to the first identifier and the second identifier.

5. The method according to claim 1, characterized in that, If the first functional relationship satisfied by the value of the first data shard and the digital equivalent is a combination of multiple functional relationships, the obtaining the first coding information of the first functional relationship in the data dictionary includes: Obtain the combination method of the multiple functional relationships, and the coding information of each functional relationship in the multiple functional relationships; Obtain the first coding information, where the first coding information includes the coding information of each functional relationship in the multiple functional relationships and the coding information of the combination method of the multiple functional relationships.

6. A data sending device based on a function, characterized in that, Applied to the sending end, the device includes: An obtaining unit, configured to obtain the data to be sent, and split the data to be sent into X data shards according to the sequence bits; A digital unit for determining digital equivalents, which are determined respectively according to the first digits of the synchronization sequence number SynNumber, the first acknowledgment number ACKnumber1, and the second acknowledgment number ACKnumber2 generated during the TCP / IP connection establishment process; A function unit for obtaining the first data fragment among the X data fragments and determining the first functional relationship satisfied by the value of the first data fragment and the digital equivalent, where the value of the data fragment refers to the decimal value of the data fragment; An encoding unit for obtaining the first encoding information of the first functional relationship in a data dictionary, where the data dictionary includes encoding information corresponding to multiple functional relationships; A sending unit for sending the first encoding information, and the number of bits of the space occupied by the first encoding information is less than the number of bits of the space occupied by the first data fragment.

7. An electronic device, characterized in that, It includes a processor, a memory, and computer execution instructions stored on the memory and executable on the processor. When the computer execution instructions are run, the electronic device executes the method according to any one of claims 1-5.

8. A data receiving method based on a function, characterized in that, Applied to the receiving end, the method includes: Receiving X encoding information; Determining digital equivalents, which are determined respectively according to the first digits of the synchronization sequence number SynNumber, the first acknowledgment number ACKnumber1, and the second acknowledgment number ACKnumber2 generated during the TCP / IP connection establishment process; Obtaining the first functional relationship corresponding to the first encoding information in the data dictionary among the X encoding information, where the data dictionary includes encoding information corresponding to multiple functional relationships; Restoring the first encoding information according to the first functional relationship and the digital equivalent to obtain the value of the first data fragment, where the value of the first data fragment and the digital equivalent satisfy the first functional relationship; Concatenating the X data fragments including the first data fragment according to the sequence bits to obtain the original data.

9. The method according to claim 8, wherein Before determining the target functional relationship according to each encoding information in the X encoding information in the data dictionary, the method further includes: Receiving a data dictionary; Or receiving the identification information of the data dictionary; Determining the target functional relationship according to each encoding information in the X encoding information in the data dictionary includes: Determining the target data dictionary according to the identification information of the data dictionary and determining the target functional relationship according to each encoding information in the X encoding information in the data dictionary.

Citation Information

Patent Citations

  • Data transmission method and device based on joint coding

    CN116260891A