[go: up one dir, main page]

CN108322443B - Equipment interactive communication method, device, storage medium and computer equipment - Google Patents

Equipment interactive communication method, device, storage medium and computer equipment Download PDF

Info

Publication number
CN108322443B
CN108322443B CN201711489669.1A CN201711489669A CN108322443B CN 108322443 B CN108322443 B CN 108322443B CN 201711489669 A CN201711489669 A CN 201711489669A CN 108322443 B CN108322443 B CN 108322443B
Authority
CN
China
Prior art keywords
packet
communication
data packet
interactive communication
interactive
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
CN201711489669.1A
Other languages
Chinese (zh)
Other versions
CN108322443A (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.)
Comba Network Systems Co Ltd
Original Assignee
Comba Telecom Systems China 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 Comba Telecom Systems China Ltd filed Critical Comba Telecom Systems China Ltd
Priority to CN201711489669.1A priority Critical patent/CN108322443B/en
Publication of CN108322443A publication Critical patent/CN108322443A/en
Application granted granted Critical
Publication of CN108322443B publication Critical patent/CN108322443B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

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

Abstract

The invention relates to a device interactive communication method, a device, a storage medium and a computer device, wherein the method comprises the steps of constructing a communication data packet according to interactive communication content information of a target device, wherein the communication data packet comprises a packet head, a packet body and a packet tail; sending the communication data packet to the target device according to information contained in the packet header in the communication data packet, wherein the communication data packet is used for indicating the target device to construct a response data packet according to the information contained in the packet header, the packet body and the packet tail in the communication data packet; and receiving a response data packet sent by the target equipment according to the communication data packet. The communication data packet used during communication of the network communication equipment is specifically defined, interactive communication can be directly carried out between the equipment, when a communication target is converted, connection does not need to be reestablished, and the time of interactive communication between the equipment is effectively shortened, so that the communication process between the network communication equipment is faster and more convenient, and the communication efficiency is improved.

Description

