Network distribution method and device of terminal equipment, storage medium and electronic device

The device component interface generates call instructions and uses the built-in logical interface to distribute terminal devices, which solves the problem of inefficient distribution networks, simplifies the process and improves efficiency and user experience.

CN119254556AInactive Publication Date: 2025-01-03QINGDAO HAIER TECH +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411363409.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The distribution network efficiency of terminal equipment is inefficient. In the prior art, external interfaces need to be called many times, which is complex and difficult to unify, resulting in slow distribution network speed.

Method used

Call instructions are generated through the device component interface, and network distribution operations are performed using the built-in logical interface, reducing the number of calls of external interfaces, integrating and encapsulating the device's built-in interfaces, and simplifying the network distribution process.

Benefits of technology

It improves the distribution network efficiency of terminal equipment, optimizes the distribution network process, reduces development difficulty and time cost, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254556A_ABST
    Figure CN119254556A_ABST
Patent Text Reader

Abstract

The invention discloses a network distribution method and device of terminal equipment, a storage medium and an electronic device, and relates to the technical field of smart home, and the network distribution method of the terminal equipment comprises the steps: responding to a network distribution request initiated by a target object, and calling an equipment component interface indicated by the network distribution request; a calling instruction is generated based on an operation program of the equipment component interface, and the operation program corresponds to a built-in logic interface; and performing network distribution on the terminal equipment according to a calling result generated after the built-in logic interface is called by the calling instruction, and by adopting the technical scheme, the technical problem of low network distribution efficiency of the terminal equipment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and more specifically, to a network configuration method, device, storage medium and electronic device for a terminal device. Background Art

[0002] At present, more and more terminal devices can be connected to the Internet of Things through network configuration operations, thereby improving the operability of terminal devices. In the traditional network configuration process, it is necessary to use the front-end page of the terminal device to call multiple external interfaces multiple times. These external interfaces include, for example, the subscription device change interface, the fast connection device timeout monitoring interface, the fast connection device connection interface, the no-route first binding interface, the acquisition routing information interface, the update routing information interface, and the fast connection device disconnection interface. In each call, the subsequent interface call logic must be processed according to different device states and return values. The call logic is cumbersome and difficult to unify, resulting in low efficiency of device network configuration. For example, in the process of monitoring the connection status of the fast connection device on the front-end details page, calling the no-route first binding interface after the connection is successful, and calling the process of obtaining routing information and updating routing information interfaces after the no-route first binding is successful, it is necessary to successively subscribe to the device change interface, the fast connection device timeout monitoring interface, the fast connection device connection interface, the no-route first binding interface, the acquisition routing information interface, the update routing information interface, etc. to participate in the processing of business logic. This process has many access steps, takes a long time, and the network configuration speed is very low.

[0003] Therefore, in the related art, there is a technical problem of low network distribution efficiency of terminal devices.

[0004] In view of the technical problem of low network distribution efficiency of terminal equipment in related technologies, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present application provide a network configuration method, device, storage medium and electronic device for a terminal device, so as to at least solve the technical problem of low network configuration efficiency of the terminal device in the related art.

[0006] According to an embodiment of the present application, a network configuration method for a terminal device is provided, comprising: in response to a network configuration request initiated by a target object, calling a device component interface indicated by the network configuration request; generating a calling instruction based on an operating procedure of the device component interface, wherein the operating procedure corresponds to a built-in logical interface; and configuring the terminal device according to a calling result generated after calling the built-in logical interface according to the calling instruction.

[0007] In an exemplary embodiment, a call instruction is generated based on the operating procedure of the device component interface, including: when it is determined that the interface type is used to indicate the start of a quick connection of the device, a quick connection operating procedure preset for the interface type of the device component interface is determined; a first call instruction is generated based on the quick connection operating procedure; and the terminal device is configured for networking according to a call result generated after the built-in logical interface is called by the call instruction, including: configuring the terminal device for networking according to a first call result generated after the built-in logical interface is called by the first call instruction.

[0008] In an exemplary embodiment, configuring the terminal device for a network according to the first call result generated after calling the built-in logical interface according to the first call instruction includes: when it is determined that the built-in logical interface is used to monitor the device status, configuring the terminal device for a network according to the device control status indicated by the first call result; configuring the terminal device for a network according to the device control status indicated by the first call result includes: when it is determined that the device control status is uncontrollable, if it is determined that the device status code is used to indicate that the terminal device is bound but not configured for a network, and the terminal device is not currently in the network configuration stage, then configuring the terminal device for a network using the obtained routing information.

