CN110166487B - Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment - Google Patents

Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment Download PDF

Info

Publication number
CN110166487B
CN110166487B CN201910533951.8A CN201910533951A CN110166487B CN 110166487 B CN110166487 B CN 110166487B CN 201910533951 A CN201910533951 A CN 201910533951A CN 110166487 B CN110166487 B CN 110166487B
Authority
CN
China
Prior art keywords
slave
equipment
local area
area network
subscription
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
CN201910533951.8A
Other languages
Chinese (zh)
Other versions
CN110166487A (en
Inventor
罗克炬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen X Focus Technology Co ltd
Original Assignee
Shenzhen X Focus Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen X Focus Technology Co ltd filed Critical Shenzhen X Focus Technology Co ltd
Priority to CN201910533951.8A priority Critical patent/CN110166487B/en
Publication of CN110166487A publication Critical patent/CN110166487A/en
Application granted granted Critical
Publication of CN110166487B publication Critical patent/CN110166487B/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
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • H04L12/185Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership
    • 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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Abstract

The invention discloses a local area network equipment information transmission method, main equipment, a storage medium and intelligent equipment, wherein equipment adopted in a local area network comprises an MQTT Server module and an MQTT Client module; the MQTT Server module is used for operating an MQTT protocol; the MQTT Client module is used for connecting an MQTT Server module of other equipment through a subscription relationship; the method comprises the following steps: the main equipment achieves subscription with the MQTT Client module of the slave equipment through the MQTT Server module; the information is transmitted to the slave device by subscription, or the information transmitted by the slave device is acquired by subscription. According to the local area network equipment information transmission method, the main equipment, the storage medium and the intelligent equipment, the local area network equipment information transmission method can send information to other multiple equipment from one equipment through subscription, the information transmission efficiency is higher, equipment meeting conditions in the local area network can be quickly searched, the searching speed is higher, the master-slave relation can be quickly established and released, and communication can be conveniently established and released among partial equipment in the local area network.

Description

Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment
Technical Field
The present invention relates to the field of local area networks, and in particular, to a method for transmitting information to a local area network device, a host device, a storage medium, and an intelligent device.
Background
In a local area network, one device is a master device, a plurality of devices are alternative devices to be slave devices, the master device and the slave devices need to communicate with each other, the master device needs to know the IP addresses and device names of other devices, and when long-time communication needs to be maintained, a long TCP connection needs to be established, which has the following problems:
1. the devices in the local area network do not know the IP and device name of all other devices, and need to be manually searched when inquiring other devices, which is inconvenient.
2. The devices in the lan cannot arbitrarily select a master device or a slave device to form a communication network, and it is inconvenient to transmit information between a plurality of specific devices.
3. The communication between the master device and the slave device in the local area network lacks a point-to-point message transmission mechanism, and the existing broadcasting mode or multicast mode sends information one by one, so that the efficiency is low.
Disclosure of Invention
The invention mainly aims to provide an information transmission method of local area network equipment, main equipment, a storage medium and intelligent equipment, which are used for solving the problem of low point-to-point information transmission efficiency in a local area network.
The invention provides a local area network equipment information transmission method, wherein equipment adopted in a local area network comprises an MQTT Server module and an MQTT Client module; the MQTT Server module is used for operating an MQTT protocol; the MQTT Client module is used for connecting an MQTT Server module of other equipment through a subscription relationship;
the local area network equipment information transmission method comprises the following steps:
the main equipment achieves subscription with the MQTT Client module of the slave equipment through the MQTT Server module;
the information is transmitted to the slave device by subscription, or the information transmitted by the slave device is acquired by subscription.
Further, before the step of subscribing between the MQTT Server module and the MQTT Client module of the slave device, the master device includes:
the method comprises the steps that a first device randomly selected by a user in a local area network receives setting instructions of a master device and a slave device input by the user, and the master device and at least one slave device are set in the local area network.
Furthermore, the devices in the local area network all comprise a DLNA Render module and a DLNA search module; the DLNA Render module is used for operating a DLNA Render protocol; the DLNA search module is used for searching equipment which runs a DLNA Render protocol in the local area network;
the method comprises the following steps of receiving a setting instruction of a master device and a slave device input by a user through a first device randomly selected by the user in a local area network, and setting the master device and at least one slave device in the local area network, wherein the setting instruction comprises the following steps:
receiving a setting instruction of a master device and a slave device input by a user through a first device randomly selected by the user in a local area network;
searching all second devices running the DLNA Render protocol in the local area network through a DLNA search module of the first device according to a set instruction, wherein the first device and the second devices are devices in the local area network;
and selecting a master device and at least one slave device from the first device and the second device according to the setting instruction.
Further, the step of subscribing between the MQTT Server module and the MQTT Client module of the slave device by the master device includes:
generating a theme through an MQTT Server module;
and according to the acquired subscription request, enabling the slave equipment to subscribe to a corresponding theme, wherein the subscription request is sent by the MQTT Client module of the slave equipment.
Further, the step of transmitting the information to the slave device through the subscription includes:
screening out one or more selected topics according to the slave devices and set rules, wherein each slave device subscribes to at least one selected topic;
correspondingly sending information with the subject name to the selected subject, wherein the subject name is matched with the selected subject;
and respectively sending the information to the slave devices subscribed with the selected topics through the selected topics.
Further, the step of filtering out one or more selected topics according to the slave devices and the set rules, and at least subscribing one selected topic in each slave device comprises:
if the slave equipment is one, the topic which is independently subscribed by the slave equipment is the selected topic;
if the number of the slave devices is multiple, determining whether a first topic subscribed by the multiple slave devices exists;
if the first theme exists, the first theme is the selected theme;
if the first theme does not exist, determining whether a second theme subscribed by only a part of the slave devices is existed;
if the second theme exists, the second theme and the themes which are individually subscribed by the slave devices and are not subscribed by the second theme in the plurality of slave devices are selected themes;
if the second theme does not exist, the themes individually subscribed by the slave devices in the plurality of slave devices are all selected themes, and each slave device corresponds to one theme.
Further, the step of sending information to the slave devices subscribed to the selected topics through the selected topics respectively comprises:
acquiring a to-be-sent IP address of a slave device subscribing the selected topic by a subscription list, wherein the subscription list comprises the topic and the IP address and name of the slave device subscribing the corresponding topic;
and respectively sending the information to the MQTT Client module of the slave equipment subscribed with the selected theme according to the IP address to be sent through the MQTT Server module.
The present application further proposes a master device, comprising:
the MQTT Server module is used for operating an MQTT protocol;
the MQTT Client module is used for connecting the MQTT Server modules of other devices through a subscription relationship;
the master device further includes:
the subscription module is used for achieving subscription between the MQTT Server module and the MQTT Client module of the slave equipment;
and the information delivery module is used for transmitting the information to the slave equipment through subscription or acquiring the information transmitted by the slave equipment through subscription.
The present application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the local area network device information transmission method of any one of the above is implemented.
The application also provides an intelligent device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the local area network device information transmission method.
According to the local area network equipment information transmission method, the main equipment, the storage medium and the intelligent equipment, the local area network equipment information transmission method can send information to other multiple equipment from one equipment through subscription, the information transmission efficiency is higher, equipment meeting conditions in the local area network can be quickly searched, the searching speed is higher, the master-slave relation can be quickly established and released, and communication can be conveniently established and released among partial equipment in the local area network.
Drawings
Fig. 1 is a schematic step diagram of an embodiment of an information transmission method for a local area network device according to the present invention;
FIG. 2 is a block diagram schematically illustrating the structure of a storage medium according to an embodiment of the present invention;
fig. 3 is a block diagram schematically illustrating the structure of a computer apparatus according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The equipment applied to the local area network comprises a DLNA Render module, a DLNA search module, an MQTT Server module and an MQTT Client module; the DLNA Render module is used for operating a DLNA Render protocol; the DLNA search module is used for searching equipment which runs a DLNA Render protocol in the local area network; the MQTT Server module is used for operating an MQTT protocol; and the MQTT Client module is connected with the MQTT Server modules of other devices through a subscription relation.
DLNA Render, DLNA search runs in each device simultaneously.
The MQTT Server and the MQTT Client also run in each device simultaneously.
The DLNA Render module, the DLNA search module, the MQTT Server module and the MQTT Client module are all parts of the host computer, which run corresponding programs.
The DLNA Render module is a module which monitors and responds to the multicast of the DLNA protocol and operates the DLNA protocol.
The DLNA search module is a module that transmits a DLNA multicast packet and processes a response.
The MQTT Server module is a Server module for implementing MQTT protocol, and the MQTT protocol (Message Queuing telemeasurement Transport) translation is a remote signaling Message queue transmission, which was proposed in 1999 by IBM corporation, and the latest version is 3.1.1 at present. MQTT is a TCP-based publish-subscribe protocol.
The MQTT Client module refers to the MQTT Client module which realizes the MQTT protocol.
Referring to fig. 1, the present application provides a method for transmitting local area network device information, wherein devices used in a local area network include an MQTT Server module and an MQTT Client module;
the local area network equipment information transmission method comprises the following steps:
s1, the main device and the MQTT Client module of the slave device form a subscription through the MQTT Server module;
and S2, transmitting the information to the slave equipment through the subscription, or acquiring the information transmitted by the slave equipment through the subscription.
In step S1, the subscription may enable the master device and the slave device to form a connection relationship, and the master device and the slave device are organized based on the subscription, or the subscription may be cancelled, so that both the organization and the group are convenient, and when the device is used, the device can quickly implement information transfer between a plurality of specific users, and when the device is not used, the device can be cancelled, thereby avoiding waste of resources.
In step S2, the information may be text information or audio information, and the information may be transmitted in the form of data packets.
In some embodiments, the subscription is the result of the subscription before the piggyback, and therefore step S1 is not required, and the delivery of information is achieved directly according to step S2.
The steps S1-S2 are performed by the system through the operation instruction of the user, or automatically according to the user 'S destination instruction, for example, the user' S destination instruction includes information and the device to be transmitted.
In some embodiments, before the step S1 of the master device making a subscription with the MQTT Client module of the slave device through the MQTT Server module, the method includes:
and S3, receiving a setting instruction of the master device and the slave device input by the user through a first device randomly selected by the user in the local area network, and setting the master device and at least one slave device in the local area network.
In step S3, the setting instruction of the user may be input by the user in real time, or may be preset, and is sent out after a trigger condition is met, for example, a shortcut key is pressed for triggering, the master device and the slave device are both devices in the local area network, and both the master device and the slave device are searched through the DLNA search module, and do not need to input an IP address, or are checked one by one in a neighbor on the network, so that the searching speed is faster and the efficiency is higher.
In some embodiments, the devices in the local area network each include a DLNA Render module and a DLNA search module; the step S3 of receiving a setting instruction of the master device and the slave device input by the user through a first device randomly selected by the user in the local area network, and setting a master device and at least one slave device in the local area network, includes:
s31, receiving a setting instruction of the master device and the slave device input by a user through a first device randomly selected by the user in the local area network;
s32, searching all second devices running the DLNA Render protocol in the local area network through a DLNA search module of the first device according to the set instruction, wherein the first device and the second devices are devices in the local area network;
and S33, selecting a master device and at least one slave device from the first device and the second device according to the setting instruction.
In step S31, the first device is typically a terminal device such as a computer or a mobile phone.
In the step S32, only the device running the DLNA Render protocol can be retrieved, the basis of retrieval depends on the communication with the local area network, and the search is more convenient and efficient through the DLNA search module; the control instruction of the user can be sent in real time by the user, can also be preset, and is sent after the triggering condition is met, for example, the triggering is carried out after a shortcut key is pressed, and the control instruction input by the user in real time can be stored for next automatic excitation, so that the working efficiency is improved.
In step S33, the master device is generally any device that the user is operating, and the master device and the slave device may be set according to the selection of the user, and one or more slave devices may be provided.
In some embodiments, after the step S33 of selecting a master device and at least one slave device in the local area network according to the control instruction of the user, the method includes:
s34, acquiring the IP addresses and the names of the master device and the slave device through the master device;
and S35, storing the IP addresses and the names of the master device and the slave device into a database.
In the above steps S34-S35, the obtained IP address and name are directly stored in the database, the storage manner may be a table, the table associates the retrieved time, the name of the master device, the IP address, and the IP address and name of the slave device, and the IP address and name stored in the database may be used for searching when the slave device information needs to be known, and do not need to be obtained again to the slave device, thereby avoiding the situation that the slave device is just offline and cannot obtain information, and improving the work efficiency.
In some embodiments, the step S1 of the master device making a subscription with the MQTT Client module of the slave device through the MQTT Server module includes:
s11, generating a theme through an MQTT Server module;
and S12, according to the obtained subscription request, enabling the slave device to subscribe to a corresponding theme, wherein the subscription request is sent by the MQTT Client module of the slave device.
In the above steps S11-S12, the master device may generate a topic and then subscribe the topic from the slave device, or the master device may generate a topic according to the subscription request of the slave device and complete the subscription relationship with the slave device.
In some embodiments, after the step S12 of subscribing the slave device to the corresponding topic according to the obtained subscription request, the method includes:
s13, storing the topic name representing the subscribed topic into the subscription list, and storing the IP address and name of the slave device subscribing the topic into the subscription list, wherein the topic name is mapped with the IP address and name of the slave device.
In step S13, the topic name represents the topic, and the subscribed topic name is stored in the subscription list, so that the IP address and name of the slave device subscribed to the topic can be obtained in the list or obtained, and the information about the device subscribed to the topic can be quickly obtained through the subscription list, so as to quickly contact the device that wants to find the device related to the topic; the device information may be acquired in a large range, for example, all devices subscribed to the topic, or in a small range, for example, a certain device subscribed to the topic.
In some embodiments, transmitting the information to the slave device through the subscription by the master device in step S2 includes:
s21, screening out one or more selected topics according to the slave devices and set rules, wherein each slave device subscribes to at least one selected topic;
s22, correspondingly sending information with a theme name to the selected theme, wherein the theme name is matched with the selected theme;
and S23, respectively sending the information to the slave devices subscribed with the selected topics through the selected topics.
In the above step S21-23, the purpose is to achieve the effect of sending information to a specific user, the selected topic can be determined to be the topic to be delivered, and the information with the topic name is sent to the selected topic, because there is a subscription relationship, all devices subscribed to the corresponding topic can receive the information, and further achieve the effect of sending information to the corresponding slave devices through the master device, and all slave devices can subscribe to the same topic, at this time, if there is a message of the topic, all slave devices will receive the message. Multiple slaves may also subscribe to different respective topics, and in this case, receive different messages. A single slave device may subscribe to the same or different topics simultaneously, and the number of topics subscribed is not limited.
In another embodiment, after determining the devices that need to receive, a topic may be created, and then the devices that need to receive information subscribe to the topic, and the receiving devices receive the information by sending the information with the topic name to the selected topic.
In some embodiments, the step S21 of filtering out one or more selected topics according to the slave devices and the set rule, each slave device subscribing to at least one selected topic includes:
s211, if one slave device is provided, the topic subscribed by the slave device is the selected topic;
s212, if the number of the slave devices is multiple, determining whether a first theme subscribed by the multiple slave devices exists;
s213, if the first theme exists, the first theme is the selected theme;
s214, if the first theme does not exist, determining whether a second theme which is only subscribed by part of the slave devices is existed;
s215, if the second theme exists, the second theme and the themes which are individually subscribed by the slave equipment without subscribing the second theme in the plurality of slave equipment are selected themes;
s216, if the second theme does not exist, the themes individually subscribed by the slave devices in the plurality of slave devices are all selected themes, and each slave device corresponds to one theme.
In the above steps S211 to S216, the corresponding topic can be screened out through continuous judgment, and the information can be quickly sent to the corresponding slave device through the topic, and the information can be transmitted by using the existing topic through the above steps.
In some embodiments, the step S23 of sending the information to the slave devices subscribed to the selected topics respectively through the selected topics includes:
s231, acquiring a to-be-sent IP address of the slave equipment subscribing the selected topic from the subscription list;
and S232, respectively sending the information to the MQTT Client module of the slave equipment subscribed with the selected theme according to the to-be-sent IP address through the MQTT Server module.
In the above steps S231 to S232, after the selected theme is determined, the information is transmitted to the specific device through the selected theme, and when the information needs to be transmitted, the device to be transmitted can be specified through the IP address.
In some embodiments, the step of acquiring the information transmitted by the slave device through the subscription in S2 includes:
and S24, acquiring the information sent from the equipment through the selected theme.
In the step S24, the selected topic is one, the number of topics meeting the condition may be multiple, one topic is randomly selected from the multiple topics meeting the condition, or the topic is determined in the topics subscribed according to the user instruction, after the determined topic is selected, the information with the topic name is sent to the selected topic through the MQTT Client module of the slave device, and the master device receives the sent information through the selected topic.
The present application further proposes a master device, comprising:
the MQTT Server module is used for operating an MQTT protocol;
the MQTT Client module is used for connecting the MQTT Server modules of other devices through a subscription relationship;
the master device further includes:
the subscription module is used for achieving subscription between the MQTT Server module and the MQTT Client module of the slave equipment;
and the information delivery module is used for transmitting the information to the slave equipment through subscription or acquiring the information transmitted by the slave equipment through subscription.
In some embodiments, the master device of the present application further comprises:
the selection module is used for receiving a setting instruction of the master device and the slave device input by a user through a first device randomly selected by the user in the local area network, and setting the master device and at least one slave device in the local area network.
In some embodiments, the selection module comprises:
the command acquisition submodule is used for receiving a setting instruction of the master device and the slave device input by a user through a first device randomly selected by the user in the local area network;
the searching submodule is used for searching all second equipment running the DLNA Render protocol in the local area network through a DLNA search module of the first equipment according to a set instruction, and the first equipment and the second equipment are both equipment in the local area network;
and the selection submodule is used for selecting a master device and at least one slave device from the first device and the second device according to the set instruction.
In some embodiments, the selection module further comprises:
the data acquisition submodule is used for acquiring the IP addresses and the names of the master equipment and the slave equipment through the master equipment;
and the data storage submodule is used for storing the IP addresses and the names of the master equipment and the slave equipment into a database.
In some embodiments, the subscription module comprises:
the theme generation submodule is used for generating a theme through the MQTT Server module;
and the subscription submodule is used for subscribing the slave equipment to a corresponding theme according to the acquired subscription request, and the subscription request is sent by the slave equipment MQTT Client module.
In some embodiments, the subscription module further comprises:
and the second storage submodule is used for storing the topic names representing the subscribed topics into the subscription list and storing the IP addresses and the names of the slave devices subscribing the topics into the subscription list, wherein the topic names are mapped with the IP addresses and the names of the slave devices.
In some embodiments, the information delivery module comprises:
the screening submodule is used for screening one or more selected topics according to the slave devices and the set rule, and each slave device subscribes to at least one selected topic;
the theme sending submodule is used for correspondingly sending the information with the theme name to the selected theme, and the theme name is matched with the selected theme;
and the sending submodule is used for sending the information to the slave equipment subscribed with the selected topics through the selected topics.
In some embodiments, the screening submodule comprises:
the first unit is used for determining that the topic subscribed by the slave device is the selected topic if the slave device is one;
the second unit is used for determining whether a first theme subscribed by the slave devices is existed or not if the slave devices are multiple;
the third unit is used for determining the first theme as the selected theme if the first theme exists;
a fourth unit, configured to determine whether there is a second topic subscribed only by some slave devices among the plurality of slave devices if there is no first topic;
a fifth unit, configured to determine, if there is a second topic, the second topic, and topics individually subscribed by the plurality of slave devices that are not subscribed to the second topic, as selected topics;
a sixth unit, configured to determine that all topics individually subscribed by slave devices in the multiple slave devices are selected topics if there is no second topic, where each slave device corresponds to one topic.
In some embodiments, the transmitting submodule comprises:
the address acquisition unit is used for acquiring the to-be-sent IP address of the slave equipment subscribed with the selected theme from the subscription list;
and the sending unit is used for sending the information to the MQTT Client module of the slave equipment subscribed with the selected theme according to the IP address to be sent through the MQTT Server module of the master equipment.
In some embodiments, the information delivery module further comprises:
and the acquisition submodule is used for acquiring the information sent from the equipment through the selected theme.
Referring to fig. 2, the present application also proposes a storage medium 100, which is a computer-readable storage medium, on which a computer program 200 is stored, and when the computer program 200 is executed, the local area network device information transmission method of any one of the above is implemented.
Referring to fig. 3, the present application further proposes an embodiment of the present application, and further proposes an intelligent device 300, which includes a memory 400, a processor 500, and a computer program 200 stored on the memory 400 and executable on the processor 500, and when the processor 500 executes the computer program 200, the local area network device information transmission method in any of the above embodiments is implemented.
Those skilled in the art will appreciate that the smart device 300 of the embodiments of the present application is a device referred to above for performing one or more of the methods of the present application. These devices may be specially designed and manufactured for the required purposes, or they may comprise known devices in general-purpose computers. These devices have stored therein computer programs 200 or application programs, which computer programs 200 are selectively activated or reconfigured. Such a computer program 200 may be stored in a device (e.g., computer) readable medium, including, but not limited to, any type of disk including floppy disks, hard disks, optical disks, CD-ROMs, and magnetic-optical disks, ROMs (Read-Only memories), RAMs (Random Access memories), EPROMs (Erasable Programmable Read-Only memories), EEPROMs (Electrically Programmable Read-Only memories), flash memories, magnetic cards, or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a bus. That is, a readable medium includes any medium that stores or transmits information in a form readable by a device (e.g., a computer).
According to the local area network equipment information transmission method, the main equipment, the storage medium and the intelligent equipment, the local area network equipment information transmission method can send information to other multiple equipment from one equipment through subscription, the information transmission efficiency is higher, equipment meeting conditions in the local area network can be quickly searched, the searching speed is higher, the master-slave relation can be quickly established and released, and communication can be conveniently established and released among partial equipment in the local area network.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. An information transmission method for local area network equipment is characterized in that the equipment adopted in the local area network comprises the following steps: the MQTT Server module is used for operating an MQTT protocol; the MQTT Client module is used for connecting the MQTT Server modules of other devices through a subscription relationship;
the local area network equipment information transmission method comprises the following steps:
the main equipment achieves subscription with the MQTT Client module of the slave equipment through the MQTT Server module;
transmitting information to the slave device through the subscription, or acquiring the information transmitted by the slave device through the subscription;
the method comprises the following steps that the main equipment and the MQTT Client module of the slave equipment form subscription through the MQTT Server module, and comprises the following steps:
generating a theme through an MQTT Server module;
according to the obtained subscription request, enabling the slave equipment to subscribe the corresponding theme, wherein the subscription request is sent by the MQTT Client module of the slave equipment;
after the step of subscribing the slave device to the corresponding topic according to the obtained subscription request, the method includes:
storing the name of the subscribed topic in a subscription list, and storing the IP address and the name of the slave equipment of the subscribed topic in the subscription list, wherein the topic name is mapped with the IP address and the name of the slave equipment;
before the step of subscribing between the MQTT Server module and the MQTT Client module of the slave device, the master device comprises the following steps:
and receiving a setting instruction of the master device and the slave device input by the user through a first device randomly selected by the user in the local area network, and setting the master device and at least one slave device in the local area network.
2. The local area network device information transmission method according to claim 1,
the devices in the local area network all include:
the DLNA Render module is used for operating a DLNA Render protocol; the DLNA search module is used for searching equipment which runs the DLNA Render protocol in the local area network;
the step of receiving a setting instruction of a master device and a slave device input by a user through a first device randomly selected by the user in the local area network, and setting the master device and at least one slave device in the local area network includes:
receiving a setting instruction of the master device and the slave device input by a user through a first device randomly selected by the user in the local area network;
searching all second devices running the DLNA Render protocol in the local area network through a DLNA search module of the first device according to the setting instruction, wherein the first device and the second devices are devices in the local area network;
and selecting a master device and at least one slave device from the first device and the second device according to the setting instruction.
3. The method for transmitting information of local area network devices according to claim 1, wherein the step of transmitting information to the slave device through the subscription comprises:
screening out one or more selected topics according to the slave devices and set rules, wherein each slave device subscribes to at least one selected topic;
correspondingly sending information with a theme name to the selected theme, wherein the theme name is matched with the selected theme;
and respectively sending the information to the slave devices subscribed to the selected topics through the selected topics.
4. The method according to claim 3, wherein the step of filtering out one or more selected topics according to the slave devices and a set rule, and subscribing at least one selected topic in each slave device comprises:
if the slave device is one, the topic subscribed by the slave device is the selected topic;
if the number of the slave devices is multiple, determining whether a first topic subscribed by the multiple slave devices exists;
if the first theme exists, the first theme is the selected theme;
if the first theme does not exist, determining whether a second theme subscribed only by a part of the slave devices exists;
if the second topic exists, the second topic and topics individually subscribed by slave devices which are not subscribed to the second topic in the plurality of slave devices are selected topics;
and if the second theme does not exist, the themes individually subscribed by the slave devices in the plurality of slave devices are all selected themes, and each slave device corresponds to one theme.
5. The method according to claim 3, wherein the step of sending the information to the slave devices subscribed to the selected topics respectively by the selected topics comprises:
acquiring the IP address to be sent of the slave equipment subscribed to the selected topic by a subscription list, wherein the subscription list comprises topics and the IP addresses and names of the slave equipment subscribed to the corresponding topic;
and respectively sending the information to an MQTT Client module of the slave equipment subscribed with the selected theme according to the IP address to be sent through the MQTT Server module.
6. A master device, comprising:
the MQTT Server module is used for operating an MQTT protocol;
the MQTT Client module is used for connecting the MQTT Server modules of other devices through a subscription relationship;
the master device further includes:
the subscription module is used for achieving subscription between the MQTT Server module and the MQTT Client module of the slave equipment;
an information delivery module, configured to transmit information to the slave device through the subscription, or acquire the information transmitted by the slave device through the subscription;
the subscription module comprises:
the theme generation submodule is used for generating a theme through the MQTT Server module;
the subscription submodule is used for subscribing the slave equipment to a corresponding theme according to the acquired subscription request, and the subscription request is sent by the slave equipment MQTT Client module;
the second storage submodule is used for storing the name of the subscribed topic into a subscription list and storing the IP address and the name of the slave equipment of the subscribed topic into the subscription list, and the topic name is mapped with the IP address and the name of the slave equipment;
the master device further includes:
the selection module is used for receiving a setting instruction of the master device and the slave device input by a user through a first device randomly selected by the user in a local area network, and setting the master device and at least one slave device in the local area network.
7. A storage medium, characterized in that it is a computer-readable storage medium on which a computer program is stored, which when executed, implements the local area network device information transmission method according to any one of claims 1 to 5.
8. An intelligent device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the local area network device information transmission method according to any one of claims 1 to 5 when executing the computer program.
CN201910533951.8A 2019-06-19 2019-06-19 Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment Active CN110166487B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910533951.8A CN110166487B (en) 2019-06-19 2019-06-19 Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910533951.8A CN110166487B (en) 2019-06-19 2019-06-19 Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment

Publications (2)

Publication Number Publication Date
CN110166487A CN110166487A (en) 2019-08-23
CN110166487B true CN110166487B (en) 2022-04-19

Family

ID=67625328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910533951.8A Active CN110166487B (en) 2019-06-19 2019-06-19 Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment

Country Status (1)

Country Link
CN (1) CN110166487B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113295842A (en) * 2021-04-08 2021-08-24 湖南科技大学 Accurate evaluation system of mine side slope rock mass engineering stability
CN115699683A (en) * 2021-05-28 2023-02-03 京东方科技集团股份有限公司 Remote control system, method and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871968A (en) * 2015-10-08 2016-08-17 乐视致新电子科技(天津)有限公司 Device search method, device and system
CN106130882A (en) * 2016-07-13 2016-11-16 北京百度网讯科技有限公司 For the method and apparatus transmitting message
CN107181792A (en) * 2017-04-21 2017-09-19 珠海派诺科技股份有限公司 Remote equipment management method and device based on MQTT and n2n VPN
CN109040326A (en) * 2018-11-02 2018-12-18 北京京东金融科技控股有限公司 The method and apparatus of PUSH message
CN109286525A (en) * 2018-09-28 2019-01-29 昆明能讯科技有限责任公司 It is a kind of based on MQTT communication and it is active and standby between heartbeat two unit standby method
CN109474916A (en) * 2018-11-19 2019-03-15 海信集团有限公司 A kind of device authentication method, apparatus and machine readable media

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102377686B (en) * 2010-08-10 2015-07-01 阿里巴巴集团控股有限公司 Message subscription system, method and device
CN106303928A (en) * 2016-08-31 2017-01-04 深圳聚点互动科技有限公司 A kind of many room audio group network-building method and system thereof
US10637960B2 (en) * 2016-10-21 2020-04-28 Infiswift Technologies, Inc. Method for bridging publish/subscribe brokers for guaranteed low-latency delivery
US10574619B2 (en) * 2017-01-02 2020-02-25 International Business Machines Corporation Cluster assisted MQTT client coverage for fat-pipe cloud applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105871968A (en) * 2015-10-08 2016-08-17 乐视致新电子科技(天津)有限公司 Device search method, device and system
CN106130882A (en) * 2016-07-13 2016-11-16 北京百度网讯科技有限公司 For the method and apparatus transmitting message
CN107181792A (en) * 2017-04-21 2017-09-19 珠海派诺科技股份有限公司 Remote equipment management method and device based on MQTT and n2n VPN
CN109286525A (en) * 2018-09-28 2019-01-29 昆明能讯科技有限责任公司 It is a kind of based on MQTT communication and it is active and standby between heartbeat two unit standby method
CN109040326A (en) * 2018-11-02 2018-12-18 北京京东金融科技控股有限公司 The method and apparatus of PUSH message
CN109474916A (en) * 2018-11-19 2019-03-15 海信集团有限公司 A kind of device authentication method, apparatus and machine readable media

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Performance evaluation of MQTT-based internet of things systems";Mohamed Handosa;《2017 Winter Simulation Conference (WSC)》;IEEE;20180108;全文 *
"基于发布/订阅模型的WSN设计";党宏社、付晓军、张超、王黎;《电子器件》;20160615;第39卷(第03期);第586-590页 *

Also Published As

Publication number Publication date
CN110166487A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
US20040205172A1 (en) Control point server system and method thereof enabling efficient access to home network devices
US7676812B2 (en) Large scale event notification system
CN100407627C (en) Method and system for realizing end-to-end data sharing
CN109474936B (en) Internet of things communication method and system applied among multiple lora gateways
CN103648180A (en) Method and device for sharing files between terminal devices
CN115004673B (en) Message pushing method, device, electronic equipment and computer readable medium
CN101772920A (en) Method and apparatus for discovering universal plug and play device using resource information
CN110012083B (en) Data transmission method, server and data transmission device
CN107645386B (en) Method and device for acquiring data resources
CN103534988A (en) Publish and subscribe messaging method and apparatus
CN110166487B (en) Local area network equipment information transmission method, main equipment, storage medium and intelligent equipment
JP2019503008A (en) Multimedia resource playback system, method and server
CN113391979A (en) Processing method, equipment and system for monitoring data display and storage medium
JP3877738B2 (en) Apparatus and method for connecting individually existing networks
CN103716230A (en) Message sending method, device and server
CN110096381B (en) Method, device, equipment and medium for realizing remote procedure call
CN102025782A (en) Point-to-point communication method, device and system
CN100456705C (en) Monitoring system and method for Internet multimedia communication
CN103138961B (en) server control method, controlled server and central control server
CN1703702A (en) Index server support to file sharing applications
US20090296149A1 (en) Communication system, information storage device, management device, and terminal device
CN112217649A (en) Terminal device management method, server and terminal device
CN103023668A (en) Method, device and system for discovering and controlling embedded access network device
CN114610449B (en) Multi-cluster resource operation method and system based on unified request entry
CN114025005B (en) Data communication method, system, electronic equipment 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