Equipment interactive communication method, device, storage medium and computer equipment
Technical Field
The present invention relates to the field of network communication device communication technologies, and in particular, to a device interactive communication method, apparatus, storage medium, and computer device.
Background
With the development of wireless network technology, the application of network communication devices is more and more extensive, the network communication devices used in different industries are different, and people use a great amount of different types of network communication devices to achieve different communication purposes.
In the conventional technology, when using a network communication device, people often communicate through a network communication Protocol, such as a TCP/IP (Transmission Control Protocol/Internet Protocol ) Protocol. However, when communication is performed using a communication protocol, a connection needs to be established between network communication devices, and when a communication target is switched, the connection needs to be reestablished, which takes a lot of time and cost, resulting in a cumbersome communication process between the network communication devices and a low communication efficiency.
Disclosure of Invention
Therefore, it is necessary to provide a device interactive communication method, apparatus, storage medium, and computer device with faster, more convenient, and more efficient communication process, aiming at the problems of cumbersome communication process and low communication efficiency in the conventional technology.
A device interaction communication method, comprising:
constructing a communication data packet according to interactive communication content information of target equipment, wherein the communication data packet comprises a header, a body and a trailer;
sending the communication data packet to the target device according to information contained in the packet header in the communication data packet, wherein the communication data packet is used for indicating the target device to construct a response data packet according to the information contained in the packet header, the packet body and the packet tail in the communication data packet;
and receiving a response data packet sent by the target equipment according to the communication data packet.
A device interaction communication apparatus, comprising:
the first construction module is used for constructing a communication data packet according to interactive communication content information of target equipment, wherein the communication data packet comprises a packet head, a packet body and a packet tail;
the first sending module is used for sending the communication data packet to the target equipment according to information contained in the packet header of the communication data packet, wherein the communication data packet is used for carrying out interactive communication with the target equipment;
and the first receiving module is used for receiving a response data packet sent by the target equipment according to the communication data packet.
A device interaction communication method, comprising:
receiving a communication data packet which is sent by source equipment and constructed according to interactive communication content information, wherein the communication data packet comprises a packet head, a packet body and a packet tail;
constructing a response data packet according to information contained in the packet head, the packet body and the packet tail in the communication data packet;
and sending the response data packet to the source equipment according to the information contained in the packet header in the communication data packet.
A device interaction communication apparatus, comprising:
the second receiving module is used for receiving a communication data packet which is sent by source equipment and constructed according to interactive communication content information, wherein the communication data packet comprises a packet head, a packet body and a packet tail;
the second construction module is used for constructing a response data packet according to information contained in the packet head, the packet body and the packet tail in the communication data packet;
and the second sending module is used for sending the response data packet to the source equipment according to the information contained in the packet header in the communication data packet.
A storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described device interactive communication method.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above device interactive communication method when executing the program.
In the device interactive communication method, the device, the storage medium and the computer device, when the devices are in interactive communication, a communication data packet is constructed according to interactive communication content information of target devices, wherein the communication data packet comprises a packet head, a packet body and a packet tail; sending the communication data packet to target equipment according to information contained in a packet header in the communication data packet, wherein the communication data packet is used for indicating the target equipment to construct a response data packet according to the information contained in the packet header, the packet body and the packet tail in the communication data packet; and receiving a response data packet sent by the target device according to the communication data packet. When the equipment is in interactive communication, receiving a communication data packet which is sent by source equipment and constructed according to interactive communication content information, wherein the communication data packet comprises a header, a body and a trailer; constructing a response data packet according to information contained in a packet head, a packet body and a packet tail in the communication data packet; and sending a response data packet constructed according to the communication data packet to the source equipment. The communication data packet used during communication of the network communication equipment is specifically defined, interactive communication can be directly carried out between the equipment, when a communication target is converted, connection does not need to be reestablished, and the time of interactive communication between the equipment is effectively shortened, so that the communication process between the network communication equipment is faster and more convenient, and the communication efficiency is improved.
Drawings
FIG. 1 is a flow diagram illustrating a method for device interactive communication in one embodiment;
FIG. 2 is a flow chart illustrating a method of device interactive communication in another embodiment;
FIG. 3 is a block diagram of an apparatus for interactive communication according to an embodiment;
FIG. 4 is a schematic structural diagram of an apparatus for interactive communication in another embodiment;
FIG. 5 is a flowchart illustrating a method of device interactive communication according to another embodiment;
FIG. 6 is a flowchart illustrating a method of device interactive communication according to another embodiment;
FIG. 7 is a schematic structural diagram of an apparatus for interactive communication in another embodiment;
fig. 8 is a schematic structural diagram of an apparatus interactive communication device in another embodiment.
Detailed Description
Fig. 1 is a flowchart illustrating a device interactive communication method according to an embodiment, as shown in fig. 1, the device interactive communication method includes the following steps:
step S110, constructing a communication data packet according to the interactive communication content information of the target device.
The communication data packet constructed according to the interactive communication content information includes a header, a body and a trailer. In this step, the source device serializes (serializes) the interactive communication content information with the target device by using an XML (eXtensible Markup Language) format. In this step, the interactive communication content information with the target device is serialized, that is, the interactive communication content information is converted into a transmittable form, and the serialized interactive communication content information respectively constitutes a header (Head), a Body (Body), and a trailer (Foot) of a communication data packet.
Step S120, sending the communication data packet to the target device according to the information contained in the packet header of the communication data packet.
The communication data packet is used for instructing the target device to construct a response data packet according to the information contained in the packet head, the packet body and the packet tail in the communication data packet. In this step, the source device sends the communication data packet to the target device according to the information contained in the packet header of the communication data packet, that is, the related information of the target device.
Step S130, receiving a response packet sent by the target device according to the communication packet.
In this step, after the target device receives the communication data packet constructed according to the interactive communication content information sent by the source device, the target device executes a corresponding operation behavior according to the interactive communication content included in the communication data packet, generates a response data packet corresponding to the communication data packet, and sends the generated response data packet to the source device. After receiving the response data packet sent by the target device, the source device completes one interactive communication with the target device on behalf of the source device.
The embodiment provides a device interactive communication method for source devices and target devices, which is characterized in that a communication data packet used in the communication of network communication devices is specifically defined, the devices can be directly interactively communicated, when a communication target is converted, connection does not need to be reestablished, and the time of interactive communication between the devices is effectively shortened, so that the communication process between the network communication devices is faster and more convenient, and the communication efficiency is improved.
In one embodiment, the interactive communication content information includes a source device IP address, a target device IP address, a behavior recognition identifier, a manufacturer identifier corresponding to the target device, a corresponding ID of the interactive communication content, a data size, a data type, a data content, and an interactive communication time; in this embodiment, step S110 includes steps 112 to 118.
And step 112, constructing a packet header according to the source device IP address, the target device IP address, the behavior identification mark, the manufacturer mark corresponding to the target device and the corresponding ID of the interactive communication content in the interactive communication content information.
In this step, the interactive communication content information includes an IP Address of the source device (Internet Protocol Address), an IP Address of the target device, a behavior identification identifier, a manufacturer identifier corresponding to the target device, and a corresponding ID of the interactive communication content. Wherein the source device IP address is an IP address of a device that constructs and transmits a communication data packet. The IP address of the target device is the IP address of the device for receiving the communication data packet which is sent by the source device and constructed according to the interactive communication content information. The content of the behavior identification mark is a decimal number, the behavior identification mark is used for identifying the operation behavior type of the communication data packet generated by the source equipment, such as access behavior, report behavior, heartbeat behavior and the like, the target equipment identifies the operation behavior of the communication data packet according to the behavior identification mark and executes a corresponding processing strategy according to different operation behaviors. The target device corresponds to the manufacturer identification, i.e. the identification of the user of the target network communication device. In this step, the source device performs serialization processing on the source device IP address, the target device IP address, the behavior identification identifier, the manufacturer identifier corresponding to the target device, and the corresponding ID of the interactive communication content in sequence by using an XML format, and the serialized source device IP address, target device IP address, behavior identification identifier, manufacturer identifier corresponding to the target device, and the corresponding ID of the interactive communication content constitute a packet header of the communication data packet.
Step 114, according to the data size, data type and data content of the interactive communication content in the interactive communication content information, a packet body is constructed.
In this step, the interactive communication content information includes a data size, a data type, and a data content of the interactive communication content. The data content is specific content that the source device needs to interactively communicate with the target device, such as a parameter value, an instruction action, or the like. In this step, the source device performs serialization processing on the data size, the data type and the data content of the interactive communication content in sequence by using an XML format, and the data size, the data type and the data content of the interactive communication content after the serialization processing form a body of the communication data packet.
And step 116, constructing a packet tail according to the interactive communication time in the interactive communication content information.
In this step, the interactive communication content information includes time of interactive communication between the source device and the target device, that is, time of initiating an interactive communication action by the source device. The source device carries out serialization processing on the interactive communication time by using an XML format, and the interactive communication time after the serialization processing forms the packet tail of the communication data packet.
And step 118, constructing a communication data packet according to the constructed packet head, the constructed packet body and the constructed packet tail.
In this step, after the packet header, the body and the tail are completed, the source device encapsulates the packet header, the body and the tail, and adds a packet header for identifying the interconnection type, thereby constructing a complete communication data packet.
According to the embodiment, the communication data is specifically defined, and the communication process is specifically defined, so that the equipment communication can support the random access and communication exchange among the equipment, and the expected effect of rapid and convenient combined networking of various manufacturers is achieved.
Fig. 2 is a flowchart illustrating a device interactive communication method in another embodiment, as shown in fig. 2, after step S130, the device interactive communication method further includes step S140 of determining whether interactive communication with the target device is successful according to a response packet sent by the target device. And if the interactive communication is successful, sending a heartbeat packet to the target equipment. Otherwise, returning to the step of constructing the communication data packet according to the interactive communication content information of the target equipment.
In this step, after receiving the response packet sent by the target device, the source device analyzes and processes the response packet to determine whether the interactive communication between the source device and the target device is successful. And if the interactive communication between the source equipment and the target equipment is successful, the source equipment sends a heartbeat packet to the target equipment. After the interactive communication is successful, the subsequent data transmission modes of the source device and the target device are the same as the format of the communication data packet, and only the subsequent behavior identification mark adopts the behavior represented by another self-defined number, such as the heartbeat behavior, to restrict the processing strategy of the data packet content.
If the interactive communication between the source device and the target device fails, the process returns to step S110, and the subsequent steps are repeated. When the number of cycles from step S110 to step S140 reaches a preset number, the source device abandons the interactive communication.
In this embodiment, when the source device sends the heartbeat packet to the target device, if the sending fails, the step returns to step S110, and the subsequent steps are repeated. The source device determines whether the heartbeat packet is successfully sent by determining the attribute of the return message, for example, if the heartbeat packet with the attribute of 1 is sent from the source device, the source device receives the response packet from the target device within a preset time threshold (e.g., 3 seconds), and if the attribute of the response packet analyzed by the source device is 1, the heartbeat is considered to be successful. If the source device does not receive a response from the target device within a preset time threshold, the source device judges that the heartbeat with the target device is lost (failure), and if the heartbeat fails, the source device tries to reconnect the target all the time without limit.
In this embodiment, after the interactive communication between the source device and the target device is successful, the source device continues to send the heartbeat packet to the target device, so that the network connection between the source device and the target device is maintained, and the subsequent interactive communication is more convenient and faster.
Fig. 3 is a schematic structural diagram of an apparatus interactive communication device in an embodiment, as shown in fig. 3, the apparatus interactive communication device includes: a first constructing module 110, a first sending module 120 and a first receiving module 130.
The first constructing module 110 is configured to construct a communication data packet according to the interactive communication content information with the target device, where the communication data packet includes a header, a body, and a trailer. The first building module 110 performs serialization processing on the interactive communication content information with the target device by using an XML format, that is, the interactive communication content information is converted into a transmittable form, and the serialized interactive communication content information respectively constitutes a header, a body and a trailer of a communication data packet.
The first sending module 120 is configured to send the communication data packet to the target device according to information included in a header of the communication data packet, where the communication data packet is used to instruct the target device to construct a response data packet according to information included in the header, a body, and a trailer of the communication data packet. The first sending module 120 sends the communication data packet to the target device according to the information contained in the packet header of the communication data packet, that is, the related information of the target device.
The first receiving module 130 is configured to receive a response packet sent by the target device according to the communication packet. After the target device receives a communication data packet which is sent by the source device and constructed according to the interactive communication content information, the target device executes a corresponding operation behavior according to the interactive communication content contained in the communication data packet, generates a response data packet corresponding to the communication data packet, and sends the generated response data packet to the source device. After receiving the response packet sent by the target device, the first receiving module 130 of the source device represents that the source device and the target device complete one interactive communication.
Fig. 4 is a schematic structural diagram of an apparatus for interactive communication in another embodiment, as shown in fig. 4, the apparatus further includes a first determining module 140. The first determining module 140 determines whether the interactive communication with the target device is successful according to the response packet sent by the target device. And if the interactive communication is successful, sending a heartbeat packet to the target equipment. Otherwise, returning to the step of constructing the communication data packet according to the interactive communication content information of the target equipment.
Fig. 5 is a flowchart illustrating a device interactive communication method according to another embodiment, and as shown in fig. 5, the device interactive communication method includes the following steps.
Step S210, receiving a communication data packet constructed according to the interactive communication content information sent by the source device. The communication data packet comprises a header, a body and a trailer. In this step, the target device receives a communication data packet including a packet header, a packet body, and a packet tail, which is sent by the source device.
Step S230, constructing a response data packet according to the information contained in the header, body and trailer of the communication data packet. In this step, after the target device obtains the communication data packet, the message header is decoded, the message identified as the interworking message is recognized, and the work of gradually decoding according to the format of the interworking message is performed. Decoding a packet head part in a communication data packet, respectively acquiring a source equipment IP address, a target equipment IP address, a behavior identification mark, a target equipment corresponding manufacturer mark and a corresponding ID of interactive communication content, and performing deserialization processing on the information. Then, the target device carries out deserialization processing on the body part of the communication data packet according to a predefined format, and acquires the data size, the data type and the data content of the interactive communication content. And finally, performing deserialization processing on the packet tail part to acquire the interactive communication time.
After the communication data packet is decoded, the target device empties the content contained in the packet body part according to the deserialization processing result obtained in the process and the specific communication format, responds the corresponding identification by the behavior identification of the packet head part, converses the IP address of the source device and the IP address of the target device, and changes the interactive communication time in the packet tail part into the time for responding the completion of the construction of the data packet. The response packet is usually sent immediately after the completion of the construction, so the interactive communication time in the packet tail part, i.e. the time when the completion of the construction of the response packet, can also be regarded as approximately equal to the time when the response packet is sent to the source device.
Step S240, sending the response packet to the source device according to the information contained in the packet header of the communication packet. In this step, after the target device constructs the response packet, the target device sends the response packet to the source device.
The embodiment provides an interactive communication method between target equipment and source equipment, which is characterized in that a communication data packet used in the communication of network communication equipment is specifically defined, the equipment can be directly interactively communicated, when a communication target is converted, connection does not need to be reestablished, and the time of interactive communication between the equipment is effectively shortened, so that the communication process between the network communication equipment is faster and more convenient, and the communication efficiency is improved.
Fig. 6 is a flowchart illustrating a device interactive communication method in another embodiment, as shown in fig. 6, after step S210 and before step S230, the device interactive communication method further includes step S220 of determining whether the received communication data packet is expired. And if the communication data packet is not expired, constructing a response data packet according to information contained in the packet head, the packet body and the packet tail of the communication data packet. And if the communication data packet is expired, discarding the communication data packet.
The embodiment can effectively ensure the timeliness of the direct interactive communication of the network equipment by adding the step of judging whether the communication data packet is expired or not, directly abandons the overtime communication data packet, can reduce unnecessary communication processes, and improves the communication efficiency.
In one embodiment, step S220 includes step 222 and step 224.
Step 222, acquiring the interactive communication time in the interactive communication content information according to the information contained in the packet tail in the communication data packet. In this step, the interactive communication time is obtained through the deserialization processing result of the packet tail part.
Step 224, determining whether the difference between the interactive communication time and the current system time is within a preset threshold range, and if so, determining that the received communication data packet is not expired. In this step, the criterion for judging whether the communication data packet is expired is: comparing the interactive communication time contained in the communication data packet with the current system time, and if the interactive communication time is within a preset threshold range (such as 180 seconds), determining that the communication data packet is an unexpired communication data packet and is a legal packet; if the preset threshold range is exceeded, the communication data packet is considered to be an expired communication data packet. For the expired communication data packet, the target device directly discards the packet information without performing subsequent processing.
In the step of judging whether the communication data packet is expired or not, the timeliness of the direct interactive communication of the network equipment can be further effectively ensured by comparing the interactive communication time contained in the packet tail of the communication data packet with the current system time, and the communication data packet which is overtime is directly discarded, so that unnecessary communication processes can be reduced, and the communication efficiency is improved.
Fig. 7 is a schematic structural diagram of an apparatus interactive communication device in another embodiment, as shown in fig. 7, the apparatus interactive communication device includes a second receiving module 210, a second constructing module 230, and a second sending module 240.
The second receiving module 210 is configured to receive a communication data packet sent by the source device and constructed according to the interactive communication content information. After the source device sends a communication data packet to the target device, the second receiving module 210 of the target device receives the communication data packet including a header, a body, and a trailer sent by the source device.
The second constructing module 230 is configured to construct the response data packet according to information included in the header, the body, and the trailer of the communication data packet. After receiving the communication data packet, the second building module 230 decodes the header, recognizes that the packet is an interworking packet, and performs a gradual decoding operation according to the format of the interworking packet. Decoding a packet head part in a communication data packet, respectively acquiring a source equipment IP address, a target equipment IP address, a behavior identification mark, a target equipment corresponding manufacturer mark and a corresponding ID of interactive communication content, and performing deserialization processing on the information. Then, the target device carries out deserialization processing on the body part of the communication data packet according to a predefined format, and acquires the data size, the data type and the data content of the interactive communication content. And finally, performing deserialization processing on the packet tail part to acquire the interactive communication time. After the communication data packet is decoded, the second constructing module 230 empties the content contained in the packet body part according to the deserialization result obtained in the above process and the specific communication format, responds the corresponding identifier by the behavior identification identifier of the packet head part, dialogs the IP address of the source device and the IP address of the target device, and changes the interactive communication time in the packet tail part into the time for responding to the completion of the data packet construction. The response packet is usually sent immediately after the completion of the construction, so the interactive communication time in the packet tail part, i.e. the time when the completion of the construction of the response packet, can also be regarded as approximately equal to the time when the response packet is sent to the source device.
The second sending module 240 is configured to send the response packet to the source device according to information included in the packet header of the communication packet. After the second constructing module 230 constructs the response packet, the second sending module 240 sends the response packet to the source device.
Fig. 8 is a schematic structural diagram of an apparatus interactive communication device in another embodiment, as shown in fig. 8, the apparatus interactive communication device further includes a second determining module 220. The second determination module 220 determines whether the received communication data packet is expired. And if the communication data packet is not expired, constructing a response data packet according to information contained in the packet head, the packet body and the packet tail of the communication data packet. And if the communication data packet is expired, discarding the communication data packet.
In one embodiment, a computer-readable storage medium is further provided, on which a computer program is stored, wherein the program, when executed by a processor, implements any one of the device interactive communication methods in the above embodiments. The storage medium may be an optical disc, a read-only memory, a random access memory, or the like. In the process of implementing the embodiment of the method for the interactive communication of the devices, the communication data packet used in the communication of the network communication devices is specifically defined, the devices can directly perform the interactive communication, when the communication target is converted, connection does not need to be reestablished, the time of the interactive communication between the devices is effectively shortened, the communication process between the network communication devices is faster and more convenient, and the communication efficiency is improved.
In one embodiment, a computer device is further provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the device interactive communication method in any one of the above embodiments. When the processor of the computer equipment executes the program, in the process of realizing the embodiment of the interactive communication method of the equipment, the interactive communication can be directly carried out between the equipment by specifically defining the communication data packet used in the communication of the network communication equipment, when the communication target is converted, the connection does not need to be reestablished, the time of the interactive communication between the equipment is effectively shortened, the communication process between the network communication equipment is quicker and more convenient, and the communication efficiency is improved.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A device interactive communication method, comprising:
serializing interactive communication content information of target equipment according to an XML format, and constructing a communication data packet based on the serialized interactive communication content information, wherein the communication data packet comprises a packet head, a packet body and a packet tail; the interactive communication content information comprises a source equipment IP address, a target equipment IP address, a behavior identification mark, a manufacturer mark corresponding to the target equipment, a corresponding ID of the interactive communication content, the data size, the data type, the data content and the interactive communication time of the interactive communication content;
sending the communication data packet to the target device according to information contained in the packet header in the communication data packet, wherein the communication data packet is used for indicating the target device to execute corresponding operation behaviors according to the information contained in the packet header, the packet body and the packet tail in the communication data packet, and constructing and generating a response data packet corresponding to the communication data packet;
receiving a response data packet sent by the target device according to the communication data packet;
the step of constructing the communication data packet according to the interactive communication content information with the target device comprises the following steps:
building a packet header according to the IP address of the source equipment, the IP address of the target equipment, the behavior identification mark, the mark of a manufacturer corresponding to the target equipment and the corresponding ID of the interactive communication content in the interactive communication content information;
building a packet body according to the data size, the data type and the data content of the interactive communication content in the interactive communication content information;
constructing a packet tail according to the interactive communication time in the interactive communication content information;
and constructing a communication data packet according to the constructed packet head, the constructed packet body and the constructed packet tail.
2. The device-interactive communication method according to claim 1, wherein after the step of receiving the response packet sent by the target device according to the communication packet, the method further comprises:
judging whether the interactive communication with the target equipment is successful or not according to the response data packet sent by the target equipment, and if the interactive communication is successful, sending a heartbeat packet to the target equipment; otherwise, returning to the step of constructing the communication data packet according to the interactive communication content information of the target equipment.
3. An apparatus for device-to-device communication, comprising:
the first construction module is used for carrying out serialization processing on interactive communication content information of target equipment according to an XML format and constructing a communication data packet based on the serialized interactive communication content information, wherein the communication data packet comprises a header, a body and a trailer; the interactive communication content information comprises a source equipment IP address, a target equipment IP address, a behavior identification mark, a manufacturer mark corresponding to the target equipment, a corresponding ID of the interactive communication content, the data size, the data type, the data content and the interactive communication time of the interactive communication content;
the first sending module is used for sending the communication data packet to the target equipment according to information contained in a packet header in the communication data packet, wherein the communication data packet is used for carrying out interactive communication with the target equipment and instructing the target equipment to execute corresponding operation behaviors according to the information contained in the packet header, the packet body and the packet tail in the communication data packet, and a response data packet corresponding to the communication data packet is constructed and generated;
a first receiving module, configured to receive a response packet sent by the target device according to the communication packet;
the first building module is further used for building a packet header according to a source device IP address, a target device IP address, a behavior identification identifier, a manufacturer identifier corresponding to the target device and a corresponding ID of the interactive communication content in the interactive communication content information;
building a packet body according to the data size, the data type and the data content of the interactive communication content in the interactive communication content information;
constructing a packet tail according to the interactive communication time in the interactive communication content information;
and constructing a communication data packet according to the constructed packet head, the constructed packet body and the constructed packet tail.
4. A device interactive communication method, comprising:
receiving interactive communication content which is sent by source equipment and is serialized in an XML format, and constructing a communication data packet according to the serialized interactive communication content information, wherein the communication data packet comprises a header, a body and a trailer; the interactive communication content information comprises a source equipment IP address, a target equipment IP address, a behavior identification mark, a manufacturer mark corresponding to the target equipment, a corresponding ID of the interactive communication content, the data size, the data type, the data content and the interactive communication time of the interactive communication content; the communication data packet constructed according to the interactive communication content information comprises: building a packet header according to the IP address of the source equipment, the IP address of the target equipment, the behavior identification mark, the mark of a manufacturer corresponding to the target equipment and the corresponding ID of the interactive communication content in the interactive communication content information; building a packet body according to the data size, the data type and the data content of the interactive communication content in the interactive communication content information; constructing a packet tail according to the interactive communication time in the interactive communication content information; constructing a communication data packet according to the constructed packet head, the constructed packet body and the constructed packet tail;
executing corresponding operation behaviors according to information contained in the packet head, the packet body and the packet tail in the communication data packet, and constructing and generating a response data packet corresponding to the communication data packet;
and sending the response data packet to the source equipment according to the information contained in the packet header in the communication data packet.
5. The device interactive communication method according to claim 4, wherein after the step of receiving the communication data packet constructed according to the interactive communication content information sent by the source device, and before the step of constructing the response data packet according to the information contained in the header, the body and the trailer of the communication data packet, the method further comprises:
and judging whether the received communication data packet is overdue or not, and if the communication data packet is not overdue, constructing a response data packet according to information contained in a packet head, a packet body and a packet tail in the communication data packet.
6. The device interactive communication method according to claim 5, wherein the step of determining whether the received communication data packet is expired comprises:
acquiring interactive communication time in the interactive communication content information according to information contained in the packet tail in the communication data packet;
and judging whether the difference value between the interactive communication time and the current system time is within a preset threshold range, if so, judging that the received communication data packet is not overdue.
7. An apparatus for device-to-device communication, comprising:
the second receiving module is used for receiving interactive communication contents which are sent by the source equipment and are serialized by using an XML format, and a communication data packet is constructed according to the serialized interactive communication content information, wherein the communication data packet comprises a header, a body and a trailer; the interactive communication content information comprises a source equipment IP address, a target equipment IP address, a behavior identification mark, a manufacturer mark corresponding to the target equipment, a corresponding ID of the interactive communication content, the data size, the data type, the data content and the interactive communication time of the interactive communication content; the communication data packet constructed according to the interactive communication content information comprises: building a packet header according to the IP address of the source equipment, the IP address of the target equipment, the behavior identification mark, the mark of a manufacturer corresponding to the target equipment and the corresponding ID of the interactive communication content in the interactive communication content information; building a packet body according to the data size, the data type and the data content of the interactive communication content in the interactive communication content information; constructing a packet tail according to the interactive communication time in the interactive communication content information; constructing a communication data packet according to the constructed packet head, the constructed packet body and the constructed packet tail;
the second construction module is used for executing corresponding operation behaviors according to information contained in the packet head, the packet body and the packet tail in the communication data packet, and constructing and generating a response data packet corresponding to the communication data packet;
and the second sending module is used for sending the response data packet to the source equipment according to the information contained in the packet header in the communication data packet.
8. A storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1-2 or 4-6.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1-2 or 4-6 when executing the program.
CN201711489669.1A 2017-12-30 2017-12-30 Equipment interactive communication method, device, storage medium and computer equipment Active CN108322443B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711489669.1A CN108322443B (en) 2017-12-30 2017-12-30 Equipment interactive communication method, device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711489669.1A CN108322443B (en) 2017-12-30 2017-12-30 Equipment interactive communication method, device, storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN108322443A CN108322443A (en) 2018-07-24
CN108322443B true CN108322443B (en) 2021-06-22

