WO2023130801A1 - 基于函数的数据发送方法、装置、设备和数据接收方法 - Google Patents

基于函数的数据发送方法、装置、设备和数据接收方法 Download PDF

Info

Publication number
WO2023130801A1
WO2023130801A1 PCT/CN2022/126270 CN2022126270W WO2023130801A1 WO 2023130801 A1 WO2023130801 A1 WO 2023130801A1 CN 2022126270 W CN2022126270 W CN 2022126270W WO 2023130801 A1 WO2023130801 A1 WO 2023130801A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
functional relationship
information
relationship
value
Prior art date
Application number
PCT/CN2022/126270
Other languages
English (en)
French (fr)
Inventor
白智德
哈米德
白志得
丁晓端
黄坤
殷燕
Original Assignee
深圳智慧林网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳智慧林网络科技有限公司 filed Critical 深圳智慧林网络科技有限公司
Publication of WO2023130801A1 publication Critical patent/WO2023130801A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/166IP fragmentation; TCP segmentation
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M7/00Conversion of a code where information is represented by a given sequence or number of digits to a code where the same, similar or subset of information is represented by a different sequence or number of digits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data

Definitions

  • the present application relates to the technical field of data processing, in particular to a function-based data sending method, device, device and data receiving method.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • IP Transmission Control Protocol/Internet Protocol
  • the requirements for data transmission efficiency in the market are getting higher and higher. If the data transmission is still carried out according to the initial size of the data block during the TCP/IP transmission process, the data transmission efficiency will be seriously reduced.
  • Embodiments of the present application provide a function-based data sending method, device, device, and data receiving method, implementing the embodiments of the present application to improve data transmission efficiency during TCP/IP transmission.
  • the embodiment of the present application provides a function-based data sending method, which is applied to the sending end, and the above method includes:
  • the embodiment of the present application provides a function-based data sending device, which is applied to the sending end, and the above-mentioned device includes:
  • the obtaining unit is used to obtain the data to be sent, and split the data to be sent into X data fragments;
  • the digital unit is used to determine the digital equivalent, and the digital equivalent is determined by the TCP/IP connection establishment process between the sending end and the receiving end;
  • a function unit configured to acquire the first data slice among the X data slices, and determine the first functional relationship between the value of the first data slice and the data equivalent item;
  • the encoding unit is used to obtain the first encoding information of the first functional relationship in the data dictionary, and the data dictionary includes encoding information corresponding to a plurality of functional relationships;
  • a sending unit configured to send the first coded information.
  • the embodiment of the present application provides an electronic device, including a processor, a memory, and computer-executed instructions stored in the memory and operable on the processor.
  • the electronic device executes such as Part or all of the steps described in any method of the first aspect of the embodiment of the present application.
  • the embodiment of the present application provides a computer-readable storage medium, in which computer instructions are stored, and when the computer instructions are run on the communication device, the communication device executes the first method as in the first embodiment of the application. Part or all of the steps described in any method of the aspect.
  • the embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to cause the computer to execute the part or method described in any one of the methods in the first aspect of the embodiment of the present application. All steps.
  • the computer program product may be a software installation package.
  • the embodiment of the present application provides a function-based data receiving method, which is applied to the receiving end, and the above method includes:
  • 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 between the value of the first data fragment and the data equivalent is determined, so that Obtain the first coding information of the first functional relationship in the data dictionary and send the first coding information, and finally complete the sending of X data fragments by sending X pieces of coding information.
  • the coded information is determined in the data dictionary according to the functional relationship satisfied by the value of the data fragment and the data equivalent item and the coded information is sent, because only the coded information needs to be sent. It is no longer necessary to send data blocks that occupy a large space, reducing a large amount of data transmission, thereby improving data transmission efficiency.
  • FIG. 1 is a structural deployment diagram of a data transmission system
  • FIG. 2 is a schematic flowchart of a function-based data sending method provided by an embodiment of the present application
  • Fig. 3 is a schematic diagram of an example of a TCP/IP connection establishment process
  • FIG. 4 is a schematic diagram of an example of a function-based data sending method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another function-based data sending method provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of another function-based data sending method provided by the embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a function-based data sending device provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a server structure of a hardware operating environment of an electronic device provided by an embodiment of the present application.
  • FIG. 9 is a schematic flowchart of a function-based data receiving method provided by an embodiment of the present application.
  • Fig. 1 is a structural deployment diagram of a data transmission system. As shown in Figure 1, the first end of the system is connected to the sending end and the second end is connected to the receiving end.
  • the sending end refers to the role that wants to send the original data to the receiving end so as to send the original data to the data transmission system for compression;
  • 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;
  • the receiving end refers to the role of receiving the compressed original data from the data transmission system and restoring the compressed original data to obtain the original data;
  • FIG. 2 is a schematic flow chart of a function-based data sending method provided in the embodiment of the present application, as shown in As shown in Figure 2, the method includes the following steps:
  • the data to be sent may be decimal data, and in a specific implementation, the binary data corresponding to the original data may be converted into decimal data through base system, so as to obtain the data to be sent.
  • the data forms of raw data include numbers, text, symbols, images, voice, video and other forms.
  • each of the X data fragments obtained by corresponding splitting should also be decimal data.
  • splitting the data to be sent into X data fragments may be split into multiple data fragments of the same size, or may be split into multiple data fragments of different sizes.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • IP Transmission Control Protocol/Internet Protocol
  • Figure 3 is an example schematic diagram of the TCP/IP connection establishment process.
  • the sender and the receiver use a three-way handshake to confirm that the connection between the two parties is successfully established.
  • the digital equivalent item is determined by the TCP/IP connection establishment process between the sending end and the receiving end, and can refer to the digital equivalent item according to the synchronous serial number SynNumber, the first confirmation number ACKnumber1 and the second confirmation number generated during the TCP/IP connection establishment process respectively.
  • the first digit of the confirmation number ACKnumber2 is determined. Since the first digit of SynNumber, ACKnumber1 and ACKnumber2 may all be 0 to 9, the possible value of the digital equivalent is 000 to 999, that is to say, the possible value of the digital equivalent is 1000 indivual.
  • 103 Obtain a first data slice among the X data slices, and determine a first functional relationship that a value of the first data slice satisfies with a data equivalent item.
  • the first data fragment may be any one of the X data fragments.
  • determining the first functional relationship between the value of the first data slice and the data equivalent item satisfies may refer to using the data equivalent item as an independent variable, and simultaneously taking the value of the first data slice as a dependent variable
  • a functional relationship that can be established when an arithmetic formula can also refer to a functional relationship that can be established when an arithmetic formula can be established when the value of the first data slice is used as an independent variable and the data equivalent item is used as a dependent variable.
  • the first functional relationship refers to a functional relationship in which an arithmetic formula can be established when the data equivalent item is used as an independent variable and the value of the first data slice is used as a dependent variable
  • the value of the first data slice is 28657, and the data equivalent is 023, 023 is regarded as 23, because in the Fibonacci sequence when the independent variable is 23, the dependent variable is 28657
  • the first functional relationship is: the value of the data slice is the value of the Fibonacci sequence with data equivalent items as the number of items, and the first functional relationship can be obtained as:
  • the first coding information of the first functional relationship in the data dictionary may have a size of 4 bits, that is to say, the number of bits of space occupied by the first coding information may be 4 bits.
  • the number of bits of space occupied by the first coding information can be specifically determined according to the number of the first functional relationships. The smaller the number of first functional relationships, the smaller the number of bits of space occupied by the first coding information can be. .
  • the data dictionary includes encoding information corresponding to multiple functional relationships.
  • the corresponding first encoding information is 0001; when the first functional relationship is, the value of the data slice is based on the data, etc.
  • the effective item is the value of the Fibonacci sequence of the number of items, the corresponding coding information is 0101.
  • the coding information corresponding to the functional relationship described in this exemplary embodiment in the data dictionary is only used as an example. In a specific application, the coding information corresponding to the functional relationship in the data dictionary can also be in other Encoded form exists.
  • the first data fragment is one of the X data fragments
  • there is a one-to-one correspondence between the first coded information and the first data fragment and when sending the first coded information for X times is completed, send The terminal successfully sends the data to be sent to the receiving terminal.
  • the receiving end only needs to restore the X pieces of first encoded information one by one to obtain X data fragments, and then splicing the X data fragments to restore the data to be sent.
  • FIG. 4 is a schematic diagram of an example of a function-based data transmission method provided by the embodiment of the present application.
  • the original data is 00100110100001010111...
  • the original data is converted to decimal, and the decimal data is obtained, that is, the data to be sent is 28657...
  • the server obtains the data to be sent from the sender, and splits the data to be sent into X data fragments , if the first digits of SynNumber, ACKnumber1, and ACKnumber2 generated during the establishment of the TCP/IP connection between the sender and the receiver are 0, 2, and 3 respectively, then the server determines that the number equivalent is 023, and in X data fragments
  • the first data fragment is 26857 obtained in , since the corresponding sequence value is 26857 when 23 is the number of items in the Fibonacci sequence, the server determines that the value of the first data fragment and the data equivalent item satisfy
  • the first functional relationship is: the value of the data slice is the
  • the sent data corresponding to the data fragment 28657 should be 00100110100001010111, occupying a total of 20 digits of space, but after adopting the method of the embodiment of the present application, only the space occupied by the send The number of digits is only 4 digits or other first encoding information with fewer digits, and even for data fragments that occupy more digits and occupy a larger space, only 4 digits or other fewer digits need to be sent.
  • the method of the embodiment of the present application significantly reduces the amount of data to be sent for data fragments that occupy a large space, and greatly improves the efficiency of data transmission.
  • 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 between the value of the first data fragment and the data equivalent is determined, so that Obtain the first coding information of the first functional relationship in the data dictionary and send the first coding information, and finally complete the sending of X data fragments by sending X pieces of coding information.
  • the coded information is determined in the data dictionary according to the functional relationship satisfied by the value of the data fragment and the data equivalent item and the coded information is sent, because only the coded information needs to be sent. It is no longer necessary to send data blocks that occupy a large space, reducing a large amount of data transmission, thereby improving data transmission efficiency.
  • the above method also includes:
  • the identification information of the data dictionary represents the data dictionary corresponding to the X first coded information.
  • the space occupied by the data dictionary is the coding space
  • the space occupied by the coding space and the X pieces of first coded information is smaller than the space occupied by sending X data fragments.
  • 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 data dictionary is stored locally at the receiving end, the data transmission efficiency can be further improved by sending the identification information of the data dictionary.
  • the receiving end by sending the data dictionary or the identification information of the data dictionary, the receiving end is notified of the data conversion basis between the X first encoded information and the X data fragments sent by it, so that At the receiving end, restore the X first codes according to the data dictionary to obtain the original data corresponding to the data to be sent.
  • the above method also includes:
  • Coding at least one functional relationship to obtain coding information, and obtaining a data dictionary according to the coding information.
  • the first possible value of the digital equivalent item is determined by the first digit of the synchronous serial number SynNumber, ACKnumber1 and ACKnumber2 generated in the digital equivalent item respectively according to the TCP/IP connection establishment process, then it can be seen from the above that the number The first possible value of the equivalent item is 000 to 999, a total of 1000 possible values.
  • the second possible value of the first data fragment is determined by the number of occupied spaces of the first data fragment.
  • the first data slice is decimal data, and if the number of digits occupied by the first data slice is 3 bits, the second possible value of the first data slice is 0 to 999, a total of 1000 possible values; If the number of occupied spaces of the first data segment is 5 bits, the second possible value of the first data segment is 100,000 possible values ranging from 0 to 99999.
  • determining at least one functional relationship that can be satisfied by the first possible value and the second possible value may be determining at least one functional relationship that can be satisfied when the first possible value is an independent variable and the second possible value is a dependent variable, or is to determine 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.
  • FIG. 5 is a schematic diagram of another function-based data sending method provided by the embodiment of the present application. As shown in FIG. 5, it is determined that the first possible value and the second possible value can satisfy The functional relationship of the function relationship is function relationship 1, function relationship 2, ..., function relationship N, then the function relationship 1 is coded as code information 1, the function relationship 2 is coded as code information 2, ..., and the function relationship N is coded as code Information N, so as to obtain a data dictionary including N coded information corresponding to the above N functional relationships.
  • At least one functional relationship is encoded to obtain encoding information, including:
  • Acquire coding information of each functional relationship in at least one functional relationship where the coding information includes a binary value corresponding to the first identifier.
  • the first identifier with a functional relationship is decimal data 5, and the binary data 0101 is obtained from the decimal data 5 through binary conversion, so the coding information of the functional relationship is 0101.
  • the coding 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 coding information is expressed in the form of binary data to facilitate coding information sent directly.
  • the above method also includes:
  • the second identification is used to characterize the first possible value of the digital equivalent and the second possible value of the first data slice satisfying at least one functional relationship, each functional relationship in the at least one functional relationship The difference between the value of and the second possible value of the first data slice;
  • Encoding at least one functional relationship above to obtain encoding information includes:
  • the encoding information of each functional relationship in the at least one functional relationship is acquired, and the encoding information includes binary values corresponding to the first identifier and the second identifier.
  • the difference value may be the value of the functional relationship minus the value of the second possible value of the first data slice, or the value of the second possible value of the first data slice minus the value of the functional relationship.
  • the number of digits occupied by the second identifier corresponding to the remainder may be 2 digits, 4 digits, or other digits.
  • the existing difference is only a positive number
  • 01 can represent the difference 1
  • 10 can represent the difference 2
  • 11 can represent The difference 3, that is to say, can represent a total of 4 difference values from 0 to 3; and when the number of digits occupied by the second mark is 4 digits, similarly, it can represent a total of 16 difference values from 0 to 15.
  • the occupied space of the second identifier corresponding to the remainder may be 3 digits, 5 digits, or other digits.
  • the first bit of the second identifier is used to indicate the positive or negative of the difference, for example, 0 is used to indicate that the difference is a positive number, and 1 is used to indicate that the difference is
  • 0 is used to indicate that the difference is a positive number
  • 1 is used to indicate that the difference is
  • 000 ⁇ 011 can be used to represent the difference 0 ⁇ 3, and 101 ⁇ 111 can be used to represent (-1) ⁇ (-3), a total of 8 difference values ; and when the number of digits occupied by the second mark is 5, similarly, 00000 ⁇ 01111 can be used to represent 0 ⁇ 15, and 10001 ⁇ 11111 can be used to represent (-1) ⁇ (-15), a total of 32 differences value.
  • the encoded information is formed by adjacently connecting the binary data corresponding to the first mark and the second mark, that is to say, the binary data corresponding to the second mark can be located in front or behind the first mark.
  • the encoded information can accurately represent the value of the first data fragment so that there is a data conversion basis for one-to-one correspondence between each of the X data fragments and the encoded information.
  • the number of bits of space occupied by each coded information is less than the number of bits of space occupied by each of the X data slices.
  • the number of space digits occupied by each data fragment in the X data fragments can refer to the number of space digits occupied by each data fragment when it is decimal data, or it can refer to the conversion of each data fragment from decimal data to binary The number of bits of space occupied after the data. Obviously, the number of bits of space occupied by binary data is greater than that of decimal data.
  • the acquisition of the first encoding information of the first functional relationship in the data dictionary include:
  • the first coding information includes coding information of each functional relationship in the multiple functional relationships, and coding information of a combination of the multiple functional relationships.
  • the combination method of functional relations refers to the operation rules between the function relations, and the operation rules include addition, subtraction, multiplication, division or other rules. If there are only four algorithms of addition, subtraction, multiplication, and division, then the coding information of the combination of functional relationships can be represented by 2-bit binary data.
  • the encoding information of each functional relationship included in the first encoding information and the arrangement of the encoding information of the combination of multiple functional relationships may be based on the combination of multiple functional relationships and the algorithm between them in a specific implementation. methods are arranged in order.
  • FIG. 6 is a schematic diagram of another function-based data sending method provided by the embodiment of the present application. As shown in FIG. 6, if the value of the first data fragment is equivalent to the data The first functional relationship satisfied is: functional relationship 1 ⁇ functional relationship 2, wherein, the coding information of functional relationship 1 is 0001, the coding information of functional relationship 2 is 0101, and the algorithm of division is represented by binary data 11, then the first A coded information may be 0001110101.
  • the first functional relationship satisfied by the value of the first data slice and the data equivalent item is a combination of multiple functional relationships, by obtaining the combination of multiple functional relationships, and multiple The coding information of each functional relationship among the functional relationships, so that the first coding information includes the coding information of each functional relationship among the multiple functional relationships, and the coding information of the combination of multiple functional relationships. Therefore, the first functional relationship can represent more corresponding functional relationships between the values of the first data slice and data equivalent items, and the coverage of the first functional relationship to the value of the numerical slice is improved, thereby reducing the functional relationship.
  • the number of coded information included in the data dictionary is correspondingly reduced, which can play a role in reducing the space occupied by the first coded information and further improving data transmission efficiency in some possible cases.
  • FIG. 7 is a schematic structural diagram of a function-based data sending device provided in the embodiment of the present application, as shown in FIG. 7:
  • a function-based data sending device applied to the sending end, the above-mentioned device includes:
  • An acquisition unit configured to acquire data to be sent, and split the data to be sent into X data fragments.
  • 202 a digital unit, used to determine the digital equivalent, and the digital equivalent is determined by the TCP/IP connection establishment process between the sending end and the receiving end.
  • a function unit configured to acquire a first data slice among the X data slices, and determine a first functional relationship that a value of the first data slice satisfies with a data equivalent item.
  • An encoding unit configured to acquire first encoding information of the first functional relationship in the data dictionary, where the data dictionary includes encoding information corresponding to multiple functional relationships.
  • a sending unit configured to send the first coded information.
  • the digital equivalent is determined by the TCP/IP connection establishment process between the sending end and the receiving end, and then the value of the first data fragment and the first function satisfied by the data equivalent are determined. relationship, so as to obtain the first coded information of the first functional relationship in the data dictionary and send the first coded information, and finally complete the sending of X data fragments by sending X coded information.
  • the coded information is determined in the data dictionary according to the functional relationship satisfied by the value of the data fragment and the data equivalent item, and the coded information is sent, because only the coded information needs to be sent. It is no longer necessary to send data blocks that occupy a large space, reducing a large amount of data transmission, thereby improving data transmission efficiency.
  • the embodiment of the present application can divide the functional unit of the function-based data sending device according to the above method example, for example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
  • FIG. 8 is a schematic diagram of the server structure of the hardware operating environment of the electronic device provided by the embodiment of the present application , as shown in FIG. 8 , the electronic device includes a processor, a memory, and computer-executable instructions stored in the memory and operable on the processor. When the computer-executable instructions are executed, the electronic device executes any function-based Instructions for the steps of the data transmission method.
  • the processor is a CPU.
  • the memory optionally, the memory may be a high-speed RAM memory, or a stable memory, such as a disk memory.
  • FIG. 8 the structure of the server shown in FIG. 8 is not limited thereto, and may include more or less components than shown in the illustration, or combine some components, or arrange different components.
  • the memory may include an operating system, a network communication module, and computer-executed instructions of a function-based data sending method.
  • the operating system is used to manage and control server hardware and software resources, and supports the operation of computer-executed instructions.
  • the network communication module is used to realize the communication between the various components inside the memory, as well as the communication with other hardware and software inside the server.
  • the communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global Mobile Communication System), GPRS (General Packet Radio Service, General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000, Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access), TD-SCDMA ( Time Division-Synchronous CodeDivision Multiple Access, Time Division Synchronous Code Division Multiple Access), etc.
  • GSM Global System of Mobile communication, global Mobile Communication System
  • GPRS General Packet Radio Service, General Packet Radio Service
  • CDMA2000 Code Division Multiple Access 2000, Code Division Multiple Access 2000
  • WCDMA Wideband Code Division Multiple Access
  • TD-SCDMA Time Division-Synchronous CodeDivision Multiple Access, Time Division Synchronous Code Division Multiple Access
  • the processor is used to execute the computer-executed instructions stored in the memory for personnel management, and realize the following steps: obtain the data to be sent, and split the data to be sent into X data fragments; determine the number, etc.
  • the digital equivalent is determined by the TCP/IP connection establishment process between the sending end and the receiving end; obtain the first data fragment among the X data fragments, and determine that the value of the first data fragment and the data equivalent satisfy the first functional relationship; acquiring first encoding information of the first functional relationship in the data dictionary, where the data dictionary includes encoding information corresponding to a plurality of functional relationships; and sending the first encoding information.
  • An embodiment of the present application provides a computer-readable storage medium.
  • Computer instructions are stored in the computer-readable storage medium.
  • the communication device is made to perform the following steps: acquire data to be sent, and The sending data is divided into X data fragments; the digital equivalent is determined, and the digital equivalent is determined by the TCP/IP connection establishment process between the sending end and the receiving end; the first data fragment among the X data fragments is acquired, and Determine the first functional relationship satisfied by the value of the first data slice and the data equivalent item; obtain the first encoding information of the first functional relationship in the data dictionary, and the data dictionary includes encoding information corresponding to multiple functional relationships; send the first - coded information.
  • the computer described above includes electronic equipment.
  • electronic terminal equipment includes mobile phones, tablet computers, personal digital assistants, wearable devices, etc.
  • the computer-readable storage medium may be an internal storage unit of the electronic device described in the above embodiments, such as a hard disk or a memory of the electronic device.
  • the computer-readable storage medium can also be an external storage device of the above-mentioned electronic equipment, such as a plug-in hard disk equipped on the electronic equipment, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash memory card (Flash Card) etc.
  • the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device.
  • Computer-readable storage media are used to store computer-executable instructions and other computer-executable instructions and data required by the electronic device.
  • the computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
  • An embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to make the computer perform some or all steps of any function-based data sending method described in the above method embodiments , the computer program product may be a software installation package.
  • FIG. 9 is an embodiment of the present application.
  • a schematic flowchart of a function-based data receiving method is provided, as shown in FIG. 9 , the method includes the following steps:
  • the objective functional relationship may include the functional relationship of each encoded information in the X pieces of encoded information in the data dictionary.
  • the digital equivalent is determined by the TCP/IP connection establishment process between the sending end and the receiving end, and the objective function relationship is determined in the data dictionary according to each encoding information in the X encoding information, and then according to the objective Functional relationships and digital equivalents are used to obtain X data fragments, and finally the original data can be obtained by splicing multiple data fragments.
  • the original data can be obtained through data restoration only according to the received encoding information and the data dictionary, so that it is no longer necessary to receive the data that occupies a large space. Data blocks reduce a large amount of data transmission, thereby improving data transmission efficiency.
  • the above method before determining the objective function relationship in the data dictionary according to each of the X coded information, the above method further includes:
  • the above-mentioned determination of the objective function relationship in the data dictionary according to each of the X coded information includes:
  • the data dictionary is determined according to the identification information of the data dictionary, and the objective function relationship is determined in the data dictionary according to each coded information in the X pieces of coded information.
  • the data dictionary when receiving X data codes, can also be received, or the identification information of the data dictionary can be received to obtain the locally stored data dictionary, so that the receiving end can Restoration is based on restoring X data codes to obtain original data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

