Equipment networking methods, devices, systems, equipment and media

By generating and comparing hash values ​​in a distributed soft bus, the problem of screenless devices being unable to form a network is solved, enabling screenless devices to form a network and improving the applicability and efficiency of device networking.

CN116600367BActive Publication Date: 2026-05-26深圳开鸿数字产业发展有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
深圳开鸿数字产业发展有限公司
Filing Date
2023-04-28
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Screenless devices cannot perform network authentication during the networking process, which limits the applicability of the devices in networking.

Method used

By obtaining device information when discovering the second device to be networked based on a distributed soft bus, generating and comparing hash values ​​to confirm successful network formation, the need for a network interface for screenless devices is avoided.

Benefits of technology

It enables networking of screenless devices, improves the applicability of device networking, simplifies the networking process, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116600367B_ABST
    Figure CN116600367B_ABST
Patent Text Reader

Abstract

This application relates to the field of communication technology, specifically providing a device networking method applied to a first device. The device networking method includes: upon discovering a second device to be networked based on a distributed soft bus, obtaining the device information of the second device; obtaining a preset identification code, and generating a first hash value based on the preset identification code and the device information; initiating network formation to the second device, so that the second device generates a second hash value based on its device information and the preset identification code; obtaining the second hash value sent by the second device, and determining whether the first hash value and the second hash value are the same; and confirming successful network formation when the first hash value and the second hash value are the same. This method addresses the difficulty of networking screenless devices, thereby improving the applicability of device networking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a device networking method, apparatus, system, equipment, and medium. Background Technology

[0002] With the rapid development of IoT technology, an increasing number of smart devices are able to connect reliably to each other. People can not only control smartphones and computers to network with each other, but also network smartphones, computers, sensors, smart furniture, and industrial equipment. During this connection process, users need to enter a verification code on both smart devices for network authentication. Once authentication is successful, a network connection is established. However, screenless devices cannot perform network authentication, limiting their applicability. Therefore, improving the applicability of device networking has become a pressing issue. Summary of the Invention

[0003] This application provides a device networking method, apparatus, system, equipment, and medium to solve the problem of difficult networking of screenless devices, thereby improving the applicability of device networking.

[0004] In a first aspect, embodiments of this application provide a device networking method, applied to a first device, the device networking method comprising:

[0005] When discovering the second device to be networked based on the distributed soft bus, the device information of the second device is obtained;

[0006] Obtain a preset identification code, and generate a first hash value based on the preset identification code and the device information;

[0007] Initiate a network connection to the second device, so that the second device generates a second hash value based on the device information and a preset identification code of the second device;

[0008] Obtain the second hash value sent by the second device, and determine whether the first hash value and the second hash value are the same;

[0009] If the first hash value and the second hash value are the same, the network formation is confirmed to be successful.

[0010] In some embodiments, initiating network formation to the second device includes:

[0011] The device information of the second device is obtained through short-range wireless communication.

[0012] If the device information obtained twice is consistent, then network formation is initiated to the second device.

[0013] In some embodiments, the first device is used to generate a networking interface, and obtaining the preset identification code includes:

[0014] Based on the network interface, obtain the user's input operation commands;

[0015] The acquisition method corresponding to the preset identification code is determined according to the operation instruction, and the acquisition method includes a first acquisition method and a second acquisition method;

[0016] The preset identification code is obtained based on the determined acquisition method corresponding to the preset identification code.

[0017] In some embodiments, obtaining the preset identification code based on the determined acquisition method corresponding to the preset identification code includes:

[0018] Based on the first acquisition method, the device information is sent to the cloud server so that the cloud server can query the database that stores the device information and corresponding preset identification codes of each device. If the device information is found in the database, the preset identification code corresponding to the device information is returned to the first device and the second device.

[0019] Obtain the preset identification code returned by the cloud server.

[0020] In some embodiments, obtaining the preset identification code based on the determined acquisition method corresponding to the preset identification code includes:

[0021] Based on the second acquisition method, an input window for the preset identification code is generated on the networking interface;

