Network equipment networking method, electronic device and computer readable storage medium

文档序号:291266 发布日期:2021-11-23 浏览:4次 中文

阅读说明:本技术 网络设备连网方法、电子装置及计算机可读储存媒体 (Network equipment networking method, electronic device and computer readable storage medium ) 是由 利鹏飞 潘仁刚 于 2020-05-19 设计创作,主要内容包括:一种网络设备连网方法,包括:动态生成二维码通过行动装置扫描该二维码的第一二维码区块以连上该电子装置的访客Wi-Fi;取得用户输入的验证码並判断是否与预设验证码匹配;若匹配,令该二维码的第二二维码区块由隐藏状态切换为显示状态,同时把该第二二维码区块的坐标信息发送给该行动装置以还原显示该第二二维码区块;通过该行动装置扫描该二维码取得主要Wi-Fi信息以令该行动装置连上该电子装置的主要Wi-Fi;及断开电子装置与该行动装置的GuestWi-Fi联机并关闭该二维码的显示。本发明还提供一种电子装置及计算机可读储存媒体,通过增加验证码的方式,搭配二维码扫描实现智能设备的连网,确保连网的安全与便利性。(A method of networking network devices, comprising: dynamically generating a two-dimensional code, and scanning a first two-dimensional code block of the two-dimensional code through a mobile device to connect with a visitor Wi-Fi of the electronic device; obtaining a verification code input by a user and judging whether the verification code is matched with a preset verification code; if the two-dimensional code blocks are matched with each other, the second two-dimensional code block of the two-dimensional code is switched from the hidden state to the display state, and meanwhile, the coordinate information of the second two-dimensional code block is sent to the mobile device to restore and display the second two-dimensional code block; scanning the two-dimensional code through the mobile device to obtain main Wi-Fi information so as to enable the mobile device to be connected with the main Wi-Fi of the electronic device; and disconnecting the Guestwi-Fi connection of the electronic device and the mobile device and closing the display of the two-dimensional code. The invention also provides an electronic device and a computer readable storage medium, which realize networking of intelligent equipment by adding the verification code and matching with two-dimensional code scanning, thereby ensuring the safety and convenience of networking.)

1. A network equipment networking method is applied to an electronic device, and is characterized by comprising the following steps:

dynamically generating a two-dimensional code, wherein the two-dimensional code comprises a first two-dimensional code block and a second two-dimensional code block, the first two-dimensional code block is in a display state, and the second two-dimensional code block is in a hidden state;

scanning the first two-dimensional code block through a mobile device to trigger the mobile device to be connected with a visitor Wi-Fi of the electronic device;

acquiring a verification code input by a user;

judging whether the input verification code is matched with a preset verification code;

if the input verification code is matched with the preset verification code, the second two-dimensional code block is switched to a display state, and meanwhile, the coordinate information of the second two-dimensional code block is sent to the mobile device to restore and display the second two-dimensional code block;

scanning the two-dimensional code through the mobile device to obtain main Wi-Fi information, and enabling the mobile device to be connected with the main Wi-Fi of the electronic device according to the main Wi-Fi information; and

disconnecting the Guest Wi-Fi connection of the electronic device and the mobile device and closing the display of the two-dimensional code.

2. The network device networking method of claim 1, further comprising:

if the input verification code is not matched with the preset verification code, the Guest Wi-Fi connection of the electronic device and the mobile device is disconnected, and the display of the two-dimensional code is closed.

3. The network device networking method of claim 1, wherein the first two-dimensional code block comprises guest Wi-Fi information and the authentication code, the second two-dimensional code block comprises a serial number, a MAC address and the primary Wi-Fi information of the electronic apparatus, the primary Wi-Fi information comprises a Service Set Identifier (SSID) and an online password of the electronic apparatus, and wherein a digital time stamp service (DTS) is added to the two-dimensional code to set a serial number and a validity period of the MAC address.

4. The network device networking method of claim 1, further comprising:

AND performing ' AND/OR ' (AND/OR) ' logic operation processing on the point which stores the area display of ' 1 ' in the second two-dimensional code block AND ' 0 ', converting the Primary Wi-Fi information of the second two-dimensional code block into ' 0 ' to hide information, AND simultaneously recording coordinate information of the hidden information.

5. The network device networking method of claim 1, further comprising:

the two-dimensional code is displayed via a display device connected to the electronic apparatus, the display device including a screen of a personal computer apparatus, a user interface of a television or a web browser with a routing function, for scanning the two-dimensional code by the mobile apparatus.

6. An electronic device, comprising:

the two-dimensional code generating module is used for dynamically generating a two-dimensional code, wherein the two-dimensional code comprises a first two-dimensional code block and a second two-dimensional code block, the first two-dimensional code block is in a display state, the second two-dimensional code block is in a hidden state, and the first two-dimensional code block is scanned through a mobile device so as to trigger the mobile device to be connected with a visitor Wi-Fi of the electronic device;

the verification module is used for obtaining a verification code input by a user, judging whether the input verification code is matched with a preset verification code or not, if the input verification code is matched with the preset verification code, switching the second two-dimensional code block into a display state, and simultaneously sending the coordinate information of the second two-dimensional code block to the mobile device so as to restore and display the second two-dimensional code block; and

and the online control module is used for scanning the two-dimensional code through the mobile device to obtain main Wi-Fi information, connecting the mobile device to the main Wi-Fi of the electronic device according to the main Wi-Fi information, disconnecting the Guest Wi-Fi online of the electronic device and the mobile device and closing the display of the two-dimensional code.

7. The electronic device of claim 6, wherein if the entered verification code does not match the predetermined verification code, the connection control module disconnects the Guest Wi-Fi connection between the electronic device and the mobile device and closes the display of the two-dimensional code.

8. The electronic device of claim 6, wherein the first two-dimensional code block comprises a visitor Wi-Fi message and the verification code, the second two-dimensional code block comprises a serial number, a MAC address and the main Wi-Fi message of the electronic device, the main Wi-Fi message comprises a Service Set Identifier (SSID) and an on-line password of the electronic device, and a digital time stamp service (DTS) is added to the two-dimensional code to set a serial number and a validity period of the MAC address.

9. The electronic device of claim 6, wherein the Primary Wi-Fi information of the second two-dimensional code block is converted to '0' by performing an AND/OR (AND/OR) logical operation on the point stored as '1' in the second two-dimensional code block AND the '0' to hide information, AND coordinate information of the hidden information is recorded.

10. A computer readable storage medium having stored thereon a computer program which, when executed, performs the steps of the method of networking network devices according to any of claims 1 to 5.

Technical Field

The present invention relates to network devices, and more particularly, to a network device networking method, an electronic apparatus, and a computer-readable storage medium.

Background

At present, intelligent equipment is increasingly popularized in life, and all the intelligent equipment relates to networking actions in the using process. The existing common networking mode is to scan the two-dimensional code, but the two-dimensional code scanning is undifferentiated scanning, and any user can acquire Wi-Fi information in a scanning mode and complete online, so that certain potential safety hazards exist.

Disclosure of Invention

In view of the foregoing, it is desirable to provide a networking method for network devices, an electronic apparatus, and a computer-readable storage medium, which implement networking of smart devices by adding a verification code and matching with two-dimensional code scanning, so as to ensure the security and convenience of networking.

The embodiment of the invention provides a network equipment networking method, which is applied to an electronic device and comprises the following steps: dynamically generating a two-dimensional code, wherein the two-dimensional code comprises a first two-dimensional code block and a second two-dimensional code block, the first two-dimensional code block is in a display state, and the second two-dimensional code block is in a hidden state; scanning the first two-dimensional code block through a mobile device to trigger the mobile device to be connected with a visitor Wi-Fi of the electronic device; acquiring a verification code input by a user; judging whether the input verification code is matched with a preset verification code; if the input verification code is matched with the preset verification code, the second two-dimensional code block is switched to a display state, and meanwhile, the coordinate information of the second two-dimensional code block is sent to the mobile device to restore and display the second two-dimensional code block; scanning the two-dimensional code through the mobile device to obtain main Wi-Fi information, and enabling the mobile device to be connected with the main Wi-Fi of the electronic device according to the main Wi-Fi information; and disconnecting the Guest Wi-Fi connection between the electronic device and the mobile device and closing the display of the two-dimensional code.

