CN111193765B - Device connection method, device, computer device and computer-readable storage medium - Google Patents

Device connection method, device, computer device and computer-readable storage medium Download PDF

Info

Publication number
CN111193765B
CN111193765B CN201911126400.6A CN201911126400A CN111193765B CN 111193765 B CN111193765 B CN 111193765B CN 201911126400 A CN201911126400 A CN 201911126400A CN 111193765 B CN111193765 B CN 111193765B
Authority
CN
China
Prior art keywords
connection
management server
target
equipment
connection management
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
CN201911126400.6A
Other languages
Chinese (zh)
Other versions
CN111193765A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911126400.6A priority Critical patent/CN111193765B/en
Publication of CN111193765A publication Critical patent/CN111193765A/en
Application granted granted Critical
Publication of CN111193765B publication Critical patent/CN111193765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a device connection method, a device, computer equipment and a computer readable storage medium; acquiring attribute information for determining a connection management server, wherein the attribute information comprises equipment connection format information; receiving a connection instruction sent by target equipment, wherein the connection instruction indicates that the target equipment needs to be connected to the connection management server; analyzing the connection instruction according to the equipment connection format information to obtain analyzed equipment connection information; determining the identifier of the connection management server and target connection program information corresponding to the target equipment according to the equipment connection information; sending a device connection request to a connection management server based on the identification and the target connection program information; and connecting the target equipment to the connection management server according to the authorization information returned by the connection management server based on the equipment connection request. The scheme can improve the connection efficiency of the equipment and the server.

Description