[0022] Based on the input window, obtain the preset identification code entered by the user.

[0023] In some embodiments, the first device is used to generate a networking interface, and after confirming successful networking, the device networking method further includes:

[0024] Once the network formation is confirmed to be successful, a network formation log is generated and saved. The network formation log includes notification information generated during the networking process of the first device and the second device.

[0025] The network log is displayed on the network interface;

[0026] And display the device information of the second device that has successfully formed a network on the network interface.

[0027] In some embodiments, the device networking method further includes:

[0028] After disconnecting from the second device that has successfully formed a network, a network request message is sent to the disconnected second device according to the network log, so that the disconnected second device can reply with network permission information;

[0029] Receive the network permission information, and reconnect with the second device that was disconnected from the network based on the network permission information.

[0030] In some embodiments, the device networking method includes:

[0031] When a preset application is running on a terminal device, a type confirmation window is output through the terminal device.

[0032] Based on the type confirmation window, obtain the type confirmation instruction input by the user;

[0033] The terminal device is set to either the first device or the second device according to the type confirmation instruction.

[0034] Secondly, embodiments of this application provide a device networking apparatus, which includes: a device discovery module, a network initiation module, a data processing module, a data acquisition module, and a network completion confirmation module;

[0035] The device discovery module is used to obtain the device information of the second device when discovering the second device to be networked based on the distributed soft bus;

[0036] The network initiation module is used to initiate a network connection to the second device;

[0037] The data processing module is used to obtain a preset identification code and generate a first hash value based on the preset identification code and the device information;

[0038] The data acquisition module is used to acquire the second hash value sent by the second device, the second hash value being generated by the second device based on the device information and the preset identification code;

[0039] The network formation confirmation module is used to confirm successful network formation when the first hash value and the second hash value are the same.

[0040] Thirdly, embodiments of this application provide a computer device, characterized in that the computer device includes a memory and a processor;

[0041] The memory is used to store computer programs;

[0042] The processor is configured to execute the computer program and, in executing the computer program, implement the steps of any of the device networking methods provided in the embodiments of this application.

[0043] Fourthly, embodiments of this application provide a device networking system for correspondingly executing the steps of any of the device networking methods provided in the embodiments of this application.

[0044] Fifthly, embodiments of this application provide a computer device; the computer device includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the steps of any of the device networking methods provided in the embodiments of this application.

[0045] Sixthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the steps of any of the device networking methods provided in embodiments of this application.

[0046] The device networking method provided in this application involves obtaining device information of the second device when discovering it for networking based on a distributed soft bus; initiating networking with the second device; obtaining a preset identification code; generating a first hash value based on the preset identification code and device information; obtaining a second hash value sent by the second device, which is generated by the second device based on the device information and the preset identification code; and confirming successful networking when the first hash value and the second hash value are the same. The entire process does not require a networking interface from the screenless device; users can network with the screenless device through the first device, and networking can also be achieved with the screenless device itself, thus improving the applicability of device networking. Attached Figure Description

[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram illustrating a current process for networking devices with screens, provided in an embodiment of this application.

[0049] Figure 2 This is a flowchart illustrating the first device networking method provided in the embodiments of this application;

[0050] Figure 3 This is a schematic diagram of a window for selecting a preset identification code acquisition method provided in an embodiment of this application;

[0051] Figure 4 This is a schematic diagram of a window for selecting a preset identification code acquisition method provided in an embodiment of this application;

[0052] Figure 5 This is a schematic diagram of a PIN code input window provided in an embodiment of this application;

[0053] Figure 6 This is a schematic diagram of a networking interface provided in an embodiment of this application;

[0054] Figure 7 This is a schematic diagram of a network relationship provided in an embodiment of this application;

[0055] Figure 8 This is a schematic flowchart of the second device networking method provided in the embodiments of this application;

[0056] Figure 9 This is a schematic block diagram of the device networking apparatus provided in the embodiments of this application;

[0057] Figure 10 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0059] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features.