The embodiment of the invention also provides an electronic device which comprises a two-dimensional code generation module, a verification module and an online control module. The two-dimensional code generation module is used for dynamically generating a two-dimensional code, wherein the two-dimensional code comprises a first two-dimensional code block and a second two-dimensional code block, the first two-dimensional code block is in a display state, the second two-dimensional code block is in a hidden state, and the first two-dimensional code block is scanned through a mobile device so as to trigger the mobile device to be connected with a visitor Wi-Fi of the electronic device. The verification module is used for obtaining a verification code input by a user, judging whether the input verification code is matched with a preset verification code, if the input verification code is matched with the preset verification code, switching the second two-dimensional code block into a display state, and simultaneously sending the coordinate information of the second two-dimensional code block to the mobile device to restore and display the second two-dimensional code block. The online control module is used for scanning the two-dimensional code through the mobile device to obtain main Wi-Fi information, enabling the mobile device to be connected with the main Wi-Fi of the electronic device according to the main Wi-Fi information, disconnecting the electronic device from the Guest Wi-Fi online of the mobile device and closing the display of the two-dimensional code.

Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed, implements the steps of the method for networking network devices as described above.

The network equipment networking method, the electronic device and the computer readable storage medium of the embodiment of the invention achieve the purposes of verifying the identity of the user, quickly networking and grouping the user by a way of displaying the same two-dimensional code in a dividing way.

Drawings

Fig. 1 is a flow chart of steps of a method for networking a network device in an embodiment of the invention.

Fig. 2 is a diagram of an application environment for networking network devices in accordance with an embodiment of the present invention.

Fig. 3 is a schematic diagram of a two-dimensional code according to an embodiment of the present invention.

Fig. 4 is a schematic diagram showing a hardware architecture of an electronic device according to an embodiment of the invention.

FIG. 5 is a block diagram of an electronic device according to an embodiment of the invention.

Description of the main elements

Electronic device 200
Processor with a memory having a plurality of memory cells 210
Memory device 220
Network equipment networking system 230
Two-dimensional code generation module 310
Verification module 320
On-line control module 330

The following detailed description will further illustrate the invention in conjunction with the above-described figures.

Detailed Description

In order that the above objects, features and advantages of the present invention can be more clearly understood, a detailed description of the present invention will be given below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.

In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention, and the described embodiments are merely a subset of the embodiments of the present invention, rather than a complete embodiment. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the feature. In addition, technical solutions between the various embodiments can be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should not be considered to exist, and is not within the protection scope of the present invention.

Fig. 1 is a flowchart of steps for networking network devices, applied to an electronic apparatus (e.g., a router), according to an embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.

And step S1, the electronic device dynamically generates a complete two-dimensional code.

Referring to fig. 2, the router 10 randomly selects two digits from its own serial number and a Media Access Control (MAC) address, and generates a two-dimensional code 30 in combination with authentication information. The two-dimensional code 30 includes a two-dimensional code block I and a two-dimensional code block ii, as shown in 3. The two-dimensional code block I comprises visitor Wi-Fi (Guest Wi-Fi) information and a verification code. The two-dimensional code block ii includes a serial number and an MAC address of the router 10 and Primary Wi-Fi (Primary Wi-Fi) information. The Primary Wi-Fi information includes a Service Set Identifier (SSID) and an online password of the router 10. In addition, a Digital Timestamp Service (DTS) is added to the two-dimensional code 30 to set the serial number and the validity period (for example, 5 minutes) of the MAC address.

In step S2, after the two-dimensional code 30 is generated, the two-dimensional code block I in the two-dimensional code 30 is displayed, and the two-dimensional code block II in the two-dimensional code 30 is hidden.

