Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for a robot to connect to a network according to an embodiment of the present invention. The method can be applied to a robot with a scanning function, and the robot also has a network connection function, and specifically the method is detailed as follows:
s101: it is detected whether an existing network connection exists.
In this embodiment, the process of the robot detecting whether there is an existing network connection may be: the robot detects whether a terminal device is connected to network connection modules such as a wireless network connection module, a wired network connection module, an infrared connection module, a Bluetooth connection module and the like. The case where the robot does not perform network connection includes: the robot has no connection to the network, such as a newly purchased robot; or the robot changes the network configuration, such as changing the user; it may also be that the environment of the network in which the robot is located has changed, the robot needs to connect to a new network.
S102: and if the existing network connection does not exist, acquiring a network configuration image through the scanning equipment.
In this embodiment, the scanning apparatus may be a camera of the robot or an image scanning apparatus connected to the robot. The network configuration code can be a graphic code, such as a two-dimensional code or a bar code, or can be a text image.
S103: and identifying the network configuration information in the scanned network configuration image according to a preset rule.
Specifically, if the network configuration image is a network configuration graphic code, an identifier in the graphic code can be identified through the image scanning device, and the identifier is converted into network configuration information; if the network configuration image is a text image, the character information in the text image can be identified through a character identification technology, and the character information is converted into the network configuration information.
S104: and establishing new network connection with the first terminal equipment according to the network configuration information.
In this embodiment, the establishing of the new network connection with the first terminal device according to the network configuration information may be: and selecting a corresponding specific network connection mode and a new network connection of the first terminal device according to the device type of the first device and the network connection information of the first device in the network configuration information of the first device. For example, when the device type of the first device is an NFC device, a new network connection is established with the first terminal device through an NFC wireless communication manner.
As can be seen from the above description, by detecting whether there is an existing network connection, if there is no existing network connection, the network configuration image is scanned by the scanning device, the network configuration information in the scanned configuration image is identified according to the preset rule, and a new network connection with the first terminal device is established according to the network configuration information.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for a robot to connect to a network according to another embodiment of the present invention. On the basis of the above embodiment, the network configuration image is a network configuration graphic code, a plurality of identifiers are sequentially added to the network configuration graphic code, and the step S103 is specifically detailed as follows:
s201: and identifying each identifier, and inquiring a prestored conversion table according to each identifier to obtain the text information corresponding to each identifier.
In the present embodiment, the correspondence relationship between each identifier and text information is stored in a prestored conversion table. For example, the text information corresponding to some identifiers is the type of network connection, and the text information corresponding to other identifiers is the name or password of the network connection.
S202: and generating network configuration information according to the text information.
In this embodiment, the text information is divided into different network configuration information. For example, the network configuration information is divided according to information such as the type, name, or password of the network connection.
From the above description, it can be known that the network configuration information can be accurately obtained by identifying that a plurality of identifiers are sequentially added in the network configuration graphic code, and meanwhile, the network configuration graphic code has a secret property, so that the network configuration information is not leaked.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for a robot to connect to a network according to still another embodiment of the present invention. On the basis of the above embodiment, after the step S103, the method further includes:
s301: and acquiring the name of the terminal equipment needing to establish the network connection contained in the network configuration information, and converting the name of the terminal equipment into voice for voice playing so that a user can confirm whether the terminal equipment needing to establish the network connection is the first terminal equipment.
In this embodiment, the network configuration information includes a name of the terminal device that needs to establish a network connection, for example, the name may be a name that uniquely identifies the terminal device, such as a factory code, or the name may be a pre-assigned number.
S302: and when the terminal equipment needing to establish the network connection is the first terminal equipment and receives a network connection establishment request input by a user, executing a step of establishing a new network connection with the first terminal equipment according to the network configuration information according to the network connection establishment request.
In this embodiment, when the user determines that the terminal device that needs to establish the network connection is the first terminal device, an input device such as a touch screen may be used to input a network connection establishment request to the robot, and the robot is triggered to execute a step of establishing a new network connection with the first terminal device according to the network configuration information.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for a robot to connect to a network according to another embodiment of the present invention. On the basis of the above embodiment, after the step S104, the method further includes:
s401: it is detected whether the new network connection with the first terminal device is successful.
In this embodiment, the process of detecting whether the new network connection with the first terminal device is successful may be to send a verification message to the first terminal device, determine that the new network connection with the first terminal device is unsuccessful if the first terminal device does not return a verification response message, and determine that the new network connection with the first terminal device is successful if the first terminal device returns a verification response message.
S402: and if the new network connection with the first terminal equipment is unsuccessful, generating prompt information of abnormal network connection.
In this embodiment, the network connection abnormality may be that data transmission with the first terminal device is not possible, or that data transmission is erroneous, a serious delay, or the like.
In an embodiment of the present invention, a prompt of the network connection abnormality may be further sent to the first terminal device, so that a user of the first terminal device can timely obtain the prompt of the network connection abnormality, and it is convenient for the subsequent reconfiguration of the first terminal device for network connection.
As can be seen from the above description, by detecting a new network connection with the first terminal device, the validity of the new network connection is guaranteed.
In one embodiment of the invention, the method further comprises:
if existing network connection exists, network configuration information in the existing network connection is acquired;
acquiring the identity of a second terminal device correspondingly connected with the existing network connection according to the network configuration information in the existing network connection;
sending connection verification information to the second terminal equipment according to the identity;
and if the verification response information of the second terminal equipment is not received within a preset time period, disconnecting the existing network connection with the second terminal equipment.
In this embodiment, the preset time period may be set according to the requirement of the user.
As can be seen from the above description, by detecting whether the verification response information of the second terminal device is received within a preset time period, the network connection with the second terminal device is determined, and it is ensured that the robot is under the control of the valid terminal device.
In one embodiment of the present invention, the robot includes a network connection module, and the network connection module includes one or more of a module USB module, a Zigbee module, an infrared module, a bluetooth module, a near field communication NFC module, or a radio frequency identification RFID module.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 5 is a block diagram of a system for connecting a robot to a network according to an embodiment of the present invention. For convenience of explanation, only portions related to the embodiments of the present invention are shown. Referring to fig. 5, the system includes: a network connection detection module 501, a network configuration image scanning module 502, a network configuration information identification module 503, and a network connection establishment module 504.
The network connection detecting module 501 is configured to detect whether there is an existing network connection;
a network configuration image scanning module 502, configured to obtain a network configuration image through a scanning device if there is no existing network connection;
a network configuration information identification module 503, configured to identify network configuration information in the scanned configuration image according to a preset rule;
a network connection establishing module 504, configured to establish a new network connection with the first terminal device according to the network configuration information.
In an embodiment of the present invention, the network configuration image is a network configuration graphic code, and a plurality of identifiers are sequentially added to the network configuration graphic code;
the network configuration image scanning module 502 is specifically configured to identify each identifier, query a pre-stored conversion table according to each identifier, obtain text information corresponding to each identifier, and generate the network configuration information according to the text information.
In one embodiment of the invention, the system further comprises:
a terminal device name obtaining module 505, configured to obtain a name of a terminal device that needs to establish a network connection and is included in the network configuration information, and convert the name of the terminal device into a voice to perform voice playing, so that a user determines whether the terminal device that needs to establish the network connection is the first terminal device;
the network connection establishing module 504 is further configured to, when the terminal device that needs to establish a network connection is the first terminal device and receives a network connection establishing request input by a user, execute a step of establishing a new network connection with the first terminal device according to the network configuration information according to the network connection establishing request.
In one embodiment of the invention, the system further comprises:
a network connection exception prompting module 506, configured to detect whether the new network connection with the first terminal device is successful, and generate a prompting message of the network connection exception if the new network connection with the first terminal device is unsuccessful.
In one embodiment of the invention, the system further comprises:
a network configuration information obtaining module 507, configured to obtain network configuration information in an existing network connection if the existing network connection exists;
an identity obtaining module 508, configured to obtain, according to the network configuration information in the existing network connection, an identity of a second terminal device connected to the existing network connection correspondingly;
a connection verification information sending module 509, configured to send connection verification information to the second terminal device according to the identity;
a network disconnection module 510, configured to disconnect an existing network connection with the second terminal device if the verification response information of the second terminal device is not received within a preset time period.
Referring to fig. 6, fig. 6 is a schematic block diagram of a terminal device of a robot connection network according to an embodiment of the present invention. The terminal 600 in the present embodiment shown in fig. 6 may include: one or more processors 601, one or more input devices 602, one or more output devices 603, and one or more memories 604. The processor 601, the input device 602, the output device 603 and the memory 604 are all connected to each other via a communication bus 605. The memory 604 is used to store a computer program comprising program instructions. Processor 601 is operative to execute program instructions stored in memory 604. Wherein, the processor 601 is configured to call the program instruction to execute the following functions of operating each module/unit in each system embodiment, for example, the functions of the modules 501 to 510 shown in fig. 5.
It should be understood that, in the embodiment of the present invention, the Processor 601 may be a Central Processing Unit (CPU), and the Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 602 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 603 may include a display (LCD, etc.), a speaker, etc.
The memory 604 may include both read-only memory and random access memory, and provides instructions and data to the processor 601. A portion of the memory 604 may also include non-volatile random access memory. For example, the memory 604 may also store device type information.
In a specific implementation, the processor 601, the input device 602, and the output device 603 described in this embodiment of the present invention may execute the implementation manners described in the first embodiment and the second embodiment of the service request method provided in this embodiment of the present invention, and may also execute the implementation manner of the terminal described in this embodiment of the present invention, which is not described herein again.
In another embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program, where the computer program includes program instructions, where the program instructions implement all or part of the procedures in the method of the above embodiments when executed by a processor, and may also be implemented by a computer program instructing associated hardware, where the computer program may be stored in a computer-readable storage medium, and where the computer program can implement the steps of the above method embodiments when executed by a processor. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or system capable of carrying said computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The computer readable storage medium may be an internal storage unit of the terminal according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing the computer program and other programs and data required by the terminal. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the terminal and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed terminal and method can be implemented in other manners. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, 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. Further, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may also be an electrical, mechanical or other form of connection.
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, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention 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.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.