Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present 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 should be understood that the terms "comprises" and "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 this specification 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 the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In order to illustrate the technical scheme of the invention, the following description is made by specific examples.
Referring to fig. 1, fig. 1 is a flowchart of a method for connecting a robot to a network according to an embodiment of the present invention. The method can be applied to a robot with a scanning function, and meanwhile, the robot also has a network connection function, and specifically, the method is described in detail as follows:
s101: it is detected whether an existing network connection exists.
In this embodiment, the process of detecting whether the existing network connection exists by the robot may be: the robot detects whether the terminal equipment is connected in the network connection modules such as the wireless network connection module, the wired network connection module, the infrared connection module, the Bluetooth connection module and the like. The case where the robot does not make a network connection includes: the robot is not connected to a network, such as a newly purchased robot; the robot may also change the network configuration, for example, change the user; it is also possible that the network environment in which the robot is located has changed, which robot needs to be connected 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 device may be a camera of the robot or an image scanning device connected to the robot. The network configuration code may be a graphic code, such as a two-dimensional code or a bar code, or may 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, the 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, 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 a new network connection with the first terminal equipment according to the network configuration information.
In this embodiment, the establishing a new network connection with the first terminal device according to the network configuration information may be: and selecting a specific mode of corresponding network connection to be connected with the new network of the first terminal equipment according to the equipment type of the first equipment in the network configuration information of the first equipment and the information of the network connection of the first equipment. For example, when the device type of the first device is NFC, 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 not, by scanning the device network configuration image, identifying the network configuration information in the scanned configuration image according to a preset rule, and establishing a new network connection with the first terminal device according to the network configuration information.
Referring to fig. 2, fig. 2 is a flowchart of a method for connecting a robot 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, and a plurality of identifiers are sequentially added in the network configuration graphic code, and the above step S103 is specifically described as follows:
s201: identifying each identifier, inquiring a pre-stored conversion table according to each identifier, and acquiring text information corresponding to each identifier.
In this embodiment, the correspondence between each identifier and the text information is stored in a pre-stored conversion table. For example, text information corresponding to a certain number of identifiers is a type of network connection, and text information corresponding to another number of identifiers is a name or password of the network connection, etc.
S202: network configuration information is generated 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 and divided according to information such as the type, name, password, or the like of the network connection.
From the above description, it can be known that by identifying that a plurality of identifiers are sequentially added in the network configuration graphic code, the network configuration information can be accurately obtained, and meanwhile, the network configuration graphic code has confidentiality, so that the leakage of the network configuration information can not be caused.
Referring to fig. 3, fig. 3 is a flowchart of a method for connecting a robot to a network according to still another embodiment of the present invention. On the basis of the above embodiment, after the pressing S103, further includes:
s301: the name of the terminal equipment which needs to establish network connection is acquired from the network configuration information, and the name of the terminal equipment is converted into voice to be played, so that a user confirms whether the terminal equipment which needs to establish network connection is the first terminal equipment.
In this embodiment, the network configuration information includes the name of the terminal device that needs to establish 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 number or the like assigned in advance.
S302: when the terminal equipment needing to establish network connection is the first terminal equipment and a network connection establishment request input by a user is received, executing the step of establishing 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 network connection is the first terminal device, a network connection establishment request may be input to the robot through an input device such as a touch screen, to trigger the robot to perform 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 of a method for connecting a robot to a network according to still another embodiment of the present invention. On the basis of the above embodiment, after the above step S104, the method further includes:
s401: it is detected whether a 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 sending a verification message to the first terminal device, if the first terminal device does not return the verification response message, determining that the new network connection with the first terminal device is unsuccessful, and if the first terminal device returns the verification response message, determining that the new network connection with the first terminal device is successful.
S402: 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 cannot be performed with the first terminal device, or that data transmission is wrong, severely delayed, or the like.
In one embodiment of the present invention, a prompt for network connection abnormality may also be sent to the first terminal device, so that a user of the first terminal device may learn the prompt for network connection abnormality in time, so as to facilitate subsequent reconfiguration of the first terminal device to perform network connection.
As is apparent from the above description, the validity of a new network connection is ensured by detecting a new network connection with the first terminal device.
In one embodiment of the invention, the method further comprises:
if the existing network connection exists, acquiring network configuration information in the existing network connection;
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;
transmitting 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 needs of the user.
From the above description, it can be seen that by detecting whether the authentication response information of the second terminal device is received within a preset period of time, the network connection with the second terminal device is determined, so as to ensure that the robot is under the control of the effective terminal device.
In one embodiment of the invention, the robot comprises a network connection module, wherein the network connection comprises one or more of a 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 number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
Corresponding to the method for connecting robots to a network in the above embodiment, fig. 5 is a block diagram of a system for connecting robots to a network according to an embodiment of the present invention. For convenience of explanation, only portions relevant 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.
Wherein, the network connection detection module 501 is configured to detect whether an existing network connection exists;
a network configuration image scanning module 502, configured to acquire a network configuration image through a scanning device if no existing network connection exists;
a network configuration information identifying module 503, configured to identify network configuration information in the scanned configuration image according to a preset rule;
a network connection establishment module 504, configured to establish a new network connection with the first terminal device according to the network configuration information.
In one embodiment of the present invention, the network configuration image is a network configuration graphic code, and a plurality of identifiers are sequentially added in 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 equipment name obtaining module 505, configured to obtain a name of a terminal equipment to be connected to a network, where the name is included in the network configuration information, and convert the name of the terminal equipment into voice for playing, so that a user confirms whether the terminal equipment to be connected to the network is the first terminal equipment;
the network connection establishment module 504 is further configured to, when the terminal device that needs to establish a network connection is the first terminal device and a network connection establishment request input by a user is received, perform a step of establishing a new network connection with the first terminal device according to the network configuration information according to the network connection establishment request.
In one embodiment of the invention, the system further comprises:
and the network connection abnormality prompting module 506 is configured to detect whether the new network connection with the first terminal device is successful, and if the new network connection with the first terminal device is unsuccessful, generate a prompting message of network connection abnormality.
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 network configuration information in the existing network connection, an identity of a second terminal device that is correspondingly connected to the existing network connection;
a connection verification information sending module 509, configured to send connection verification information to the second terminal device according to the identity;
and the network connection disconnection module 510 is configured to disconnect an existing network connection with the second terminal device if the authentication response information of the second terminal device is not received within a preset period of time.
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 as 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 communicate with each other via a communication bus 605. The memory 604 is used to store a computer program comprising program instructions. The processor 601 is operative to execute program instructions stored in the memory 604. Wherein the processor 601 is configured to invoke the program instructions to perform the functions of the modules/units in the system embodiments described above, such as the functions of the modules 501-510 shown in fig. 5.
It should be appreciated that in embodiments of the present invention, the processor 601 may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or 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 a fingerprint), a microphone, etc., and the output device 603 may include a display (LCD, etc.), a speaker, etc.
The memory 604 may include read only memory and random access memory and provides instructions and data to the processor 601. A portion of memory 604 may also include non-volatile random access memory. For example, the memory 604 may also store information of device type.
In a specific implementation, the processor 601, the input device 602, and the output device 603 described in the embodiments of the present invention may execute the implementation described in the first embodiment and the second embodiment of the service request method provided in the embodiments of the present invention, and may also execute the implementation of the terminal described in the embodiments of the present invention, which is not repeated herein.
In another embodiment of the present invention, a computer readable storage medium is provided, where the computer readable storage medium stores a computer program, where the computer program includes program instructions, where the program instructions are implemented by a processor to implement all or part of the procedures in the method of the embodiment, or may be implemented by instructing related hardware by the computer program, where the computer program may be stored in a computer readable storage medium, where the computer program when executed by the processor implements the steps of each of the method embodiments. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or system capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium may include content that is subject to appropriate increases and decreases as required by jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is not included as electrical carrier signals and telecommunication signals.
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) or the like, which are 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 described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate 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 solution. 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 will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working procedures of the terminal and the unit described above may refer to the corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In several embodiments provided in the present application, it should be understood that the disclosed terminal and method may be implemented in other manners. For example, the system embodiments described above are merely illustrative, e.g., the division of the elements is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, systems, or units, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present invention.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.