Family

ID=62894321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711489669.1A Active CN108322443B (en) 2017-12-30 2017-12-30 Equipment interactive communication method, device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN108322443B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495982B (en) * 2018-12-14 2020-12-18 锐迪科微电子科技(上海)有限公司 Communication method and device and readable storage medium
CN110401669B (en) * 2019-07-31 2021-06-11 广州方硅信息技术有限公司 Identity verification method and related equipment
CN110417787A (en) * 2019-07-31 2019-11-05 广州华多网络科技有限公司 A kind of data processing method, device, client and storage medium
CN111343612B (en) * 2020-02-20 2023-09-22 杭州涂鸦信息技术有限公司 Internet of things data method and system
CN113590356B (en) * 2021-07-29 2023-08-11 网易(杭州)网络有限公司 Data communication method and device and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163143A (en) * 2006-08-18 2008-04-16 通用汽车公司 Lightweight protocol for use in a TCP/IP communications network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761391B (en) * 2012-06-29 2015-03-04 山东海特物联网科技有限公司 Oil field Internet of Things system communication method
CN104717220B (en) * 2015-03-25 2018-09-21 江苏物联网研究发展中心 Based on the encrypted control signaling safe transmission method of hardware
US20170126846A1 (en) * 2015-10-29 2017-05-04 VTX Holdings (Singapore) Pte. Ltd. Network communication system
CN107425943A (en) * 2017-08-31 2017-12-01 广州视源电子科技股份有限公司 Message data transmission method and device, electronic equipment and computer storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101163143A (en) * 2006-08-18 2008-04-16 通用汽车公司 Lightweight protocol for use in a TCP/IP communications network