[0009] In an exemplary embodiment, before configuring the terminal device according to the device control status indicated by the first call result, the method further includes: when it is determined that the device control status is controllable, if it is determined that the device status code is used to indicate that the terminal device is not connected, then performing a connection operation on the terminal device; when it is determined that the device control status is controllable authentication, if it is determined that the terminal device is not currently in the binding stage, then performing a binding operation on the terminal device.

[0010] In an exemplary embodiment, the method further includes: sending a notification message to the front-end page according to the current device state indicated by the first call result; the sending of a notification message to the front-end page according to the current device state indicated by the first call result includes at least one of the following: when it is determined that the current device state is an online state, sending a first notification message that the terminal device is online to the front-end page; when it is determined that the current device state is an offline state, sending a second notification message that the terminal device is offline to the front-end page; when it is determined that the current device state changes from an online state to an offline state, if it is determined that the Bluetooth switch of the terminal device is turned on and the terminal device has positioning authority, sending a second notification message that the terminal device is offline to the front-end page; when it is determined that the current device state is an online not ready state, sending a third notification message that the terminal device is online not ready to the front-end page; when it is determined that the current device state changes from an online state to an online not ready state, if it is determined that the Bluetooth switch of the terminal device is turned on and the terminal device has positioning authority, sending a third notification message that the terminal device is online not ready to the front-end page.

[0011] In an exemplary embodiment, a call instruction is generated based on the operating procedure of the device component interface, including: when it is determined that the interface type is used to indicate stopping device quick connection, determining a disconnection operating procedure preset for the interface type of the device component interface; generating a second call instruction based on the disconnection operating procedure; the method also includes: when the built-in logical interface is used to stop monitoring device status, disconnecting the device connection interface of the terminal device according to a second call result generated after calling the built-in logical interface according to the second call instruction.

[0012] In an exemplary embodiment, a call instruction is generated based on the operating procedure of the device component interface, including: when it is determined that the interface type is used to indicate a quick connection of a restarted device, determining a restart operation preset for the interface type of the device component interface; generating a third call instruction based on the restart operation; and when it is determined that the device status of the terminal device is a binding failure, calling the built-in logical interface according to the third call instruction to rebind the terminal device; when it is determined that the device status of the terminal device is a network configuration failure, calling the built-in logical interface according to the third call instruction to reconfigure the terminal device.

[0013] According to another aspect of an embodiment of the present application, a network configuration device for a terminal device is also provided, including: a calling module, used to call the device component interface indicated by the network configuration request in response to a network configuration request initiated by a target object; a generating module, used to generate a calling instruction based on an operating procedure of the device component interface, wherein the operating procedure corresponds to a built-in logical interface; and a network configuration module, used to configure the terminal device according to a calling result generated after calling the built-in logical interface by the calling instruction.

[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the network configuration method of the terminal device when running.

[0015] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the network configuration method of the terminal device through the computer program.

[0016] In an embodiment of the present application, in response to a network configuration request initiated by a target object, the device component interface indicated by the network configuration request is called; a call instruction is generated based on the operating procedure of the device component interface, wherein the operating procedure corresponds to a built-in logical interface; the terminal device is configured for network configuration according to the call result generated after the built-in logical interface is called according to the call instruction; that is, by reducing the number of external interfaces that can be called by the front-end page, for example, the interfaces that need to access the built-in interface of the device, such as the external control interface exposed to the outside, are integrated and packaged, thereby reducing the difficulty of using the external interface for network configuration, improving the efficiency of device access and network configuration, thereby optimizing the network configuration process and improving the user experience. The above technical solution solves the technical problem of low network configuration efficiency of terminal devices, thereby improving the network configuration efficiency of terminal devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

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

[0019] Figure 1 It is a hardware environment diagram of a network configuration method for a terminal device in an embodiment of the present application;

[0020] Figure 2 is a flow chart of a network configuration method for a terminal device according to an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of network configuration based on a device component interface according to an embodiment of the present application;

[0022] Figure 4 1 is a timing diagram of a network distribution process according to an embodiment of the present application (I);

[0023] Figure 5 2 is a timing diagram of a network distribution process according to an embodiment of the present application;

[0024] Figure 6 3 is a timing diagram of a network distribution process according to an embodiment of the present application;

[0025] Figure 7 4 is a timing diagram of a network distribution process according to an embodiment of the present application;

[0026] Figure 8 5 is a timing diagram of a network distribution process according to an embodiment of the present application;

[0027] Fig. 9 6 is a timing diagram of a network distribution process according to an embodiment of the present application;

[0028] Fig.10 7 is a timing diagram of a network distribution process according to an embodiment of the present application;

[0029] Fig.11 8 is a timing diagram of a network distribution process according to an embodiment of the present application;

[0030] Fig.12 is a schematic diagram of stopping quick connection according to an embodiment of the present application;

[0031] Fig.13 is a restart schematic diagram according to an embodiment of the present application;

[0032] Fig.14 It is a structural block diagram of a network distribution device of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION

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

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] According to one aspect of an embodiment of the present application, a network configuration method for a terminal device is provided. The network configuration method for the terminal device is widely used in smart home, smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the network configuration method for the terminal device can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0036] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0037] In this embodiment, a network configuration method for a terminal device is provided, which is applied to the above-mentioned terminal device. Figure 2 : is a flow chart of a network configuration method for a terminal device according to an embodiment of the present application, the flow includes the following steps:

[0038] Step S202, in response to a network configuration request initiated by the target object, calling a device component interface indicated by the network configuration request;

[0039] The response to the network configuration request initiated by the target object may be, for example, a response to the network configuration request initiated by the target object based on a front-end page of the terminal device.

[0040] Step S204, generating a call instruction based on the operation program of the device component interface, wherein the operation program corresponds to a built-in logic interface;

[0041] Exemplarily, for example, the interface type may include a type indicating starting a device quick connect (corresponding to the interface "startQCBind"), a type indicating stopping a device quick connect (corresponding to the interface "stopQCBin d"), or a type indicating restarting a device quick connect (corresponding to the interface "retryQCBind").

[0042] Step S206: network configuration is performed on the terminal device according to the calling result generated after the calling instruction calls the built-in logical interface.

[0043] Through the above steps, in response to the network configuration request initiated by the target object, the device component interface indicated by the network configuration request is called; a call instruction is generated based on the operating program of the device component interface, wherein the operating program corresponds to a built-in logical interface; the terminal device is configured for network configuration according to the call result generated after the built-in logical interface is called according to the call instruction; that is, by reducing the number of external interfaces that can be called by the front-end page, for example, the external control interface that is exposed to the outside and other interfaces that need to access the built-in interface of the device are integrated and packaged, the difficulty of using the external interface for network configuration is reduced, the efficiency of device access and network configuration is improved, thereby optimizing the network configuration process and improving the user experience. The above technical solution solves the technical problem of low network configuration efficiency of terminal devices, thereby improving the network configuration efficiency of terminal devices.

[0044] As more and more devices have network distribution requirements, if the original network distribution method is still used, it will face huge development difficulties and expensive time costs. Therefore, in this application, multiple built-in logic interfaces are integrated into one component, and the component interface is used to interact with the front-end page. The access logic of the device can be unified, which not only provides a new interface access method, but also improves the network distribution efficiency of the device, thereby reducing the pressure of network distribution.

[0045] In an exemplary embodiment, for the implementation process of generating a call instruction based on the operation program of the device component interface, the specific steps include: when determining that the interface type is used to indicate the start of a quick connection of the device, determining a quick connection operation program preset for the interface type of the device component interface; generating a first call instruction based on the quick connection operation program; and configuring the terminal device according to the call result generated after the call instruction calls the built-in logical interface, including: configuring the terminal device according to the first call result generated after the first call instruction calls the built-in logical interface. The integrated component of this embodiment can call other built-in logical interfaces through a call instruction to achieve a quick start connection, reducing the code workload of background personnel.

[0046] In an exemplary embodiment, it is further proposed to implement the process of configuring the network for the terminal device according to the first call result generated after calling the built-in logical interface by the first call instruction, specifically including: in the case where it is determined that the built-in logical interface is used to monitor the device status, configuring the network for the terminal device according to the device control status indicated by the first call result; configuring the network for the terminal device according to the device control status indicated by the first call result, including: in the case where it is determined that the device control status is uncontrollable, if it is determined that the device status code is used to indicate that the terminal device is bound but not configured, and the terminal device is not currently in the network configuration stage, then configuring the network for the terminal device using the routing information that has been obtained. This embodiment can configure the network for the bound but not configured terminal device in the uncontrollable state of the device, improve the accuracy of the device configuration, and reduce the proportion of the bound but not configured terminal devices in all terminal devices.

[0047] In an exemplary embodiment, before configuring the terminal device according to the device control status indicated by the first call result, if it is determined that the device control status is controllable, if it is determined that the device status code indicates that the terminal device is not connected, then a connection operation is performed on the terminal device; if it is determined that the device control status is controllable authentication, if it is determined that the terminal device is not currently in the binding stage, then a binding operation is performed on the terminal device.

[0048] In an exemplary embodiment, further, a notification message can be sent to the front-end page according to the current device state indicated by the first call result; the technical solution for sending a notification message to the front-end page according to the current device state indicated by the first call result includes at least one of the following: when it is determined that the current device state is an online state, a first notification message that the terminal device is online is sent to the front-end page; when it is determined that the current device state is an offline state, a second notification message that the terminal device is offline is sent to the front-end page; when it is determined that the current device state changes from an online state to an offline state, if it is determined that the Bluetooth switch of the terminal device is turned on and the terminal device has positioning authority, a second notification message that the terminal device is offline is sent to the front-end page; when it is determined that the current device state is an online and not ready state, a third notification message that the terminal device is online and not ready is sent to the front-end page; when it is determined that the current device state changes from an online state to an online and not ready state, if it is determined that the Bluetooth switch of the terminal device is turned on and the terminal device has positioning authority, a third notification message that the terminal device is online and not ready is sent to the front-end page. This embodiment can send different notification messages according to different call results to remind customers in real time, so that customers can understand the device status of the device.

[0049] In an exemplary embodiment, an implementation scheme for generating a call instruction based on the operation procedure of the device component interface is further proposed, and the specific steps include: when it is determined that the interface type is used to indicate stopping the device quick connection, determining the disconnection operation procedure preset for the interface type of the device component interface; generating a second call instruction based on the disconnection operation procedure; the method also includes: when the built-in logical interface is used to stop monitoring the device status, disconnecting the device connection interface of the terminal device according to a second call result generated after calling the built-in logical interface according to the second call instruction.

[0050] It can be understood that for the device API of the terminal device where both the built-in logical interface and the device connection interface belong, based on this embodiment, the device connection interface can be called through the built-in logical interface, eliminating the step of calling the device connection interface separately, thereby improving the interface calling efficiency.

[0051] In an exemplary embodiment, other implementation processes for generating call instructions based on the operating procedures of the device component interface are also proposed: when it is determined that the interface type is used to indicate a quick connection of a restarted device, a restart operation preset for the interface type of the device component interface is determined; a third call instruction is generated based on the restart operation; and, when it is determined that the device status of the terminal device is a binding failure, the built-in logical interface is called according to the third call instruction to rebind the terminal device; when it is determined that the device status of the terminal device is a network configuration failure, the built-in logical interface is called according to the third call instruction to reconfigure the terminal device.

[0052] Optionally, in this embodiment, if the current state is a binding failure, the retry binding phase is entered, and the quick connection device no routing first binding operation is restarted. If the current state is a network configuration failure, the retry network configuration phase is entered, and the operations of obtaining routing information and updating routing information are restarted.

[0053] In order to better understand the process of the network configuration method of the above-mentioned terminal device, the implementation method flow of the network configuration of the above-mentioned terminal device is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.

[0054] In this embodiment, a network configuration method for a terminal device is provided. Figure 3 Schematic diagram of network configuration based on device component interface according to an embodiment of the present application. In this embodiment, the registered device status changes inside the component can be monitored, and the corresponding logic can be called back and executed according to the device status changes. Figure 3 As shown, the specific process of calling the startQCBind interface is as follows.

[0055] First, steps 1-6 provide a process for invoking the start quick connect interface using the Uplusapi interface (equivalent to the above-mentioned device component interface).

[0056] Step 1: Call the quick connect interface startQCBind(deviceld). The interface description of startQCBind is: start the quick connect process, and perform operations such as connection, binding, and network configuration according to the device status.

[0057] Step 2: troubleshoot the general logic of uplusapi.

[0058] Step 3: If the general troubleshooting fails, return the general troubleshooting error.

[0059] Step 4: Call the quick connect binding interface startQCBind(deviceid).

[0060] Step 5: Return the result of calling the start interface.

[0061] Step 6: Return the result of calling the star interface.

[0062] Then execute step 7, and execute downward (call loT addDeviceChangeListener interface) qcBindState=startQCBind.

[0063] Step 8, determine whether it is a quick connection.

[0064] Step 9, it(qcBindStatel=isNotQcBind)qcBindsta=isNotQCBind return.

[0065] Step 10, onlineStateV2==offline; onlineStateV2==online, not ready.

[0066] When the device becomes online but not ready, the component calls back the device online but not ready notification to the detail page.

[0067] When the device changes from online to offline or online not ready, if the Bluetooth switch is turned on and the location permission is granted, the notification of the device changing to offline or online not ready at the corresponding stage will be called back to the details page according to the different stages of the component. The details page will perform corresponding prompt operations as needed.

[0068] When the device becomes online, the component calls back the device online notification to the detail page.

[0069] Step 11, if (gcBindState=isNotaCBind) qcBindsta=isNotQCBind.

[0070] Among them, Figure 3 and Figure 4 As shown, step 9 and step 11 can be implemented as "controlState==null llcontrolState=,"l controlState="none"&&faultinformationStateCode!=1004".

[0071] When the device control state (controlState) becomes uncontrollable (NONE), and the device status code is 1004 (indicating that it has been bound but not configured), and it is not currently in the network configuration stage, the component enters the network configuration stage and starts to obtain and update routing information.

[0072] Further, such as Figure 5 As shown, "Bluetooth switch is not turned on, fixed pull permission is not authorized (Android), Bluetooth permission is not authorized (iOS, Andrdjd12 and above) && qcBindState l = qcconnect" can be achieved.

[0073] Step 12, such as Figure 6 As shown, corresponding to “qcBindState=(bindDeciceWithoutWiFI"||"bindDeviceWithoutWiFiSuccess"||bindDeciceWithoutWiFiFail”)”, the status code can be called back.

[0074] Step 13, such as Figure 6 As shown, corresponding to "qcBindState="getConfigRouterinfoFiFail")", callback status code.

[0075] Step 14: Figure 6 As shown, corresponding to "qcBindState = ("getConfigRouterinfoSuccess" || "updateConfigRouterSSID")", the callback status code.

[0076] Step 15, such as Figure 6 As shown, corresponding to other, callback status codes.

[0077] In summary, if Figure 6 As shown, steps 12 to 15 may implement "qcBindState = "qcConnect" || qcCinnect Success" || "qcConnectFail")".

[0078] Step 16, onlineStateV2-=online and ready.

[0079] Step 17: Call back the status code.

[0080] Step 18, controlState=="controllable"&&qcBindState! ="qcConnect"&&qcBindState! "qcConnectSuccess"&&qcBindState! ="gcConnectfail)".

[0081] When the device control state (controlState) becomes controllable (CONTROLLABLE) and is not currently in the connecting stage, the component enters the connecting stage and starts the quick connect device connection operation.

[0082] Step 19, call the qCConnect interface, qcBindState = "qcConnect".

[0083] Step 20: callback status code.

[0084] like Figure 7 As shown, for "QCConnect successful", steps 21-24 are included.

[0085] Step 21: callback status code.

[0086] Step 22, qcBindState = "qcConnectSuccess".

[0087] Step 23: callback status code.

[0088] Step 24, qcBindState = "qcConnectSuccess".

[0089] Step 25, qcBindState=="bindDeviceWithoutWifiRetry" ||controlState==controllableAndAuth" &&gcBindState !=("bindDeviceWithoutWiFiSuccess&&bindDevceWithoutWiFiuFail.

[0090] Step 26, call the bindDeviceWithoutWiFi interface, qcBindState = "bindDeviceWithoutWiFi.

[0091] When the device control state (controlState) becomes controllable authentication (CONTROLLABLE_AND_AUTHORIZED) and is not currently in the binding stage, the component enters the binding stage and starts the quick-connect device without routing binding operation.

[0092] like Figure 8 As shown, for "whether bindDevicewithoutWIFI is successful", steps 28-31 and step Retry-8 are included. Fig. 9 As shown, for "error code -16001", steps 30-31 and step Retry-8 are included, isDuplicateBind = true is cached, and qcBindState = "bindDeviceWithoutWiFi".

[0093] Step 27: callback status code.

[0094] Step 28: callback status code.

[0095] Step 29, qcBindState = "bindDeviceWithoutWiFiSuccess".

[0096] Step 30: callback status code.

[0097] Step 31, cache isDuplicateBind = false, qcBindState = "bindDeviceWithoutWiFiFail".

[0098] Step 32, USDK reports TypeID and Model.

[0099] Among them, when USDK reports typeId and Model, the component will call back the notification of USDK reporting typeId and Model to the details page, and the details page can use the callback typeId to request device information.

[0100] Step 33, callback status code and object.

[0101] Step 34, callback status code and object.

[0102] Step 35, qcBindState=="updnleConigPouterSSiDRetry"||controlState=="none"&&faulinormationStateCode==1004&&qcBindState! =("getConfigrouterInfo&&getConfigRouterINFOSuccess&&getConfiggRouterInfoFaiL&&oupdateConfigRouterSSiD&&updaloConfgRouterSSIDSuccess&&updateCantigRouterSSIDFaiL").

[0103] Step 36, call the getConfgiRouterinfo interface, qcBindState = "getConfigRouterinfo".

[0104] Step 37, callback status code.

[0105] like Fig.10As shown, for "getConfigRouterinfo interface successfully obtains WIFI information", steps 38-47 are included.

[0106] Step 38: callback status code.

[0107] Step 39, qcBindState = "getConfigRouterinfoSuccess".

[0108] Step 40, call the updateConfigRouterSSID interface, qcBindState = "updateConligRouteSSID".

[0109] Step 41, callback status code.