The two-dimensional code block II is invisible initially, AND the Primary Wi-Fi information of the two-dimensional code block II is completely converted into '0' to hide information by performing 'AND/OR' logical operation processing on the point AND '0' which are displayed as '1' in the area in the two-dimensional code block II, AND simultaneously, the coordinate information of the hidden information is recorded.

The two-dimensional code 30 is generated by the router 10, and the two-dimensional code 30 is displayed via a display apparatus connected to the router 10, for example, a display apparatus including a screen of a personal computer device, a user interface of a television or a web browser with a routing function, for a user to scan the two-dimensional code 30 with a camera of a mobile device (e.g., a mobile phone) 20.

In step S3, the user scans the two-dimensional code block i through the mobile device 20 to connect the mobile device 20 to the guest Wi-Fi of the router 10, and the user inputs the verification code.

In step S4, the router 10 obtains the verification code input by the user.

In step S5, the router 10 determines whether the input authentication code matches a predetermined authentication code.

In step S6, if the inputted verification code matches the preset verification code, the router 10 sends the coordinate information of the two-dimensional code block ii to the mobile device 20 of the user to restore and display the two-dimensional code block ii in the two-dimensional code 30.

After the client scans the two-dimensional code block I and passes verification, the Primary Wi-Fi information in the two-dimensional code block II is restored and displayed through the recorded coordinate information, and then the user scans the two-dimensional code block II to obtain the Primary Wi-Fi information to connect to the Internet.

In step S7, the user scans the two-dimensional code 30 through the mobile device 20, and the router 10 acquires the Primary Wi-Fi information and connects the mobile device 20 to the main Wi-Fi.

In step S8, the router 10 disconnects the Guest Wi-Fi from the mobile device 20 and closes the display of the two-dimensional code 30.

In step S5, if the inputted verification code does not match the predetermined verification code, the router 10 disconnects the Guest Wi-Fi from the mobile device 20 and closes the display of the two-dimensional code 30 (step S8).

The invention carries out network limitation on Guest Wi-Fi of the router, and before the authentication is not carried out, the client can only be connected with Guest Wi-Fi of the router, and the user passing the authentication can be connected with Primary Wi-Fi of the router by scanning the two-dimensional code block II.

Fig. 4 is a schematic diagram showing a hardware architecture of an electronic device according to an embodiment of the invention. The electronic apparatus 200, but not limited to, may communicatively couple the processor 210, the memory 220, and the network device networking system 230 to each other via a system bus, and FIG. 4 illustrates only the electronic apparatus 200 having the components 210 and 230, but it is to be understood that not all of the illustrated components are required and that more or fewer components may alternatively be implemented.

The memory 220 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 220 may be an internal storage unit of the electronic device 10, such as a hard disk or a memory of the electronic device 200. In other embodiments, the memory may also be an external storage device of the electronic apparatus 200, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the electronic apparatus 200. Of course, the memory 220 may also include both an internal storage unit and an external storage device of the electronic apparatus 200. In this embodiment, the memory 220 is generally used for storing an operating system and various application software installed in the electronic apparatus 200, such as program codes of the network device networking system 230. In addition, the memory 220 may be used to temporarily store various types of data that have been output or are to be output.

The processor 210 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 210 is generally used to control the overall operation of the electronic device 200. In this embodiment, the processor 210 is configured to run the program codes stored in the memory 220 or process data, for example, run the network device networking system 230.

It should be noted that fig. 4 is only an example of the electronic apparatus 200. In other embodiments, electronic device 200 may include more or fewer components, or have a different configuration of components.

Fig. 5 is a functional block diagram of an electronic device for performing a method for networking network devices according to an embodiment of the present invention. The method for networking network devices according to the embodiment of the present invention can be implemented by a computer program stored in a storage medium, for example, the memory 220 of the electronic apparatus 200. When the computer program implementing the method of the present invention is loaded into the memory 220 by the processor 210, the processor 210 of the drive line apparatus 200 executes the method for networking network devices of the embodiment of the present invention.

The electronic device 200 of the embodiment of the invention includes a two-dimensional code generating module 310, a verifying module 320 and an online control module 330.

