CN104954443B - Data transmission method and system in LAN - Google Patents

Data transmission method and system in LAN Download PDF

Info

Publication number
CN104954443B
CN104954443B CN201510274328.7A CN201510274328A CN104954443B CN 104954443 B CN104954443 B CN 104954443B CN 201510274328 A CN201510274328 A CN 201510274328A CN 104954443 B CN104954443 B CN 104954443B
Authority
CN
China
Prior art keywords
data
transmitted
key
value pair
received
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.)
Active
Application number
CN201510274328.7A
Other languages
Chinese (zh)
Other versions
CN104954443A (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.)
Shanghai Moruan Communication Technology Co Ltd
Original Assignee
Shanghai Moruan Communication 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 Shanghai Moruan Communication Technology Co Ltd filed Critical Shanghai Moruan Communication Technology Co Ltd
Priority to CN201510274328.7A priority Critical patent/CN104954443B/en
Publication of CN104954443A publication Critical patent/CN104954443A/en
Application granted granted Critical
Publication of CN104954443B publication Critical patent/CN104954443B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The invention discloses data transmission method and system in a kind of LAN, wherein method includes:In transmitting terminal, the first data are determined, first data include key-value pair, and first data are corresponding with data to be transmitted, and the data to be transmitted includes the data of serializability;First data and the data to be transmitted are serialized using Java technology;The first data after serializing and the data to be transmitted after serializing are transmitted to receiving terminal successively.The present invention compensates in existing LAN data and is difficult to extend in transmission and nested deficiency, have many advantages, such as to be easy to extend with it is nested.

Description

