Automatic distribution network testing method and related system

Through automated distribution network testing methods and systems, the compatibility and switching success rate of IoT devices and multiple cloud servers are detected, which solves the problem of insufficient cloud detection in existing distribution network testing and improves the comprehensiveness and stability of the test.

CN118524029BActive Publication Date: 2024-10-22SHENZHEN HESUNG INTELLIGENCE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410988517.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-10-22
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

Existing distribution network testing methods fail to fully detect the compatibility of IoT devices and the cloud, resulting in incomplete testing.

Method used

Provide an automated distribution network testing method and system. After the Internet of Things device successfully connects to the cloud server, it controls its switching to other cloud servers and calculates the switching success rate to ensure that the device is compatible with multiple cloud servers and can be used when needed. Stable switching to other cloud servers.

Benefits of technology

It improves the comprehensiveness of distribution network testing, ensures the stability and compatibility of IoT devices when switching cloud servers, and enhances the comprehensiveness and reliability of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118524029B_ABST
    Figure CN118524029B_ABST
Patent Text Reader

Abstract

The present application provides an automated network distribution test method and related system, wherein the test device sends an automated test script to a mobile terminal to realize the communication connection between the IoT device and the first cloud server; receives a first feedback message from the first cloud server, the feedback message is used to characterize the successful connection status of the IoT device; sends a switching instruction to the device server; for each switching event, receives a second feedback message from the corresponding cloud server; records the first number of second feedback messages; and calculates the switching success rate based on the first number and the total number of multiple cloud servers. In the embodiment of the present application, after the IoT device successfully accesses the cloud server, the test device controls the IoT device to switch to other cloud servers, ensures that the IoT device is compatible with multiple cloud servers, and ensures that the IoT device can stably switch to other cloud servers among the multiple cloud servers when it is necessary to switch cloud servers, thereby improving the comprehensiveness of the network distribution test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communications, and in particular to an automated distribution network testing method and related systems. Background Art

[0002] After the successful development of IoT devices, network configuration testing is required to ensure that the IoT devices can be successfully connected to the network. Network configuration needs to be associated with device terminals, routers, IoT devices and the cloud. In the existing technology, network configuration testing usually tests the compatibility between terminals and IoT devices, and between routers and IoT devices. It lacks testing of the cloud, and the network configuration testing is not comprehensive enough. Summary of the invention

[0003] The present application provides an automated network configuration test method and related system. After an IoT device successfully accesses a cloud server, the IoT device is controlled to switch to other cloud servers and its switching success rate is calculated, thereby ensuring that the IoT device is compatible with multiple cloud servers and that the IoT device can stably switch to other cloud servers among multiple cloud servers when switching cloud servers is required, thereby improving the comprehensiveness of the network configuration test.

[0004] In a first aspect, the present application provides an automated network distribution testing method, which is applied to a test device of an automated network distribution testing system, wherein the automated network distribution testing system also includes a mobile terminal, an Internet of Things device, a device server, and multiple cloud servers, and the test device is communicatively connected to the mobile terminal, the device server, and each of the multiple cloud servers. The method includes: sending an automated testing script to the mobile terminal, wherein the automated testing script is used to instruct the Internet of Things device to achieve a communication connection between the mobile terminal and the Internet of Things device, and between the Internet of Things device and a first cloud server among the multiple cloud servers through an automated network distribution testing process; receiving a first feedback message from the first cloud server, wherein the first feedback message is used to characterize a connection status between the Internet of Things device and the first cloud server, and the connection status includes A connection success state and a connection failure state, the first feedback message is associated with the connection success state; a switching instruction is sent to the device server, the switching instruction is used to indicate at least one switching event, and each switching event is used to instruct the device server to switch the cloud server currently connected to the Internet of Things device to other cloud servers among the multiple cloud servers except the first cloud server, until the other cloud servers are traversed; for each switching event, a second feedback message is received from the cloud server corresponding to each switching event, the second feedback message is used to characterize the connection state of the Internet of Things device and the cloud server corresponding to each switching event, and the second feedback message is associated with the connection success state; a first number of the second feedback messages is recorded; and a switching success rate is calculated based on the first number and the total number of the multiple cloud servers.

[0005] In a second aspect, the present application provides an automated distribution network testing system, comprising a testing device and a mobile terminal, a device server, and multiple cloud servers that are communicatively connected to the testing device, wherein the testing device is used to execute the step instructions in the method as described in any one of the first aspects.

[0006] In a third aspect, the present application provides a testing device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method as described in any one of the first aspects.

[0007] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program or instructions, and when the computer program or instructions are executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0008] It can be seen that in an embodiment of the present application, the test device sends an automated test script to the mobile terminal, and the automated test script is used to instruct the Internet of Things device to realize the communication connection between the mobile terminal and the Internet of Things device, and the Internet of Things device and the first cloud server among multiple cloud servers through an automated network configuration test process; a first feedback message from the first cloud server is received, and the first feedback message is used to characterize the connection status between the Internet of Things device and the first cloud server, and the connection status includes a successful connection status and a failed connection status, and the first feedback message is associated with the successful connection status; a switching instruction is sent to the device server, and the switching instruction is used to indicate at least one switching event, and each switching event is used to instruct the device server to switch the cloud server currently connected to the Internet of Things device to other cloud servers among multiple cloud servers except the first cloud server until all other cloud servers are traversed; for each switching event, a second feedback message is received from the cloud server corresponding to each switching event, and the second feedback message is used to characterize the connection status between the Internet of Things device and the cloud server corresponding to each switching event, and the second feedback message is associated with the successful connection status; a first number of second feedback messages is recorded; and a switching success rate is calculated based on the first number and the total number of multiple cloud servers. In an embodiment of the present application, after the IoT device successfully connects to the cloud server, the test device controls the IoT device to switch to other cloud servers and calculates its switching success rate, thereby ensuring that the IoT device is compatible with multiple cloud servers and that the IoT device can stably switch to other cloud servers among the multiple cloud servers when switching cloud servers is required, thereby improving the comprehensiveness of the network configuration test. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0010] Figure 1 A schematic diagram of a manual network configuration test provided in an embodiment of the present application;

[0011] Figure 2 A schematic diagram of an automated distribution network testing system provided in an embodiment of the present application;

[0012] Figure 3 A schematic diagram of the structure of a test device provided in an embodiment of the present application;

[0013] Figure 4 A flowchart of an automated network distribution testing method provided in an embodiment of the present application;

[0014] Figure 5This is a structural block diagram of the Internet of Things device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0015] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0016] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0017] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0018] In the embodiments of the present application, "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent the following three situations: A exists alone; A and B exist at the same time; B exists alone. Among them, A and B can be singular or plural.

[0019] In the embodiment of the present application, the symbol " / " can indicate that the objects associated with each other are in an "or" relationship. In addition, the symbol " / " can also indicate a division sign, that is, performing a division operation. For example, A / B can indicate A divided by B.

[0020] In the embodiments of the present application, "at least one item" or similar expressions refer to any combination of these items, including any combination of single items or plural items, and refer to one or more, and multiple refers to two or more. For example, at least one item of a, b, or c can represent the following seven situations: a, b, c, a and b, a and c, b and c, a, b, and c. Among them, each of a, b, and c can be an element or a set containing one or more elements.

[0021] In the embodiments of the present application, "equal to" can be used in conjunction with greater than, and is applicable to the technical solution adopted when greater than, and can also be used in conjunction with less than, and is applicable to the technical solution adopted when less than. When equal to is used in conjunction with greater than, it is not used in conjunction with less than; when equal to is used in conjunction with less than, it is not used in conjunction with greater than.

[0022] The present application provides an automated network distribution testing method and related system. After an IoT device successfully accesses a cloud server, the IoT device is controlled to switch to other cloud servers and its switching success rate is calculated to ensure that the IoT device can stably switch to a new cloud server when it is necessary to switch cloud servers, thereby improving the comprehensiveness of the network distribution test.

[0023] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0024] In the prior art, manual network configuration includes a variety of methods, such as device hotspot configuration, mobile phone hotspot configuration, Bluetooth configuration, zero-to-zero configuration, router configuration, etc. This application takes Bluetooth configuration as an example to describe in detail the steps involved in manual network configuration.

[0025] Bluetooth network configuration (ble-config) requires that both the IoT device and the mobile terminal support BLE (Bluetooth Low Energy). The mobile terminal connects to the IoT device via Bluetooth and sends the router's network configuration information to the IoT device via BLE. The network configuration information includes the WiFi name (i.e. Service Set Identifier, SSID) and WiFi password (i.e. password). After the IoT device obtains the configuration information, it can connect to the WiFi router. Then, determine whether the IoT device is connected to the Internet successfully based on the prompt information on the mobile terminal. Please refer to Figure 1 , Figure 1The schematic diagram of the manual network configuration test provided in the embodiment of the present application takes the connection of a network wireless camera as an example. The devices involved in the manual network configuration test process include: mobile phone, network wireless camera, and router. First, make sure that the Bluetooth of the network wireless camera is turned on; step ① the mobile phone connects to the Bluetooth of the network wireless camera; step ② the mobile phone sends the SSID and password of the router; step ③ the network wireless camera connects to the WiFi network, and the network configuration is completed.

[0026] Even if the above method is converted into an automated testing method, it can only detect the compatibility between the terminal and the IoT device, and the router and the IoT device. Without cloud-based detection, the network configuration test is not comprehensive enough.