[0060] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in some embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0061] Furthermore, the technical solutions of the various embodiments can be combined with each other, but only if they are based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0062] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0063] Distributed soft bus technology enables unified distributed communication management capabilities among near-field devices, providing link-independent device discovery, networking, and transmission capabilities. Currently, distributed soft bus networking only supports PIN (Personal Identification Number) authentication, requiring the provision of an authorization prompt interface, a PIN code display interface, and a PIN code input interface. For example, ... Figure 1 As shown, the specific authentication process is as follows:

[0064] Step (a1): Device A initiates negotiation to confirm whether the negotiation with Device B is successful; if not, authentication fails; if yes, proceed to step (a2).

[0065] Step (a2): Enter the authentication confirmation process. An authentication confirmation dialog box will pop up on device B. If the confirmation is negative based on the dialog box, the authentication will fail. If the confirmation is positive based on the dialog box, device B will create a group and display the generated PIN code on the interface, and encapsulate it into a token and send it to device A.

[0066] Step (a3): Device A displays a PIN code input box on its screen. After entering the PIN, verify whether it matches the PIN code of the received token. If they match, the authentication is successful; if they do not match, the authentication fails.

[0067] Therefore, the authentication of the distributed soft bus only supports identity authentication through PIN code display input, and it cannot perform authentication networking for screenless devices, thus limiting its applicability.

[0068] To address the aforementioned issues, this application provides a device networking method, apparatus, system, device, and medium for lifting equipment. The device networking method involves: upon discovering a second device to be networked based on a distributed soft bus, obtaining the device information of the second device; initiating a network connection with the second device; obtaining a preset identification code; generating a first hash value based on the preset identification code and the device information; obtaining a second hash value sent by the second device, which is generated by the second device based on the device information and the preset identification code; and confirming successful network connection when the first and second hash values ​​are identical. The entire process does not require a network interface from the screenless device; users can network with the screenless device through the first device, and network connection can also be achieved with screenless devices, thus improving the applicability of device networking.

[0069] Please see Figure 2 , Figure 2 This is a flowchart illustrating the first device networking method provided in this application embodiment. Figure 2 The device networking method shown can be applied to any of the following devices: mobile phone, camera, tablet computer, wearable device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, personal computer (PC), netbook, or personal digital assistant (PDA). No limitations are imposed in the embodiments of this application. For ease of description, the device to which this method is applied will be referred to as the first device below.

[0070] like Figure 2 As shown, the specific steps of the device networking method provided in this application embodiment include: S101-S105.

[0071] S101. When discovering the second device to be networked based on the distributed soft bus, obtain the device information of the second device.

[0072] For clarity, the device to be networked will be referred to as the second device. The first and second devices are on the same local area network. The second device sends a broadcast via CoAP (The Constrained Application Protocol), carrying its device information. This information includes, but is not limited to, device type, device version, and device ID.

[0073] When the first device discovers the second device based on the distributed soft bus, that is, when it receives a broadcast sent by the second device, the first device parses the broadcast and obtains the device information of the second device.

[0074] S102. Obtain a preset identification code, and generate a first hash value based on the preset identification code and the device information of the second device.

[0075] In this embodiment, the preset identification code is a PIN code. The first device obtains the PIN code by obtaining it from a cloud server or by user input. After obtaining the PIN code, the first device performs a hash operation on the PIN code and the device ID in the device information of the second device based on a preset hash algorithm to obtain a first hash value. The first hash value is used for network authentication.

[0076] S103. Initiate networking with the second device so that the second device generates a second hash value based on the device information and preset identification code of the second device.

[0077] The first device sends a network formation request to the second device via a distributed soft bus. Upon receiving the network formation request, the second device obtains a preset identification code (PIN code) from the cloud server. Based on a preset hash algorithm, the second device performs a hash operation on the PIN code and the device ID in the device information of the second device to obtain a second hash value. The second hash value is used for network authentication. The second device then sends the second hash value to the first device.

[0078] S104. Obtain the second hash value sent by the second device, and determine whether the first hash value and the second hash value are the same.