Data transmission method and system in LAN
Technical field
The present invention relates to data transmission method and systems in network data transmission more particularly to a kind of LAN.
Background technology
With the fast development of mechanics of communication, the type and quantity of mobile terminal rapidly increase at present, a kind of Wi-Fi (nothings Line network communication technology), Wi-Fi Direct (a kind of wireless network communication technique) and BT a kind of (file in a peer-to-peer network point The procotol program enjoyed) be mobile terminal standard configuration.
A kind of Java (object-oriented programmings are often used in the LAN built by above-mentioned network communication technology Language) carry out data transmission as application development language, wherein again the most with the use of JSON (data interchange format) a kind of Generally.But due to the programming feature of JSON itself and cannot the nested characteristic of itself, if technical staff wants to use JSON Come realize the extension of transmission data with it is nested be it is sufficiently complex, this writes work and data transmission to the code of technical staff Realization brings prodigious difficulty.
Invention content
The technical problem to be solved by the present invention is in order to overcome in existing LAN data be difficult to extend in transmission with it is embedding The defect of set, provide it is a kind of be easy to extension and data transmission method and system in nested LAN.
The present invention is to solve above-mentioned technical problem by the following technical programs:
Data transmission method in a kind of LAN of present invention offer, its main feature is that, including:In transmitting terminal,
Determine the first data, first data include key-value pair, and first data are corresponding with data to be transmitted, institute State the data that data to be transmitted includes serializability;
First data and the data to be transmitted are serialized using Java technology;
The first data after serializing and the data to be transmitted after serializing are transmitted to receiving terminal successively.
Wherein, the determination of the first data can be write according to the actual conditions of data to be transmitted by technical staff or Person is obtained by other means;The key-value pair that first data include can be one or more, and user can be according to itself It needs to increase, delete, change or find key value pair, have well from suitability and scalability;It is described to serialize successively The first data afterwards and the data to be transmitted after serializing are transmitted to receiving terminal and refer to first passing the first data after serializing It transports to receiving terminal and the data to be transmitted after serializing is transmitted to receiving terminal again.The present invention using first data from suitability and Scalability so that technical staff can easily realize the extensions of data with it is nested, can also especially realize the embedding of data itself Set, and the present invention also has simple and flexible, it is easy to accomplish the advantages of.
Preferably, the data of the serializability include the Java object of serializability and/or the file of serializability.
Preferably, first data correspond to one or more data to be transmitted.I.e. each data to be transmitted can be distinguished Corresponding first data, can also multiple data to be transmitted while corresponding first data.
Preferably, the key-value pair that first data include includes one or more of the following contents:Data to be transmitted Title, the byte number of data to be transmitted or the class name of data to be transmitted.
Preferably, further including:In the receiving terminal,
From the first extracting data key-value pair received;
Using the key-value pair of extraction, the data received are handled.
Receiving terminal can be known after receiving the first data and before receiving data to be transmitted in the technical program Which kind of processing is carried out to the data next received, being equivalent to receiving terminal can predict before really receiving data Information of the part about the data that will be received, this mode substantially increase the treatment effeciency of receiving terminal.
Preferably, the key-value pair using extraction, carrying out processing to the data received includes:
If the key-value pair of extraction includes the title of data to be transmitted, data, and the number created are created in receiving terminal According to the entitled data to be transmitted title;
And/or if the key-value pair of extraction includes the class name of data to be transmitted, the data received are preserved at described The data of class name.
Preferably, further including:In the receiving terminal,
From the first extracting data key-value pair received;
According to the key-value pair of extraction, the data received are checked.
Receiving terminal can after receiving the data carry out the data received using the first data in the technical program Verification, ensure that the accuracy of data transmission.
Preferably, the key-value pair according to extraction, carrying out verification to the data received includes:
If the key-value pair of the data fit extraction received, by the data unserializing received and stores, if receiving To data do not meet the key-value pair of extraction, then notify the transmitting terminal to transmit the data to be transmitted again.
Receiving terminal in the technical program can judge whether the data received are correct by the key-value pair extracted, prevent The leakage for having stopped data passes and misinformation, further ensures the accuracy of data transmission.
The present invention also provides data transmission systems in a kind of LAN, its main feature is that, including transmitting terminal and receiving terminal, it is described Transmitting terminal includes:
Determination unit, for determining the first data, first data include key-value pair, first data with it is to be transmitted Data are corresponding, and the data to be transmitted includes the data of serializability;
Serialization unit, for serializing first data and the data to be transmitted using Java technology;
Transmission unit, for the first data after serializing and the data to be transmitted after serializing to be transmitted to reception successively End.
Preferably, the receiving terminal includes:
First extraction unit, for from the first extracting data key-value pair received;
Processing unit is handled the data received for the key-value pair using extraction.
Preferably, the processing unit includes:
First judging unit, for creating number in receiving terminal when the key-value pair of extraction includes the title of data to be transmitted According to, and the title of the entitled data to be transmitted of the data created;
And/or second judgment unit, for that will be received when the key-value pair of extraction includes the class name of data to be transmitted Data preserve at the class name data.
Preferably, the receiving terminal further includes:
Second extraction unit, for from the first extracting data key-value pair received;
Unit is checked, for the key-value pair according to extraction, the data received are checked.
Preferably, the verification unit includes:
Third judging unit, if the key-value pair of the data fit extraction for receiving, the data inverted sequence that will be received Rowization simultaneously store, if the data received do not meet the key-value pair of extraction, it is described to be passed to notify that the transmitting terminal transmits again Transmission of data.
On the basis of common knowledge of the art, above-mentioned each optimum condition can be combined arbitrarily to get each preferable reality of the present invention Example.
The positive effect of the present invention is:The present invention is using first data from suitability and scalability so that technology Personnel can easily realize the extensions of data with it is nested, can also especially realize the nesting of data itself, meanwhile, through the invention It can also reach and improve receiving terminal to the treatment effeciency of data that receives and prevent data leakage from passing and the advantageous effects such as misinformation. In addition, the present invention also has simple and flexible, it is easy to accomplish the advantages of.
Description of the drawings
Fig. 1 be the embodiment of the present invention 1 LAN in data transmission method flow chart.
Fig. 2 be the embodiment of the present invention 2 LAN in data transmission method flow chart.
Fig. 3 be the embodiment of the present invention 3 LAN in data transmission method flow chart.
Fig. 4 be the embodiment of the present invention 4 LAN in data transmission system system schematic.
Fig. 5 be the embodiment of the present invention 5 LAN in data transmission system system schematic.
Fig. 6 be the embodiment of the present invention 6 LAN in data transmission system system schematic.
Specific implementation mode
It is further illustrated the present invention below by the mode of embodiment, but does not therefore limit the present invention to the reality It applies among a range.
Embodiment 1
Referring to Fig. 1, data transmission method in a kind of LAN, including:Following steps are executed in transmitting terminal:
Step 101 determines the first data.First data include key-value pair, first data and data to be transmitted Corresponding, the data to be transmitted includes the data of serializability.
Step 102 serializes first data and the data to be transmitted using Java technology.
Step 103, successively by after serializing the first data and serializing after data to be transmitted be transmitted to receiving terminal. That is, the data to be transmitted after serializing is first transmitted to receiving terminal by the first data transmission after serializing to receiving terminal again.
Wherein, receiving terminal and transmitting terminal form LAN by network connection, and the network connection can include but not Limit and following three kinds of modes:Wi-Fi, Wi-Fi Direct and BT;The data of the serializability may include serializability The file of Java object and/or serializability;The determination of first data can be by technical staff according to the reality of data to be transmitted What situation was write is either obtained by other means, and first data correspond to one or more numbers to be transmitted According to;The key-value pair that first data include can be one or more, can specifically include one or more of the following contents: The class name of the title of data to be transmitted, the byte number of data to be transmitted or data to be transmitted, user can also be according to their needs Increase, delete, change or find key value pair.
Illustrate that the attainable advantageous effect of the present embodiment institute, code one are to use JSON books by taking following codes as an example below It is to have nested code using what the present embodiment was write that writes, which has nested code, code two,.
Code one:
Code two:
Then corresponding class and assignment are defined.
It is sufficiently complex not readable that one nested data of code is can be seen that by the comparison of code one and code two, and it is same Data using the present embodiment realize, using first data from suitability and scalability, technical staff can be light Realize the extension of data and nested, very simple and flexible, it is easy to accomplish.
Embodiment 2
The present embodiment is further illustrated on the basis of embodiment 1, wherein the number to be transmitted in the present embodiment According to the Java object for including a serializability.Referring to Fig. 2, data transmission method includes in the LAN of the present embodiment:
Following steps are executed in transmitting terminal:
Step 201 determines the first data.First data are corresponding with Java object to be transmitted, and include multiple Key-value pair.In the present embodiment, first data are set in such a way that technical staff writes and specifically include three key-value pairs (key-value), the title of Java object respectively to be transmitted, the byte number of Java object to be transmitted and to be transmitted The class name of Java object.
Step 202 serializes first data and the Java object to be transmitted using Java technology.Wherein adopt The process serialized with Java technology can be realized using the prior art, and details are not described herein.
The first data after serializing and the Java object to be transmitted after serializing are transmitted to and are connect successively by step 203 Receiving end.
And execute following steps in the receiving terminal:
Step 204, from the first extracting data key-value pair received.
Step 205, the key-value pair using extraction, handle the Java object received.Wherein, step 205 can be with Specifically include following steps:
If the key-value pair of extraction includes the title of Java object to be transmitted, Java object is created in receiving terminal, and And the title of the entitled Java object to be transmitted of the Java object created;
If extraction key-value pair include Java object to be transmitted class name, by the Java object received preservation at The Java object of the class name.
Before step 205 enables receiving terminal after receiving the first data and receives data to be transmitted, know Which kind of processing is carried out to the data next received, being equivalent to receiving terminal can predict before really receiving data Information of the part about the data that will be received, substantially increases the treatment effeciency of receiving terminal.
Step 206, the key-value pair according to extraction, check the Java object received.Wherein, step 206 can be with Specifically include following steps:
If the Java object received meets the key-value pair of extraction, by the Java object unserializing received and deposit Storage, if the Java object received does not meet the key-value pair of extraction, it is described to be transmitted to notify that the transmitting terminal transmits again Java object.For example, judging whether the byte number of the Java object received is equal to Java object in the first data received Byte number illustrate to receive correct if being equal to, receive end of data, if being not equal to, illustrate to be likely to occur leakage in receiving and pass or accidentally It passes, then the transmitting terminal is notified to transmit the Java object to be transmitted again.For another example judging the Java object received Whether class name is that the class name of Java object in the first data received illustrates to receive correct if identical, then will receive Java object unserializing simultaneously stores, if it is different, illustrating to receive mistake, then it is described to be transmitted to notify that the transmitting terminal transmits again Java object.
Step 206 enables receiving terminal after receiving the data, is carried out to the data received using the first data Verification, ensure that the accuracy of data transmission, it is therefore prevented that the leakage of data passes and misinformation, ensure that the accuracy of data transmission.
Embodiment 3
The present embodiment is further illustrated on the basis of embodiment 1, wherein the number to be transmitted in the present embodiment According to the file for two serializabilities, respectively a picture file and an audio file.Referring to Fig. 3, the office of the present embodiment Data transmission method includes in the net of domain:
Following steps are executed in transmitting terminal:
Step 301 determines the first data.The file of two serializabilities to be transmitted is opposite with first data It answers, first data include multiple key-value pairs.In the present embodiment, first number is set in such a way that technical staff writes According to six key-value pairs (key-value) are specifically included, referring to table 1:
Table 1
key value
The title of picture file to be transmitted Photo
The byte number of picture file to be transmitted 0.5M
The type of picture file to be transmitted jpg
The title of audio file to be transmitted Song
The byte number of audio file to be transmitted 4.5M
The type of audio file to be transmitted mp3
First data and the picture file to be transmitted and audio file are used Java technology sequence by step 302 Rowization.The process of Java technology serializing is wherein used to can be realized using the prior art, details are not described herein.
Step 303, successively by after serializing the first data and serializing after picture file to be transmitted and audio text Part is transmitted to receiving terminal.
And execute following steps in the receiving terminal:
Step 304, from the first extracting data key-value pair received.
Step 305, the key-value pair using extraction, handle the file received.Wherein, step 305 can be specific Include the following steps:
If the key-value pair of extraction includes the title of picture file and audio file to be transmitted, creates and scheme in receiving terminal Piece file, and the picture file created is entitled:The title for the picture file to be transmitted that the key-value pair of extraction includes, And audio file is created in receiving terminal, and the audio file created is entitled:The key-value pair of extraction includes to be passed The title of defeated audio file, by taking table 1 as an example, in the entitled photo for the picture file that receiving terminal creates, the audio text of establishment The entitled song of part;
And/or it if the key-value pair of extraction includes the class name of picture file and audio file to be transmitted, will receive Picture file and audio file preserve the file at the class name and corresponding program called to open, by taking table 1 as an example, receiving terminal Photo Browser can be called to open picture automatically, audio player is called to open audio.
Before step 305 enables receiving terminal after receiving the first data and receives data to be transmitted, know Which kind of processing is carried out to the data next received, being equivalent to receiving terminal can predict before really receiving data Information of the part about the data that will be received, substantially increases the treatment effeciency of receiving terminal.
Step 306, the key-value pair according to extraction, check the file received.Wherein, step 306 can be specific Include the following steps:
If the file received meets the key-value pair of extraction, by the file unserializing received and store, if receiving To file do not meet the key-value pair of extraction, then notify the transmitting terminal to transmit file again.For example, judging the picture received Whether the byte number of file is equal to the byte number of the picture file to be transmitted in the first data, if being equal to, illustrates to receive correctly, End of data is received, if being not equal to, illustrates that being likely to occur leakage in receiving passes or misinformate, then notifies the transmitting terminal transmits again to wait for The picture file of transmission illustrates to receive correctly, if not 0.5M by taking table 1 as an example if the picture file received is 0.5M Transmitting terminal is notified to retransmit picture file.For another example judge the class name of audio file received be in the first data The class name of audio file to be transmitted is identical, if identical, illustrates to receive correctly, then simultaneously by the audio file unserializing received Storage then notifies the transmitting terminal to transmit audio file to be transmitted again, or be with table 1 if it is different, illustrating to receive mistake Example illustrates to receive correctly if the audio file received is mp3, if otherwise notice transmitting terminal retransmits audio file.
Step 306 enables receiving terminal after receiving the data, is carried out to the data received using the first data Verification, ensure that the accuracy of data transmission, it is therefore prevented that the leakage of data passes and misinformation, ensure that the accuracy of data transmission.
Embodiment 4
Referring to Fig. 4, data transmission system in a kind of LAN, including transmitting terminal 41 and receiving terminal 42.
The transmitting terminal 41 includes:
Determination unit 411, for determining the first data.First data include key-value pair, first data with wait for Transmission data is corresponding, and the data to be transmitted includes the data of serializability.
Serialization unit 412, for serializing first data and the data to be transmitted using Java technology.
Transmission unit 413, for being successively transmitted to the first data after serializing and the data to be transmitted after serializing Receiving terminal.It is connect that is, first the data to be transmitted after serializing to be transmitted to the first data transmission after serializing to receiving terminal again Receiving end.
Wherein, receiving terminal 42 and transmitting terminal 41 form LAN by network connection, and the network connection can include But unlimited and following three kinds of modes:Wi-Fi, Wi-Fi Direct and BT;The data of the serializability may include can sequence The Java object of change and/or the file of serializability;The determination of first data can be by technical staff according to data to be transmitted What actual conditions were write is either obtained by other means, and first data correspondence is one or more to be transmitted Data;The key-value pair that first data include can be one or more, can specifically include one kind or several in the following contents Kind:The class name of the title of data to be transmitted, the byte number of data to be transmitted or data to be transmitted, user can also be according to itself need Increase, delete, change or find key value pair.
In the LAN of the present embodiment data transmission system using first data from suitability and scalability, skill Art personnel can easily realize the extensions of data and nested, very simple and flexible, it is easy to accomplish.
Embodiment 5
The present embodiment is further illustrated on the basis of embodiment 4, wherein the number to be transmitted in the present embodiment According to the Java object for including a serializability.Referring to Fig. 5, data transmission system includes transmitting terminal in the LAN of the present embodiment 51 and receiving terminal 52.
The transmitting terminal 51 includes:
Determination unit 511, for determining the first data.First data are corresponding with Java object to be transmitted, and Including multiple key-value pairs.In the present embodiment, first data are set in such a way that technical staff writes and specifically include three Key-value pair (key-value), the title of Java object respectively to be transmitted, the byte number of Java object to be transmitted and to be passed The class name of defeated Java object.
Serialization unit 512, for first data and the Java object to be transmitted to be used Java technology sequence Rowization.The process of Java technology serializing is wherein used to can be realized using the prior art, details are not described herein.
Transmission unit 513, for successively by the first data after serializing and the Java object to be transmitted after serializing It is transmitted to receiving terminal.
The receiving terminal 52 includes:
First extraction unit 521, for from the first extracting data key-value pair received.
Processing unit 522 is handled the Java object received for the key-value pair using extraction.Wherein, described Processing unit 522 includes:
First judging unit 5221, for being connect when the key-value pair of extraction includes the title of Java object to be transmitted Receiving end creates Java object, and the Java object created is entitled:The Java to be transmitted that the key-value pair of extraction includes The title of object;
And/or second judgment unit 5222, for including the class name of Java object to be transmitted in the key-value pair of extraction When, the Java object received is preserved into the Java object at the class name.
The processing unit 522 enable receiving terminal after receiving the first data and receive data to be transmitted it Before, know to the data next received carry out which kind of processing, be equivalent to receiving terminal really receive data before just It anticipated that information of the part about the data that will be received, substantially increase the treatment effeciency of receiving terminal.
Unit 523 is checked, for the key-value pair according to extraction, the Java object received is checked.Wherein, described Checking unit 523 includes:
Third judging unit 5231, if the Java object for receiving meets the key-value pair of extraction, by what is received Java object unserializing simultaneously stores, if the Java object received does not meet the key-value pair of extraction, notifies the transmitting terminal Again the Java object to be transmitted is transmitted.It is received for example, judging whether the byte number of the Java object received is equal to The first data in the byte number of Java object illustrate to receive correct if being equal to, receive end of data, if being not equal to, explanation connects It is likely to occur leakage in receipts to pass or misinformate, then the transmitting terminal is notified to transmit the Java object to be transmitted again.For another example sentencing The class name for the Java object that disconnecting receives whether be Java object in the first data received class name, if identical, explanation connects It receives correct, then by the Java object unserializing received and stores, if it is different, illustrating to receive mistake, then notify the transmission Again the Java object to be transmitted is transmitted in end.
The verification unit 523 enables receiving terminal after receiving the data, using the first data to receiving Data are checked, and ensure that the accuracy of data transmission, it is therefore prevented that the leakage of data passes and misinformation, ensure that the standard of data transmission True property.
Embodiment 6
The present embodiment is further illustrated on the basis of embodiment 4, wherein the number to be transmitted in the present embodiment According to the file for two serializabilities, respectively a picture file and an audio file.Referring to Fig. 3, the office of the present embodiment Data transmission method system includes transmitting terminal 61 and receiving terminal 62 in the net of domain.
The transmitting terminal 61 includes:
Determination unit 611, for determining the first data.The file of two serializabilities to be transmitted is counted with described first According to corresponding, first data include multiple key-value pairs.In the present embodiment, set in such a way that technical staff writes described First data specifically include six key-value pairs (key-value), referring to table 2:
Table 2
key value
The title of picture file to be transmitted Photo
The byte number of picture file to be transmitted 0.5M
The type of picture file to be transmitted jpg
The title of audio file to be transmitted Song
The byte number of audio file to be transmitted 4.5M
The type of audio file to be transmitted mp3
Serialization unit 612, for using first data and the picture file to be transmitted and audio file Java technology serializes.The process of Java technology serializing is wherein used to can be realized using the prior art, details are not described herein.
Transmission unit 613, for successively by the first data after serializing and the picture file to be transmitted after serializing With audio file transmissions to receiving terminal.
The receiving terminal 62 includes:
First extraction unit 621, for from the first extracting data key-value pair received.
Processing unit 622 is handled the file received for the key-value pair using extraction.Wherein, the processing Unit 622 includes:
First judging unit 6221 includes picture file and audio file to be transmitted for the key-value pair in extraction Picture file is created in receiving terminal when title, and the picture file created is entitled:What the key-value pair of extraction included waits for The title of the picture file of transmission, and audio file is created in receiving terminal, and the audio file created is entitled:Extraction The key-value pair audio file to be transmitted that includes title, by taking table 2 as an example, in the title for the picture file that receiving terminal creates For photo, the entitled song of the audio file of establishment;
And/or second judgment unit 6222, include picture file to be transmitted and audio for the key-value pair in extraction When the class name of file, the picture file received and audio file are preserved into the file at the class name and call corresponding program It opens, by taking table 1 as an example, receiving terminal can call Photo Browser to open picture automatically, and audio player is called to open audio.
The processing unit 622 enable receiving terminal after receiving the first data and receive data to be transmitted it Before, know to the data next received carry out which kind of processing, be equivalent to receiving terminal really receive data before just It anticipated that information of the part about the data that will be received, substantially increase the treatment effeciency of receiving terminal.
Unit 623 is checked, for the key-value pair according to extraction, the file received is checked.Wherein, the verification Unit 623 includes:
Third judging unit 6231, if the file for receiving meets the key-value pair of extraction, the file that will be received Unserializing simultaneously stores, if the file received does not meet the key-value pair of extraction, the transmitting terminal is notified to transmit file again. For example, judging whether the byte number of the picture file received is equal to the byte of the picture file to be transmitted in the first data Number illustrates to receive correctly, receives end of data if being equal to, if being not equal to, illustrates that leakage is likely to occur in receiving to be passed or misinformate, then It notifies the transmitting terminal to transmit picture file to be transmitted again, by taking table 2 as an example, is said if the picture file received is 0.5M It is bright to receive correctly, if not 0.5M then notifies transmitting terminal to retransmit picture file.For another example judging the audio file received Class name be identical as the class name of audio file to be transmitted in the first data, if identical, illustrate to receive correct, then will receive To audio file unserializing and store, if it is different, illustrate receive mistake, then it is to be transmitted to notify that the transmitting terminal transmits again Audio file, or by taking table 2 as an example, illustrate to receive if the audio file received is mp3 it is correct, if otherwise notice is sent End retransmits audio file.
The verification unit 623 enables receiving terminal after receiving the data, using the first data to receiving Data are checked, and ensure that the accuracy of data transmission, it is therefore prevented that the leakage of data passes and misinformation, ensure that the standard of data transmission True property.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that these It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back Under the premise of from the principle and substance of the present invention, many changes and modifications may be made, but these are changed Protection scope of the present invention is each fallen with modification.