Device connection method, device, computer device and computer-readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a device connection method, an apparatus, a computer device, and a computer-readable storage medium.
Background
With the development of communication technology, the internet of things has been developed rapidly, and the internet of things is a network connected with objects extending and expanding on the basis of the internet, wherein the network may include a network in which devices are connected with a server of a platform.
In the research and practice process of the related technology, the inventor of the application finds that manual intervention is needed in the connection process of the existing equipment and the server in the platform, the program is troublesome to upgrade, when the types of the internet of things equipment are numerous, the server in the platform is high in maintenance difficulty, the equipment cannot be automatically connected with the server in the platform, the program needs to be changed through manual intervention, and the connection efficiency of the equipment and the server in the platform is low.
Disclosure of Invention
The embodiment of the application provides a device connection method, a device, computer equipment and a computer readable storage medium, which can improve the connection efficiency of the device and a server.
The embodiment of the application provides a device connection method, which comprises the following steps:
determining attribute information of a connection management server, wherein the attribute information comprises equipment connection format information;
receiving a connection instruction sent by target equipment, wherein the connection instruction indicates that the target equipment needs to be connected to the connection management server;
analyzing the connection instruction according to the equipment connection format information to obtain analyzed equipment connection information;
determining the identifier of the connection management server and target connection program information corresponding to the target equipment according to the equipment connection information;
sending a device connection request to a connection management server based on the identification and the target connection program information;
and connecting the target equipment to the connection management server according to the authorization information returned by the connection management server based on the equipment connection request.
Correspondingly, the embodiment of the present application provides an apparatus connecting device, including:
a first determining unit configured to determine attribute information of a connection management server, the attribute information including device connection format information;
a receiving unit, configured to receive a connection instruction sent by a target device, where the connection instruction indicates that connection to the connection management server is required;
the analysis unit is used for analyzing the connection instruction according to the equipment connection format information to obtain analyzed equipment connection information;
a second determining unit, configured to determine, according to the device connection information, an identifier of the connection management server and target connection program information corresponding to the target device;
a first sending unit configured to send a device connection request to a connection management server based on the identifier and the target connection program information;
and the first connection unit is used for connecting the target equipment to the connection management server according to the authorization information returned by the connection management server based on the equipment connection request.
In one embodiment, the first connection unit includes:
a first determining subunit configured to determine a target connection program from among the plurality of programs stored by the connection management server, based on the target connection program information;
the first installation subunit is used for installing the target connection program according to authorization information returned by the connection management server based on the device connection request;
and the connection subunit is used for connecting the target equipment to the connection management server according to the installation result.
In one embodiment, the device connecting apparatus further comprises:
the query unit is used for querying a target connection program corresponding to the target equipment in the connection management server according to the target connection program information;
a storage unit, configured to store the target connection program corresponding to the target device in the connection management server if the target connection program corresponding to the target device is not stored in the connection management server.
In one embodiment, the device connecting apparatus further comprises:
the second sending unit is used for sending a device to-be-connected request to the connection management server when receiving a to-be-connected instruction of the device to be connected;
a changing unit, configured to change the target connection program into a to-be-connected program corresponding to the to-be-connected device according to authorization information returned by the connection management server based on the to-be-connected request of the device;
and the second connecting unit is used for realizing the interaction between the equipment to be connected and the connection management server based on a program change result and successfully connecting the equipment to be connected to the connection management server.
In an embodiment, the second sending unit includes:
the analysis subunit is used for analyzing the to-be-connected instruction to obtain analyzed to-be-connected information of the equipment;
the second determining subunit is configured to determine, according to the to-be-connected information of the device, an identifier of the connection management server and to-be-connected program information corresponding to the to-be-connected device;
and the sending subunit is configured to send a device to-be-connected request to the connection management server based on the identifier and the to-be-connected program information.
In one embodiment, the changing unit includes:
a third determining subunit, configured to determine, according to the device connection format information, a to-be-connected program corresponding to the to-be-connected device from the connection management server;
and the second installation subunit is used for installing the program to be connected according to authorization information returned by the connection management server based on the request to be connected of the equipment.
Accordingly, embodiments of the present application further provide a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes steps in the device connection method provided in any of the embodiments of the present application.
Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform steps in the device connection method provided in any of the embodiments of the present application.
The method and the device for determining the connection management server can determine attribute information of the connection management server, wherein the attribute information comprises device connection format information; receiving a connection instruction sent by target equipment, wherein the connection instruction indicates that the target equipment needs to be connected to the connection management server; analyzing the connection instruction according to the equipment connection format information to obtain analyzed equipment connection information; determining the identifier of the connection management server and target connection program information corresponding to the target equipment according to the equipment connection information; sending a device connection request to a connection management server based on the identification and the target connection program information; and connecting the target equipment to the connection management server according to the authorization information returned by the connection management server based on the equipment connection request. According to the scheme, the connection format information of the connection management server is determined, and in the process of establishing connection between the target equipment and the connection management server, the network connection equipment finds the target connection program corresponding to the target equipment in the connection management server according to the connection format information, so that automatic installation is carried out, manual intervention is not needed, and the connection efficiency of the target equipment and the connection management server is improved.
It can be understood that when the target device is replaced, the corresponding connection program can be found from the connection management server, and the connection of different devices can be completed by changing the connection program in the connection management server, so that manual intervention is not required, manpower and resources can be saved, and the connection efficiency of the devices and the connection management server can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of a device connection method provided in an embodiment of the present application;
fig. 2 is a flowchart of a device connection method provided in an embodiment of the present application;
fig. 3 is a device connection physical topology diagram of a device connection method provided in an embodiment of the present application;
FIG. 4 is a block chain system according to an embodiment of the present disclosure;
fig. 5 is another flowchart of a device connection method provided in an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an apparatus connecting device according to an embodiment of the present disclosure;
FIG. 7 is another schematic structural diagram of an apparatus connecting device according to an embodiment of the present disclosure;
FIG. 8 is another schematic structural diagram of an apparatus connecting device according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
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 a part of the embodiments of the present application, and not all of the 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.
The embodiment of the application provides a device connection method, a device, computer equipment and a computer-readable storage medium. The embodiment of the present application provides an apparatus connection device suitable for a computer device, where the computer device may be a network side device such as a network connection device, and the apparatus connection device may be integrated in the network side device such as the network connection device.
Referring to fig. 1, the network connection device may determine attribute information of a connection management server, where the attribute information includes device connection format information; receiving a connection instruction sent by target equipment, wherein the connection instruction indicates that the target equipment needs to be connected to the connection management server; analyzing the connection instruction according to the equipment connection format information to obtain analyzed equipment connection information; determining the identifier of the connection management server and target connection program information corresponding to the target equipment according to the equipment connection information; sending a device connection request to a connection management server based on the identification and the target connection program information; and connecting the target equipment to the connection management server according to the authorization information returned by the connection management server based on the equipment connection request.
As can be seen from the above, in the present embodiment, by determining the connection format information of the connection management server, in the process of establishing a connection between the target device and the connection management server, according to the connection format information, the network connection device finds the target connection program corresponding to the target device in the connection management server, performs automatic installation, without manual intervention, and improves the connection efficiency between the target device and the connection management server.
It can be understood that when the target device is replaced, the corresponding connection program can be found from the connection management server, and the connection of different devices can be completed by changing the connection program in the connection management server, so that manual intervention is not required, manpower and resources can be saved, and the connection efficiency of the devices and the connection management server can be improved.
The following are detailed below, and it should be noted that the order of description of the following examples is not intended to limit the preferred order of the examples.
Embodiments of the present application will be described from the perspective of a device connection apparatus, which may be particularly integrated in a network connection device.
An embodiment of the present application provides a device connection method, which may be executed by a processor of a network connection device, and as shown in fig. 2, a specific flow of the device connection method may be as follows:
101. attribute information of the connection management server is determined, the attribute information including device connection format information.
The connection management server is a server connected to the target device, and specifically refers to a server in a platform that establishes a connection with the target device, for example, the connection management server may be represented as an application store in a mobile phone, various mobile phone software, and the like, and may be understood as a virtual network platform.
The attribute information refers to some attribute information inside the connection management server, the device connection format information is one of the attribute information, and refers to an agreed format information for connecting the device agreed inside the connection management server and the connection management server, and when the device complies with the device connection format information, the device can be connected with the device connection management server.
For example, the setting format of the device connection format information may be specified as shown in the following table:
magic number Version number Serialization algorithm ID Instructions Content length Content providing method and apparatus
The magic number refers to that numbers are directly applied in a program when the program is written, instead of a macro definition mode and the like, so that readability is reduced, safety is enhanced, for example, the magic number can be understood as a set secret number, and the information can be read only when an opposite side also knows the secret number. The version number is an identification number of the version, and the version number enables a user to know whether the operating system used is the latest version and the functions and facilities it provides. Whereas a serialization algorithm refers to a process that describes an object in a series of bytes, a serialization algorithm generally does the following in steps:
(1) and outputting the class metadata related to the object instance.
(2) The super class description of the class is recursively output until there are no more super classes.
(3) After the class metadata is completed, the actual data values of the object instances begin to be output starting from the top-most superclass.
(4) And recursively outputting the data of the example from top to bottom.
The content may represent content information of a sentence, for example, the content information may be "i am at point a", which means that a target device to be connected to the connection management server is told that a connection program corresponding to the target device needs to go to a specified point a to load the connection program, and install the program to connect the target device to the connection management server.
It is understood that the content length may refer to a length corresponding to the content of the connection format information inside the connection management server, such as 4 bytes, and so on.
102. And receiving a connection instruction sent by the target device, wherein the connection instruction indicates that the connection to the connection management server is needed.
The target device refers to a device which can be connected with the connection management server, for example, an intelligent robot, an intelligent watch, an intelligent household appliance and other electronic devices, and the connection instruction indicates that the target device needs to be connected to the connection management server, for example, the intelligent robot is connected to a corresponding software application platform, or the intelligent sweeping robot is connected to a corresponding software application platform, so that the intelligent sweeping robot automatically sweeps a corresponding area which needs to be swept.
For example, the intelligent floor sweeping robot is one of intelligent household appliances, and is connected to the connection management server, that is, after the intelligent floor sweeping robot corresponds to a software platform, floor cleaning work can be automatically completed in a room by means of certain artificial intelligence.
For another example, the intelligent robot needs to establish a connection with the connection management server through the network connection device before working, and when receiving a connection instruction sent by the intelligent robot, the network connection device determines the data types to be communicated with the connection management server by the intelligent robot, such as geographical location, electric quantity, video, abnormal events and the like, and the instruction types, such as specified route, blacklist information, mail information and the like, according to the determined device connection information in the connection management server.
103. And analyzing the connection instruction according to the equipment connection format information to obtain analyzed equipment connection information.
The connection instruction is analyzed according to the device connection format information, the content of the instruction can be read, and the device connection information conforming to the connection format agreed in the connection management server can be obtained, for example, the connection instruction is analyzed according to magic number information, content information and the like carried in the device connection format information.
The device connection information refers to information obtained by analyzing the connection instruction according to the device connection format information, for example, in order to improve security, a secret number may be added to the connection instruction, and the connection instruction needs to be analyzed according to the device connection format information inside the connection management server.
104. And determining the identifier of the connection management server and target connection program information corresponding to the target equipment according to the equipment connection information.
The identifier of the connection management server may refer to a name or the like used by the network connection device to identify the identity of the connection management server, and the target program information is information used to determine a target connection program corresponding to the target device, and the target connection program corresponding to the target device is found from the connection management server according to the target program information.
The network connection device can find the connection management server which the target connection device wants to establish connection according to the identification, and find the target connection program corresponding to the target device from the connection management server according to the target connection program information.
It can be understood that the device connection information is information obtained by analyzing the connection instruction by the network connection device according to the device connection format information, and the connection instruction can be read out, and further, the identifier of the connection management server to which the target device needs to be connected and the target connection program information corresponding to the target device can be determined.
105. A device connection request is sent to a connection management server based on the identification and the target connector information.
The device connection request is a request for sending a connection between the target device and the connection management server to the connection management server, and it can be understood that, after receiving the device connection request, the connection management server may approve the connection between the target device and the target device, or may reject the connection between the target device and the connection management server.
Alternatively, when the identifier of the connection management server and the target connection program information are known, a device connection request may be sent to the connection management server according to the identifier of the connection management server and the target connection program information, so as to request the connection management server to connect the target device to the connection management server corresponding to the identifier, and find the target connection program corresponding to the target device from the plurality of connection programs in the connection management server according to the target connection program information.
For example, taking the target device as an intelligent robot as an example, the network connection device sends a device connection request to the connection management server according to the identifier of the connection management server and the target connection program information, so as to connect the intelligent robot to the connection management server.
106. And connecting the target equipment to the connection management server according to the authorization information returned by the connection management server based on the equipment connection request.
And loading a target connection program corresponding to the target equipment according to the authorization information to interact with the connection management server.
In an embodiment, when the connection management server agrees to establish with the target device, authorization information is returned, a target connection program corresponding to the target device can be found from the connection management server according to the target connection program information, and then the target connection program is loaded, so that interaction between the target device and the connection management server is realized, and the target device is successfully connected to the connection management server, specifically, after the identifier of the connection management server and the target connection program information are determined, the specific step of connecting the target device to the connection management server may include:
determining a target connection program from a plurality of programs stored by the connection management server based on the target connection program information;
installing the target connection program according to authorization information returned by the connection management server based on the equipment connection request;
connecting the target device to the connection management server according to the installation result.
In an embodiment, the connection management server may store a target connection program corresponding to the target device, may not store the target connection program corresponding to the target device, may query, according to known target connection program information, whether the target connection program corresponding to the target device is stored in the connection management server, if the target connection program is stored, the target device does not need to upload the target connection program, if the target connection program is not stored in the connection management server, the target device needs to upload the target connection program, specifically, query whether the target connection program is stored, and the performing, according to the query result, may include:
inquiring a target connection program corresponding to the target equipment in the connection management server according to the target connection program information;
and if the target connection program corresponding to the target equipment is not stored in the connection management server, storing the target connection program corresponding to the target equipment in the connection management server.
In an embodiment, in a case that a target device is already connected to a connection management server, if it is desired to replace the target device with another device to be connected to establish a connection with the connection management server, the connection between the device to be connected and the connection management server may also be established, and a program for changing the connection does not need manual intervention, according to the device connection format information, an identifier of the connection management server and the program to be connected corresponding to the device to be connected may be determined, and then the program to be connected corresponding to the device to be connected may be automatically found from the connection management server, the target connection program is changed into the program to be connected, and the program to be connected is automatically loaded, specifically, the step of replacing the target device with the device to be connected to the connection management server may include:
when a to-be-connected instruction of a to-be-connected device is received, sending a device to-be-connected request to the connection management server;
changing the target connection program into a program to be connected corresponding to the equipment to be connected according to authorization information returned by the connection management server based on the request to be connected of the equipment;
and realizing the interaction between the equipment to be connected and the connection management server based on the program change result, and successfully connecting the equipment to be connected to the connection management server.
It can be understood that when the target device is replaced, the connection procedure in the connection management server can be changed to complete the butt joint of different devices, manual intervention is not needed, manpower and resources can be saved, and the connection efficiency of the devices and the connection management server is improved.
In an embodiment, when the to-be-connected instruction is received, the to-be-connected instruction also needs to be analyzed, and information of the instruction is read, so as to perform a next series of operations, and the specific steps may include:
analyzing the instruction to be connected to obtain analyzed information to be connected of the equipment;
determining the identifier of the connection management server and the information of the program to be connected corresponding to the equipment to be connected according to the information to be connected of the equipment;
and sending a device to-be-connected request to the connection management server based on the identification and the to-be-connected program information.
In an embodiment, if it is desired to connect the device to be connected to the connection management server instead of the target device, it is necessary to find a program to be connected corresponding to the device to be connected from the connection management server, and finally load the program to be connected, and successfully connect the device to be connected to the connection management server, and the specific steps may include:
determining a program to be connected corresponding to the equipment to be connected from the connection management server according to the equipment connection format information;
and installing the program to be connected according to the authorization information returned by the connection management server based on the request to be connected of the equipment.
It can be understood that, if another target device or a new equipment in an internet of things is replaced, for example, the first intelligent robot is replaced with the second intelligent robot and connected to the connection management server, or the first intelligent robot is replaced with the first intelligent cleaning robot and connected to the connection management server, the network connection device may not be moved, and through the corresponding connection program stored in the connection management server by the target device, the other target device, or the new equipment in an internet of things, the network connection device may dynamically load the corresponding connection program, and directly access data to the connection management server.
As shown in fig. 3, when the network connection device has connected the target device to the connection management server, some data information may be stored in the server for subsequent reading use of data.
For example, taking the target device as an intelligent sweeping robot as an example, after the intelligent sweeping robot is connected to the connection management server, the intelligent sweeping robot may record and scan the whole room size, identify the floor waste, and the like, obtain the recorded and scanned data information and the identified data information, and may store the data information in the server for the next invocation of the data.
In one embodiment, the target connection program may be stored in a blockchain to facilitate subsequent extraction and storage of information, as shown in fig. 4, the network connection device may be a node in a distributed system, wherein, the distributed system can be a blockchain system, the blockchain system can be a distributed system formed by connecting a plurality of nodes in a network communication mode, Peer-To-Peer (P2P, Peer To Peer) networks can be formed among the nodes, any type of computer equipment, such as servers, terminals and other electronic equipment can become one node in the blockchain system by joining the Peer-To-Peer network, the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks.
As can be seen from the above, in the present embodiment, by determining the connection format information of the connection management server, in the process of establishing a connection between the target device and the connection management server, according to the connection format information, the network connection device finds the target connection program corresponding to the target device in the connection management server, performs automatic installation, without manual intervention, and improves the connection efficiency between the target device and the connection management server.
Embodiments of the present application will be described from the perspective of a device connection apparatus, which may be particularly integrated in a network connection device.
As shown in fig. 5, a device connection method may specifically include the following steps:
201. the network connection device determines attribute information of the connection management server, the attribute information including device connection format information.
The network connection device refers to a connection device for connecting the target device to the connection management server, such as an edge computing gateway, and the like, and plays a role in not only data transmission but also translation and interpretation in the process of connecting the target device to the connection management server.
For example, taking a network connection device as an edge computing gateway as an example, after determining attribute information of a connection management server, the edge computing gateway may obtain device connection format information included in the attribute information, and when a target device sends a connection instruction for connecting to the connection management server, the connection instruction may be parsed according to the device connection format information.
202. The network connection device receives a connection instruction sent by the target device, wherein the connection instruction indicates that the connection to the connection management server is needed.
For example, taking the network connection device as the edge computing gateway and the target device as the intelligent robot, when the intelligent robot wants to establish a connection with the connection management server, the connection can be established through the edge computing gateway.
Similarly, when the target device is not an intelligent robot but an intelligent sweeping robot, the target device may also be connected to the connection management server through the edge computing gateway, that is, in addition to the intelligent robot and the intelligent sweeping robot, other internet of things devices may also be connected to the connection management server through the edge computing gateway.
203. And analyzing the connection instruction by the network connection equipment according to the equipment connection format information to obtain the analyzed equipment connection information.
For example, in the synchronization step 202, taking the network connection device as an edge computing gateway and the target device as an intelligent robot as an example, the edge computing gateway may analyze the connection instruction sent by the intelligent robot according to the device connection format information determined in the step 201, and read information of the instruction to obtain analyzed device connection information.
It can be understood that the edge computing gateway not only has the functions of a general gateway, such as data transmission, but also has the functions of translation and interpretation, i.e. the function of resolving instructions.
For example, a general gateway, also called an inter-network connector or a protocol converter, may be used for both a wide area network interconnection and a local area network interconnection, may serve as a computer system or device responsible for conversion, and generally, when used in the internet of things, only functions as data transmission, while an edge computing gateway in the solution may not only function as data transmission, but also function as translation and interpretation.
204. And the network connection equipment determines the identifier of the connection management server and the target connection program information corresponding to the target equipment according to the equipment connection information.
For example, also taking the network connection device as the edge computing gateway and the target device as the robot as an example, according to the device connection information, the edge computing gateway may determine the identifier of the connection management server and the target connection program information corresponding to the intelligent robot, because the device connection information is obtained by analyzing the connection command according to the device connection format information and includes an agreed format information for the connection between the device agreed inside the connection management server and the connection management server, the identifier of the connection management server to be connected to the intelligent robot and the target connection program information corresponding to the intelligent robot may be determined.
205. The network connection device sends a device connection request to a connection management server based on the identification and the target connection program information. For example, the network connection device is also taken as an edge computing gateway, and the target device is taken as a robot, since the identifier of the connection management server is known, the edge computing gateway can find the connection management server corresponding to the identifier, and further send a device connection request to the connection management server, and similarly, the target connection program information is known, and the target connection program corresponding to the intelligent robot can be found in the connection management server.
And if the connection management server refuses to establish connection with the intelligent robot, the connection management server sends an authorization refusing message to the edge computing gateway.
206. And according to the authorization information returned by the connection management server based on the device connection request, the network connection device connects the target device to the connection management server.
For example, the connection management server may return authorization information to the network connection device when the connection management server agrees to establish a connection with the target device, e.g., the intelligent robot may be connected to the connection management server when the edge computing gateway receives the authorization information.
In an embodiment, when the network connection device receives the authorization information returned by the connection management server, a target connection program corresponding to the target device is found from a plurality of connection programs in the connection management server, the program is automatically loaded, the interaction between the target device and the connection management server is realized, and the target device is successfully connected to the connection management server.
In an embodiment, because it is not determined whether the connection management server has a target connection program corresponding to the target device, it is required to query whether the connection management server has the target connection program, and if the connection management server does not have the target connection device, the target connection program is uploaded to the connection management server, so that when the target device is connected to the connection management server, the network connection device can automatically load the target connection device.
In an embodiment, when the target device is already connected to the connection management server, if the target device is to be replaced with a device to be connected, a command to be connected may be sent to the connection management server, and then the program to be connected corresponding to the device to be connected is automatically loaded according to the authorization information returned by the connection management server, so that the target device may be successfully replaced.
It can be understood that, when the network connection device receives the instruction to be connected, the network connection device also needs to parse the instruction to be connected according to the device connection format information of the connection management server to obtain the information to be connected of the device, and further determines the identifier of the connection management server and the information of the program to be connected corresponding to the device to be connected, and then, the network connection device can send the request to be connected of the device to the connection management server according to the identifier and the information of the program to be connected.
For example, taking an example that the target device is an intelligent robot and the device to be connected is an intelligent sweeping robot, when the intelligent sweeping robot is connected to the connection management server instead of the intelligent robot in a situation that the intelligent robot has established a connection with the connection management server, the intelligent sweeping robot may send a command to be connected to the network connection device, the network connection device parses the command to be connected according to the device connection format information to obtain parsed device connection information, determines the identifier of the connection management server and the information of the program to be connected of the intelligent sweeping robot according to the device connection information, then sends a request to be connected to the connection management server, and finally changes the target connection program corresponding to the intelligent robot into the program to be connected corresponding to the intelligent sweeping robot according to the authorization information returned by the connection management server, and automatically loading the program to be connected, and successfully connecting the intelligent sweeping robot to the connection management server. The scheme is that based on the internet, massive internet-of-things equipment is accessed to a connection management server, and different equipment is docked through dynamic software system change, so that the network connection equipment is unchanged in software, manpower and resources can be saved, and meanwhile, the things of docking programs can be opened to the outside, and the required connection programs can be dynamically loaded.
As can be seen from the above, in the present embodiment, by determining the connection format information of the connection management server, in the process of establishing a connection between the target device and the connection management server, according to the connection format information, the network connection device finds the target connection program corresponding to the target device in the connection management server, performs automatic installation, without manual intervention, and improves the connection efficiency between the target device and the connection management server.
It can be understood that when the target device is replaced, the corresponding connection program can be found from the connection management server, and the connection of different devices can be completed by changing the connection program in the connection management server, so that manual intervention is not required, manpower and resources can be saved, and the connection efficiency of the devices and the connection management server can be improved.
In order to better implement the method, correspondingly, the embodiment of the present application further provides a device connection apparatus, wherein the device connection apparatus may be specifically integrated in a network connection device.
For example, as shown in fig. 6, the device connection apparatus may include a first determining unit 301, a receiving unit 302, a parsing unit 303, a second determining unit 304, a first sending unit 305, and a first connecting unit 306, as follows:
(1) a first determination unit 301;
a first determining unit 301 configured to determine attribute information of the connection management server, the attribute information including device connection format information.
(2) A receiving unit 302;
a receiving unit 302, configured to receive a connection instruction sent by a target device, where the connection instruction indicates that a connection to the connection management server is required.
(3) An analysis unit 303;
an analyzing unit 303, configured to analyze the connection instruction according to the device connection format information, to obtain analyzed device connection information.
(4) A second determination unit 304;
a second determining unit 304, configured to determine, according to the device connection information, an identifier of the connection management server and target connection program information corresponding to the target device.
(5) A first transmission unit 305;
a first sending unit 305 for sending a device connection request to the connection management server based on the identification and the target connector information.
(6) A first connection unit 306;
a first connection unit 306, configured to connect the target device to the connection management server according to authorization information returned by the connection management server based on the device connection request.
In one embodiment, the first connection unit 306 includes:
a first determination subunit 3061 for determining a target connection program from the plurality of programs stored by the connection management server, based on the target connection program information;
a first installation subunit 3062, configured to install the target connection program according to the authorization information returned by the connection management server based on the device connection request;
a connection subunit 3063, configured to connect the target apparatus to the connection management server according to the installation result.
In one embodiment, as shown in fig. 7, the device connecting apparatus may further include:
an inquiring unit 307, configured to inquire, according to the target connection program information, a target connection program corresponding to the target device in the connection management server;
a storage unit 308, configured to store the target connection program corresponding to the target device in the connection management server if the connection management server does not store the target connection program corresponding to the target device.
In one embodiment, as shown in fig. 8, the device connecting apparatus may further include:
a second sending unit 309, configured to send a device to-be-connected request to the connection management server when receiving a to-be-connected instruction of a device to be connected;
a changing unit 310, configured to change the target connection program into a to-be-connected program corresponding to the to-be-connected device according to authorization information returned by the connection management server based on the to-be-connected request of the device;
a second connection unit 311, configured to implement interaction between the to-be-connected device and the connection management server based on a program change result, and successfully connect the to-be-connected device to the connection management server.
In an embodiment, the second sending unit 309 includes:
the analyzing subunit 3091, configured to analyze the to-be-connected instruction to obtain analyzed to-be-connected information of the device;
a second determining subunit 3092, configured to determine, according to the to-be-connected information of the device, an identifier of the connection management server and to-be-connected program information corresponding to the to-be-connected device;
a sending subunit 3093, configured to send a device to-be-connected request to the connection management server based on the identifier and the to-be-connected program information.
In one embodiment, the changing unit 310 includes:
a third determining subunit 3101, configured to determine, according to the device connection format information, a to-be-connected program corresponding to the to-be-connected device from the connection management server;
a second installation subunit 3102, configured to install the to-be-connected program according to the authorization information returned by the connection management server based on the to-be-connected request of the device.
As can be seen from the above, in the device connection apparatus according to the embodiment of the present application, the first determining unit 301 determines attribute information of the connection management server, where the attribute information includes device connection format information; then, a connection instruction sent by the target device is received by the receiving unit 302, the connection instruction indicating that a connection to the connection management server is required; the analyzing unit 303 analyzes the connection instruction according to the device connection format information to obtain analyzed device connection information; determining, by the second determining unit 304, an identifier of the connection management server and target connection program information corresponding to the target device according to the device connection information; transmitting, by the first transmitting unit 305, a device connection request to the connection management server based on the identification and the target connector information; the target device is connected to the connection management server by the first connection unit 306 according to the authorization information returned by the connection management server based on the device connection request.
According to the scheme, the connection format information of the connection management server is determined, and in the process of establishing connection between the target equipment and the connection management server, the network connection equipment finds the target connection program corresponding to the target equipment in the connection management server according to the connection format information, so that automatic installation is carried out, manual intervention is not needed, and the connection efficiency of the target equipment and the connection management server is improved.
Accordingly, an embodiment of the present application further provides a computer device, where the computer device may be a network-side device such as a network connection device, as shown in fig. 9, which shows a schematic structural diagram of the network connection device according to the embodiment of the present application, specifically:
the computer device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 9 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device as a whole. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 via a power management system, so that functions of managing charging, discharging, and power consumption are implemented via the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions as follows:
determining attribute information of a connection management server, wherein the attribute information comprises equipment connection format information; receiving a connection instruction sent by target equipment, wherein the connection instruction indicates that the target equipment needs to be connected to the connection management server; analyzing the connection instruction according to the equipment connection format information to obtain analyzed equipment connection information; determining the identifier of the connection management server and target connection program information corresponding to the target equipment according to the equipment connection information; sending a device connection request to a connection management server based on the identification and the target connection program information; and connecting the target equipment to the connection management server according to the authorization information returned by the connection management server based on the equipment connection request.
For the above embodiments, reference may be made to the foregoing embodiments, and details are not described herein.
In one embodiment, as shown in fig. 4, the network connection device may be a node 200 in the distributed system 100, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication form. The nodes may form a Peer-To-Peer (P2P, Peer To Peer) network, and any type of computer device, such as a server, a terminal, a network connection device, and other electronic devices, may become a node in the blockchain system by joining the Peer-To-Peer network.
As can be seen from the above, in the present embodiment, by determining the connection format information of the connection management server, in the process of establishing a connection between the target device and the connection management server, according to the connection format information, the network connection device finds the target connection program corresponding to the target device in the connection management server, performs automatic installation, without manual intervention, and improves the connection efficiency between the target device and the connection management server.
It can be understood that when the target device is replaced, the corresponding connection program can be found from the connection management server, and the connection of different devices can be completed by changing the connection program in the connection management server, so that manual intervention is not required, manpower and resources can be saved, and the connection efficiency of the devices and the connection management server can be improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the device connection methods provided in the present application. For example, the instructions may perform the steps of:
determining attribute information of a connection management server, wherein the attribute information comprises equipment connection format information; receiving a connection instruction sent by target equipment, wherein the connection instruction indicates that the target equipment needs to be connected to the connection management server; analyzing the connection instruction according to the equipment connection format information to obtain analyzed equipment connection information; determining the identifier of the connection management server and target connection program information corresponding to the target equipment according to the equipment connection information; sending a device connection request to a connection management server based on the identification and the target connection program information; and connecting the target equipment to the connection management server according to the authorization information returned by the connection management server based on the equipment connection request.
The above detailed implementation of each operation can refer to the foregoing embodiments, and is not described herein again.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium may execute the steps in any device connection method provided in the embodiments of the present application, beneficial effects that can be achieved by any device connection method provided in the embodiments of the present application may be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
A device connection method, an apparatus, a computer device and a computer-readable storage medium provided in the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principles and embodiments of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An equipment connection method is characterized in that the network connection equipment suitable for the Internet of things comprises the following steps:
determining attribute information of a connection management server, wherein the attribute information comprises equipment connection format information;
receiving a connection instruction sent by target equipment, wherein the connection instruction indicates that the target equipment needs to be connected to the connection management server;
analyzing the connection instruction according to the equipment connection format information to obtain equipment connection information which accords with an internal agreed connection format of the connection management server;
determining the identifier of the connection management server and target connection program information corresponding to the target equipment according to the equipment connection information;
sending a device connection request to a connection management server based on the identification and the target connection program information;
connecting the target equipment to the connection management server according to authorization information returned by the connection management server based on the equipment connection request;
when a to-be-connected instruction of a to-be-connected device is received, sending a device to-be-connected request to the connection management server;
changing the target connection program into a program to be connected corresponding to the equipment to be connected according to authorization information returned by the connection management server based on the equipment request to be connected;
and realizing interaction between the equipment to be connected and the connection management server based on a program change result, and successfully connecting the equipment to be connected to the connection management server.
2. The method according to claim 1, wherein the connecting the target device to the connection management server according to authorization information returned by the connection management server based on the device connection request comprises:
determining a target connection program from a plurality of programs stored by the connection management server according to the target connection program information;
installing the target connection program according to authorization information returned by the connection management server based on the equipment connection request;
and connecting the target equipment to the connection management server according to the installation result.
3. The method according to claim 1, wherein after determining the identifier of the connection management server and the target connection program information corresponding to the target device according to the device connection information, before connecting the target device to the connection management server according to authorization information returned by the connection management server based on the device connection request, the method further comprises:
inquiring a target connection program corresponding to the target equipment in the connection management server according to the target connection program information;
and if the connection management server does not store the target connection program corresponding to the target equipment, storing the target connection program corresponding to the target equipment to the connection management server.
4. The method according to claim 1, wherein the sending a device to-be-connected request to the connection management server when receiving a to-be-connected instruction of a device to be connected comprises:
analyzing the instruction to be connected to obtain analyzed information to be connected of the equipment;
determining the identifier of the connection management server and the information of the program to be connected corresponding to the equipment to be connected according to the information to be connected of the equipment;
and sending a device to-be-connected request to the connection management server based on the identifier and the to-be-connected program information.
5. The method according to claim 1, wherein the changing the target connection program into the to-be-connected program corresponding to the to-be-connected device according to the authorization information returned by the connection management server based on the to-be-connected request of the device comprises:
determining a program to be connected corresponding to the equipment to be connected from the connection management server according to the equipment connection format information;
and installing the program to be connected according to authorization information returned by the connection management server based on the request to be connected of the equipment.
6. The method of claim 1, further comprising:
and storing the target connection program into a block chain.
7. An authority change apparatus comprising:
a first determining unit configured to determine attribute information of a connection management server, the attribute information including device connection format information;
a receiving unit, configured to receive a connection instruction sent by a target device, where the connection instruction indicates that connection to the connection management server is required;
the analysis unit is used for analyzing the connection instruction according to the equipment connection format information to obtain equipment connection information which accords with the internal agreed connection format of the connection management server;
a second determining unit, configured to determine, according to the device connection information, an identifier of the connection management server and target connection program information corresponding to the target device;
a first sending unit configured to send a device connection request to a connection management server based on the identifier and the target connection program information;
a first connection unit, configured to connect the target device to the connection management server according to authorization information returned by the connection management server based on the device connection request;
the second sending unit is used for sending a device to-be-connected request to the connection management server when receiving a to-be-connected instruction of the device to be connected;
a changing unit, configured to change the target connection program into a to-be-connected program corresponding to the to-be-connected device according to authorization information returned by the connection management server based on the to-be-connected request of the device;
and the second connecting unit is used for realizing the interaction between the equipment to be connected and the connection management server based on a program change result and successfully connecting the equipment to be connected to the connection management server.
8. The apparatus for changing authority according to claim 7, wherein the first connection unit includes:
a first determining subunit configured to determine a target connection program from among the plurality of programs stored by the connection management server, based on the target connection program information;
the first installation subunit is used for installing the target connection program according to authorization information returned by the connection management server based on the device connection request;
and the connection subunit is used for connecting the target equipment to the connection management server according to the installation result.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps in the device connection method according to any one of claims 1 to 6 when executing the program.
10. A storage medium storing instructions adapted to be loaded by a processor to perform the steps of the device connection method according to any one of claims 1 to 6.
CN201911126400.6A 2019-11-18 2019-11-18 Device connection method, device, computer device and computer-readable storage medium Active CN111193765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911126400.6A CN111193765B (en) 2019-11-18 2019-11-18 Device connection method, device, computer device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911126400.6A CN111193765B (en) 2019-11-18 2019-11-18 Device connection method, device, computer device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN111193765A CN111193765A (en) 2020-05-22
CN111193765B true CN111193765B (en) 2021-07-02

