CN114222255B - Method and device for device ad hoc network, electronic device and storage medium - Google Patents

Method and device for device ad hoc network, electronic device and storage medium Download PDF

Info

Publication number
CN114222255B
CN114222255B CN202111601152.3A CN202111601152A CN114222255B CN 114222255 B CN114222255 B CN 114222255B CN 202111601152 A CN202111601152 A CN 202111601152A CN 114222255 B CN114222255 B CN 114222255B
Authority
CN
China
Prior art keywords
character
terminal device
data packet
networking
broadcast data
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
CN202111601152.3A
Other languages
Chinese (zh)
Other versions
CN114222255A (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202111601152.3A priority Critical patent/CN114222255B/en
Publication of CN114222255A publication Critical patent/CN114222255A/en
Application granted granted Critical
Publication of CN114222255B publication Critical patent/CN114222255B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/223Execution procedure of a spoken command
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application provides a method and a device for device ad hoc network, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring a target character under the condition of receiving a wake-up identifier, wherein the wake-up identifier is used for indicating that a first terminal device is woken up, and the target character is used for establishing networking connection between at least two terminal devices; analyzing the target character to obtain a first character; monitoring a second broadcast data packet, acquiring a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device based on a second character, acquires a target character, analyzes the target character and acquires the second character under the condition that the second terminal device receives the awakening identifier; and exchanging first networking information to the second terminal equipment according to the first character and the second character, wherein the first networking information is networking network information of the first terminal equipment. Through the method and the device, the problem that networking operation among devices is inconvenient in the related technology is solved.

Description

Method and device for device ad hoc network, electronic device and storage medium
Technical Field
The present application relates to the field of smart home, and in particular, to a method and an apparatus for device ad hoc networking, an electronic device, and a storage medium.
Background
At present, there are two general networking modes between devices of a common local area network protocol: one is to send out the networking mode by way of pressing a button; and the other method is to find the equipment to be networked on the terminal equipment APP and then carry out networking.
In the above related art, there are drawbacks to the first mode: when the equipment networking is triggered in a key mode, if any equipment needing interconnection, such as a street lamp air conditioner, is arranged at a higher position, certain inconvenience exists when the key of the street lamp air conditioner is triggered; the disadvantages for the second approach are: the operation of selecting networking equipment by utilizing the APP is troublesome, when a user needs to associate the equipment displayed on the APP with the household equipment currently in actual use, if the user has an on-hook air conditioner in a bedroom, the on-hook air conditioner is the equipment to be networked, then the air conditioner AA is displayed on the APP, and at the moment, the user needs to know the equipment name of the on-hook air conditioner to successfully establish the network.
Therefore, there is a problem in the related art that the inter-device networking operation is inconvenient.
Disclosure of Invention
The application provides a method and a device for device ad hoc network, electronic equipment and a storage medium, which are used for at least solving the problem that networking operation among devices is inconvenient in the related art.
According to an aspect of an embodiment of the present application, there is provided a method for device ad hoc networking, the method including:
acquiring a target character under the condition of receiving a wake-up identifier, wherein the wake-up identifier is used for indicating that a first terminal device is woken up, and the target character is used for establishing networking connection between at least two terminal devices;
analyzing the target character to obtain a first character;
monitoring a second broadcast data packet, acquiring a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device under the condition that the second terminal device receives the awakening identifier, acquiring the target character, analyzing the target character to obtain the second character, and based on the second character;
and exchanging first networking information to the second terminal equipment according to the first character and the second character, wherein the first networking information is networking network information of the first terminal equipment.
According to another aspect of the embodiments of the present application, there is also provided an apparatus of an ad hoc network, including:
the terminal device comprises a first obtaining unit, a second obtaining unit and a control unit, wherein the first obtaining unit is used for obtaining a target character under the condition that a wake-up identifier is received, the wake-up identifier is used for indicating that a first terminal device is woken up, and the target character is used for establishing networking connection between at least two terminal devices;
the analysis unit is used for analyzing the target character to obtain a first character;
the first monitoring unit is used for monitoring a second broadcast data packet to obtain a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device based on the second character, the second terminal device obtains the target character and analyzes the target character under the condition of receiving the awakening identifier;
and the exchanging unit is used for exchanging first networking information to the second terminal equipment according to the first character and the second character, wherein the first networking information is networking network information of the first terminal equipment.
Optionally, the switching unit comprises:
the matching module is used for matching the first character with the second character;
a sending module, configured to send the first networking information to the second terminal device when the first character is the same as the second character.
Optionally, the apparatus further comprises:
the establishing unit is used for establishing a first broadcast data packet according to the first character after the target character is analyzed to obtain the first character, wherein the first broadcast data packet comprises the first character;
a broadcasting unit, configured to broadcast the first broadcast packet to the second terminal device through a wireless network;
a second obtaining unit, configured to obtain an effective duration for sending the first broadcast packet;
and the decreasing unit is used for executing the time length decreasing operation on the effective time length according to a preset scheme.
Optionally, the apparatus further comprises:
a second monitoring unit, configured to continue to monitor the second broadcast packet after the first networking information is exchanged to the second terminal device and under the condition that it is determined that the current time length corresponding to the valid time length is not zero;
and the third monitoring unit is used for stopping monitoring the second broadcast data packet under the condition that the current time length corresponding to the effective time length is determined to be zero.
Optionally, the apparatus further comprises:
a fourth monitoring unit, configured to continue to monitor the second broadcast packet after the first character is matched with the second character and when the first character is different from the second character and a current duration corresponding to the valid duration is not zero;
and the fifth monitoring unit is used for stopping monitoring the second broadcast data packet under the condition that the current time length corresponding to the effective time length is determined to be zero.
Optionally, the switching unit comprises:
and sending the first networking information to the second terminal equipment by using a wireless mesh network to exchange networking network information.
Optionally, the target character is a randomly generated character.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used for storing the computer program; a processor for performing the method steps in any of the above embodiments by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the method steps of any of the above embodiments when the computer program is executed.
In the embodiment of the application, a target character is obtained under the condition that a wake-up identifier is received, wherein the wake-up identifier is used for indicating that a first terminal device is woken up, and the target character is used for establishing networking connection between at least two terminal devices; analyzing the target character to obtain a first character; monitoring a second broadcast data packet, acquiring a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device based on a second character, acquires a target character, analyzes the target character and acquires the second character under the condition that the second terminal device receives the awakening identifier; and exchanging first networking information with the second terminal equipment according to the first character and the second character, wherein the first networking information is networking network information of the first terminal equipment. According to the method and the device, the first character and the second character are matched only by analyzing the first character obtained according to the target character obtained by the first terminal equipment and the second character sent by the second terminal equipment, ad hoc networking between the two terminal equipment is realized according to a matching result, networking communication is realized, the whole process is rapid and automatic, and the problem of inconvenience in networking operation between the equipment in the related technology is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flow chart diagram illustrating an alternative method for ad hoc networking of devices according to an embodiment of the present application;
fig. 2 is a schematic diagram of an overall module control structure of an optional ad hoc network of devices according to an embodiment of the present application;
FIG. 3 is a schematic overall flow chart diagram illustrating an alternative method for device ad hoc networking according to an embodiment of the present application;
FIG. 4 is a block diagram of an alternative apparatus for ad hoc networking according to an embodiment of the present application;
fig. 5 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this embodiment of the present application, when performing device ad hoc network, at least two terminal devices may be involved, and taking that the terminal devices all support voice control, and the terminal devices are air conditioning devices as an example, the following description of the method for device ad hoc network is developed:
taking a server of a first terminal device as an execution subject, as shown in fig. 1, fig. 1 is a schematic flowchart of an optional method for device ad hoc networking according to an embodiment of the present application, where the flow of the method may include the following steps:
step S101, under the condition that an awakening identifier is received, acquiring a target character, wherein the awakening identifier is used for indicating that a first terminal device is awakened, and the target character is used for establishing networking connection between at least two terminal devices;
step S102, analyzing a target character to obtain a first character;
step S103, monitoring a second broadcast data packet, acquiring a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device, acquires a target character, analyzes the target character to obtain the second character and based on the second character under the condition that the second terminal device receives the awakening identifier;
and step S104, exchanging first networking information to the second terminal equipment according to the first character and the second character, wherein the first networking information is networking network information of the first terminal equipment.
Optionally, as shown in fig. 2, each terminal device includes a voice module, a display module, and a wireless module, the voice module may collect and recognize voice and play voice, and the voice module may have local wake-up recognition, and simultaneously supports uploading voice data to a cloud server through the wireless module to perform cloud recognition processing. The wireless module is used for connecting the internet and carrying out wireless local area network communication with other terminal equipment, and the wireless communication mode can be a WIFI, bluetooth, WIFI and Bluetooth integrated mode and the like. The display module can be used for displaying information such as networking codes and equipment states.
Taking a first terminal device as an execution main body: the method comprises the steps that a user sends a wake-up statement to a first terminal device, when the first terminal device obtains the wake-up statement, if the wake-up statement is a statement capable of waking up the first terminal device, a wake-up mark is triggered, and after a server receives the wake-up mark, a target character is obtained. The wake-up identifier is used for indicating that the first terminal device has been woken up, the target character is a group of internet codes spoken by a user voice, a face-to-face clustering scene in a certain app can be referred to, and a networking connection can be established between at least two terminal devices by using the target character.
It should be noted that the target character is a character randomly thought by the user, and is dynamically generated, and if the number temporarily thought by the user is 58, the user wakes up the first terminal device to say "networking code 58". Of course, the number of the first terminal devices may be at least one, and when the number of the first terminal devices is multiple, the user sequentially wakes up the first terminal devices to say the "networking code 58". If the wake-up statements of the plurality of first terminal devices are all the same, after the user speaks the wake-up statements, if all the first terminal devices woken up consistently are devices needing networking, the user can speak networking codes to the first terminal devices at the same time, and the operation of speaking the networking codes to each first terminal device is reduced.
The first terminal device analyzes the target character to obtain a first character, wherein the first character may be a character completely consistent with the target character or a character having an error with the target character. For example, after the user finishes speaking the target character, the voice device module of the first terminal device has a situation that voice recognition is wrong, so when the first terminal device parses the target character, the obtained first character serves as a current recognition result.
And then the first terminal device monitors a second broadcast data packet of the network broadcast in real time, acquires a second character from the second broadcast data packet, wherein the second broadcast data packet is a data packet which is established based on the second character by acquiring a target character, analyzing the target character and obtaining the second character under the condition that the second terminal device receives the awakening identifier.
In this embodiment of the present application, the second terminal device is also a device to be networked, and may be any terminal other than the first terminal device, so that the second terminal device may receive a wake-up statement sent by a user, and then, after receiving a target character spoken by the user, that is, a networking code, under the condition that the wake-up identifier is received, the second terminal device may analyze the target character, where an analysis and identification result at this time is the second character, and broadcast a networking broadcast packet including the second character, that is, a second broadcast data packet, through the wireless network. It should be noted that the number of the second terminal devices is also at least one.
At this time, the first terminal device may obtain the first character parsed by itself and the second character parsed by the second terminal device, and then according to the first character and the second character, the networking information of the first terminal device is exchanged between the first terminal device and the second terminal device, for example, the first terminal device sends the networking information of the first terminal device to the second terminal device, that is, sends the first networking information. At this time, the wireless mesh network may be used to send the first networking information to the second terminal device for the exchange of networking information.
In the embodiment of the application, a target character is obtained under the condition that a wake-up identifier is received, wherein the wake-up identifier is used for indicating that a first terminal device is woken up, and the target character is used for establishing networking connection between at least two terminal devices; analyzing the target character to obtain a first character; monitoring a second broadcast data packet, acquiring a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device based on a second character, acquires a target character, analyzes the target character and acquires the second character under the condition that the second terminal device receives the awakening identifier; and exchanging first networking information with the second terminal equipment according to the first character and the second character, wherein the first networking information is networking network information of the first terminal equipment. According to the method and the device, the first character and the second character are matched only by analyzing the first character obtained according to the target character obtained by the first terminal equipment and the second character sent by the second terminal equipment, ad hoc networking between the two terminal equipment is realized according to a matching result, networking communication is realized, the whole process is rapid and automatic, and the problem of inconvenience in networking operation between the equipment in the related technology is solved.
As an alternative embodiment, exchanging the first networking information to the second terminal device according to the first character and the second character includes:
matching the first character with the second character;
and sending the first networking information to the second terminal equipment under the condition that the first character is the same as the second character.
Optionally, in this embodiment of the application, when at least two terminal devices performing networking connection are determined, it may be determined whether characters corresponding to networking codes are the same as a determination criterion. More specifically, a first character parsed by the first terminal device and a second character parsed by the second terminal device may be compared, and in the process of matching the first character with the second character, it is determined that the first character is the same as the second character, which indicates that networking may be established between the first terminal device and the second terminal device, and at this time, the first terminal device sends first networking information of the first terminal device to the second terminal device.
As an alternative embodiment, after parsing the target character to obtain the first character, the method further includes:
establishing a first broadcast data packet according to the first character, wherein the first broadcast data packet comprises the first character;
broadcasting the first broadcast data packet to second terminal equipment through a wireless network;
acquiring the effective duration of sending a first broadcast data packet;
and executing the time length decreasing operation on the effective time length according to a preset scheme.
Optionally, after obtaining the target character spoken by the user by the first terminal device, obtaining a first character, then creating a first broadcast data packet based on the first character, broadcasting the first broadcast data packet to the second terminal device through the wireless network, and simultaneously creating an effective duration for sending the first broadcast data packet, beginning at the moment of sending the first broadcast data packet, performing a decrement operation of the effective duration, where the decrement operation may be performed according to a preset scheme, for example, the preset scheme may be decrement by 1 or decrement by 2, and enter a countdown mode of the effective duration.
The first terminal device monitors and receives the networking broadcast data packet of other terminal devices (such as the second terminal device) in the effective duration.
In the embodiment of the application, the time for establishing the networking can be controlled by setting the descending preset scheme of the effective time, so that certain network resources are effectively saved, and the waste of the network resources is avoided.
As an optional embodiment, after exchanging the first networking information to the second terminal device, the method further comprises:
under the condition that the current time length corresponding to the effective time length is determined not to be zero, continuing monitoring a second broadcast data packet;
and under the condition that the current time length corresponding to the effective time length is determined to be zero, stopping monitoring the second broadcast data packet.
Optionally, after the first terminal device and the second terminal device exchange the first networking information, if it is determined that the current time length corresponding to the valid time length is not zero, the first terminal device continues to monitor a second broadcast data packet of the second terminal device; and stopping monitoring until the current time length corresponding to the effective time length is determined to be zero, and quitting the establishment of the network.
As an alternative embodiment, after matching the first character with the second character, the method further comprises:
under the condition that the first character is different from the second character and the current time length corresponding to the effective time length is not zero, continuing monitoring a second broadcast data packet;
and under the condition that the current time length corresponding to the effective time length is determined to be zero, stopping monitoring the second broadcast data packet.
Optionally, in this embodiment of the present application, in the corresponding scenario, when the first character and the second character are matched, if the first character is different from the second character and the current time length corresponding to the effective time length is not zero, the second broadcast data packet is monitored continuously; and stopping monitoring the second broadcast data packet until the current time length corresponding to the effective time length is determined to be zero, and quitting the networking establishment.
It should be noted that all execution logics of the second terminal device are the same as those of the first terminal device, specifically, referring to fig. 3, in fig. 3, each terminal device takes an air conditioner as an example, and the corresponding specific execution steps are as follows:
step S1: the user wakes up each air conditioner and speaks the networking code;
step S2: each air conditioner broadcasts a networking broadcast packet containing a networking code outwards through a wireless module, and starts to count down the effective networking time;
and step S3: each voice air conditioner monitors and receives networking broadcast packets of other air conditioners in the effective time and analyzes networking codes;
and step S4: determine if the networking code is consistent? If yes, executing step S5; if not, returning to the step S1;
step S5: and each air conditioner exchanges networking information to form a local network of the ad hoc network, so that the ad hoc network is completed.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, an optical disk) and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the methods of the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided an apparatus of a device ad hoc network for implementing the method of the device ad hoc network. Fig. 4 is a block diagram of an alternative apparatus of an ad hoc network according to an embodiment of the present application, and as shown in fig. 4, the apparatus may include:
a first obtaining unit 401, configured to obtain a target character in a case that a wake-up identifier is received, where the wake-up identifier is used to indicate that a first terminal device has been woken up, and the target character is used to establish a networking connection between at least two terminal devices;
the analyzing unit 402 is connected to the first obtaining unit 401 and configured to analyze the target character to obtain a first character;
a first monitoring unit 403, connected to the parsing unit 402, configured to monitor a second broadcast data packet, to obtain a second character, where the second broadcast data packet is a data packet that is created based on a second character, and the second broadcast data packet is obtained by a second terminal device obtaining a target character and parsing the target character under the condition that the second terminal device receives the wakeup identifier;
the exchanging unit 404 is connected to the first monitoring unit 403, and configured to exchange first networking information to the second terminal device according to the first character and the second character, where the first networking information is networking network information of the first terminal device.
It should be noted that the first obtaining unit 401 in this embodiment may be configured to execute the step S101, the parsing unit 402 in this embodiment may be configured to execute the step S102, the first monitoring unit 403 in this embodiment may be configured to execute the step S103, and the exchanging unit 404 in this embodiment may be configured to execute the step S104.
Through the module, the first character analyzed according to the target character acquired by the first terminal equipment and the second character sent by the second terminal equipment are matched, ad hoc networking between the two terminal equipment is realized according to a matching result, networking communication is realized, the whole process is rapid and automatic, and the problem of inconvenience in networking operation between the equipment in the related technology is solved.
As an alternative embodiment, the switching unit comprises:
the matching module is used for matching the first character with the second character;
and the sending module is used for sending the first networking information to the second terminal equipment under the condition that the first character is the same as the second character.
As an alternative embodiment, the apparatus further comprises:
the device comprises an establishing unit, a receiving unit and a processing unit, wherein the establishing unit is used for establishing a first broadcast data packet according to a first character after analyzing a target character to obtain the first character, and the first broadcast data packet comprises the first character;
the broadcasting unit is used for broadcasting the first broadcast data packet to the second terminal equipment through a wireless network;
a second obtaining unit, configured to obtain an effective duration for sending the first broadcast packet;
and the decreasing unit is used for executing the time length decreasing operation on the effective time length according to a preset scheme.
As an alternative embodiment, the apparatus further comprises:
the second monitoring unit is used for continuing to monitor the second broadcast data packet under the condition that the current time length corresponding to the effective time length is determined not to be zero after the first networking information is exchanged to the second terminal equipment;
and the third monitoring unit is used for stopping monitoring the second broadcast data packet under the condition that the current time length corresponding to the effective time length is determined to be zero.
As an alternative embodiment, the apparatus further comprises:
the fourth monitoring unit is used for continuing monitoring the second broadcast data packet under the condition that the first character is different from the second character and the current time length corresponding to the effective time length is not zero after the first character is matched with the second character;
and the fifth monitoring unit is used for stopping monitoring the second broadcast data packet under the condition that the current time length corresponding to the effective time length is determined to be zero.
As an alternative embodiment, the switching unit comprises:
and sending the first networking information to the second terminal equipment by using the wireless mesh network to exchange networking network information.
As an alternative embodiment, the target character is a randomly generated character.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, which may be a server, a terminal, or a combination thereof, for implementing the method for ad hoc network of devices.
Fig. 5 is a block diagram of an alternative electronic device according to an embodiment of the present application, as shown in fig. 5, including a processor 501, a communication interface 502, a memory 503, and a communication bus 504, where the processor 501, the communication interface 502, and the memory 503 are communicated with each other through the communication bus 504, where,
a memory 503 for storing a computer program;
the processor 501, when executing the computer program stored in the memory 503, implements the following steps:
acquiring a target character under the condition of receiving a wake-up identifier, wherein the wake-up identifier is used for indicating that a first terminal device is woken up, and the target character is used for establishing networking connection between at least two terminal devices;
analyzing the target character to obtain a first character;
monitoring a second broadcast data packet, acquiring a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device based on a second character, acquires a target character, analyzes the target character and acquires the second character under the condition that the second terminal device receives the awakening identifier;
and exchanging first networking information to the second terminal equipment according to the first character and the second character, wherein the first networking information is networking network information of the first terminal equipment.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, as shown in fig. 5, the memory 503 may include, but is not limited to, a first obtaining unit 401, a parsing unit 402, a first listening unit 403, and a switching unit 404 in the apparatus of the device ad hoc network. In addition, the device ad hoc network may further include, but is not limited to, other module units in the apparatus of the device ad hoc network, which is not described in this example again.
The processor may be a general-purpose processor, and may include but is not limited to: a CPU (Central Processing Unit), NP (Network Processor), and the like; but also DSPs (Digital Signal Processing), ASICs (Application Specific Integrated circuits), FPGAs (Field-Programmable Gate arrays) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In addition, the electronic device further includes: and the display is used for displaying the result of the device ad hoc network.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 5 is only an illustration, and the device implementing the method for device ad hoc networking may be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 5 is a diagram illustrating a structure of the electronic device. For example, the terminal device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to still another aspect of an embodiment of the present application, there is also provided a storage medium. Alternatively, in this embodiment, the storage medium may be used to execute program codes of a method of ad hoc network of devices.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
acquiring a target character under the condition of receiving a wake-up identifier, wherein the wake-up identifier is used for indicating that a first terminal device is woken up, and the target character is used for establishing networking connection between at least two terminal devices;
analyzing the target character to obtain a first character;
monitoring a second broadcast data packet, acquiring a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device based on a second character, acquires a target character, analyzes the target character and acquires the second character under the condition that the second terminal device receives the awakening identifier;
and exchanging first networking information to the second terminal equipment according to the first character and the second character, wherein the first networking information is networking network information of the first terminal equipment.
Optionally, the specific example in this embodiment may refer to the example described in the above embodiment, which is not described again in this embodiment.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, a ROM, a RAM, a removable hard disk, a magnetic disk, or an optical disk.
According to yet another aspect of an embodiment of the present application, there is also provided a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium; the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method steps of the device ad hoc network in any one of the embodiments described above.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and including several instructions to enable one or more computer devices (which may be personal computers, servers, or network devices) to execute all or part of the steps of the method of the ad hoc network of devices according to the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, and may also 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 provided in the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (9)

1. A method of device ad hoc network is applied to a server of a first terminal device, and is characterized in that the method comprises the following steps:
acquiring a target character under the condition of receiving a wake-up identifier, wherein the wake-up identifier is used for indicating that at least one first terminal device is woken up, and the target character is used for establishing networking connection between at least two terminal devices;
analyzing the target character to obtain a first character;
monitoring a second broadcast data packet, acquiring a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device under the condition that the second terminal device receives the awakening identifier, acquiring the target character, analyzing the target character to obtain the second character, and based on the second character;
exchanging first networking information to the second terminal device according to the first character and the second character, wherein the first networking information is networking network information of the first terminal device, and the method comprises the following steps: matching the first character with the second character; and sending the first networking information to the second terminal equipment under the condition that the first character is the same as the second character.
2. The method of claim 1, wherein after said parsing said target character to obtain a first character, said method further comprises:
establishing a first broadcast data packet according to the first character, wherein the first broadcast data packet comprises the first character;
broadcasting the first broadcast data packet to the second terminal equipment through a wireless network;
acquiring the effective duration of sending the first broadcast data packet;
and executing time length decreasing operation on the effective time length according to a preset scheme.
3. The method of claim 2, wherein after the exchanging the first networking information to the second terminal device, the method further comprises:
under the condition that the current time length corresponding to the effective time length is determined not to be zero, continuing to monitor the second broadcast data packet;
and under the condition that the current time length corresponding to the effective time length is determined to be zero, stopping monitoring the second broadcast data packet.
4. The method of claim 2, wherein after said matching the first character to the second character, the method further comprises:
under the condition that the first character is different from the second character and the current time length corresponding to the effective time length is not zero, continuing to monitor the second broadcast data packet;
and under the condition that the current time length corresponding to the effective time length is determined to be zero, stopping monitoring the second broadcast data packet.
5. The method of claim 1, wherein exchanging first networking information to the second terminal device based on the first character and the second character comprises:
and sending the first networking information to the second terminal equipment by using a wireless mesh network to exchange networking network information.
6. The method of any of claims 1 to 5, wherein the target character is a randomly generated character.
7. An apparatus of an ad hoc network is applied to a server of a first terminal device, and the apparatus comprises:
the terminal device comprises a first obtaining unit, a second obtaining unit and a control unit, wherein the first obtaining unit is used for obtaining a target character under the condition that a wake-up identifier is received, the wake-up identifier is used for indicating that at least one first terminal device is woken up, and the target character is used for establishing networking connection between at least two terminal devices;
the analysis unit is used for analyzing the target character to obtain a first character;
the first monitoring unit is used for monitoring a second broadcast data packet to obtain a second character, wherein the second broadcast data packet is a data packet which is established by a second terminal device based on the second character, the second terminal device obtains the target character and analyzes the target character under the condition of receiving the awakening identifier;
an exchanging unit, configured to exchange first networking information to the second terminal device according to the first character and the second character, where the first networking information is networking network information of the first terminal device, and the exchanging unit includes: matching the first character with the second character; and sending the first networking information to the second terminal equipment under the condition that the first character is the same as the second character.
8. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein said processor, said communication interface and said memory communicate with each other via said communication bus,
the memory for storing a computer program;
the processor for performing the method steps of any one of claims 1 to 6 by running the computer program stored on the memory.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program realizes the method steps of any one of claims 1 to 6 when executed by a processor.
CN202111601152.3A 2021-12-24 2021-12-24 Method and device for device ad hoc network, electronic device and storage medium Active CN114222255B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111601152.3A CN114222255B (en) 2021-12-24 2021-12-24 Method and device for device ad hoc network, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111601152.3A CN114222255B (en) 2021-12-24 2021-12-24 Method and device for device ad hoc network, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN114222255A CN114222255A (en) 2022-03-22
CN114222255B true CN114222255B (en) 2023-02-17

Family

ID=80705672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111601152.3A Active CN114222255B (en) 2021-12-24 2021-12-24 Method and device for device ad hoc network, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN114222255B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190354B (en) * 2022-07-12 2024-02-27 北京国盛华兴科技有限公司 Audio and video transmission method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106358157A (en) * 2016-09-30 2017-01-25 广东欧珀移动通信有限公司 Networking method and device for intelligent equipment
CN108470565A (en) * 2018-02-27 2018-08-31 合肥润东通信科技股份有限公司 Noise reduction intelligent call communication system based on WiFi-MESH technologies
CN111145744A (en) * 2019-12-20 2020-05-12 长兴博泰电子科技股份有限公司 Ad-hoc network-based intelligent household voice control recognition method
CN112420043A (en) * 2020-12-03 2021-02-26 深圳市欧瑞博科技股份有限公司 Intelligent awakening method and device based on voice, electronic equipment and storage medium
CN113014895A (en) * 2021-05-25 2021-06-22 广东信通通信有限公司 Ad hoc network video system and ad hoc network video system control method
CN113132191A (en) * 2019-12-31 2021-07-16 海信集团有限公司 Voice control method of intelligent device, intelligent device and storage medium
CN113194477A (en) * 2021-04-29 2021-07-30 深圳市欧瑞博科技股份有限公司 Networking method and device for intelligent equipment, electronic equipment and storage medium
CN113573254A (en) * 2021-07-16 2021-10-29 上海顺舟智能科技股份有限公司 Networking control method and device for smart home, control equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10609438B2 (en) * 2015-08-13 2020-03-31 International Business Machines Corporation Immersive cognitive reality system with real time surrounding media
US10609622B2 (en) * 2016-02-09 2020-03-31 King Abdullah University Of Science And Technology Ad hoc networking scheme for mobile cyber-physical systems
US11490453B2 (en) * 2019-05-16 2022-11-01 Apple Inc. Self-organizing device
CN110753327B (en) * 2019-09-30 2023-07-25 国电南瑞科技股份有限公司 Terminal object connection system based on wireless ad hoc network and LoRa
CN110740424A (en) * 2019-10-28 2020-01-31 杭州涂鸦信息技术有限公司 networking method and system, readable storage medium and device
CN110831103B (en) * 2019-11-08 2022-04-15 京东方科技集团股份有限公司 Communication method and device based on ad hoc network, ad hoc network and electronic equipment
CN112351420B (en) * 2020-07-28 2023-07-25 深圳Tcl新技术有限公司 Networking identity creation method and equipment of terminal equipment and readable storage medium
CN113207097B (en) * 2021-04-29 2023-05-30 深圳市欧瑞博科技股份有限公司 Intelligent equipment networking method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106358157A (en) * 2016-09-30 2017-01-25 广东欧珀移动通信有限公司 Networking method and device for intelligent equipment
CN108470565A (en) * 2018-02-27 2018-08-31 合肥润东通信科技股份有限公司 Noise reduction intelligent call communication system based on WiFi-MESH technologies
CN111145744A (en) * 2019-12-20 2020-05-12 长兴博泰电子科技股份有限公司 Ad-hoc network-based intelligent household voice control recognition method
CN113132191A (en) * 2019-12-31 2021-07-16 海信集团有限公司 Voice control method of intelligent device, intelligent device and storage medium
CN112420043A (en) * 2020-12-03 2021-02-26 深圳市欧瑞博科技股份有限公司 Intelligent awakening method and device based on voice, electronic equipment and storage medium
CN113194477A (en) * 2021-04-29 2021-07-30 深圳市欧瑞博科技股份有限公司 Networking method and device for intelligent equipment, electronic equipment and storage medium
CN113014895A (en) * 2021-05-25 2021-06-22 广东信通通信有限公司 Ad hoc network video system and ad hoc network video system control method
CN113573254A (en) * 2021-07-16 2021-10-29 上海顺舟智能科技股份有限公司 Networking control method and device for smart home, control equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
智能家居系统的应用研究;周正贵;《电子世界》;20130115(第01期);正文第12-13页 *

Also Published As

Publication number Publication date
CN114222255A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
US20210272566A1 (en) Communication Method, Server, and Device
CN111464402B (en) Control method of intelligent household equipment, terminal equipment and medium
CN103259795A (en) Method for executing automatic register and login, mobile terminal and server
CN105100213B (en) Apparatus bound method and device
EP3869112B1 (en) Air-conditioning device control method and air-conditioning device
WO2020029495A1 (en) Information pushing method and home appliance
CN106658756B (en) Method and device for identifying connection between terminal equipment and hotspot
CN103974376A (en) Network connection assisting system and method
CN113765714B (en) Equipment network distribution method and device, storage medium and electronic equipment
CN109067883B (en) Information pushing method and device
CN111741509A (en) Network distribution method and device, storage medium and processor
CN114222255B (en) Method and device for device ad hoc network, electronic device and storage medium
CN107645789B (en) Network access method, device and system
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
WO2017088795A1 (en) Method and device for controlling smart appliance
US20160029214A1 (en) Home control gateway and home control network connection method thereof
CN109842515B (en) Method for multi-device network distribution, server and computer storage medium
WO2019080719A1 (en) Data processing method and device, storage medium, processor, and system
CN112202652A (en) Method and device for displaying information of equipment to be networked, storage medium and electronic device
CN113904949B (en) Distribution network binding method and device, intelligent equipment and storage medium
CN113965904B (en) Device registration method, device and storage medium
CN107592607B (en) Bluetooth composite device and communication method thereof
CN114553625A (en) Response device determination method and apparatus, storage medium, and electronic apparatus
CN111884938B (en) Router information acquisition method and device
CN109617988B (en) Request retry method and related product

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