Claims (13)

1. data transmission method in a kind of LAN, which is characterized in that including:In transmitting terminal,
Determine the first data, first data include key-value pair, and first data are corresponding with data to be transmitted, described to wait for Transmission data includes the data of serializability;First data have from suitability and scalability;
First data and the data to be transmitted are serialized using Java technology;
The first data after serializing and the data to be transmitted after serializing are transmitted to receiving terminal successively.
2. data transmission method in LAN as described in claim 1, which is characterized in that the data of the serializability include The Java object of serializability and/or the file of serializability.
3. data transmission method in LAN as described in claim 1, which is characterized in that first data correspond to one or Multiple data to be transmitted.
4. data transmission method in LAN as described in claim 1, which is characterized in that the key assignments that first data include To including one or more of the following contents:The title of data to be transmitted, the byte number of data to be transmitted or data to be transmitted Class name.
5. data transmission method in LAN as described in claim 1, which is characterized in that further include:In the receiving terminal,
From the first extracting data key-value pair received;
Using the key-value pair of extraction, the data received are handled.
6. data transmission method in LAN as claimed in claim 5, which is characterized in that the key-value pair using extraction, Carrying out processing to the data received includes:
If the key-value pair of extraction includes the title of data to be transmitted, data, and the data of establishment are created in receiving terminal The title of the entitled data to be transmitted;
And/or if the key-value pair of extraction includes the class name of data to be transmitted, the data received are preserved into the class name Data.
7. data transmission method in LAN as described in claim 1, which is characterized in that further include:In the receiving terminal,
From the first extracting data key-value pair received;
According to the key-value pair of extraction, the data received are checked.
8. data transmission method in LAN as claimed in claim 7, which is characterized in that the key-value pair according to extraction, Carrying out verification to the data received includes:
If the key-value pair of the data fit extraction received, by the data unserializing received and stores, if receive Data do not meet the key-value pair of extraction, then the transmitting terminal is notified to transmit the data to be transmitted again.
9. data transmission system in a kind of LAN, which is characterized in that including transmitting terminal and receiving terminal, the transmitting terminal includes:
Determination unit, for determining the first data, first data include key-value pair, first data and data to be transmitted Corresponding, the data to be transmitted includes the data of serializability;First data have from suitability and scalability;
Serialization unit, for serializing first data and the data to be transmitted using Java technology;
Transmission unit, for the first data after serializing and the data to be transmitted after serializing to be transmitted to receiving terminal successively.
10. data transmission system in LAN as claimed in claim 9, which is characterized in that the receiving terminal includes:
First extraction unit, for from the first extracting data key-value pair received;
Processing unit is handled the data received for the key-value pair using extraction.
11. data transmission system in LAN as claimed in claim 10, which is characterized in that the processing unit includes:
First judging unit, for creating data in receiving terminal when the key-value pair of extraction includes the title of data to be transmitted, And the title of the entitled data to be transmitted of the data created;
And/or second judgment unit, the number for will be received when the key-value pair of extraction includes the class name of data to be transmitted According to the data preserved into the class name.
12. data transmission system in LAN as claimed in claim 9, which is characterized in that the receiving terminal further includes:
Second extraction unit, for from the first extracting data key-value pair received;
Unit is checked, for the key-value pair according to extraction, the data received are checked.
13. data transmission system in LAN as claimed in claim 12, which is characterized in that the verification unit includes:
Third judging unit, if the key-value pair of the data fit extraction for receiving, the data unserializing that will be received And store, if the data received do not meet the key-value pair of extraction, the transmitting terminal is notified to transmit the number to be transmitted again According to.
CN201510274328.7A 2015-05-26 2015-05-26 Data transmission method and system in LAN Active CN104954443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510274328.7A CN104954443B (en) 2015-05-26 2015-05-26 Data transmission method and system in LAN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510274328.7A CN104954443B (en) 2015-05-26 2015-05-26 Data transmission method and system in LAN