[0110] like Fig.11 As shown, for “updateConfigRouterSSID success”, steps 42 to 45 are included.

[0111] Step 42, callback status code.

[0112] Step 43, qcBindState = "updateConfigRouterSSIDSuccess".

[0113] Step 44, callback status code.

[0114] Step 45, qcBindState = "updateConfigRouterSSIDFail".

[0115] Step 46, callback status code.

[0116] Step 47, qcBindState = "getConfigRouterInfoFail".

[0117] When the binding is successful, if it is not currently in the network configuration stage, the component enters the network configuration stage and starts to obtain and update routing information.

[0118] When starting to connect, connecting successfully, connecting with timeout or failure, starting to bind, binding successfully, binding failed, starting to obtain router information, obtaining router information successfully, obtaining routing information failed, starting to update router information, updating router information successfully, and updating routing information failed, the component will callback the corresponding notification to the details page, and the details page will perform corresponding prompt operations as needed.

[0119] In one embodiment, the device disconnection interface can be called according to the device status change, and the device status change monitoring can be removed. Fig.12 As shown in the figure, the specific process of calling the stopQCBind interface is as follows. The stopQCBind interface description is: when an abnormal situation occurs, the quick connection process is actively stopped. Or when exiting the page, the quick connection process is actively stopped.

[0120] Step 1: When exiting the details page, call stopQCBind().

[0121] Step 2: troubleshoot the general logic of uplusapi.

[0122] Step 3: If the general troubleshooting fails, return the general troubleshooting error.

[0123] Step 4, call stopOCBind().

[0124] Step 5, qcBindState = "stopQCBind".

[0125] When the device becomes offline, the component calls back the device offline notification to the details page.

[0126] Step 6: Call the qcDisconnect interface to remove the addDeviceChangeListener listener.

[0127] In one embodiment, the binding and network configuration can be retried when the overall process is paused. Fig.13 As shown in the figure, the specific process of calling the retryQCBind interface is as follows. The retryQCBind interface description is: when the quick connection binding, network configuration and other stages fail to execute, causing the process to be suspended, retry the binding and network configuration.

[0128] Step 1: When the retry button is clicked, retryQCBind() is called.

[0129] Step 2: troubleshoot the general logic of uplusapi.

[0130] Step 3: If the general troubleshooting fails, return the general troubleshooting error.

[0131] Step 4, call retryQCBind().

[0132] Step 5, gcBindState == "bindDeviceWithoutWiFiFail".

[0133] 1.qcBindState="bindDeviceWithoutWiFiRetry".

[0134] 2. Retry binding.

[0135] Step 6, qcBindState--"updateConfigRouterSSlDFail".

[0136] 1.qcBindState="updateConfigRouterSSlDRetry.

[0137] 2. Retry binding.

[0138] Furthermore, you can also execute Figure 3 The following steps are shown:

[0139] Step Retry-7.qcBindState."updateConfigRonerSS!DSuccess*return.

[0140] Step Retry-8. Cache isDuplicateBind = true, qcBindState = "bindDeviceWithoutWiFi".

[0141] Step Retry-9.controiState=='none'&&&&faultinformationStateCode==1004&&isDuplicateBind==true.

[0142] Step Retry-10. Cache isDuplicateBind = false.

[0143] Step Retry-11.onlineStateV2 = Offline.

[0144] Step Retry-12.onineStatev2--Online not ready.

[0145] Step Retry-13. Callback status code.

[0146] If the current state is binding failure, it will enter the retry binding phase and restart the quick connect device without router first binding operation.

[0147] If the current state is network configuration failure, the network configuration retry phase will be entered, and the operations of obtaining routing information and updating routing information will be restarted.

[0148] If the current state is not binding failure or network configuration failure, no processing will be performed.

[0149] Through the above steps, the functions that originally required multiple interfaces are realized by using the three external interfaces of startQCBind, stopQCBind, and retryQCBind, which simplifies the interface access process of the device and improves the efficiency of device network configuration.

[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0151] Fig.14 is a structural block diagram of a network distribution device for a terminal device according to an embodiment of the present application; Fig.14 As shown, including:

[0152] A calling module 1402 is used to call the device component interface indicated by the network configuration request in response to the network configuration request initiated by the target object;

[0153] A generating module 1404, configured to generate a call instruction based on an operating program of the device component interface, wherein the operating program corresponds to a built-in logical interface;

[0154] The network configuration module 1406 is used to configure the network of the terminal device according to the calling result generated after the calling instruction calls the built-in logical interface.

