CN115514734B - Message sending method and system - Google Patents

Message sending method and system Download PDF

Info

Publication number
CN115514734B
CN115514734B CN202211217402.8A CN202211217402A CN115514734B CN 115514734 B CN115514734 B CN 115514734B CN 202211217402 A CN202211217402 A CN 202211217402A CN 115514734 B CN115514734 B CN 115514734B
Authority
CN
China
Prior art keywords
class
type
message
new
equipment
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
CN202211217402.8A
Other languages
Chinese (zh)
Other versions
CN115514734A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202211217402.8A priority Critical patent/CN115514734B/en
Publication of CN115514734A publication Critical patent/CN115514734A/en
Application granted granted Critical
Publication of CN115514734B publication Critical patent/CN115514734B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2801Broadband local area networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2838Distribution of signals within a home automation network, e.g. involving splitting/multiplexing signals to/from different paths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Automation & Control Theory (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a message sending method and system, and relates to the technical field of IP. The invention generates the class message, inquires the class device and sends the class message to the class device without other servers, so that the class devices can be simply and directly connected, and the class message in the local area network can automatically circulate in the class device.

Description

Message sending method and system
Technical Field
The invention relates to the technical field of IP, in particular to a method and a system for sending a message.
Background
With the increase of the order of magnitude of the internet of things devices, how to classify the internet of things devices and connect the internet of things devices to send messages becomes an increasingly problematic issue. In mature lan applications, multicast techniques are used to send messages to IP address groups.
The prior art also has: after the Internet of things equipment is electrified, firstly connecting a distributed access server; after receiving the addressing request, the access server forwards the message to the equipment distribution management center; the equipment distribution management center rapidly calculates an optimal access point list of the Internet of things equipment for the current access equipment according to the equipment type, the equipment geographical position and other information; and after the terminal equipment of the Internet of things acquires the connection IP list, carrying out TCP long connection in sequence until the terminal equipment of the Internet of things is connected with the server.
However, in the process of implementing the present invention, the inventor finds that multicast has no error correction mechanism, and is difficult to be acknowledged after packet loss and packet error occur. Other prior art can not directly inquire and acquire a list of class IP addresses in the local area network to realize scheduling; the intelligent analysis of the messages according to the multiple classes of devices cannot enable the messages to further flow in the local area network.
Disclosure of Invention
The inventor discovers that a method for sending the message is urgently needed, the method directly inquires and acquires an IP address list in the local area network according to classification to directly send the message, and the message is further circulated in the local area network according to intelligent analysis and processing of the messages of a plurality of class devices, so that the automation of the message in the local area network is realized.
In order to overcome the defects that the prior art cannot directly inquire and acquire a class IP address list in a local area network according to classification to realize direct message transmission, and cannot further flow the message in the local area network according to intelligent analysis and processing of the messages of a plurality of class devices, and cannot realize automation of the message in the local area network, the invention provides a message transmission method and a message transmission system, which are used for solving the problems in the background technology.
In order to achieve the above purpose, the invention is realized by the following technical scheme: a method of message transmission for a first class of devices, the method comprising:
obtaining and generating a classification message or a connection instruction which is used for being sent to a second type of equipment of a specified type;
sending a query message for querying the mapping relation between the MAC of the appointed type and class equipment and the IP address of the class equipment to a DHCP server, wherein the query message comprises the following components: the specified type;
receiving a response of the query message returned by the DHCP server for querying the mapping relationship between the designated type and the class device MAC and the class device IP address, where the response includes: a second class of device IP addresses for the specified type;
and sending the classification message to the IP address of the second type equipment aiming at the appointed type according to the response or establishing connection with the IP address of the second type equipment aiming at the appointed type according to the connection instruction.
Further, the method further comprises the steps of:
the first type of equipment is a class switch, and the class switch can generate and send a class-on instruction message or a class-off instruction message to a class socket or a class lamp according to the specified type;
the second type of equipment is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the equipment according to the received on-like instruction message or the off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
Further, the sending unit is configured to send a query message for querying the mapping relationship between the specified type and class device MAC and the class device IP address to a DHCP server, where the query message is:
a message in the form of a DHCP request or a message in the form of an HTTP request.
In another aspect, a method of message transmission for a second class of devices, the method comprising:
receiving a classification message or a connection instruction sent by first-class equipment;
determining or predicting a new classification message or a new class connection instruction for sending to a class device of a new specified type according to the classification message or the connection instruction sent by the first device;
sending a query message for querying the mapping relation between the MAC of the newly specified type and class equipment and the IP address of the class equipment to a DHCP server, wherein the query message comprises: the new specified type;
receiving a response of the query message returned by the DHCP server for querying the mapping relationship between the new designated type and the class device MAC and the class device IP address, where the response includes: an IP address for the newly specified type of class device;
according to the responding class equipment IP address aiming at the new appointed type, sending the new classification message to the class equipment IP address aiming at the new appointed type or establishing connection with the class equipment IP address aiming at the new appointed type according to the new class connection instruction;
receiving response information returned for the IP address of the new designated type of equipment, predicting or determining a new response message for the first type of equipment according to the response information, wherein the new response information comprises: a class device IP address for the first class device;
and sending the new response message to the first type device, so that the first type device sends the new classification message to the class device IP address aiming at the first type device or establishes connection with the class device IP address aiming at the first type device according to the new connection instruction.
Further, the method further comprises the steps of:
the first type of equipment is a class switch, and the class switch can generate and send a class-on instruction message or a class-off instruction message to a class socket or a class lamp according to the specified type;
the second type of equipment is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the equipment according to the received on-like instruction message or the off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
Further, the sending unit is configured to send a query message for querying the mapping relationship between the specified type and class device MAC and the class device IP address to a DHCP server, where the query message is:
a message in the form of a DHCP request or a message in the form of an HTTP request.
In another aspect, a system for message transmission for a first class of devices, the first class of devices comprising: the class message acquisition unit, the query class device address unit and the class message sending unit;
the class message acquisition unit is used for acquiring and generating a classification message or a connection instruction which is transmitted to the second class device of the appointed type;
the query class equipment address unit is used for querying the mapping relation between the specified type and the class equipment MAC and the class equipment IP address to the DHCP server according to the specified type so as to acquire a second class equipment IP address aiming at the specified type;
the sending type message unit is used for sending the classification message to the second type equipment IP address aiming at the appointed type according to the response of the inquiring type equipment address unit or establishing connection with the second type equipment IP address aiming at the appointed type according to the connection instruction.
Further, the system further comprises:
the first type of equipment is a class switch, and the class switch can generate and send a class-on instruction message or a class-off instruction message to a class socket or a class lamp according to the specified type;
the second type of equipment is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the equipment according to the received on-like instruction message or the off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
Further, the sending the query to the DHCP server according to the specified type, where the mapping relationship between the specified type and the class device MAC and the class device IP address is: and sending a message in the form of a DHCP request or a message in the form of an HTTP request to a DHCP server according to the appointed type to inquire the appointed type and the mapping relation between the MAC of the class equipment and the IP address of the class equipment.
In another aspect, a system for messaging is provided for a second class of devices, the second class of devices comprising: the device comprises a class message receiving and determining unit, a class device inquiring address unit, a response determining unit and a response transmitting unit;
the class message receiving and determining unit is used for receiving classified messages or connection instructions sent by the first class devices; determining or predicting a new classification message or a new class connection instruction for sending to a class device of a new specified type according to the classification message or the connection instruction sent by the first device;
the class device address inquiring unit is used for inquiring the mapping relation between the specified type and the class device MAC and the class device IP address to the DHCP server according to the new specified type so as to acquire the class device IP address aiming at the specified type;
the response determining unit is configured to send the new classification message to the class device IP address specific to the new specified type or establish connection with the class device IP address specific to the new specified type according to the new class connection instruction; receiving response information returned for the IP address of the new designated type of equipment, predicting or determining a new response message for the first type of equipment according to the response information, wherein the new response information comprises: a class device IP address for the first class device;
the sending response unit is configured to send the new response message to the first type device, so that the first type device sends the new classification message to the class device IP address specific to the first type device or establishes connection with the class device IP address specific to the first type device according to the new connection instruction.
Further, the system further comprises:
the first type of equipment is a class switch, and the class switch can generate and send a class-on instruction message or a class-off instruction message to a class socket or a class lamp according to the specified type;
the second type of equipment is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the equipment according to the received on-like instruction message or the off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
Further, the mapping relation between the specified type and the class device MAC and the class device IP address is queried from the DHCP server according to the new specified type to obtain the class device IP address for the specified type, and the query message is: and inquiring the mapping relation between the MAC of the specified type and the IP address of the class equipment from a DHCP server according to the new specified type by adopting the message in the form of a DHCP request or the message in the form of an HTTP request so as to acquire the IP address of the class equipment aiming at the specified type.
In another aspect, a storage medium includes a stored program, where the program, when executed, controls a device in which the storage medium resides to perform the steps of:
obtaining and generating a classification message or a connection instruction which is used for being sent to a second type of equipment of a specified type;
sending a query message for querying the mapping relation between the MAC of the appointed type and class equipment and the IP address of the class equipment to a DHCP server, wherein the query message comprises the following components: the specified type;
receiving a response of the query message returned by the DHCP server for querying the mapping relationship between the designated type and the class device MAC and the class device IP address, where the response includes: a second class of device IP addresses for the specified type;
and sending the classification message to the IP address of the second type equipment aiming at the appointed type according to the response or establishing connection with the IP address of the second type equipment aiming at the appointed type according to the connection instruction.
Further, the storage medium further includes a stored program, wherein the program, when executed, controls a device in which the storage medium is located to perform the steps of:
receiving a classification message or a connection instruction sent by first-class equipment;
determining or predicting a new classification message or a new class connection instruction for sending to a class device of a new specified type according to the classification message or the connection instruction sent by the first device;
sending a query message for querying the mapping relation between the MAC of the newly specified type and class equipment and the IP address of the class equipment to a DHCP server, wherein the query message comprises: the new specified type;
receiving a response of the query message returned by the DHCP server for querying the mapping relationship between the new designated type and the class device MAC and the class device IP address, where the response includes: an IP address for the newly specified type of class device;
according to the responding class equipment IP address aiming at the new appointed type, sending the new classification message to the class equipment IP address aiming at the new appointed type or establishing connection with the class equipment IP address aiming at the new appointed type according to the new class connection instruction;
receiving response information returned for the IP address of the new designated type of equipment, predicting or determining a new response message for the first type of equipment according to the response information, wherein the new response information comprises: a class device IP address for the first class device;
and sending the new response message to the first type device, so that the first type device sends the new classification message to the class device IP address aiming at the first type device or establishes connection with the class device IP address aiming at the first type device according to the new connection instruction.
The invention provides a message sending method and a message sending system. The beneficial effects are as follows:
in the invention, the following components are added: the invention takes the appointed type as an index, obtains and generates the equipment-like information of the appointed type, inquires the mapping relation between the MAC of the appointed type and the equipment-like equipment and the IP address of the equipment-like equipment to a DHCP server according to the appointed type to obtain the IP address of the second equipment-like equipment aiming at the appointed type, and sends the classified information to the IP address of the second equipment-like equipment aiming at the appointed type or establishes connection with the IP address of the second equipment-like equipment aiming at the appointed type according to the connection instruction, thereby realizing the direct connection of the equipment-like equipment to send information in a local area network; and further carrying out intelligent analysis and prediction on various messages in the second type of equipment, generating response messages according to the steps, sending the response messages to the first type of equipment, and processing the response messages by the first type of equipment to form automatic message circulation in a local area network. The invention generates the class message, inquires the class device and sends the class message to the class device without other servers, so that the class devices can be simply and directly connected, and the class message in the local area network can automatically circulate in the class device.
Drawings
FIG. 1 is a flow chart of a preferred embodiment of the present invention;
FIG. 2 is a switch-like flow chart of a preferred embodiment of the present invention;
FIG. 3 is a flow chart of an embodiment of the present invention;
FIG. 4 is a class device system block diagram of an embodiment of the present invention;
FIG. 5 is a class device system block diagram of an embodiment of the present invention;
fig. 6 is a block diagram of a class switch system according to an embodiment of the present invention.
Detailed Description
The invention is further illustrated by the following examples in conjunction with the accompanying drawings:
best mode for carrying out the invention:
the preferred embodiment of the invention discloses a method for sending a message, as shown in fig. 1, for a first type of device, which is characterized in that the method comprises the following steps:
step S101, obtaining and generating a classification message or a connection instruction which is used for being sent to a second type of equipment of a specified type;
step S102, sending a query message for querying the mapping relation between the MAC of the appointed type and the class equipment and the IP address of the class equipment to a DHCP server, wherein the query message comprises: the specified type;
step S103, receiving a response of the query message returned by the DHCP server, where the response queries the specified type and the mapping relationship between the class device MAC and the class device IP address, and the response includes: a second class of device IP addresses for the specified type;
step S104, the classification message is sent to the IP address of the second type equipment aiming at the appointed type according to the response or connection is established with the IP address of the second type equipment aiming at the appointed type according to the connection instruction.
Optionally, the first type device may also receive response information sent by the second type device.
Further, the method further comprises the steps of:
the first type of equipment is a class switch, and the class switch can generate and send a class-on instruction message or a class-off instruction message to a class socket or a class lamp according to the specified type;
the second type of equipment is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the equipment according to the received on-like instruction message or the off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
A typical switch-like structure is shown in fig. 6, comprising: the device comprises a WIFI communication module 30, an MCU module 31 and a relay control module 32, wherein the first type of device 10 can be executed in the MCU module 31. The WIFI communication module 30 may include an NRF24L01 wireless chip, and the MCU module may be an Ardunio chip.
The specific user opening class switch steps are as follows, for example: (as shown in fig. 2) 1, the user turns on the class switch; 2. the class switch acquires and generates an on/off class message for the class lamp; 3, inquiring a class lamp classification IP list by the class switch; 4. the DHCP server returns a class lamp classification IP list; 5. the class switch sends an on/off class message; 6. the lamp-like returns a response.
In a smart home or office scenario there may be one switch that needs to control multiple lights, with class switches and class lights, which is quite simple. A class switch can optionally control the extinction of the class lamp according to a control strategy. The invention makes class switch inquire class equipment by generating class information, and sends class information to class lamp without other servers, so that the class equipment can be directly connected simply.
Further, the sending unit is configured to send a query message for querying the mapping relationship between the specified type and class device MAC and the class device IP address to a DHCP server, where the query message is:
a message in the form of a DHCP request or a message in the form of an HTTP request.
Because many DHCP client devices do not support the function of adopting the message query type device in the form of DHCP request at present, the DHCP server can be queried through the message in the form of HTTP request, and the DHCP server router can realize the technical scheme of the invention through software version upgrade.
Embodiment two:
a method of messaging for a second class of devices, the method comprising:
step S201, receiving a classification message or a connection instruction sent by a first type device;
step S202, determining or predicting a new classification message or a new class connection instruction for sending to a class device of a new designated type according to the classification message or the connection instruction sent by the first device;
the second class device may directly forward the classified message (or class message) of the first class device according to a predefined policy, where the second class device is equivalent to a forwarding server. The second class device may also perform a calculation process on the received class message to generate a new class message or a new class connection instruction, where the calculation process includes various manners such as inputting the class message into the neural network model.
Step S203, sending a query message for querying the mapping relationship between the MAC of the new designated type and the class device and the IP address of the class device to the DHCP server, where the query message includes: the new specified type;
step S204, receiving a response of the query message returned by the DHCP server, where the response queries the new designated type and the mapping relationship between the class device MAC and the class device IP address, where the response includes: an IP address for the newly specified type of class device;
step S205, according to the responding class device IP address aiming at the new appointed type, sending the new classification message to the class device IP address aiming at the new appointed type or establishing connection with the class device IP address aiming at the new appointed type according to the new class connection instruction;
step S206, receiving the response information returned for the IP address of the newly specified type of class device, and predicting or determining a new response message for the first type of device according to the response information, where the new response information includes: a class device IP address for the first class device;
the second class device can directly forward the response information of the newly appointed class device according to the predefined strategy, and the second class device is equivalent to a forwarding server. The second type of device may also perform calculation processing on the received response information to generate new response information, where the calculation processing includes various modes such as inputting the response information into the neural network model.
Step S207, sending the new response message to the first class device, so that the first class device sends the new classification message to the class device IP address specific to the first class device or establishes a connection with the class device IP address specific to the first class device according to the new connection instruction.
By designing the direct connection of the class messages, a complete set of protocols can be used for controlling reliable message transmission or connection, and the problems faced by multicast are overcome. Unicast, message-like, multicast and other modes enrich the message transmission forwarding mechanism of the traditional IP communication network.
Further, the method further comprises the steps of:
the first type of equipment is a class switch, and the class switch can generate and send a class-on instruction message or a class-off instruction message to a class socket or a class lamp according to the specified type;
the second type of equipment is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the equipment according to the received on-like instruction message or the off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
Further, the sending unit is configured to send a query message for querying the mapping relationship between the specified type and class device MAC and the class device IP address to a DHCP server, where the query message is:
a message in the form of a DHCP request or a message in the form of an HTTP request.
In summary, the exemplary use case procedure is as follows: (as shown in FIG. 3)
1. Class device 1 acquires class message a generated for class device 2 (type=2);
2. class device 1 queries a classified IP list of type 2 to the DHCP server;
3. the DHCP server returns a classified IP list with the type of 2 to the class device 1;
4. class device 1 sends class message a to class device 2;
5. class device 2 determines a new class message B from the class device 1 … class device n message.
6. The class device 2 queries a classified IP list with the type of 3 from the DHCP server;
7. the DHCP server returns a classified IP list with the type of 3 to the class device 2;
8. class device 2 sends class message B to class device 3;
9. class device 2 accepts class device 3 responses;
10. the class device 2 determines response information to the class device 1 according to the query result of the type 3 … type m;
11. the class device 2 sends response information to the class device 1;
further, the class device 1 may establish a connection with the class device 3 according to the response information, or send a message directly to the class device 3.
By the embodiment, the automatic circulation of the class messages in the local area network in the class equipment is realized.
Embodiment III:
a system for messaging for a first type of device 10 (as shown in fig. 4), the first type of device 10 comprising: class message acquisition section 101, inquiry class device address section 102, and class message transmission section 103;
the class message obtaining unit 101 is configured to obtain and generate a classification message or a connection instruction for sending to a second class device of a specified type;
the query class device address unit 102 is configured to query, according to the specified type, a DHCP server for a mapping relationship between the specified type and a class device MAC and a class device IP address to obtain a second class device IP address for the specified type;
the sending type message unit 103 is configured to send the classification message to the second type device IP address for the specified type according to the response of the query type device address unit 102 or establish a connection with the second type device IP address for the specified type according to the connection instruction.
Further, the system may further be:
the first type of device 10 is a class switch, and the class switch can generate and send a class on instruction message or a class off instruction message to a class socket or a class lamp according to the specified type;
the second type of device 20 is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the device according to the received on-like instruction message or off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
Further, the sending the query to the DHCP server according to the specified type, where the mapping relationship between the specified type and the class device MAC and the class device IP address is: and sending a message in the form of a DHCP request or a message in the form of an HTTP request to a DHCP server according to the appointed type to inquire the appointed type and the mapping relation between the MAC of the class equipment and the IP address of the class equipment.
By the method, the class information is generated, the class equipment is inquired, the class information is sent to the class equipment, and other servers are not needed, so that the class equipment can be simply and directly connected.
Embodiment four:
a system for messaging for a second type of device 20 (as shown in fig. 5), the second type of device comprising: class message reception determination section 201, inquiry class device address section 202, response determination section 203, and transmission response section 204;
the class message receiving determining unit 201 is configured to receive a classification message or a connection instruction sent by the first class device 10; determining or predicting a new classification message or a new class connection instruction to be sent to a new specified type of class device based on the classification message or connection instruction sent by the first device 10;
the class device address querying unit 202 is configured to query, according to the new specified type, a DHCP server for a mapping relationship between the specified type and a class device MAC and a class device IP address to obtain a class device IP address for the specified type;
the answer determining unit 203 is configured to send the new classification message to the class device IP address specific to the new specified type or establish a connection with the class device IP address specific to the new specified type according to the new class connection instruction; receiving the response information returned for the IP address of the new designated type of class device, and predicting or determining a new response message for the first type of device 10 according to the response information, wherein the new response information comprises: a class device IP address for the first class device 10;
the sending response unit 204 is configured to send the new response message to the first type device 10, so that the first type device 10 sends the new classification message to the class device IP address for the first type device 10 or establishes a connection with the class device IP address for the first type device 10 according to the new connection instruction.
Further, the system may further be:
the first type of device 10 is a class switch, and the class switch can generate and send a class on instruction message or a class off instruction message to a class socket or a class lamp according to the specified type;
the second type of device 20 is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the device according to the received on-like instruction message or off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
A typical switch-like structure is shown in fig. 6, comprising: the device comprises a WIFI communication module 30, an MCU module 31 and a relay control module 32, wherein the first type of device 10 can be executed in the MCU module 31. The WIFI communication module 30 may include an NRF24L01 wireless chip, and the MCU module may be an Ardunio chip.
The specific user opening class switch steps are as follows, for example: (as shown in fig. 2) 1, the user turns on the class switch; 2. the class switch acquires and generates an on/off class message for the class lamp; 3, inquiring a class lamp classification IP list by the class switch; 4. the DHCP server returns a class lamp classification IP list; 5. the class switch sends an on/off class message; 6. the lamp-like returns a response.
Further, the mapping relation between the specified type and the class device MAC and the class device IP address is queried from the DHCP server according to the new specified type to obtain the class device IP address for the specified type, and the query message is: and inquiring the mapping relation between the MAC of the specified type and the IP address of the class equipment from a DHCP server according to the new specified type by adopting the message in the form of a DHCP request or the message in the form of an HTTP request so as to acquire the IP address of the class equipment aiming at the specified type.
By designing a message-like direct connection, a complete set of protocols can be used to control reliable delivery of messages or connections, which will overcome the problems faced by multicasting. Unicast, message-like, multicast and other modes enrich the message transmission forwarding mechanism of the traditional IP communication network.
By the embodiment, the automatic circulation of the class messages in the local area network in the class equipment is realized.
Fifth embodiment:
an embodiment of the invention discloses a non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of the above embodiment. The storage medium may include a high-speed random access storage medium, and may also include a non-volatile storage medium such as a hard disk, memory, a plug-in hard disk, a Smart Media Card (SMC), a secure digital (SecureDigital, SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage medium device, a Flash memory device, or other volatile solid state storage medium device, etc.
Typically, a storage medium, wherein the storage medium includes a stored program, and wherein the program when executed controls a device in which the storage medium resides to perform the steps of:
obtaining and generating a classification message or a connection instruction which is used for being sent to a second type of equipment of a specified type;
sending a query message for querying the mapping relation between the MAC of the appointed type and class equipment and the IP address of the class equipment to a DHCP server, wherein the query message comprises the following components: the specified type;
receiving a response of the query message returned by the DHCP server for querying the mapping relationship between the designated type and the class device MAC and the class device IP address, where the response includes: a second class of device IP addresses for the specified type;
and sending the classification message to the IP address of the second type equipment aiming at the appointed type according to the response or establishing connection with the IP address of the second type equipment aiming at the appointed type according to the connection instruction.
Further, the storage medium further includes a stored program, wherein the program, when executed, controls a device in which the storage medium is located to perform the steps of:
receiving a classification message or a connection instruction sent by first-class equipment;
determining or predicting a new classification message or a new class connection instruction for sending to a class device of a new specified type according to the classification message or the connection instruction sent by the first device;
sending a query message for querying the mapping relation between the MAC of the newly specified type and class equipment and the IP address of the class equipment to a DHCP server, wherein the query message comprises: the new specified type;
receiving a response of the query message returned by the DHCP server for querying the mapping relationship between the new designated type and the class device MAC and the class device IP address, where the response includes: an IP address for the newly specified type of class device;
according to the responding class equipment IP address aiming at the new appointed type, sending the new classification message to the class equipment IP address aiming at the new appointed type or establishing connection with the class equipment IP address aiming at the new appointed type according to the new class connection instruction;
receiving response information returned for the IP address of the new designated type of equipment, predicting or determining a new response message for the first type of equipment according to the response information, wherein the new response information comprises: a class device IP address for the first class device;
and sending the new response message to the first type device, so that the first type device sends the new classification message to the class device IP address aiming at the first type device or establishes connection with the class device IP address aiming at the first type device according to the new connection instruction.
The invention takes the appointed type as an index, obtains and generates the equipment-like information of the appointed type, inquires the mapping relation between the MAC of the appointed type and the equipment-like equipment and the IP address of the equipment-like equipment to a DHCP server according to the appointed type to obtain the IP address of the second equipment-like equipment aiming at the appointed type, and sends the classified information to the IP address of the second equipment-like equipment aiming at the appointed type or establishes connection with the IP address of the second equipment-like equipment aiming at the appointed type according to the connection instruction, thereby realizing the direct connection of the equipment-like equipment to send information in a local area network; and further carrying out intelligent analysis and prediction on various messages in the second type of equipment, generating response messages according to the steps, sending the response messages to the first type of equipment, and processing the response messages by the first type of equipment to form automatic message circulation in a local area network. The invention generates the class message, inquires the class device and sends the class message to the class device without other servers, so that the class devices can be simply and directly connected, and the class message in the local area network can automatically circulate in the class device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, the above-described units are merely illustrated by the division of the above-described functional modules, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the above-described functions. The specific working process of the system, the device and the unit described above may refer to the corresponding process in the foregoing method embodiment, and will not be described herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A method of messaging for a second class of devices, the method comprising:
receiving a classification message or a connection instruction sent by first-class equipment;
determining or predicting a new classification message or a new class connection instruction for sending to a third class of equipment of a new designated type according to the classification message or the connection instruction sent by the first class of equipment;
sending a query message for querying the mapping relation between the MAC of the newly specified type and class equipment and the IP address of the class equipment to a DHCP server, wherein the query message comprises: the new specified type;
receiving a response of the query message returned by the DHCP server for querying the mapping relationship between the new designated type and the class device MAC and the class device IP address, where the response includes: a third class of device IP addresses for the newly specified type;
according to the responding third class equipment IP address aiming at the new appointed type, sending the new classification message to the third class equipment IP address aiming at the new appointed type or establishing connection with the third class equipment IP address aiming at the new appointed type according to the new class connection instruction;
receiving response information returned for the IP address of the third type equipment of the new designated type, predicting or determining a new response message for the first type equipment according to the response information, wherein the new response information comprises: a third class of device IP address for the first class of device;
and sending the new response message to the first type device, so that the first type device sends the new classification message to the third type device IP address aiming at the first type device or establishes connection with the third type device IP address aiming at the first type device according to the new type connection instruction.
2. A method of messaging according to claim 1, wherein the method further comprises:
the first type of equipment is a class switch, and the class switch can generate and send a class-on instruction message or a class-off instruction message to a class socket or a class lamp according to the specified type;
the second type of equipment is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the equipment according to the received on-like instruction message or the off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
3. A system for messaging, for a second type of device, the second type of device comprising: the device comprises a class message receiving and determining unit, a class device inquiring address unit, a response determining unit and a response transmitting unit;
the class message receiving and determining unit is used for receiving classified messages or connection instructions sent by the first class devices; determining or predicting a new classification message or a new class connection instruction for sending to a third class of equipment of a new designated type according to the classification message or the connection instruction sent by the first class of equipment;
the class device address inquiring unit is used for inquiring the mapping relation between the specified type and the class device MAC and the class device IP address to the DHCP server according to the new specified type so as to acquire the class device IP address aiming at the specified type;
the response determining unit is configured to send the new classification message to the IP address of the third class device for the new specified type or establish a connection with the IP address of the third class device for the new specified type according to the new class connection instruction; receiving response information returned for the IP address of the third type equipment of the new designated type, predicting or determining a new response message for the first type equipment according to the response information, wherein the new response information comprises: a third class of device IP address for the first class of device;
the sending response unit is configured to send the new response message to the first type device, so that the first type device sends the new classification message to the IP address of the third type device specific to the first type device or establishes connection with the IP address of the third type device specific to the first type device according to the new type connection instruction.
4. A system for sending a message according to claim 3, wherein said sending a query to a DHCP server according to said specified type queries the mapping relationship between the specified type and class device MACs and class device IP addresses is:
and sending a message in the form of a DHCP request or a message in the form of an HTTP request to a DHCP server according to the appointed type to inquire the appointed type and the mapping relation between the MAC of the class equipment and the IP address of the class equipment.
5. A messaging system according to claim 3, wherein said system is:
the first type of equipment is a class switch, and the class switch can generate and send a class-on instruction message or a class-off instruction message to a class socket or a class lamp according to the specified type;
the second type of equipment is a socket-like or a lamp-like, and the socket-like or the lamp-like can switch on or off the power supply of the equipment according to the received on-like instruction message or the off-like instruction message;
the classification message is the class opening instruction message or the class closing instruction message.
6. A non-transitory computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of a method of messaging according to any of claims 1 to 2.
CN202211217402.8A 2022-10-03 2022-10-03 Message sending method and system Active CN115514734B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211217402.8A CN115514734B (en) 2022-10-03 2022-10-03 Message sending method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211217402.8A CN115514734B (en) 2022-10-03 2022-10-03 Message sending method and system

Publications (2)

Publication Number Publication Date
CN115514734A CN115514734A (en) 2022-12-23
CN115514734B true CN115514734B (en) 2023-08-01

Family

ID=84508124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211217402.8A Active CN115514734B (en) 2022-10-03 2022-10-03 Message sending method and system

Country Status (1)

Country Link
CN (1) CN115514734B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016177185A1 (en) * 2015-07-20 2016-11-10 中兴通讯股份有限公司 Method and apparatus for processing media access control (mac) address
CN107529133A (en) * 2017-09-06 2017-12-29 广东欧珀移动通信有限公司 Data transmission method, device, storage medium and computer equipment
CN107608225A (en) * 2017-09-29 2018-01-19 深圳市艾特智能科技有限公司 Control method, system, storage medium and the computer equipment of intelligent home device
CN111726361A (en) * 2020-06-19 2020-09-29 西安微电子技术研究所 Ethernet communication protocol stack system and implementation method
WO2021052373A1 (en) * 2019-09-17 2021-03-25 中国移动通信有限公司研究院 Short message processing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8484457B2 (en) * 2009-03-10 2013-07-09 T-Mobile Usa, Inc. Method of securely pairing devices with an access point for an IP-based wireless network
CN105897936B (en) * 2016-06-23 2019-04-26 北京东土科技股份有限公司 The processing method of control configuration information based on industry internet, apparatus and system
CN110290061A (en) * 2019-05-31 2019-09-27 北京未来购电子商务有限公司 A kind of Internet of Things communication means and gateway based on gateway
CN112584463B (en) * 2019-09-30 2022-04-22 华为技术有限公司 Information synchronization method and system among multiple devices and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016177185A1 (en) * 2015-07-20 2016-11-10 中兴通讯股份有限公司 Method and apparatus for processing media access control (mac) address
CN107529133A (en) * 2017-09-06 2017-12-29 广东欧珀移动通信有限公司 Data transmission method, device, storage medium and computer equipment
CN107608225A (en) * 2017-09-29 2018-01-19 深圳市艾特智能科技有限公司 Control method, system, storage medium and the computer equipment of intelligent home device
WO2021052373A1 (en) * 2019-09-17 2021-03-25 中国移动通信有限公司研究院 Short message processing method and device
CN111726361A (en) * 2020-06-19 2020-09-29 西安微电子技术研究所 Ethernet communication protocol stack system and implementation method

Also Published As

Publication number Publication date
CN115514734A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
KR102605458B1 (en) Analysis function discovery method and device
CN105471686B (en) Terminal control method, device and system
CN102714636B (en) For being convenient to the method and apparatus of the propelling movement communication of crossing network boundary
CN108777722B (en) Multi-system networking communication method and device, mobile terminal and storage medium
CN103379469B (en) The closely register method of information, querying method and subscriber equipment
KR101190307B1 (en) Method of transmitting push message
US20070091908A1 (en) Communication device and communication control method using efficient echonet address determination scheme
CN102209023B (en) Fiber channel over Ethernet (FCoE) communication connection establishment method, device, name server and system
CN109996260B (en) Configuration system, client device, embedded device configuration method and storage medium
CN106412680B (en) Multi-screen control method and device
JP2004252974A (en) Control point server system for allowing home network device to be efficiently accessed and method therefor
CN106101067B (en) Method and terminal for binding intelligent equipment
US20210289343A1 (en) Subscription message processing method and apparatus, and computer device and storage medium
CN105959188B (en) Method and device for controlling user terminal to be on-line
CN111913397A (en) Device control method, device, storage medium, and electronic apparatus
CN112637931A (en) Method and device for establishing network connection
CN115514734B (en) Message sending method and system
CN106506573B (en) Intelligent home furnishing control method and system
CN113196721A (en) Discovery method and device of Internet of things equipment and terminal equipment
CN113518125A (en) Offline data uploading method and system, storage medium and electronic device
CN113852667A (en) Message pushing method and device, storage medium and electronic device
US20030084173A1 (en) Method for setting up a communication between a device and a host application over an IP network, host application and DSL router, and software programs realizing said method
KR101746226B1 (en) Method for exchanging information using smart grid in universal plug and play
CN104486252B (en) A kind of method and device of thin-client access standard client
CN114679354A (en) Gateway device, bridging method and device, 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
GR01 Patent grant
GR01 Patent grant