Also Published As

Publication number Publication date
CN108322443A (en) 2018-07-24

Similar Documents

Publication Publication Date Title
CN108322443B (en) Equipment interactive communication method, device, storage medium and computer equipment
CN109428773B (en) A communication method and device
US10419822B2 (en) Method, device, and system for switching at a mobile terminal of a smart television and acquiring information at a television terminal
US10750570B2 (en) Call termination method, application processor, and modem
US20170127472A1 (en) Method and wireless device for controlling disconnection of a wireless device in a wi-fi direct group of a wireless network
EP3151610A1 (en) Method for triggering registration machine protocol interaction, access point and station point
WO2016202066A1 (en) Information acquisition method, client device and service end device
CN110875952A (en) A data response processing method, device and storage medium based on the Internet of Things
CN113596832B (en) Network connection establishment method, device, storage medium and electronic device
WO2017143743A1 (en) Heterogeneous protocol communication method and controller
CN114650520A (en) Method and device for realizing wireless network connection based on standard Bluetooth broadcast
KR101298150B1 (en) Apparatus and method for active profile exchange in bluetooth communication system
US10972356B2 (en) Method for selecting negotiation counterpart, method for responding to discovery message, and related apparatus
WO2018000570A1 (en) Bluetooth pairing method, apparatus and system
CN112333062A (en) Control method and control device for household equipment and computer readable storage medium
CN104065519A (en) Method for improving conversation interactive performance and automatic configuration server
CN111866835A (en) A kind of network configuration sharing method, device and computer readable storage medium
CN111147582A (en) A voice interaction method, apparatus, computer equipment and storage medium
CN103765791B (en) Near field communication radio frequency discovery control, device and terminal equipment
CN107070872B (en) A data processing method and device for a client
CN113596938B (en) Network switching method and device for mobile terminal, storage medium, and electronic device
CN110824343B (en) Communication chip detection method, device, equipment and medium
CN116017786A (en) SL DRX configuration method, device and terminal
CN118764543B (en) Inter-process communication method and device, electronic equipment, storage medium and vehicle-mounted platform
CN116887275B (en) Remote configuration method, communication device, system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200110

Address after: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant after: Jingxin Communication System (China) Co., Ltd.

Address before: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Applicant before: Jingxin Communication System (China) Co., Ltd.

Applicant before: Jingxin Communication System (Guangzhou) Co., Ltd.

Applicant before: Jingxin Communication Technology (Guangzhou) Co., Ltd.

Applicant before: TIANJIN COMBA TELECOM SYSTEMS CO., LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Patentee after: Jingxin Network System Co.,Ltd.

Address before: 510663 Shenzhou Road 10, Guangzhou Science City, Guangzhou economic and Technological Development Zone, Guangzhou, Guangdong

Patentee before: Comba Telecom System (China) Ltd.

CP01 Change in the name or title of a patent holder