Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, the present invention aims to provide a network distribution method, device, computer readable storage medium and terminal equipment, which aim to solve the problem of complicated operation when the existing household appliances of different brands are distributed.
The first aspect of the embodiment of the present invention provides a network distribution method, which is applied to a network distribution device in a home wireless network distribution system, where the home wireless network distribution system further includes a plurality of devices to be distributed and a home wireless network, and the network distribution device and the home wireless network are successfully distributed, and the method includes:
identifying a plurality of network equipment to be distributed to obtain a first control protocol of each network equipment to be distributed;
Logically connecting the first control protocols of the equipment to be distributed to form a second control protocol;
and sending the distribution network information containing the second control protocol to each to-be-distributed network device so that each to-be-distributed network device distributes network with the home wireless network according to the distribution network information of the second control protocol.
In a second aspect of the embodiment of the present invention, there is provided a device for distributing a network, including:
the identification unit is used for identifying a plurality of network equipment to be distributed to obtain a first control protocol of each network equipment to be distributed;
the connection unit is used for logically connecting the first control protocols of the equipment to be distributed to form a second control protocol;
And the sending unit is used for sending the network distribution information containing the second control protocol to each network distribution equipment so that each network distribution equipment can carry out network distribution with the home wireless network according to the network distribution information.
In a third aspect of the embodiments of the present invention, a computer readable storage medium is provided, where a program of a distribution network is stored, where the program of the distribution network may be executed by a processor to implement the steps in the method of the distribution network described above.
A fourth aspect of the embodiment of the present invention provides a terminal device, where the terminal device includes a processor and a memory; the memory stores a program of the distribution network which can be executed by the processor; the steps in the method for distributing the network are realized when the processor executes the program of the distribution network.
The beneficial effects are that: the invention provides a network distribution method, which comprises the steps of identifying network equipment to be distributed of different brands to obtain a first control protocol of each network equipment to be distributed, logically connecting (fusing) the obtained first control protocols of each network equipment to be distributed to obtain a second control protocol, sending network distribution information containing network distribution information of the second control protocol to each network equipment to be distributed, and carrying out network distribution on each network equipment to be distributed based on the network distribution information and a home wireless network. Because the distribution network information is uniformly distributed, the distribution network setting is not required for each piece of equipment to be distributed, so that the equipment to be distributed with different brands can be quickly distributed.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. The drawings illustrate preferred embodiments of the invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
The inventor finds that the household appliances all have intelligent networking function and can be remotely controlled through networking, but different brands of household appliances can be installed in each household, the newly purchased household appliances need to download APP corresponding to different devices respectively when in network configuration, connection information of a household wireless network such as names and passwords are input respectively after the download, the names and the passwords of the wireless network are usually a string of character strings, and the operation is very inconvenient.
In order to solve the above problems, in the embodiment of the present application, a plurality of network devices to be configured are identified, a first control protocol of each network device to be configured is obtained, the obtained first control protocols of the plurality of network devices to be configured are logically connected, so as to obtain a second control protocol, network configuration information including the second control protocol is sent to each network device to be configured, each network device to be configured performs network configuration with a home wireless network based on the received network configuration information, so that downloading of a corresponding APP for each network device to be configured can be avoided, and a home wireless network name and a password are respectively input, thereby realizing rapid network configuration of the plurality of networks to be configured.
The application will be further described by the description of embodiments with reference to the accompanying drawings.
The present embodiment provides a method for network configuration, as shown in fig. 4, where the method may be applied to a home wireless network configuration system, and the home wireless network configuration system may include a plurality of devices to be network-configured 100 and a network-configured device 200. The multiple network devices to be distributed can be household appliances manufactured by different manufacturers, such as air conditioners, refrigerators, washing machines, televisions, electric cookers and the like. It is readily understood that the distribution network device 200 communicates with a logical connection of a home wireless network, which may be a home local area network constructed via a wireless router.
Referring to fig. 1, fig. 1 is a flowchart of a method for distributing a network according to an embodiment of the present invention. The method for distributing network is applied to a network distribution device in a home wireless network configuration system, the home wireless network distribution system further comprises a plurality of devices to be distributed and a home wireless network, and the network distribution device and the home wireless network are successfully distributed, and the method comprises the following steps:
And S10, identifying a plurality of network equipment to be distributed to obtain a first control protocol of each network equipment to be distributed.
Specifically, the first control protocol is used for authenticating the identity of the network equipment to be configured, that is, the first control protocol includes various information for distinguishing the network equipment to be configured, such as brands of the network equipment to be configured, names of the network equipment to be configured, various functional parameters of the network equipment to be configured, firmware information and the like.
As shown in fig. 2, in an implementation manner of this embodiment, a plurality of devices to be configured are identified, to obtain a first control protocol of each device to be configured, where the first control protocol includes:
s100, detecting a plurality of network equipment to be distributed to obtain names and brands of the network equipment to be distributed;
S110, according to the names and brands of the equipment to be distributed, the functional parameters and the firmware information of the equipment to be distributed are queried.
Specifically, home appliances of different brands such as an x-brand refrigerator, a y-brand air conditioner, a z-brand television set and the like are required to be added to the home wireless network in the home of the user. The home appliances to be added to the home wireless network can be identified by the distribution network device 200, and the identified results are stored separately. The specific identification process may be that the distribution network device 200 reads the product identification bar code on the x brand refrigerator, identifies that the brand of the household appliance is "x" from the product identification bar code, and stores the information of "x refrigerator", and can identify "y air conditioner" and "z television" in the same way. It is easy to understand that other ways of identifying the brands and names of the home appliances, such as scanning a two-dimensional code of the product, etc., may be used.
In this embodiment, after the brand and name of the household appliance (to be configured with the network) are identified, the corresponding brand and name may be queried to obtain the functional parameters and firmware information of the household appliance (such as the temperature of the refrigerator, the program played by the television, the timing start or stop function of the air conditioner, etc.). It is easy to understand that the obtained functional parameters and firmware information of the brand home appliance are stored.
In this embodiment, the network distribution device is used to identify the household appliances to be distributed with different brands, and the identified information can be used to distinguish the household appliances and perform corresponding operations on the household appliances with different brands.
S20, logically connecting the first control protocols of the to-be-distributed network devices of all brands to form a second control protocol.
Specifically, the first control protocols of the plurality of network devices to be distributed are logically connected to fuse the first control protocols of the network devices to be distributed to obtain a fused control protocol, and the fused control protocol can be used as a part of network distribution information to be used for network distribution between the network devices to be distributed and the home wireless network.
As shown in fig. 3, in one implementation manner of this embodiment, a second control protocol is formed by logically connecting first control protocols of to-be-configured network devices of respective brands, including:
s200, after a first control protocol of one network equipment to be distributed is acquired, moving the first control protocol of the network equipment to be distributed acquired in the previous time every time when the first control protocol of the next network equipment to be distributed is acquired;
s210, the acquired first control protocol of the next network equipment to be distributed is logically connected with the first control protocol of the previous network equipment to be distributed in a logical-and-logical relationship to form a second control protocol.
Specifically, the second control protocol is formed by logically and-connecting the first control protocols of the plurality of network devices to be configured. The first control protocol of one network device to be distributed can be read from the first memory, stored in the second memory, then the first control protocol of the next network device to be distributed is read, the first control protocol of the previous network device to be distributed which is read is moved a certain distance, for example, 16 bytes to the left, then the first control protocol of the next network device to be distributed is read and stored in the second memory, and similarly, the first control protocols stored in the first memory are all moved to the left by 16 bytes after each control protocol stored in one device, until the first control protocols of all devices are read in the second memory. It will be readily appreciated that shifting 16 bytes to the left is merely illustrative and not limiting, and that shifting 20 bytes, 32 bytes, etc. in the same direction is also possible. The first memory and the second memory are also defined as the first and second memories, and may be other expressions, in order to facilitate the expression of how the second control protocol is formed.
In this embodiment, the first control protocol of each device (to-be-configured network) in the second memory is connected in a logical and relationship, so as to obtain the second control protocol. That is, the second control protocol includes all the first control protocols of the home appliances needing to be distributed.
For example, it is recognized by the distribution network device 200 that there is an x refrigerator, a y air conditioner, and a z television in the user's home, where the freezing temperature of the x refrigerator is minus 10 degrees celsius, the setting temperature of the y air conditioner is 25 degrees celsius, and the z television plays the central 1 set. It is easy to understand that the first control protocol of the x refrigerator may be "x refrigerator", "freezing temperature is minus 10 degrees centigrade", the first control protocol of the y air conditioner may be "y air conditioner", "setting temperature is 25 degrees centigrade", the first control protocol of the z television may be "z television", "play center 1 set", the "x refrigerator", "freezing temperature is minus 10 degrees centigrade", then "x refrigerator", "freezing temperature is minus 10 degrees centigrade" is moved leftwards by 16 bytes, the "y air conditioner" is read "," setting temperature is 25 degrees centigrade ", the" y air conditioner "," setting temperature is 25 degrees centigrade "is moved leftwards by 16 bytes, the" z television "is read, and the" play center 1 set ". And then the acquired first control protocol of each device is connected in a logical and logical relation, such as an 'x refrigerator', 'freezing temperature is minus 10 ℃ and' y air conditioner ',' setting temperature is 25 ℃ and 'z television', 'playing the central 1 set', so that a second control protocol can be obtained.
And S30, sending the distribution network information containing the second control protocol to each to-be-distributed network device so that each to-be-distributed network device distributes network with the home wireless network according to the distribution network information of the second control protocol.
Specifically, the distribution network device 200 may send the distribution network information to each individual device to be distributed in a broadcast manner. The network allocation information includes the second control protocol, SSID (SERVICE SET IDENTIFIER for short, service set identifier) and PSID (physical security code). After each network equipment to be distributed acquires network distribution information, SSID and PSID are acquired from the network distribution information, and final connection is initiated to the home wireless network according to the SSID and the PSID, so that quick network distribution is realized. It is easy to understand that SSID is an SSID and a PSID of a wireless network obtained when the network distribution device 200 communicates with a home wireless network, where the network distribution device 200 forms a message from a second control protocol, SSID and PSID, broadcasts the message, unpacks the message to obtain the second control protocol, SSID and PSID after the network distribution device grabs the message, distributes a network with the home network according to SSID and PSID, and then finds a first control protocol corresponding to the first control protocol from the second control protocol, thereby implementing quick network distribution of devices of different brands.
As shown in fig. 5, based on the above-mentioned method for distributing a network, the present invention further provides another device for distributing a network, including:
The identifying unit 210 is configured to identify a plurality of to-be-configured network devices, so as to obtain a first control protocol of each to-be-configured network device;
a connection unit 220, configured to logically connect the first control protocols of the to-be-configured network devices to form a second control protocol;
And the sending unit 230 is configured to send the network allocation information including the second control protocol to each network to be allocated device, so that each network to be allocated device performs network allocation with the home wireless network according to the network allocation information of the second control protocol.
In one implementation of the present embodiment, the connection unit 220 further includes:
a moving subunit 221, configured to, after acquiring a first control protocol of one to-be-configured network device, move the first control protocol of the one to-be-configured network device acquired in the previous time each time when the first control protocol of the next to-be-configured network device is acquired;
the connection subunit 222 is configured to logically connect the acquired first control protocol of the next network device to be configured with the first control protocol of the previous network device to be configured in a logical-to-logical relationship to form a second control protocol.
Based on the above network distribution method, the present invention further provides a computer readable storage medium, where a program of the network distribution is stored, and the program of the network distribution can be executed by a processor, so as to implement the steps in the network distribution method in the above embodiment.
Based on the above network allocation method, the present invention further provides a terminal device, as shown in fig. 6, which includes at least one processor (processor) 30 and a memory (memory) 31, and may further include a communication interface (CommunicationsInterface) 32 and a bus 33. Wherein the processor 30, the memory 31 and the communication interface 32 may communicate with each other via a bus 33. Communication interface 32 may transmit information. The processor 30 may call logic instructions in the memory 31 to perform the methods of the above embodiments. Further, the logic instructions in the memory 31 described above may be implemented in the form of software functional units and may be stored in a readable storage medium when sold or used as a stand-alone product. The memory 31 is provided as a readable storage medium and may be configured to store a software program, such as program instructions or modules corresponding to the methods in the embodiments of the present invention. The processor 30 executes functional applications and data processing, i.e. implements the methods of the embodiments described above, by running software programs, instructions or modules stored in the memory 31. The memory 31 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the terminal, etc. In addition, the memory 31 may include a high-speed random access memory, and may also include a nonvolatile memory. For example, a plurality of media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, may be a transitory storage medium. In addition, the specific processes that the storage medium and the plurality of instruction processors in the terminal load and execute are described in detail in the above method, and are not stated here.
In summary, the present invention provides a method, an apparatus, a computer readable storage medium and a terminal device for network allocation. The network distribution device is applied to a home wireless network configuration system, and the home wireless network distribution system also comprises a plurality of devices to be distributed and a home wireless network; the network distribution device and the home wireless network are successfully distributed, and the method comprises the following steps: identifying a plurality of network equipment to be distributed to obtain a first control protocol of each network equipment to be distributed; logically connecting the first control protocols of the equipment to be distributed to form a second control protocol; and sending the distribution network information containing the second control protocol to each to-be-distributed network device so that each to-be-distributed network device distributes network with the home wireless network according to the distribution network information of the second control protocol. The brand, the equipment name and the corresponding function parameters, the firmware information and the like of the equipment to be distributed are obtained by identifying the equipment to be distributed, the brand, the equipment name, the function parameters and the firmware information of the equipment to be distributed are used as a first control protocol of the equipment to be distributed, the first control protocols of the equipment to be distributed are connected in a logical and logical connection mode to obtain a second control protocol, the SSID and the PSID are used as distribution network information to be transmitted to the equipment to be distributed, and the equipment to be distributed can carry out quick network distribution according to the received distribution network information. Therefore, when the equipment to be distributed is distributed, the corresponding APP is not required to be downloaded, and the family wireless network name and the password are not required to be manually input, so that the rapid distribution of the equipment with different brands is realized.
It is to be understood that the invention is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.