[0079] S105. If the first hash value and the second hash value are the same, the network formation is confirmed to be successful.

[0080] For example, the first device compares its own generated first hash value with the second hash value received from the second device. If the first hash value and the second hash value are the same, it means that the first device and the second device can form a network.

[0081] Based on the device networking method provided in this application, there is no need for the screenless device to provide a networking interface. Users can network with the screenless device through the first device, and networking can also be achieved for the screenless device. Therefore, the applicability of device networking is improved.

[0082] To illustrate the technical solutions of the embodiments of this application in more detail, the technical solutions of this application will also be described through the following embodiments. It should be noted that the following embodiments are only used to explain the technical solutions of this application in more detail, and are not intended to limit this application.

[0083] In some embodiments, initiating a network connection to the second device includes: obtaining device information of the second device via near-field wireless communication; if the device information obtained twice is consistent, then initiating a network connection to the second device.

[0084] Among them, short-range wireless communication methods include, but are not limited to, NFC (Near Field Communication), Bluetooth, and WiFi (Wireless Fidelity).

[0085] In some embodiments, the first device is equipped with an NFC module, and the second device is pre-configured with a TAG tag, wherein the TAG tag contains device information of the second device, Bluetooth MAC address (media access control address), and other information.

[0086] The step of obtaining the device information of the second device through near-field wireless communication includes: reading the pre-configured TAG tag of the second device through the NFC module to obtain the device information.

[0087] Since no second device needs to have an NFC module, costs are further reduced.

[0088] In other embodiments, the device information of the second device is obtained through near-field wireless communication, including obtaining the device information of the second device through Bluetooth or WiFi, wherein the first device and the second device are equipped with Bluetooth modules or WiFi modules and have a unique device identifier pre-set.

[0089] If the device information obtained twice is consistent, it means that the second device discovered based on the distributed soft bus and the second device for short-range wireless communication are the same device. In this case, network formation is initiated for the second device.

[0090] In some embodiments, the first device is used to generate a networking interface and obtain a preset identification code, including: obtaining operation instructions input by the user based on the networking interface; determining the acquisition method corresponding to the preset identification code according to the operation instructions, the acquisition method including a first acquisition method and a second acquisition method; and obtaining the preset identification code based on the determined acquisition method corresponding to the preset identification code.

[0091] For example, please refer to Figure 3 , Figure 3 This illustration shows a schematic diagram of a preset identification code acquisition method selection window provided in an embodiment of this application. For example... Figure 3As shown, the first device provides a networking interface, which includes a drop-down window for selecting an acquisition method. The acquisition method options include: a first acquisition method and a second acquisition method. The first acquisition method is "Automatic Cloud PIN Code Authentication," and the second acquisition method is "Manual Device PIN Code Authentication." The user inputs an operation command through this preset identification code acquisition method selection window. The first device responds to the user's operation command and determines the preset identification code acquisition method. For example, the preset identification code acquisition method is "Automatic Cloud PIN Code Authentication." Based on "Automatic Cloud PIN Code Authentication," the first device sends a PIN code acquisition request to the cloud server, so that the cloud server returns the corresponding PIN code.

[0092] In some embodiments, obtaining a preset identification code based on a determined acquisition method corresponding to the preset identification code includes: sending device information to a cloud server based on a first acquisition method, so that the cloud server can query a database that stores device information and corresponding preset identification codes for each device based on the device information; if device information is found in the database, the preset identification code corresponding to the device information is returned to the first device and the second device; and obtaining the preset identification code returned by the cloud server.

[0093] For example, such as Figure 3 As shown, the first device responds to the user's operation command entered in the acquisition method selection window, determines the preset identification code acquisition method as "cloud PIN code automatic authentication," and sends a PIN code acquisition request to the cloud server based on "cloud PIN code automatic authentication," so that the cloud server can return the corresponding PIN code. The cloud server's database stores device information for networking devices and the preset identification codes corresponding to the device information. After receiving the device information sent by the first device, the cloud server searches the database based on the device information sent by the first device. If the device information sent by the first device is found in the database, the PIN code corresponding to the retrieved device information is returned to the first device and the second device. In this way, the second device does not need to store the PIN code in advance, nor does it need to manually enter the PIN code, so that the first device and the second device can automatically complete the PIN code acquisition step, improving the efficiency of networking.

[0094] In some embodiments, obtaining a preset identification code based on a predetermined acquisition method corresponding to the preset identification code includes: generating an input window for the preset identification code on the networking interface based on a second acquisition method; and obtaining the preset identification code input by the user based on the input window.

[0095] For example, such as Figure 4As shown, the first device responds to the user's operation command in the acquisition method selection window, determines the preset identification code acquisition method as "device PIN code manual authentication", and based on "cloud PIN code automatic authentication", jumps from the current acquisition method selection window to the following... Figure 5 The PIN code input window is shown. Users can enter their PIN code through this window, and the first device receives the PIN code. For some high-security second devices, where automatic network setup via a cloud server is inconvenient, and only authorized users can control the network, the PIN code serves as the authentication credential. This improves network security and protects devices from malicious access and damage.

[0096] In some embodiments, the first device is used to generate a networking interface. After confirming successful networking, the device networking method further includes: confirming successful networking, generating a networking log, and saving the networking log, which includes notification information generated during the networking process of the first device and the second device; displaying the networking log on the networking interface; and displaying the device information of the second device that successfully formed the network on the networking interface.

[0097] For example, please refer to Figure 5 , Figure 5 A schematic diagram illustrating a networking interface provided in an embodiment of this application is shown. Figure 5 As shown, the networking interface generated by the first device includes an acquisition method selection window, a first display area, a second display area, a third display area, and a fourth display area. The first display area displays the device ID of the second device discovered via the distributed soft bus. The second display area displays the device ID of the second device that has successfully formed a network. The third display area displays the networking logs of the first and second devices. The fourth display area displays some function buttons, such as the "PIN code clear" button, the "network disconnect" button, the "interval test" button, and the "connection test" button. The networking logs specifically include notification information generated during the networking process of the first and second devices, such as network initiation notifications, network success notifications, or network failure notifications. This allows the first device to quickly understand the networking completion status through the networking logs during the networking process with a batch of second devices, thus identifying some second devices that have not completed networking.

[0098] In some embodiments, the device networking method further includes: after disconnecting from the network with the second device that has successfully formed a network, sending a networking request message to the disconnected second device according to the networking log, so that the disconnected second device replies with networking permission information; receiving the networking permission information, and re-forming the network with the disconnected second device according to the networking permission information.

[0099] In this way, a network preservation mechanism for the first and second devices is implemented under various abnormal conditions, avoiding the need for re-authentication after exiting the network due to abnormal conditions, which would cause trouble for users, and ensuring that the first or second device can automatically re-establish the network after restarting.

[0100] In some embodiments, the device networking method includes: when a preset application is running on a terminal device, outputting a type confirmation window through the terminal device; obtaining a type confirmation instruction input by the user based on the type confirmation window; and setting the terminal device as a first device or a second device according to the type confirmation instruction.

[0101] For example, please refer to Figure 6 , Figure 6 A schematic diagram illustrating a networking interface provided in an embodiment of this application is shown. Figure 6 As shown, the networking interface also includes a type confirmation window. For example, this type input window is a drop-down selection window, where the type options include: first device and second device. When a user first opens the preset application of the above-mentioned device networking method through any terminal device, a type confirmation window pops up on the networking interface, allowing the user to decide whether to set the current terminal device as the first device or the second device.

[0102] In one embodiment, see Figure 7 , Figure 7 A schematic diagram illustrating a network topology provided in an embodiment of this application is shown. For example... Figure 7 As shown, the first device, acting as the master device, can be networked with multiple second devices, acting as slave devices. This improves the management efficiency of the first device over the second devices.

[0103] In one embodiment, see Figure 8 , Figure 8 A schematic flowchart illustrating a second device networking method provided in an embodiment of this application is shown. Figure 8 As shown, the specific steps of the second networking method include: S201-S209.

[0104] S201, the first device and the second device discover each other through the local area network.

[0105] S202, The first device obtains the device ID of the second device through the local area network.

[0106] S203. The first and second devices obtain the PIN code issued by the cloud server.

[0107] S204. The first device performs a hash operation based on the PIN code and the device ID of the second device to generate a first hash value.

[0108] S205. The second device performs a hash operation based on the PIN code and its own device ID to generate a second hash value.

[0109] S206, The first device sends the first hash value to the second device.

[0110] S207. The second device compares the first hash value and the second hash value. If the first hash value and the second hash value are the same, proceed to step S208; if the first hash value and the second hash value are different, proceed to step S209.

[0111] S208. The second device establishes a network and sends a successful network connection message to the first device.

[0112] S209. The second device refuses to form a network and sends a network failure message to the first device.

[0113] Please see Figure 9 , Figure 9 This application also provides a schematic block diagram of a device networking apparatus 300 for executing the aforementioned device networking method for container clusters. The device networking apparatus can be configured in a server or a terminal device.

[0114] The server can be a standalone server, a server cluster, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal device can be an electronic device such as a mobile phone, tablet, laptop, desktop computer, user digital assistant, or wearable device.

[0115] like Figure 4 As shown, the device networking device 300 includes: a device discovery module 301, a networking initiation module 302, a data processing module 303, a data acquisition module 304, and a networking confirmation module 305.

[0116] The device discovery module 301 is used to obtain the device information of the second device when discovering the second device to be networked based on the distributed soft bus.

[0117] In some embodiments, before the device discovery module 301 is used to discover the second device to be networked based on the distributed soft bus, it is also used to: output a type confirmation window through the terminal device when the terminal device is running a preset application; obtain the type confirmation instruction input by the user based on the type confirmation window; and set the terminal device as the first device or the second device according to the type confirmation instruction. The network initiation module 302 is used to initiate network formation to the second device.

[0118] In some embodiments, when the network initiation module 302 is used to initiate a network to the second device, it is specifically used to: obtain device information of the second device through short-range wireless communication; if the device information obtained twice is consistent, then initiate a network to the second device.

[0119] The data processing module 303 is used to obtain a preset identification code and generate a first hash value based on the preset identification code and device information.

[0120] In some embodiments, when the data processing module 303 is used to obtain a preset identification code, it is specifically used to: obtain the operation instructions input by the user based on the network interface; determine the acquisition method corresponding to the preset identification code according to the operation instructions, the acquisition method including a first acquisition method and a second acquisition method; and obtain the preset identification code based on the determined acquisition method corresponding to the preset identification code.

[0121] In some embodiments, when the data processing module 303 is used to obtain a preset identification code based on a determined acquisition method corresponding to the preset identification code, it is specifically used to: send device information to a cloud server based on a first acquisition method, so that the cloud server can query a database that stores device information and corresponding preset identification codes of each device based on the device information; if device information is found in the database, the preset identification code corresponding to the device information is returned to the first device and the second device; and obtain the preset identification code returned by the cloud server.

[0122] In some embodiments, when the data processing module 303 is used to obtain a preset identification code based on a determined acquisition method corresponding to the preset identification code, it is specifically used to: generate an input window for the preset identification code on the network interface based on the second acquisition method; and obtain the preset identification code input by the user based on the input window.

[0123] The data acquisition module 304 is used to acquire the second hash value sent by the second device. The second hash value is generated by the second device based on the device information and the preset identification code.

[0124] The network confirmation module 305 is used to confirm successful network formation when the first hash value and the second hash value are the same.

[0125] In some embodiments, after confirming successful networking, the network confirmation module 305 is further configured to: confirm successful networking, generate a network log, and save the network log, which includes notification information generated during the networking process of the first device and the second device; display the network log on the networking interface; and display the device information of the second device that successfully formed the network on the networking interface.

[0126] In some embodiments, the network confirmation module 305 is further configured to: after disconnecting from the network with the second device that has successfully formed a network, send a network request message to the disconnected second device according to the network log so that the disconnected second device can reply with network permission information; receive the network permission information and re-form a network with the disconnected second device according to the network permission information.

[0127] Please see Figure 10 , Figure 10 This is a schematic block diagram illustrating the structure of a computer device according to an embodiment of this application. The computer device may be a server or a terminal.

[0128] See Figure 10 The computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include storage media and internal memory.

[0129] The storage medium may store the operating system and computer programs. The computer programs include program instructions that, when executed, cause the processor to perform the steps of any device networking method.

[0130] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0131] Internal memory provides an environment for the execution of computer programs stored in the storage medium. When executed by a processor, this program enables the processor to perform the steps of any device networking method. The storage medium can be non-volatile or volatile.

[0132] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0134] For example, in one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps: when discovering a second device to be networked based on a distributed soft bus, obtaining device information of the second device; obtaining a preset identification code, and generating a first hash value based on the preset identification code and the device information; initiating network formation to the second device, so that the second device generates a second hash value based on the device information and the preset identification code; obtaining the second hash value sent by the second device, and determining whether the first hash value and the second hash value are the same; when the first hash value and the second hash value are the same, confirming that the network formation is successful.

[0135] In some embodiments, before the processor is used to discover the second device to be networked based on the distributed soft bus, it is also used to: output a type confirmation window through the terminal device when the terminal device is running a preset application; obtain a type confirmation instruction input by the user based on the type confirmation window; and set the terminal device as the first device or the second device according to the type confirmation instruction. The network initiation module 302 is used to initiate network formation to the second device.

[0136] In some embodiments, when the processor initiates networking with the second device, it specifically implements: obtaining device information of the second device through near-field wireless communication; and if the device information obtained twice is consistent, initiating networking with the second device.

[0137] In some embodiments, when the processor is used to acquire a preset identification code, it is specifically used to: acquire operation instructions input by the user based on the network interface; determine the acquisition method corresponding to the preset identification code according to the operation instructions, the acquisition method including a first acquisition method and a second acquisition method; and acquire the preset identification code based on the determined acquisition method corresponding to the preset identification code.

[0138] In some embodiments, when the processor is used to implement the acquisition method corresponding to the determined preset identification code, it is specifically used to implement: sending device information to the cloud server based on the first acquisition method, so that the cloud server can query the database that stores the device information and the corresponding preset identification code of each device based on the device information; if the device information is found from the database, the preset identification code corresponding to the device information is returned to the first device and the second device; and acquiring the preset identification code returned by the cloud server.

[0139] In some embodiments, when the processor is used to acquire a preset identification code based on a determined acquisition method corresponding to the preset identification code, it is specifically used to: generate an input window for the preset identification code on the network interface based on the second acquisition method; and acquire the preset identification code input by the user based on the input window.

[0140] In some embodiments, the processor is further configured to: after disconnecting from the network with the second device that has successfully formed a network, send a network request message to the disconnected second device according to the network log, so that the disconnected second device replies with network permission information; receive the network permission information, and re-form a network with the disconnected second device according to the network permission information.

[0141] This application provides a device networking system, which includes a first device and at least one second device. The first device is used to execute the device networking method as described in any one of the embodiments of this application.

[0142] This application provides a computer-readable storage medium that stores one or more programs that can be executed by one or more processors to implement the steps of the device networking method provided in any of the embodiments of this application.

[0143] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.

[0144] In one embodiment, the program in the computer-readable storage medium proposed in this application, when executed by a processor, is specifically used to implement the following steps:

[0145] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A device networking method, characterized in that, Applied to the first device, the device networking method includes: When discovering the second device to be networked based on the distributed soft bus, the device information of the second device is obtained; Obtain a preset identification code, and generate a first hash value based on the preset identification code and the device information; Initiate a network connection to the second device, so that the second device generates a second hash value based on the device information and a preset identification code of the second device; Obtain the second hash value sent by the second device, and determine whether the first hash value and the second hash value are the same; If the first hash value and the second hash value are the same, the network formation is confirmed to be successful; Initiating a network connection to the second device includes: The device information of the second device is obtained through short-range wireless communication. If the device information obtained twice is consistent, then network formation is initiated to the second device; Wherein, the first device is used to generate a networking interface, and the step of obtaining a preset identification code includes: Based on the network interface, obtain the user's input operation commands; The acquisition method corresponding to the preset identification code is determined according to the operation instruction, and the acquisition method includes a first acquisition method and a second acquisition method; Based on the determined acquisition method corresponding to the preset identification code, the preset identification code is acquired; Wherein, obtaining the preset identification code based on the determined acquisition method corresponding to the preset identification code includes: Based on the first acquisition method, the device information is sent to the cloud server so that the cloud server can query the database that stores the device information and corresponding preset identification codes of each device. If the device information is found in the database, the preset identification code corresponding to the device information is returned to the first device and the second device. Obtain the preset identification code returned by the cloud server.

2. The device networking method as described in claim 1, characterized in that, The step of obtaining the preset identification code based on the determined acquisition method corresponding to the preset identification code includes: Based on the second acquisition method, an input window for the preset identification code is generated on the networking interface; Based on the input window, obtain the preset identification code entered by the user.

3. The device networking method as described in claim 1, characterized in that, The first device is used to generate a networking interface. After confirming successful networking, the device networking method further includes: Once the network formation is confirmed to be successful, a network formation log is generated and saved. The network formation log includes notification information generated during the networking process of the first device and the second device. The network log is displayed on the network interface; And display the device information of the second device that has successfully formed a network on the network interface.

4. The device networking method as described in claim 3, characterized in that, The method further includes: After disconnecting from the second device that has successfully formed a network, a network request message is sent to the disconnected second device according to the network log, so that the disconnected second device can reply with network permission information; Receive the network permission information, and reconnect with the second device that was disconnected from the network based on the network permission information.

5. The device networking method as described in claim 1, characterized in that, The method includes: When a preset application is running on a terminal device, a type confirmation window is output through the terminal device. Based on the type confirmation window, obtain the type confirmation instruction input by the user; The terminal device is set to either the first device or the second device according to the type confirmation instruction.

6. A device networking apparatus, characterized in that, The device networking apparatus includes: Device discovery module; used to obtain device information of the second device when discovering the second device to be networked based on the distributed soft bus; The network initiation module is used to initiate a network connection to the second device; The data processing module is used to obtain a preset identification code and generate a first hash value based on the preset identification code and the device information; The data acquisition module is used to acquire the second hash value sent by the second device, wherein the second hash value is generated by the second device based on the device information and the preset identification code; The network formation confirmation module is used to confirm successful network formation when the first hash value and the second hash value are the same. The network initiation module is also used to implement: The device information of the second device is obtained through short-range wireless communication. If the device information obtained twice is consistent, then network formation is initiated to the second device; The data processing module is also used to implement: Obtain user input commands based on the network interface; The acquisition method corresponding to the preset identification code is determined according to the operation instruction, and the acquisition method includes a first acquisition method and a second acquisition method; Based on the determined acquisition method corresponding to the preset identification code, the preset identification code is acquired; The method of obtaining the preset identification code based on the determined acquisition method is further used to achieve: Based on the first acquisition method, the device information is sent to the cloud server so that the cloud server can query the database that stores the device information and corresponding preset identification codes of each device. If the device information is found in the database, the preset identification code corresponding to the device information is returned to the first device and the second device. Obtain the preset identification code returned by the cloud server.

7. A computer device, characterized in that, The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and, in executing the computer program, implement the device networking method as described in any one of claims 1-5.

8. A device networking system, characterized in that, The device networking system includes a first device and at least one second device, wherein the first device is used to perform the device networking method as described in any one of claims 1-5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to implement the device networking method as described in any one of claims 1-5.