The two-dimensional code generation module 310 dynamically generates a complete two-dimensional code. Referring to fig. 2, the router 10 randomly selects two digits from the serial number and the MAC address thereof, and generates the two-dimensional code 30 in combination with the authentication information. The two-dimensional code 30 includes a two-dimensional code block I and a two-dimensional code block ii, as shown in fig. 3. The two-dimensional code block I comprises Guest Wi-Fi information and a verification code. The two-dimensional code block ii includes the serial number and MAC address of the router 10 and Primary Wi-Fi information. Primary Wi-Fi information includes the SSID and online password of router 10. Further, the two-dimensional code 30 is added with a DTS setting sequence number and an effective period of the MAC address (for example, 5 minutes).

After the two-dimensional code 30 is generated, the two-dimensional code generation module 310 displays the two-dimensional code block I in the two-dimensional code 30, and hides the two-dimensional code block II in the two-dimensional code 30. The two-dimensional code block II is invisible initially, AND the Primary Wi-Fi information of the two-dimensional code block II is completely converted into '0' to hide information by performing 'AND/OR' logical operation processing on the point AND '0' which are displayed as '1' in the area in the two-dimensional code block II, AND simultaneously, the coordinate information of the hidden information is recorded.

The two-dimensional code generation module 310 generates the two-dimensional code 30 and displays the two-dimensional code 30 via a display device connected to the router 10, for example, a screen of a personal computer device, a user interface of a television or a web browser with a routing function, for a user to scan the two-dimensional code 30 using a camera of a mobile device (e.g., a mobile phone) 20.

When the user scans the two-dimensional code block i through the mobile device 20, so that the mobile device 20 is connected to the visitor Wi-Fi of the router 10, and the user inputs the verification code, the verification code input by the user is obtained, and whether the input verification code matches with a preset verification code is determined. If the inputted verification code matches the preset verification code, the verification module 320 sends the coordinate information of the two-dimension code block ii to the mobile device 20 of the user to restore and display the two-dimension code block ii in the two-dimension code 30.

After the client scans the two-dimensional code block I and passes the verification, the verification module 320 restores and displays the Primary Wi-Fi information in the two-dimensional code block II through the recorded coordinate information, and the user then scans the two-dimensional code block II to obtain the Primary Wi-Fi information to connect to the internet.

In step S7, the user scans the two-dimensional code 30 through the mobile device 20, and the online control module 330 obtains the Primary Wi-Fi information, and then connects the mobile device 20 to the main Wi-Fi, and disconnects the Guest Wi-Fi from the mobile device 20 and closes the display of the two-dimensional code 30.

If the inputted verification code does not match the preset verification code, the online control module 330 disconnects the Guest Wi-Fi from the mobile device 20 and closes the display of the two-dimensional code 30

The modules/units integrated with the electronic device 200 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and which, when executed by a processor, may implement the steps of the above-described embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer memory, read only memory, random access memory, electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.

It is understood that the above described division of modules is only one logical division, and that in actual implementation, there may be other divisions. In addition, functional modules in the embodiments of the present application may be integrated into the same processing unit, or each module may exist alone physically, or two or more modules are integrated into the same unit. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.

The network equipment networking method, the electronic device and the computer readable storage medium of the embodiment of the invention have the following advantages that: (1) and (3) two-dimensional code division display: the user identity can be verified by dividing and displaying the same complete two-dimensional code, and the aim of quick networking can be fulfilled; (2) dynamically generating a two-dimensional code: two digits are randomly selected by combining the serial number of the router and the MAC address, so that different two-dimensional codes are generated each time, a DTS is added, and the condition that a user uses the old two-dimensional codes again for networking is avoided; and (3) grouping and managing the clients: grouping management is carried out on different users through verification of the two-dimensional code, namely the users which do not pass the verification can only connect Guest Wi-Fi, and the users which pass the verification can only connect Primary Wi-Fi.

It will be apparent to those skilled in the art that other changes and modifications can be made based on the technical solutions and concepts provided by the embodiments of the present invention in combination with the actual requirements, and these changes and modifications are all within the scope of the claims of the present invention.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:由防火墙设备执行的访问控制方法、装置、设备以及介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类