[0027] See also Figure 2 , Figure 2 A schematic diagram of an automated distribution network testing system provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the automated distribution network test system 1 includes a test device 10, a mobile terminal 20, an Internet of Things device 30, a router 40, a device server 50, and multiple cloud servers 60. The test device 10 can communicate and connect with each of the mobile terminal 20, the Internet of Things device 30, the device server 50, and the multiple cloud servers 60. The test device 10 can be a PC, or a terminal device such as a smart phone, a tablet computer, or a portable computer. Among them, the mobile terminal 20 can be a user equipment (User Equipment, UE) such as a mobile phone, a smart phone, a laptop computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a handheld device, a vehicle-mounted device, a wearable device, a computing device, or other processing equipment connected to a wireless modem, a mobile station (Mobile Station, MS), a mobile terminal (Mobile Terminal), etc. The device server 50 may be a physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms. IoT devices may be smart home appliances that can communicate and interact with users through the Internet or local networks, including but not limited to realizing functions such as automated control, remote operation, data monitoring and feedback, such as smart door locks, smart refrigerators, smart sockets, smart fans, smart TVs, etc.

[0028] In specific implementation, the control process between various devices in the automatic distribution network test system 1 refers to the following steps:

[0029] Step S01, the test device sends an automation script to the mobile terminal. The automation script automatically operates the page of the APP (such as the smart home APP) on the mobile terminal to configure the network. The APP on the mobile terminal is opened by the automation script, and the APP can perform the following operations: search for the Bluetooth of the IoT device, automatically select the IoT device for connection, and after the connection is successful, send a feedback message to the test device through the mobile terminal to notify the test device that the mobile terminal is successfully connected to the IoT device.

[0030] Step S02: The test device sends a network configuration state entry instruction to the IoT device. The test device sends a network configuration state entry instruction to the IoT device by calling the serial port service interface; after receiving the network configuration state entry instruction, the IoT device enters the network configuration state and synchronizes the network configuration state to the mobile terminal; the test device determines that the IoT device enters the network configuration state through the UI identification APP page.

[0031] Step S03: The test device sends the WiFi name and password of the router to the mobile terminal.

[0032] Step S04: The mobile terminal sends the WiFi name and password to the IoT device. The APP is controlled by an automated script to automatically select the corresponding WiFi name and enter the password to send the WiFi name and password to the IoT device.

[0033] Step S05, the IoT device accesses the router according to the WiFi name and password. The automated script detects the connection status and sends the connection status to the test device via the mobile terminal.

[0034] Step S06: If the connection status is a successful connection status, the test device sends a third instruction to the IoT device. The third instruction is used to trigger the IoT device to send an activation request including a device serial number (denoted as SN) and a signature (denoted as SIG, which refers to the data obtained by encrypting the SN using a private key) to the device server via an HTTPS request.

[0035] Step S07: The IoT device sends an activation request to the device server.

[0036] Step S08: The device server verifies the activation request. After receiving the activation request, the device server decrypts the signature according to the stored public key to verify the legitimacy of the IoT device.

[0037] Step S09: The device server determines that the IoT device is a legitimate device.

[0038] Step S010: The test device sends the endpoint information of the first cloud server to the device server.

[0039] Step S011: The device server sends the device serial number of the IoT device to the first cloud server.

[0040] Step S012: The first cloud server sends the connection certificate to the device server. The first cloud server prepares the connection certificate (including account number and password) and security policy required for the IoT device to connect according to the device serial number. The first cloud server returns the connection certificate and security policy to the device server.

[0041] Step S013: The device server returns the connection certificate and security policy, and the endpoint information of the first cloud server to the IoT device.

[0042] Step S014, the IoT device accesses the first cloud server according to the connection certificate and security policy and the endpoint information of the first cloud server. The IoT device securely connects to the selected first cloud server through TLS, so that the IoT device can exchange data and perform control operations with the cloud.

[0043] Step S015: The first cloud server detects that the connected IoT device is successfully registered.

[0044] Step S016: The first cloud server sends a feedback message to the test device.

[0045] Step S017: The test device sends a switching instruction to the device server.

[0046] Step S018, the device server switches the cloud server. The device server determines at least one switching event based on the number of cloud servers other than the first cloud server among the multiple cloud servers. The switching event means that the device server uses other cloud servers as cloud servers accessed by the IoT device in turn, and obtains the corresponding connection certificates and endpoint information of the cloud servers. In each switching event, the IoT device accesses the corresponding cloud server based on the corresponding connection certificate and endpoint information. Exemplarily, the cloud service includes a first cloud server and a second cloud server. After the IoT device successfully accesses the first cloud server, the device server determines a switching event. The switching event is to disconnect the IoT device from the first cloud server, switch the IoT device to the second cloud server, and obtain the connection status between the second cloud server and the IoT device.

[0047] Step S019, the cloud server feeds back the number of successful connections. The cloud server detects whether the IoT device is successfully connected. If it is successfully connected, it sends a feedback message to the test device, and the test device records the number of successful connections; if the connection fails, the test device records the corresponding cloud server.

[0048] Step S020: The test device calculates the switching success rate based on the number of successful connections and the total number of cloud servers.