Publications (2)

Publication Number Publication Date
CN104954443A CN104954443A (en) 2015-09-30
CN104954443B true CN104954443B (en) 2018-09-14

Family

ID=54168786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510274328.7A Active CN104954443B (en) 2015-05-26 2015-05-26 Data transmission method and system in LAN

Country Status (1)

Country Link
CN (1) CN104954443B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235316A (en) * 2020-11-06 2021-01-15 上海舜宇恒平科学仪器有限公司 Data communication method for instrument integration
CN113365046B (en) * 2021-04-30 2023-08-01 厦门立林科技有限公司 High-performance audio and video data test transmitting method, application and storage medium thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425632A (en) * 2013-08-30 2013-12-04 深圳市路畅科技股份有限公司 Serializing method, device and processor

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425632A (en) * 2013-08-30 2013-12-04 深圳市路畅科技股份有限公司 Serializing method, device and processor

Also Published As

Publication number Publication date
CN104954443A (en) 2015-09-30

Similar Documents

Publication Publication Date Title
CN105900466B (en) Message processing method and device
CN103246730B (en) File memory method and equipment, document sending method and equipment
KR102275720B1 (en) Bluetooth communication method and bluetooth communication device
CN107079331A (en) For the method and apparatus for the business for controlling electronic installation in a wireless communication system
CN107078972A (en) Apparatus and method for providing service in the communication network for supporting multi-path transmission control protocol
CN103688513B (en) Content sharing method and Social Synchronizing Apparatus
CN109257820A (en) Communication means and equipment
CN104954443B (en) Data transmission method and system in LAN
CN109379742A (en) A kind of cut-in method of WLAN, device and storage medium
CN106228251A (en) Auto repair part quality traceability system
CN106375531A (en) Picture sharing method and terminal
CN106487748A (en) Data transmission method, apparatus and system
CN105681265B (en) Unilateral transmission control protocol accelerating method and device
CN106572095A (en) Account registration method, device and system
CN106462539A (en) Mechanism for file transformation and sharing across devices using camera interface
CN109155912A (en) User terminal, wireless base station and wireless communications method
EP2896163A1 (en) Method, related device, and system for inter-terminal interactions
CN109429190A (en) A kind of SMS classified display methods and device
CN108449274B (en) A kind of data-centered future network implementation method
CN110597706A (en) Method and device for testing application program interface data abnormity
CN106411477B (en) Ascending HARQ course maintaining method and device
CN105871620A (en) Rapid detection and identification method for network space industrial control equipment
CN102629345A (en) Chain type communication cooperation method, apparatus and system thereof
CN108920246A (en) List rough draft component sharing method and device, terminal device and readable storage medium storing program for executing
CN106385322B (en) A kind of data group calling method, apparatus and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant