A method and gateway device for joint debugging test

By storing the address mapping between gateway devices and various operating environments in the cloud platform, the problem of needing to re-flash firmware when switching operating environments for gateway devices is solved, enabling efficient joint debugging and testing.

CN116600000BActive Publication Date: 2026-01-02QINGDAO HISENSE BOSCH AIR CONDITIONING SYSTEM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310375757.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-10
Publication Date
2026-01-02
Estimated Expiration
2043-04-10

AI Technical Summary

Technical Problem

In intelligent project systems, gateway devices need to be re-flashed every time they switch operating environments, resulting in low efficiency in joint debugging and testing.

Method used

By accessing the cloud platform and storing the mapping between the gateway device's device identifier and the business cloud platform address under various operating environments, the gateway device can directly obtain the corresponding address from the cloud platform to connect when switching operating environments, avoiding the need to re-flash the firmware.

Benefits of technology

This improves the efficiency of gateway devices participating in joint debugging and testing, reduces the tedious firmware flashing process, and enhances testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116600000B_ABST
    Figure CN116600000B_ABST
Patent Text Reader

Abstract

The application discloses a method and a gateway device for joint debugging test, and relates to the technical field of terminals. The method solves the problem of low test efficiency of the gateway device during joint debugging test when the service cloud platform switches the running environment during the test and production stages. The method comprises the following steps: after a first gateway device is reset, the first gateway device establishes a connection with an access cloud platform, the access cloud platform stores a corresponding relationship between the device identifier of at least one gateway device and the address of the service cloud platform under at least one running environment, and the at least one gateway device comprises the first gateway device. The first gateway device obtains the address of the first service cloud platform corresponding to the device identifier of the first gateway device from the access cloud platform. The first gateway device establishes a connection with the first service cloud platform according to the address of the first service cloud platform. The first gateway device performs joint debugging test with the application of the user device through the first service cloud platform.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminals, and in particular to a method for joint debugging and a gateway device. BACKGROUND

[0002] An intelligent project system is developed in three stages, namely a development stage, a test stage and a production stage. The intelligent project system includes a gateway device, a cloud platform and an application (APP) installed on a user device. From the test stage to the production stage, the gateway device, the cloud platform and the APP need to be jointly debugged in multiple running environments for multiple times to meet production needs. When the gateway device switches running environments each time, the gateway device needs to be reprogrammed with firmware and the cloud platform needs to be connected. The process of programming the firmware is relatively cumbersome, resulting in a low system test efficiency. SUMMARY

[0003] Embodiments of the present application provide a method for joint debugging and a gateway device, which solve the problem of low test efficiency of the gateway device when the business cloud platform switches running environments in the test and production stages.

[0004] To achieve the above object, embodiments of the present application adopt the following technical solutions.

[0005] In a first aspect, the present application provides a method for joint debugging, which comprises the following steps.

[0006] After the first gateway device is reset, the first gateway device establishes a connection with an access cloud platform, the access cloud platform stores a correspondence between device identifiers of at least one gateway device and addresses of business cloud platforms in at least one running environment, and the at least one gateway device includes the first gateway device. The first gateway device obtains the address of the first business cloud platform corresponding to the device identifier of the first gateway device from the access cloud platform. The first gateway device establishes a connection with the first business cloud platform according to the address of the first business cloud platform. The first gateway device performs joint debugging with an application of a user device through the first business cloud platform.

[0007] Thus, in the case where the application stores the addresses of the service cloud platforms corresponding to the device identifiers of the gateway devices in the multiple running environments through the access cloud platform, when the service cloud platform switches the running environment, since the access cloud platform stores the correspondence between the device identifiers of the multiple gateway devices and the addresses of the service cloud platforms in the multiple running environments, the gateway device can obtain the address of the service cloud platform after the running environment is switched from the access cloud platform according to the correspondence between the device identifier of the gateway device and the address of the service cloud platform after the running environment is switched. In this way, the gateway device can establish a connection with the service cloud platform after the running environment is switched. Compared with the prior art, when the service cloud platform switches the running environment, the problem of low test efficiency caused by the need to reprogram the firmware of the gateway device for joint debugging test is solved. The application can quickly provide the gateway device with the address of the service cloud platform after the running environment is switched, thereby improving the test efficiency of the gateway device participating in joint debugging test.

[0008] In some embodiments, the first gateway device establishing a connection with the access cloud platform comprises:

[0009] The first gateway device obtains the address of the access cloud platform from the local of the first gateway device, and sends a first connection request to the access cloud platform through the hypertext transfer protocol (HTTP) and the address of the access cloud platform. If the first gateway device receives a first connection confirmation response sent by the access cloud platform, the first gateway device successfully establishes a connection with the access cloud platform.

[0010] In some embodiments, the first gateway device obtaining the address of the first service cloud platform corresponding to the device identifier of the first gateway device from the access cloud platform comprises: the first gateway device calling a service interface of the access cloud platform from the local, sending the device identifier of the first gateway device to the access cloud platform according to the service interface, the device identifier of the first gateway device being used by the access cloud platform to determine the address of the first service cloud platform corresponding to the device identifier of the first gateway device. The first gateway device receives and saves the address of the first service cloud platform corresponding to the device identifier of the first gateway device determined by the access cloud platform.