[0049] See also Figure 3 , Figure 3 A schematic diagram of the structure of a test device provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the test device 10 may include: a processor 1001, such as a CPU, a network interface 1003, a user interface 1004, a memory 1002, and a communication bus 1006. Among them, the communication bus is used to realize the connection and communication between these components. The user interface 1004 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1004 may also include a standard wired interface and a wireless interface. The network interface 1003 may optionally include a standard wired interface and a wireless interface (such as a WIFI interface). The memory 1002 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1002 may also be a storage device independent of the aforementioned processor 1001. Among them, the memory 1002 stores a computer program 1005, and the computer program 1005 is configured to be executed by the above-mentioned processor 1001. The computer program 1005 includes instructions for executing any step in the following automated network distribution test method embodiment. In a specific implementation, the processor 1001 is used to execute any step performed by the test device 10 in the following method embodiment. The network interface 1003 is mainly used to connect to the backend server and perform data communication with the backend server; the user interface 1004 is mainly used to connect to the client (user end) and perform data communication with the client.

[0050] Those skilled in the art will understand that Figure 3 The structure of the test device 10 shown in the figure does not constitute a limitation on the test device 10, and the test device 10 may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0051] Based on the above hardware structure, various embodiments of the automated network distribution testing method of the present application are proposed.

[0052] See also Figure 4 , Figure 4 A flow chart of an automated network distribution test method provided in an embodiment of the present application is applied to a test device 10 of an automated network distribution test system 1, and the method includes:

[0053] Step S401: Send an automated test script to the mobile terminal.

[0054] Among them, the automated testing script is used to instruct the Internet of Things device to achieve communication connection between the mobile terminal and the Internet of Things device, and between the Internet of Things device and the first cloud server among the multiple cloud servers through an automated network configuration testing process.

[0055] Among them, the automated test script is used to control the APP on the mobile terminal to automatically execute the network configuration test process, such as automatically connecting to the IoT device through Bluetooth search, automatically filling in the received WiFi name and password and sending it to the IoT device, etc.

[0056] In some embodiments, the automated network configuration test system also includes a router, and the automated network configuration test process includes: detecting the compatibility status between the mobile terminal and the Internet of Things device, the compatibility status including compatibility and incompatibility; and detecting the compatibility status between the Internet of Things device and the router.

[0057] Among them, in the process of IoT device network configuration, IoT devices usually need to be configured and managed through mobile terminals (such as smartphones or tablets). If there is a compatibility issue between the device and the mobile terminal, the user may not be able to successfully connect to the device. In addition, different IoT devices may use different wireless communication technologies and protocols, such as WiFi, Bluetooth, Zigbee, etc. By testing the compatibility between the device and the router, it can be ensured that the device can be connected normally and effectively communicate with the local area network, ensuring the stability and reliability of data transmission.

[0058] In some embodiments, the detecting the compatibility status between the mobile terminal and the Internet of Things device includes: sending a first instruction to the mobile terminal, the first instruction is used to instruct the mobile terminal to access the Internet of Things device; receiving a third feedback message from the mobile terminal, the third feedback message is used to characterize the connection status between the mobile terminal and the Internet of Things device; if the third feedback message is associated with the successful connection status, continuing to execute the step of "detecting the compatibility status between the Internet of Things device and the router"; if the third feedback message is associated with the failed connection status, ending the automatic network configuration test process.

[0059] Among them, the third feedback message can perform UI recognition on the APP display page based on the automation script. If the display interface is identified as a prompt of connection failure, the third feedback message is associated with the connection failure status, as well as the specific reasons for failure, network configuration time and other information; if the display interface is identified as a prompt of successful connection, the third feedback message is associated with the connection success status. The automation script sends the third feedback message to the test device through the mobile terminal. When the connection is successful, the router compatibility test continues to be performed according to the automation script, and the time, event, and status of the current node are recorded through the automation script. For example, in this embodiment, the event can be "Bluetooth connection" and the status can be "successful"; when the connection fails, it indicates that the mobile terminal currently used is incompatible with the Internet of Things device, and the current network configuration test is directly ended.

[0060] It can be seen that in this embodiment, only when the IoT device is successfully connected to the mobile terminal will the subsequent test continue, and the corresponding time, event and status will be recorded through the automated script; when the IoT device fails to connect to the mobile terminal, the test will end directly, and the failure reason and network configuration time will be recorded, which can improve the efficiency and automation of the test. The test engineer does not need to manually intervene in each connection attempt, the script can automatically capture this information and generate a detailed test report.

[0061] In some embodiments, the test device is also communicatively connected to the IoT device, and the detecting the compatibility status between the IoT device and the router includes: sending a second instruction to the IoT device, the second instruction is used to instruct the IoT device to enter a network distribution state; sending first configuration information to the mobile device, the first configuration information includes an identity and password of the router, the first configuration information is used to instruct the IoT device to access the router; receiving a fourth feedback message from the mobile terminal, the fourth feedback message is used to characterize the connection status between the IoT device and the router, and the fourth feedback message is used to characterize the connection success status.

[0062] The test device can be connected to the IoT device through a serial port interface, and then send a second instruction to the IoT device through the serial port interface to control the IoT device to enter a network configuration state. The network configuration state generally refers to the IoT device being in a specific mode or operating state, allowing a user or system to initialize or connect the device to the network.

[0063] The identity is the WiFi name corresponding to the router, and the password is the WiFi connection password of the router.

[0064] After the mobile terminal receives the first configuration information, the automation script obtains the first configuration information and automatically inputs the first configuration information on the APP display page, so as to send the first configuration information to the IoT device through wireless communication such as Bluetooth, hotspot, etc. The IoT device accesses the router according to the first configuration information.

[0065] After the mobile terminal sends the first configuration information to the Internet of Things device, the mobile terminal disconnects from the Internet of Things device and controls the mobile terminal to access the router.

[0066] It can be seen that in this embodiment, after the test device controls the Internet of Things device to enter the network configuration state, the first configuration information of the router is sent to the mobile terminal. After receiving the first configuration information, the mobile terminal sends the first configuration information to the Internet of Things device through an automated script. The Internet of Things device performs a compatibility test with the router according to the first configuration information. If the connection is successful, it indicates that the Internet of Things device is compatible with the router, and the automated network configuration test process continues; if the connection fails, it indicates that the Internet of Things device is incompatible with the router, and the current test process ends.

[0067] In some embodiments, after receiving the fourth feedback message from the mobile terminal and before receiving the first feedback message from the device server, the method also includes: sending a third instruction to the Internet of Things device, the third instruction is used to instruct the Internet of Things device to send second configuration information to the device server, the second configuration information includes the device serial number and signature of the Internet of Things device, the second configuration information is used to instruct the device server to authenticate the Internet of Things device, and the authentication result includes a legal state and an illegal state; if the second configuration information is associated with the legal state of the Internet of Things device, then sending a fourth instruction to the device server, the fourth instruction is associated with the endpoint information of the first cloud server, the fourth instruction is used to instruct the device server to obtain a connection certificate from the first cloud server according to the device serial number and the endpoint information, and send the connection certificate to the Internet of Things device to realize the communication connection between the Internet of Things device and the first cloud server; if the second configuration information is associated with the illegal state of the Internet of Things device, then the automatic network configuration test process is ended.

[0068] Among them, see Figure 5 The IoT device 30 includes a WiFi module 31, in which the device serial number SN and the signature SIG of the IoT device 30 are burned. Among them, SN is globally unique, and the device serial numbers of any two IoT devices are different. SIG is the result of encryption by an encryption algorithm, for example, using an asymmetric encryption algorithm to generate a public-private key pair, and using the private key to encrypt the device serial number SN according to a signature algorithm such as SHA1WithRSA to obtain the signature SIG. The IoT device 30 can read the device serial number and signature in the WiFi module 31.

[0069] Among them, the device server refers to the background server of the IoT device, which can authenticate and control access to the IoT device to ensure that only authorized users or devices can access its services and data. At the same time, for legitimate devices, it can remotely configure and update the device and monitor the operating status of the IoT device in real time.

[0070] Among them, when the IoT device is connected to the router, an activation request is sent to the device server through an HTTPS request, and the activation request includes the device serial number SN and the signature SIG. The device server stores the activation service, and after the device serial number SN and the signature SIG are successfully verified using the public key, the IoT device is determined to be legal. The device server can decide the cloud server to which the IoT device is connected. However, during the automated network configuration test, the endpoint information of the first cloud server to be accessed is directly sent to the device server through the test device. After receiving the endpoint information, the device server sends the device serial number of the IoT device to the corresponding first cloud server, authenticates with the first cloud server, and obtains connection certificates, security policies and other information. The device server sends the connection certificate, security policy and other information and the endpoint information of the first cloud server to the IoT device, instructing the IoT device to access the first cloud server.

[0071] Among them, if the IoT identity authentication fails, that is, the identity authentication result is an illegal identity, then the network configuration test will be terminated directly.

[0072] It can be seen that in this embodiment, when the IoT device is connected to the router, it can send an activation request to the device server through an HTTPS request for identity authentication. Whether it can access a specific cloud server is determined based on the identity authentication result. If the identity is legitimate, the test device directly determines the connected cloud server, and the device server obtains the connection certificate based on the endpoint information of the cloud server. The IoT device accesses the cloud server based on the connection certificate; if the identity is illegal, the network configuration test is terminated directly.

[0073] Step S402: receiving a first feedback message from the first cloud server.

[0074] The first feedback message is used to characterize the connection status between the IoT device and the first cloud server, the connection status includes a connection success status and a connection failure status, and the first feedback message is associated with the connection success status.

[0075] Among them, the test device is communicated with each of the multiple cloud servers, and the cloud server can directly send the connection status of the IoT device to the test device; the test device can also directly send a request to the cloud server to obtain the corresponding information.

[0076] Among them, the subsequent switching operation is performed only when the first feedback message is associated with a successful connection status. This is because if the IoT device can successfully access the first cloud server, it indicates that the mobile terminal and router used in the current automated network configuration test process have no negative effect on the network configuration process of the IoT device, and only after successfully accessing the cloud server, it is of practical significance for detecting the switching average rate; if the IoT device cannot successfully access the first cloud server, it is impossible to determine whether the combination of the IoT device, the mobile terminal, and the router can successfully access the cloud server. At this time, selecting the second cloud server for network configuration connection is still to determine whether the current combination of the IoT device, the mobile terminal, and the router can successfully configure the network, rather than detecting whether the cloud server can be switched smoothly or detecting the compatibility issues between the current combination of the IoT device, the mobile terminal, and the router and the existing multiple cloud servers.

[0077] Step S403: Send a switching instruction to the device server.

[0078] Among them, the switching instruction is used to indicate at least one switching event, and each switching event is used to instruct the device server to switch the cloud server currently connected to the IoT device to other cloud servers among the multiple cloud servers except the first cloud server until the other cloud servers are traversed.

[0079] The number of switching events is equal to the number of the plurality of cloud servers minus 1.

[0080] Among them, the other cloud servers except the first cloud server among the multiple cloud servers are recorded as second cloud servers, and each switching event includes the following steps:

[0081] After receiving the switching instruction, the device server disconnects the first cloud server from the IoT device; obtains the endpoint information of the second cloud server, and sends the device serial number to the second cloud server according to the endpoint information of the second server to obtain information such as the connection certificate and security policy; sends the connection certificate, security policy and other information, and the endpoint information of the second cloud server to the IoT device; the IoT device establishes a connection with the second cloud server according to the connection certificate, security policy and other information, and the endpoint information of the second cloud server.

[0082] Step S404: for each switching event, receiving a second feedback message from a cloud server corresponding to each switching event.

[0083] The second feedback message is used to represent the connection status between the IoT device and the cloud server corresponding to each switching event, and the second feedback message is associated with the connection success status.

[0084] Step S405: Record the first quantity of the second feedback messages;

[0085] Step S406: Calculate the switching success rate according to the first number and the total number of the plurality of cloud servers.

[0086] Among them, the factors that affect the successful switching of IoT devices from one cloud server to other cloud servers mainly include: network conditions, load conditions, configuration consistency and other issues. Specifically, network latency and bandwidth stability directly affect the speed and success rate of switching. Higher latency or unstable network connections may cause packet loss or delays during the switching process, thereby affecting the real-time and success rate of the switching. The load status of the target cloud server affects whether it can receive and process data requests from the switching device. If the target server is overloaded, it may not be able to effectively process additional requests, resulting in switching failure or delay. During the switching process, it is necessary to ensure that the configuration of the new cloud server is consistent with that of the IoT device, including software version, parameter settings, etc. Any configuration inconsistency may cause the device to not work properly or work abnormally.

[0087] Among them, the switching success rate = the first number / (total number - 1), and the switching success rate reflects the ability of the system to successfully complete the switching when switching is required. By monitoring and calculating the switching success rate, the fault tolerance of the system can be evaluated, and necessary measures can be taken to improve the stability and reliability of the system. An effective switching mechanism can reduce the operating cost of the system. By reasonably allocating and utilizing cloud server resources, the efficiency of resource utilization can be optimized to the greatest extent, avoiding unnecessary cost expenditures caused by failures or performance issues.

[0088] In some embodiments, if there are multiple mobile terminals and multiple routers, the connection combination relationship between the multiple mobile terminals and the multiple routers is first determined. The multiple mobile terminals can be devices of different brands or devices of the same brand but different models, and the same is true for the routers. For the automated network configuration test process, the more mobile terminals and routers there are, the more compatibility the smart device can detect with most products. For example, see Table 1, which shows the number information of mobile terminals and routers provided in the embodiments of the present application.

[0089] Table 1

[0090]

[0091] The connection combinations include: terminal A-router 1, terminal A-router 2; terminal B-router 1, terminal B-router 2; terminal C-router 1, terminal C-router 2. For each connection combination, the automated network configuration test process in the present application is executed to obtain a switching success rate.

[0092] For the same IoT device, if multiple connection combinations can successfully access the first cloud server, the average switching success rate of the IoT device is obtained based on the multiple switching success rates of the multiple connection combinations; if some of the multiple connection combinations cannot access the first cloud server, the average switching success rate of the IoT device is obtained based on the switching success rate of the connection combinations that can successfully access the first cloud server among the multiple connection combinations.

[0093] Among them, the preset threshold value can be a value such as 80%, 90%, etc., which can be set according to actual needs.

[0094] Among them, if the average switching success rate is less than the preset threshold, it indicates that the IoT device is unstable when switching to the cloud. Obtain the cloud server that failed to switch. If there is a cloud server that fails too many times during switching, mark the cloud server as a cloud server to be excluded. For example, there are 5 cloud servers, namely cloud server 1, cloud server 2, cloud server 3, cloud server 4, and cloud server 5. The six connection combinations formed by the mobile terminal and the router provided in Table 1 can all successfully access cloud server 1. When performing the switching operation, the six connection combinations have a failure to connect to cloud server 2 of 0, a failure to connect to cloud server 3 of 4, a failure to connect to cloud server 4 of 1, and a failure to connect to cloud server 5 of 0. If the specific value is 2, cloud 3 should be marked as a cloud server to be excluded.

[0095] It can be seen that in this embodiment, the average switching success rate is less than the preset threshold, indicating that there is instability in the device during the switching process, and there may be problems with the cloud server status. Therefore, if the number of switching failures of the cloud server exceeds a specific value (for example, 2 times), the cloud server will be marked as a candidate for exclusion, which can identify cloud servers with possible problems for subsequent investigation and repair, thereby improving the overall switching success rate and stability.

[0096] In some embodiments, the test device is also communicatively connected to each of the multiple cloud servers, and after receiving the second feedback message from the device server, the method also includes: sending a query instruction to the currently connected cloud server, the query instruction being used to obtain the device status stored in the currently connected cloud server; and obtaining the page status after a successful switch in the mobile terminal; determining whether the page status is consistent with the device status; if consistent, determining that the second feedback message is associated with the connection success status; if inconsistent, determining that the second feedback message is associated with the connection failure status.

[0097] In this embodiment, the testing device can also obtain the page status of the APP display page in the mobile terminal through an automated script, and obtain the device status stored in the currently connected cloud server, and determine whether the IoT device is successfully connected to the cloud server based on the page status and device status.

[0098] In some embodiments, the first feedback message and each of the second feedback messages carry a first timestamp and a second timestamp, respectively, the first timestamp is used to characterize the moment when the IoT device is successfully connected to the first cloud server, and each second timestamp is used to characterize the moment when the IoT device switches to other cloud servers and successfully connects, after calculating the switching success rate based on the first number and the total number of the multiple cloud servers, the method further includes: calculating the time interval between adjacent timestamps between the first timestamp and each of the second timestamps, the time interval being used to characterize the time required for the IoT device to switch from the currently connected cloud server to other cloud servers and successfully connect; and calculating an average time interval based on multiple time intervals.

[0099] In this embodiment, the time interval between adjacent timestamps between the first timestamp and the second timestamp means: there is a first timestamp and at least one second timestamp, the time interval between the first timestamp and the first second timestamp, and the time interval between the first second timestamp and the second second timestamp is the time required to switch to other cloud servers and successfully connect, and the average time interval is obtained based on multiple time intervals, and the average time interval is the time required when the switching event occurs. The smaller the average time interval, the smaller the user perception and the better the effect; the larger the average time interval, the more obvious the user can feel the network terminal or delay, and the user experience is poor.

[0100] It can be seen that in an embodiment of the present application, the test device sends an automated test script to the mobile terminal, and the automated test script is used to instruct the Internet of Things device to realize the communication connection between the mobile terminal and the Internet of Things device, and the Internet of Things device and the first cloud server among multiple cloud servers through an automated network configuration test process; a first feedback message from the first cloud server is received, and the first feedback message is used to characterize the connection status between the Internet of Things device and the first cloud server, and the connection status includes a successful connection status and a failed connection status, and the first feedback message is associated with the successful connection status; a switching instruction is sent to the device server, and the switching instruction is used to indicate at least one switching event, and each switching event is used to instruct the device server to switch the cloud server currently connected to the Internet of Things device to other cloud servers among multiple cloud servers except the first cloud server until all other cloud servers are traversed; for each switching event, a second feedback message is received from the cloud server corresponding to each switching event, and the second feedback message is used to characterize the connection status between the Internet of Things device and the cloud server corresponding to each switching event, and the second feedback message is associated with the successful connection status; a first number of second feedback messages is recorded; and a switching success rate is calculated based on the first number and the total number of multiple cloud servers. In an embodiment of the present application, after the IoT device successfully connects to the cloud server, the test device controls the IoT device to switch to other cloud servers and calculates its switching success rate, thereby ensuring that the IoT device is compatible with multiple cloud servers and that the IoT device can stably switch to other cloud servers among the multiple cloud servers when switching cloud servers is required, thereby improving the comprehensiveness of the network configuration test.

[0101] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may 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 or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may 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 may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.

[0102] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.

[0103] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0104] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0105] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the above-mentioned units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0106] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0107] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0108] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0109] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0110] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An automated distribution network testing method, characterized in that: A test device applied to an automated distribution network test system, wherein the automated distribution network test system further comprises a mobile terminal, an Internet of Things device, a device server, and a plurality of cloud servers, wherein the test device is communicatively connected with the mobile terminal, the device server, and each of the plurality of cloud servers, and the method comprises: Sending an automated test script to the mobile terminal, wherein the automated test script is used to instruct the Internet of Things device to achieve communication connection between the mobile terminal and the Internet of Things device, and between the Internet of Things device and a first cloud server among the multiple cloud servers through an automated network configuration test process; receiving a first feedback message from the first cloud server, where the first feedback message is used to represent a connection status between the IoT device and the first cloud server, where the connection status includes a connection success status and a connection failure status, and the first feedback message is associated with the connection success status; Sending a switching instruction to the device server, the switching instruction is used to indicate at least one switching event, each switching event is used to instruct the device server to switch the cloud server currently connected to the IoT device to another cloud server among the multiple cloud servers except the first cloud server, until all the other cloud servers are traversed; For each switching event, receiving a second feedback message from a cloud server corresponding to each switching event, wherein the second feedback message is used to characterize a connection state between the IoT device and the cloud server corresponding to each switching event, and the second feedback message is associated with the connection success state; Recording a first quantity of the second feedback messages; A switching success rate is calculated based on the first number and the total number of the plurality of cloud servers.

2. The method according to claim 1, characterized in that The automatic network distribution test system also includes a router, and the automatic network distribution test process includes: detecting a compatibility status between the mobile terminal and the IoT device, the compatibility status including compatibility and incompatibility; and, Detecting the compatibility status between the IoT device and the router.

3. The method according to claim 2, characterized in that The detecting the compatibility status between the mobile terminal and the IoT device includes: Sending a first instruction to the mobile terminal, where the first instruction is used to instruct the mobile terminal to access the Internet of Things device; receiving a third feedback message from the mobile terminal, where the third feedback message is used to indicate a connection state between the mobile terminal and the Internet of Things device; If the third feedback message is associated with the successful connection status, continue to execute the step of "detecting the compatibility status between the IoT device and the router"; If the third feedback message is associated with the connection failure state, the automatic network configuration test process is terminated.

4. The method according to claim 3, characterized in that The testing device is also in communication connection with the IoT device, and the detecting the compatibility status between the IoT device and the router includes: Sending a second instruction to the Internet of Things device, where the second instruction is used to instruct the Internet of Things device to enter a network distribution state; Sending first configuration information to the mobile terminal, where the first configuration information includes an identity identifier and a password of the router, and the first configuration information is used to instruct the Internet of Things device to access the router; A fourth feedback message is received from the mobile terminal, where the fourth feedback message is used to characterize the connection status between the Internet of Things device and the router, and the fourth feedback message is used to characterize the connection success status.

5. The method according to claim 4, characterized in that After receiving the fourth feedback message from the mobile terminal and before receiving the first feedback message from the first cloud server, the method further includes: Sending a third instruction to the IoT device, wherein the third instruction is used to instruct the IoT device to send second configuration information to the device server, wherein the second configuration information includes a device serial number and a signature of the IoT device, and the second configuration information is used to instruct the device server to authenticate the IoT device, wherein the authentication result includes a legal state and an illegal state; If the second configuration information is associated with the legal status of the IoT device, a fourth instruction is sent to the device server, the fourth instruction is associated with the endpoint information of the first cloud server, and the fourth instruction is used to instruct the device server to obtain a connection certificate from the first cloud server according to the device serial number and the endpoint information, and send the connection certificate to the IoT device to achieve a communication connection between the IoT device and the first cloud server; If the second configuration information is associated with an illegal state of the IoT device, the automatic network configuration test process is terminated.

6. The method according to any one of claims 2 to 5, characterized in that: There are multiple mobile terminals and multiple routers. Before sending the automated test script to the mobile terminal, the method further includes: Determine a connection combination relationship between a plurality of mobile terminals and a plurality of routers; For each mobile terminal in the connection combination, executing the step of sending the automated test script to the mobile terminal and the steps thereafter; The calculating the switching success rate according to the first number and the total number of the plurality of cloud servers includes: For each connection combination, obtaining a switching success rate according to the first number and the total number of the plurality of cloud servers; Calculate the average switching success rate of the IoT device according to the multiple switching success rates; If the average switching success rate is less than a preset threshold; Obtaining the cloud server associated with the connection failure state of the second feedback message in each connection combination; Mark cloud servers whose number of the same cloud servers exceeds a certain value as cloud servers to be excluded.

7. The method according to claim 1, characterized in that After receiving the second feedback message from the cloud server corresponding to each switching event, the method further includes: Sending a query instruction to the currently connected cloud server, wherein the query instruction is used to obtain the device status stored in the currently connected cloud server; and, Obtaining a page status after a successful switch in the mobile terminal; Determining whether the page state is consistent with the device state; If they are consistent, determining that the second feedback message is associated with the connection success state; If they are inconsistent, it is determined that the second feedback message is associated with the connection failure state.

8. The method according to claim 1, characterized in that The first feedback message and each of the second feedback messages carry a first timestamp and a second timestamp, respectively, the first timestamp is used to indicate the moment when the IoT device is successfully connected to the first cloud server, and each second timestamp is used to indicate the moment when the IoT device is switched to another cloud server and successfully connected, and after the switching success rate is calculated according to the first number and the total number of the plurality of cloud servers, the method further includes: Calculate the first timestamp and the time interval between adjacent timestamps between each of the second timestamps, where the time interval is used to represent the time required for the IoT device to switch from the currently connected cloud server to another cloud server and successfully connect; The average time interval is calculated based on multiple time intervals.

9. An automated distribution network testing system, characterized in that: The method comprises a test device and a mobile terminal, a device server and a plurality of cloud servers which are communicatively connected to the test device, wherein the test device is used to execute the step instructions in the method as described in any one of claims 1 to 8.

10. A testing device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.