Standard protocol configuration method and device, storage medium and equipment
By automatically establishing standard protocol connections using the configuration information identification obtained by the server in smart home devices, the complexity and high cost problems of manually entering or scanning QR codes in the prior art are solved, and the interoperability and efficient configuration of the devices are achieved.
Patent Information
- Application Number
- CN202411854786.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-28
AI Technical Summary
When existing smart home devices achieve cross-brand interoperability, they need to manually enter pairing codes or scan the QR code, resulting in complex and costly configuration.
After establishing a preset protocol connection with the electrical equipment, a configuration information query request for the device identification is sent to the server to obtain the configuration information identification of the standard protocol, thereby establishing a standard protocol connection without manually entering or scanning the QR code.
The operation steps of standard protocol configuration are simplified, configuration costs are reduced, configuration efficiency is improved, and equipment interoperability of different manufacturers is achieved.
Smart Images

Figure CN119728428A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a standard protocol configuration method, apparatus, storage medium and device in the field of computer technology. Background Art
[0002] With the development of science and technology, smart home has been integrated into the daily life of some people, bringing great convenience to people's lives. Since smart home devices are manufactured by different manufacturers, the use of manufacturers' custom protocols can meet the customization needs of manufacturers, but it is impossible to achieve cross-brand device interoperability. If you want to be compatible with the manufacturer's custom protocol and the standard (Matter) protocol, not only do you need to configure the standard protocol certificate for the smart home device before it leaves the factory, you also need to post a QR code on the device, which means that the configuration process requires complicated and tedious steps, and the cost will increase accordingly. Summary of the invention
[0003] The present application provides a standard protocol configuration method, apparatus, storage medium and device, which can establish a second connection based on a standard protocol with the electrical device based on the configuration information by acquiring configuration information from a first configuration information identifier sent by a server after a first terminal establishes a first connection based on a preset protocol with the electrical device. The standard protocol configuration can be achieved without manually inputting a pairing code or scanning a configuration information identifier such as a QR code posted on the electrical device, which simplifies the operation steps of the standard protocol configuration and improves the configuration efficiency.
[0004] In a first aspect, a standard protocol configuration method is provided, which is applied to a first terminal, and the method includes: sending a configuration information query request carrying a device identifier of an electrical device to a server, the device identifier being an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection being a communication connection established in advance based on a preset protocol, and the configuration information query request is used by the server to obtain a first configuration information identifier of the electrical device under the standard protocol based on the device identifier; obtaining the first configuration information identifier of the electrical device returned by the server, and obtaining the configuration information of the electrical device based on the first configuration information identifier; and establishing a second connection with the electrical device based on the configuration information, the second connection being a communication connection established based on the standard protocol.
[0005] Through the above technical solution, the first terminal obtains configuration information from the first configuration information identifier of the electrical device obtained from the server, on the premise of establishing a first connection with the electrical device based on a preset protocol, and establishes a second connection based on a standard protocol with the electrical device based on the configuration information. The configuration information can be obtained without manual input or scanning of a QR code posted on the electrical device, which simplifies the operating steps of the standard protocol configuration and improves the configuration efficiency.
[0006] In a second aspect, a standard protocol configuration method is provided, which is applied to electrical equipment, and the method includes: establishing a second connection with a first terminal based on configuration information; wherein the configuration information is obtained by the first terminal from the first configuration information identifier, the first configuration information identifier is the configuration information identifier corresponding to the electrical equipment returned by the server when the first terminal sends a configuration information query request carrying the device identifier of the electrical equipment to the server, the device identifier is the identifier obtained when the first terminal establishes a first connection with the electrical equipment, and the first connection is a communication connection established in advance based on a preset protocol.
[0007] Through the above technical solution, a second connection based on a standard protocol is established with the first terminal directly based on the configuration information in the first configuration information identifier of the electrical device obtained by the first terminal from the server. There is no need to post configuration information identifiers such as QR codes on the electrical device, which reduces configuration costs and improves configuration efficiency.
[0008] In a third aspect, a standard protocol configuration method is provided, which is applied to a server, and includes: receiving a configuration information query request carrying a device identifier of an electrical device sent by a first terminal, the device identifier being an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection being a communication connection established in advance between the first terminal and the electrical device based on a preset protocol, and the configuration information query request being a query request sent to the server when the first terminal establishes the first connection with the electrical device; sending the first configuration information identifier of the electrical device to the first terminal based on the configuration information query request, so that the first terminal obtains the configuration information of the electrical device from the first configuration information identifier, and establishes a second connection with the electrical device based on the configuration information, the second connection being a communication connection established between the first terminal and the electrical device based on the standard protocol.
[0009] Through the above technical solution, when the server receives the configuration information query request sent by the first terminal, the server sends the first configuration information identifier to the first terminal, so that the electrical equipment does not need to post configuration information identifiers such as QR codes, and the user does not need to manually enter the pairing code or use the first terminal to scan the QR code, thereby reducing the configuration cost and improving the configuration efficiency.
[0010] In a fourth aspect, a first terminal is provided, the first terminal including:
[0011] A query request sending unit, used to send a configuration information query request carrying a device identifier of the electrical device to the server, where the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, where the first connection is a communication connection established in advance based on a preset protocol, and the configuration information query request is used by the server to obtain a first configuration information identifier of the electrical device under a standard protocol based on the device identifier;
[0012] A configuration information acquisition unit, used to acquire a first configuration information identifier of the electrical device returned by the server, and acquire configuration information of the electrical device based on the first configuration information identifier;
[0013] The first connection establishing unit is used to establish a second connection with the electrical device based on the configuration information, where the second connection is a communication connection established based on a standard protocol.
[0014] In a fifth aspect, an electrical device is provided, the electrical device comprising:
[0015] A second connection establishing unit, configured to establish a second connection with the first terminal based on the configuration information;
[0016] Among them, the configuration information is obtained by the first terminal from the first configuration information identifier, the first configuration information identifier is the configuration information identifier corresponding to the electrical device returned by the server when the first terminal sends a configuration information query request carrying the device identifier of the electrical device to the server, the device identifier is the identifier obtained when the first terminal establishes a first connection with the electrical device, and the first connection is a communication connection established in advance based on a preset protocol.
[0017] In a sixth aspect, a server is provided, the server comprising:
[0018] a query request receiving unit, configured to receive a configuration information query request carrying a device identifier of an electrical device sent by a first terminal, wherein the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection is a communication connection established in advance between the first terminal and the electrical device based on a preset protocol, and the configuration information query request is a query request sent to a server when the first terminal establishes the first connection with the electrical device;
[0019] A configuration information identification sending unit is used to send the first configuration information identification of the electrical device to the first terminal based on a configuration information query request, so that the first terminal obtains the configuration information of the electrical device from the first configuration information identification, and establishes a second connection with the electrical device based on the configuration information. The second connection is a communication connection established between the first terminal and the electrical device based on a standard protocol.
[0020] In a seventh aspect, a computer device is provided, the computer device comprising: a memory for storing executable program code;
[0021] A processor is used to call and run executable program code from a memory to execute the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
[0022] In an eighth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0023] In a ninth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a system architecture diagram of a standard protocol configuration method provided in an embodiment of the present application;
[0025] Figure 2 It is a flowchart of a standard protocol configuration method provided in an embodiment of the present application;
[0026] Figure 3 It is a flowchart of a standard protocol configuration method provided in an embodiment of the present application;
[0027] Figure 4 This is a schematic diagram of a process of dynamically generating a second configuration information identifier by a first terminal provided in an embodiment of the present application;
[0028] Figure 5 It is a schematic diagram of a process of performing standard protocol configuration between a third terminal and an electrical device provided in an embodiment of the present application;
[0029] Figure 6 It is a flowchart of a standard protocol configuration method provided in an embodiment of the present application;
[0030] Figure 7 It is a schematic diagram of a process for making a preset protocol electrical device become a standard protocol electrical device provided by an embodiment of the present application;
[0031] Figure 8 It is a flowchart of a standard protocol configuration method provided in an embodiment of the present application;
[0032] Fig. 9 It is a flowchart of a standard protocol configuration method provided in an embodiment of the present application;
[0033] Fig.10 It is a flowchart of a standard protocol configuration method provided in an embodiment of the present application;
[0034] Fig.11 is a structural diagram of a first terminal provided in an embodiment of the present application;
[0035] Fig.12 is a structural schematic diagram of a computer device provided in an embodiment of the present application;
[0036] Fig.13 It is a structural schematic diagram of an electrical device provided in an embodiment of the present application;
[0037] Fig.14 is a structural schematic diagram of a computer device provided in an embodiment of the present application;
[0038] Fig.15 It is a structural diagram of a server provided in an embodiment of the present application;
[0039] Fig.16 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0041] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0042] See also Figure 1 , Figure 1 1 is a system architecture diagram of a standard protocol configuration method provided in an embodiment of the present application. Figure 1 As shown, the standard protocol configuration method provided in the embodiment of the present application can be applied to the scenario of configuring the standard protocol for electrical devices in an IoT smart home. The system may include at least one first terminal 10, an electrical device 20 and a server 30. The first terminal 10 includes but is not limited to a first terminal with networking function such as a mobile phone, a personal computer, a laptop computer, a wearable device, etc. The electrical device 20 includes but is not limited to air conditioners, cameras, smoke alarms, smart curtains and other devices in an IoT smart home. The server 30 may be a cloud server of the manufacturer of the electrical device or a cloud server of a third party.
[0043] In the embodiment of the present application, after the first terminal 10 establishes a first connection based on a preset protocol with the electrical device 20, it obtains the device identification of the electrical device 20, and sends a configuration information query request carrying the device identification to the server 30. The server 30 sends the first configuration information identification of the electrical device 20 to the first terminal 10 based on the configuration information query request. The first terminal 10 obtains the configuration information of the electrical device 20 from the first configuration information identification, and establishes a second connection with the electrical device 20 based on the configuration information. After the first terminal establishes a first connection based on a preset protocol with the electrical device, the configuration information is obtained from the first configuration information identification sent by the server, and a second connection based on a standard protocol is established with the electrical device based on the configuration information. Without posting configuration information identifications such as QR codes on the electrical device, the compatibility of the electrical device with the preset protocol and the standard protocol can be achieved, which reduces the operational complexity of the standard protocol configuration and reduces the configuration cost.
[0044] based on Figure 1 The system architecture diagram shown below will be combined with Figure 2-Figure 10 , the standard protocol configuration method provided in the embodiment of the present application is introduced in detail.
[0045] See also Figure 2 , Figure 2 is a flow chart of a standard protocol configuration method provided in an embodiment of the present application. Figure 2 As shown, the embodiment of the present application describes the specific process of the standard protocol configuration method from the first terminal side, and the method may include the following steps S101-S103.
[0046] S101, sending a configuration information query request carrying a device identification of an electrical device to a server;
[0047] Specifically, after the first terminal establishes a first connection based on a preset protocol with the electrical device, the device identification reported by the electrical device is obtained, and then a configuration information query request carrying the device identification of the electrical device is sent to the server. Among them, the first terminal can be a terminal device where the manufacturer's application (Application, APP) is located, and the electrical device is a device in the Internet of Things home system. The preset protocol can be a manufacturer-defined protocol of the electrical device, that is, a private protocol, which is used to enable the electrical device to realize the manufacturer's customized functions, or it can be a public protocol other than the smart home standard (Matter) protocol that can enable electrical devices of different manufacturers' brands to work together. The standard protocol is the Matter protocol, which can enable electrical devices of different manufacturers' brands to work together. The first connection is a communication connection based on a preset protocol in advance. The device identification includes but is not limited to the device serial number and the Media Access Control Address (MAC) address, which uniquely identifies the device information of the electrical device. The device serial number is a unique serial number assigned to each electrical device when it leaves the factory, which is used to track the production batch, production date and sales channel of the electrical device. The MAC address is used for identification and communication in the network, and can be used to confirm the address of the electrical device. The configuration information query request includes the device identification of the electrical device, and is used by the server to obtain the first configuration information identification of the electrical device under the standard protocol based on the device identification.
[0048] S102, obtaining a first configuration information identifier of the electrical device returned by the server, and obtaining configuration information of the electrical device based on the first configuration information identifier;
[0049] Specifically, the first terminal obtains the first configuration information identifier of the electrical device returned by the server, and obtains the configuration information of the electrical device from the first configuration information identifier. Among them, the first configuration information identifier is a manual pairing code (Manual Pairing Code) or a standard protocol two-dimensional code (Matter QR Code) of the electrical device. Manual Pairing Code and Matter QR Code are two different forms of identification codes used in the standard protocol configuration process. Both identification codes include configuration information for standard protocol configuration of the electrical device, such as network parameters and device identification information. Manual Pairing Code requires the user to manually input or voice input in the first terminal, and Matter QR Code requires the user to scan using the first terminal. The above two identification codes will increase the operational complexity of the standard protocol configuration process. The first terminal of the embodiment of the present application can directly obtain the configuration information from the first configuration information identifier returned by the server, reducing the operational complexity.
[0050] S103: Establish a second connection with the electrical device based on the configuration information.
[0051] Specifically, after the first terminal obtains the configuration information, it can establish a second connection with the electrical device based on the configuration information, and the second connection is a communication connection based on the standard protocol. Before establishing the second connection, the first terminal can detect the functional state of the first device discovery function of the electrical device based on the preset protocol. If the functional state of the first device discovery function is that the function is not turned on, a first turn-on instruction is sent to the electrical device to enable the electrical device to turn on the first device discovery function, and then establish a wireless communication connection with the electrical device based on the first device discovery function. When establishing the second connection, the first terminal can first authenticate the electrical device according to the device identifier in the configuration information, and then verify the standard protocol certificate of the electrical device according to the root certificate public key obtained from the server, and finally configure the node identifier and access rights for the electrical device in the standard protocol network according to the network parameters, and realize the second connection between the configuration information and the electrical device in the shared preset network, as well as the communication connection based on the standard protocol with other devices. At this time, the electrical device can be compatible with the preset protocol and the standard protocol.
[0052] In an embodiment of the present application, the first terminal, on the premise of establishing a first connection based on a preset protocol with the electrical device, can directly obtain the first configuration information identifier of the electrical device from the server according to the device identifier of the electrical device, and then obtain the configuration information of the electrical device from the first configuration information identifier, and establish a second connection based on a standard protocol with the electrical device based on the configuration information. There is no need to manually enter a pairing code in the first terminal or scan a QR code posted on the electrical device to obtain the configuration information, which simplifies the operating steps of the standard protocol configuration and improves the configuration efficiency. On the premise that the first terminal and the electrical device have completed the preset protocol configuration, completing the standard protocol configuration can not only ensure that the electrical device realizes the manufacturer's customized function, but also realize the intercommunication of devices of different manufacturers and brands, thereby improving the operability of the device.
[0053] See also Figure 3 , Figure 3 is a flow chart of a standard protocol configuration method provided in an embodiment of the present application. Figure 3 As shown, the embodiment of the present application describes the specific process of the standard protocol configuration method from the first terminal side, and the method may include the following steps S201-S207.
[0054] S201, establishing a first connection based on a preset protocol with an electrical device, and acquiring a device identification reported by the electrical device based on the first connection;
[0055] Specifically, the first terminal is a terminal device where the manufacturer APP of the electrical device is located, and the electrical device is a device in the IoT home system. When the first terminal establishes a communication connection with the electrical device for the first time, a first connection based on a preset protocol is established. When establishing the first connection, the first terminal is first required to discover the electrical device, establish a temporary communication connection with the electrical device, add the electrical device to a preset protocol network based on the preset protocol based on network configuration parameters related to the preset protocol, and establish a first connection with the electrical device in the preset protocol network. The preset protocol can be a custom protocol of the manufacturer of the electrical device, that is, a private protocol, which is used to enable the electrical device to realize the manufacturer's customized functions, or it can be a public protocol other than the smart home standard (Matter) protocol that can enable electrical devices of different manufacturers' brands to work together. The standard protocol is the Matter protocol, which enables electrical devices of different manufacturers' brands to work together. After the first terminal establishes a first connection with the electrical device, the electrical device reports the device identification to the first terminal. The device identification includes but is not limited to device information that uniquely identifies the electrical device, such as the device serial number and MAC address. The device serial number is a unique serial number assigned to each electrical device when it leaves the factory, and is used to track information such as the production batch, production date, and sales channel of the electrical device. The MAC address is used for identification and communication in the network and can be used to confirm the address of the electrical device.
[0056] S202, sending a registration request to the server based on the device identification, where the registration request is used to establish a third connection between the electrical device and the server;
[0057] Specifically, a registration request is sent to the server based on the device identification, so that the server establishes a third connection with the electrical device according to the device identification, and the third connection is a communication connection based on the Transport Layer Security (TLS) protocol. After the third connection is established, the electrical device reports the device information to the server, and the device information includes version number, device identification, manufacturer and other information. The server can detect whether the version of the electrical device supports the standard protocol based on the device information uploaded by the electrical device, and issue a standard protocol certificate for the electrical device, and negotiate the first shared key with the electrical device through the third connection. Among them, the standard protocol certificate is used to characterize that the electrical device complies with the standard protocol standard and can be seamlessly connected and interoperable in different smart home systems. The first shared key is a session key negotiated through the Password-Authenticated Key Exchange (PAKE) protocol, which is used to ensure the confidentiality and integrity of the data in subsequent communications.
[0058] S203, receiving the first prompt information sent by the server, and sending a configuration information query request carrying the device identification of the electrical device to the server;
[0059] Specifically, the first terminal receives the first prompt information sent by the server, and the first prompt information is the prompt information sent by the server when configuring the electrical device as a device with a connection function of the standard protocol. After the server issues a standard protocol certificate for the electrical device, the electrical device will notify the server that the device has become a device with a connection function of the standard protocol to be configured by the user. After receiving the notification sent by the electrical device, the server sends the first prompt information to the first terminal. According to the first prompt information, the first terminal can determine that the electrical device is a device with a connection function of the standard protocol. Therefore, the first terminal sends a configuration information query request carrying the device identification of the electrical device to the server. The configuration information query request is used by the server to obtain the first configuration information identification of the electrical device under the standard protocol based on the device identification.
[0060] S204, obtaining a first configuration information identifier of the electrical device returned by the server, and obtaining configuration information of the electrical device based on the first configuration information identifier;
[0061] Specifically, the first terminal obtains the first configuration information identifier of the electrical device returned by the server, and obtains the configuration information of the electrical device from the first configuration information identifier. Among them, the first configuration information identifier is a manual pairing code (Manual Pairing Code) or a standard protocol two-dimensional code (Matter QR Code) of the electrical device. Manual Pairing Code and Matter QR Code are two different forms of identification codes used in the standard protocol configuration process. Both identification codes include configuration information for standard protocol configuration of the electrical device, such as network parameters and device identification information. Manual Pairing Code requires the user to manually input or voice input in the first terminal, and Matter QR Code requires the user to scan using the first terminal. The above two identification codes will increase the operational complexity of the standard protocol configuration process. The first terminal of the embodiment of the present application can directly obtain the configuration information from the first configuration information identifier returned by the server, reducing the operational complexity.
[0062] S205, in response to the connection instruction initiated in response to the first prompt information, detecting a functional state of a first device discovery function of the electrical device based on a preset protocol;
[0063] Specifically, before starting the standard protocol configuration, the first terminal needs to display the first prompt information to the user to inform the user that the electrical device can be configured with one click. In response to the connection instruction initiated by the user for the first prompt information, the first terminal detects the functional state of the first device discovery function of the electrical device based on the preset protocol. Among them, the first device discovery function is the Basic Commissioning Method (BCM) window of the electrical device. The BCM window is a configuration method in the standard protocol that enables the electrical device to be discovered and configured. If the functional state is the function-on state, step S206 is skipped and step S207 is executed.
[0064] S206, if the function state is a function not enabled state, sending a first enable instruction to the electrical device so that the electrical device enables a first device discovery function;
[0065] Specifically, if the functional state of the first device discovery function is that the function is not turned on, a first turn-on instruction is sent to the electrical device to enable the electrical device to turn on the first device discovery function. After the first device discovery function is turned on, the electrical device can safely and effectively join the standard protocol network in the configuration information obtained by the first terminal, and can be configured to an operational state, that is, the electrical device can communicate with the first terminal or other devices.
[0066] S207: Establish a second connection with the electrical device based on the configuration information.
[0067] Specifically, after the first device discovery function is turned on, the electrical device will send a broadcast signal such as Bluetooth or wireless local area network (Wi-Fi) to the outside world through the first device discovery function, so as to be discovered by the first terminal. The first terminal establishes a wireless communication connection with the electrical device based on the first device discovery function, and the wireless communication connection is a communication connection such as Bluetooth pairing or Wi-Fi connection. After the wireless communication connection is established, the electrical device sends its own standard protocol certificate to the first terminal. The first terminal encrypts and receives the standard protocol certificate sent by the electrical device through the wireless communication connection based on the first shared key in the configuration information, and verifies the standard protocol certificate. If the verification is successful, the network parameters and the first shared key are obtained from the configuration information, the network parameters are encrypted based on the first shared key, the encrypted network parameters are sent to the electrical device, and a second connection based on the standard protocol is established with the electrical device based on the network parameters. Among them, the specific process of standard protocol certificate verification is to first detect whether the format or content of the standard protocol certificate is correct, then use the root certificate public key obtained from the server to verify the signature of the standard protocol certificate, and finally check the validity period and issuing authority of the standard protocol certificate. The first shared key is used to encrypt the standard protocol certificate sent by the receiving electrical device, and to encrypt the data transmission between the first terminal and the electrical device after the certificate authentication is passed. The network parameters include the specified network structure (Fabric), node ID, configuration role, etc. Fabric is a security isolation domain in the standard protocol network, which is used to ensure that the electrical device can only communicate securely with the devices in the Fabric. The electrical device joins the Fabric according to the network parameters, and the first terminal assigns it a unique node ID and the configuration role of the electrical device in the Fabric. After the electrical device successfully joins the Fabric, a second connection based on the standard protocol is established, as well as a communication connection based on the standard protocol with other devices. At this time, the electrical device can be compatible with the preset protocol and the standard protocol.
[0068] In a feasible implementation, after the first terminal establishes a second connection with the electrical device, a second start instruction is sent to the electrical device based on the second connection, so that the electrical device turns on the second device discovery function, periodically negotiates the second shared key with the electrical device based on a preset duration, and generates a second configuration information identifier based on the second shared key and the configuration information. Optionally, the first terminal can send a second configuration information identifier to the second terminal, so that the second terminal establishes a fourth connection with the electrical device based on the second configuration information identifier and the second device discovery function, and the fourth connection is a communication connection established based on the standard protocol. The first terminal can also establish a fifth connection with the electrical device based on the second configuration information identifier and the second device discovery function, and the fifth connection is a communication connection established based on the standard protocol. Among them, the second device discovery function is an Enhanced Commissioning Method (ECM) window of the electrical device. The ECM window is the same as the BCM window, and both are configuration methods in the standard protocol that enable the electrical device to be discovered and configured, but the BCM window is suitable for standard protocol configuration according to a long-term fixed first configuration information identifier, while the ECM window is suitable for standard protocol configuration according to a regularly updated second configuration information identifier. The second terminal is the terminal device where the third-party APP is located. The third-party APP is an APP from a manufacturer of non-electrical equipment but supports the standard protocol. The second terminal can be the same as the first terminal or different. If the second terminal and the first terminal are different terminal devices, the second configuration information identifier can be displayed through the first terminal, and the second terminal can be used to scan the second configuration information identifier displayed by the first terminal; if the second terminal and the first terminal are the same terminal devices, the second configuration information identifier can be sent to the third-party APP through the manufacturer APP in the first terminal. By setting a preset time, the second configuration information identifier is periodically updated, which improves the security of data transmission in the standard protocol configuration. Please refer to Figure 4 , Figure 4 FIG. 1 is a flow chart of a first terminal dynamically generating a second configuration information identifier provided by an embodiment of the present application. Figure 4 As shown, after the first terminal and the electrical device complete the standard protocol configuration, an instruction is sent to enable the electrical device to enable the second device discovery function and renegotiate the shared key with the electrical device so that the electrical device saves the new shared key.
[0069] In a feasible implementation, after the first terminal obtains the first configuration information identifier from the server, it can also send the first configuration information identifier to the third terminal, so that the third terminal can establish a sixth connection with the electrical device based on the first configuration information identifier and the first device discovery function. The sixth connection is a communication connection established based on the standard protocol. The third terminal is a terminal device where the third-party APP is located. The third terminal can be the same as the first terminal or different. If the third terminal and the first terminal are different terminal devices, the first configuration information identifier can be displayed through the first terminal, and the first configuration information identifier displayed by the first terminal can be scanned by the third terminal; if the third terminal and the first terminal are the same terminal devices, the second configuration information identifier can be sent to the third-party APP through the manufacturer APP in the first terminal. Please refer to Figure 5 , Figure 5 1 is a flow chart of a third terminal and an electrical device performing standard protocol configuration according to an embodiment of the present application. Figure 5 As shown, after the user agrees that the first terminal displays the first configuration information identifier, if the third terminal and the first terminal are in the same terminal device, the first configuration information identifier is shared with the third terminal through the sharing method within the terminal device; if the third terminal and the first terminal are not in the same terminal device, the third terminal is used to scan the first configuration information identifier. After the third terminal obtains the first configuration information identifier, it parses the first configuration information identifier, initiates the standard protocol configuration process to the electrical device, and performs the standard protocol configuration with the electrical device until the standard protocol configuration is completed.
[0070] In an embodiment of the present application, the first terminal establishes a first connection based on a preset protocol with the electrical device, obtains the device identification reported by the electrical device, and establishes a third connection between the electrical device and the server according to the device identification, so that the server configures the electrical device as a device with a connection function of the standard protocol, and sends a first prompt message to the first terminal that the electrical device has been configured as a device with a connection function of the standard protocol, so that after receiving the first prompt message, the first terminal sends a configuration information query request to the server, obtains the first configuration information identification returned by the server, obtains the configuration information of the electrical device from the first configuration information identification, and establishes a second connection based on the standard protocol with the electrical device based on the configuration information. Configuration information can be obtained without manually entering a pairing code in the first terminal or scanning a QR code posted on the electrical device, which simplifies the operation steps of the standard protocol configuration and improves the configuration efficiency. On the premise that the first terminal and the electrical device have completed the preset protocol configuration, completing the standard protocol configuration can not only ensure that the electrical device realizes the manufacturer's customized function, but also realize the intercommunication of devices of different manufacturers and brands, thereby improving the operability of the device.
[0071] See also Figure 6 , Figure 61 is a flow chart of a method for creating a new scene trigger condition provided in an embodiment of the present application. Figure 6 As shown, the embodiment of the present application describes the specific process of the standard protocol configuration method from the electrical device side, and the method may include the following steps S301-S308.
[0072] S301, establishing a first connection based on a preset protocol with a first terminal, and reporting a device identification to the first terminal based on the first connection, so that the first terminal sends a registration request to a server based on the device identification;
[0073] Specifically, the electrical device is a device in the Internet of Things home system, and the first terminal is a terminal device where the manufacturer APP of the electrical device is located. When the electrical device establishes a communication connection with the first terminal for the first time, a first connection based on a preset protocol is established. When establishing the first connection, a temporary communication connection is established between the electrical device and the first terminal, and the network configuration parameters related to the preset protocol sent by the first terminal are added to the preset protocol network, and a first connection is established with the first terminal in the preset protocol network. The preset protocol can be a manufacturer-defined protocol of the electrical device, that is, a private protocol, which is used to enable the electrical device to realize the customized functions of the manufacturer, or it can be a public protocol other than the smart home standard (Matter) protocol that enables electrical devices of different manufacturers to work together. The standard protocol is the Matter protocol, which enables electrical devices of different manufacturers to work together. After the electrical device establishes the first connection with the first terminal, the device identification is reported to the first terminal based on the first connection, so that the first terminal sends a registration request to the server based on the device identification. After receiving the registration request, the server sends a connection request to the electrical device based on the device identification in the registration request, and establishes a third connection with the electrical device. The third connection is a communication connection based on TLS. Device identification includes but is not limited to device information that uniquely identifies electrical equipment, such as the device serial number and MAC address. The device serial number is a unique serial number assigned to each electrical equipment when it leaves the factory, and is used to track information such as the production batch, production date, and sales channel of the electrical equipment. The MAC address is used for identification and communication in the network and can be used to confirm the address of the electrical equipment.
[0074] S302, establishing a third connection with the server based on the registration request, and reporting device information to the server through the third connection;
[0075] Specifically, the electrical device receives a connection request sent by the server, establishes a third connection with the server based on the connection request, and then reports device information to the server through the third connection, so that the server configures the electrical device as a device with a connection function of the standard protocol based on the device information. The device information includes a device identifier, a version number, a manufacturer, and other information. After receiving the device information, the server determines whether the firmware of the electrical device supports the standard protocol based on the version number in the device information. If the firmware of the electrical device supports the standard protocol, step S303 is skipped and step S304 is executed directly; if the firmware of the electrical device does not support the standard protocol, step S303 is executed.
[0076] S303, receiving a device update file sent by the server, and updating the first version of the electrical device to a second version based on the device update file;
[0077] Specifically, if the firmware of the electrical device does not support the standard protocol, the server notifies the first terminal so that the first terminal prompts the user that the electrical device is to be updated. If the first terminal detects a touch operation of the user confirming the update, in response to the touch operation, the notification information of confirming the update is returned to the server, so that the server sends the device update file to the electrical device, and the electrical device receives and downloads the device update file sent by the server, and updates the first version in the device information to the second version. The first version is the version that does not support the standard protocol, and the second version is the version that supports the standard protocol.
[0078] S304, applying for a standard protocol certificate from the server;
[0079] Specifically, after the electrical device is updated to a device that supports the standard protocol, the first device discovery function can be enabled. If the electrical device detects that it cannot enable the first device discovery function, it determines to apply for a standard protocol certificate from the server. The first device discovery function is the BCM window of the electrical device. The BCM window is a configuration method in the standard protocol that enables the electrical device to be discovered and configured. The specific process of applying for a standard protocol certificate is that the electrical device generates a first key pair based on the Elliptic Curve Digital Signature Algorithm (ECDSA), uses the device identifier and the first public key in the first key pair to create a certificate signing request, uses the first private key in the first key pair to sign the certificate signing request, and sends the signed certificate signing request to the server, requesting the server to issue a standard protocol certificate, and the electrical device receives and saves the standard protocol certificate returned by the server. The standard protocol certificate is used to indicate that the electrical device complies with the standard protocol standard and can be seamlessly connected and interoperable in different smart home systems.
[0080] S305, sending a key negotiation request to the server, and negotiating a first shared key with the server through the key negotiation request;
[0081] Specifically, while applying for a standard protocol certificate, the electrical device can also send a key negotiation request to the server based on the third connection, and negotiate a first shared key with the server through the key negotiation request, so that the server generates a first configuration information identifier based on the device information and the first shared key. The first shared key is a session key negotiated through PAKE, which is used to ensure the confidentiality and integrity of data in subsequent communications. The first configuration information identifier is the Manual Pairing Code or Matter QR Code of the electrical device. Manual Pairing Code and Matter QR Code are two different forms of identification codes used in the standard protocol configuration process. Both identification codes include configuration information for the standard protocol configuration of the electrical device, such as network parameters and device identification information. Manual Pairing Code requires the user to manually input or voice input in the first terminal, and Matter QR Code requires the user to scan using the first terminal. The above two identification codes will increase the complexity of the operation in the standard protocol configuration process. The first terminal of the embodiment of the present application can directly obtain the configuration information from the first configuration information identifier returned by the server, reducing the complexity of the operation.
[0082] S306, sending a second prompt message to the server;
[0083] Specifically, the electrical device saves both the standard protocol certificate and the first shared key in a non-volatile memory (Flash), and sends a second prompt message to the server. The data stored in the Flash memory will not be lost due to power failure, and has good data preservation capabilities. The second prompt message is that the electrical device has been configured as a device with a connection function of the standard protocol, and is used to enable the server to send the first prompt message that the electrical device has been configured as a device with a connection function of the standard protocol to the first terminal.
[0084] See also Figure 7 , Figure 7 This is a flow chart of a method for making a preset protocol electrical device become a standard protocol electrical device provided by an embodiment of the present application. Figure 7As shown, the user configures the preset protocol for the electrical device through the first terminal, and the electrical device is a device that supports the preset protocol. At the same time, during the configuration process, the electrical device reports the device identification to the first terminal. After completing the preset protocol configuration, the electrical device, the server and the first terminal are connected in pairs. When the server detects that the electrical device has firmware to be upgraded, it notifies the first terminal so that the first terminal notifies the user and provides the user with the choice of whether to upgrade the firmware. When the user agrees to upgrade the firmware, the electrical device is upgraded to the latest firmware through interaction with the server. When the electrical device detects that the device itself does not turn on the first device discovery function, it generates a key pair, creates a certificate signing request based on the key pair, and sends the certificate signing request to the server. The server issues a standard protocol certificate for the electrical device based on the certificate signing request, negotiates a shared key with the electrical device, and packages the standard protocol certificate and the shared key and sends them to the electrical device. The electrical device combines the received standard protocol certificate and the shared key and saves them in the memory, and sends a second prompt message to the server, prompting the server that the electrical device has completed the standard protocol configuration and is waiting for user configuration. After receiving the second prompt message, the server sends a first prompt message to the first terminal, prompting the first terminal to find an available standard protocol electrical device.
[0085] S307, receiving a first enable instruction sent by the first terminal, and enabling a first device discovery function;
[0086] Specifically, after receiving the first prompt information, the first terminal obtains the first configuration information identifier of the electrical device from the server and displays the first prompt information to the user, notifying the user that the electrical device can be configured with one click. In response to the connection instruction initiated by the user for the first prompt information, the first terminal detects the functional status of the first device discovery function of the electrical device based on a preset protocol. If the functional status is that the function is not enabled, the first terminal sends a first enable instruction to the electrical device. After receiving the first enable instruction, the electrical device enables the first device discovery function.
[0087] S308: Establish a second connection with the first terminal based on the configuration information.
[0088] Specifically, after the electrical device turns on the first device discovery function, it sends a broadcast signal such as Bluetooth or Wi-Fi to the outside world through the first device discovery function, which can be discovered by the first terminal. A wireless communication connection is established with the first terminal based on the first device discovery function, and the wireless communication connection is a communication connection such as Bluetooth pairing or Wi-Fi connection. After the wireless communication connection is established, the electrical device encrypts the standard protocol certificate through the first shared key negotiated with the server, and sends the encrypted standard protocol certificate to the first terminal based on the wireless communication connection, so that the first terminal verifies the standard protocol certificate. If the verification is successful, the network parameters in the configuration information sent by the first terminal are received, and a second connection based on the standard protocol is established with the first terminal based on the network parameters. Among them, the network parameters are parameters encrypted by the first terminal through the first shared key in the configuration information, and the network parameters include the specified network structure (Fabric), node ID, configuration role, etc. Fabric is a security isolation domain in the standard protocol network, which is used to ensure that the electrical device can only communicate securely with the devices in the Fabric. The electrical device joins the Fabric according to the network parameters, and the first terminal assigns it a unique node ID and the configuration role of the electrical device in the Fabric. After the electrical device successfully joins the Fabric, a second connection based on the standard protocol is established, as well as a communication connection based on the standard protocol with other devices. At this point, the electrical device can be compatible with both the preset protocol and the standard protocol.
[0089] In a feasible implementation, after the electrical device establishes a second connection with the first terminal, if a second start-up instruction sent by the first terminal is received based on the second connection, the second device discovery function is turned on in response to the second start-up instruction, and a second shared key is periodically negotiated with the first terminal based on a preset duration, so that the first terminal generates a second configuration information identifier based on the second shared key and the configuration information. The first terminal can establish a communication connection based on a standard protocol with the electrical device based on the second configuration information identifier, or send the second configuration information identifier to the terminal where the third-party APP is located, so that the terminal where the third-party APP is located establishes a communication connection based on a standard protocol with the electrical device based on the second configuration information identifier.
[0090] In an embodiment of the present application, after the electrical device establishes a first connection based on a preset protocol with the first terminal, a third connection is established with the server through a registration request sent by the first terminal to the server, and the device information is reported to the server. If a device update file is received from the server based on the device information, the first version of the electrical device is updated to the second version, and a standard protocol certificate is applied to the server, and a first shared key is negotiated with the server. After obtaining the standard protocol certificate and the first shared key, a second prompt message is sent to the server so that the first terminal can discover the electrical device. If the first terminal cannot discover the electrical device, the first start instruction sent by the first terminal is received, the first device discovery function is turned on, and a second connection based on the standard protocol is established with the first terminal based on the configuration information obtained by the first terminal. A second connection based on the standard protocol is established with the first terminal directly based on the configuration information in the first configuration information identifier of the electrical device obtained by the first terminal from the server, without the need to post configuration information identifiers such as QR codes on the electrical device, thereby reducing configuration costs and improving configuration efficiency.
[0091] See also Figure 8 , Figure 8 1 is a flow chart of a method for updating a scene trigger condition provided in an embodiment of the present application. Figure 8 As shown, the embodiment of the present application describes the specific process of the standard protocol configuration method from the server side, and the method may include the following steps S401-S402.
[0092] S401, receiving a configuration information query request carrying a device identification of an electrical device sent by a first terminal;
[0093] Specifically, when the server receives a configuration information query request carrying a device identifier of an electrical device sent by the first terminal, it searches for the first configuration information identifier of the electrical device in the database. The device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device. The device identifier includes but is not limited to device information such as a device serial number and a MAC address that uniquely identifies the electrical device. The device serial number is a unique serial number assigned to each electrical device when it leaves the factory, which is used to track information such as the production batch, production date, and sales channel of the electrical device. The MAC address is used for identification and communication in the network, and can be used to confirm the address of the electrical device. The first connection is a communication connection established in advance between the first terminal and the electrical device based on a preset protocol. The configuration information query request is a query request sent to the server when the first terminal establishes a first connection with the electrical device. The preset protocol can be a manufacturer-defined protocol of the electrical device, that is, a private protocol, which is used to enable the electrical device to realize the manufacturer's customized function, or it can be a public protocol other than the smart home standard (Matter) protocol that enables electrical devices of different manufacturers and brands to work together. The standard protocol is the Matter protocol, which enables electrical devices of different manufacturers and brands to work together.
[0094] S402: Send a first configuration information identifier of the electrical device to a first terminal based on the configuration information query request.
[0095] Specifically, if the server finds the first configuration information identifier of the electrical device based on the configuration information query request, the first configuration information identifier is sent to the first terminal, so that the first terminal obtains the configuration information of the electrical device from the first configuration information identifier, and establishes a second connection with the electrical device based on the configuration information. The second connection is a communication connection established between the first terminal and the electrical device based on the standard protocol.
[0096] In an embodiment of the present application, when the server receives a configuration information query request sent by the first terminal, it sends the first configuration information identifier to the first terminal, so that the electrical equipment does not need to post configuration information identifiers such as QR codes, and thus the user does not need to manually enter the pairing code or use the first terminal to scan the QR code, thereby reducing configuration costs and improving configuration efficiency.
[0097] See also Fig. 9 , Fig. 9 is a flow chart of a standard protocol configuration method provided in an embodiment of the present application. Fig. 9 As shown, the embodiment of the present application describes the specific process of the standard protocol configuration method from the server side, and the method may include the following steps S501-S505.
[0098] S501, receiving a registration request sent by a first terminal, and establishing a third connection with the electrical device based on the registration request, so as to receive device information reported by the electrical device through the third connection;
[0099] Specifically, the server receives a registration request sent by the first terminal, obtains the device identification of the electrical device from the registration request, establishes a third connection with the electrical device based on the device identification, and receives the device information reported by the electrical device through the third connection. Among them, the electrical device is a device in the IoT home system, the first terminal is the terminal device where the manufacturer APP of the electrical device is located, and the third connection is a TLS-based communication connection. The device identification includes but is not limited to the device serial number and MAC address and other device information that uniquely identifies the electrical device. The device serial number is a unique serial number assigned to each electrical device when it leaves the factory, which is used to track the production batch, production date, and sales channel of the electrical device. The MAC address is used for identification and communication in the network, and can be used to confirm the address of the electrical device. The device information includes version number, device identification, manufacturer and other information. The server can detect whether the version of the electrical device supports the standard protocol based on the device information uploaded by the electrical device, and issue a standard protocol certificate for the electrical device, and negotiate the first shared key with the electrical device through the third connection.
[0100] S502, configuring the electrical device as a device with a connection function of a standard protocol according to the device information, and receiving second prompt information sent by the electrical device;
[0101] Specifically, the server obtains the first version of the electrical device from the received device information. If the first version indicates that the electrical device does not support the standard protocol, the server sends a device update file to the electrical device to update the first version of the electrical device to the second version. The second version of the electrical device supports the standard protocol. The standard protocol is the Matter protocol, which enables electrical devices of different manufacturers to work together. If a certificate signing request sent by the electrical device is received, a standard protocol certificate is generated based on the certificate signing request. The certificate signing request is a request generated when the function state of the first device discovery function of the electrical device is not enabled. The generation process of the standard protocol certificate is specifically that the server extracts the first public key in the first key pair generated by the electrical device from the certificate signing request, generates the standard protocol certificate based on the first public key and the device information, obtains the second key pair from the certificate certification authority, signs the standard protocol certificate using the second private key in the second key pair, adds the second public key in the second key pair to the signed standard protocol certificate, and sends the standard protocol certificate to the electrical device to receive the second prompt information returned by the electrical device, and determines that the electrical device has been configured as a device with a connection function of the standard protocol. The second prompt information is the prompt information that the electrical device has been configured as a device with a connection function of the standard protocol. While issuing the standard protocol certificate, the server also receives a key negotiation request sent by the electrical device, and negotiates a first shared key with the electrical device through the key negotiation request.
[0102] S503, in response to the second prompt information, generating a first configuration information identifier based on the device information, and sending the first prompt information to the first terminal;
[0103] Specifically, in response to the second prompt information, a first configuration information identifier is generated based on the first shared key and the device information, and the first prompt information is sent to the first terminal at the same time, so as to prompt the first terminal to find an electrical device that can be configured with a standard protocol, so that the first terminal and the electrical device establish a second connection, and the second connection is a communication connection based on the standard protocol. Among them, the first shared key is a session key negotiated through PAKE, and the first shared key is added to the first configuration information identifier and sent to the first terminal, which is used to ensure the data confidentiality and integrity of the communication between the first terminal and the electrical device.
[0104] S504, receiving a configuration information query request carrying a device identification of the electrical device sent by the first terminal;
[0105] Specifically, when receiving a configuration information query request carrying a device identifier of an electrical device sent by a first terminal, the first configuration information identifier of the electrical device is searched in a database. The device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection is a communication connection established in advance between the first terminal and the electrical device based on a preset protocol, the configuration information query request is a query request sent to the server when the first terminal establishes a first connection with the electrical device, and the preset protocol can be a manufacturer-defined protocol of the electrical device, that is, a private protocol, which is used to enable the electrical device to realize the manufacturer's customized functions, or it can be a public protocol other than the smart home standard (Matter) protocol that can enable electrical devices of different manufacturers and brands to work together.
[0106] S505: Send a first configuration information identifier of the electrical device to the first terminal based on the configuration information query request.
[0107] Please refer to step S402 for the specific process, which will not be described again here.
[0108] In the embodiment of the present application, after the server establishes the third connection with the electrical device, the electrical device is configured as a device with a connection function of a standard protocol according to the device information reported by the electrical device, the second prompt information of the electrical device is received, and a first configuration information identifier is generated, and the second prompt information is converted into the first prompt information and sent to the first terminal, so that the first terminal sends a configuration information query request to the server, and after the server receives the configuration information query request, the first configuration information identifier of the electrical device is sent to the first terminal. There is no need to post configuration information identifiers such as QR codes on the electrical device, so that users do not need to manually enter pairing codes or use the first terminal to scan QR codes, which reduces configuration costs and improves configuration efficiency.
[0109] See also Fig.10 , Fig.10 is a flow chart of a standard protocol configuration method provided in an embodiment of the present application. Fig.10 As shown, the embodiment of the present application jointly describes the specific process of the standard protocol configuration method from the first terminal side, the electrical device side and the server side. The method may include the following steps S601-S606.
[0110] S601, sending a configuration information query request carrying a device identification of an electrical device to a server;
[0111] Please refer to step S203 for the specific process, which will not be described again here.
[0112] S602, receiving a configuration information query request carrying a device identification of an electrical device sent by a first terminal;
[0113] Please refer to step S504 for the specific process, which will not be described again here.
[0114] S603, sending a first configuration information identifier of the electrical device to the first terminal based on the configuration information query request;
[0115] Please refer to step S505 for the specific process, which will not be described again here.
[0116] S604, obtaining a first configuration information identifier of the electrical device returned by the server, and obtaining configuration information of the electrical device based on the first configuration information identifier;
[0117] Please refer to step S204 for the specific process, which will not be described again here.
[0118] S605, establishing a second connection with the electrical device based on the configuration information;
[0119] Please refer to step S207 for the specific process, which will not be described again here.
[0120] S606: Establish a second connection with the first terminal based on the configuration information.
[0121] Please refer to step S308 for the specific process, which will not be described again here.
[0122] In an embodiment of the present application, the first terminal may send a configuration information query request to the server, obtain the first configuration information identifier of the electrical device from the server, and then obtain the configuration information of the electrical device, and establish a second connection based on the standard protocol with the electrical device based on the configuration information. There is no need to post configuration information identifiers such as QR codes on the electrical device, which reduces the configuration cost, and thus the user does not need to manually enter the pairing code in the first terminal or scan the QR code posted on the electrical device, which simplifies the operation steps of the standard protocol configuration and improves the configuration efficiency. On the premise that the first terminal and the electrical device have completed the preset protocol configuration, completing the standard protocol configuration can not only ensure that the electrical device realizes the manufacturer's customized function, but also realize the intercommunication of devices of different manufacturers and brands, thereby improving the operability of the device.
[0123] based on Figure 1 The system architecture will be combined with Fig.11 , the first terminal provided in the embodiment of the present application is introduced in detail. It should be noted that, Fig.11 The first terminal in is used to execute this application Figure 2-Figure 5 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2-Figure 5 The embodiment shown.
[0124] See also Fig.11 , Fig.11 is a schematic diagram of the structure of a first terminal provided in an embodiment of the present application. Fig.11 As shown, the first terminal 1000 of the embodiment of the present application may include: a query request sending unit 1001, a configuration information acquiring unit 1002 and a configuration information acquiring unit 1003.
[0125] The query request sending unit 1001 is used to send a configuration information query request carrying a device identifier of the electrical device to the server, where the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, where the first connection is a communication connection established in advance based on a preset protocol, and the configuration information query request is used by the server to obtain a first configuration information identifier of the electrical device under a standard protocol based on the device identifier;
[0126] The configuration information acquisition unit 1002 is used to acquire the first configuration information identifier of the electrical device returned by the server, and acquire the configuration information of the electrical device based on the first configuration information identifier;
[0127] The first connection establishing unit 1003 is used to establish a second connection with the electrical device based on the configuration information, where the second connection is a communication connection established based on a standard protocol.
[0128] Optionally, the first terminal 1000 is specifically used to establish a first connection based on a preset protocol with the electrical device;
[0129] Based on the first connection, obtaining a device identification reported by the electrical device;
[0130] A registration request is sent to the server based on the device identification, where the registration request is used to establish a third connection between the electrical device and the server, so that the electrical device reports device information to the server based on the third connection, where the device information includes the device identification.
[0131] Optionally, the first terminal 1000 is specifically used to receive a first prompt message sent by the server, where the first prompt message is the prompt message sent by the server when configuring the electrical device as a device with a connection function of a standard protocol.
[0132] Optionally, the first terminal 1000 is specifically configured to detect a functional state of a first device discovery function of the electrical device based on a preset protocol in response to a connection instruction initiated in response to the first prompt information;
[0133] If the function state is a function-not-enabled state, a first enable instruction is sent to the electrical device to enable the electrical device to enable the first device discovery function.
[0134] Optionally, the first connection establishing unit 1003 is specifically configured to establish a wireless communication connection with the electrical device based on the first device discovery function;
[0135] Based on the first shared key in the configuration information, encrypt and receive the standard protocol certificate sent by the electrical device through the wireless communication connection, and verify the standard protocol certificate;
[0136] If the verification is successful, the network parameters and the first shared key are obtained from the configuration information;
[0137] Encrypting the network parameters based on the first shared key, and sending the encrypted network parameters to the electrical device;
[0138] A second connection based on a standard protocol is established with the electrical device based on the network parameters.
[0139] Optionally, the first connection establishing unit 1003 is specifically configured to send a second activation instruction to the electrical device based on the second connection, so that the electrical device activates the second device discovery function;
[0140] Periodically negotiate a second shared key with the electrical device based on a preset time period;
[0141] Generate a second configuration information identifier based on the second shared key and the configuration information;
[0142] The second configuration information identifier is sent to the second terminal, so that the second terminal establishes a fourth connection with the electrical device based on the second configuration information identifier and the second device discovery function, where the fourth connection is a communication connection established based on the standard protocol.
[0143] Optionally, the first connection establishing unit 1003 is specifically configured to:
[0144] Optionally, the first terminal 1000 is specifically used to send a first configuration information identifier to the third terminal, so that the third terminal establishes a sixth connection with the electrical device based on the first configuration information identifier and the first device discovery function, and the sixth connection is a communication connection established based on a standard protocol.
[0145] In an embodiment of the present application, the first terminal establishes a first connection based on a preset protocol with the electrical device, obtains the device identification reported by the electrical device, and establishes a third connection between the electrical device and the server according to the device identification, so that the server configures the electrical device as a device with a connection function of the standard protocol, and sends a first prompt message to the first terminal that the electrical device has been configured as a device with a connection function of the standard protocol, so that after receiving the first prompt message, the first terminal sends a configuration information query request to the server, obtains the first configuration information identification returned by the server, obtains the configuration information of the electrical device from the first configuration information identification, and establishes a second connection based on the standard protocol with the electrical device based on the configuration information. Configuration information can be obtained without manually entering a pairing code in the first terminal or scanning a QR code posted on the electrical device, which simplifies the operation steps of the standard protocol configuration and improves the configuration efficiency. On the premise that the first terminal and the electrical device have completed the preset protocol configuration, completing the standard protocol configuration can not only ensure that the electrical device realizes the manufacturer's customized function, but also realize the intercommunication of devices of different manufacturers and brands, thereby improving the operability of the device.
[0146] See also Fig.12 , Fig.12 It is a structural diagram of a computer device provided in an embodiment of the present application.
[0147] For example, Fig.12 As shown, the computer device 1200 includes: a processor 1201 and a memory 1202, wherein the processor 1201 is electrically connected to the memory 1202.
[0148] The processor 1201 is the control center of the computer device 1200 and may include one or more processing cores. The processor 1201 uses various interfaces and lines to connect various parts of the entire computer device, and executes various functions of the computer device and processes data by running or calling computer programs stored in the memory 1202, and calling data stored in the memory 1202, so as to control the computer device 1200 as a whole. Optionally, the processor 1201 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 1201 may integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, the CPU mainly processes the operating system, user pages, and applications; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1201, but may be implemented separately through a communication chip.
[0149] The memory 1202 may be used to store software programs and modules, and the processor 1201 executes various functional applications and data processing by running the computer programs and modules stored in the memory 1202. The memory 1202 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function, etc.; the data storage area may store data created according to the use of the computer device 1200, etc.
[0150] In addition, the memory 1202 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 1202 may also include a memory controller to provide the processor 1201 with access to the memory 1202.
[0151] In this embodiment, the processor 1201 in the computer device 1200 will load instructions corresponding to the processes of one or more computer programs into the memory 1202 according to the following steps, and the processor 1201 will run the computer program stored in the memory 1202 to implement various functions, as follows:
[0152] Sending a configuration information query request carrying a device identifier of the electrical device to a server, where the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, where the first connection is a communication connection established in advance based on a preset protocol, and the configuration information query request is used by the server to obtain a first configuration information identifier of the electrical device under a standard protocol based on the device identifier;
[0153] Obtaining a first configuration information identifier of the electrical device returned by the server, and obtaining configuration information of the electrical device based on the first configuration information identifier;
[0154] A second connection is established with the electrical device based on the configuration information, where the second connection is a communication connection established based on a standard protocol.
[0155] Optionally, before executing sending the configuration information query request carrying the device identification of the electrical device to the server, the processor 1201 further executes:
[0156] Establishing a first connection with the electrical device based on a preset protocol;
[0157] Based on the first connection, obtaining a device identification reported by the electrical device;
[0158] A registration request is sent to the server based on the device identification, where the registration request is used to establish a third connection between the electrical device and the server, so that the electrical device reports device information to the server based on the third connection, where the device information includes the device identification.
[0159] Optionally, before executing sending the configuration information query request carrying the device identification of the electrical device to the server, the processor 1201 further executes:
[0160] A first prompt message sent by the server is received, where the first prompt message is the prompt message sent by the server when the server configures the electrical device as a device with a connection function of a standard protocol.
[0161] Optionally, after executing the process of acquiring the first configuration information identifier of the electrical device returned by the server, the processor 1201 further executes:
[0162] In response to a connection instruction initiated in response to the first prompt information, detecting a functional state of a first device discovery function of the electrical device based on a preset protocol;
[0163] If the function state is a function-not-enabled state, a first enable instruction is sent to the electrical device to enable the electrical device to enable the first device discovery function.
[0164] Optionally, when executing to establish a second connection with the electrical device based on the configuration information, the processor 1201 specifically executes:
[0165] Establishing a wireless communication connection with the electrical device based on the first device discovery function;
[0166] Based on the first shared key in the configuration information, encrypt and receive the standard protocol certificate sent by the electrical device through the wireless communication connection, and verify the standard protocol certificate;
[0167] If the verification is successful, the network parameters are obtained from the configuration information;
[0168] Encrypting the network parameters based on the first shared key, and sending the encrypted network parameters to the electrical device;
[0169] A second connection based on a standard protocol is established with the electrical device based on the network parameters.
[0170] Optionally, after executing the step of establishing a second connection based on a standard protocol with the electrical device based on the network parameters, the processor 1201 further executes:
[0171] Sending a second start instruction to the electrical device based on the second connection, so that the electrical device starts a second device discovery function;
[0172] Periodically negotiate a second shared key with the electrical device based on a preset time period;
[0173] Generate a second configuration information identifier based on the second shared key and the configuration information;
[0174] The second configuration information identifier is sent to the second terminal, so that the second terminal establishes a fourth connection with the electrical device based on the second configuration information identifier and the second device discovery function, where the fourth connection is a communication connection established based on the standard protocol.
[0175] Optionally, after executing generating the second configuration information identifier based on the second shared key and the device identifier, the processor 1201 further executes:
[0176] Based on the second configuration information identifier and the second device discovery function, a fifth connection is established with the electrical device, and the fifth connection is a communication connection established based on a standard protocol.
[0177] Optionally, after executing the process of acquiring the first configuration information identifier of the electrical device returned by the server, the processor 1201 further executes:
[0178] The first configuration information identifier is sent to the third terminal, so that the third terminal establishes a sixth connection with the electrical device based on the first configuration information identifier and the first device discovery function, where the sixth connection is a communication connection established based on the standard protocol.
[0179] In an embodiment of the present application, the first terminal establishes a first connection based on a preset protocol with the electrical device, obtains the device identification reported by the electrical device, and establishes a third connection between the electrical device and the server according to the device identification, so that the server configures the electrical device as a device with a connection function of the standard protocol, and sends a first prompt message to the first terminal that the electrical device has been configured as a device with a connection function of the standard protocol, so that after receiving the first prompt message, the first terminal sends a configuration information query request to the server, obtains the first configuration information identification returned by the server, obtains the configuration information of the electrical device from the first configuration information identification, and establishes a second connection based on the standard protocol with the electrical device based on the configuration information. Configuration information can be obtained without manually entering a pairing code in the first terminal or scanning a QR code posted on the electrical device, which simplifies the operation steps of the standard protocol configuration and improves the configuration efficiency. On the premise that the first terminal and the electrical device have completed the preset protocol configuration, completing the standard protocol configuration can not only ensure that the electrical device realizes the manufacturer's customized function, but also realize the intercommunication of devices of different manufacturers and brands, thereby improving the operability of the device.
[0180] based on Figure 1 The system architecture will be combined with Fig.13 , the electrical equipment provided in the embodiment of the present application is introduced in detail. It should be noted that, Fig.13 The electrical equipment used to implement this application Figure 6-Figure 7 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 6-Figure 7 The embodiment shown.
[0181] See also Fig.13 , Fig.13 Schematic diagram of the structure of an electrical device provided in an embodiment of the present application. Fig.13 As shown, the electrical device 2000 in the embodiment of the present application may include: a second connection establishing unit 2001.
[0182] The second connection establishing unit 2001 is configured to establish a second connection with the first terminal based on the configuration information;
[0183] Among them, the configuration information is obtained by the first terminal from the first configuration information identifier, the first configuration information identifier is the configuration information identifier corresponding to the electrical device returned by the server when the first terminal sends a configuration information query request carrying the device identifier of the electrical device to the server, the device identifier is the identifier obtained when the first terminal establishes a first connection with the electrical device, and the first connection is a communication connection established in advance based on a preset protocol.
[0184] Optionally, the electrical device 2000 is specifically used to establish a first connection based on a preset protocol with the first terminal;
[0185] Based on the first connection, reporting the device identification to the first terminal, so that the first terminal sends a registration request to the server based on the device identification;
[0186] Establishing a third connection with the server based on the registration request, and reporting device information to the server through the third connection, so that the server configures the electrical device as a device with a connection function of a standard protocol based on the device information, wherein the device information includes a device identifier;
[0187] Sending a second prompt message to the server, where the second prompt message is used to cause the server to send a first prompt message to the first terminal that the electrical device has been configured as a device with a connection function of a standard protocol;
[0188] A first start instruction sent by the first terminal is received to start the first device discovery function. The first start instruction is an instruction sent by the first terminal when it detects that the function state of the first device discovery function of the electrical device is not started based on a preset protocol.
[0189] Optionally, the electrical device 2000 is specifically used to receive a device update file sent by the server;
[0190] Updating a first version of the electrical device to a second version based on the device update file, wherein the second version of the electrical device supports a standard protocol;
[0191] Apply for a standard protocol certificate from the server.
[0192] Optionally, the electrical device 2000 is specifically used to generate a first key pair;
[0193] Creating a certificate signing request using the device identification and a first public key in a first key pair;
[0194] Signing the certificate signing request using the first private key in the first key pair, and sending the signed certificate signing request to the server;
[0195] Receive and save the standard protocol certificate returned by the server.
[0196] Optionally, the electrical device 2000 is specifically configured to send a key negotiation request to the server, and negotiate a first shared key with the server through the key negotiation request, so that the server generates a first configuration information identifier based on the device information and the first shared key.
[0197] Optionally, the second connection establishing unit 2001 is specifically configured to establish a wireless communication connection with the first terminal based on the first device discovery function;
[0198] encrypting the standard protocol certificate by a first shared key;
[0199] Sending the encrypted standard protocol certificate to the first terminal based on the wireless communication connection, so that the first terminal verifies the standard protocol certificate;
[0200] If the verification is successful, receiving the network parameters in the configuration information sent by the first terminal, where the network parameters are parameters encrypted by the first terminal using the first shared key in the configuration information;
[0201] A second connection based on a standard protocol is established with the first terminal based on the network parameters.
[0202] Optionally, the second connection establishing unit 2001 is specifically configured to enable the second device discovery function in response to the second enable instruction if a second enable instruction sent by the first terminal is received based on the second connection;
[0203] The second shared key is periodically negotiated with the first terminal based on a preset time period, so that the first terminal generates a second configuration information identifier based on the second shared key and the configuration information.
[0204] In an embodiment of the present application, after the electrical device establishes a first connection based on a preset protocol with the first terminal, a third connection is established with the server through a registration request sent by the first terminal to the server, and the device information is reported to the server. If a device update file is received from the server based on the device information, the first version of the electrical device is updated to the second version, and a standard protocol certificate is applied to the server, and a first shared key is negotiated with the server. After obtaining the standard protocol certificate and the first shared key, a second prompt message is sent to the server so that the first terminal can discover the electrical device. If the first terminal cannot discover the electrical device, the first start instruction sent by the first terminal is received, the first device discovery function is turned on, and a second connection based on the standard protocol is established with the first terminal based on the configuration information obtained by the first terminal. A second connection based on the standard protocol is established with the first terminal directly based on the configuration information in the first configuration information identifier of the electrical device obtained by the first terminal from the server, without the need to post configuration information identifiers such as QR codes on the electrical device, thereby reducing configuration costs and improving configuration efficiency.
[0205] See also Fig.14 , Fig.14 It is a structural diagram of a computer device provided in an embodiment of the present application.
[0206] For example, Fig.14 As shown, the computer device 1400 includes: a processor 1401 and a memory 1402, wherein the processor 1401 is electrically connected to the memory 1402.
[0207] The processor 1401 is the control center of the computer device 1400 and may include one or more processing cores. The processor 1401 uses various interfaces and lines to connect the various parts of the entire computer device, and executes various functions of the computer device and processes data by running or calling the computer program stored in the memory 1402, and calling the data stored in the memory 1402, so as to control the computer device 1400 as a whole. Optionally, the processor 1401 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 1401 can integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, the CPU mainly processes the operating system, user pages and applications, etc.; the GPU is responsible for rendering and drawing the display content; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1401, and it can be implemented separately through a communication chip.
[0208] The memory 1402 may be used to store software programs and modules, and the processor 1401 executes various functional applications and data processing by running the computer programs and modules stored in the memory 1402. The memory 1402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function, etc.; the data storage area may store data created according to the use of the computer device 1400, etc.
[0209] In addition, the memory 1402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1402 may also include a memory controller to provide the processor 1401 with access to the memory 1402.
[0210] In this embodiment, the processor 1401 in the computer device 1400 loads instructions corresponding to the processes of one or more computer programs into the memory 1402 according to the following steps, and the processor 1401 runs the computer program stored in the memory 1402 to implement various functions, as follows:
[0211] Establishing a second connection with the first terminal based on the configuration information;
[0212] Among them, the configuration information is obtained by the first terminal from the first configuration information identifier, the first configuration information identifier is the configuration information identifier corresponding to the electrical device returned by the server when the first terminal sends a configuration information query request carrying the device identifier of the electrical device to the server, the device identifier is the identifier obtained when the first terminal establishes a first connection with the electrical device, and the first connection is a communication connection established in advance based on a preset protocol.
[0213] Optionally, before executing establishing the second connection with the first terminal based on the configuration information, the processor 1401 further executes:
[0214] Establishing a first connection based on a preset protocol with a first terminal;
[0215] Based on the first connection, reporting the device identification to the first terminal, so that the first terminal sends a registration request to the server based on the device identification;
[0216] Establishing a third connection with the server based on the registration request, and reporting device information to the server through the third connection, so that the server configures the electrical device as a device with a connection function of a standard protocol based on the device information, wherein the device information includes a device identifier;
[0217] Sending a second prompt message to the server, where the second prompt message is used to cause the server to send a first prompt message to the first terminal that the electrical device has been configured as a device with a connection function of a standard protocol;
[0218] A first start instruction sent by the first terminal is received to start the first device discovery function. The first start instruction is an instruction sent by the first terminal when it detects that the function state of the first device discovery function of the electrical device is not started based on a preset protocol.
[0219] Optionally, after executing establishing a third connection with the server based on the registration request and reporting device information to the server through the third connection, the processor 1401 further executes:
[0220] Receive device update files sent by the server;
[0221] Updating a first version of the electrical device to a second version based on the device update file, wherein the second version of the electrical device supports a standard protocol;
[0222] Apply for a standard protocol certificate from the server.
[0223] Optionally, when the processor 1401 applies for a standard protocol certificate from the server, the processor 1401 specifically performs:
[0224] generating a first key pair;
[0225] Creating a certificate signing request using the device identification and a first public key in a first key pair;
[0226] Signing the certificate signing request using the first private key in the first key pair, and sending the signed certificate signing request to the server;
[0227] Receive and save the standard protocol certificate returned by the server.
[0228] Optionally, after executing the updating of the first version of the electrical device to the second version based on the device update file, the processor 1401 further executes:
[0229] A key negotiation request is sent to the server, and a first shared key is negotiated with the server through the key negotiation request, so that the server generates a first configuration information identifier based on the device information and the first shared key.
[0230] Optionally, when executing to establish the second connection with the first terminal based on the configuration information, the processor 1401 specifically performs:
[0231] Establishing a wireless communication connection with the first terminal based on the first device discovery function;
[0232] encrypting the standard protocol certificate by a first shared key;
[0233] Sending the encrypted standard protocol certificate to the first terminal based on the wireless communication connection, so that the first terminal verifies the standard protocol certificate;
[0234] If the verification is successful, receiving the network parameters in the configuration information sent by the first terminal, where the network parameters are parameters encrypted by the first terminal using the first shared key in the configuration information;
[0235] A second connection based on a standard protocol is established with the first terminal based on the network parameters.
[0236] Optionally, after executing establishing a second connection based on a standard protocol with the first terminal based on the network parameter, the processor 1401 further executes:
[0237] If a second enabling instruction sent by the first terminal is received based on the second connection, in response to the second enabling instruction, enabling the second device discovery function;
[0238] The second shared key is periodically negotiated with the first terminal based on a preset time period, so that the first terminal generates a second configuration information identifier based on the second shared key and the configuration information.
[0239] In an embodiment of the present application, after the electrical device establishes a first connection based on a preset protocol with the first terminal, a third connection is established with the server through a registration request sent by the first terminal to the server, and the device information is reported to the server. If a device update file is received from the server based on the device information, the first version of the electrical device is updated to the second version, and a standard protocol certificate is applied to the server, and a first shared key is negotiated with the server. After obtaining the standard protocol certificate and the first shared key, a second prompt message is sent to the server so that the first terminal can discover the electrical device. If the first terminal cannot discover the electrical device, the first start instruction sent by the first terminal is received, the first device discovery function is turned on, and a second connection based on the standard protocol is established with the first terminal based on the configuration information obtained by the first terminal. A second connection based on the standard protocol is established with the first terminal directly based on the configuration information in the first configuration information identifier of the electrical device obtained by the first terminal from the server, without the need to post configuration information identifiers such as QR codes on the electrical device, thereby reducing configuration costs and improving configuration efficiency.
[0240] based on Figure 1 The system architecture will be combined with Fig.15 , the server provided in the embodiment of the present application is introduced in detail. It should be noted that, Fig.15 The server in is used to execute this application Figure 8-Figure 9 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 8-Figure 9 The embodiment shown.
[0241] See also Fig.15 , Fig.15 Schematic diagram of the structure of a server provided in an embodiment of the present application. Fig.15 As shown, the server 3000 of the embodiment of the present application may include: a query request receiving unit 3001 and a configuration information identifier sending unit 3002.
[0242] The query request receiving unit 3001 is used to receive a configuration information query request carrying a device identifier of an electrical device sent by a first terminal, where the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection is a communication connection established in advance between the first terminal and the electrical device based on a preset protocol, and the configuration information query request is a query request sent to the server when the first terminal establishes the first connection with the electrical device;
[0243] The configuration information identifier sending unit 3002 is used to send the first configuration information identifier of the electrical device to the first terminal based on the configuration information query request, so that the first terminal obtains the configuration information of the electrical device from the first configuration information identifier, and establishes a second connection with the electrical device based on the configuration information. The second connection is a communication connection established between the first terminal and the electrical device based on the standard protocol.
[0244] Optionally, the server 3000 is specifically configured to receive a registration request sent by the first terminal, establish a third connection with the electrical device based on the registration request, and receive device information reported by the electrical device through the third connection, where the device information includes a device identifier;
[0245] Configure the electrical device as a device with a connection function of a standard protocol according to the device information;
[0246] receiving second prompt information sent by the electrical device, where the second prompt information is prompt information that the electrical device has been configured as a device with a connection function of a standard protocol;
[0247] In response to the second prompt information, generating a first configuration information identifier based on the device information;
[0248] A first prompt message is sent to the first terminal to prompt the first terminal to establish a second connection with the electrical device, where the second connection is a communication connection based on a standard protocol.
[0249] Optionally, the server 3000 is specifically configured to obtain a first version of the electrical device from the device information;
[0250] If the first version indicates that the electrical device does not support the standard protocol, sending a device update file to the electrical device to update the first version of the electrical device to a second version, and the second version of the electrical device supports the standard protocol;
[0251] Receiving a certificate signing request sent by the electrical device, and generating a standard protocol certificate based on the certificate signing request, wherein the certificate signing request is a request generated when the function state of the first device discovery function of the electrical device is a function not enabled state;
[0252] The standard protocol certificate is sent to the electrical device to receive second prompt information returned by the electrical device, where the second prompt information is prompt information indicating that the electrical device has been configured as a device with a connection function of the standard protocol.
[0253] Optionally, the server 3000 is specifically configured to receive a certificate signing request sent by the electrical device, and extract a first public key of a first key pair generated by the electrical device from the certificate signing request;
[0254] Generate a standard protocol certificate based on the first public key and the device information;
[0255] Obtain a second key pair, and use the second private key in the second key pair to sign the standard protocol certificate.
[0256] Optionally, the server 3000 is specifically configured to receive a key negotiation request sent by the electrical device, and negotiate a first shared key with the electrical device through the key negotiation request.
[0257] Optionally, the server 3000 is specifically configured to generate a first configuration information identifier based on the first shared key and the device information in response to the second prompt information.
[0258] In the embodiment of the present application, after the server establishes the third connection with the electrical device, the electrical device is configured as a device with a connection function of a standard protocol according to the device information reported by the electrical device, the second prompt information of the electrical device is received, and a first configuration information identifier is generated, and the second prompt information is converted into the first prompt information and sent to the first terminal, so that the first terminal sends a configuration information query request to the server, and after the server receives the configuration information query request, the first configuration information identifier of the electrical device is sent to the first terminal. There is no need to post configuration information identifiers such as QR codes on the electrical device, so that users do not need to manually enter pairing codes or use the first terminal to scan QR codes, which reduces configuration costs and improves configuration efficiency.
[0259] See also Fig.16 , Fig.16 It is a structural diagram of a computer device provided in an embodiment of the present application.
[0260] For example, Fig.16 As shown, the computer device 1600 includes: a processor 1601 and a memory 1602, wherein the processor 1601 is electrically connected to the memory 1602.
[0261] Processor 1601 is the control center of computer device 1600, and may include one or more processing cores. Processor 1601 uses various interfaces and lines to connect various parts of the entire computer device, and executes various functions of the computer device and processes data by running or calling computer programs stored in memory 1602, and calling data stored in memory 1602, so as to control computer device 1600 as a whole. Optionally, processor 1601 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). Processor 1601 may integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, CPU mainly processes operating system, user pages and applications, etc.; GPU is responsible for rendering and drawing display content; modem is used to process wireless communication. It is understandable that the above-mentioned modem may not be integrated into processor 1601, but may be implemented separately through a communication chip.
[0262] The memory 1602 may be used to store software programs and modules, and the processor 1601 executes various functional applications and data processing by running the computer programs and modules stored in the memory 1602. The memory 1602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function, etc.; the data storage area may store data created according to the use of the computer device 1600, etc.
[0263] In addition, the memory 1602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 1602 may also include a memory controller to provide the processor 1601 with access to the memory 1602.
[0264] In this embodiment, the processor 1601 in the computer device 1600 loads instructions corresponding to the processes of one or more computer programs into the memory 1602 according to the following steps, and the processor 1601 runs the computer program stored in the memory 1602 to implement various functions, as follows:
[0265] receiving a configuration information query request carrying a device identifier of the electrical device sent by the first terminal, where the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection is a communication connection established in advance between the first terminal and the electrical device based on a preset protocol, and the configuration information query request is a query request sent to the server when the first terminal establishes the first connection with the electrical device;
[0266] Based on the configuration information query request, the first configuration information identifier of the electrical device is sent to the first terminal, so that the first terminal obtains the configuration information of the electrical device from the first configuration information identifier, and establishes a second connection with the electrical device based on the configuration information. The second connection is a communication connection established between the first terminal and the electrical device based on the standard protocol.
[0267] Optionally, before receiving the configuration information query request carrying the device identification of the electrical device sent by the first terminal, the processor 1601 further executes:
[0268] receiving a registration request sent by the first terminal, and establishing a third connection with the electrical device based on the registration request, so as to receive device information reported by the electrical device through the third connection, where the device information includes a device identifier;
[0269] Configure the electrical device as a device with a connection function of a standard protocol according to the device information;
[0270] receiving second prompt information sent by the electrical device, where the second prompt information is prompt information that the electrical device has been configured as a device with a connection function of a standard protocol;
[0271] In response to the second prompt information, generating a first configuration information identifier based on the device information;
[0272] A first prompt message is sent to the first terminal to prompt the first terminal to establish a second connection with the electrical device, where the second connection is a communication connection based on a standard protocol.
[0273] Optionally, when configuring the electrical device as a device with a connection function of a standard protocol according to the device information, the processor 1601 specifically performs:
[0274] Obtaining a first version of the electrical device from the device information;
[0275] If the first version indicates that the electrical device does not support the standard protocol, sending a device update file to the electrical device to update the first version of the electrical device to a second version, and the second version of the electrical device supports the standard protocol;
[0276] Receiving a certificate signing request sent by the electrical device, and generating a standard protocol certificate based on the certificate signing request, wherein the certificate signing request is a request generated when the function state of the first device discovery function of the electrical device is a function not enabled state;
[0277] The standard protocol certificate is sent to the electrical device to receive second prompt information returned by the electrical device, where the second prompt information is prompt information indicating that the electrical device has been configured as a device with a connection function of the standard protocol.
[0278] Optionally, when the processor 1601 receives a certificate signing request sent by the electrical device and generates a standard protocol certificate based on the certificate signing request, the processor 1601 specifically performs:
[0279] Receiving a certificate signing request sent by the electrical device, and extracting a first public key of a first key pair generated by the electrical device from the certificate signing request;
[0280] Generate a standard protocol certificate based on the first public key and the device information;
[0281] Obtain a second key pair, and use the second private key in the second key pair to sign the standard protocol certificate.
[0282] Optionally, before executing sending the standard protocol certificate to the electrical device to receive the second prompt information returned by the electrical device, the processor 1601 further executes:
[0283] A key negotiation request sent by the electrical device is received, and a first shared key is negotiated with the electrical device through the key negotiation request.
[0284] Optionally, when the processor 1601 generates the first configuration information identifier based on the device information in response to the second prompt information, the processor 1601 specifically executes:
[0285] In response to the second prompt information, a first configuration information identifier is generated based on the first shared key and the device information.
[0286] In the embodiment of the present application, after the server establishes the third connection with the electrical device, the electrical device is configured as a device with a connection function of a standard protocol according to the device information reported by the electrical device, the second prompt information of the electrical device is received, and a first configuration information identifier is generated, and the second prompt information is converted into the first prompt information and sent to the first terminal, so that the first terminal sends a configuration information query request to the server, and after the server receives the configuration information query request, the first configuration information identifier of the electrical device is sent to the first terminal. There is no need to post configuration information identifiers such as QR codes on the electrical device, so that users do not need to manually enter pairing codes or use the first terminal to scan QR codes, which reduces configuration costs and improves configuration efficiency.
[0287] It should be understood that the device provided in the embodiment of the present application is used to execute the above-mentioned standard protocol configuration method, and thus can achieve the same effect as the above-mentioned implementation method.
[0288] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a computer device, the processing module may be used to control and manage the actions of the computer device. The storage module may be used to support the computer device in executing related program codes, etc.
[0289] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0290] In addition, the device provided in the embodiment of the present application can specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a standard protocol configuration method provided in the above embodiment.
[0291] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a standard protocol configuration method provided by the above-mentioned embodiment.
[0292] This embodiment also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement a standard protocol configuration method provided by the above embodiment.
[0293] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0294] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0295] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, 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, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0296] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A standard protocol configuration method, characterized in that: Applied to a first terminal, the method includes: Sending a configuration information query request carrying a device identifier of an electrical device to a server, wherein the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection is a communication connection established in advance based on a preset protocol, and the configuration information query request is used by the server to obtain a first configuration information identifier of the electrical device under a standard protocol based on the device identifier; Acquire a first configuration information identifier of the electrical device returned by the server, and acquire configuration information of the electrical device based on the first configuration information identifier; A second connection is established with the electrical device based on the configuration information, where the second connection is a communication connection established based on the standard protocol.
2. The method according to claim 1, characterized in that Before sending the configuration information query request carrying the device identification of the electrical device to the server, the method further includes: Establishing a first connection with the electrical device based on a preset protocol; Based on the first connection, obtaining a device identification reported by the electrical device; A registration request is sent to the server based on the device identification, wherein the registration request is used to establish a third connection between the electrical device and the server, so that the electrical device reports device information to the server based on the third connection, wherein the device information includes the device identification.
3. The method according to claim 1, characterized in that Before sending the configuration information query request carrying the device identification of the electrical device to the server, the method further includes: Receive first prompt information sent by the server, where the first prompt information is prompt information sent by the server when configuring the electrical device as a device with a connection function of a standard protocol.
4. The method according to claim 3, characterized in that After obtaining the first configuration information identifier of the electrical device returned by the server, the method further includes: In response to a connection instruction initiated in response to the first prompt information, detecting a functional state of a first device discovery function of the electrical device based on the preset protocol; If the function state is a function-not-enabled state, a first enable instruction is sent to the electrical device to enable the electrical device to enable the first device discovery function.
5. The method according to claim 4, characterized in that The establishing a second connection with the electrical device based on the configuration information includes: Establishing a wireless communication connection with the electrical device based on the first device discovery function; Based on the first shared key in the configuration information, encrypt and receive the standard protocol certificate sent by the electrical device through the wireless communication connection, and verify the standard protocol certificate; If the verification is successful, obtaining network parameters from the configuration information; Encrypting the network parameters based on the first shared key, and sending the encrypted network parameters to the electrical device; A second connection based on a standard protocol is established with the electrical device based on the network parameters.
6. The method according to claim 5, characterized in that After establishing a second connection based on a standard protocol with the electrical device based on the network parameters, the method further includes: Sending a second start instruction to the electrical device based on the second connection, so that the electrical device starts a second device discovery function; Periodically negotiating a second shared key with the electrical device based on a preset time period; Generate a second configuration information identifier based on the second shared key and the configuration information; The second configuration information identifier is sent to the second terminal, so that the second terminal establishes a fourth connection with the electrical device based on the second configuration information identifier and the second device discovery function, wherein the fourth connection is a communication connection established based on the standard protocol.
7. The method according to claim 6, characterized in that After the second configuration information identifier is generated based on the second shared key and the device identifier, the method further includes: Based on the second configuration information identifier and the second device discovery function, a fifth connection is established with the electrical device, and the fifth connection is a communication connection established based on the standard protocol.
8. The method according to claim 4, characterized in that After obtaining the first configuration information identifier of the electrical device returned by the server, the method further includes: The first configuration information identifier is sent to a third terminal, so that the third terminal establishes a sixth connection with the electrical device based on the first configuration information identifier and the first device discovery function, wherein the sixth connection is a communication connection established based on the standard protocol.
9. A standard protocol configuration method, characterized in that: Applied to electrical equipment, the method comprises: Establishing a second connection with the first terminal based on the configuration information; Among them, the configuration information is obtained by the first terminal from the first configuration information identifier, the first configuration information identifier is the configuration information identifier corresponding to the electrical device returned by the server when the first terminal sends a configuration information query request carrying the device identifier of the electrical device to the server, the device identifier is the identifier obtained when the first terminal establishes a first connection with the electrical device, and the first connection is a communication connection established in advance based on a preset protocol.
10. The method according to claim 9, characterized in that Before establishing the second connection with the first terminal based on the configuration information, the method further includes: Establishing a first connection based on a preset protocol with a first terminal; Based on the first connection, reporting a device identification to the first terminal, so that the first terminal sends a registration request to the server based on the device identification; Establishing a third connection with the server based on the registration request, and reporting device information to the server through the third connection, so that the server configures the electrical device as a device with a connection function of a standard protocol based on the device information, wherein the device information includes the device identifier; Sending second prompt information to the server, where the second prompt information is used to enable the server to send first prompt information to the first terminal that the electrical device has been configured as a device with a connection function of a standard protocol; A first start instruction sent by the first terminal is received to start the first device discovery function. The first start instruction is an instruction sent by the first terminal when it detects that the functional state of the first device discovery function of the electrical device is not turned on based on the preset protocol.
11. The method according to claim 10, characterized in that After establishing a third connection with the server based on the registration request and reporting device information to the server through the third connection, the method further includes: Receiving a device update file sent by the server; Updating the first version of the electrical device to a second version based on the device update file, wherein the second version of the electrical device supports the standard protocol; Apply for a standard protocol certificate from the server.
12. The method according to claim 11, characterized in that The applying for a standard protocol certificate from the server includes: generating a first key pair; Creating a certificate signing request using the device identifier and a first public key in the first key pair; Using the first private key in the first key pair to sign the certificate signing request, and sending the signed certificate signing request to the server; Receive and save the standard protocol certificate returned by the server.
13. The method according to claim 11, characterized in that After the first version of the electrical device is updated to the second version based on the device update file, the method further includes: A key negotiation request is sent to the server, and a first shared key is negotiated with the server through the key negotiation request, so that the server generates a first configuration information identifier based on the device information and the first shared key.
14. The method according to claim 13, characterized in that The establishing a second connection with the first terminal based on the configuration information includes: establishing a wireless communication connection with the first terminal based on the first device discovery function; Encrypting the standard protocol certificate by using the first shared key; sending the encrypted standard protocol certificate to the first terminal based on the wireless communication connection, so that the first terminal verifies the standard protocol certificate; If the verification is successful, receiving the network parameters in the configuration information sent by the first terminal, where the network parameters are parameters encrypted by the first terminal using the first shared key in the configuration information; A second connection based on the standard protocol is established with the first terminal based on the network parameters.
15. The method according to claim 14, characterized in that After establishing the second connection based on the standard protocol with the first terminal based on the network parameters, the method further includes: If a second enabling instruction sent by the first terminal is received based on the second connection, enabling a second device discovery function in response to the second enabling instruction; A second shared key is periodically negotiated with the first terminal based on a preset duration, so that the first terminal generates a second configuration information identifier based on the second shared key and the configuration information.
16. A standard protocol configuration method, characterized in that: Applied to a server, the method comprises: receiving a configuration information query request carrying a device identifier of an electrical device sent by a first terminal, wherein the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection is a communication connection established in advance between the first terminal and the electrical device based on a preset protocol, and the configuration information query request is a query request sent to the server when the first terminal establishes the first connection with the electrical device; Based on the configuration information query request, the first configuration information identifier of the electrical device is sent to the first terminal, so that the first terminal obtains the configuration information of the electrical device from the first configuration information identifier, and establishes a second connection with the electrical device based on the configuration information. The second connection is a communication connection established between the first terminal and the electrical device based on the standard protocol.
17. The method according to claim 16, characterized in that Before receiving the configuration information query request carrying the device identification of the electrical device sent by the first terminal, the method further includes: receiving a registration request sent by the first terminal, and establishing a third connection with the electrical device based on the registration request, so as to receive device information reported by the electrical device through the third connection, wherein the device information includes a device identifier; Configuring the electrical device as a device with a connection function of a standard protocol according to the device information; receiving second prompt information sent by the electrical device, where the second prompt information is prompt information that the electrical device has been configured as a device with a connection function of a standard protocol; In response to the second prompt information, generating a first configuration information identifier based on the device information; A first prompt message is sent to the first terminal to prompt the first terminal to establish a second connection with the electrical device, where the second connection is a communication connection based on the standard protocol.
18. The method according to claim 17, characterized in that The step of configuring the electrical device as a device having a connection function of a standard protocol according to the device information includes: Acquire a first version of the electrical device from the device information; If the first version indicates that the electrical device does not support the standard protocol, sending a device update file to the electrical device to update the first version of the electrical device to a second version, and the second version of the electrical device supports the standard protocol; Receiving a certificate signing request sent by the electrical device, and generating a standard protocol certificate based on the certificate signing request, wherein the certificate signing request is a request generated when the function state of the first device discovery function of the electrical device is a function not enabled state; The standard protocol certificate is sent to the electrical device to receive second prompt information returned by the electrical device, where the second prompt information is prompt information indicating that the electrical device has been configured as a device with a connection function of the standard protocol.
19. The method according to claim 18, characterized in that The receiving a certificate signing request sent by the electrical device and generating a standard protocol certificate based on the certificate signing request includes: Receiving a certificate signing request sent by the electrical device, and extracting a first public key of a first key pair generated by the electrical device from the certificate signing request; Generate a standard protocol certificate based on the first public key and the device information; A second key pair is obtained, and the standard protocol certificate is signed using a second private key in the second key pair.
20. The method according to claim 18, characterized in that Before sending the standard protocol certificate to the electrical device to receive the second prompt information returned by the electrical device, the method further includes: A key negotiation request is received from the electrical device, and a first shared key is negotiated with the electrical device through the key negotiation request.
21. The method according to claim 20, characterized in that The step of generating a first configuration information identifier based on the device information in response to the second prompt information includes: In response to the second prompt information, a first configuration information identifier is generated based on the first shared key and the device information.
22. A first terminal, characterized in that: The first terminal includes: a query request sending unit, configured to send a configuration information query request carrying a device identifier of an electrical device to a server, wherein the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection being a communication connection established in advance based on a preset protocol, and the configuration information query request is used by the server to obtain a first configuration information identifier of the electrical device under a standard protocol based on the device identifier; a configuration information acquisition unit, configured to acquire a first configuration information identifier of the electrical device returned by the server, and acquire configuration information of the electrical device based on the first configuration information identifier; The first connection establishing unit is used to establish a second connection with the electrical device based on the configuration information, where the second connection is a communication connection established based on the standard protocol.
23. An electrical device, characterized in that: The electrical equipment includes: A second connection establishing unit, configured to establish a second connection with the first terminal based on the configuration information; Among them, the configuration information is obtained by the first terminal from the first configuration information identifier, the first configuration information identifier is the configuration information identifier corresponding to the electrical device returned by the server when the first terminal sends a configuration information query request carrying the device identifier of the electrical device to the server, the device identifier is the identifier obtained when the first terminal establishes a first connection with the electrical device, and the first connection is a communication connection established in advance based on a preset protocol.
24. A server, characterized in that: The server comprises: a query request receiving unit, configured to receive a configuration information query request carrying a device identifier of an electrical device sent by a first terminal, wherein the device identifier is an identifier obtained when the first terminal establishes a first connection with the electrical device, the first connection is a communication connection established in advance between the first terminal and the electrical device based on a preset protocol, and the configuration information query request is a query request sent to the server when the first terminal establishes the first connection with the electrical device; A configuration information identification sending unit is used to send the first configuration information identification of the electrical device to the first terminal based on the configuration information query request, so that the first terminal obtains the configuration information of the electrical device from the first configuration information identification, and establishes a second connection with the electrical device based on the configuration information, and the second connection is a communication connection established between the first terminal and the electrical device based on the standard protocol.
25. A standard protocol configuration system, characterized in that: The system comprises the first terminal according to any one of claims 1 to 8, the electrical device according to any one of claims 9 to 15, and the server according to any one of claims 16 to 21.
26. A computer device, characterized in that: The computer device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the computer device executes the method according to any one of claims 1 to 21.
27. A computer program product, characterized in that The computer program product comprises: Computer program code, when the computer program code is executed, implements the method according to any one of claims 1 to 21.
28. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program code, and when the computer program code is executed, the method according to any one of claims 1 to 21 is implemented.
Citation Information
Cited By
Standard protocol configuration methods, apparatus, storage medium and device
WO2026129694A1