[0011] In some embodiments, the first gateway device establishing a connection with the first service cloud platform according to the address of the first service cloud platform comprises: the first gateway device sending a second connection request to the first service cloud platform through the message queue telemetry transport protocol (MQTT) and the address of the first service cloud platform. If the first gateway device receives a second connection confirmation response sent by the first service cloud platform, the first gateway device successfully establishes a connection with the first service cloud platform.

[0012] In some embodiments, the first gateway device resetting comprises: the first gateway device clearing the address of the second service cloud platform saved before the first gateway device is reset.

[0013] In a second aspect, the present application provides a gateway device, comprising: a connection unit, configured to establish a connection with an access cloud platform after a first gateway device is reset, the access cloud platform storing a correspondence between a device identifier of at least one gateway device and an address of a service cloud platform in at least one running environment, the at least one gateway device including the first gateway device; an address acquisition unit, configured to acquire, from the access cloud platform, the address of the first service cloud platform corresponding to the device identifier of the first gateway device; and the connection unit is further configured to establish a connection with the first service cloud platform according to the address of the first service cloud platform. A test unit is configured to perform a joint debugging test with an application of a user device through the first service cloud platform.

[0014] The beneficial effects of the second aspect can be seen from the description of the first aspect, which will not be repeated here.

[0015] In some embodiments, the connection unit is specifically configured to: acquire the address of the access cloud platform locally from the first gateway device, and send a first connection request to the access cloud platform through a hypertext transfer protocol (HTTP) and the address of the access cloud platform. If a first connection confirmation response sent by the access cloud platform is received, the first gateway device and the access cloud platform successfully establish a connection.

[0016] In some embodiments, the address acquisition unit is specifically configured to: call a service interface of the access cloud platform locally, send a device identifier of the first gateway device to the access cloud platform according to the service interface, the device identifier of the first gateway device being used by the access cloud platform to determine the address of the first service cloud platform corresponding to the device identifier of the first gateway device, and receive and save the address of the first service cloud platform corresponding to the device identifier of the first gateway device determined by the access cloud platform.

[0017] In some embodiments, the connection unit is specifically configured to: send a second connection request to the first service cloud platform through a message queue telemetry transport (MQTT) and the address of the first service cloud platform. If a second connection confirmation response sent by the first service cloud platform is received, the first gateway device and the first service cloud platform successfully establish a connection.

[0018] In some embodiments, the connection unit is specifically configured to: send a second connection request to the first service cloud platform through a message queue telemetry transport (MQTT) and the address of the first service cloud platform. If a second connection confirmation response sent by the first service cloud platform is received, the first gateway device and the first service cloud platform successfully establish a connection. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 FIG. 1 is a structural schematic diagram of an intelligent project system;

[0020] Figure 2 FIG. 2 is a schematic diagram of the intelligent project system 100 corresponding to multiple environments in a development process;

[0021] Figure 3A structural diagram of an intelligent project system provided in this application;

[0022] Figure 4 A flowchart illustrating a method for debugging and testing a gateway device provided in this application;

[0023] Figure 5 A schematic diagram of a cloud platform access display interface provided in this application;

[0024] Figure 6 A schematic diagram of an interface for switching operating environments provided in this application;

[0025] Figure 7 A flowchart illustrating the integration and testing process of a gateway device provided in this application;

[0026] Figure 8 A framework diagram for the joint debugging and testing of the gateway device 20 provided in this application;

[0027] Figure 9 A flowchart illustrating a method for joint debugging and testing of a gateway device 20 provided in this application;

[0028] Figure 10 This is a schematic diagram of the structure of a gateway device provided in this application. Detailed Implementation

[0029] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0030] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0031] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0032] like Figure 1 The diagram shown is a structural schematic of an intelligent project system 100, which includes a gateway device 10, a cloud platform 11, and an APP 12.

[0033] In the application scenario of the air conditioning system, the gateway device 10 may be, for example, a wire controller or a centralized controller.

[0034] The cloud platform 11 may be a server for processing the received data information of the gateway device 10.

[0035] The APP 12 may be an application installed on a user device for displaying the data information of the gateway device 10.

[0036] The development stage in the development process of the intelligent project system 100 corresponds to the development environment, the testing stage corresponds to the testing environment, and the production stage corresponds to the production environment. In the development environment, the developer develops the gateway device 10, the cloud platform 11, and the APP 12. After the development of the gateway device 10, the cloud platform 11, and the APP 12 is completed, the developer can deploy a testing environment in the gateway device 10, the cloud platform 11, and the APP 12 to test the gateway device 10.

[0037] When testing the gateway device 10, to meet the production needs of different versions of the intelligent project system, the tester performs joint debugging of the gateway device 10, the cloud platform 11, and the APP 12 in the testing environment. It can be understood that there can be multiple testing environments, and the testing environment can be switched during joint debugging. The joint debugging of the gateway device 10, the cloud platform 11, and the APP 12 includes the uplink communication link and the downlink communication link. The uplink communication link can be understood as the gateway device 10 sending data information to the cloud platform 11, the cloud platform 11 processing the received data information, and sending the processed data information to the APP 12. The downlink communication link can be understood as the APP 12 sending a control command to the cloud platform 11, the cloud platform 11 processing the received control command, and sending it to the gateway device 10.

[0038] For example, when the intelligent project system 100 is an air conditioning system and the gateway device 10 is a wire controller coupled with multiple air conditioners, the wire controller can send the real-time collected temperature information of the air conditioner and the user-set temperature information to the cloud platform 11, the cloud platform 11 processes the received temperature information of the air conditioner and the user-set temperature information and sends it to the APP 12, and the screen of the terminal device where the APP 12 is located can display the real-time collected temperature information of the air conditioner and the user-set temperature information. For example, the displayed content is that the temperature information of the air conditioner is 22 degrees, and the user-set temperature is 21 degrees. When the temperature information of the air conditioner is higher than the user-set temperature information, the user sends a shutdown instruction to the cloud platform 11 through the APP 12 in the terminal device, the cloud platform 11 processes the shutdown instruction, and then sends the processed shutdown instruction to the wire controller, and the wire controller turns off the air conditioner controlled by the wire controller after receiving the instruction.

[0039] When the tester completes the joint debugging test of the gateway device 10, the cloud platform 11 and the APP 12 in the test environment, the gateway device 10, the cloud platform 11 and the APP 12 of the last test version in the test environment are deployed to the production environment. In the production environment, the intelligent project system 100 needs to be tested again. After the test in the production environment is passed, the intelligent project system 100 is officially released to the outside.

[0040] As shown in Figure 2 Fig. 1 is a schematic diagram of the intelligent project system 100 corresponding to multiple environments in the development process. The multiple environments include a development environment 201, a test environment 202 and a production environment 203. The development environment 201 includes a development version gateway device 10, a development environment cloud platform 11 and a development version APP 12. The test environment 202 includes a test version gateway device 10, a test environment cloud platform 11 and a test version APP 12. The production environment 202 includes a production version gateway device 10, a production environment cloud platform 11 and a production version APP 12.

[0041] The developer develops the gateway device 10, the cloud platform 11 and the APP 12 in the development environment 201 to obtain the development version gateway device 10, the development environment cloud platform 11 and the development version APP 12. The tester deploys the development version gateway device 10, the development environment cloud platform 11 and the development version APP 12 to the test environment 202 for testing. When the test version gateway device 10, the test environment cloud platform 11 and the test version APP 12 meet the test requirements in the test environment 202, the tester deploys the test version gateway device 10, the test environment cloud platform 11 and the test version APP 12 to the production environment 203 for testing. When the production version gateway device 10, the production environment cloud platform 11 and the production version APP 12 meet the test requirements in the production environment 203, they can be put into production.

[0042] Currently, when the gateway device 10, the cloud platform 11 and the APP 12 are tested in the test environment and the production environment, the firmware of the gateway device 10 needs to be reprogrammed every time the running environment of the cloud platform 11 is switched. The process of burning the firmware is relatively cumbersome, which leads to low test efficiency of system joint debugging test. However, the difference between the firmware of the gateway device 10 in different environments is only the address of the connected cloud platform.

[0043] Of course, the gateway device 10, the cloud platform 11 and the APP 12 can also be tested without environment switching, for example, one gateway device 10 is tested with the cloud platform 11 and the APP 12 in the test environment, and another gateway device 10 is tested with the cloud platform 11 and the APP 12 in the production environment. However, this will cause waste of resources.

[0044] Therefore, the application provides a gateway device switching running environment method and a gateway device, so that when gateway device 10, cloud platform 11 and APP 12 need to be tested in a joint debugging mode, the gateway device 10 does not need to be reprogrammed, and the joint debugging test efficiency is improved.

[0045] As shown in Figure 3 The intelligent project system 200 provided by the application includes a gateway device 20, an access cloud platform 21, a business cloud platform 22 and an APP 23.

[0046] In the air conditioning system scenario, the gateway device 20 can be a line controller and a centralized controller. In other scenarios, the gateway device 20 can also be other devices.

[0047] The access cloud platform 21 is configured to batch import the addresses of the business cloud platforms in at least one running environment, and save the correspondence between the addresses of the business cloud platforms 22 in at least one running environment and the device identifiers of at least one gateway device 20. When the gateway device 20 establishes a connection with the business cloud platform, the gateway device 20 can obtain the address of the business cloud platform 22 to be connected. The multiple running environments can be test environment 1, test environment 2, test environment 3, production environment 1 and production environment 2. The application does not limit the number of test environments and the number of production environments, which are determined according to actual conditions. When the gateway device 20, the business cloud platform 22 and the APP 23 are tested in a joint debugging mode, if the business cloud platform 22 meets the test requirements in the test environment, the business cloud platform 22 can be deployed to the production environment for joint debugging test. After the test requirements are met in the production environment, the business cloud platform 22 can be published externally.

[0048] The business cloud platform 22 is configured to match a unique internet protocol (IP) address in one running environment. The IP address is used to establish a connection between the business cloud platform 22 and the gateway device 20 and the APP 23.

[0049] The APP 23 can be an application installed in a user device. The APP 23 is configured to enable a user to send a control command to the gateway device 20 through the APP 23. For example, in an air conditioning system, the APP 23 can send a shutdown instruction to the line controller, so that the line controller turns off the air conditioner controlled by the line controller.

[0050] When the gateway device 20, the business cloud platform 22 and the APP 23 are tested in a joint debugging mode, the business cloud platform 22 can not meet the test requirements. At this time, the developer needs to replace the business cloud platform 22. The replaced business cloud platform 22 will be assigned a new IP address.

[0051] It can be understood that different running environments can correspond to different versions of the IP addresses of the business cloud platform 22.

[0052] Based on the structural diagram of the intelligent project system 200 of Figure 3 , the following will introduce how the gateway device 20 switches the running environment.

[0053] As shown in Figure 4 , it is a flowchart of a joint debugging test method provided by the present application.

[0054] 401、When the first gateway device is reset, the first gateway device establishes a connection with the access cloud platform, and the access cloud platform stores a corresponding relationship between the device identifier of at least one gateway device and the address of the business cloud platform in at least one running environment, and the at least one gateway device includes the first gateway device.

[0055] The first gateway device 20 here can be understood as a gateway device 20 corresponding to the device identifier of a certain gateway device 20 stored in the access cloud platform 21.

[0056] For example, the gateway device 20 can be burned with firmware, and the IP address of the access cloud platform 21 can be stored in the gateway device 20. After the gateway device 20 is reset, the gateway device 20 establishes a connection with the access cloud platform 21 through the stored IP address of the access cloud platform 21. In order to facilitate the access cloud platform 21 to maintain the corresponding relationship between the address of the business cloud platform 22 in different running environments and the device identifier of the network device 20, the access cloud platform 21 can have a display screen, and the display interface of the display screen can be as shown in Figure 5 .

[0057] Figure 5 It is a schematic diagram of a display interface of the access cloud platform 21 provided by the present application.

[0058] As can be seen from Figure 5 , the device identifier of the gateway device 20 can be understood as the device ID in Figure 5 . Figure 5 The test address and the production address in can be understood as the IP address of the business cloud platform 22.

[0059] From the display interface of the access cloud platform 21, it can be seen whether the gateway device 20 has successfully established a connection with the access cloud platform 21. If a gateway device 20 successfully establishes a connection with the access cloud platform 21, the "Status" column in the access cloud platform 21 display interface will show "Connected". If a gateway device 20 fails to establish a connection with the access cloud platform 21, the "Status" column in the access cloud platform 21 display interface will show "Not Connected". Furthermore, the device identifiers of different gateway devices 20 in the access cloud platform 21 all correspond to the IP address of a single business cloud platform 22. This means that different gateway devices 20 may correspond to the same IP address of the business cloud platform 22, indicating that multiple gateway devices 20 can be tested within a single operating environment.

[0060] 402. The first gateway device 20 obtains the address of the first service cloud platform 22 corresponding to the device identifier of the first gateway device 20 from the access cloud platform 21.

[0061] For example, suppose the first gateway device 20 here is Figure 5 Gateway device 20 is configured as gateway 1. Gateway device 20 establishes a connection with the business cloud platform 22 corresponding to test address 1 to perform joint debugging tests in test environment 1. Since business cloud platform 22 does not meet the testing requirements, the developers replace business cloud platform 22, for example, by replacing the server of business cloud platform 22, replacing business cloud platform 22 with business cloud platform 22'. The test environment at this time can be test environment 2. The replaced business cloud platform 22' has a new IP address for testing; for example, the IP address of business cloud platform 22 before replacement corresponds to test address 1, and the IP address of business cloud platform 22' after replacement corresponds to test address 2. Accordingly, before the joint debugging begins, gateway device 20 can be reset, establishing a connection with access cloud platform 21 through the saved IP address, and obtaining and saving the IP address of business cloud platform 22' from access cloud platform 21. After the reset, gateway device 20 needs to first establish a connection with business cloud platform 22' to perform joint debugging tests in test environment 2.

[0062] For example, when the business cloud platform 22 does not meet the test requirements, the tester can perform the "Switch Address" operation in the "Operation" column of the access cloud platform 21, and reconfigure and save the correspondence between the device identifier of gateway device 20 and the test address 2 of the business cloud platform 22' in the access cloud platform 21.

[0063] like Figure 6 The image shown is a schematic diagram of an interface for switching operating environments provided in this application.

[0064] For example, the tester clicks Figure 5The operation button of the switching address corresponding to the No. 1 gateway device 20 in the display interface of the access cloud platform 21 is clicked, and a selection dialog box of the IP address of the service cloud platform 22' is popped up. The dialog box can pop up a prompt of "Please select the IP address of the service cloud platform" and a plurality of selectable test addresses or production addresses of the service cloud platform (for example, test address 4, test address 2 and production address 2 in FIG. 8). Figure 6 The test personnel clicks the test address 2. The No. 1 gateway device 20 can obtain and save the test address 2 from the access cloud platform 21 when requesting the IP address of the service cloud platform 22' corresponding to the device identifier of the No. 1 gateway device 20 from the access cloud platform 21. The test environment is test environment 2 at this time. The No. 1 gateway device 20 establishes a connection with the service cloud platform 22' through the test address 2 and performs joint debugging test.

[0065] If the No. 1 gateway device and the service cloud platform 22' do not meet the test requirements in the test environment 2, the service cloud platform 22' is replaced again by the developer. For example, the service cloud platform 22' is replaced by the service cloud platform 22'' and the test environment can be test environment 3 at this time. The service cloud platform 22'' after replacement corresponds to a new IP address, for example, the IP address of the service cloud platform 22'' after replacement corresponds to the test address 3. Accordingly, the No. 1 gateway device 20 is reset before the joint debugging starts, and a connection is established with the access cloud platform 21 through the saved IP address of the access cloud platform 21. The test personnel clicks the operation button of the switching address corresponding to the No. 1 gateway device 20 in the display interface of the access cloud platform 21, and selects the test address 3 in the selection dialog box popped up. Figure 5 The No. 1 gateway device 20 can obtain and save the test address 3.

[0066] If the No. 1 gateway device and the service cloud platform 22'' meet the test requirements in the test environment 3, the service cloud platform 22'' is replaced by the test personnel and deployed to the production environment 1 for production test. The service cloud platform 22'' after replacement is assigned a new IP address, for example, the IP address of the service cloud platform 22'' after replacement can be the production address 1. The test personnel reconfigures and saves the correspondence between the device identifier of the No. 1 gateway device 20 and the production address 1 in the access cloud platform 21. The No. 1 gateway device 20 is reset and connected with the access cloud platform 21. The test personnel reconfigures and saves the correspondence between the device identifier of the No. 1 gateway device 20 and the service cloud platform 22 corresponding to the production address 1 in the access cloud platform 21. The test personnel clicks the operation button of the switching address corresponding to the No. 1 gateway device 20 in the display interface of the access cloud platform 21. Figure 5The first gateway device 20 operates the switch button corresponding to the switching address of the production address 1, and selects the production address 1 in the pop-up selection dialog box. The first gateway device 20 acquires and saves the production address 1. If the joint debugging test of the first gateway device 20 and the replaced business cloud platform 22 in the production environment 1 meets the test requirements, the first gateway device 20 and the replaced business cloud platform 22 can be published externally. If the joint debugging test of the first gateway device 20 and the replaced business cloud platform 22 in the production environment 1 does not meet the test requirements, the first gateway device 20 and the replaced business cloud platform 22 need to be switched to the production environment 2 for testing again, which will not be described here.

[0067] 403、The first gateway device 20 establishes a connection with the first business cloud platform 22 according to the address of the first business cloud platform 22.

[0068] The first business cloud platform 22 here can be understood as a business cloud platform 22 that the first gateway device 20 resets and then tests the connection. For example, the first business cloud platform 22 can be the business cloud platform 22' that establishes a connection with the first gateway device 20 after resetting. It can also be the business cloud platform 22" that establishes a connection with the first gateway device 20 after resetting.

[0069] For example, it is assumed that the first gateway device 20 and the business cloud platform 22' establish a connection and perform joint debugging test in the test environment 1. The first gateway device 20 acquires and saves the test address 1 from the access cloud platform 21 and establishes a connection with the business cloud platform 22' through the test address 1. The first gateway device 20 sends data information to the business cloud platform 22', and the business cloud platform 22' processes the received data information and sends it to the APP 12. The APP 12 sends a control command to the business cloud platform 22' according to the received data information. The business cloud platform 22' processes the received control command and sends the processed data information to the first gateway device 20. It can be understood that if there is no exception in the process of data information transmission and processing and the process of control command transmission and processing, it indicates that the first gateway device 20 and the business cloud platform 22' meet the test requirements. Similarly, if there is an exception in the process of data information transmission and processing and the process of control command transmission and processing, it indicates that the joint debugging test of the first gateway device 20 and the business cloud platform 22' does not meet the test requirements, and the test environment needs to be switched for retesting until the test requirements are met.

[0070] 404、The first gateway device 20 performs joint debugging test with the application of the user device through the first business cloud platform 22.

[0071] For example, it is assumed that the No. 1 gateway device and the business cloud platform 22' are tested in the test environment 2. The No. 1 gateway device 20 sends data information to the business cloud platform 22', the business cloud platform 22' processes the received data information, and sends the processed data information to the APP 12. The APP 12 sends a control command to the business cloud platform 22', and the business cloud platform 22' processes the received control command and sends it to the No. 1 gateway device 20, so as to perform the joint debugging test. Thus, in the case where the application saves the addresses of the business cloud platforms 22 corresponding to the device identifiers of the gateway devices 20 in the plurality of operating environments through the access cloud platform 21, when the business cloud platform 22 switches the operating environment, since the access cloud platform 21 saves the correspondence between the device identifiers of the plurality of gateway devices 20 and the addresses of the business cloud platforms 22 in the plurality of operating environments, the gateway device 20 can obtain the address of the business cloud platform 22 after switching the operating environment from the access cloud platform 21 according to the correspondence between the device identifier of the gateway device 20 and the address of the business cloud platform 22 after switching the operating environment. In this way, the gateway device 20 can establish a connection with the business cloud platform 22 after switching the operating environment. Compared with the prior art, when the business cloud platform 22 switches the operating environment, the joint debugging test efficiency caused by the need to reprogram the firmware of the gateway device 20 is low. The application can quickly provide the gateway device 20 with the address of the business cloud platform 22 after switching the operating environment through the access cloud platform 21, and can improve the test efficiency of the gateway device 20 participating in the joint debugging test.

[0072] Next, how to perform the joint debugging test of the gateway device 20 will be introduced.

[0073] As shown in Figure 7 , the application provides a flowchart example of the joint debugging test of the gateway device 20.

[0074] 701、The first gateway device 20 obtains the address of the access cloud platform 21 from the local of the first gateway device 20, and sends a first connection request to the access cloud platform through the hypertext transfer protocol (HTTP) and the address of the access cloud platform.

[0075] The first connection request here can be understood as a string encrypted by a preset key to the ID and device type of the gateway device 20.

[0076] For example, the No. 1 gateway device 20 sends a string encrypted by a preset key to the ID and device type of the No. 1 gateway device 20 to the access cloud platform 21 through the HTTP protocol request and the IP address of the access cloud platform 21, and the request header of the HTTP protocol.

[0077] 702、If the first gateway device 20 receives the first connection confirmation response sent by the access cloud platform 21, the first gateway device 20 and the access cloud platform 21 successfully establish a connection.

[0078] The first connection confirmation response herein can be understood as a response code returned by the access cloud platform 21 to the gateway device 20 after verification, for example, a 200 response code.

[0079] For example, the access cloud platform 21 decrypts the string encrypted by the preset key carried in the request header of the received HTTP protocol and the ID and device type of the first gateway device 20. If the decrypted ID and device type of the first gateway device 20 are consistent with the ID and device type of the first gateway device 20 in the request header of the HTTP protocol, the access cloud platform 21 returns a 200 response code to the first gateway device 20. If the decrypted ID and device type of the first gateway device 20 are inconsistent with the ID and device type of the first gateway device 20 in the request header of the HTTP protocol, the access cloud platform 21 returns a 403 response code to the first gateway device 20 and disconnects the connection.

[0080] 703、The first gateway device 20 locally calls the service interface of the access cloud platform 21, and sends the device identifier of the first gateway device 20 to the access cloud platform 21 according to the service interface, so that the access cloud platform 21 determines the address of the first service cloud platform 22 corresponding to the device identifier of the first gateway device 20.

[0081] For example, after the first gateway device 20 is reset, the first gateway device 20 establishes a connection according to the locally saved address of the access cloud platform 21 and the access cloud platform 21. The first gateway device 20 sends the device identifier ID1 of the first gateway device to the access cloud platform 21 according to the service interface of the access cloud platform 21, and the access cloud platform 21 finds the test address 2 corresponding to the corresponding service cloud platform 22' according to the received device identifier ID1 of the first gateway device.

[0082] 704、The first gateway device 20 receives and saves the address of the first service cloud platform 22 corresponding to the device identifier of the first gateway device 20 determined by the access cloud platform 21.

[0083] For example, the access cloud platform 21 sends the test address 2 corresponding to the device identifier ID1 of the first gateway device to the first gateway device, and the first gateway device receives and saves the test address 2 corresponding to the device identifier ID1 of the first gateway device.

[0084] 705、The first gateway device 20 sends a second connection request to the first service cloud platform 22 through a message queuing telemetry transport (MQTT) and an address of the first service cloud platform 22.

[0085] Exemplarily, the second connection request herein can be understood as that the first gateway device 20 sends three parameters of clientId, username and password to the service cloud platform 22', wherein the parameter clientId includes the ID, device type and signature algorithm of the first gateway device 20, the parameter clientId includes the ID and device type of the first gateway device 20, and the parameter password includes a preset key for encrypting the username.

[0086] 706、If the first gateway device 20 receives a second connection confirmation response sent by the first service cloud platform 22, the first gateway device 20 successfully establishes a connection with the first service cloud platform 22.

[0087] The second connection confirmation response herein can be understood as a response code returned by the service cloud platform 22 to the gateway device 20 after verification, which can be, for example, a 0x00 response code. For example, it can be that the service cloud platform 22' returns a 0x00 response code to the first gateway device 20 after verification.

[0088] Exemplarily, the service cloud platform 22' receives the three parameters of clientId, username and password, and decrypts the password through a preset key and the signature algorithm in the clientId. If the decrypted ID and device type of the first gateway device 20 are consistent with the ID and device type of the first gateway device 20 in the username and the clientId, the service cloud platform 22' returns a 0x00 response code to the first gateway device 20. If the decrypted ID and device type of the first gateway device 20 are inconsistent with the ID and device type of the first gateway device 20 in the username and the clientId, the service cloud platform 22' returns a 0x05 response code to the first gateway device 20 and disconnects the connection.

[0089] 707、The first gateway device 20 performs a joint debugging test with the application of the user device through the first service cloud platform 22.

[0090] The joint debugging test of the first gateway device 20 with the application of the user device through the first service cloud platform 22 has been described above, and will not be repeated here. The process of the joint debugging test of the gateway device 20 can also be referred to the example of Figure 8 .

[0091] As Figure 8The diagram shown is a framework diagram for the joint debugging and testing of the gateway device 20 provided in this application. This example includes:

[0092] 801. Gateway device 20 requests the address of business cloud platform 22 from access platform 21.

[0093] For example, when the business cloud platform 22 in the current operating environment does not meet the testing requirements, the developers replace the business cloud platform 22 in the current operating environment. After the business cloud platform 22 in the current operating environment is replaced, the gateway device 20 also needs to switch to the replaced operating environment for retesting. At this time, gateway device 20 requests the address of the business cloud platform 22 in the replaced operating environment from the access platform 21.

[0094] 802. Access and Platform 21 sends the address of Service Cloud Platform 22 to Gateway Device 20.

[0095] For example, the access platform 21 sends the address of the business cloud platform 22 after the change of the operating environment to the gateway device 20.

[0096] 803. The gateway device 20 establishes a connection with the business cloud platform 22 based on the address received from the business cloud platform 22.

[0097] For example, gateway device 20 establishes a connection with the changed operating environment of the business cloud platform 22 based on the address of the changed operating environment. The changed operating environment may be a test environment or a production environment.

[0098] The following section will introduce the gateway device 20 in the context of any switching operating environment, based on specific application scenarios.

[0099] like Figure 9 The diagram shown is a flowchart illustrating a method for joint debugging and testing of a gateway device 20 provided in this application.

[0100] 901. Testers configure the mapping relationship between the IP address of the business cloud platform 22 and the ID of the gateway device 20 in the access cloud platform 21.

[0101] For example, assuming that gateway device 20 and business cloud platform 22 are conducting joint debugging tests in test environment 1, the tester configures gateway device 20 and test address 1 in access cloud platform 21 to correspond to business cloud platform 22.

[0102] 902. The gateway device 20 is programmed with firmware to store the IP address of the cloud platform 21 in the gateway device 20.

[0103] 903. Reset gateway device 20.

[0104] In some embodiments, the first gateway device 20 clears the address of the second service cloud platform saved before the first gateway device 20 is reset.

[0105] The address of the second service cloud platform here may be, for example, the test address 1 corresponding to the service cloud platform 22 in the test environment 1 saved by the first gateway device 20 when the first gateway device 20 switches from the test environment 1 to the test environment 2.

[0106] For example, the gateway device 20 is powered on, the tester presses and holds the reset button of the gateway device 20, and the indicator light of the gateway device 20 flashes at the same time to indicate that the reset is successful. After the reset of the gateway device 20 is successful, the gateway device clears the test address 1 corresponding to the service cloud platform 22 in the test environment 1 saved by the gateway device 20.

[0107] 904、The gateway device 20 establishes a connection with the access cloud platform 21 through the HTTP protocol.

[0108] The connection of the gateway device 20 with the access cloud platform 21 through the HTTP protocol has been described above and will not be repeated here.

[0109] 905、The access cloud platform 21 sends the address of the service cloud platform 22 corresponding to the ID of the gateway device 20 to the gateway device 20.

[0110] For example, after the reset of the gateway device 20, the access cloud platform 21 sends the test address 2 to the first gateway device 20.

[0111] 906、The gateway device 20 saves the address of the service cloud platform 22 corresponding to the ID of the gateway device 20.

[0112] For example, the gateway device 20 saves the test address 2.

[0113] 907、The gateway device 20 establishes a connection with the service cloud platform 22 corresponding to the ID of the gateway device 20 through the MQTT protocol.

[0114] The connection of the gateway device 20 with the service cloud platform 22 corresponding to the ID of the gateway device 20 through the MQTT protocol has been described above and will not be repeated here.

[0115] 908、The gateway device 20 sends data information to the APP 23 through the service cloud platform 22 corresponding to the ID of the gateway device 20.

[0116] The data information has been described above and will not be repeated here.

[0117] 909、The APP 23 sends a control command to the gateway device 20 through the service cloud platform 22 corresponding to the ID of the gateway device 20.

[0118] The control commands have been described above and will not be repeated here.

[0119] 910, determine whether the gateway device 20 and the service cloud platform 22 corresponding to the ID of the gateway device 20 meet the test requirements.

[0120] If the gateway device 20 and the service cloud platform 22 corresponding to the ID of the gateway device 20 do not meet the test requirements, step 903 is executed.

[0121] As shown in FIG. 1, a structure schematic diagram of a gateway device 20 provided by the present application is shown. The gateway device 20 includes a connection unit 1001, an address acquisition unit 1002, an address clearing unit 1003, and a test unit 1004. Among them, Figure 10 The connection unit 1001 is configured to establish a connection with an access cloud platform, and the access cloud platform stores addresses of service cloud platforms corresponding to device identifiers of gateway devices in multiple running environments.

[0122] The address acquisition unit 1002 is configured to acquire, from the access cloud platform, an address of a service cloud platform corresponding to a device identifier of the gateway device in a second running environment when the gateway device switches from a first running environment to the second running environment.

[0123] The connection unit 1001 is also configured to establish a connection with the service cloud platform according to the address of the service cloud platform.

[0124] The test unit 1004 is configured to perform a joint debugging test with an application of a user device through the first service cloud platform.

[0125] In some embodiments, the connection unit 1001 is specifically configured to acquire the address of the access cloud platform from the gateway device locally, and send a first connection request to the access cloud platform through a hypertext transfer protocol (HTTP) and the address of the access cloud platform. If a first connection confirmation response sent by the access cloud platform is received, the gateway device and the access cloud platform successfully establish a connection.

[0126] In some embodiments, the address acquisition unit 1002 is specifically configured to call a service interface of the access cloud platform locally, send a device identifier of the gateway device to the access cloud platform according to the service interface, and use the device identifier of the gateway device to determine, by the access cloud platform, an address of a service cloud platform corresponding to the device identifier of the gateway device in a second running environment. The address of the service cloud platform corresponding to the device identifier of the gateway device in the second running environment determined by the access cloud platform is received and saved.

[0127]

[0128] ​In some embodiments, the connection unit 1001 is specifically configured to send a second connection request to the business cloud platform through an address of the business cloud platform and a message queue telemetry transport protocol (MQTT).

[0129] In some embodiments, the address clearing unit 1003 is configured to clear the address of the business cloud platform corresponding to the device identifier of the gateway device in the first running environment saved by the gateway device.

[0130] Although the present application is described in connection with the embodiments herein, it will be understood that many modifications and variations of the described implementations are possible, as will be appreciated by those skilled in the art. For example, alternative functionality or additional interfaces could be added to the described implementations, and / or the described implementations could be implemented without the described functionality or interfaces. It is therefore contemplated to cover any and all modifications, variations or equivalents that fall within the scope of the present application. It is further noted that the term "comprising" (and its variants) as used herein is used generically and not in the sense of "consisting only of". The terms "a" and "an", as used herein, mean "one or more". A plurality of items can be provided by a single item, unless otherwise indicated. Multiple processors or other units can be provided to implement several functions, unless otherwise indicated. Where a measure is recited as "about" a stated value, it is understood that the measure can be exactly the stated value.

[0131] Although the present application is described in connection with the embodiments herein, it will be understood that many modifications and variations of the described implementations are possible, as will be appreciated by those skilled in the art. For example, alternative functionality or additional interfaces could be added to the described implementations, and / or the described implementations could be implemented without the described functionality or interfaces. It is therefore contemplated to cover any and all modifications, variations or equivalents that fall within the scope of the present application. It is further noted that the term "comprising" (and its variants) as used herein is used generically and not in the sense of "consisting only of". The terms "a" and "an", as used herein, mean "one or more". A plurality of items can be provided by a single item, unless otherwise indicated. Multiple processors or other units can be provided to implement several functions, unless otherwise indicated. Where a measure is recited as "about" a stated value, it is understood that the measure can be exactly the stated value.

[0132] The above description is merely illustrative of the application and is not intended to limit the scope of the application. The scope of the application is defined by the appended claims.

Claims

1. A co-simulation test method, characterized in that, The method comprises: After the first gateway device is reset, the first gateway device acquires an address of an access cloud platform from the first gateway device locally, and sends a first connection request to the access cloud platform through a hypertext transfer protocol (HTTP) and the address of the access cloud platform; If the first gateway device receives a first connection confirmation response sent by the access cloud platform, the first gateway device successfully establishes a connection with the access cloud platform; the access cloud platform stores a correspondence between device identifiers of at least one gateway device and addresses of service cloud platforms in at least one running environment, and the at least one gateway device includes the first gateway device; The first gateway device acquires an address of a first service cloud platform corresponding to a device identifier of the first gateway device from the access cloud platform; The first gateway device sends a second connection request to the first service cloud platform through a message queue telemetry transport (MQTT) and the address of the first service cloud platform; If the first gateway device receives a second connection confirmation response sent by the first service cloud platform, the first gateway device successfully establishes a connection with the first service cloud platform; The first gateway device performs joint debugging and testing with an application of a user device through the first service cloud platform, and the joint debugging and testing comprises: the first gateway device sends data information to the first service cloud platform, the first service cloud platform processes the received data information and sends the processed data information to an APP, and the APP sends a control command to the first service cloud platform, and the first service cloud platform processes the received control command and sends the processed control command to the first gateway device.

2. The method of claim 1, wherein, The first gateway device acquires an address of a first service cloud platform corresponding to a device identifier of the first gateway device from the access cloud platform comprises: The first gateway device calls a service interface of the access cloud platform locally, and sends a device identifier of the first gateway device to the access cloud platform according to the service interface, so that the access cloud platform determines the address of the first service cloud platform corresponding to the device identifier of the first gateway device; The first gateway device receives and saves the address of the first service cloud platform corresponding to the device identifier of the first gateway device determined by the access cloud platform.

3. The method according to any of claims 1-2, characterized in that, The first gateway device is reset, which comprises: The first gateway device clears an address of a second service cloud platform saved before the first gateway device is reset.

4. A gateway device, characterized by It comprises: The connection unit is configured to obtain an address of an access cloud platform from the first gateway device locally after the first gateway device is reset, and send a first connection request to the access cloud platform via a hypertext transfer protocol (HTTP) and the address of the access cloud platform; if a first connection confirmation response sent by the access cloud platform is received, the first gateway device and the access cloud platform successfully establish a connection, and the access cloud platform stores a correspondence between a device identifier of at least one gateway device and an address of a service cloud platform in at least one running environment, and the at least one gateway device includes the first gateway device. The address obtaining unit is configured to obtain an address of a first service cloud platform corresponding to the device identifier of the first gateway device from the access cloud platform. The connection unit is further configured to send a second connection request to the first service cloud platform via a message queue telemetry transport (MQTT) and the address of the first service cloud platform. If a second connection confirmation response sent by the first service cloud platform is received, the first gateway device and the first service cloud platform successfully establish a connection. The test unit is configured to perform a joint debugging test with an application of a user device via the first service cloud platform, and the joint debugging test includes that the first gateway device sends data information to the first service cloud platform, the first service cloud platform processes the received data information and sends the processed data information to the APP, and the APP sends a control command to the first service cloud platform, and the first service cloud platform processes the received control command and sends the processed control command to the first gateway device.

5. The gateway device of claim 4, wherein, The address obtaining unit is specifically configured to: Call a service interface of the access cloud platform locally, send a device identifier of the first gateway device to the access cloud platform according to the service interface, and use the device identifier of the first gateway device to determine the address of the first service cloud platform corresponding to the device identifier of the first gateway device by the access cloud platform. Receive and save the address of the first service cloud platform corresponding to the device identifier of the first gateway device determined by the access cloud platform.

6. The gateway device of any of claims 4-5, wherein, Further comprising: The address clearing unit is configured to clear an address of a second service cloud platform saved before the first gateway device is reset.

Citation Information

Patent Citations

  • Gateway address configuration system and method

    CN112751750A