本申请提供一种基于函数的数据发送方法、装置、设备和数据接收方法,其中数据发送方法的实现包括:获取待发送数据,并将待发送数据拆分为X个数据分片;确定数字等效项,数字等效项由发送端与接收端的TCP/IP连接建立过程确定;获取X个数据分片中的第一数据分片,并确定第一数据分片的值与数据等效项满足的第一函数关系;获取第一函数关系在数据字典中的第一编码信息,数据字典中包括多个函数关系对应的编码信息;发送第一编码信息。采用本申请实施例的数据发送方法,在TCP/IP传输过程中,根据数据分片的值与数据等效项满足的函数关系在数据字典中确定编码信息并发送编码信息,减少了大量的数据传输量从而提高数据传输效率。

Description

基于函数的数据发送方法、装置、设备和数据接收方法
本申请要求于2022年01月10日提交中国专利局、申请号为202210023690.7、申请名称为“基于函数的数据发送方法、装置、设备和数据接收方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,特别是涉及一种基于函数的数据发送方法、装置、设备和数据接收方法。
背景技术
随着社会经济的快速发展和人民生活水平的不断提高,数据通信技术在各行各业都得到了大范围的普及应用,数据传输量进入了空前增长时代,并且,人们能接触到的信息内容类型日益丰富多彩,数据传输过程中的数据块大小相应地也越来越大。
数据,即具有数据存储容量的设备中的文件,通常使用某种已建立的数据传输协议通过网络进行传输,其中,TCP/IP(Transmission Control Protocol/Internet Protocol)协议是最常用的数据传输协议之一。目前,市面上对于数据传输效率的要求越来越高,若在TCP/IP传输过程中仍然按照数据块初始大小去进行数据传输,将会严重降低数据传输效率。
发明内容
本申请实施例提供了一种基于函数的数据发送方法、装置、设备和数据接收方法,实施本申请实施例,在TCP/IP传输过程中提高数据传输效率。
第一方面,本申请实施例提供了一种基于函数的数据发送方法,应用于发送端,上述方法包括:
获取待发送数据,并将待发送数据拆分为X个数据分片;
确定数字等效项,数字等效项由发送端与接收端的TCP/IP连接建立过程确定;
获取X个数据分片中的第一数据分片,并确定第一数据分片的值与数据等效项满足的第一函数关系;
获取第一函数关系在数据字典中的第一编码信息,数据字典中包括多个函数关系对应的编码信息;
发送第一编码信息。
第二方面,本申请实施例提供了一种基于函数的数据发送装置,应用于发送端,上述装置包括:
获取单元,用于获取待发送数据,并将待发送数据拆分为X个数据分片;
数字单元,用于确定数字等效项,数字等效项由发送端与接收端的TCP/IP连接建立过程确定;
函数单元,用于获取X个数据分片中的第一数据分片,并确定第一数据分片的值与数据等效项满足的第一函数关系;
编码单元,用于获取第一函数关系在数据字典中的第一编码信息,数据字典中包括多个 函数关系对应的编码信息;
发送单元,用于发送第一编码信息。
第三方面,本申请实施例提供了一种电子设备,包括处理器、存储器以及存储在存储器上并可在处理器上运行的计算机执行指令,当计算机执行指令被运行时,使得电子设备执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。
第四方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机指令,当计算机指令在通信装置上运行时,使得通信装置执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。
第五方面,本申请实施例提供了一种计算机程序产品,其中,计算机程序产品包括计算机程序,计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。
第六方面,本申请实施例提供了一种基于函数的数据接收方法,应用于接收端,上述方法包括:
接收X个编码信息;
确定数字等效项,数字等效项由发送端与接收端的TCP/IP连接建立过程确定;
根据X个编码信息中每个编码信息在数据字典中确定目标函数关系;
根据目标函数关系和数字等效项对X个编码信息进行还原,得到X个数据分片;
将X个数据分片进行拼接,得到原始数据。
可以看出,本申请实施例中,由发送端与接收端的TCP/IP连接建立过程确定数字等效项,再确定第一数据分片的值与数据等效项满足的第一函数关系,从而获取第一函数关系在数据字典中的第一编码信息并发送第一编码信息,通过发送X个编码信息最终完成X个数据分片的发送。采用本申请实施例的方法,在TCP/IP传输过程中,根据数据分片的值与数据等效项满足的函数关系在数据字典中确定编码信息并发送编码信息,由于只需要发送编码信息而不再需要发送占用空间较大的数据块,减少了大量的数据传输量,从而提高数据传输效率。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是一种数据传输系统的结构部署图;
图2是本申请实施例提供的一种基于函数的数据发送方法的流程示意图;
图3是TCP/IP连接建立过程的举例示意图;
图4是本申请实施例提供的一种基于函数的数据发送方法的举例示意图;
图5是本申请实施例提供的另一种基于函数的数据发送方法的举例示意图;
图6是本申请实施例提供的另一种基于函数的数据发送方法的举例示意图;
图7是本申请实施例提供的一种基于函数的数据发送装置的结构示意图;
图8是本申请的实施例提供的一种电子设备的硬件运行环境的服务器结构示意图;
图9是本申请实施例提供的一种基于函数的数据接收方法的流程示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤的过程、方法、系统、产品或设备没有限定于已列出的步骤,而是可选地还包括没有列出的步骤,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
下面结合附图对本申请实施例涉及的应用场景进行介绍。
图1是一种数据传输系统的结构部署图。如图1所示,该系统的第一端与发送端连接且第二端与接收端连接。
其中,发送端,指欲将原始数据发送给接收端从而将原始数据发送给数据传输系统进行压缩的角色;
其中,数据传输系统,用于接收来自发送端的原始数据,通过传统压缩算法对原始数据进行压缩,并将压缩后的原始数据发送给接收端;
其中,接收端,指接收来自数据传输系统的压缩后的原始数据并对压缩后的原始数据进行还原,从而得到原始数据的角色;
在上述系统进行数据传输的过程中,由于原始数据只是通过传统压缩算法进行压缩,将会产生新的压缩冗余,并且,传统压缩算法对于占用空间较大的数据块所起到的压缩作用是有限的,可以看出,上述过程对于数据传输效率并没有足够的提高作用。
基于此,本申请实施例提供了一种基于函数的数据发送方法,应用于发送端,请参阅图2,图2是本申请实施例提供的一种基于函数的数据发送方法的流程示意图,如图2所示,该方法包括以下步骤:
101:获取待发送数据,并将待发送数据拆分为X个数据分片。
其中,待发送数据,可以是十进制数据,在具体实现中,可以是将原始数据对应的二进制数据通过进制转换成十进制数据,从而获得待发送数据。原始数据的数据形式包括数字、文字、符号、图像、语音、视频等形式。
其中,X个数据分片,若待发送数据是十进制数据,相应地拆分所得到的X个数据分片中每个数据分片也应为十进制数据。
其中,将待发送数据拆分为X个数据分片,可以是拆分为相同大小的多个数据分片,也可以是拆分为不同大小的多个数据分片。
102:确定数字等效项,数字等效项由发送端与接收端的TCP/IP连接建立过程确定。
其中,TCP/IP(Transmission Control Protocol/Internet Protocol)指计算机之间进行联网通信的通信协议,定义了计算机等电子设备如何联网以及数据如何在它们之间传输的标准。
请参阅图3,图3是TCP/IP连接建立过程的举例示意图,如图3所示,TCP/IP传输过程 中,发送方和接收方采用三次握手的方式确认双方连接建立成功,在第一次握手中,发送方生成同步序列编号,同步序列编号包括同步标志位SYN(synchronous)=1和同步序列号SynNumber,发送方发送同步序列编号和第一随机序列号SEQ1(Sequence number)=x给接收方;在第二次握手中,接收方接收到同步序列编号并根据同步序列编号中的SYN=1得知发送方请求建立连接,因此,接收方向发送方发送确认标志ACK(acknowledgement)=1和SYN=1,并根据SEQ1向发送方发送第一确认号码ACKnumber1(Acknowledge number)=x+1,再随机生成第二随机序列号SEQ2=y发送给发送方;在第三次握手中,发送方检查接收到的ACKnumber1是否正确,即检查ACKnumber1是否等于SEQ1+1即x+1、以及ACK是否为1,若是,则发送方再发送ACK=1和第二确认号码ACKnumber2=y+1给接收方,接收方确认ACKnumber2是否等于SEQ2+1即y+1、且ACK是否为1,若是,则发送方和接收方成功建立数据传输连接。
其中,数字等效项由发送端与接收端的TCP/IP连接建立过程确定,可以指数字等效项分别根据TCP/IP连接建立过程中生成的同步序列号SynNumber、第一确认号码ACKnumber1和第二确认号码ACKnumber2的首位数字确定,由于SynNumber、ACKnumber1和ACKnumber2的首位数字都可能是0~9,从而数字等效项的可能值为000~999,即是说,数字等效项的可能值有1000个。由于发送端与接收端连接建立成功后,直到连接断开之前以上连接建立过程中生成的数字不会改变,从而单次连接建立的过程中数字等效项只有一个,因此,发送端与接收端共同对应有同样的数字等效项。
103:获取X个数据分片中的第一数据分片,并确定第一数据分片的值与数据等效项满足的第一函数关系。
其中,第一数据分片,可以是X个数据分片中的任一个数据分片。
其中,确定第一数据分片的值与数据等效项满足的第一函数关系,在具体实现中,可以指将数据等效项作为自变量、同时将第一数据分片的值作为因变量时算术式能够成立的函数关系,也可以指第一数据分片的值作为自变量、同时将数据等效项作为因变量时算术式能够成立的函数关系。
示例性地,第一函数关系指将数据等效项作为自变量、同时将第一数据分片的值作为因变量时算术式能够成立的函数关系,若第一数据分片的值为256,且数据等效项为004,将004视为4,由于44=256,则在这种情况下,第一函数关系为:数据分片的值为以数据等效项为底数、且以4为幂的幂函数的值,可以得到第一函数关系为:数据分片的值=(数据等效项)4。
又一示例性地,同样地,第一函数关系指将数据等效项作为自变量、同时将第一数据分片的值作为因变量时算术式能够成立的函数关系,
Figure PCTCN2022126270-appb-000001
Figure PCTCN2022126270-appb-000002
若第一数据分片的值为28657,且数据等效项为023,将023视为23,由于在斐波那契数列中当自变量为23时因变量为28657,则在这种情况下,第一函数关系为:数据分片的值为以数据等效项为项数的斐波那契数列的值,可以得到第一函数关系为:
Figure PCTCN2022126270-appb-000003
Figure PCTCN2022126270-appb-000004
104:获取第一函数关系在数据字典中的第一编码信息,数据字典中包括多个函数关系对应的编码信息。
其中,第一函数关系在数据字典中的第一编码信息,可以为4比特Bit的大小,即是说, 第一编码信息占用的空间位数可以为4位。在具体实现中,可以根据第一函数关系的个数多少来具体确定第一编码信息占用的空间位数,第一函数关系的个数越少则第一编码信息占用的空间位数可以越小。
示例性地,基于上述示例性实施例,若第一编码信息为4位,数据字典中包括多个函数关系对应的编码信息,在具体实现中,可以是,在第一函数关系为,数据分片的值为以数据等效项为底数、且以4为幂的幂函数的值时,所对应的第一编码信息为0001;在第一函数关系为,数据分片的值为以数据等效项为项数的斐波那契数列的值时,对应的编码信息为0101。需要说明的是,本示例性实施例所描述的函数关系在数据字典中对应的编码信息仅作为一种示例,在具体的应用中,函数关系在数据字典中对应的编码信息还可以以其他的编码形式存在。
105:发送第一编码信息。
其中,若第一数据分片为X个数据分片中的一个数据分片,则第一编码信息与第一数据分片之间一一对应,在完成X次发送第一编码信息时,发送端便成功地将待发送数据发送给了接收端。在这之后,接收端只需要对X个第一编码信息一一进行还原以得到X个数据分片,再对X个数据分片进行拼接,即可还原出待发送数据。
示例性地,请参阅图4,图4是本申请实施例提供的一种基于函数的数据发送方法的举例示意图,如图4所示,假设第一编码信息占用的空间位数为4位、有原始数据为00100110100001010111……,对原始数据进行十进制转换,得到十进制数据即待发送数据为28657……,服务器获取到来自发送端的待发送数据,并将待发送数据拆分为X个数据分片,若发送端与接收端的TCP/IP连接建立过程中生成的SynNumber、ACKnumber1和ACKnumber2的首位数字分别为0、2和3,则服务器确定到数字等效项为023、且在X个数据分片中获取到第一数据分片为26857,由于在斐波那契数列中以23为项数时对应的数列值为26857,因此,服务器确定到第一数据分片的值与数据等效项满足的第一函数关系为:数据分片的值为以数据等效项为项数的斐波那契数列的值,并且,第一函数关系在数据字典中的第一编码信息为0101,则服务器发送第一编码信息即发送0101给接收端;同理地,对于剩余数据,服务器数据按照同样方式发送剩余编码信息即可。可见,若不采用本申请实施例的方法,那么数据分片28657对应的发送数据原本应为00100110100001010111,共占用20位空间位数,而采用了本申请实施例的方法之后,只需要发送占用空间位数仅有4位或其他较少位数的第一编码信息即可,甚至对于占用空间位数更多且占用空间更大的数据分片也都同样地仅需发送4位或其他较少位数的第一编码信息即可,显然,本申请实施例的方法对于占用空间较大的数据分片而言极为显著地减少了需要发送的数据量,极大程度地提高了数据传输效率。
可以看出,本申请实施例中,由发送端与接收端的TCP/IP连接建立过程确定数字等效项,再确定第一数据分片的值与数据等效项满足的第一函数关系,从而获取第一函数关系在数据字典中的第一编码信息并发送第一编码信息,通过发送X个编码信息最终完成X个数据分片的发送。采用本申请实施例的方法,在TCP/IP传输过程中,根据数据分片的值与数据等效项满足的函数关系在数据字典中确定编码信息并发送编码信息,由于只需要发送编码信息而不再需要发送占用空间较大的数据块,减少了大量的数据传输量,从而提高数据传输效率。
在一个可能的示例中,上述方法还包括:
发送数据字典;
或发送数据字典的标识信息,数据字典的标识信息表征X个第一编码信息对应的数据字 典。
其中,数据字典占用空间为编码空间,编码空间和X个第一编码信息的占用空间小于发送X个数据分片的占用空间。
在具体实现中,发送数据字典的标识信息的数据传输量小于直接发送数据字典的数据传输量,若接收端本地存储有数据字典,可以采用发送数据字典的标识信息的方式进一步提高数据传输效率。
可以看出,本申请实施例中,通过发送数据字典或发送数据字典的标识信息,从而告知接收端其所发送的X个第一编码信息与X个数据分片之间的数据转换依据,以便于接收端根据数据字典对X个第一编码进行还原得到待发送数据对应的原始数据。
在一个可能的示例中,上述方法还包括:
获取数字等效项的第一可能值;
获取第一数据分片的第二可能值;
确定第一可能值和第二可能值可以满足的至少一个函数关系;
将至少一个函数关系进行编码获得编码信息,根据编码信息获得数据字典。
其中,数字等效项的第一可能值,若由在数字等效项分别根据TCP/IP连接建立过程中生成的同步序列号SynNumber、ACKnumber1和ACKnumber2的首位数字确定时,则由上述可知,数字等效项的第一可能值为000~999共1000个可能值。
其中,第一数据分片的第二可能值,由第一数据分片的占用空间位数确定。
示例性地,第一数据分片为十进制数据,若第一数据分片的占用空间位数为3位时,则第一数据分片的第二可能值为0~999共1000个可能值;若第一数据分片的占用空间位数为5位,则第一数据分片的第二可能值为0~99999共100000个可能值。
其中,确定第一可能值和第二可能值可以满足的至少一个函数关系,可以是确定在第一可能值为自变量且第二可能值为因变量时可以满足的至少一个函数关系,也可以是确定在第一可能值为因变量且第二可能值为自变量时可以满足的至少一个函数关系。
示例性第,请参阅图5,图5是本申请实施例提供的另一种基于函数的数据发送方法的举例示意图,如图5所示,确定到第一可能值和第二可能值可以满足的函数关系为函数关系1、函数关系2、……、函数关系N,则对函数关系1编码为编码信息1、对函数关系2编码为编码信息2、……、对函数关系N编码为编码信息N,从而获得包括上述N个函数关系对应的N个编码信息的数据字典。
可以看出,本申请实施例中,通过获取数字等效项的第一可能值和第一数据分片的第二可能值,确定第一可能值和第二可能值可以满足的至少一个函数关系,并将至少一个函数关系进行编码获得编码信息,再根据编码信息获得数据字典。从而在TCP/IP传输过程中已具有既定的数字等效项时,通过函数关系使得X个数据分片中每个数据分片与编码信息之间一一对应有数据转换依据。
在一个可能的示例中,上述将至少一个函数关系进行编码获得编码信息,包括:
获取至少一个函数关系中每个函数关系的第一标识;
获取至少一个函数关系中每个函数关系的编码信息,编码信息包括第一标识对应的二进制数值。
示例性地,有函数关系的第一标识为十进制数据5,十进制数据5通过二进制转换得到二进制数据0101,则该函数关系的编码信息为0101。
可以看出,本申请实施例中,至少一个函数关系中每个函数关系的编码信息为每个函数 关系的第一标识对应的二进制数据,将编码信息采用二进制数据的形式表示,以方便编码信息的直接发送。
在一个可能的示例中,上述方法还包括:
获取第二标识,第二标识用于表征数字等效项的第一可能值与第一数据分片的第二可能值在满足至少一个函数关系的情况下,至少一个函数关系中每个函数关系的值与第一数据分片的第二可能值之间存在的差值;
获取差值对应的第二标识;
上述将至少一个函数关系进行编码获得编码信息,包括:
获取至少一个函数关系中每个函数关系的编码信息,编码信息包括第一标识和第二标识对应的二进制数值。
其中,差值,可以是函数关系的值减去第一数据分片的第二可能值的值,也可以是第一数据分片的第二可能值的值减去函数关系的值。
其中,若存在的差值仅为正数,则余数对应的第二标识的占用空间位数可以是2位,也可以是4位,还可以是其他位数。
示例性地,若存在的差值仅为正数,在第二标识的占用空间位数为2位时,可以用00代表差值0、01代表差值1、10代表差值2且11代表差值3,即是说,可以代表0~3共4个差值;而在第二标识的占用空间位数为4位时,同理地,可以代表0~15共16个差值。
其中,若存在的差值既存在正数也存在负数,则余数对应的第二标识的占用空间可以是3位,也可以是5位,还可以是其他位数。
示例性地,若存在的差值既存在正数也存在负数,则第二标识的第一位用于表示差值的正负,例如用0表示差值为正数、用1表示差值为负数,则在第二标识的占用空间位数为3位时,可以用000~011代表差值0~3、且用101~111代表(-1)~(-3),总共8个差值;而在第二标识的占用空间位数为5位时,同理地,可以用00000~01111代表0~15、且用10001~11111代表(-1)~(-15),总共32个差值。
其中,编码信息,由第一标识和第二标识对应的二进制数据相邻连接而成,即是说,第二标识对应的二进制数据可以位于第一标识的前方或后方。
示例性地,基于上述示例性实施例,差值仅为正数、余数对应的第二标识的占用空间位数为2位且第二标识对应的二进制数据位于第一标识的前方,若第一数据分片为255、数字等效项为4,且数字等效项的第一可能值与第一数据分片的第二可能值所满足的函数关系为:函数关系的值=(数字等效项)4,由于44=256、且256-255=1,可见,差值为1,则差值对应的第二标识为01,从而在这种情况下,可以得到编码信息为010001,该编码信息可以表示当第一数据分片的值加1之后即可满足函数关系:数据分片的值=(数字等效项)4。
可以看出,本申请实施例中,在第一数据分片的值经过一定范围内的差值增减后才可与数字等效项满足某一函数关系时,通过获取差值对应的第二标识所对应的二进制数值与第一标识组成编码信息。从而在TCP/IP传输过程中已具有既定的数字等效项时,即便在第一数据分片的值与函数关系存在一定的偏差时编码信息也能够准确地将第一数据分片的值表示出来,使得X个数据分片中每个数据分片与编码信息之间一一对应有数据转换依据。
在一个可能的示例中,每个编码信息占用的空间位数小于X个数据分片中每个数据分片占用的空间位数。
其中,X个数据分片中每个数据分片占用的空间位数,可以指每个数据分片为十进制数据时占用的空间位数,也可以指每个数据分片从十进制数据转换为二进制数据后占用的空间 位数。很明显地,二进制数据占用的空间位数大于十进制数据占用的空间位数。
可以看出,本申请实施例中,通过确保每个编码信息占用的空间位数小于X个数据分片中每个数据分片占用的空间位数,从而确保采用发送编码信息的方式发送数据分片的内容时,数据传输量小于直接发送数据分片时的数据传输量,进而提高数据传输效率。
在一个可能的示例中,若第一数据分片的值与数据等效项满足的第一函数关系为多个函数关系的组合,上述获取第一函数关系在数据字典中的第一编码信息,包括:
获取多个函数关系的组合方式,以及多个函数关系中每个函数关系的编码信息;
获取第一编码信息,第一编码信息包括多个函数关系中每个函数关系的编码信息,以及多个函数关系的组合方式的编码信息。
其中,函数关系的组合方式,指函数关系之间的运算法则,运算法则包括加、减、乘、除或其他法则。若运算法则只有加、减、乘、除四种,则函数关系的组合方式的编码信息可以用2位的二进制数据表示。
其中,第一编码信息包括的每个函数关系的编码信息以及多个函数关系的组合方式的编码信息的排列方式,在具体实现中,可以是根据多个函数关系与其之间的运算法则的组合方式按照顺序排列而成。
示例性地,请参阅图6,图6是本申请实施例提供的另一种基于函数的数据发送方法的举例示意图,如图6所示,若第一数据分片的值与数据等效项满足的第一函数关系为:函数关系1÷函数关系2,其中,函数关系1的编码信息为0001、函数关系2的编码信息为0101、且除法这一运算法则采用二进制数据11表示,则第一编码信息可以为0001110101。
可以看出,本申请实施例中,在第一数据分片的值与数据等效项满足的第一函数关系为多个函数关系的组合时,通过获取多个函数关系的组合方式,以及多个函数关系中每个函数关系的编码信息,使得第一编码信息包括多个函数关系中每个函数关系的编码信息、以及多个函数关系的组合方式的编码信息。从而使得第一函数关系能够表示更多种第一数据分片的值与数据等效项之间的对应函数关系,提高第一函数关系对数值分片的值的涵盖范围,进而减少函数关系的数量,数据字典中包括的编码信息的个数相应地也减少,在一些可能的情况中可以起到减小第一编码信息占用的空间大小而进一步地提高数据传输效率的作用。
与上述图2所示的实施例一致的,请参阅图7,图7是本申请实施例提供的一种基于函数的数据发送装置的结构示意图,如图7所示:
一种基于函数的数据发送装置,应用于发送端,上述装置包括:
201:获取单元,用于获取待发送数据,并将待发送数据拆分为X个数据分片。
202:数字单元,用于确定数字等效项,数字等效项由发送端与接收端的TCP/IP连接建立过程确定。
203:函数单元,用于获取X个数据分片中的第一数据分片,并确定第一数据分片的值与数据等效项满足的第一函数关系。
204:编码单元,用于获取第一函数关系在数据字典中的第一编码信息,数据字典中包括多个函数关系对应的编码信息。
205:发送单元,用于发送第一编码信息。
可以看出,本申请实施例提供的装置中,由发送端与接收端的TCP/IP连接建立过程确定数字等效项,再确定第一数据分片的值与数据等效项满足的第一函数关系,从而获取第一函数关系在数据字典中的第一编码信息并发送第一编码信息,通过发送X个编码信息最终完成X个数据分片的发送。采用本申请实施例的装置,在TCP/IP传输过程中,根据数据分片的值 与数据等效项满足的函数关系在数据字典中确定编码信息并发送编码信息,由于只需要发送编码信息而不再需要发送占用空间较大的数据块,减少了大量的数据传输量,从而提高数据传输效率。
具体地,本申请实施例可以根据上述方法示例对基于函数的数据发送装置进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
与上述图2所示的实施例一致的,本申请实施例提供了一种电子设备,请参阅图8,图8是本申请的实施例提供的一种电子设备的硬件运行环境的服务器结构示意图,如图8所示,电子设备包括处理器、存储器以及存储在存储器上并可在处理器上运行的计算机执行指令,当计算机执行指令被运行时,使得电子设备执行包括任一种基于函数的数据发送方法的步骤的指令。
其中,处理器为CPU。
其中,存储器,可选的,存储器可以为高速RAM存储器,也可以是稳定的存储器,例如磁盘存储器。
本领域技术人员可以理解,图8中示出的服务器的结构并不构成对其的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图8所示,存储器中可以包括操作系统、网络通信模块以及基于函数的数据发送方法的计算机执行指令。操作系统用于管理和控制服务器硬件和软件资源,支持计算机执行指令的运行。网络通信模块用于实现存储器内部各组件之间的通信,以及与服务器内部其他硬件和软件之间通信,通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯系统)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA2000(CodeDivision Multiple Access 2000,码分多址2000)、WCDMA(Wideband Code DivisionMultiple Access,宽带码分多址)、TD-SCDMA(Time Division-Synchronous CodeDivision Multiple Access,时分同步码分多址)等。
在图8所示的服务器中,处理器用于执行存储器中存储的人员管理的计算机执行指令,实现以下步骤:获取待发送数据,并将待发送数据拆分为X个数据分片;确定数字等效项,数字等效项由发送端与接收端的TCP/IP连接建立过程确定;获取X个数据分片中的第一数据分片,并确定第一数据分片的值与数据等效项满足的第一函数关系;获取第一函数关系在数据字典中的第一编码信息,数据字典中包括多个函数关系对应的编码信息;发送第一编码信息。
本申请涉及的服务器的具体实施可参见上述基于函数的数据发送方法的各实施例,在此不做赘述。
本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机指令,当计算机指令在通信装置上运行时,使得通信装置执行以下步骤:获取待发送数据,并将待发送数据拆分为X个数据分片;确定数字等效项,数字等效项由发送端与接收端的TCP/IP连接建立过程确定;获取X个数据分片中的第一数据分片,并确定第一数据分片的值与数据等效项满足的第一函数关系;获取第一函数关系在数据字典中的第一编码信息,数据字典中包括多个函数关系对应的编码信息;发送第一编码信息。上述计算机包括电子设备。
其中,电子终端设备包括手机、平板电脑、个人数字助理、穿戴式设备等。
其中,计算机可读存储介质可以是上述实施例所述的电子设备的内部存储单元,例如电子设备的硬盘或内存。计算机可读存储介质也可以是上述电子设备的外部存储设备,例如电子设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,计算机可读存储介质还可以既包括电子设备的内部存储单元也包括外部存储设备。计算机可读存储介质用于存储计算机执行指令以及电子设备所需的其他计算机执行指令和数据。计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。
本申请涉及的计算机可读存储介质的具体实施可参见上述基于函数的数据发送方法的各实施例,在此不做赘述。
本申请实施例提供了一种计算机程序产品,其中,计算机程序产品包括计算机程序,计算机程序可操作来使计算机如上述方法实施例中记载的任何一种基于函数的数据发送方法的部分或全部步骤,该计算机程序产品可以是一个软件安装包。
需要说明的是,对于前述的任一种基于函数的数据发送方法的实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请所必须的。
上述图2所示的实施例应用于发送端,相对的接收端,本申请实施例提供了一种基于函数的数据接收方法,应用于接收端,请参阅图9,图9是本申请实施例提供的一种基于函数的数据接收方法的流程示意图,如图9所示,该方法包括以下步骤:
301:接收X个编码信息。
302:确定数字等效项,数字等效项由发送端与接收端的TCP/IP连接建立过程确定。
303:根据X个编码信息中每个编码信息在数据字典中确定目标函数关系。
其中,目标函数关系,可以包括X个编码信息中每个编码信息在数据字典中的函数关系。
304:根据目标函数关系和数字等效项对X个编码信息进行还原,得到X个数据分片。
305:将X个数据分片进行拼接,得到原始数据。
可以看出,本申请实施例中,由发送端与接收端的TCP/IP连接建立过程确定数字等效项,根据X个编码信息中每个编码信息在数据字典中确定目标函数关系,然后根据目标函数关系和数字等效项得到X个数据分片,最后将多个数据分片进行拼接即可得到原始数据。采用本申请实施例的数据接收方法,在TCP/IP传输过程中,由于只需要根据接收到的编码信息和数据字典即可通过数据还原而得到原始数据,从而不再需要接收占用空间较大的数据块,减少了大量的数据传输量,从而提高数据传输效率。
在一个可能的示例中,根据X个编码信息中每个编码信息在数据字典中确定目标函数关系之前,上述方法还包括:
接收数据字典;
或接收数据字典的标识信息;
上述根据X个编码信息中每个编码信息在数据字典中确定目标函数关系,包括:
根据数据字典的标识信息确定数据字典,并根据X个编码信息中每个编码信息在数据字典中确定目标函数关系。
可以看出,本申请实施例中,接收X个数据编码时,还可以接收到数据字典,或接收到数据字典的标识信息以获取存储在本地的数据字典,便于接收端根据数据字典这一数据还原 依据对X个数据编码进行还原从而得到原始数据。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请一种基于函数的数据发送方法、装置、设备和数据接收方法的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请一种基于函数的数据发送方法、装置、设备和数据接收方法的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
本申请是参照本申请实施例的方法、硬件产品和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看附图、公开内容、以及所附权利要求书,可理解并实现所公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
显然,本领域的技术人员可以对本申请提供的一种基于函数的数据发送方法、装置、设备和数据接收方法进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (10)

  1. 一种基于函数的数据发送方法,其特征在于,应用于发送端,所述方法包括:
    获取待发送数据,并将所述待发送数据拆分为X个数据分片;
    确定数字等效项,所述数字等效项由所述发送端与接收端的TCP/IP连接建立过程确定;
    获取所述X个数据分片中的第一数据分片,并确定所述第一数据分片的值与所述数据等效项满足的第一函数关系;
    获取所述第一函数关系在数据字典中的第一编码信息,所述数据字典中包括多个函数关系对应的编码信息;
    发送所述第一编码信息。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    获取所述数字等效项的第一可能值;
    获取所述第一数据分片的第二可能值;
    确定所述第一可能值和所述第二可能值可以满足的至少一个函数关系;
    将所述至少一个函数关系进行编码获得编码信息,根据所述编码信息获得所述数据字典。
  3. 根据权利要求2所述的方法,其特征在于,所述将所述至少一个函数关系进行编码获得编码信息,包括:
    获取所述至少一个函数关系中每个函数关系的第一标识;
    获取所述至少一个函数关系中每个函数关系的编码信息,所述编码信息包括所述第一标识对应的二进制数值。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    获取第二标识,所述第二标识用于表征所述数字等效项的第一可能值与所述第一数据分片的第二可能值在满足至少一个函数关系的情况下,至少一个函数关系中每个函数关系的值与所述第一数据分片的第二可能值之间存在的差值;
    获取所述差值对应的第二标识;
    所述将所述至少一个函数关系进行编码获得编码信息,包括:
    获取所述至少一个函数关系中每个函数关系的编码信息,所述编码信息包括所述第一标识和所述第二标识对应的二进制数值。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,每个所述编码信息占用的空间位数小于所述X个数据分片中每个数据分片占用的空间位数。
  6. 根据权利要求1所述的方法,其特征在于,若所述第一数据分片的值与所述数据等效项满足的第一函数关系为多个函数关系的组合,所述获取所述第一函数关系在数据字典中的第一编码信息,包括:
    获取所述多个函数关系的组合方式,以及所述多个函数关系中每个函数关系的编码信息;
    获取所述第一编码信息,所述第一编码信息包括所述多个函数关系中每个函数关系的编码信息,以及所述多个函数关系的组合方式的编码信息。
  7. 一种基于函数的数据发送装置,其特征在于,应用于发送端,所述装置包括:
    获取单元,用于获取待发送数据,并将所述待发送数据拆分为X个数据分片;
    数字单元,用于确定数字等效项,所述数字等效项由所述发送端与接收端的TCP/IP连接建立过程确定;
    函数单元,用于获取所述X个数据分片中的第一数据分片,并确定所述第一数据分片的值与所述数据等效项满足的第一函数关系;
    编码单元,用于获取所述第一函数关系在数据字典中的第一编码信息,所述数据字典中包括多个函数关系对应的编码信息;
    发送单元,用于发送所述第一编码信息。
  8. 一种电子设备,其特征在于,包括处理器、存储器以及存储在所述存储器上并可在所述处理器上运行的计算机执行指令,当所述计算机执行指令被运行时,使得所述电子设备执行权利要求1-6任一项所述的方法。
  9. 一种基于函数的数据接收方法,其特征在于,应用于接收端,所述方法包括:
    接收X个编码信息;
    确定数字等效项,所述数字等效项由发送端与所述接收端的TCP/IP连接建立过程确定;
    根据所述X个编码信息中每个编码信息在数据字典中确定目标函数关系;
    根据所述目标函数关系和所述数字等效项对所述X个编码信息进行还原,得到X个数据分片;
    将所述X个数据分片进行拼接,得到原始数据。
  10. 根据权利要求9所述的方法,其特征在于,所述根据所述X个编码信息中每个编码信息在数据字典中确定目标函数关系之前,所述方法还包括:
    接收数据字典;
    或接收所述数据字典的标识信息;
    所述根据所述X个编码信息中每个编码信息在数据字典中确定目标函数关系,包括:
    根据所述数据字典的标识信息确定目标数据字典,并根据所述X个编码信息中每个编码信息在数据字典中确定目标函数关系。
PCT/CN2022/126270 2022-01-10 2022-10-19 基于函数的数据发送方法、装置、设备和数据接收方法 WO2023130801A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210023690.7 2022-01-10
CN202210023690.7A CN116260896A (zh) 2022-01-10 2022-01-10 基于函数的数据发送方法、装置、设备和数据接收方法

Publications (1)

Publication Number Publication Date
WO2023130801A1 true WO2023130801A1 (zh) 2023-07-13

Family

ID=86681370

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/126270 WO2023130801A1 (zh) 2022-01-10 2022-10-19 基于函数的数据发送方法、装置、设备和数据接收方法

Country Status (2)

Country Link
CN (1) CN116260896A (zh)
WO (1) WO2023130801A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8477050B1 (en) * 2010-09-16 2013-07-02 Google Inc. Apparatus and method for encoding using signal fragments for redundant transmission of data
CN104184545A (zh) * 2013-05-27 2014-12-03 华为技术有限公司 一种传输数据的方法及解码端、编码端
CN104216958A (zh) * 2014-08-20 2014-12-17 深圳市邦彦信息技术有限公司 基于结构化数据的传输方法及装置
CN105827700A (zh) * 2016-03-15 2016-08-03 北京金山安全软件有限公司 一种动态文件的传输方法、装置及电子设备
CN113238821A (zh) * 2021-05-31 2021-08-10 深圳市商汤科技有限公司 数据处理的加速方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8477050B1 (en) * 2010-09-16 2013-07-02 Google Inc. Apparatus and method for encoding using signal fragments for redundant transmission of data
CN104184545A (zh) * 2013-05-27 2014-12-03 华为技术有限公司 一种传输数据的方法及解码端、编码端
CN104216958A (zh) * 2014-08-20 2014-12-17 深圳市邦彦信息技术有限公司 基于结构化数据的传输方法及装置
CN105827700A (zh) * 2016-03-15 2016-08-03 北京金山安全软件有限公司 一种动态文件的传输方法、装置及电子设备
CN113238821A (zh) * 2021-05-31 2021-08-10 深圳市商汤科技有限公司 数据处理的加速方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN116260896A (zh) 2023-06-13