[0155] Through the above-mentioned device, in response to the network configuration request initiated by the target object, the device component interface indicated by the network configuration request is called; a call instruction is generated based on the operating program of the device component interface, wherein the operating program corresponds to a built-in logical interface; the terminal device is configured for network configuration according to the call result generated after the built-in logical interface is called by the call instruction; that is, by reducing the number of external interfaces that can be called by the front-end page, for example, the external control interface that is exposed to the outside and other interfaces that need to access the built-in interface of the device are integrated and packaged, the difficulty of using the external interface for network configuration is reduced, the efficiency of device access and network configuration is improved, thereby optimizing the network configuration process and improving the user experience. The above-mentioned technical solution solves the technical problem of low network configuration efficiency of terminal devices, thereby improving the network configuration efficiency of terminal devices.

[0156] In an exemplary embodiment, the generation module 1404 is also used to: when it is determined that the interface type is used to indicate the initiation of a quick connection of the device, determine a quick connection operation procedure preset for the interface type of the device component interface; generate a first call instruction based on the quick connection operation procedure; and configure the terminal device for a network according to a call result generated after the built-in logical interface is called by the call instruction, including: configuring the terminal device for a network according to a first call result generated after the built-in logical interface is called by the first call instruction.

[0157] In an exemplary embodiment, the generation module 1404 is also used to: when it is determined that the built-in logical interface is used to monitor the device status, configure the terminal device for a network according to the device control status indicated by the first call result; configure the terminal device for a network according to the device control status indicated by the first call result, including: when it is determined that the device control status is uncontrollable, if it is determined that the device status code is used to indicate that the terminal device is bound but not configured, and the terminal device is not currently in the network configuration stage, then configure the terminal device for a network using the routing information that has been obtained.

[0158] In an exemplary embodiment, the generation module 1404 is also used to: before configuring the terminal device according to the device control status indicated by the first call result, if it is determined that the device status code indicates that the terminal device is not connected, then connect the terminal device; if it is determined that the device control status is controllable, then perform a binding operation on the terminal device if it is determined that the terminal device is not currently in the binding stage.

[0159] In an exemplary embodiment, further, the generation module 1404 is also used to: send a notification message to the front-end page according to the current device state indicated by the first call result; the technical solution for sending a notification message to the front-end page according to the current device state indicated by the first call result includes at least one of the following: when it is determined that the current device state is an online state, send a first notification message that the terminal device is online to the front-end page; when it is determined that the current device state is an offline state, send a second notification message that the terminal device is offline to the front-end page; when it is determined that the current device state changes from an online state to an offline state, if it is determined that the Bluetooth switch of the terminal device is turned on and the terminal device has positioning authority, send a second notification message that the terminal device is offline to the front-end page; when it is determined that the current device state is an online not ready state, send a third notification message that the terminal device is online not ready to the front-end page; when it is determined that the current device state changes from an online state to an online not ready state, if it is determined that the Bluetooth switch of the terminal device is turned on and the terminal device has positioning authority, send a third notification message that the terminal device is online not ready to the front-end page.

[0160] In an exemplary embodiment, the generation module 1404 is also used to: when it is determined that the interface type is used to indicate stopping device quick connection, determine the disconnection operation procedure preset for the interface type of the device component interface; generate a second call instruction based on the disconnection operation procedure; the method also includes: when the built-in logical interface is used to stop monitoring the device status, disconnect the device connection interface of the terminal device according to a second call result generated after calling the built-in logical interface according to the second call instruction.

[0161] In an exemplary embodiment, the generation module 1404 is also used to: when it is determined that the interface type is used to indicate a quick connection of the restarted device, determine a restart operation preset for the interface type of the device component interface; generate a third call instruction based on the restart operation; and, when it is determined that the device status of the terminal device is a binding failure, call the built-in logical interface according to the third call instruction to rebind the terminal device; when it is determined that the device status of the terminal device is a network configuration failure, call the built-in logical interface according to the third call instruction to reconfigure the terminal device.

[0162] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0163] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0164] S1, in response to a network configuration request initiated by a target object, calling a device component interface indicated by the network configuration request;

[0165] S2, generating a call instruction based on an operation program of the device component interface, wherein the operation program corresponds to a built-in logic interface;

[0166] S3, configuring the network for the terminal device according to the calling result generated after the calling instruction calls the built-in logical interface.

[0167] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0168] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0169] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0170] S1, in response to a network configuration request initiated by a target object, calling a device component interface indicated by the network configuration request;

[0171] S2, generating a call instruction based on an operation program of the device component interface, wherein the operation program corresponds to a built-in logic interface;

[0172] S3, configuring the network for the terminal device according to the calling result generated after the calling instruction calls the built-in logical interface.

