CN112671921A - Data transmission method and device, electronic equipment and readable storage medium - Google Patents
Data transmission method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN112671921A CN112671921A CN202011600114.1A CN202011600114A CN112671921A CN 112671921 A CN112671921 A CN 112671921A CN 202011600114 A CN202011600114 A CN 202011600114A CN 112671921 A CN112671921 A CN 112671921A
- Authority
- CN
- China
- Prior art keywords
- data
- transmitted
- transmission
- receiving
- coded
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 189
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000007781 pre-processing Methods 0.000 claims abstract description 15
- 230000009467 reduction Effects 0.000 claims abstract description 9
- 238000013467 fragmentation Methods 0.000 claims description 30
- 238000006062 fragmentation reaction Methods 0.000 claims description 30
- 239000012634 fragment Substances 0.000 claims description 18
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012545 processing Methods 0.000 claims description 14
- 239000000126 substance Substances 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 7
- 238000007726 management method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Abstract
The invention relates to a transmission protocol technology, and discloses a data transmission method, which comprises the following steps: receiving a transmission request, acquiring data to be transmitted, and correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data; preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted; constructing a transmission channel, and transmitting the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object; and carrying out identification reduction operation on the receiving object to obtain receiving data. The invention also relates to a blockchain technique, wherein the receiving object can be stored in a blockchain. The invention also provides a data transmission device, electronic equipment and a readable storage medium. The invention can improve the efficiency of data transmission.
Description
Technical Field
The present invention relates to the field of transmission protocols, and in particular, to a data transmission method, apparatus, electronic device, and readable storage medium.
Background
With the development of internet technology, people have new requirements on timeliness of information interaction, and therefore data transmission technology is gradually concerned by people.
However, in the current data transmission technology, data is transferred by an intermediate server, and meanwhile, data transmission cannot be dynamically changed and is limited by transmission bandwidth and transmission capability of a transmission terminal, so that the time delay of a transmitted file is high, and a large file cannot be transmitted, which results in low file transmission efficiency.
Disclosure of Invention
The invention provides a data transmission method, a data transmission device, electronic equipment and a computer readable storage medium, and mainly aims to improve the efficiency of data transmission.
In order to achieve the above object, a data transmission method provided by the present invention includes:
receiving a transmission request, acquiring data to be transmitted, and correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data;
preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted;
constructing a transmission channel, and transmitting the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object;
and carrying out identification reduction operation on the receiving object to obtain receiving data.
Optionally, the correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data includes:
calculating the difference between the network bandwidth and the data capacity of the data to be transmitted, and determining the difference as a coding rate;
and coding the data to be transmitted according to the coding rate to obtain the coded data.
Optionally, the encoding the data to be transmitted according to the encoding code rate to obtain the encoded data includes:
and coding the data of the type corresponding to the coding mode in the data to be transmitted by using a preset coding mode according to the coding rate to obtain the coded data.
Optionally, the preprocessing the encoded data according to the data capacity of the encoded data to obtain an object to be transmitted includes:
when the data capacity of the coded data is smaller than or equal to a preset data capacity threshold value, taking the coded data as an object to be transmitted, and marking the object to be transmitted by using a preset first object tag to obtain the standard object to be transmitted;
when the coded data is larger than a preset data capacity threshold value, the coded data is marked in a slicing mode to obtain an object to be transmitted, and the object to be transmitted is marked by using a preset second object label to obtain the standard object to be transmitted.
Optionally, the performing fragment marking on the encoded data to obtain the object to be transmitted includes:
carrying out fragmentation and id index marking on the coded data according to a preset fragmentation length to obtain a fragmentation data set;
and determining the fragment data set as the object to be transmitted.
Optionally, the constructing a transmission channel includes:
extracting transmission parameters in the transmission request;
and replacing the corresponding parameters in the preset transmission protocol by using the transmission parameters to obtain the transmission channel.
Optionally, the identifying and restoring the receiving object to obtain the receiving data includes:
identifying a label corresponding to the receiving object;
when the label corresponding to the receiving object is the first object label, taking the data in the receiving object as the receiving data;
and when the tag corresponding to the receiving object is the second object tag, sequentially combining all the fragment data contained in the receiving object according to the id index corresponding to each fragment data to obtain the receiving data.
In order to solve the above problem, the present invention also provides a data transmission apparatus, including:
the data processing module is used for receiving a transmission request, acquiring data to be transmitted, and correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data; preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted;
the data transmission module is used for constructing a transmission channel and transmitting the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object;
and the data receiving module is used for carrying out identification reduction operation on the receiving object to obtain the receiving data.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and a processor executing the computer program stored in the memory to implement the data transmission method.
In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, the at least one computer program being executed by a processor in an electronic device to implement the data transmission method described above.
The embodiment of the invention receives a transmission request and obtains data to be transmitted, correspondingly encodes the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data, and correspondingly encodes the data according to the data transmission bandwidth, thereby reducing the time delay of data transmission; preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted, and performing data slicing transmission on larger coded data breaks through the transmission limit of a data transmission terminal, so that the data transmission efficiency is improved; constructing a transmission channel, and transmitting the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object; and carrying out identification reduction operation on the receiving object to obtain receiving data. Therefore, the data transmission method, the data transmission device, the electronic equipment and the computer readable storage medium provided by the embodiment of the invention improve the accuracy of data transmission.
Drawings
Fig. 1 is a schematic flow chart of a data transmission method according to an embodiment of the present invention;
fig. 2 is a block diagram of a data transmission apparatus according to an embodiment of the present invention;
fig. 3 is a schematic internal structural diagram of an electronic device implementing a data transmission method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides a data transmission method. The execution subject of the data transmission method includes, but is not limited to, at least one of electronic devices, such as a server and a terminal, which can be configured to execute the method provided by the embodiments of the present application. In other words, the data transmission method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Referring to fig. 1, which is a schematic flow chart of a data transmission method according to an embodiment of the present invention, in an embodiment of the present invention, the data transmission method includes:
s1, receiving a transmission request, acquiring data to be transmitted, and correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data;
in the embodiment of the present invention, the transmission request is transmission request information of data, and includes: the network bandwidth of data transmission and the transmission parameter of data, the transmission parameter is the address information of the transmission client and the data receiving client, including: IP address and port information. The data to be transmitted is multimedia data which is acquired by data acquisition equipment and needs to be transmitted, and the multimedia data comprises one or more of audio data and video data. Furthermore, in order to reduce the data transmission speed in the data transmission process, the embodiment of the invention encodes the data to be transmitted, compresses the information for reducing redundancy by encoding the data to be transmitted, and improves the speed of subsequent data transmission.
Further, since the coding rate is an important parameter of coding, in the embodiment of the present invention, the collected data to be transmitted may be coded according to the set coding rate. Considering that the coding rate is proportional to the amount of data coded in a unit time, and the network bandwidth occupied by data with different data amounts is different, when the network bandwidth occupied by the data exceeds the actual network bandwidth, transmission delay is caused. Therefore, in order to enable the data transmission to have smaller time delay, the set coding rate can be adjusted according to the real-time change of the network state.
In detail, in the embodiment of the present invention, a difference between the network bandwidth and the data capacity of the data to be transmitted is calculated, the difference is used as a coding rate, and the data to be transmitted is coded according to the coding rate to obtain the coded data.
Further, in the embodiment of the present invention, there may be multiple ways of encoding data to be transmitted, where the types of data included in the data to be transmitted are different, the encoding ways may also be different, and different encoding ways may encode data of corresponding types, so that, in the embodiment of the present invention, the data of the type corresponding to the encoding way in the data to be transmitted is encoded by using a preset encoding way according to the encoding code rate to obtain the encoded data, for example, opus encoding may encode audio data, and h264 encoding may encode video data, for example: the data to be transmitted comprises video data and audio data, the coding rate is A, the video data in the data to be transmitted is subjected to data coding with the code rate of A in an h264 coding mode, the audio data in the data to be transmitted is subjected to data coding with the code rate of A in an opus coding mode, and the coded video data and the coded audio data are collected to obtain the coded data.
S2, preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted;
because the data transmission terminal has transmission limitation of data size, when the data capacity of single transmitted data is too large, the data cannot be directly transmitted, so the embodiment of the invention preprocesses the coded data according to the data capacity of the coded data to obtain the object to be transmitted.
In detail, in the embodiment of the present invention, preprocessing the encoded data according to the data capacity of the encoded data to obtain an object to be transmitted includes: when the data capacity of the coded data is smaller than or equal to a preset data capacity threshold value, taking the coded data as a transmission object, further facilitating the arrangement of received data after data transmission, and marking the object to be transmitted by using a preset first object tag to obtain the standard object to be transmitted; when the coded data is larger than a preset data capacity threshold value, fragment marking is carried out on the coded data to obtain the object to be transmitted, further, in order to facilitate sorting and restoring of received data after data transmission, a preset second object label is used for marking the object to be transmitted to obtain the standard object to be transmitted.
Further, in this embodiment of the present invention, the marking the coded data into fragments to obtain the object to be transmitted includes: carrying out fragmentation and id index marking on the coded data according to a preset fragmentation length to obtain a fragmentation data set, and determining the fragmentation data set as the object to be transmitted; for example: the size of the coded data A is 5T, the preset fragmentation length is 1T, and then the coded data A can be sequentially divided into 5 data blocks including a data block A \0, a data block A \1, a data block A \2, a data block A \3 and a data block A \ 4, wherein A \0 is an id index of fragmentation data, A represents an id of the fragmentation data, 0 represents the sequence of fragmentation, the fragmentation data A \0, A \1, A \2, A \3 and A \4 form a fragmentation data set, and through the id index mark of the fragmentation data, the sequential identification and combination can be conveniently carried out after the data receiving terminal receives the fragmentation data.
S3, constructing a transmission channel, and transmitting the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object;
in the implementation of the invention, in order to ensure data security, reduce delay, omit an intermediate server and realize point-to-point data transmission, a data transmission channel needs to be constructed to transmit the object to be transmitted.
In detail, in the embodiment of the present invention, the Transmission parameter in the Transmission request is extracted, and the Transmission parameter is used to replace a corresponding parameter in the Transmission Protocol, so as to obtain the data Transmission channel, where the Transmission Protocol is a Stream Control Transmission Protocol (SCTP), and further, when the data Transmission terminal is a browser, the Transmission Protocol may also be a data Transmission Protocol of a WebRTC interface in the browser.
Further, in the embodiment of the present invention, the transmission channel is used to transmit the object to be transmitted to a preset receiving end, so as to obtain the received object.
The invention carries out data dynamic coding transmission according to the data transmission bandwidth, and breaks through the transmission limit of the data transmission terminal by utilizing data fragment transmission, thereby improving the data transmission efficiency and lowering the data transmission time delay.
In another embodiment of the present invention, in order to guarantee the privacy of data, the receiving object may be stored in a blockchain node.
And S4, carrying out identification and reduction operation on the receiving object to obtain the receiving data.
In the embodiment of the present invention, the transmitting process does not affect the tag corresponding to the transmitting object, and the data in the receiving object is not the final receiving data, so that the identifying and restoring operation is performed on the receiving object to obtain the receiving data, including: identifying a tag corresponding to the receiving object, and taking data in the receiving object as the receiving data when the tag corresponding to the receiving object is the first object tag; and when the tag corresponding to the receiving object is the second object tag, sequentially combining all the fragment data contained in the receiving object according to the ID index corresponding to each fragment data to obtain the receiving data. Such as: the receiving object only contains data A, the label corresponding to the receiving object is the first object label, and then the data A is the receiving data; the label corresponding to the receiving object is the second object label, the receiving object comprises data A \1 and A \0, and the corresponding data are merged according to the sequence A \0 and A \1 of the id index to obtain the receiving data.
Fig. 2 is a functional block diagram of the data transmission device according to the present invention.
The data transmission device 100 of the present invention may be installed in an electronic device. According to the implemented functions, the data transmission device may include a data processing module 101, a data transmission module 102, and a data receiving module 103, which may also be referred to as a unit, and refer to a series of computer program segments that can be executed by a processor of an electronic device and can perform fixed functions, and are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the data processing module 101 is configured to receive a transmission request, acquire data to be transmitted, and perform corresponding encoding on the data to be transmitted according to a network bandwidth in the transmission request to obtain encoded data; and preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted.
In the embodiment of the present invention, the transmission request is transmission request information of data, and includes: the network bandwidth of data transmission and the transmission parameter of data, the transmission parameter is the address information of the transmission client and the data receiving client, including: IP address and port information. The data to be transmitted is multimedia data which is acquired by data acquisition equipment and needs to be transmitted, and the multimedia data comprises one or more of audio data and video data. Furthermore, in order to reduce the data transmission speed in the data transmission process, the embodiment of the invention encodes the data to be transmitted, compresses the information for reducing redundancy by encoding the data to be transmitted, and improves the speed of subsequent data transmission.
Further, since the coding rate is an important parameter of coding, in the embodiment of the present invention, the data processing module 101 may code the acquired data to be transmitted according to the set coding rate. Considering that the coding rate is proportional to the amount of data coded in a unit time, and the network bandwidth occupied by data with different data amounts is different, when the network bandwidth occupied by the data exceeds the actual network bandwidth, transmission delay is caused. Therefore, in order to enable data transmission to have a smaller delay, the data processing module 101 may further adjust the set coding rate according to a real-time change of the network status.
In detail, in the embodiment of the present invention, the data processing module 101 calculates a difference between the network bandwidth and the data capacity of the data to be transmitted, uses the difference as a coding rate, and codes the data to be transmitted according to the coding rate to obtain the coded data.
Further, in the embodiment of the present invention, there may be multiple ways of encoding data to be transmitted, and when data types included in the data to be transmitted are different, the encoding ways may also be different, so that, according to the encoding code rate, the data processing module 101 in the embodiment of the present invention encodes data of a type corresponding to the encoding way in the data to be transmitted by using a preset encoding way, so as to obtain the encoded data, for example, opus encoding may encode audio data, and h264 encoding may encode video data, for example: the data to be transmitted comprises video data and audio data, the coding rate is A, the video data in the data to be transmitted is subjected to data coding with the code rate of A in an h264 coding mode, the audio data in the data to be transmitted is subjected to data coding with the code rate of A in an opus coding mode, and the coded video data and the coded audio data are collected to obtain the coded data.
Because the data transmission terminal has a transmission limit of the data size, when the data capacity of the single transmitted data is too large, the data cannot be directly transmitted, and therefore, the data processing module 101 performs preprocessing on the encoded data according to the data capacity of the encoded data to obtain the object to be transmitted.
In detail, in the embodiment of the present invention, the preprocessing the encoded data by the data processing module 101 according to the data capacity of the encoded data to obtain the object to be transmitted includes: when the data capacity of the coded data is smaller than or equal to a preset data capacity threshold value, taking the coded data as a transmission object, further facilitating the arrangement of received data after data transmission, and marking the object to be transmitted by using a preset first object tag to obtain the standard object to be transmitted; when the coded data is larger than a preset data capacity threshold value, fragment marking is carried out on the coded data to obtain the object to be transmitted, further, in order to facilitate sorting and restoring of received data after data transmission, a preset second object label is used for marking the object to be transmitted to obtain the standard object to be transmitted.
Further, in this embodiment of the present invention, the marking, by the data processing module 101, the coded data in a fragment manner to obtain the object to be transmitted includes: carrying out fragmentation and id index marking on the coded data according to a preset fragmentation length to obtain a fragmentation data set, and determining the fragmentation data set as the object to be transmitted; for example: the size of the coded data A is 5T, the preset fragmentation length is 1T, and then the coded data A can be sequentially divided into 5 data blocks including a data block A \0, a data block A \1, a data block A \2, a data block A \3 and a data block A \ 4, wherein A \0 is an id index of fragmentation data, A represents an id of the fragmentation data, 0 represents the sequence of fragmentation, the fragmentation data A \0, A \1, A \2, A \3 and A \4 form a fragmentation data set, and through the id index mark of the fragmentation data, the sequential identification and combination can be conveniently carried out after the data receiving terminal receives the fragmentation data.
The data transmission module 102 is configured to construct a transmission channel, and transmit the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object.
In the implementation of the invention, in order to ensure data security, reduce delay, omit an intermediate server and realize point-to-point data transmission, a data transmission channel needs to be constructed to transmit the object to be transmitted.
In detail, the data Transmission module 102 in the embodiment of the present invention extracts a Transmission parameter in the Transmission request, and replaces a corresponding parameter in the Transmission Protocol with the Transmission parameter to obtain the Transmission channel, where the Transmission Protocol is SCTP (Stream Control Transmission Protocol), and further, when the data Transmission terminal is a browser, the Transmission Protocol may also be a data Transmission Protocol of a WebRTC interface in the browser.
Further, in the embodiment of the present invention, the transmission channel is used to transmit the object to be transmitted to a preset receiving end, so as to obtain the received object.
The invention carries out data dynamic coding transmission according to the data transmission bandwidth, and breaks through the transmission limit of the data transmission terminal by utilizing data fragment transmission, thereby improving the data transmission efficiency and lowering the data transmission time delay.
In another embodiment of the present invention, in order to guarantee the privacy of data, the receiving object may be stored in a blockchain node.
The data receiving module 103 is configured to perform an identification and restoration operation on the received object to obtain received data.
In the embodiment of the present invention, the transmission process does not affect the tag corresponding to the transmission object, and the data in the receiving object is not the final receiving data, so that the data receiving module 103 performs the identification and restoration operation on the receiving object to obtain the receiving data, including: identifying a tag corresponding to the receiving object, and taking data in the receiving object as the receiving data when the tag corresponding to the receiving object is the first object tag; and when the tag corresponding to the receiving object is the second object tag, sequentially combining all the fragment data contained in the receiving object according to the ID index corresponding to each fragment data to obtain the receiving data. Such as: the receiving object only contains data A, the label corresponding to the receiving object is the first object label, and then the data A is the receiving data; the label corresponding to the receiving object is the second object label, the receiving object comprises data A \1 and A \0, and the corresponding data are merged according to the sequence A \0 and A \1 of the id index to obtain the receiving data.
Fig. 3 is a schematic structural diagram of an electronic device implementing the data transmission method according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a data transfer program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of a data transmission program, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., data transmission programs and the like) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a PerIPheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The data transfer program 12 stored in the memory 11 of the electronic device 1 is a combination of computer programs that, when executed in the processor 10, enable:
receiving a transmission request, acquiring data to be transmitted, and correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data;
preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted;
constructing a transmission channel, and transmitting the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object;
and carrying out identification reduction operation on the receiving object to obtain receiving data.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable medium may be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
Embodiments of the present invention may also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:
receiving a transmission request, acquiring data to be transmitted, and correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data;
preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted;
constructing a transmission channel, and transmitting the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object;
and carrying out identification reduction operation on the receiving object to obtain receiving data.
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (10)
1. A method of data transmission, the method comprising:
receiving a transmission request, acquiring data to be transmitted, and correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data;
preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted;
constructing a transmission channel, and transmitting the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object;
and carrying out identification reduction operation on the receiving object to obtain receiving data.
2. The data transmission method according to claim 1, wherein the correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data includes:
calculating the difference between the network bandwidth and the data capacity of the data to be transmitted, and determining the difference as a coding rate;
and coding the data to be transmitted according to the coding rate to obtain the coded data.
3. The data transmission method according to claim 2, wherein the encoding the data to be transmitted according to the encoding code rate to obtain the encoded data includes:
and coding the data of the type corresponding to the coding mode in the data to be transmitted by using a preset coding mode according to the coding rate to obtain the coded data.
4. The data transmission method according to claim 1, wherein the preprocessing the encoded data according to the data capacity of the encoded data to obtain the object to be transmitted comprises:
when the data capacity of the coded data is smaller than or equal to a preset data capacity threshold value, taking the coded data as an object to be transmitted, and marking the object to be transmitted by using a preset first object tag to obtain the standard object to be transmitted;
when the coded data is larger than a preset data capacity threshold value, the coded data is marked in a slicing mode to obtain an object to be transmitted, and the object to be transmitted is marked by using a preset second object label to obtain the standard object to be transmitted.
5. The data transmission method according to claim 4, wherein the marking the coded data into the fragments to obtain the object to be transmitted comprises:
carrying out fragmentation and id index marking on the coded data according to a preset fragmentation length to obtain a fragmentation data set;
and determining the fragment data set as the object to be transmitted.
6. The data transmission method of claim 1, wherein the constructing a transmission channel comprises:
extracting transmission parameters in the transmission request;
and replacing the corresponding parameters in the preset transmission protocol by using the transmission parameters to obtain the transmission channel.
7. The data transmission method according to any one of claims 1 to 6, wherein the performing the identification and restoration operation on the receiving object to obtain the receiving data comprises:
identifying a label corresponding to the receiving object;
when the label corresponding to the receiving object is the first object label, taking the data in the receiving object as the receiving data;
and when the tag corresponding to the receiving object is the second object tag, sequentially combining all the fragment data contained in the receiving object according to the id index corresponding to each fragment data to obtain the receiving data.
8. A data transmission apparatus, comprising:
the data processing module is used for receiving a transmission request, acquiring data to be transmitted, and correspondingly encoding the data to be transmitted according to the network bandwidth in the transmission request to obtain encoded data; preprocessing the coded data according to the data capacity of the coded data to obtain an object to be transmitted;
the data transmission module is used for constructing a transmission channel and transmitting the object to be transmitted to a preset receiving end by using the transmission channel to obtain a receiving object;
and the data receiving module is used for carrying out identification reduction operation on the receiving object to obtain the receiving data.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores computer program instructions executable by the at least one processor to enable the at least one processor to perform the data transmission method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the data transmission method according to any one of claims 1 to 7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011600114.1A CN112671921A (en) | 2020-12-29 | 2020-12-29 | Data transmission method and device, electronic equipment and readable storage medium |
PCT/CN2021/091391 WO2022142033A1 (en) | 2020-12-29 | 2021-04-30 | Data transmission method and apparatus, electronic device, and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011600114.1A CN112671921A (en) | 2020-12-29 | 2020-12-29 | Data transmission method and device, electronic equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112671921A true CN112671921A (en) | 2021-04-16 |
Family
ID=75410463
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011600114.1A Pending CN112671921A (en) | 2020-12-29 | 2020-12-29 | Data transmission method and device, electronic equipment and readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112671921A (en) |
WO (1) | WO2022142033A1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113378226A (en) * | 2021-06-24 | 2021-09-10 | 平安普惠企业管理有限公司 | Biological data processing method, device, equipment and computer readable storage medium |
CN113448933A (en) * | 2021-06-29 | 2021-09-28 | 平安证券股份有限公司 | Service data processing method and device, electronic equipment and medium |
CN113890712A (en) * | 2021-10-14 | 2022-01-04 | 微位(深圳)网络科技有限公司 | Data transmission method and device, electronic equipment and readable storage medium |
WO2022142033A1 (en) * | 2020-12-29 | 2022-07-07 | 平安普惠企业管理有限公司 | Data transmission method and apparatus, electronic device, and readable storage medium |
CN114900480A (en) * | 2022-04-20 | 2022-08-12 | 合肥亚慕信息科技有限公司 | Communication safety management and control system based on data platform |
CN115225710A (en) * | 2022-06-17 | 2022-10-21 | 中国电信股份有限公司 | Data packet transmission method and device, electronic equipment and storage medium |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115361032B (en) * | 2022-08-17 | 2023-04-18 | 佛山市朗盛通讯设备有限公司 | Antenna unit for 5G communication |
CN115603865B (en) * | 2022-12-13 | 2023-03-14 | 广东广宇科技发展有限公司 | Cloud storage-based big data rapid transmission method |
CN116208297B (en) * | 2023-05-06 | 2023-08-08 | 中科航迈数控软件(深圳)有限公司 | Self-adaptive coding method and device for transmission data of numerical control machine tool and related equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101009824A (en) * | 2006-01-24 | 2007-08-01 | 成都索贝数码科技股份有限公司 | A network transfer method for audio/video data |
CN106657197A (en) * | 2015-11-02 | 2017-05-10 | 腾讯科技(深圳)有限公司 | File uploading method and device |
CN109862386A (en) * | 2019-03-27 | 2019-06-07 | 北京奇艺世纪科技有限公司 | Live data transmission method and device |
US10491329B1 (en) * | 2016-12-08 | 2019-11-26 | Amazon Technologies, Inc. | Transfer of data-redundancy encoded data via unreliable, connectionless protocol |
CN110602548A (en) * | 2019-09-20 | 2019-12-20 | 北京市博汇科技股份有限公司 | Method and system for high-quality wireless transmission of ultra-high-definition video |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102598628A (en) * | 2010-03-15 | 2012-07-18 | 莫维克网络公司 | Adaptive Chunked And Content-aware Pacing Of Multi-media Delivery Over Http Transport And Network Controlled Bit Rate Selection |
CN103957389B (en) * | 2014-05-13 | 2017-02-22 | 重庆大学 | 3G video transmission method and system based on compression sensing |
CN104618337B (en) * | 2014-12-31 | 2018-01-02 | 浙江理工大学 | A kind of Streaming Media based on TCP/UDP hybrid protocols is wireless adaptive transmission method |
CN112671921A (en) * | 2020-12-29 | 2021-04-16 | 平安普惠企业管理有限公司 | Data transmission method and device, electronic equipment and readable storage medium |
-
2020
- 2020-12-29 CN CN202011600114.1A patent/CN112671921A/en active Pending
-
2021
- 2021-04-30 WO PCT/CN2021/091391 patent/WO2022142033A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101009824A (en) * | 2006-01-24 | 2007-08-01 | 成都索贝数码科技股份有限公司 | A network transfer method for audio/video data |
CN106657197A (en) * | 2015-11-02 | 2017-05-10 | 腾讯科技(深圳)有限公司 | File uploading method and device |
US10491329B1 (en) * | 2016-12-08 | 2019-11-26 | Amazon Technologies, Inc. | Transfer of data-redundancy encoded data via unreliable, connectionless protocol |
CN109862386A (en) * | 2019-03-27 | 2019-06-07 | 北京奇艺世纪科技有限公司 | Live data transmission method and device |
CN110602548A (en) * | 2019-09-20 | 2019-12-20 | 北京市博汇科技股份有限公司 | Method and system for high-quality wireless transmission of ultra-high-definition video |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022142033A1 (en) * | 2020-12-29 | 2022-07-07 | 平安普惠企业管理有限公司 | Data transmission method and apparatus, electronic device, and readable storage medium |
CN113378226A (en) * | 2021-06-24 | 2021-09-10 | 平安普惠企业管理有限公司 | Biological data processing method, device, equipment and computer readable storage medium |
CN113448933A (en) * | 2021-06-29 | 2021-09-28 | 平安证券股份有限公司 | Service data processing method and device, electronic equipment and medium |
CN113448933B (en) * | 2021-06-29 | 2024-04-02 | 平安证券股份有限公司 | Service data processing method, device, electronic equipment and medium |
CN113890712A (en) * | 2021-10-14 | 2022-01-04 | 微位(深圳)网络科技有限公司 | Data transmission method and device, electronic equipment and readable storage medium |
CN114900480A (en) * | 2022-04-20 | 2022-08-12 | 合肥亚慕信息科技有限公司 | Communication safety management and control system based on data platform |
CN115225710A (en) * | 2022-06-17 | 2022-10-21 | 中国电信股份有限公司 | Data packet transmission method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2022142033A1 (en) | 2022-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112671921A (en) | Data transmission method and device, electronic equipment and readable storage medium | |
CN112541745B (en) | User behavior data analysis method and device, electronic equipment and readable storage medium | |
CN112052370A (en) | Message generation method and device, electronic equipment and computer readable storage medium | |
CN112653760B (en) | Cross-server file transmission method and device, electronic equipment and storage medium | |
CN113890712A (en) | Data transmission method and device, electronic equipment and readable storage medium | |
CN112702228A (en) | Service current limiting response method and device, electronic equipment and readable storage medium | |
CN112464619B (en) | Big data processing method, device and equipment and computer readable storage medium | |
CN114491047A (en) | Multi-label text classification method and device, electronic equipment and storage medium | |
CN113868528A (en) | Information recommendation method and device, electronic equipment and readable storage medium | |
CN112017763B (en) | Medical image data transmission method, device, equipment and medium | |
CN111211887B (en) | Resource encryption method, system, device and computer readable storage medium | |
CN114124878B (en) | Market data issuing method, device, system, equipment and medium | |
CN111538768A (en) | Data query method and device based on N-element model, electronic equipment and medium | |
CN114201466B (en) | Anti-cache breakdown method, device, equipment and readable storage medium | |
CN114448930A (en) | Short address generation method and device, electronic equipment and computer readable storage medium | |
CN114547011A (en) | Data extraction method and device, electronic equipment and storage medium | |
CN113452703B (en) | Combined communication request response method and device, electronic equipment and readable storage medium | |
CN115174698B (en) | Market data decoding method, device, equipment and medium based on table entry index | |
CN113448933B (en) | Service data processing method, device, electronic equipment and medium | |
CN113206843A (en) | Network conference control method and device, electronic equipment and storage medium | |
CN115080898A (en) | View updating method, device, equipment and medium based on front-end trigger scene | |
CN114036233A (en) | Remote data synchronization method, device, equipment and storage medium | |
CN113672484A (en) | Equipment monitoring method, device, equipment and medium based on log information | |
CN114241085A (en) | Curve image generation method, device, equipment and storage medium | |
CN114942855A (en) | Interface calling method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210416 |
|
RJ01 | Rejection of invention patent application after publication |