CN107425943A - Packet data transmission method, apparatus, electronic equipment and computer-readable storage medium - Google Patents
Packet data transmission method, apparatus, electronic equipment and computer-readable storage medium Download PDFInfo
- Publication number
- CN107425943A CN107425943A CN201710775498.2A CN201710775498A CN107425943A CN 107425943 A CN107425943 A CN 107425943A CN 201710775498 A CN201710775498 A CN 201710775498A CN 107425943 A CN107425943 A CN 107425943A
- Authority
- CN
- China
- Prior art keywords
- opposite equip
- data package
- request data
- packet
- predetermined format
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/12—Arrangements for detecting or preventing errors in the information received by using return channel
- H04L1/16—Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
- H04L1/1607—Details of the supervisory signal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
- G06F13/4286—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
Abstract
The application provides a kind of packet data transmission method, apparatus, electronic equipment and computer-readable storage medium.Wherein, packet data transmission method is applied to serial communication, and this method includes:Request data package is sent to opposite equip. by serial communication protocol, label information is carried in the request data package, so that opposite equip. judges whether request data package meets predetermined format according to the label information, and confirmation is returned to when meeting predetermined format;When receiving the confirmation of opposite equip. return, the operator scheme in request data package carries out message data operation.Packet data transmission method, apparatus, electronic equipment and the computer-readable storage medium provided by the embodiment of the present application, serial communication can be used to carry out the operation of message data, it is cost-effective.
Description
Technical field
The application is related to communication technical field, more particularly to a kind of packet data transmission method, apparatus, electronic equipment and meter
Calculation machine storage medium.
Background technology
The FTP used in correlation technique mostly based on network transmission or USB transmission, but in software
Go wrong when cause mixed-media network modules mixed-media and the USB module not to be loaded, user can not be just read the file in system
The operation such as take, write.
The content of the invention
The application provides a kind of packet data transmission method, apparatus, electronic equipment and computer-readable storage medium.It can use
Serial communication carries out the operation of message data.
A kind of packet data transmission method is provided according to the first aspect of the embodiment of the present application.Applied to serial communication, institute
The method of stating includes:
Request data package is sent to opposite equip. by serial communication protocol, mark letter is carried in the request data package
Breath, so that the opposite equip. judges whether the request data package meets predetermined format according to the label information, and is being accorded with
Confirmation is returned when closing the predetermined format;When receiving the confirmation that the opposite equip. returns, asked according to described
The operator scheme in packet is asked to carry out message data operation.
Further, the lead-in section of the packet of the predetermined format is used to store the label information.
Further, the packet of the predetermined format also includes being used for the field for describing action type.
Further, the packet of the predetermined format also includes being used for the field for describing the data package size.
Further, the operator scheme include it is following any one:
Sending mode, for sending message data to the opposite equip., so that the opposite equip. receives the message
Data;
Request mode, for sending solicited message to the opposite equip., to ask the opposite equip. to send message number
According to, and receive the message data that the opposite equip. is sent;
Command mode, for sending operational order to the opposite equip., so that the opposite equip. performs the operation
Order, and return to implementing result;Wherein, the operational order includes delete command, querying command, copy command, paste command
At least one of.
A kind of packet data transmission method is provided according to the second aspect of the embodiment of the present application, applied to serial communication, institute
The method of stating includes:
The request data package of opposite equip. transmission is received by serial communication protocol, mark is carried in the request data package
Remember information;Judge whether the request data package meets predetermined format according to the label information;It is and described predetermined meeting
Confirmation is returned to during form, so that operator scheme of the opposite equip. in the request data package carries out message data
Operation.
A kind of packet data transmission device is provided according to the third aspect of the embodiment of the present application, applied to serial communication, institute
Stating device includes:
Request data package transmitting element, it is described for sending request data package to opposite equip. by serial communication protocol
Label information is carried in request data package, so that the opposite equip. judges the request data package according to the label information
Whether meet predetermined format, and confirmation is returned when meeting the predetermined format;
Confirmation receiving unit, the confirmation returned for receiving the opposite equip.;
Message data operating unit, returned really for receiving the opposite equip. in the confirmation receiving unit
When recognizing information, the operator scheme in the request data package carries out message data operation.
A kind of packet data transmission device is provided according to the fourth aspect of the embodiment of the present application, applied to serial communication, institute
Stating device includes:
Request data package receiving unit, for receiving the request data package of opposite equip. transmission by serial communication protocol,
Label information is carried in the request data package;
Judging unit, for judging whether the request data package meets predetermined format according to the label information;
Confirmation returning unit, for returning to confirmation letter when the judging unit judges and meets the predetermined format
Breath, so that operator scheme of the opposite equip. in the request data package carries out message data operation.
A kind of electronic equipment is provided according to the 5th of the embodiment of the present application the aspect, including:At least one processor;And
The memory being connected with least one processor communication;Wherein, have can be by least one place for the memory storage
The instruction that device performs is managed, the instruction is by least one computing device, so that at least one processor can be held
The above-mentioned packet data transmission method of row.
A kind of computer-readable storage medium is provided according to the 6th of the embodiment of the present application the aspect, is stored with the executable finger of computer
Order, computer executable instructions are used to perform above-mentioned packet data transmission method.
The packet data transmission method, apparatus, electronic equipment and computer-readable storage medium of the embodiment of the present application, due to local terminal
Label information is carried in the request data package that equipment is sent, is easy to opposite equip. to judge request data package according to the label information
Whether predetermined format is met.Message data behaviour is can be carried out when meeting predetermined format, between local device and opposite equip.
Make.Serial communication can be used to carry out the operation of message data.And network interface card or USB port need not be used to be upgraded, make
It can be realized with the serial ports of low cost, the cost of the simple embedded board of some functions can be saved.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not
The application can be limited.
Brief description of the drawings
Fig. 1 is a kind of flow chart of packet data transmission method shown in the embodiment of the present application;
Fig. 2 is the flow chart that message data operates under a kind of sending mode shown in the embodiment of the present application;
Fig. 3 is the flow chart that message data operates under a kind of reception pattern shown in the embodiment of the present application;
Fig. 4 is the flow chart that message data operates under a kind of command mode shown in the embodiment of the present application;
Fig. 5 is a kind of flow chart of packet data transmission method shown in the embodiment of the present application;
Fig. 6 is a kind of structural representation of packet data transmission device shown in the embodiment of the present application;
Fig. 7 is a kind of structural representation of packet data transmission device shown in the embodiment of the present application;
Fig. 8 is the structural representation of a kind of electronic equipment shown in the embodiment of the present application.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent apparatus and method of some aspects be described in detail in claims, the application.
It is only merely for the purpose of description specific embodiment in term used in this application, and is not intended to be limiting the application.
" one kind " of singulative used in the application and appended claims, " described " and "the" are also intended to including majority
Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrapped
Containing the associated list items purpose of one or more, any or all may be combined.
Below in conjunction with the accompanying drawings, the packet data transmission method of the embodiment of the present application is described in detail.What is do not conflicted
In the case of, the feature in following embodiment and embodiment can be mutually combined.
As shown in figure 1, Fig. 1 is a kind of flow for packet data transmission method that the exemplary embodiment of the application one provides
Figure, this method are applied to serial communication, 11- steps 13 that the method comprising the steps of.Wherein,
In a step 11, request data package is sent to opposite equip. by serial communication protocol.Taken in the request data package
With label information, so that opposite equip. judges whether request data package meets predetermined format according to label information, and meeting
Confirmation is returned during predetermined format.
In step 12, the confirmation of opposite equip. return is received.
In step 13, the operator scheme in request data package carries out message data operation.
In the embodiment of the present application, when local device is needed with opposite equip. progress message data operation, it is necessary to right
End equipment sends request data package (Request bags), is shaken hands for the first time between local device and opposite equip..The request
Packet is the packet packed according to predetermined format, and carries label information in the request data package.When opposite end is set
After the standby request data package for receiving local device transmission, it is pre- can to judge whether request data package meets according to the label information
Fixed formula, and confirmation is returned if request data package meets predetermined format, that is, is returned to one and responded bag
(Oacknowledgment bags), for the response shaken hands to request data package, represent that opposite equip. is already prepared to set with local terminal
Standby connection.Then local device can carry out message data operation according to the operator scheme in request data package.
In an optional embodiment, the operator scheme between local device and opposite equip. can include following any one
Kind:
Sending mode, for sending message data to opposite equip., so that opposite equip. receives message data.
Request mode, for sending solicited message to opposite equip., to ask opposite equip. to send message data, and receive
The message data that opposite equip. is sent.
Command mode, for sending operational order to opposite equip., so that opposite equip. performs the operational order, and return
Implementing result;Wherein, operational order includes at least one of delete command, querying command, copy command, paste command.
Wherein, in the transmit mode, the message data operating process between local device and opposite equip. is as shown in Figure 2.
With reference to figure 2, local device first sends request data package to opposite equip., with opposite equip. agreement, it is desirable to which it is accurate
It is standby to receive file.Opposite equip. parses the label information in simultaneously identification data bag, works as judgement after the request data package is received
When the request data package meets predetermined format, return to one to local device and respond bag, then local device receives response bag
Sent afterwards to opposite equip. and confirm bag, represent that local device is ready for sending file.Opened after waiting preset duration (such as 200 milliseconds) again
Originate literary packet 1 of delivering newspaper.Opposite equip. returns to a confirmation bag after receiving message data bag 1, and then local device is sent out
Deliver newspaper literary packet 2, opposite equip., which receives, to be returned again to one after message data bag 2 and confirm bag.According to this, opposite equip. is each
A confirmation bag can be returned to afterwards by receiving the message data bag of local device transmission, and local device receives opposite end and set every time
Next message data bag will be sent after the standby confirmation bag returned.After file is sent completely, local device can send one
Individual end packet, notice opposite equip. terminate current transmission, and file is transmitted.
In the receiving mode, the message data operating process between local device and opposite equip. is as shown in Figure 3.
With reference to figure 3, local device first sends request data package to opposite equip., tells what its needs of opposite equip. were sent
File and related setting.Opposite equip. returns to one when judging that the request data package meets predetermined format, to local device and returned
It should wrap, then local device is sent to opposite equip. confirms bag, represents that local device is already prepared to receive file.Then, it is right
End equipment starts to send message data bag 1, and local device returns to a confirmation bag after receiving message data bag 1, then right
End equipment sends message data bag 2, and local device returns again to a confirmation bag after receiving message data bag 2.Successively, local terminal
Equipment often receives a message data bag and returns to a confirmation bag.And opposite equip. often receives local device and sent really
Next message data bag will be sent after recognizing bag.When data transfer finishes, opposite equip. can send an end packet, represent
Complete to transmit, local device sends last confirmation bag after receiving end packet, then terminates reception state, file passes
It is totally lost into.
Under command mode, the message data operating process between local device and opposite equip. is as shown in Figure 4.
With reference to figure 4, local device first sends request data package to opposite equip., and request opposite equip. will after performing order
As a result return.Opposite equip. returns to one and responds bag after request data package is received.Then local device sends order bag.
Opposite equip. receives command packet, and the order in command packet is parsed and performed.Then with message data bag
1st, implementing result is returned to local device by the form of message data bag 2 etc. successively, and local device often receives a message number
Confirm bag according to can all return to one after bag.When opposite equip. operation finishes, an end packet is sent, when local device receives
After the end packet sent to opposite equip., return to last and confirm bag, then terminate command operation.For example, opposite equip. receives
Order bag in content be " ps " character string, then opposite equip. will run ps orders, then in the form of packet will transport
Capable result returns to local device successively, and such local device end can gets the process status of opposite equip..Need
Illustrate, the operational order in the embodiment of the present application is not limited to delete command, querying command, copy command or pastes life
Make, go for all executable commands of opposite equip. support in practical application.
Mistake can be sent in the embodiment of the present application, when in message data operating process if there is irrecoverable error
Packet, either local device or opposite equip. all can actively terminate to transmit after receiving wrong data bag, and disconnect company
Connect.
In the embodiment of the present application, the various packets that are sent in message data operating process (including request data package, return
Should wrap, confirm bag, message data bag, order bag and erroneous packets etc.) in include common portion, may also be referred to as packet header,
Remainder can be referred to as indentured.Packet can follow predetermined form in packing.
In an optional embodiment, the lead-in section (the alternatively referred to as lead-in section in packet header) of the packet of predetermined format is used for
Label information is stored, can be the character string of 8 bytes such as Flag fields, the label information can be used as Magic number to use.One side
Face, when opposite equip. receives packet, it is only necessary to 8 bytes before inspection, it is possible to it is predetermined to judge whether the packet meets
Form, improve the efficiency of packet data transmission.On the other hand, label information can be with the version updating of serial communication protocol
And change, if serial communication protocol has multiple versions, each version can have different label informations, and opposite equip. receives
To after packet, it is only necessary to the version that rear can confirms the serial communication protocol that local device uses is checked to label information
This, the version of the serial communication protocol so as to be used according to local device is carried out communication and prepared, and improves serial communication association
The autgmentability of view.
In another optional embodiment, the packet of predetermined format also includes being used for the field for describing action type.Should
Field can store in the header, such as Option the type fields, or 8 bytes, the field can define the packet
Action type.Opposite equip. can determine what local device was sent according to the field of the description action type in the packet of reception
The action type of packet.Such as request bag, confirmation bag, packet etc..
In another optional embodiment, the packet of predetermined format also includes being used for the field for describing data package size,
The field can also store in the header, such as Package Len fields, indicate the size of current data packet.
In the embodiment of the present application, the attribute of packet can be defined in the indentured part of each packet.Such as 1,
The indentured of request data package can define:Request the type fields, it is in sending mode, reception for specified document transmission
Pattern or command mode.Name field, represent to send the filename under file mode or reception file mode.Encode words
Section, coded format is used when indicating transmission text.Request Option fields, it is an array, for depositing
Growth data section, for example most large packet size is can specify that, file is divided into how many bags etc..2nd, responding the indentured of bag can define:
OACK_Option fields, be an array, for establish connect when, configured transmission when being responded to request data package, Ke Yigao
Tell that opposite equip. prepares to receive great file., can be with if opposite equip., which finds that file is more than, works as front disk remaining space
Terminate to transmit in advance, and without terminating again until the file received can not be deposited, so as to have submitted the efficiency of transmission, avoid using
Family wastes the unnecessary time.3rd, confirm that the indentured of bag can define:Block fields, for current bag count and really
Recognize.For example when sending file, if receiving terminal receives first message data bag, the confirmation that a block is 0 will be returned to
Bag, if receiving terminal receives second message data bag, it is 2 that will return to block, carrys out confirmation message packet sequence with this
Accuracy.ACK_Option fields, for the confirmation of the state to the last message data bag received, such as:Success
Receive and be verified, be properly received but data verification does not pass through, it is desirable to retransmit, currently confirm that end mistake occurs, do not had at that time
Receive data, request repeat, be transmitted etc..4th, the indentured of message data bag can define:Block fields, to current
The counting of packet.Size field:Define the size of data block.Checksum fields, it is data check code, for ensuring data
Correctness.If the check code that the packet received calculates is different with the check code of this field, illustrate that data occur
Dirty data, then current data packet need be dropped.Data fields:Define the data of transmission.5th, indentured can define of order bag:
CMD field, ordered for transmitting.For example opposite equip. is linux ends, then local device can fill in " ps- to CMD field
Aux " word strings, opposite equip. after Command bags are received directly operation inside CMD word strings, then by the result of operation with
The form of message data bag, which is sent back, to be come, it is achieved thereby that real-time control of the local device to opposite equip..6th, the bag of erroneous packets
Body can define:Error Code fields, mistake code field, for the specific mistake for notifying opposite equip. to occur.
In the embodiment of the present application, label information is carried in the request data package sent due to local device, is easy to opposite end
Equipment judges whether request data package meets predetermined format according to the label information.When meeting predetermined format, local device and
Message data operation is can be carried out between opposite equip., realizes that the renewal, file transmission, file of platform software refresh and browses
Function.So as to carry out the operation of message data using serial communication, it is not necessary to upgraded using network interface card or USB port, made
It can be realized with the serial ports of low cost, the cost of the simple embedded board of some functions can be saved.
As shown in figure 5, Fig. 5 is a kind of packet data transmission method that the exemplary embodiment of the application one provides, it is applied to
Serial communication, 51- steps 54 that the method comprising the steps of.Wherein,
In step 51, the request data package of opposite equip. transmission, the request data package are received by serial communication protocol
In carry label information.
The request packet can regard that the first time between opposite equip. and local device shakes hands as.
In step 52, judge whether request data package meets predetermined format according to the label information.
If then enter step 53, otherwise into step 54.
In step 53, return to confirmation, for opposite equip. according to operator scheme in the request data package enter
Row message data operates.
Confirmation is returned when request data package meets predetermined format, that is, returns to one and responds bag
(Oacknowledgment bags), for the response shaken hands to request data package, represent that local device is already prepared to set with opposite end
Standby connection.It is easy to operator scheme of the opposite equip. in request data package to carry out message data operation.
In step 54, error message is returned.
In the embodiment of the present application, label information is carried in the request data package received due to local device, is easy to basis
The label information judges whether request data package meets predetermined format.When meeting predetermined format, confirmation, i.e. local terminal are returned
Message data operation can be carried out between equipment and opposite equip., realizes that the renewal, file transmission, file refreshing of platform software are clear
The function such as look at.So as to carry out the operation of message data using serial communication, it is not necessary to risen using network interface card or USB port
Level, it can be realized using the serial ports of low cost, the cost of the simple embedded board of some functions can be saved.
Corresponding with the embodiment of the packet data transmission method shown in Fig. 1, present invention also provides packet data transmission
The embodiment of device.The embodiment of the packet data transmission device of the embodiment of the present application can be applied in packet data transmission method
On.Device embodiment can be realized by software, can also be realized by way of hardware or software and hardware combining.
Fig. 6 is refer to, Fig. 6 is a kind of structure for packet data transmission device 60 that the exemplary embodiment of the application one provides
Schematic diagram, packet data transmission device 60 are applied to serial communication, and device 60 includes:Request data package transmitting element 61, confirm
Information receiving unit 62 and message data operating unit 63.
Wherein, request data package transmitting element 61 is used to send request data to opposite equip. by serial communication protocol
Bag.Label information is carried in the request data package, so that whether opposite equip. judges request data package according to the label information
Meet predetermined format, and confirmation is returned when meeting predetermined format.
Confirmation receiving unit 62 is used for the confirmation for receiving opposite equip. return.
Message data operating unit 63 is used for the confirmation letter that opposite equip. return is received in confirmation receiving unit 62
During breath, the operator scheme in request data package carries out message data operation.
In an optional embodiment, the lead-in section of the packet of predetermined format is used to store label information.
In an optional embodiment, the packet of predetermined format also includes being used for the field for describing action type.
In an optional embodiment, the packet of predetermined format also includes being used for the field for describing data package size.
In an optional embodiment, the operator scheme in the packet that request data package transmitting element 61 is sent can wrap
Include it is following any one:
Sending mode, for sending message data to opposite equip., so that opposite equip. receives the message data.
Request mode, for sending solicited message to opposite equip., to ask opposite equip. to send message data, and receive
The message data that opposite equip. is sent.
Command mode, for sending operational order to opposite equip., for opposite equip. according to the operational order to message
Data are handled;Wherein, the operational order includes at least one in delete command, querying command, copy command, paste command
Kind.
In the embodiment of the present application, mark letter is carried in the request data package sent due to request data package transmitting element 61
Breath, is easy to opposite equip. to judge whether request data package meets predetermined format according to the label information.When meeting predetermined format,
Message data operation is can be carried out between local device and opposite equip., realizes the renewal, file transmission, file of platform software
Refreshing such as browses at the function.So as to carry out the operation of message data using serial communication, it is not necessary to entered using network interface card or USB port
Row upgrading, can be realized using the serial ports of low cost, can save the cost of the simple embedded board of some functions.
Corresponding with the embodiment of the packet data transmission method shown in Fig. 5, present invention also provides packet data transmission
The embodiment of device.The packet data transmission device of the embodiment of the present application can be applied in packet data transmission method.Device
Embodiment can be realized by software, can also be realized by way of hardware or software and hardware combining.
Fig. 7 is refer to, Fig. 7 is a kind of structure for packet data transmission device 70 that the exemplary embodiment of the application one provides
Schematic diagram, packet data transmission device 70 are applied to serial communication, and device 70 includes:Request data package receiving unit 71, judge
Unit 72 and confirmation returning unit 73.
Wherein, request data package receiving unit 71 is used for the number of request for receiving opposite equip. by serial communication protocol and sending
According to bag, label information is carried in the request data package.Judging unit 72 is used to judge that request data package is according to label information
It is no to meet predetermined format.Confirmation returning unit 73 is used for when the decision request packet of judging unit 72 meets predetermined format
Confirmation is returned to, so that operator scheme of the opposite equip. in request data package carries out message data operation.
In the embodiment of the present application, mark letter is carried in the request data package received due to request data package receiving unit 71
Breath, judging unit 72 can judge whether request data package meets predetermined format according to the label information.Meeting predetermined format
When, confirmation is returned, i.e., message data operation is can be carried out between local device and opposite equip., realizes platform software
The functions such as renewal, file are transmitted, file refreshing browses.So as to carry out the operation of message data using serial communication, it is not required to
To use network interface card or USB port to be upgraded, can be realized using the serial ports of low cost, it is simply embedding that some functions can be saved
Enter the cost of formula board.
The function of unit and the implementation process of effect specifically refer to and step are corresponded in the above method in said apparatus
Implementation process, it will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to method
Apply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating component
The unit of explanation can be or may not be physically separate, can be as the part that unit is shown or can also
It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality
Need to select some or all of module therein to realize the purpose of application scheme.Those of ordinary skill in the art are not paying
In the case of going out creative work, you can to understand and implement.
The embodiment of the present application additionally provides a kind of electronic equipment 80, with reference to figure 8.
Electronic equipment 80 includes at least one processor 81 (being illustrated in Fig. 8 by taking 1 processor as an example), and with extremely
The memory 82 of few processor communication connection.
Wherein, memory 82 is stored with the instruction that can be performed by least one processor 81, and the instruction is by described at least one
Individual computing device, so that at least one processor is able to carry out the packet data transmission method of embodiment illustrated in fig. 1.
The embodiment of the present application additionally provides a kind of computer-readable storage medium, is stored with computer executable instructions, computer
Executable instruction is used for the packet data transmission method for performing embodiment illustrated in fig. 1.
The preferred embodiment of the application is the foregoing is only, not limiting the application, all essences in the application
God any modification, equivalent substitution and improvements done etc., should be included within the scope of the application protection with principle.
Claims (10)
- A kind of 1. packet data transmission method, it is characterised in that applied to serial communication, methods described includes:Request data package is sent to opposite equip. by serial communication protocol, label information is carried in the request data package, So that the opposite equip. judges whether the request data package meets predetermined format according to the label information, and meeting Confirmation is returned when stating predetermined format;When receiving the confirmation that the opposite equip. returns, the operator scheme in the request data package is reported Literary data manipulation.
- 2. according to the method for claim 1, it is characterised in that the lead-in section of the packet of the predetermined format is used to store The label information.
- 3. according to the method for claim 1, it is characterised in that the packet of the predetermined format also includes being used to describe behaviour Make the field of type.
- 4. according to the method for claim 1, it is characterised in that the packet of the predetermined format also includes being used to describe institute State the field of data package size.
- 5. according to the method for claim 3, it is characterised in that the operator scheme include it is following any one:Sending mode, for sending message data to the opposite equip., so that the opposite equip. receives the message data;Request mode, for sending solicited message to the opposite equip., to ask the opposite equip. to send message data, and Receive the message data that the opposite equip. is sent;Command mode, for sending operational order to the opposite equip., so that the opposite equip. performs the operational order, And return to implementing result;Wherein, the operational order is included in delete command, querying command, copy command, paste command extremely Few one kind.
- A kind of 6. packet data transmission method, it is characterised in that applied to serial communication, methods described includes:The request data package of opposite equip. transmission is received by serial communication protocol, mark letter is carried in the request data package Breath;Judge whether the request data package meets predetermined format according to the label information;AndConfirmation is returned to when meeting the predetermined format, for behaviour of the opposite equip. in the request data package Operation mode carries out message data operation.
- 7. a kind of packet data transmission device, it is characterised in that applied to serial communication, described device includes:Request data package transmitting element, for sending request data package, the request to opposite equip. by serial communication protocol Label information is carried in packet, so that whether the opposite equip. judges the request data package according to the label information Meet predetermined format, and confirmation is returned when meeting the predetermined format;Confirmation receiving unit, the confirmation returned for receiving the opposite equip.;Message data operating unit, for receiving the confirmation letter of the opposite equip. return in the confirmation receiving unit During breath, the operator scheme in the request data package carries out message data operation.
- 8. a kind of packet data transmission device, it is characterised in that applied to serial communication, described device includes:Request data package receiving unit, it is described for receiving the request data package of opposite equip. transmission by serial communication protocol Label information is carried in request data package;Judging unit, for judging whether the request data package meets predetermined format according to the label information;Confirmation returning unit, for being returned when the judging unit judges that the request data package meets the predetermined format Confirmation is returned, so that operator scheme of the opposite equip. in the request data package carries out message data operation.
- 9. a kind of electronic equipment, it is characterised in that including:At least one processor;AndThe memory being connected with least one processor communication;Wherein,The memory storage has can be by the instruction of at least one computing device, and the instruction is by least one place Manage device to perform, so that at least one processor is able to carry out the message any one of claim 1 to claim 5 Data transmission method.
- 10. a kind of computer-readable storage medium, it is characterised in that be stored with computer executable instructions, computer executable instructions For the packet data transmission method any one of perform claim requirement 1 to claim 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710775498.2A CN107425943A (en) | 2017-08-31 | 2017-08-31 | Packet data transmission method, apparatus, electronic equipment and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710775498.2A CN107425943A (en) | 2017-08-31 | 2017-08-31 | Packet data transmission method, apparatus, electronic equipment and computer-readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107425943A true CN107425943A (en) | 2017-12-01 |
Family
ID=60435533
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710775498.2A Pending CN107425943A (en) | 2017-08-31 | 2017-08-31 | Packet data transmission method, apparatus, electronic equipment and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107425943A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108322443A (en) * | 2017-12-30 | 2018-07-24 | 京信通信系统(中国)有限公司 | Equipment interactive communication method, apparatus, storage medium and computer equipment |
CN108877181A (en) * | 2018-07-18 | 2018-11-23 | 深圳市茁壮网络股份有限公司 | Seeking for remote controller method, remote controler and electronic equipment |
CN110231798A (en) * | 2019-05-21 | 2019-09-13 | 上海航天设备制造总厂有限公司 | The communication alternate acknowledge mechanism of human-computer interaction interface and programmable logic controller (PLC) |
CN110244604A (en) * | 2019-05-29 | 2019-09-17 | 北京大豪科技股份有限公司 | Data transmission method, device, electronic equipment and storage medium |
CN110647490A (en) * | 2019-10-22 | 2020-01-03 | 深圳市康冠智能科技有限公司 | Data transmission method, device, equipment and computer storage medium |
CN110875799A (en) * | 2018-09-04 | 2020-03-10 | 华为技术有限公司 | Transmission control method and device |
CN111246519A (en) * | 2020-01-16 | 2020-06-05 | 杭州涂鸦信息技术有限公司 | Zigbee data transmission method, system and device |
CN111586154A (en) * | 2020-04-30 | 2020-08-25 | 北京百度网讯科技有限公司 | Data storage method, device, equipment and storage medium based on transmission channel |
CN111935243A (en) * | 2020-07-17 | 2020-11-13 | 杭州海康机器人技术有限公司 | Data information transmission method, device, system and equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101031037A (en) * | 2007-03-28 | 2007-09-05 | 深圳创维-Rgb电子有限公司 | Circuit device for repeating on-line programm |
CN101409727A (en) * | 2008-11-24 | 2009-04-15 | 株洲南车时代电气股份有限公司 | Document transmission method and apparatus |
CN102098131A (en) * | 2009-12-15 | 2011-06-15 | 航天科工惯性技术有限公司 | Dynamic parameter configuration-based general framing and de-framing method for serial port data frames |
CN103051716A (en) * | 2012-12-25 | 2013-04-17 | 中标软件有限公司 | Method and system for redirecting network-oriented serial device |
US20140016538A1 (en) * | 2012-07-13 | 2014-01-16 | Canon Kabushiki Kaisha | Time sensitive transaction over an asynchronous serial link |
-
2017
- 2017-08-31 CN CN201710775498.2A patent/CN107425943A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101031037A (en) * | 2007-03-28 | 2007-09-05 | 深圳创维-Rgb电子有限公司 | Circuit device for repeating on-line programm |
CN101409727A (en) * | 2008-11-24 | 2009-04-15 | 株洲南车时代电气股份有限公司 | Document transmission method and apparatus |
CN102098131A (en) * | 2009-12-15 | 2011-06-15 | 航天科工惯性技术有限公司 | Dynamic parameter configuration-based general framing and de-framing method for serial port data frames |
US20140016538A1 (en) * | 2012-07-13 | 2014-01-16 | Canon Kabushiki Kaisha | Time sensitive transaction over an asynchronous serial link |
CN103051716A (en) * | 2012-12-25 | 2013-04-17 | 中标软件有限公司 | Method and system for redirecting network-oriented serial device |
Non-Patent Citations (2)
Title |
---|
王承君: "自定义串口数据通信协议的分析与设计", 《计算机工程》 * |
陈荔 等: "基于串口自定义协议传输文件的设计", 《计算机技术与发展》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108322443A (en) * | 2017-12-30 | 2018-07-24 | 京信通信系统(中国)有限公司 | Equipment interactive communication method, apparatus, storage medium and computer equipment |
CN108877181A (en) * | 2018-07-18 | 2018-11-23 | 深圳市茁壮网络股份有限公司 | Seeking for remote controller method, remote controler and electronic equipment |
CN110875799A (en) * | 2018-09-04 | 2020-03-10 | 华为技术有限公司 | Transmission control method and device |
US11477130B2 (en) | 2018-09-04 | 2022-10-18 | Huawei Technologies Co., Ltd. | Transmission control method and apparatus |
CN110875799B (en) * | 2018-09-04 | 2023-07-07 | 华为技术有限公司 | Transmission control method and device |
CN110231798A (en) * | 2019-05-21 | 2019-09-13 | 上海航天设备制造总厂有限公司 | The communication alternate acknowledge mechanism of human-computer interaction interface and programmable logic controller (PLC) |
CN110244604A (en) * | 2019-05-29 | 2019-09-17 | 北京大豪科技股份有限公司 | Data transmission method, device, electronic equipment and storage medium |
CN110647490A (en) * | 2019-10-22 | 2020-01-03 | 深圳市康冠智能科技有限公司 | Data transmission method, device, equipment and computer storage medium |
CN111246519A (en) * | 2020-01-16 | 2020-06-05 | 杭州涂鸦信息技术有限公司 | Zigbee data transmission method, system and device |
CN111586154A (en) * | 2020-04-30 | 2020-08-25 | 北京百度网讯科技有限公司 | Data storage method, device, equipment and storage medium based on transmission channel |
CN111586154B (en) * | 2020-04-30 | 2022-08-05 | 北京百度网讯科技有限公司 | Data storage method, device, equipment and storage medium based on transmission channel |
CN111935243A (en) * | 2020-07-17 | 2020-11-13 | 杭州海康机器人技术有限公司 | Data information transmission method, device, system and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107425943A (en) | Packet data transmission method, apparatus, electronic equipment and computer-readable storage medium | |
CN104967497B (en) | A kind of reliable data transmission method and upgrade method based on network communication protocol | |
EP0905938B1 (en) | Hardware checksum assist for network protocol stacks | |
EP0788267A2 (en) | User-extensible interactive network packet language | |
CN109474642A (en) | Based on Ethernet udp protocol data transmission method, apparatus, equipment and medium | |
CN109947795A (en) | The acquisition methods and device of target data | |
CN105389120B (en) | Support the RMA API by alive messages | |
CN109842523A (en) | A kind of firmware upgrade method, device, equipment and storage medium | |
CN1691669A (en) | Method, system, and program for executing data transfer requests | |
CN106444657B (en) | A kind of Modbus main website command processing method and main station controller | |
CN108494800A (en) | A kind of detection of security data packet and processing method, device, P4 interchangers and medium | |
CN106155734B (en) | Method and device for downloading software version | |
CN106487896A (en) | Method and apparatus for processing remote direct memory access request | |
CN104247322B (en) | Promote method, system and the computer-readable medium of the communication in computing environment | |
CN107315702A (en) | Computer-readable medium, computing device and the method managed for chip card | |
CN106330788B (en) | Message fragment transmission method and device | |
CN102750249B (en) | The method that host computer communicates with slave computer, Apparatus and system | |
CN110324405A (en) | Message method, device, system and computer readable storage medium | |
CN110120980A (en) | Reliable file transmission method, computer equipment and the storage medium of unstable link | |
CN107862074A (en) | Big data quantity parameter rapid read-write method | |
CN106484454A (en) | The processing method and processing device of difference AKU, upgrade method, system and device | |
CN103365810A (en) | Method and apparatus to reduce flash memory device programming time over a C.A.N. bus | |
CN114035987A (en) | Data transmission method and device based on message queue, electronic equipment and medium | |
CN110505071A (en) | The method for remote updating of FPGA board, system and relevant apparatus in local area network | |
CN103731424B (en) | A kind of transmission method of network data, apparatus and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171201 |