Family

ID=70709137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911126400.6A Active CN111193765B (en) 2019-11-18 2019-11-18 Device connection method, device, computer device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111193765B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111641528A (en) * 2020-05-29 2020-09-08 山东浪潮通软信息科技有限公司 Device management method, device, storage medium and computer readable medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508473B (en) * 2011-10-31 2015-12-02 康佳集团股份有限公司 A kind of intelligent home control system, control method and control device
CN103824099A (en) * 2014-03-03 2014-05-28 季攀 Method and system for connecting and controlling equipment automatically by intelligent terminal via identification tags
KR101681891B1 (en) * 2016-02-22 2016-12-05 박기선 Smart system for farm management
CN106604140A (en) * 2016-12-20 2017-04-26 四川长虹电器股份有限公司 Method for dynamically updating application data of smart television
CN110049010B (en) * 2019-03-12 2022-03-08 广州市保伦电子有限公司 Method and system for connecting distributed platform terminal equipment with server

Also Published As

Publication number Publication date
CN111193765A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
CN112073471A (en) Device control method and apparatus, storage medium, and electronic apparatus
CN109547524B (en) User behavior storage method, device, equipment and storage medium based on Internet of things
CN111984561B (en) IPMI command processing method, system, device and medium for BMC
CN111064626B (en) Configuration updating method, device, server and readable storage medium
CN110493028A (en) A kind of clustered deploy(ment) method, system, device and computer readable storage medium
CN113765714A (en) Equipment network distribution method and device, storage medium and electronic equipment
CN113746821A (en) Intelligent device control method and device, storage medium and electronic device
CN111193765B (en) Device connection method, device, computer device and computer-readable storage medium
CN109828840A (en) Resource method of combination, device, storage medium and electronic equipment
CN112202877A (en) Gateway linkage method, gateway, cloud server and user terminal
CN115242894A (en) Data processing method, data processing device, storage medium and computer equipment
CN113300933A (en) Session content management method and device, computer equipment and readable storage medium
CN101388792B (en) Single board plug-and-use processing method, device and telecommunication system
CN110417876A (en) Node server and main control device in session method, distributed system
CN112044061B (en) Game picture processing method and device, electronic equipment and storage medium
CN111008209B (en) Data reconciliation method, device and system, storage medium and electronic device
CN112527618A (en) Log collection method and log collection system
CN105050028A (en) Method and device for controlling household appliances
CN109831323B (en) Server information management method, management system and server
CN114650211B (en) Fault repairing method, device, electronic equipment and computer readable storage medium
CN112380411B (en) Sensitive word processing method, device, electronic equipment, system and storage medium
CN115052041A (en) Channel identification distribution method, device, equipment and storage medium
CN107493181B (en) Indication method and device of virtual expansion port
CN110417574B (en) Topology analysis method and device and storage medium
CN114244889A (en) Log obtaining method, device, terminal, intelligent device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant