Equipment connection method and device, server and storage medium
By storing the registration information of the user equipment locally on the first verification server and querying the registration location, the problem of low connection efficiency of user equipment during cloud management network switching is solved, and a user-insensitive cloud management network switching and efficient connection process is realized.
Patent Information
- Application Number
- CN202510397737.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-27
AI Technical Summary
During cloud management network switching, user equipment needs to manually modify the address of the verification server, resulting in low connection efficiency and difficult to achieve cloud management network switching without user perception.
By storing the registration information of the user equipment locally on the first verification server, in response to the verification request of the user equipment, the registration information is queried and whether the registration location indicates the current cloud management network. If not indicated, the address request is sent to the second cloud management network indicated by the registered location, obtain the address of the service server and return it to the user equipment.
The user-informed cloud management network switching is realized, which improves the connection efficiency of user equipment and avoids the complexity of users manually modifying and verifying server addresses.
Smart Images

Figure CN120223671A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technologies, and particularly to a device connection method, apparatus, server, and storage medium. Background Art
[0002] A cloud management network can provide various services to user equipment. Before using the services provided by the cloud management network, the user equipment needs to be registered in the cloud management network first. After successful registration, the user equipment can obtain the second address of the service server from the authentication server of the cloud management network based on the first address of the authentication server configured therein, so as to establish a connection with the service server based on the second address and request services from the service server.
[0003] However, in order to provide more refined services to user equipment, a cloud management network can be split into multiple cloud management networks. Multiple cloud management networks respectively provide different services to user equipment. For example, cloud management network A can be split into cloud management networks B1 and B2. In this case, the cloud management network providing services to the user equipment may be switched from cloud management network A to cloud management network B1. The user equipment cannot access the authentication server of cloud management network B1 based on the first address of the authentication server configured therein, resulting in the inability to establish a connection with the service server of cloud management network B1. In order to establish a connection with the service server of the switched cloud management network B1, it is often necessary for the user to manually modify the configured first address of the authentication server on the user equipment, which is relatively complicated and the connection efficiency of the user equipment is low. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a device connection method, apparatus, server, and storage medium, so as to improve the connection efficiency of user equipment and realize seamless switching of cloud management networks for users. The specific technical solutions are as follows:
[0005] In a first aspect, an embodiment of the present application provides a device connection method, which is applied to a first authentication server of a first cloud management network. The method includes:
[0006] In response to receiving an authentication request sent by a first user equipment, query the registration information of the first user equipment from the registration information locally stored in the first authentication server;
[0007] If the registration information of the first user equipment is queried, determine whether the registration location recorded in the registration information of the first user equipment indicates the first cloud management network;
[0008] If it does not indicate the first cloud management network, send an address request to a second authentication server of a second cloud management network in the system indicated by the registration location, and obtain the address of the service server of the second cloud management network returned by the second authentication server;
[0009] If the first cloud management network is indicated, obtain the address of the business server of the first cloud management network;
[0010] Return the obtained address to the first user equipment, so that the first user equipment establishes a connection with the business server of the corresponding cloud management network according to the obtained address.
[0011] In some embodiments, the method further includes:
[0012] If the registration information of the first user equipment is not queried, discard the verification request and return a connection failure message to the first user equipment.
[0013] In some embodiments, the registration information locally stored in the first verification server includes: the registration information of user equipment registered in other cloud management networks in the system, and the registration location recorded in the registration information of user equipment registered in other cloud management networks in the system indicates the other cloud management networks. The method further includes:
[0014] Receive the registration information generated by the verification server of other cloud management networks after receiving the registration request of the user equipment, and store it locally.
[0015] In some embodiments, the registration information locally stored in the first verification server includes: the registration information of user equipment registered in the first cloud management network, and the registration location recorded in the registration information of user equipment registered in the first cloud management network indicates the first cloud management network. The method further includes:
[0016] In response to receiving the registration request of the user equipment, generate the registration information of the user equipment, and store it locally.
[0017] In some embodiments, the method further includes:
[0018] Receive an address request sent by the verification server of other cloud management networks in the system, and return the access address of the business server of the first cloud management network to the verification server of the other cloud management networks, so that the verification server of the other cloud management networks feeds back the access address to the second user equipment, and so that the second user equipment establishes a connection with the business server of the first cloud management network according to the access address.
[0019] In a second aspect, an embodiment of the present application provides a device connection device, which is applied to the first verification server of the first cloud management network. The device includes:
[0020] A query module, configured to, in response to receiving a verification request sent by a first user equipment, query the registration information of the first user equipment from the registration information locally stored in the first verification server;
[0021] A judgment module, configured to, if the registration information of the first user device is queried, determine whether the registration location recorded in the registration information of the first user device indicates the first cloud management network;
[0022] An acquisition module, configured to, if it does not indicate the first cloud management network, send an address request to a second verification server of a second cloud management network in the system indicated by the registration location, and acquire the address of the service server of the second cloud management network returned by the second verification server; if it indicates the first cloud management network, acquire the address of the service server of the first cloud management network;
[0023] A return module, configured to return the acquired address to the first user device, so that the first user device establishes a connection with the service server of the corresponding cloud management network according to the acquired address.
[0024] In some embodiments, the judgment module is further configured to:
[0025] If the registration information of the first user device is not queried, discard the verification request and return a connection failure message to the first user device.
[0026] In some embodiments, the registration information locally stored by the first verification server includes: the registration information of user devices registered in other cloud management networks in the system, and the registration location recorded in the registration information of user devices registered in other cloud management networks in the system indicates the other cloud management networks. The apparatus further includes a generation module, configured to:
[0027] Receive the registration information generated by the verification server of the other cloud management network after receiving the registration request of the user device, and store it locally.
[0028] In some embodiments, the registration information locally stored by the first verification server includes: the registration information of user devices registered in the first cloud management network, and the registration location recorded in the registration information of user devices registered in the first cloud management network indicates the first cloud management network. The apparatus further includes a generation module, configured to:
[0029] In response to receiving the registration request of the user device, generate the registration information of the user device, and store it locally.
[0030] In some embodiments, the apparatus further includes a receiving module, configured to:
[0031] Receiving an address request sent by a verification server of another cloud management network in the receiving system, and returning the access address of the service server of the first cloud management network to the verification server of the other cloud management network, so that the verification server of the other cloud management network feeds back the access address to the second user device, and enabling the second user device to establish a connection with the service server of the first cloud management network according to the access address.
[0032] In a third aspect, an embodiment of the present application provides a server, including a processor and a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions that can be executed by the processor. The processor is prompted by the machine-executable instructions to implement any method provided in the first aspect above.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, it implements any method provided in the first aspect.
[0034] In a fifth aspect, an embodiment of the present application further provides a computer program product containing instructions. When it runs on a computer, it causes the computer to execute any method provided in the first aspect.
[0035] Beneficial effects of the embodiments of the present application:
[0036] In the technical solution provided by the embodiments of the present application, the registration location is recorded in the registration information of the user device locally stored in the first verification server. The first verification server responds to the verification request of the user device, queries the registration information of the user device for verification. If it is queried, indicating that the user device has passed the verification, the first verification server obtains the address according to the registration location recorded in the queried registration information and returns it to the user device. That is, when the registration location indicates the first cloud management network, directly obtain the address of the service server of the first cloud management network. When the registration location indicates the second cloud management network, send an address request to the second verification server of the second cloud management network to obtain the address of the service server of the second cloud management network. The user device establishes a connection with the service server of the registered cloud management network according to the address returned by the first verification server.
[0037] Applying the technical solution provided by the embodiments of the present application, even if the cloud management network where the verification server receiving the verification request is located is not the cloud management network where the user device is registered, the verification server can obtain the address of the service server of the registered cloud management network according to the registration location recorded in the registration information of the user device. In this way, the user does not need to manually modify the configured address of the verification server on the user device, improving the connection efficiency of the user device and realizing seamless switching of the cloud management network for the user without perception.
[0038] Of course, it is not necessary for any product or method implementing this application to achieve all of the above-mentioned advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of this application, and those of ordinary skill in the art can also obtain other embodiments based on these drawings.
[0040] Figure 1 A schematic diagram for establishing a connection;
[0041] Figure 2 The first flowchart of the device connection method provided by the embodiment of this application;
[0042] Figure 3 The second flowchart of the device connection method provided by the embodiment of this application;
[0043] Figure 4 A schematic diagram of device connection provided by the embodiment of this application;
[0044] Figure 5 A schematic structural diagram of the device connection device provided by the embodiment of this application;
[0045] Figure 6 A schematic structural diagram of the server provided by the embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] The following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the drawings in the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, rather than all embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art based on this application belong to the scope of protection of this application.
[0047] The cloud management network can provide various services to user devices. Before using the services provided by the cloud management network, the user device needs to register in the cloud management network first. After successful registration, the user device can obtain the second address of the business server from the authentication server of the cloud management network based on the first address of the authentication server configured thereon, and thus establish a connection with the business server based on the second address to request services from the business server. Generally, when the user device leaves the factory, the address of the authentication server of the cloud management network has been configured, and the user does not need to manually configure it on the user device.
[0048] As Figure 1 shown in the connection establishment process. Figure 1Among them, the user device is a commercial network device. Before establishing a connection, the commercial network device has been registered on the cloud management network through the commercial World Wide Web (web), and the address of the Hypertext Transfer Protocol (HTTP) server (i.e., the authentication server) of the cloud management network has been configured on the user device.
[0049] 1) After the user device is powered on and connected to the network, according to the configured address, it sends a request to the HTTP server to authenticate the user device and obtain the address of the socket server (i.e., the service server). Figure 1 The socket server in it has been omitted.
[0050] 2) After the HTTP server receives the request from the user device, it first uses the database on the cloud management network to verify the legitimacy of the user device, that is, to verify whether the user device has been registered on the current cloud management network. After passing the verification, the HTTP server returns the address of the socket server of the cloud management network to the user device.
[0051] 3) After the user device receives the address returned by the HTTP server, it establishes a connection with the socket server.
[0052] However, with the development of cloud management network services, in order to better serve users in different industries, provide more refined services to user devices, and simplify the complexity of cloud services, a cloud management network can be split into multiple cloud management networks. Multiple cloud management networks provide different services to user devices respectively, and the cloud management network that provides services is determined according to the device model of the user device or the industry attribute selected by the user.
[0053] For example, cloud management network A can be split into cloud management network B1 and cloud management network B2. In this case, the cloud management network that provides services to the user device may be switched from cloud management network A to cloud management network B1. The user device cannot access the authentication server of cloud management network B1 based on the first address of the configured authentication server, resulting in an inability to establish a connection with the service server of cloud management network B1. In order to establish a connection with the service server of the switched cloud management network B1, it is often necessary for the user to manually modify the configured first address of the authentication server on the user device, which is rather complicated and the connection efficiency of the user device is low.
[0054] To solve the above problems, an embodiment of the present application provides a device connection method, which is applied to the first authentication server of the first cloud management network. Refer to Figure 2 , Figure 2 which is the first process schematic diagram of the device connection method provided by the embodiment of the present application. The device connection method includes the following steps:
[0055] Step S21, in response to receiving a verification request sent by a first user device, query the registration information of the first user device from the registration information locally stored in the first verification server. If the registration information of the first user device is queried, then execute Step S22.
[0056] Step S22, determine whether the registered location recorded in the registration information of the first user device indicates a first cloud management network. If it does not indicate the first cloud management network, that is, no, then execute Step S23; if it indicates the first cloud management network, that is, yes, then execute Step S24.
[0057] Step S23, send an address request to the second verification server of the second cloud management network in the system indicated by the registered location, and obtain the address of the business server of the second cloud management network returned by the second verification server.
[0058] Step S24, obtain the address of the business server of the first cloud management network.
[0059] Step S25, return the obtained address to the first user device, so that the first user device establishes a connection with the business server of the corresponding cloud management network according to the obtained address.
[0060] In the technical solution provided by the embodiments of the present application, the registered location is recorded in the registration information of the user device locally stored in the first verification server. In response to the verification request of the user device, the first verification server queries the registration information of the user device for verification. If it is queried, indicating that the user device has passed the verification, then the first verification server obtains the address according to the registered location recorded in the queried registration information and returns it to the user device. That is, when the registered location indicates the first cloud management network, directly obtain the address of the business server of the first cloud management network; when the registered location indicates the second cloud management network, send an address request to the second verification server of the second cloud management network to obtain the address of the business server of the second cloud management network. The user device establishes a connection with the business server of the registered cloud management network according to the address returned by the first verification server.
[0061] Applying the technical solution provided by the embodiments of the present application, even if the cloud management network where the verification server receiving the verification request is located is not the cloud management network registered by the user device, the verification server can also obtain the address of the business server of the registered cloud management network according to the registered location recorded in the registration information of the user device. In this way, the user does not need to manually modify the configured address of the verification server on the user device, improving the connection efficiency of the user device and realizing a seamless cloud management network switch for the user.
[0062] In the embodiments of the present application, the system where the first cloud management network is located further includes other cloud management networks. All the cloud management networks in this system belong to the same cloud server provider and provide different business services for user devices. Here, the number of cloud management networks in the system and the provided business services are not limited. Each cloud management network includes an authentication server and a business server. Among them, the authentication server is used to register user devices and verify whether a user device has been registered, and the business server is used to provide corresponding business services for user devices.
[0063] In the embodiments of the present application, the authentication server of the cloud management network can receive an authentication request sent by a user device. Subsequently, taking the first authentication server of the first cloud management network receiving the authentication request sent by the first user device as an example for illustration.
[0064] In the above step S21, the authentication request is a request message for verifying whether the first user device has been registered and obtaining the address of the business server. The first user device sends an authentication request to the first authentication server according to the configured address of the authentication server. The first authentication server receives the authentication request sent by the first user device and verifies whether the first user device is a registered user device.
[0065] In the embodiments of the present application, the first authentication server locally (i.e., the database of the first cloud management network) stores the registration information of registered user devices. The registration information may include the device identifier of the user device and the registration location of the cloud management network (abbreviated as the registered cloud management network) indicating the registration of the user device. The registration location may be the address of the business server of the registered cloud management network, or the address of other servers of the registered cloud management network, or the identifier of the registered cloud management network, and this is not limited. The registration information may also include device information such as the Media Access Control (MAC) address, device model, and version number of the user device, and the registration information is not limited here.
[0066] The first authentication server can query the registration information of the first user device in the locally stored registration information to verify the first user device.
[0067] In the embodiments of the present application, the device identifier of the first user device may be carried in the authentication request. The first authentication server can query the registration information including the device identifier carried in the authentication request in the locally stored registration information, and the queried registration information is the registration information of the first user device, referred to as the first registration information.
[0068] If the first authentication server queries the first registration information from the locally stored registration information, indicating that the first user device is a registered user device and the first user device passes the verification, then step S22 is continued to be executed.
[0069] In the above step S22, the first verification server may determine the recorded registration location from the first registration information, determine the cloud management network indicated by the registration location, and determine whether the indicated cloud management network is the first cloud management network, so as to determine whether the registration cloud management network of the first user device is the first cloud management network.
[0070] If the indicated cloud management network is not the first cloud management network but another cloud management network in the system (such as the second cloud management network), then the registration cloud management network of the first user device is not the first cloud management network, and the first verification server may execute step S23 to obtain the address of the business server of the registration cloud management network; if the indicated cloud management network is the first cloud management network, then the registration cloud management network of the first user device is the first cloud management network, and the first verification server may execute step S24 to obtain the address of the business server of the registration cloud management network.
[0071] In the above step S23, the address request is used to obtain the address of the business server. When the first user device is registered in the second cloud management network, the first verification server may send an address request to the verification server of the second cloud management network (referred to as the second verification server). The second verification server receives the address request sent by the first verification server and obtains the address of the business server of the second cloud management network where it is located (i.e., the second address) based on the address request. The second verification server may generate an address response corresponding to the address request, including the obtained address, and send the generated address response to the first verification server.
[0072] In one example, the address request may carry a verification passed flag. The second verification server may parse the address request, obtain the verification passed flag, directly obtain the second address based on the verification passed flag, and generate an address response.
[0073] In another example, the address request may carry the device identifier of the first user device. The second verification server may parse the address request, obtain the device identifier, and query the registration information of the parsed device identifier in the registration information stored locally in the second verification server (i.e., the database of the second cloud management network). After querying the registration information, the second verification server may determine that the first user device has passed verification, obtain the second address, and generate an address response.
[0074] In the embodiments of the present application, the registration information stored locally in the second verification server may include the registration information of user devices registered in the second cloud management network and the registration information of user devices registered in other cloud management networks outside the second cloud management network. Since it has been determined that the first user device is registered in the second cloud management network, to improve the query speed, the second verification server may query the registration information of the parsed device identifier in the registration information of user devices stored locally in the second verification server and registered in the second cloud management network.
[0075] In other examples, the second verification server can also parse the address request. After determining that the sender of the address request is another verification server (such as the first verification server), it directly obtains the second address and generates an address response. The method for the second verification server to obtain the second address is not limited herein.
[0076] The first verification server receives the address response and parses the second address from the address response. By sending an address request to the second verification server, the accuracy of obtaining the address of the service server is improved.
[0077] In the above step S24, when the first user device is registered in the first cloud management network, the first verification server can directly obtain the address of the service server in the first cloud management network where it is located (i.e., the first address), so as to improve the response speed of the verification server, achieve a quick feedback of the address to the user device, and enhance the user experience.
[0078] In the above step S25, the first verification server can generate a verification response corresponding to the verification request, including the obtained address, and send the generated verification response to the first user device. The first user device can receive the verification response and parse the address of the service server in the corresponding cloud management network from the verification response, and then establish a connection with the service server. That is, if the first user device is registered in the first cloud management network, the first user device obtains the first address and establishes a connection with the service server in the first cloud management network according to the first address; if the first user device is registered in the second cloud management network, the first user device obtains the second address and establishes a connection with the service server in the second cloud management network according to the second address.
[0079] In some embodiments, as Figure 3 shown, an embodiment of the present application further provides a device connection method, which may include the following steps:
[0080] Step S31, in response to receiving a verification request sent by the first user device, query the registration information of the first user device from the registration information locally stored in the first verification server. If the registration information of the first user device is queried, then execute step S32; if the registration information of the first user device is not queried, then execute step S36.
[0081] Step S32, determine whether the registration location recorded in the registration information of the first user device indicates the first cloud management network. If it does not indicate the first cloud management network, that is, no, then execute step S33; if it indicates the first cloud management network, that is, yes, then execute step S34.
[0082] Step S33: Send an address request to the second verification server of the second cloud management network in the system indicated by the registration location, and obtain the address of the business server of the second cloud management network returned by the second verification server.
[0083] Step S34: Obtain the address of the business server of the first cloud management network.
[0084] Step S35: Return the obtained address to the first user device, so that the first user device can establish a connection with the business server of the corresponding cloud management network according to the obtained address.
[0085] Step S36: Discard the verification request and return a connection failure message to the first user device.
[0086] The above Steps S31 to S35 are the same as the above Steps S21 to S25.
[0087] If the first verification server does not query the first registration information from the locally stored registration information, indicating that the first user device is not registered and the verification of the first user device fails, the first verification server executes Step S36, discards the verification request sent by the received first user device, and returns a verification response including a connection failure message to the first user device to notify the first user device of the connection failure. By discarding the verification requests of the user devices that fail the verification, the storage space of the cloud management network is saved.
[0088] In the embodiments of the present application, device information such as the MAC address, device model, and version number of the first user device may also be carried in the verification request. After determining that the first user device has passed the verification, if the first user device is verified for the first time and the first user device is registered in the first cloud management network, the first verification server may record the device information carried in the verification request in the first registration information locally stored by the first verification server.
[0089] If the first user device is verified for the first time and the first user device is registered in the second cloud management network, the first verification server may carry the device information carried in the verification request in the address request and send it to the second verification server. After determining that the first user device has passed the verification, the second verification server may record the device information carried in the address request in the registration information of the first user device locally stored by the second verification server.
[0090] In the embodiments of the present application, other user devices may also be used as the first user device to establish a connection with the business server of the registered cloud management network of the user device in the above Figures 2 to 3 way.
[0091] In some embodiments, the registration information locally stored in the first verification server may include: the registration information of user devices registered in the first cloud management network, and the registration location recorded in the registration information of user devices registered in the first cloud management network indicates the first cloud management network. The first verification server may obtain the registration information of user devices registered in the first cloud management network and stored locally in the following manner: in response to receiving a registration request from a user device, generate the registration information of the user device and store it locally.
[0092] In the embodiments of the present application, the first verification server may receive a registration request from any user device, register the user device in the first cloud management network, and generate the registration information of the user device. The generated registration information includes the device identifier of the user device carried in the registration request and the registration location indicating the first cloud management network. The first verification server may store the generated registration information in the database of the first cloud management network.
[0093] In the embodiments of the present application, the verification server of any cloud management network in the system may obtain the registration information of user devices registered in the cloud management network in the above manner and store it locally in the verification server.
[0094] In some embodiments, the registration information locally stored in the first verification server may include: the registration information of user devices registered in other cloud management networks, and the registration location recorded in the registration information of user devices registered in other cloud management networks in the system indicates other cloud management networks. The first verification server may obtain the registration information of user devices registered in other cloud management networks and stored locally in the following manner: receive the registration information generated by the verification server of other cloud management networks after receiving a registration request from a user device and store it locally.
[0095] In the embodiments of the present application, the first verification server may receive the registration information sent by any other verification server. For ease of description, the second verification server is taken as an example for illustration, which is not restrictive. The second verification server may receive a registration request from any user device, register the user device in the second cloud management network, generate the registration information of the user device and store it locally in the second verification server. The generated registration information includes the device identifier of the user device carried in the registration request and the registration location indicating the second cloud management network. Subsequently, the second verification server broadcasts the generated registration information to the verification servers of other cloud management networks in the system except the second cloud management network. The first verification server may receive the registration information sent by the second verification server and store it locally.
[0096] In the embodiments of the present application, the verification server of any cloud management network in the system can obtain the registration information of user devices registered in other cloud management networks except this cloud management network through the above method and store it locally on the verification server. By synchronizing the registration information of user devices registered in any cloud management network to other cloud management networks in the system, the verification server of any cloud management network can query the registration information of all registered user devices, improving the user experience.
[0097] In the embodiments of the present application, the registration information locally stored on the verification server of any cloud management network in the system may simultaneously include: the registration information of user devices registered in this cloud management network, and the registration information of user devices registered in other cloud management networks except this cloud management network.
[0098] In some embodiments, the above device connection method may further include: receiving an address request sent by the verification server of other cloud management networks in the system, and returning the access address of the service server of the first cloud management network to the verification server of other cloud management networks, so that the verification server of other cloud management networks feeds back the access address to the second user device, and enabling the second user device to establish a connection with the service server of the first cloud management network according to the access address.
[0099] In the embodiments of the present application, the first verification server can receive an address request sent by the verification server of any other cloud management network. For the convenience of description, the third verification server is taken as an example for illustration, which is not restrictive.
[0100] The third verification server can receive a verification request from a user device (referred to as the second user device for easy distinction), and query the registration information of the second user device (referred to as the second registration information for short) from the registration information locally stored on the third verification server. If the second registration information is queried, the cloud management network indicated by the registration location recorded in the second registration information is determined, and it is judged whether the indicated cloud management network is the third cloud management network. If it is not the third cloud management network but other cloud management networks in the system (i.e., the first cloud management network), an address request is sent to the first verification server.
[0101] The first verification server receives the address request, obtains the address of the service server of the first cloud management network (i.e., the access address, also the first address), and returns it to the third verification server. The method for the first verification server to obtain the access address is the same as the method for the second verification server to obtain the second address. For specific details, refer to the relevant description in the above step S23, which will not be elaborated here.
[0102] After receiving the access address returned by the first verification server, the third verification server feeds back the access address to the second user device. The second user device may establish a connection with the business server of the first cloud management network according to the access address. For details, please refer to the relevant description in the above Figures 2 to 3 section.
[0103] The following Figure 4 provides a detailed description of the device connection method provided by the embodiments of the present application. Figure 4 In the example, the system includes two cloud management networks (i.e., the commercial cloud and the education cloud), the commercial cloud is the first cloud management network, the education cloud is the second cloud management network, the education network device is the first network device to be verified, the verification server is an HTTP server, and the business server is a socket server. Figure 4 The socket server included in the cloud management network is omitted.
[0104] 1) The user can select the cloud management network registered by the user device on the client according to the model or type of the user device and the industry attribute to which it belongs. The client sends a registration request for the user device to the HTTP server through the web of the registered cloud management network to register the user device. For example, Figure 4 in the example, the client sends a registration request for the education network device to the HTTP server on the education cloud through the education web and registers on the education cloud. The HTTP server on the education cloud generates registration information including the device identifier of the education network device and the registration location (i.e., the information of the education cloud, such as the address of the business server of the education cloud), and stores it in the database. The HTTP server on the education cloud also synchronizes the generated registration information to other cloud management networks (i.e., the commercial cloud) in the system. In this way, the registration information of the education network device is also stored in the database of the commercial cloud.
[0105] 2) After the education network device is powered on and connected to the network, based on the configured address, it sends a request (i.e., a verification request) to the address of the HTTP server of the commercial cloud to verify the education network device and obtain the address of the socket server, as in step 1. After receiving the request, the HTTP server of the commercial cloud verifies whether the education network device is a registered device, and uses the device identifier of the education network device to query the registration information (i.e., the first registration information) of the education network device in the database of the commercial cloud, as in step 2.
[0106] If the registered location recorded in the queried registration information is the information of the education cloud, the HTTP server of the commercial cloud forwards the request, that is, generates a new request (i.e., an address request), and sends the generated request to the HTTP server of the education cloud, and the HTTP server of the education cloud continues to process it, such as in step 3. The HTTP server of the education cloud queries the registration information of the education network device in the database of the education cloud. After querying, it returns the address of the socket server of the education cloud to the HTTP server of the commercial cloud, such as in step 4. The HTTP server of the commercial cloud continues to return the address of the socket server of the education cloud to the education network device, such as in step 5. The education network device establishes a connection with the socket server of the education cloud according to the address of the socket server of the education cloud, such as in step 6. Since all the cloud management networks in the system have synchronized the registration information of the user device during registration, at this time, the education network device can determine the registration location without cross-cloud querying, and efficiently completes the forwarding of the request of the education network device.
[0107] If the registered location recorded in the queried registration information is the information of the commercial cloud, the HTTP server of the commercial cloud directly obtains the address of the socket server of the commercial cloud and returns it to the education network device.
[0108] If the registration information of the education network device cannot be queried in the database of the commercial cloud, the received verification request is directly discarded.
[0109] Applying the technical solution provided by the embodiment of the present application, during the registration of the user device, the registration information of the user device is synchronized among multiple cloud management networks. When the user device requests the address of the service server, the registration information of the user device registered on any cloud management network is stored on all cloud management networks. Therefore, the user device does not need to send requests to multiple HTTP servers, nor does it need to query in multiple cloud management networks, which improves the efficiency of the system in processing the requests of the user device. At the same time, it realizes the seamless switching of the cloud management network for the user, greatly improves the efficiency of the cloud management network switching, improves the efficiency of the cloud migration of the user device, and also greatly improves the performance of message processing, and is also convenient for the management of the user device.
[0110] Corresponding to the above device connection method, the embodiment of the present application further provides a device connection device, as Figure 5 shown, applied to the first verification server of the first cloud management network, the device includes:
[0111] A query module 51, configured to query the registration information of the first user device from the registration information locally stored in the first verification server in response to receiving a verification request sent by the first user device;
[0112] A determination module 52, configured to, if the registration information of the first user device is queried, determine whether the registered location recorded in the registration information of the first user device indicates a first cloud management network;
[0113] An obtaining module 53, configured to, if it does not indicate a first cloud management network, send an address request to a second verification server of a second cloud management network in the system indicated by the registered location, and obtain the address of the service server of the second cloud management network returned by the second verification server; if it indicates a first cloud management network, obtain the address of the service server of the first cloud management network;
[0114] A return module 54, configured to return the obtained address to the first user device, so that the first user device establishes a connection with the service server of the corresponding cloud management network according to the obtained address.
[0115] In the technical solution provided by the embodiment of the present application, the registered location is recorded in the registration information of the user device locally stored in the first verification server. The first verification server queries the registration information of the user device in response to the verification request of the user device for verification. If it is queried, indicating that the user device has passed the verification, the first verification server obtains the address according to the registered location recorded in the queried registration information and returns it to the user device. That is, when the registered location indicates a first cloud management network, directly obtain the address of the service server of the first cloud management network; when the registered location indicates a second cloud management network, send an address request to the second verification server of the second cloud management network to obtain the address of the service server of the second cloud management network. The user device establishes a connection with the service server of the registered cloud management network according to the address returned by the first verification server.
[0116] Applying the technical solution provided by the embodiment of the present application, even if the cloud management network where the verification server receiving the verification request is located is not the cloud management network registered by the user device, the verification server can obtain the address of the service server of the registered cloud management network according to the registered location recorded in the registration information of the user device. In this way, the user does not need to manually modify the configured address of the verification server on the user device, improving the connection efficiency of the user device and realizing a seamless cloud management network switch for the user.
[0117] In some embodiments, the determination module 52 is further configured to:
[0118] If the registration information of the first user device is not queried, discard the verification request and return a connection failure message to the first user device.
[0119] In some embodiments, the registration information locally stored in the first verification server includes: the registration information of user devices registered in other cloud management networks in the system, and the registration location recorded in the registration information of user devices registered in other cloud management networks in the system indicates other cloud management networks. The apparatus further includes a generation module configured to:
[0120] Receive the registration information generated by the verification server of another cloud management network after receiving the registration request of the user device, and store it locally.
[0121] In some embodiments, the registration information locally stored in the first verification server includes: the registration information of user devices registered in the first cloud management network, and the registration location recorded in the registration information of user devices registered in the first cloud management network indicates the first cloud management network. The apparatus further includes a generation module configured to:
[0122] In response to receiving the registration request of the user device, generate the registration information of the user device, and store it locally.
[0123] In some embodiments, the apparatus further includes a receiving module configured to:
[0124] Receive an address request sent by the verification server of another cloud management network in the system, and return the access address of the service server of the first cloud management network to the verification server of the other cloud management network, so that the verification server of the other cloud management network feeds back the access address to the second user device, and enables the second user device to establish a connection with the service server of the first cloud management network according to the access address.
[0125] An embodiment of the present application further provides a server, as Figure 6 shown, including a processor 61 and a machine-readable storage medium 62. The machine-readable storage medium 62 stores machine-executable instructions that can be executed by the processor 61. The processor 61 is prompted by the machine-executable instructions to: implement any of the above device connection methods applied to the first verification server of the first cloud management network.
[0126] The machine-readable storage medium may include a random access memory (Random Access Memory, RAM), or may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory. Optionally, the machine-readable storage medium may also be at least one storage device located away from the aforementioned processor.
[0127] The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0128] In another embodiment provided by the present application, there is also provided a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the device connection method of any of the above device connection methods applied to the first verification server of the first cloud management network is implemented.
[0129] In another embodiment provided by the present application, there is also provided a computer program product containing instructions. When it runs on a computer, it causes the computer to execute the device connection method of any of the above device connection methods applied to the first verification server of the first cloud management network in the above embodiments.
[0130] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media (such as Solid State Disks (SSDs)), etc.
[0131] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.
[0132] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, server, storage medium and program product, since they are basically similar to the method embodiments, the description is relatively simple, and reference can be made to the corresponding parts of the method embodiments for the relevant content.
[0133] The above are only the preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.
Claims
1. A device connection method, characterized in that: The method applied to a first authentication server of a first cloud management network includes: In response to receiving the verification request sent by the first user equipment, querying the registration information of the first user equipment from the registration information locally stored on the first verification server; If the registration information of the first user equipment is queried, determining whether the registration location recorded in the registration information of the first user equipment indicates the first cloud management network; If the first cloud management network is not indicated, sending an address request to a second verification server of a second cloud management network in the system indicated by the registration location, and obtaining the address of a service server of the second cloud management network returned by the second verification server; If the first cloud management network is indicated, obtaining the address of the service server of the first cloud management network; The acquired address is returned to the first user device, so that the first user device establishes a connection with the service server of the corresponding cloud management network according to the acquired address.
2. The method according to claim 1, characterized in that The method further comprises: If the registration information of the first user equipment is not found, the verification request is discarded and a connection failure message is returned to the first user equipment.
3. The method according to claim 1, characterized in that The registration information locally stored in the first verification server includes: registration information of user equipment registered in other cloud management networks in the system, and the registration location recorded in the registration information of user equipment registered in other cloud management networks in the system indicates the other cloud management networks. The method further includes: Receive the registration information generated by the verification server of other cloud management networks after receiving the registration request of the user device, and store it locally.
4. The method according to claim 1, characterized in that: The registration information locally stored in the first verification server includes: registration information of a user device registered with the first cloud management network, the registration location recorded in the registration information of the user device registered with the first cloud management network indicates the first cloud management network, and the method further includes: In response to receiving a registration request from a user device, registration information of the user device is generated and stored locally.
5. The method according to claim 1, characterized in that The method further comprises: Receive address requests sent by verification servers of other cloud management networks in the system, and return the access address of the business server of the first cloud management network to the verification servers of the other cloud management networks, so that the verification servers of the other cloud management networks can feedback the access address to the second user device, and enable the second user device to establish a connection with the business server of the first cloud management network based on the access address.
6. A device connection device, characterized in that: A first verification server applied to a first cloud management network, the device comprising: a query module, configured to query the registration information of the first user equipment from the registration information locally stored in the first verification server in response to receiving the verification request sent by the first user equipment; a judgment module, configured to judge whether the registration location recorded in the registration information of the first user equipment indicates the first cloud management network if the registration information of the first user equipment is queried; an acquisition module, configured to, if the first cloud management network is not indicated, send an address request to a second verification server of a second cloud management network in the system indicated by the registration location, and obtain the address of a service server of the second cloud management network returned by the second verification server; and, if the first cloud management network is indicated, obtain the address of the service server of the first cloud management network; The return module is used to return the acquired address to the first user device, so that the first user device establishes a connection with the service server of the corresponding cloud management network according to the acquired address.
7. The device according to claim 6, characterized in that The judging module is further used for: If the registration information of the first user equipment is not found, the verification request is discarded and a connection failure message is returned to the first user equipment.
8. The device according to claim 6, characterized in that The registration information locally stored in the first verification server includes: registration information of user equipment registered in other cloud management networks in the system, and the registration location recorded in the registration information of user equipment registered in other cloud management networks in the system indicates the other cloud management network. The device also includes: a generating module for: The registration information generated by the verification server of the other cloud management network after receiving the registration request of the user equipment is received, and stored locally.
9. A server, characterized in that: The method comprises a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement the method described in any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.