[0173] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0174] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0175] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0176] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A network configuration method for a terminal device, characterized in that: include: In response to a network configuration request initiated by a target object, calling a device component interface indicated by the network configuration request; Generate a call instruction based on an operating program of the device component interface, wherein the operating program corresponds to a built-in logical interface; The terminal device is configured for network configuration according to the calling result generated after the calling instruction calls the built-in logical interface.

2. The network configuration method for terminal equipment according to claim 1, characterized in that: The operation program based on the device component interface generates a call instruction, including: In the case where it is determined that the interface type of the device component interface is used to indicate the initiation of a device quick connect, determining a quick connect operation procedure preset for the interface type; Generate a first call instruction based on the quick connect operation program; The terminal device is configured with a network according to a call result generated after the call instruction calls the built-in logical interface, including: The terminal device is configured for network configuration according to a first calling result generated after the built-in logical interface is called by the first calling instruction.

3. The network configuration method for terminal equipment according to claim 2, characterized in that: Performing network configuration on the terminal device according to a first calling result generated after the built-in logical interface is called by the first calling instruction includes: In the case where it is determined that the built-in logical interface is used to monitor the device status, configuring the terminal device according to the device control status indicated by the first call result; Performing network configuration on the terminal device according to the device control state indicated by the first calling result includes: When it is determined that the device control state is uncontrollable, if it is determined that the device status code is used to indicate that the terminal device has been bound but not configured, and the terminal device is not currently in the configuration stage, the terminal device is configured using the obtained routing information.

4. The network configuration method for terminal equipment according to claim 3, characterized in that: Before performing network configuration on the terminal device according to the device control state indicated by the first call result, the method further includes: In the case where it is determined that the device control state is controllable, if it is determined that the device state code is used to indicate that the terminal device is not connected, performing a connection operation on the terminal device; In the case where it is determined that the device control state is controllable authentication, if it is determined that the terminal device is not currently in the binding stage, a binding operation is performed on the terminal device.

5. The network configuration method for terminal equipment according to claim 3, characterized in that: The method further includes: sending a notification message to a front-end page of the terminal device according to the current device state indicated by the first call result; The sending of a notification message to the front-end page according to the current device state indicated by the first call result includes at least one of the following: When it is determined that the current device state is an online state, sending a first notification message that the terminal device is online to the front-end page; When it is determined that the current device state is an offline state, sending a second notification message that the terminal device is offline to the front-end page; In the case where it is determined that the current device state has changed from an online state to an offline state, if it is determined that the Bluetooth switch of the terminal device is turned on and the terminal device has positioning authority, a second notification message that the terminal device is offline is sent to the front-end page; When it is determined that the current device state is an online not ready state, sending a third notification message indicating that the terminal device is online not ready to the front-end page; When it is determined that the current device state has changed from an online state to an online not ready state, if it is determined that the Bluetooth switch of the terminal device is turned on and the terminal device has positioning authority, a third notification message that the terminal device is online not ready is sent to the front-end page.

6. The network configuration method for terminal equipment according to claim 1, characterized in that: The operation program based on the device component interface generates a call instruction, including: In the case where it is determined that the interface type of the device component interface is used to indicate stopping a device quick connect, determining a disconnection operation procedure preset for the interface type; generating a second call instruction based on the disconnection operation procedure; The method further comprises: In a case where the built-in logical interface is used to stop monitoring the device status, the device connection interface of the terminal device is disconnected according to a second calling result generated after the built-in logical interface is called according to the second calling instruction.

7. The network configuration method for terminal equipment according to claim 1, characterized in that: The operation program based on the device component interface generates a call instruction, including: In a case where it is determined that the interface type of the device component interface is used to indicate restarting a device quick connect, determining a restart operation preset for the interface type of the device component interface; Generate a third call instruction based on the restart operation; And, in the case where it is determined that the device state of the terminal device is a binding failure, calling the built-in logical interface according to the third calling instruction to re-bind the terminal device; When it is determined that the device state of the terminal device is network configuration failure, the built-in logical interface is called according to the third calling instruction to re-configure the network for the terminal device.

8. A network distribution device for a terminal device, characterized in that: include: A calling module, configured to respond to a network configuration request initiated by a target object and call a device component interface indicated by the network configuration request; A generating module, configured to generate a calling instruction based on an operating program of the device component interface, wherein the operating program corresponds to a built-in logical interface; The network configuration module is used to configure the network of the terminal device according to the calling result generated after the calling instruction calls the built-in logical interface.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Distribution network multi-theme application interface integrating method based on dynamic configuration technology

    CN104133675A

  • Adaptation mode method and system for business logic implementation

    CN104572087A

  • Network distribution method and related equipment and device

    CN111740885A

  • Internet of things access method and system, terminal and computer readable storage medium

    CN112565029A