Similar Documents

Publication Publication Date Title
US9930044B2 (en) Boosting remote direct memory access performance using cryptographic hash based approach
WO2023088021A1 (zh) 一种基于预设规则的数据压缩方法、装置、设备和介质
WO2017067391A1 (zh) 虚拟机的数据共享方法及装置
EP3588914A1 (en) Data storage method, encoding device and decoding device
WO2022142033A1 (zh) 数据传输方法、装置、电子设备及可读存储介质
JP6289680B2 (ja) パケット送信装置、パケット受信装置、パケット送信プログラムおよびパケット受信プログラム
WO2021073156A1 (zh) 短链接的生成方法、服务器、存储介质及计算机设备
CN110912920A (zh) 数据处理方法、设备及介质
CN105450712B (zh) 一种数据传输方法及装置
CN106412140A (zh) 短链接地址生成方法及系统
WO2017000915A1 (zh) 组播传输方法、信息提取方法及相应的终端和设备
WO2017097106A1 (zh) 一种文件差量的传输方法以及装置
WO2011140930A1 (zh) 数据压缩中数据分段方法及设备
WO2022143536A1 (zh) 基于APSoC的国密计算方法、系统、设备及介质
CN112817602A (zh) 一种json格式数据发送、接收方法、设备及介质
CN113014580A (zh) 文件传输方法、装置、电子设备及存储介质
US20180083777A1 (en) Methods, systems, apparatuses, and devices for securing network communications using multiple security protocols
CN109600364B (zh) 一种实现消息验证的方法、装置及计算机可读存储介质
WO2023071893A1 (zh) 一种基于三种模式的数据压缩方法和数据解压方法
WO2023130801A1 (zh) 基于函数的数据发送方法、装置、设备和数据接收方法
CN107241446B (zh) 应用程序的文件传输方法、装置和终端设备及存储介质
CN113613289A (zh) 一种蓝牙数据传输方法、系统及通信设备
CN109710502A (zh) 日志传输方法、装置及存储介质
WO2023061180A1 (zh) 基于多频率的数据发送和接收方法、装置和设备
WO2014029081A1 (zh) 压缩方法及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22918253

Country of ref document: EP

Kind code of ref document: A1