CN108055360A - Network data sending method, system, sending device and storage medium - Google Patents

Network data sending method, system, sending device and storage medium Download PDF

Info

Publication number
CN108055360A
CN108055360A CN201710991101.3A CN201710991101A CN108055360A CN 108055360 A CN108055360 A CN 108055360A CN 201710991101 A CN201710991101 A CN 201710991101A CN 108055360 A CN108055360 A CN 108055360A
Authority
CN
China
Prior art keywords
data
transmitted
address
bag
source
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.)
Granted
Application number
CN201710991101.3A
Other languages
Chinese (zh)
Other versions
CN108055360B (en
Inventor
周超能
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology Co Ltd
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 Shenzhen Skyworth Digital Technology Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN201710991101.3A priority Critical patent/CN108055360B/en
Publication of CN108055360A publication Critical patent/CN108055360A/en
Application granted granted Critical
Publication of CN108055360B publication Critical patent/CN108055360B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5069Address allocation for group communication, multicast communication or broadcast communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a kind of network data sending method, system, sending device and storage medium, the described method includes:Sending device obtains default multicast ip address and data to be transmitted;The data to be transmitted is added to the predeterminated position in the default multicast ip address, source IP address of the default multicast ip address as data to be transmitted bag of data to be transmitted will be with the addition of;Data to be transmitted bag is sent to receiving device, so that the receiving device parses the source IP address of the data to be transmitted bag, obtains the data to be transmitted.The present invention in source IP address that data to be transmitted is put into data to be transmitted bag by being transmitted, reduce network data subpackage, reduce the transmission of unnecessary data packet, so as to accelerate the transmission of network data, improve the efficiency of receiving device receiving network data.

Description

Network data sending method, system, sending device and storage medium
Technical field
The present invention relates to Internet technical field more particularly to a kind of network data sending method, system, sending device and Storage medium.
Background technology
UDP, that is, User Datagram Protocol is a kind of connectionless transport layer protocol in OSI Reference Model, provides towards thing The simple unreliable information transmission service of business.Multicast/multicast is the agreement based on UDP transmission.There are three types of logical in current network News pattern:Unicast, broadcast, multicast/multicast, wherein multicast/multicast time of occurrence the latest but be provided simultaneously with unicast and broadcast it is excellent Point, it is most promising.
The propagation of data is 3 kinds above nothing but in network, and the propagation for data is will be according to specific net with which kind of mode Network environment makes choice, but at present for either that mode, data be all be placed on by network when transferring One data buffer zone is sent to the receiving device specified, and substantially establishes TCP connection on latticed form, sends data to net In network, receiving device receives the data packet of source destination address, then the flow of assembling datagram.These operations are all to need sending out The side of sending sends data packet by TCP connection, for receiving device is needed to need for fast resolving data, is so increased net The data packet of network, the natural quantity that bag is increased when subpackage, therefore network data pack receiving and transmitting is inefficient.
Above- mentioned information is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above- mentioned information is existing skill Art.
The content of the invention
It is a primary object of the present invention to provide a kind of network data sending method, system, sending device and storage medium, Aim to solve the problem that above-mentioned network data pack receiving and transmitting it is inefficient the technical issues of.
To achieve the above object, the present invention provides a kind of network data sending method, the network data sending method bag Include following steps:
Sending device obtains default multicast ip address and data to be transmitted;
The data to be transmitted is added to the predeterminated position in the default multicast ip address, number to be transmitted will be with the addition of According to source IP address of the default multicast ip address as data to be transmitted bag;
Data to be transmitted bag is sent to receiving device, so that source IP of the receiving device to the data to be transmitted bag Address is parsed, and obtains the data to be transmitted.
Preferably, the predeterminated position data to be transmitted being added in the default multicast ip address, will add Source IP address of the default multicast ip address of data to be transmitted as data to be transmitted bag is added, has specifically included:
The data to be transmitted is segmented, obtains multiple data to be transmitted sections, by the multiple data to be transmitted section The predeterminated position being added separately in the default multicast ip address will be with the addition of multiple default multicast IP of data to be transmitted section Address is respectively as the source IP address of data to be transmitted bag;
Correspondingly, it is described that data to be transmitted bag is sent to receiving device, so that the receiving device is to described to be transmitted The source IP address of data packet is parsed, and is obtained the data to be transmitted, is specifically included:
Multiple data to be transmitted bags are sent to receiving device, so that the receiving device is to the multiple data to be transmitted The source IP address of bag is parsed, and obtains multiple data to be transmitted sections, to the multiple data to be transmitted section according to preset rules Data recombination is carried out, obtains the data to be transmitted.
Preferably, the data to be transmitted bag includes:Source MAC;
Correspondingly, it is described that multiple data to be transmitted bags are sent to receiving device, so that the receiving device is to described more The source IP address of a data to be transmitted bag is parsed, and obtains multiple data to be transmitted sections, to the multiple data to be transmitted section Data recombination is carried out according to preset rules, the data to be transmitted is obtained, specifically includes:
Multiple data to be transmitted bags are sent to receiving device, so that the receiving device is according in each data to be transmitted bag Source MAC judge whether each data to be transmitted bag is that same sending device is sent, be same hair in each data to be transmitted bag When sending the equipment to send, each data to be transmitted bag is parsed, obtains multiple data to be transmitted sections, to the multiple number to be transmitted Data recombination is carried out according to preset rules according to section, obtains the data to be transmitted.
Preferably, it is described to be segmented the data to be transmitted, after obtaining multiple data to be transmitted sections, the method It further includes:
The number of fragments of the data to be transmitted is obtained, generates the corresponding index mark of each data to be transmitted section;
Correspondingly, it is described that the multiple data to be transmitted section is added separately to presetting in the default multicast ip address Position will be with the addition of multiple default multicast ip address of data to be transmitted section as the source IP address of data to be transmitted bag, It specifically includes:
The multiple data to be transmitted section and corresponding index mark are respectively added to the default multicast ip address In predeterminated position, and will be with the addition of data to be transmitted section and it is corresponding index mark multiple default multicast ip address make respectively For the source IP address of data to be transmitted bag.
Preferably, the number of fragments for obtaining the data to be transmitted, generates the corresponding index of each data to be transmitted section Mark, specifically includes:
The data length of the data to be transmitted and the number of fragments of the data to be transmitted are obtained, generates data to be transmitted Data length it is corresponding with each data to be transmitted section index mark;
Correspondingly, it is described that the multiple data to be transmitted section is added separately to presetting in the default multicast ip address Position will be with the addition of multiple default multicast ip address of data to be transmitted section as the source IP address of data to be transmitted bag, It specifically includes:
By the data length of the data to be transmitted, the multiple data to be transmitted section and corresponding index mark respectively Predeterminated position added in the default multicast ip address, and the data length, described that the data to be transmitted will be with the addition of The multiple default multicast ip address of data to be transmitted section and corresponding index mark are respectively as the source IP of data to be transmitted bag Location.
Preferably, it is described data to be transmitted bag is sent to receiving device before, the method further includes:
The first encryption key is obtained, the data to be transmitted bag is encrypted according to first encryption key.
Preferably, the first encryption key of the acquisition, specifically includes:
The currently transmitted time is obtained, the second encryption key is generated according to the currently transmitted time, is added according to described second Predetermined encryption key is encrypted in key, obtains first encryption key.
In addition, to achieve the above object, the present invention also proposes a kind of sending device, and the sending device includes:Memory, Processor and the network data transmission program that can be run on the memory and on the processor is stored in, the network number The step of network data sending method as described above being arranged for carrying out according to transmission program.
In addition, to achieve the above object, the present invention also proposes a kind of network data transmitting system, the system comprises:It connects Receiving unit and sending device as described above;
The receiving device parses for the source IP address to the data to be transmitted bag, obtains described to be transmitted Data.
In addition, to achieve the above object, the present invention also proposes a kind of computer readable storage medium, described computer-readable Network data transmission program is stored on storage medium, is realized when the network data transmission program is executed by processor as above The step of described network data sending method.
The present invention reduces net by being transmitted in source IP address that data to be transmitted is put into data to be transmitted bag Network data subpackage, reduces the transmission of unnecessary data packet, so as to accelerate the transmission of network data, improves receiving device The efficiency of receiving network data.
Description of the drawings
Fig. 1 is the sending device for the hardware running environment that a kind of network data sending method embodiment scheme of the present invention is related to Structure diagram;
Fig. 2 is a kind of flow diagram of network data sending method first embodiment of the present invention;
Fig. 3 is a kind of flow diagram of network data sending method second embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
With reference to Fig. 1, Fig. 1 is the sending device structure diagram for the hardware running environment that the embodiment of the present invention is related to.
As shown in Figure 1, the sending device can include:Processor 1001, such as CPU, communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is used to implement the connection communication between these components. User interface 1003 can include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 can optionally connect including the wired of standard Mouth, wireless interface (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory or the memory of stabilization (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
It will be understood by those skilled in the art that the structure shown in Fig. 1 does not form the restriction to the sending device, it can To include either combining some components or different components arrangement than illustrating more or fewer components.
As shown in Figure 1, it can lead to as in a kind of memory 1005 of computer storage media including operating system, network Believe module, Subscriber Interface Module SIM and network data transmission program.
In sending device shown in Fig. 1, network interface 1004 is mainly used for connecting cloud server, with cloud server Into row data communication;User interface 1003 is mainly used for receiving instruction input by user, and the sending device passes through processor The network data transmission program stored in 1001 calling memories 1005, and perform following operation:
Sending device obtains default multicast ip address and data to be transmitted;
The data to be transmitted is added to the predeterminated position in the default multicast ip address, number to be transmitted will be with the addition of According to source IP address of the default multicast ip address as data to be transmitted bag;
Data to be transmitted bag is sent to receiving device, so that source IP of the receiving device to the data to be transmitted bag Address is parsed, and obtains the data to be transmitted.
Further, processor 1001 can call the network data transmission program stored in memory 1005, also perform It operates below:
The data to be transmitted is segmented, obtains multiple data to be transmitted sections, by the multiple data to be transmitted section The predeterminated position being added separately in the default multicast ip address will be with the addition of multiple default multicast IP of data to be transmitted section Address is respectively as the source IP address of data to be transmitted bag;
Correspondingly, it is described that data to be transmitted bag is sent to receiving device, so that the receiving device is to described to be transmitted The source IP address of data packet is parsed, and is obtained the data to be transmitted, is specifically included:
Multiple data to be transmitted bags are sent to receiving device, so that the receiving device is to the multiple data to be transmitted The source IP address of bag is parsed, and obtains multiple data to be transmitted sections, to the multiple data to be transmitted section according to preset rules Data recombination is carried out, obtains the data to be transmitted.
Further, processor 1001 can call the network data transmission program stored in memory 1005, also perform It operates below:
Multiple data to be transmitted bags are sent to receiving device, so that the receiving device is according in each data to be transmitted bag Source MAC judge whether each data to be transmitted bag is that same sending device is sent, be same hair in each data to be transmitted bag When sending the equipment to send, each data to be transmitted bag is parsed, obtains multiple data to be transmitted sections, to the multiple number to be transmitted Data recombination is carried out according to preset rules according to section, obtains the data to be transmitted.
Further, processor 1001 can call the network data transmission program stored in memory 1005, also perform It operates below:
The number of fragments of the data to be transmitted is obtained, generates the corresponding index mark of each data to be transmitted section;
Correspondingly, it is described that the multiple data to be transmitted section is added separately to presetting in the default multicast ip address Position will be with the addition of multiple default multicast ip address of data to be transmitted section as the source IP address of data to be transmitted bag, It specifically includes:
The multiple data to be transmitted section and corresponding index mark are respectively added to the default multicast ip address In predeterminated position, and will be with the addition of data to be transmitted section and it is corresponding index mark multiple default multicast ip address make respectively For the source IP address of data to be transmitted bag.
Further, processor 1001 can call the network data transmission program stored in memory 1005, also perform It operates below:
The data length of the data to be transmitted and the number of fragments of the data to be transmitted are obtained, generates data to be transmitted Data length it is corresponding with each data to be transmitted section index mark;
Correspondingly, it is described that the multiple data to be transmitted section is added separately to presetting in the default multicast ip address Position will be with the addition of multiple default multicast ip address of data to be transmitted section as the source IP address of data to be transmitted bag, It specifically includes:
By the data length of the data to be transmitted, the multiple data to be transmitted section and corresponding index mark respectively Predeterminated position added in the default multicast ip address, and the data length, described that the data to be transmitted will be with the addition of The multiple default multicast ip address of data to be transmitted section and corresponding index mark are respectively as the source IP of data to be transmitted bag Location.
Further, processor 1001 can call the network data transmission program stored in memory 1005, also perform It operates below:
The first encryption key is obtained, the data to be transmitted bag is encrypted according to first encryption key.
Further, processor 1001 can call the network data transmission program stored in memory 1005, also perform It operates below:
The currently transmitted time is obtained, the second encryption key is generated according to the currently transmitted time, is added according to described second Predetermined encryption key is encrypted in key, obtains first encryption key.
The present embodiment said program, by being passed in source IP address that data to be transmitted is put into data to be transmitted bag It is defeated, reduce network data subpackage, reduce the transmission of unnecessary data packet, so as to accelerate the transmission of network data, carry The high efficiency of receiving device receiving network data.
Based on above-mentioned hardware configuration, a kind of network data sending method embodiment of the present invention is proposed.
With reference to Fig. 2, a kind of network data sending method first embodiment of the present invention is proposed.
In the present embodiment, the network data sending method comprises the following steps:
Step S10, sending device obtain default multicast ip address and data to be transmitted;
It will be appreciated that the present embodiment passes through User Datagram Protocol (User Datagram Protocol, abbreviation UDP) Multicast/multicast carries out the transmission of data, and the sending device is source host, can be smart mobile phone, desktop computer, notebook electricity Brain or tablet computer etc., the present embodiment is not any limitation as this.The scope of IP multicasts/multicast address is that 224.0.0.0 is arrived 239.255.255.255 the default multicast ip address, that is, address range is the IP of 224.0.0.0 to 239.255.255.255 Address, the data to be transmitted need the network data sent.
The data to be transmitted is added to the predeterminated position in the default multicast ip address, will be with the addition of by step S20 Source IP address of the default multicast ip address of data to be transmitted as data to be transmitted bag;
It should be understood that in Class D IP address form, four are 1110 before IP multicasts/multicast address, behind 28 for ground Location space, but only last 23 are mapped to IEEE MAC Address, therefore, have 32 IP multicasts/multicast address and are mapped to On same MAC Address, whether judge that a multicast/multicast address sees MAC Address is 01:00:5E, then can will be described to be transmitted Data are placed on the transmission of last 23 progress data in default multicast ip address, the predeterminated position, that is, default multicast IP Last 23 in address, usual network data is sent during transmission by data packet, is wrapped in data packet Header is included, header includes source address and destination address, for indicating the sending device address and the reception that send IP datagram text The receiving device address of IP packet.The default multicast ip address of data to be transmitted can will be then with the addition of as data to be transmitted bag Source IP address can send data to be transmitted without being further added by additional data packet.
Data to be transmitted bag is sent to receiving device by step S30, so that the receiving device is to the data to be transmitted The source IP address of bag is parsed, and obtains the data to be transmitted.
It should be noted that the receiving device is destination host, can be smart mobile phone, desktop computer, notebook electricity Brain or tablet computer etc., the present embodiment is not any limitation as this.To be with the addition of the default multicast ip address of data to be transmitted as The source IP address of data to be transmitted bag, then last 23 of the source IP address are that a part for source IP address is data again A part carrys out data cached transmission without other buffer register (buffer), the source IP address is parsed, can be obtained The data to be transmitted.
The present embodiment said program, by being passed in source IP address that data to be transmitted is put into data to be transmitted bag It is defeated, reduce network data subpackage, reduce the transmission of unnecessary data packet, so as to accelerate the transmission of network data, carry The high efficiency of receiving device receiving network data.
Further, as shown in figure 3, proposing that a kind of network data sending method second of the present invention is real based on first embodiment Apply example.
In the present embodiment, the step S20, specifically includes:
The data to be transmitted is segmented by step S201, obtains multiple data to be transmitted sections, will be the multiple to be passed Transmission of data section is added separately to the predeterminated position in the default multicast ip address, will be with the addition of the multiple pre- of data to be transmitted section If multicast ip address is respectively as the source IP address of data to be transmitted bag;
It will be appreciated that usually the data length of data to be transmitted, then cannot be in the transmission of a data packet more than 23 In completely send complete data to be transmitted, so, the data to be transmitted is usually subjected to segment transmissions, will be segmented what is obtained Multiple data to be transmitted sections are added separately to last 23 in the default multicast ip address, then have multiple data to be transmitted bags Source IP address.
In the present embodiment, the step S30, specifically includes:
Multiple data to be transmitted bags are sent to receiving device, so that the receiving device is to the multiple by step S301 The source IP address of data to be transmitted bag is parsed, and obtains multiple data to be transmitted sections, and the multiple data to be transmitted section is pressed Data recombination is carried out according to preset rules, obtains the data to be transmitted.
It should be understood that multiple data to be transmitted bags are sent to receiving device, the receiving device by sending device successively Source IP address in multiple data to be transmitted bags for receiving is parsed successively, the multiple transmission data segments obtained will be parsed Data recombination is carried out according to preset rules, usual UDP transmissions message is unordered, it is necessary to which unordered data recombination is complete into one Entire data can be indexed after sequence each transmission data segment using index mark and carry out data recombination, obtain described to be passed Transmission of data, it is described to be segmented the data to be transmitted in the present embodiment, it is described after obtaining multiple data to be transmitted sections Method further includes:The number of fragments of the data to be transmitted is obtained, generates the corresponding index mark of each data to be transmitted section;Accordingly Ground, the predeterminated position the multiple data to be transmitted section being added separately in the default multicast ip address, will add The multiple default multicast ip address of data to be transmitted section are specifically included respectively as the source IP address of data to be transmitted bag:It will The multiple data to be transmitted section and corresponding index mark are respectively added to the default position in the default multicast ip address It puts, and data to be transmitted section and the corresponding multiple default multicast ip address for indexing mark will be with the addition of as number to be transmitted According to the source IP address of bag.
It should be noted that IP multicast address has 28 bit address spaces, but only 23 are mapped to IEEE MAC Address, 32 IP multicast address are so had to be mapped on same MAC Address.So receiving device is needed to receive the number to be transmitted During according to bag, first determine whether before sending device MAC Address whether 24 be 01:00:5E only meets this and is only multicast address, Then the source MAC of sending device is obtained, the data to be transmitted Bao Douxu received every time later first judges whether from same End sends over, and is, receives remaining message.In the present embodiment, the data to be transmitted bag includes:Source MAC;Phase Ying Di, the step 301, specifically includes:Multiple data to be transmitted bags are sent to receiving device, so that the receiving device root Judge whether each data to be transmitted bag is that same sending device is sent according to the source MAC in each data to be transmitted bag, respectively treating When transmission packet sends for same sending device, each data to be transmitted bag is parsed, obtains multiple data to be transmitted sections, Data recombination is carried out according to preset rules to the multiple data to be transmitted section, obtains the data to be transmitted.
Divide how many sections to send a complete data to be transmitted it will be appreciated that sending device needs to send, led to It is often the data length for first obtaining data to be transmitted, the data length of data to be transmitted is sent to receiving device, so as to receives Whether equipment receives completely according to the data that the judgement of the data length of the data to be transmitted receives.It is described in the present embodiment The number of fragments of the data to be transmitted is obtained, the corresponding index mark of each data to be transmitted section is generated, specifically includes:Obtain institute State the data length of data to be transmitted and the number of fragments of the data to be transmitted, generate the data length of data to be transmitted with it is each The corresponding index mark of data to be transmitted section;Correspondingly, it is described the multiple data to be transmitted section is added separately to it is described pre- If the predeterminated position in multicast ip address, multiple default multicast ip address of data to be transmitted section will be with the addition of as to be passed The source IP address of transmission of data bag, specifically includes:By the data length of the data to be transmitted, the multiple data to be transmitted section and Corresponding index mark is respectively added to the predeterminated position in the default multicast ip address, and will be with the addition of described to be transmitted Multiple default multicast ip address of the data length of data, the data to be transmitted section and corresponding index mark are respectively as treating The source IP address of transmission packet.Correspondingly, the step 301, specifically includes:Multiple data to be transmitted bags are sent to reception Equipment so that the receiving device parses the source IP address of the multiple data to be transmitted bag, obtains described to be transmitted The data length of data, multiple data to be transmitted sections and corresponding index mark, according to the data length of the data to be transmitted Judge whether the data to be transmitted section receives completely, when the data to be transmitted section receives complete, to the multiple to be passed Transmission of data section carries out data recombination according to the index mark, obtains the data to be transmitted.
In the concrete realization, the verification of a partial data and (checksum) are also required to be sent to receiving device, then connect Receiving unit can be verified and calculated to UDP heads and UDP message, and is judged the verification calculated and sent with the sending device Verification with it is whether consistent, so as to check whether the data to be transmitted received correct.
It should be noted that the data to be transmitted bag is sent when sending after encryption, in order to ensure data Security, original Advanced Encryption Standard (Advanced Encryption Standard, abbreviation:AES) key is treated On the basis of transmission packet carries out symmetric cryptography, the secret key of AES is subjected to secondary encryption.In the present embodiment, it is described will be to be passed Transmission of data bag is sent to before receiving device, and the method further includes:The first encryption key is obtained, it is close according to the described first encryption The data to be transmitted bag is encrypted in key.First encryption key be by secondary encrypted AES secret key, in order into One step ensures the security of the first encryption key, and in the present embodiment, the first encryption key of the acquisition specifically includes:It obtains and works as Preceding sending time generates the second encryption key according to the currently transmitted time, is added according to second encryption key to default Key is encrypted, and obtains first encryption key.The predetermined encryption key, that is, original AES key.
It should be understood that generating a random number by the currently transmitted time is used as the second encryption key, because the time It is to change, the second encryption key generated using the time as unit adds security, can also a fixed value be taken to make certainly AES key is encrypted for the second encryption key, default AES encryption key is encrypted again, it is close to obtain first encryption Key is encrypted in plain text by first encryption key, improves security of the data to be transmitted bag in transmission process, institute Stating the second encryption key needs incidentally to be sent to receiving device in multicast ip address when sending, so that receiving device uses institute It states the second encryption key and obtains first encryption key, then by first encryption key to the encryption data to be transmitted Bag is decrypted, and obtains the data to be transmitted bag, receiving device is parsed to the data to be transmitted bag, described in acquisition Data to be transmitted.
In the concrete realization, it is necessary to define the data format of data to be transmitted, for example it may be defined as Length Value pattern (length-value, abbreviation LV pattern).Message format in data to be transmitted bag is defined as:Xx1 is the starting of current message Index, xx1 is incremental, represents the position of data, and xx2 and xx3 are data.Such as:Source IP address in transmission packet can To be 224.xx1.xx2.xx3, wherein, xx1, xx2, xx3 are both a part for a part for IP address and data, without Other buffer carrys out data cached transmission.Xx1 is identified according to index, it may be to know that parse the priority of the data to be transmitted section of acquisition Sequentially, xx2 and xx3 are parsed, obtains data to be transmitted section, can will parse the data to be transmitted section obtained according to index mark The order of knowledge carries out data recombination, obtains data to be transmitted.
The present embodiment said program by the way that the data to be transmitted is segmented, obtains multiple data to be transmitted sections, incites somebody to action The multiple data to be transmitted section is added separately to the predeterminated position in the default multicast ip address, will be with the addition of number to be transmitted According to multiple default multicast ip address of section respectively as the source IP address of data to be transmitted bag, multiple data to be transmitted bags are sent To receiving device, by being segmented longer data to be transmitted by being repeatedly sent completely, by source IP address by number to be transmitted According to being sent, reduce network data subpackage, reduce the transmission of unnecessary data packet, so as to accelerate network data It sends, improves the efficiency of receiving device receiving network data.
In addition, the embodiment of the present invention also proposes a kind of network data transmitting system, the system comprises:Receiving device and such as Sending device described above;
The receiving device parses for the source IP address to the data to be transmitted bag, obtains described to be transmitted Data.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium On be stored with network data transmission program, following operation is realized when the network data transmission program is executed by processor:
Sending device obtains default multicast ip address and data to be transmitted;
The data to be transmitted is added to the predeterminated position in the default multicast ip address, number to be transmitted will be with the addition of According to source IP address of the default multicast ip address as data to be transmitted bag;
Data to be transmitted bag is sent to receiving device, so that source IP of the receiving device to the data to be transmitted bag Address is parsed, and obtains the data to be transmitted.
Further, following operation is also realized when the network data transmission program is executed by processor:
The data to be transmitted is segmented, obtains multiple data to be transmitted sections, by the multiple data to be transmitted section The predeterminated position being added separately in the default multicast ip address will be with the addition of multiple default multicast IP of data to be transmitted section Address is respectively as the source IP address of data to be transmitted bag;
Correspondingly, it is described that data to be transmitted bag is sent to receiving device, so that the receiving device is to described to be transmitted The source IP address of data packet is parsed, and is obtained the data to be transmitted, is specifically included:
Multiple data to be transmitted bags are sent to receiving device, so that the receiving device is to the multiple data to be transmitted The source IP address of bag is parsed, and obtains multiple data to be transmitted sections, to the multiple data to be transmitted section according to preset rules Data recombination is carried out, obtains the data to be transmitted.
Further, following operation is also realized when the network data transmission program is executed by processor:
Multiple data to be transmitted bags are sent to receiving device, so that the receiving device is according in each data to be transmitted bag Source MAC judge whether each data to be transmitted bag is that same sending device is sent, be same hair in each data to be transmitted bag When sending the equipment to send, each data to be transmitted bag is parsed, obtains multiple data to be transmitted sections, to the multiple number to be transmitted Data recombination is carried out according to preset rules according to section, obtains the data to be transmitted.
Further, following operation is also realized when the network data transmission program is executed by processor:
The number of fragments of the data to be transmitted is obtained, generates the corresponding index mark of each data to be transmitted section;
Correspondingly, it is described that the multiple data to be transmitted section is added separately to presetting in the default multicast ip address Position will be with the addition of multiple default multicast ip address of data to be transmitted section as the source IP address of data to be transmitted bag, It specifically includes:
The multiple data to be transmitted section and corresponding index mark are respectively added to the default multicast ip address In predeterminated position, and will be with the addition of data to be transmitted section and it is corresponding index mark multiple default multicast ip address make respectively For the source IP address of data to be transmitted bag.
Further, following operation is also realized when the network data transmission program is executed by processor:
The data length of the data to be transmitted and the number of fragments of the data to be transmitted are obtained, generates data to be transmitted Data length it is corresponding with each data to be transmitted section index mark;
Correspondingly, it is described that the multiple data to be transmitted section is added separately to presetting in the default multicast ip address Position will be with the addition of multiple default multicast ip address of data to be transmitted section as the source IP address of data to be transmitted bag, It specifically includes:
By the data length of the data to be transmitted, the multiple data to be transmitted section and corresponding index mark respectively Predeterminated position added in the default multicast ip address, and the data length, described that the data to be transmitted will be with the addition of The multiple default multicast ip address of data to be transmitted section and corresponding index mark are respectively as the source IP of data to be transmitted bag Location.
Further, following operation is also realized when the network data transmission program is executed by processor:
The first encryption key is obtained, the data to be transmitted bag is encrypted according to first encryption key.
Further, following operation is also realized when the network data transmission program is executed by processor:
The currently transmitted time is obtained, the second encryption key is generated according to the currently transmitted time, is added according to described second Predetermined encryption key is encrypted in key, obtains first encryption key.
The present embodiment said program, by being passed in source IP address that data to be transmitted is put into data to be transmitted bag It is defeated, reduce network data subpackage, reduce the transmission of unnecessary data packet, so as to accelerate the transmission of network data, carry The high efficiency of receiving device receiving network data.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or system including a series of elements not only include those elements, and And it further includes other elements that are not explicitly listed or further includes as this process, method, article or system institute inherently Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this Also there are other identical elements in the process of element, method, article or system.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Herein, the use of word first, second, and third does not indicate that any order.It can be by these word solutions It is interpreted as title.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme substantially in other words does the prior art Going out the part of contribution can be embodied in the form of software product, which, which is stored in, is stored as above medium In (such as ROM/RAM, magnetic disc, CD), used including some instructions so that a station terminal equipment (can be mobile phone, computer takes Be engaged in device, air conditioner or the network equipment etc.) perform method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow shift that bright specification and attached drawing information are made directly or indirectly is used in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of network data sending method, which is characterized in that the described method comprises the following steps:
Sending device obtains default multicast ip address and data to be transmitted;
The data to be transmitted is added to the predeterminated position in the default multicast ip address, data to be transmitted will be with the addition of Default source IP address of the multicast ip address as data to be transmitted bag;
Data to be transmitted bag is sent to receiving device, so that source IP address of the receiving device to the data to be transmitted bag It is parsed, obtains the data to be transmitted.
2. network data sending method as described in claim 1, which is characterized in that described to be added to the data to be transmitted Predeterminated position in the default multicast ip address will be with the addition of the default multicast ip address of data to be transmitted as number to be transmitted According to the source IP address of bag, specifically include:
The data to be transmitted is segmented, obtains multiple data to be transmitted sections, the multiple data to be transmitted section is distinguished Predeterminated position added in the default multicast ip address will be with the addition of multiple default multicast ip address of data to be transmitted section Respectively as the source IP address of data to be transmitted bag;
Correspondingly, it is described that data to be transmitted bag is sent to receiving device, so that the receiving device is to the data to be transmitted The source IP address of bag is parsed, and is obtained the data to be transmitted, is specifically included:
Multiple data to be transmitted bags are sent to receiving device, so that the receiving device is to the multiple data to be transmitted bag Source IP address is parsed, and obtains multiple data to be transmitted sections, and the multiple data to be transmitted section is carried out according to preset rules Data recombination obtains the data to be transmitted.
3. network data sending method as claimed in claim 2, which is characterized in that the data to be transmitted bag includes:Source MAC Address;
Correspondingly, it is described that multiple data to be transmitted bags are sent to receiving device, so that the receiving device is treated to the multiple The source IP address of transmission packet is parsed, and obtains multiple data to be transmitted sections, to the multiple data to be transmitted section according to Preset rules carry out data recombination, obtain the data to be transmitted, specifically include:
Multiple data to be transmitted bags are sent to receiving device, so that source of the receiving device in each data to be transmitted bag MAC Address judges whether each data to be transmitted bag is that same sending device is sent, and is set in each data to be transmitted bag for same transmission When preparation is sent, each data to be transmitted bag is parsed, obtains multiple data to be transmitted sections, to the multiple data to be transmitted section Data recombination is carried out according to preset rules, obtains the data to be transmitted.
4. network data sending method as claimed in claim 2, which is characterized in that described to be divided the data to be transmitted Section, after obtaining multiple data to be transmitted sections, the method further includes:
The number of fragments of the data to be transmitted is obtained, generates the corresponding index mark of each data to be transmitted section;
Correspondingly, the default position the multiple data to be transmitted section being added separately in the default multicast ip address It puts, multiple default multicast ip address of data to be transmitted section will be with the addition of as the source IP address of data to be transmitted bag, tool Body includes:
The multiple data to be transmitted section and corresponding index mark are respectively added in the default multicast ip address Predeterminated position, and multiple default multicast ip address of data to be transmitted section and corresponding index mark will be with the addition of as treating The source IP address of transmission packet.
5. network data sending method as claimed in claim 4, which is characterized in that point for obtaining the data to be transmitted Segment number generates the corresponding index mark of each data to be transmitted section, specifically includes:
The data length of the data to be transmitted and the number of fragments of the data to be transmitted are obtained, generates the number of data to be transmitted According to length index mark corresponding with each data to be transmitted section;
Correspondingly, the default position the multiple data to be transmitted section being added separately in the default multicast ip address It puts, multiple default multicast ip address of data to be transmitted section will be with the addition of as the source IP address of data to be transmitted bag, tool Body includes:
The data length of the data to be transmitted, the multiple data to be transmitted section and corresponding index mark are respectively added To the predeterminated position in the default multicast ip address, and the data length, described to be passed that the data to be transmitted will be with the addition of Multiple default multicast ip address of transmission of data section and corresponding index mark are respectively as the source IP address of data to be transmitted bag.
6. the network data sending method as described in any one of claim 1 to 5, which is characterized in that described by number to be transmitted Before being sent to receiving device according to bag, the method further includes:
The first encryption key is obtained, the data to be transmitted bag is encrypted according to first encryption key.
7. network data sending method as claimed in claim 6, which is characterized in that the first encryption key of the acquisition, specifically Including:
The currently transmitted time is obtained, the second encryption key is generated according to the currently transmitted time, it is close according to the described second encryption Predetermined encryption key is encrypted in key, obtains first encryption key.
8. a kind of sending device, which is characterized in that the sending device includes:Memory, processor and it is stored in the storage On device and the network data transmission program that can run on the processor, the network data transmission program be arranged for carrying out as The step of network data sending method any one of claim 1 to 7.
9. a kind of network data transmitting system, which is characterized in that the system comprises:Receiving device and as claimed in claim 8 Sending device;
The receiving device parses for the source IP address to the data to be transmitted bag, obtains the data to be transmitted.
10. a kind of computer readable storage medium, which is characterized in that network number is stored on the computer readable storage medium According to transmission program, realized when the network data transmission program is executed by processor as any one of claim 1 to 7 The step of network data sending method.
CN201710991101.3A 2017-10-20 2017-10-20 Network data transmission method, system, transmission device and storage medium Active CN108055360B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710991101.3A CN108055360B (en) 2017-10-20 2017-10-20 Network data transmission method, system, transmission device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710991101.3A CN108055360B (en) 2017-10-20 2017-10-20 Network data transmission method, system, transmission device and storage medium

Publications (2)

Publication Number Publication Date
CN108055360A true CN108055360A (en) 2018-05-18
CN108055360B CN108055360B (en) 2021-08-17

Family

ID=62119520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710991101.3A Active CN108055360B (en) 2017-10-20 2017-10-20 Network data transmission method, system, transmission device and storage medium

Country Status (1)

Country Link
CN (1) CN108055360B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438187A (en) * 2021-06-23 2021-09-24 广州极飞科技股份有限公司 Data transmission method, device, transmission equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060106939A1 (en) * 2004-11-02 2006-05-18 Samsung Electronics Co., Ltd. Method and system for transmitting and receiving data using multicasting
CN104065765A (en) * 2014-07-09 2014-09-24 杭州古北电子科技有限公司 WIFI data transmitting method and system and related method thereof
CN104853447A (en) * 2015-04-30 2015-08-19 北京奇艺世纪科技有限公司 Method and device for processing data information
CN106254118A (en) * 2016-08-10 2016-12-21 邦奇智能科技(上海)股份有限公司 A kind of WiFi equipment fast control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060106939A1 (en) * 2004-11-02 2006-05-18 Samsung Electronics Co., Ltd. Method and system for transmitting and receiving data using multicasting
CN104065765A (en) * 2014-07-09 2014-09-24 杭州古北电子科技有限公司 WIFI data transmitting method and system and related method thereof
CN104853447A (en) * 2015-04-30 2015-08-19 北京奇艺世纪科技有限公司 Method and device for processing data information
CN106254118A (en) * 2016-08-10 2016-12-21 邦奇智能科技(上海)股份有限公司 A kind of WiFi equipment fast control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438187A (en) * 2021-06-23 2021-09-24 广州极飞科技股份有限公司 Data transmission method, device, transmission equipment and readable storage medium
CN113438187B (en) * 2021-06-23 2022-12-27 广州极飞科技股份有限公司 Data transmission method, device, transmission equipment and readable storage medium

Also Published As

Publication number Publication date
CN108055360B (en) 2021-08-17

Similar Documents

Publication Publication Date Title
CN113411313B (en) Data transmission method, device and system
CN101854590B (en) Method and apparatus for header compression in a wireless communication system
CN101835198B (en) Method and apparatus for frame transport in wireless communication system
CN103250390B (en) For the method and apparatus providing object-based host-host protocol
CN107750058A (en) Method, control terminal and the system of equipment access network based on wifi Beacon frames
CN103547342B (en) Message method, message read notification method, message receival method and device
CN107787025A (en) Method, control terminal and the system of equipment access network
CN103765848A (en) Apparatus and methods for media access control replacement
CN108270687B (en) Load balancing processing method and device
CN112003937B (en) Satellite data transmission method, device, computer equipment and storage medium
EP2919498B1 (en) Method, device and system for packet processing through a relay
CN104703126B (en) Wireless network broadcast information transmission system and its method based on iBeacon
CN107181971A (en) The upgrade method and relevant device of a kind of IPTV terminal
CN105119900A (en) Information secure transmission method, network access method and corresponding terminals
WO2017148419A1 (en) Data transmission method and server
CN107294913A (en) Safety communicating method, service end and client based on HTTP
CN105120454B (en) Information transferring method, networking cut-in method and corresponding terminal
CN109889312A (en) Multilink data transmission method, device and computer readable storage medium
CN107820246A (en) The methods, devices and systems of user authentication
CN113259989B (en) Data retransmission method and device and electronic equipment
CN108809549B (en) Data transmission method and equipment
CN104853447B (en) A kind of data information processing method and device
CN108055360A (en) Network data sending method, system, sending device and storage medium
CN108429700A (en) A kind of method and device sending message
CN110417804A (en) A kind of bidirectional identity authentication encryption communication method and system suitable for chip microcontroller

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
GR01 Patent grant
GR01 Patent grant