Connection method and device of local area network equipment, storage medium and electronic equipment

By generating virtual queues in the LAN and controlling device connections in sequence, the service overload problem caused by simultaneous connection of multiple devices is solved, and system stability and user experience are improved.

CN119109964AInactive Publication Date: 2024-12-10GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1

Patent Information

Application Number
CN202411287480.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In a LAN environment, when multiple devices try to connect to the same service at the same time, if one device fails to connect, other devices may continue to try to connect, causing service overload.

Method used

By monitoring the connection status of devices in the LAN in real time, a virtual queue is generated, the target device is added to the virtual queue for queueing and waiting, and when the server's running state is restored to a connectable state, the devices are controlled to connect in sequence according to the order in the virtual queue. .

Benefits of technology

It solves the problem of service overload, optimizes system stability, reduces user waiting time, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109964A_ABST
    Figure CN119109964A_ABST
Patent Text Reader

Abstract

The invention provides a local area network equipment connection method and device, a storage medium and electronic equipment, and the method comprises the steps: monitoring the connection state of each equipment in a local area network in real time, the connection state being a connection failure state or a connection success state; under the condition that the connection state of the target equipment is a connection failure state, a virtual queue is generated, the target equipment is added to the virtual queue for queuing waiting, and the target equipment belongs to the multiple pieces of equipment; and monitoring the running state of the server in real time, and under the condition that the running state of the server is recovered to the connectable state, controlling the target devices to be connected in sequence according to the sequence in the virtual queue. According to the method, the analysis time and resources of the server are saved, the server is enabled to process data more intensively, the waiting time of a user is reduced, and the problems of overload and chaos during service connection of equipment in a local area network are solved. Meanwhile, the stability of the system is improved through optimization measures, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of local area network environment, and in particular, to a method for connecting local area network devices, a connection device for local area network devices, a computer-readable storage medium, and an electronic device. Background Art

[0002] In an existing LAN environment, when multiple devices try to connect to the same service at the same time, if one device fails to connect, other devices may still continue to try to connect, which may cause service overload and further aggravate connection problems. Summary of the invention

[0003] The main purpose of the present application is to provide a connection method for a local area network device, a connection device for a local area network device, a computer-readable storage medium and an electronic device, so as to at least solve the problem in the prior art that when multiple devices try to connect to the same service at the same time, one device fails to connect while other devices continue to connect, causing service overload.

[0004] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a connection method for a local area network device is provided, including: real-time monitoring of the connection status of each device in the local area network, the connection status being a connection failure status or a connection success status; when the connection status of the target device is the connection failure status, generating a virtual queue and adding the target device to the virtual queue for queuing and waiting, the target device belonging to multiple devices; real-time monitoring of the operating status of the server, and when the operating status of the server is restored to a connectable state, controlling each of the target devices to connect in sequence according to the order in the virtual queue.

[0005] Optionally, the server has one, all the devices request to connect to the server, and when the connection status of the target device is the connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, including: when the connection status of the first target device is connection failure, a virtual queue is generated and the first target device and all unconnected devices are added to the virtual queue for queuing and waiting, and the queuing order of the first target device and all the unconnected devices in the virtual queue is the time order of requesting to connect to the server; or, when the connection status of the second target device is connection failure, a virtual queue is generated and the second target device is added to the virtual queue for queuing and waiting, the unconnected devices try to connect to the server in turn, and when the connection fails, they are added to the virtual queue in turn for queuing and waiting, and the queuing order of the second target device and all the unconnected devices in the virtual queue is the time order of failure to connect to the server.

[0006] Optionally, there are multiple servers, and the devices correspond to the servers one-to-one. When the connection status of the target device is the connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, including: when the connection status of the third target device is connection failure, a virtual queue is generated and the third target device and all first-category unconnected devices are added to the virtual queue for queuing and waiting, the first-category unconnected devices are devices connected to the same server as the third target device, the virtual queue also includes second-category unconnected devices and the correspondence between all the devices and all the servers, and the second-category unconnected devices are devices connected to different servers from the third target device.

[0007] Optionally, when the running state of the server is restored to a connectable state, each of the target devices is controlled to connect in sequence according to the order in the virtual queue, including: obtaining the current network capacity in the local area network and the number of devices in the virtual queue; determining the current connection capacity of the server according to the current network capacity and / or the number of devices in the virtual queue, the current connection capacity is proportional to the current network capacity, and the current connection capacity is inversely proportional to the device capacity in the virtual queue; according to the current connection capacity of the server, sending connection requests to each of the devices in the virtual queue in sequence, so that each of the devices is connected in sequence according to the order in the virtual queue.

[0008] Optionally, according to the current connection capacity of the server, the connection request is sent to each device in the virtual queue in sequence, so that each device is connected in sequence according to the order in the virtual queue, including: when the current connection capacity of the server is greater than or equal to the preset capacity, a connection request is sent to the first device ranked first in the virtual queue, and when the first device is successfully connected, the connection request is sent to all the devices in the virtual queue except the first device at the same time, so that all the devices in the virtual queue except the first device are connected in sequence according to the order in the virtual queue; when the current connection capacity of the server is less than the preset capacity, the connection request is first sent to the Nth device in the virtual queue so that the Nth device attempts to connect to the server, and when the Nth device is successfully connected, the connection request is sent to the N+1th device so that the N+1th device attempts to connect to the server, until all the devices are connected to the corresponding servers or the waiting time of the device in the virtual queue is greater than or equal to the queue timeout time.

[0009] Optionally, the method further includes: obtaining a queue timeout; and when the waiting time of the device in the virtual queue is greater than or equal to the queue timeout, removing the device from the virtual queue and sending a device connection failure notification.

[0010] Optionally, the method also includes: generating a standby queue and / or a priority queue; when the priority of the device is greater than or equal to a preset priority, adding the device to the priority queue to preferentially connect the device to the corresponding server; when the number of devices in the virtual queue is equal to the maximum threshold number, adding the device with a connection status of connection failure to the standby queue for queuing and waiting.

[0011] According to another aspect of the present application, a connection device for local area network devices is provided, comprising: a monitoring unit, for monitoring the connection status of each device in the local area network in real time, wherein the connection status is a connection failure status or a connection success status; a generating unit, for generating a virtual queue and adding the target device to the virtual queue for queuing when the connection status of the target device is the connection failure status, wherein the target device belongs to a plurality of the devices; a connecting unit, for monitoring the operating status of the server in real time, and controlling each of the target devices to connect in sequence according to the order in the virtual queue when the operating status of the server is restored to a connectable state.

[0012] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods for connecting local area network devices.

[0013] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the above-mentioned local area network device connection methods.

[0014] Applying the technical solution of the present application, the connection method of the above-mentioned LAN device first monitors the connection status of each device in the LAN in real time, and the connection status is a connection failure status or a connection success status; then, when the connection status of the target device is a connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, and the target device belongs to multiple devices; finally, the running status of the server is monitored in real time, and when the running status of the server is restored to a connectable state, each target device is controlled to connect in sequence according to the order in the virtual queue. When the device requests server data, the method first pre-processes the data and then sends it to the server, saving the server's parsing time and resources, allowing the server to process data more attentively, reducing the user's waiting time, and solving the problem of service overload caused by a device connection failure and other devices continuing to connect in the prior art when multiple devices try to connect to the same service at the same time, and can generate a virtual queue and notify other devices to queue and wait when a device fails to connect to the service, and notify the device connection in order after the service is restored, solving the overload and confusion problems when the device in the LAN connects to the service. At the same time, the stability of the system is improved and the user experience is improved through optimization measures. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0016] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for connecting a local area network device according to an embodiment of the present application is shown;

[0017] Figure 2 A schematic diagram of a flow chart of a method for connecting a local area network device according to an embodiment of the present application is shown;

[0018] Figure 3 A schematic diagram showing a flow chart of another method for connecting local area network devices provided according to an embodiment of the present application;

[0019] Figure 4 A structural block diagram of a connection device for a local area network device provided according to an embodiment of the present application is shown.

[0020] The above drawings include the following reference numerals:

[0021] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION

[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] 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.

[0024] 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 sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. 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.

[0025] As introduced in the background technology, in the prior art, when multiple devices try to connect to the same service at the same time, if one device fails to connect, other devices may still continue to try to connect, which may cause service overload and further aggravate the connection problem. In order to solve the problem in the prior art that when multiple devices try to connect to the same service at the same time, one device fails to connect while other devices continue to connect, causing service overload, the embodiments of the present application provide a connection method for a local area network device, a connection device for a local area network device, a computer-readable storage medium and an electronic device.

[0026] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0027] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for connecting a local area network device according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the connection method of the local area network device in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0029] In this embodiment, a method for connecting local area network devices running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0030] Figure 2 FIG. 1 is a flow chart of a method for connecting a local area network device according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0031] Step S201, real-time monitoring of the connection status of each device in the local area network, the connection status being a connection failure status or a connection success status;

[0032] Specifically, when the device monitoring module detects that a device fails to connect to the service, it records the identifier of the device (such as MAC address) and the time of the connection failure, and sends this information to the queue management module.

[0033] Step S202, when the connection state of the target device is the connection failure state, generating a virtual queue and adding the target device to the virtual queue for queuing and waiting, the target device belongs to a plurality of the devices;

[0034] Specifically, after receiving the information, the queue management module creates a virtual queue (if it has not been created yet) and adds the device to the queue. The devices in the queue are arranged in the order of the time when the connection failed. At the same time, the queue management module sends an instruction to the notification module, and the notification module sends a notification of waiting for connection to the device.

[0035] Among them, there is one server, and all of the above-mentioned devices request to connect to the above-mentioned server. When the connection status of the target device is the above-mentioned connection failure status, a virtual queue is generated and the above-mentioned target device is added to the above-mentioned virtual queue for queuing and waiting, including: when the connection status of the first target device is connection failure, a virtual queue is generated and the above-mentioned first target device and all unconnected devices are added to the above-mentioned virtual queue for queuing and waiting, and the queuing order of the above-mentioned first target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of requesting to connect to the above-mentioned server; or, when the connection status of the second target device is connection failure, a virtual queue is generated and the above-mentioned second target device is added to the above-mentioned virtual queue for queuing and waiting, and the above-mentioned unconnected devices try to connect to the above-mentioned server in turn, and when the connection fails, they are added to the above-mentioned virtual queue in turn for queuing and waiting, and the queuing order of the above-mentioned second target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of the connection failure with the above-mentioned server.

[0036] Specifically, this can solve the overload and confusion problems when devices in the local area network connect to services. At the same time, through optimization measures, the stability of the system is improved and the user experience is enhanced.

[0037] The choice of the first or second processing method depends on the current network situation. If the network is sufficient, the device that failed to connect will be added to the virtual queue for waiting in queue, and the unconnected devices will try to connect to the server in turn. If the network is tight, the device that failed to connect and all unconnected devices will be added to the virtual queue for waiting in queue. It can also be determined based on the number of unconnected devices. When the number of unconnected devices exceeds 20, the device that failed to connect and all unconnected devices will be added to the virtual queue for waiting in queue. Otherwise, the first processing method will be used.

[0038] Among them, there are multiple servers, and the devices correspond to the servers one by one. When the connection status of the target device is the connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, including: when the connection status of the third target device is connection failure, a virtual queue is generated and the third target device and all first-category unconnected devices are added to the virtual queue for queuing and waiting. The first-category unconnected device is a device connected to the same server as the third target device. The virtual queue also includes the second-category unconnected device and the correspondence between all the devices and all the servers. The second-category unconnected device is a device connected to a different server than the third target device.

[0039] Specifically, this solves the overload and confusion problems when devices in the local area network connect to services, and improves the stability of the multi-device connection system. In the case of multiple servers, if a device fails to connect, the device can be added to the virtual queue for waiting in line, and the unconnected devices that request to connect to the server to which the failed device is connected try to connect to the server in turn.

[0040] The selection of the first processing method or the second processing method may also depend on the current network conditions and the number of unconnected devices.

[0041] Step S203, monitoring the running status of the server in real time, and controlling each of the above target devices to connect in sequence according to the order in the above virtual queue.

[0042] Specifically, the service status monitoring module periodically detects the connection status of the service. When the service is detected to be restored, the status information is sent to the queue management module. After receiving the service restoration information, the queue management module notifies the devices one by one in the order in the queue to connect to the service. The notification module is responsible for sending connection notifications to the devices. After receiving the connection notification, the device attempts to connect to the service. If the connection is successful, a feedback of successful connection is sent to the queue management module; if the connection fails, it rejoins the end of the queue and waits for the next connection notification.

[0043] Wherein, when the running state of the server is restored to a connectable state, controlling each of the target devices to connect in sequence according to the order in the virtual queue comprises the following steps:

[0044] Step S301, obtaining the current network capacity of the local area network and the number of devices in the virtual queue;

[0045] Step S302, determining the current connection capacity of the server according to the current network capacity and / or the number of devices in the virtual queue, wherein the current connection capacity is proportional to the current network capacity and inversely proportional to the device capacity in the virtual queue;

[0046] Step S303: sending connection requests to the devices in the virtual queue in sequence according to the current connection capacity of the server, so that the devices are connected in sequence according to the order in the virtual queue.

[0047] Specifically, when a device fails to connect to the service, a virtual queue can be generated and other devices can be notified to wait in line. After the service is restored, the devices can be notified to connect in order, solving the overload and confusion problems when devices connect to the service in the local area network.

[0048] According to the current connection capacity of the server, the connection request is sent to each of the devices in the virtual queue in sequence, so that each of the devices is connected in sequence according to the order in the virtual queue, including the following steps:

[0049] Step S401, when the current connection capacity of the server is greater than or equal to the preset capacity, sending a connection request to the first device ranked first in the virtual queue, and when the first device is successfully connected, sending the connection request to all the devices in the virtual queue except the first device at the same time, so that all the devices in the virtual queue except the first device are connected in sequence according to the order in the virtual queue;

[0050] Step S402, when the current connection capacity of the above-mentioned server is less than the above-mentioned preset capacity, first send the above-mentioned connection request to the Nth device in the above-mentioned virtual queue so that the above-mentioned Nth device attempts to connect to the above-mentioned server, and when the above-mentioned Nth device is successfully connected, then send the above-mentioned connection request to the N+1th device so that the above-mentioned N+1th device attempts to connect to the above-mentioned server, until all of the above-mentioned devices are connected to the corresponding above-mentioned servers or the waiting time of the above-mentioned devices in the above-mentioned virtual queue is greater than or equal to the queue timeout time, until all of the above-mentioned devices are connected to the corresponding above-mentioned servers or the waiting time of the above-mentioned devices in the above-mentioned virtual queue is greater than or equal to the queue timeout time.

[0051] Specifically, in this way, the devices can be notified to connect in order after the service is restored, thereby solving the overload and confusion problems when the devices in the local area network connect to the service.

[0052] Among them, if the current network capacity is sufficient, after the first service is restored, the second and third connection attempts are notified one by one to speed up the recovery speed; the network generally notifies the next connection after the previous connection is restored. It can also depend on the number of devices in the queue; for example, when there are many devices in the queue, more than 20, the second solution is adopted, and the second and third connection attempts are notified one by one; on the contrary, if there are few devices in the queue, the next connection is notified after the previous connection is restored. This solution is very flexible and is not limited here.

[0053] The above method further comprises the following steps:

[0054] Step S501, obtaining the queue timeout time;

[0055] Step S502: When the waiting time of the device in the virtual queue is greater than or equal to the queue timeout time, the device is removed from the virtual queue and a device connection failure notification is sent.

[0056] Specifically, this can prevent the device from waiting for a long time. Set the timeout of the queue. If the device waits in the queue for longer than the preset timeout, it will be removed from the queue and a connection failure notification will be sent. The timeout setting generally depends on user needs and can be five minutes, ten minutes, half an hour or one hour.

[0057] The length of the virtual queue (the capacity of the devices in the virtual queue) is itself a limit on the waiting time. The length of the virtual queue is based on the network status and the number of devices that can be added. On this basis, the waiting time can be estimated based on the statistics of the processing time of a single device and its location, that is, the waiting time of the last device can be calculated and the devices can be removed one by one to shorten the queue length.

[0058] The above method further comprises the following steps:

[0059] Step S601, generating a standby queue and / or a priority queue;

[0060] Step S602, when the priority of the device is greater than or equal to the preset priority, adding the device to the priority queue to preferentially connect the device to the corresponding server;

[0061] Step S603: When the number of the devices in the virtual queue is equal to the maximum threshold number, the devices whose connection status is connection failure are added to the standby queue for queuing.

[0062] Specifically, this can improve the robustness of the system. When the number of devices in the main queue reaches the preset upper limit, the newly added device can be placed in the standby queue; for important devices or urgent tasks, they can be placed in the priority queue and notified of their connection first.

[0063] The connection method of the above-mentioned LAN device of the present application first monitors the connection status of each device in the LAN in real time, and the connection status is a connection failure status or a connection success status; then, when the connection status of the target device is a connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, and the target device belongs to multiple devices; finally, the running status of the server is monitored in real time, and when the running status of the server is restored to a connectable state, each target device is controlled to connect in sequence according to the order in the virtual queue. When the device requests server data, the method first pre-processes the data, and then sends it to the server, saving the server's parsing time and resources, allowing the server to process data more attentively, reducing the user's waiting time, and solving the problem of service overload caused by a device connection failure and other devices continuing to connect when multiple devices try to connect to the same service at the same time in the prior art, and can generate a virtual queue and notify other devices to queue and wait when a device fails to connect to the service, and then notify the device connection in order after the service is restored, solving the overload and confusion problems when the device in the LAN connects to the service. At the same time, the stability of the system is improved and the user experience is improved through optimization measures.

[0064] As an optional implementation plan, this solution consists of multiple modules, mainly including the following modules: Device monitoring module: real-time monitoring of the connection status of devices in the LAN, once the device connection fails, triggering the queue management module. Queue management module: responsible for creating and maintaining virtual queues. When a device fails to connect, it is added to the queue; when the service is restored, the device is notified to connect in the order in the queue. Service status monitoring module: regularly detects the connection status of the service and feeds back the status information to the queue management module. Notification module: responsible for sending connection or waiting notifications to the device.

[0065] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the connection method of the local area network device of the present application will be described in detail below in combination with specific embodiments.

[0066] This embodiment relates to a specific method for connecting local area network devices, such as Figure 3 As shown, the following steps are included:

[0067] Step S1: When the device monitoring module detects that a device fails to connect to the service, it records the device's identifier (MAC address) and the time of the connection failure, and sends this information to the queue management module;

[0068] Step S2: After receiving the information, the queue management module creates a virtual queue (if it has not been created yet) and adds the device to the queue. The devices in the queue are arranged in the order of the time when the connection failed;

[0069] Step S3: the queue management module sends an instruction to the notification module, the notification module sends a notification of waiting for connection to the device, and the service status monitoring module periodically detects the connection status of the service;

[0070] Step S4: When service recovery is detected, the status information is sent to the queue management module. After receiving the service recovery information, the queue management module notifies the devices one by one in the order in the queue to connect to the service. The notification module is responsible for sending connection notifications to the devices;

[0071] Step S5: After receiving the connection notification, the device attempts to connect to the service. If the connection is successful, it sends a successful connection feedback to the queue management module; if the connection fails, it rejoins the end of the queue and waits for the next connection notification.

[0072] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0073] The embodiment of the present application also provides a connection device for a local area network device. It should be noted that the connection device for the local area network device of the embodiment of the present application can be used to execute the connection method for the local area network device provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions have been made and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0074] The following is an introduction to the connection device of the local area network device provided in the embodiment of the present application.

[0075] Figure 4 Schematic diagram of a connection device for a local area network device according to an embodiment of the present application. Figure 4 As shown, the device includes: a monitoring unit 10, a generating unit 20 and a connecting unit 30, the monitoring unit 10 is used for real-time monitoring of the connection status of each device in the local area network, the above connection status is a connection failure status or a connection success status; the generating unit 20 is used for generating a virtual queue and adding the above target device to the above virtual queue for queuing when the connection status of the target device is the above connection failure status, and the above target device belongs to multiple above devices; the connecting unit 30 is used for real-time monitoring of the running status of the server, and when the running status of the above server is restored to a connectable state, controlling each of the above target devices to connect in sequence according to the order in the above virtual queue.

[0076] The above-mentioned connection device of the local area network device of the present application includes: a monitoring unit, a generating unit and a connecting unit, the monitoring unit is used to monitor the connection status of each device in the local area network in real time, and the connection status is a connection failure status or a connection success status; the generating unit is used to generate a virtual queue and add the target device to the virtual queue for queuing and waiting when the connection status of the target device is a connection failure status, and the target device belongs to multiple devices; the connecting unit is used to monitor the running status of the server in real time, and when the running status of the server is restored to a connectable state, control each target device to connect in sequence according to the order in the virtual queue. When the device requests the server data, the device first pre-processes the data and then sends it to the server, saving the server's parsing time and resources, allowing the server to process the data more attentively, reducing the user's waiting time, solving the problem in the prior art that when multiple devices try to connect to the same service at the same time, a device fails to connect and other devices continue to connect, which will cause the service to be overloaded, and can generate a virtual queue and notify other devices to queue and wait when a device fails to connect to the service, and then notify the device to connect in order after the service is restored, solving the overload and confusion problems when the device in the local area network connects to the service. At the same time, optimization measures are taken to improve system stability and enhance user experience.

[0077] In some examples, the generation unit includes a first processing module and a second processing module. The first processing module is used to generate a virtual queue and add the first target device and all unconnected devices to the virtual queue for queuing and waiting when the connection state of the first target device is a connection failure. The queuing order of the first target device and all unconnected devices in the virtual queue is the time sequence of requesting to connect to the server; or, the second processing module is used to generate a virtual queue and add the second target device to the virtual queue for queuing and waiting when the connection state of the second target device is a connection failure. The unconnected device sequentially attempts to connect to the server, and is sequentially added to the virtual queue for queuing and waiting when the connection fails. The queuing order of the second target device and all unconnected devices in the virtual queue is the time sequence of the failure to connect to the server. This can solve the overload and confusion problems when devices in the local area network connect to services. At the same time, the stability of the system is improved through optimization measures, and the user experience is enhanced.

[0078] In some examples, the generation unit includes a third processing module, which is used to generate a virtual queue and add the third target device and all the first-class unconnected devices to the virtual queue for queuing when the connection status of the third target device is connection failure. The first-class unconnected devices are devices connected to the same server as the third target device. The virtual queue also includes the second-class unconnected devices and the correspondence between all the devices and all the servers. The second-class unconnected devices are devices connected to different servers than the third target device. This solves the overload and confusion problems when devices connect to services in the local area network, and improves the stability of the multi-device connection system.

[0079] In some instances, the connection unit includes a first acquisition module, a first determination module and a fourth processing module, wherein the first acquisition module is used to acquire the current network capacity in the local area network and the number of devices in the virtual queue; the first determination module is used to determine the current connection capacity of the server according to the current network capacity and / or the number of devices in the virtual queue, wherein the current connection capacity is proportional to the current network capacity and inversely proportional to the device capacity in the virtual queue; the fourth processing module is used to send connection requests to each of the devices in the virtual queue in turn according to the current connection capacity of the server, so that each of the devices is connected in turn according to the order in the virtual queue. In this way, when a device fails to connect to the service, a virtual queue can be generated and other devices can be notified to queue up and wait, and the devices can be notified to connect in order after the service is restored, thereby solving the overload and confusion problems when devices in the local area network connect to the service.

[0080] In some instances, the fourth processing module includes a fifth processing module and a sixth processing module, the fifth processing module being used to send a connection request to the first device ranked first in the virtual queue when the current connection capacity of the server is greater than or equal to the preset capacity, and when the first device is successfully connected, simultaneously sending the connection request to all the devices in the virtual queue except the first device, so that all the devices in the virtual queue except the first device are connected in sequence according to the order in the virtual queue; the sixth processing module being used to first send the connection request to the Nth device in the virtual queue when the current connection capacity of the server is less than the preset capacity, so that the Nth device attempts to connect to the server, and when the Nth device is successfully connected, then send the connection request to the N+1th device so that the N+1th device attempts to connect to the server, until all the devices are connected to the corresponding servers or the waiting time of the devices in the virtual queue is greater than or equal to the queue timeout time, until all the devices are connected to the corresponding servers or the waiting time of the devices in the virtual queue is greater than or equal to the queue timeout time. In this way, the devices can be notified to connect in order after the service is restored, solving the overload and confusion problems when the devices in the LAN connect to the service.

[0081] In some examples, the apparatus further includes a second acquisition module and a seventh processing module, wherein the second acquisition module is used to acquire the queue timeout time; and the seventh processing module is used to remove the device from the virtual queue and send a device connection failure notification when the waiting time of the device in the virtual queue is greater than or equal to the queue timeout time. This can avoid the device from waiting for a long time.

[0082] In some examples, the apparatus further includes an eighth processing module, a first connection module and a ninth processing module, wherein the eighth processing module is used to generate a standby queue and / or a priority queue; the first connection module is used to add the device to the priority queue when the priority of the device is greater than or equal to the preset priority, so as to preferentially connect the device to the corresponding server; the ninth processing module is used to add the device whose connection status is connection failure to the standby queue for queuing when the number of the devices in the virtual queue is equal to the maximum threshold number. This can improve the robustness of the system.

[0083] The connection device of the LAN device includes a processor and a memory. The monitoring unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.

[0084] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters are adjusted to solve the problem in the prior art that when multiple devices try to connect to the same service at the same time, one device fails to connect while other devices continue to connect, causing service overload.

[0085] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0086] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for connecting the local area network devices.

[0087] Specifically, the connection method of the LAN device includes:

[0088] Step S201, real-time monitoring of the connection status of each device in the local area network, the connection status being a connection failure status or a connection success status;

[0089] Specifically, when the device monitoring module detects that a device fails to connect to the service, it records the identifier of the device (such as MAC address) and the time of the connection failure, and sends this information to the queue management module.

[0090] Step S202, when the connection state of the target device is the connection failure state, generating a virtual queue and adding the target device to the virtual queue for queuing and waiting, the target device belongs to a plurality of the devices;

[0091] Specifically, after receiving the information, the queue management module creates a virtual queue (if it has not been created yet) and adds the device to the queue. The devices in the queue are arranged in the order of the time when the connection failed. At the same time, the queue management module sends an instruction to the notification module, and the notification module sends a notification of waiting for connection to the device.

[0092] Step S203, monitoring the running status of the server in real time, and when the running status of the server is restored to a connectable state, controlling each of the target devices to connect in sequence according to the order in the virtual queue.

[0093] Specifically, the service status monitoring module periodically detects the connection status of the service. When the service is detected to be restored, the status information is sent to the queue management module. After receiving the service restoration information, the queue management module notifies the devices one by one in the order in the queue to connect to the service. The notification module is responsible for sending connection notifications to the devices. After receiving the connection notification, the device attempts to connect to the service. If the connection is successful, a feedback of successful connection is sent to the queue management module; if the connection fails, it rejoins the end of the queue and waits for the next connection notification.

[0094] Optionally, there is one server, and all of the above-mentioned devices request to connect to the above-mentioned server. When the connection status of the target device is the above-mentioned connection failure status, a virtual queue is generated and the above-mentioned target device is added to the above-mentioned virtual queue for queuing and waiting, including: when the connection status of the first target device is connection failure, a virtual queue is generated and the above-mentioned first target device and all unconnected devices are added to the above-mentioned virtual queue for queuing and waiting, and the queuing order of the above-mentioned first target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of requesting to connect to the above-mentioned server; or, when the connection status of the second target device is connection failure, a virtual queue is generated and the above-mentioned second target device is added to the above-mentioned virtual queue for queuing and waiting, and the above-mentioned unconnected devices try to connect to the above-mentioned server in turn, and when the connection fails, they are added to the above-mentioned virtual queue in turn for queuing and waiting, and the queuing order of the above-mentioned second target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of the connection failure with the above-mentioned server.

[0095] Optionally, there are multiple servers, and the devices correspond to the servers one-to-one. When the connection status of the target device is the connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, including: when the connection status of the third target device is connection failure, a virtual queue is generated and the third target device and all first-category unconnected devices are added to the virtual queue for queuing and waiting. The first-category unconnected device is a device connected to the same server as the third target device. The virtual queue also includes the second-category unconnected device and the correspondence between all the devices and all the servers. The second-category unconnected device is a device connected to a different server from the third target device.

[0096] Optionally, when the running state of the above-mentioned server is restored to a connectable state, each of the above-mentioned target devices is controlled to connect in sequence according to the order in the above-mentioned virtual queue, including: obtaining the current network capacity in the above-mentioned local area network and the number of devices in the above-mentioned virtual queue; determining the current connection capacity of the above-mentioned server according to the above-mentioned current network capacity and / or the number of devices in the above-mentioned virtual queue, the above-mentioned current connection capacity is proportional to the above-mentioned current network capacity, and the above-mentioned current connection capacity is inversely proportional to the device capacity in the above-mentioned virtual queue; according to the current connection capacity of the above-mentioned server, sending connection requests to each of the above-mentioned devices in the above-mentioned virtual queue in sequence, so that each of the above-mentioned devices is connected in sequence according to the order in the above-mentioned virtual queue.

[0097] Optionally, according to the current connection capacity of the above-mentioned server, connection requests are sent to each of the above-mentioned devices in the above-mentioned virtual queue in sequence, so that each of the above-mentioned devices is connected in sequence according to the order in the above-mentioned virtual queue, including: when the current connection capacity of the above-mentioned server is greater than or equal to the preset capacity, a connection request is sent to the first device ranked first in the above-mentioned virtual queue, and when the above-mentioned first device is successfully connected, the above-mentioned connection request is sent to all the above-mentioned devices in the above-mentioned virtual queue except the above-mentioned first device at the same time, so that all the above-mentioned devices in the above-mentioned virtual queue except the above-mentioned first device are connected in sequence according to the order in the above-mentioned virtual queue; when the current connection capacity of the above-mentioned server is less than the above-mentioned preset capacity, the above-mentioned connection request is first sent to the Nth device in the above-mentioned virtual queue so that the above-mentioned Nth device attempts to connect to the above-mentioned server, and when the above-mentioned Nth device is successfully connected, the above-mentioned connection request is sent to the N+1th device so that the above-mentioned N+1th device attempts to connect to the above-mentioned server, until all of the above-mentioned devices are connected to the corresponding above-mentioned servers or the waiting time of the above-mentioned devices in the above-mentioned virtual queue is greater than or equal to the queue timeout time.

[0098] Optionally, the method further includes: obtaining a queue timeout; if the waiting time of the device in the virtual queue is greater than or equal to the queue timeout, removing the device from the virtual queue and sending a device connection failure notification.

[0099] Optionally, the above method also includes: generating a standby queue and / or a priority queue; when the priority of the above device is greater than or equal to the preset priority, adding the above device to the above priority queue to preferentially connect the above device to the corresponding above server; when the number of the above devices in the above virtual queue is equal to the maximum threshold number, adding the above device with a connection status of connection failure to the above standby queue for queuing and waiting.

[0100] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the program executes the connection method of the local area network device when running.

[0101] Specifically, the connection method of the LAN device includes:

[0102] Step S201, real-time monitoring of the connection status of each device in the local area network, the connection status being a connection failure status or a connection success status;

[0103] Specifically, when the device monitoring module detects that a device fails to connect to the service, it records the identifier of the device (such as MAC address) and the time of the connection failure, and sends this information to the queue management module.

[0104] Step S202, when the connection state of the target device is the connection failure state, generating a virtual queue and adding the target device to the virtual queue for queuing and waiting, the target device belongs to a plurality of the devices;

[0105] Specifically, after receiving the information, the queue management module creates a virtual queue (if it has not been created yet) and adds the device to the queue. The devices in the queue are arranged in the order of the time when the connection failed. At the same time, the queue management module sends an instruction to the notification module, and the notification module sends a notification of waiting for connection to the device.

[0106] Step S203, monitoring the running status of the server in real time, and when the running status of the server is restored to a connectable state, controlling each of the target devices to connect in sequence according to the order in the virtual queue.

[0107] Specifically, the service status monitoring module periodically detects the connection status of the service. When the service is detected to be restored, the status information is sent to the queue management module. After receiving the service restoration information, the queue management module notifies the devices one by one in the order in the queue to connect to the service. The notification module is responsible for sending connection notifications to the devices. After receiving the connection notification, the device attempts to connect to the service. If the connection is successful, a feedback of successful connection is sent to the queue management module; if the connection fails, it rejoins the end of the queue and waits for the next connection notification.

[0108] Optionally, there is one server, and all of the above-mentioned devices request to connect to the above-mentioned server. When the connection status of the target device is the above-mentioned connection failure status, a virtual queue is generated and the above-mentioned target device is added to the above-mentioned virtual queue for queuing and waiting, including: when the connection status of the first target device is connection failure, a virtual queue is generated and the above-mentioned first target device and all unconnected devices are added to the above-mentioned virtual queue for queuing and waiting, and the queuing order of the above-mentioned first target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of requesting to connect to the above-mentioned server; or, when the connection status of the second target device is connection failure, a virtual queue is generated and the above-mentioned second target device is added to the above-mentioned virtual queue for queuing and waiting, and the above-mentioned unconnected devices try to connect to the above-mentioned server in turn, and when the connection fails, they are added to the above-mentioned virtual queue in turn for queuing and waiting, and the queuing order of the above-mentioned second target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of the connection failure with the above-mentioned server.

[0109] Optionally, there are multiple servers, and the devices correspond to the servers one-to-one. When the connection status of the target device is the connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, including: when the connection status of the third target device is connection failure, a virtual queue is generated and the third target device and all first-category unconnected devices are added to the virtual queue for queuing and waiting. The first-category unconnected device is a device connected to the same server as the third target device. The virtual queue also includes the second-category unconnected device and the correspondence between all the devices and all the servers. The second-category unconnected device is a device connected to a different server from the third target device.

[0110] Optionally, when the running state of the above-mentioned server is restored to a connectable state, each of the above-mentioned target devices is controlled to connect in sequence according to the order in the above-mentioned virtual queue, including: obtaining the current network capacity in the above-mentioned local area network and the number of devices in the above-mentioned virtual queue; determining the current connection capacity of the above-mentioned server according to the above-mentioned current network capacity and / or the number of devices in the above-mentioned virtual queue, the above-mentioned current connection capacity is proportional to the above-mentioned current network capacity, and the above-mentioned current connection capacity is inversely proportional to the device capacity in the above-mentioned virtual queue; according to the current connection capacity of the above-mentioned server, sending connection requests to each of the above-mentioned devices in the above-mentioned virtual queue in sequence, so that each of the above-mentioned devices is connected in sequence according to the order in the above-mentioned virtual queue.

[0111] Optionally, according to the current connection capacity of the above-mentioned server, connection requests are sent to each of the above-mentioned devices in the above-mentioned virtual queue in sequence, so that each of the above-mentioned devices is connected in sequence according to the order in the above-mentioned virtual queue, including: when the current connection capacity of the above-mentioned server is greater than or equal to the preset capacity, a connection request is sent to the first device ranked first in the above-mentioned virtual queue, and when the above-mentioned first device is successfully connected, the above-mentioned connection request is sent to all the above-mentioned devices in the above-mentioned virtual queue except the above-mentioned first device at the same time, so that all the above-mentioned devices in the above-mentioned virtual queue except the above-mentioned first device are connected in sequence according to the order in the above-mentioned virtual queue; when the current connection capacity of the above-mentioned server is less than the above-mentioned preset capacity, the above-mentioned connection request is first sent to the Nth device in the above-mentioned virtual queue so that the above-mentioned Nth device attempts to connect to the above-mentioned server, and when the above-mentioned Nth device is successfully connected, the above-mentioned connection request is sent to the N+1th device so that the above-mentioned N+1th device attempts to connect to the above-mentioned server, until all of the above-mentioned devices are connected to the corresponding above-mentioned servers or the waiting time of the above-mentioned devices in the above-mentioned virtual queue is greater than or equal to the queue timeout time.

[0112] Optionally, the method further includes: obtaining a queue timeout; if the waiting time of the device in the virtual queue is greater than or equal to the queue timeout, removing the device from the virtual queue and sending a device connection failure notification.

[0113] Optionally, the above method also includes: generating a standby queue and / or a priority queue; when the priority of the above device is greater than or equal to the preset priority, adding the above device to the above priority queue to preferentially connect the above device to the corresponding above server; when the number of the above devices in the above virtual queue is equal to the maximum threshold number, adding the above device with a connection status of connection failure to the above standby queue for queuing and waiting.

[0114] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:

[0115] Step S201, real-time monitoring of the connection status of each device in the local area network, the connection status being a connection failure status or a connection success status;

[0116] Step S202, when the connection state of the target device is the connection failure state, generating a virtual queue and adding the target device to the virtual queue for queuing and waiting, the target device belongs to a plurality of the devices;

[0117] Step S203, monitoring the running status of the server in real time, and when the running status of the server is restored to a connectable state, controlling each of the target devices to connect in sequence according to the order in the virtual queue.

[0118] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0119] Optionally, there is one server, and all of the above-mentioned devices request to connect to the above-mentioned server. When the connection status of the target device is the above-mentioned connection failure status, a virtual queue is generated and the above-mentioned target device is added to the above-mentioned virtual queue for queuing and waiting, including: when the connection status of the first target device is connection failure, a virtual queue is generated and the above-mentioned first target device and all unconnected devices are added to the above-mentioned virtual queue for queuing and waiting, and the queuing order of the above-mentioned first target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of requesting to connect to the above-mentioned server; or, when the connection status of the second target device is connection failure, a virtual queue is generated and the above-mentioned second target device is added to the above-mentioned virtual queue for queuing and waiting, and the above-mentioned unconnected devices try to connect to the above-mentioned server in turn, and when the connection fails, they are added to the above-mentioned virtual queue in turn for queuing and waiting, and the queuing order of the above-mentioned second target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of the connection failure with the above-mentioned server.

[0120] Optionally, there are multiple servers, and the devices correspond to the servers one-to-one. When the connection status of the target device is the connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, including: when the connection status of the third target device is connection failure, a virtual queue is generated and the third target device and all first-category unconnected devices are added to the virtual queue for queuing and waiting. The first-category unconnected device is a device connected to the same server as the third target device. The virtual queue also includes the second-category unconnected device and the correspondence between all the devices and all the servers. The second-category unconnected device is a device connected to a different server from the third target device.

[0121] Optionally, when the running state of the above-mentioned server is restored to a connectable state, each of the above-mentioned target devices is controlled to connect in sequence according to the order in the above-mentioned virtual queue, including: obtaining the current network capacity in the above-mentioned local area network and the number of devices in the above-mentioned virtual queue; determining the current connection capacity of the above-mentioned server according to the above-mentioned current network capacity and / or the number of devices in the above-mentioned virtual queue, the above-mentioned current connection capacity is proportional to the above-mentioned current network capacity, and the above-mentioned current connection capacity is inversely proportional to the device capacity in the above-mentioned virtual queue; according to the current connection capacity of the above-mentioned server, sending connection requests to each of the above-mentioned devices in the above-mentioned virtual queue in sequence, so that each of the above-mentioned devices is connected in sequence according to the order in the above-mentioned virtual queue.

[0122] Optionally, according to the current connection capacity of the above-mentioned server, connection requests are sent to each of the above-mentioned devices in the above-mentioned virtual queue in sequence, so that each of the above-mentioned devices is connected in sequence according to the order in the above-mentioned virtual queue, including: when the current connection capacity of the above-mentioned server is greater than or equal to the preset capacity, a connection request is sent to the first device ranked first in the above-mentioned virtual queue, and when the above-mentioned first device is successfully connected, the above-mentioned connection request is sent to all the above-mentioned devices in the above-mentioned virtual queue except the above-mentioned first device at the same time, so that all the above-mentioned devices in the above-mentioned virtual queue except the above-mentioned first device are connected in sequence according to the order in the above-mentioned virtual queue; when the current connection capacity of the above-mentioned server is less than the above-mentioned preset capacity, the above-mentioned connection request is first sent to the Nth device in the above-mentioned virtual queue so that the above-mentioned Nth device attempts to connect to the above-mentioned server, and when the above-mentioned Nth device is successfully connected, the above-mentioned connection request is sent to the N+1th device so that the above-mentioned N+1th device attempts to connect to the above-mentioned server, until all of the above-mentioned devices are connected to the corresponding above-mentioned servers or the waiting time of the above-mentioned devices in the above-mentioned virtual queue is greater than or equal to the queue timeout time.

[0123] Optionally, the method further includes: obtaining a queue timeout; if the waiting time of the device in the virtual queue is greater than or equal to the queue timeout, removing the device from the virtual queue and sending a device connection failure notification.

[0124] Optionally, the above method also includes: generating a standby queue and / or a priority queue; when the priority of the above device is greater than or equal to the preset priority, adding the above device to the above priority queue to preferentially connect the above device to the corresponding above server; when the number of the above devices in the above virtual queue is equal to the maximum threshold number, adding the above device with a connection status of connection failure to the above standby queue for queuing and waiting.

[0125] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0126] Step S201, real-time monitoring of the connection status of each device in the local area network, the connection status being a connection failure status or a connection success status;

[0127] Step S202, when the connection state of the target device is the connection failure state, generating a virtual queue and adding the target device to the virtual queue for queuing and waiting, the target device belongs to a plurality of the devices;

[0128] Step S203, monitoring the running status of the server in real time, and when the running status of the server is restored to a connectable state, controlling each of the target devices to connect in sequence according to the order in the virtual queue.

[0129] Optionally, there is one server, and all of the above-mentioned devices request to connect to the above-mentioned server. When the connection status of the target device is the above-mentioned connection failure status, a virtual queue is generated and the above-mentioned target device is added to the above-mentioned virtual queue for queuing and waiting, including: when the connection status of the first target device is connection failure, a virtual queue is generated and the above-mentioned first target device and all unconnected devices are added to the above-mentioned virtual queue for queuing and waiting, and the queuing order of the above-mentioned first target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of requesting to connect to the above-mentioned server; or, when the connection status of the second target device is connection failure, a virtual queue is generated and the above-mentioned second target device is added to the above-mentioned virtual queue for queuing and waiting, and the above-mentioned unconnected devices try to connect to the above-mentioned server in turn, and when the connection fails, they are added to the above-mentioned virtual queue in turn for queuing and waiting, and the queuing order of the above-mentioned second target device and all the above-mentioned unconnected devices in the above-mentioned virtual queue is the time order of the connection failure with the above-mentioned server.

[0130] Optionally, there are multiple servers, and the devices correspond to the servers one-to-one. When the connection status of the target device is the connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, including: when the connection status of the third target device is connection failure, a virtual queue is generated and the third target device and all first-category unconnected devices are added to the virtual queue for queuing and waiting. The first-category unconnected device is a device connected to the same server as the third target device. The virtual queue also includes the second-category unconnected device and the correspondence between all the devices and all the servers. The second-category unconnected device is a device connected to a different server from the third target device.

[0131] Optionally, when the running state of the above-mentioned server is restored to a connectable state, each of the above-mentioned target devices is controlled to connect in sequence according to the order in the above-mentioned virtual queue, including: obtaining the current network capacity in the above-mentioned local area network and the number of devices in the above-mentioned virtual queue; determining the current connection capacity of the above-mentioned server according to the above-mentioned current network capacity and / or the number of devices in the above-mentioned virtual queue, the above-mentioned current connection capacity is proportional to the above-mentioned current network capacity, and the above-mentioned current connection capacity is inversely proportional to the device capacity in the above-mentioned virtual queue; according to the current connection capacity of the above-mentioned server, sending connection requests to each of the above-mentioned devices in the above-mentioned virtual queue in sequence, so that each of the above-mentioned devices is connected in sequence according to the order in the above-mentioned virtual queue.

[0132] Optionally, according to the current connection capacity of the above-mentioned server, connection requests are sent to each of the above-mentioned devices in the above-mentioned virtual queue in sequence, so that each of the above-mentioned devices is connected in sequence according to the order in the above-mentioned virtual queue, including: when the current connection capacity of the above-mentioned server is greater than or equal to the preset capacity, a connection request is sent to the first device ranked first in the above-mentioned virtual queue, and when the above-mentioned first device is successfully connected, the above-mentioned connection request is sent to all the above-mentioned devices in the above-mentioned virtual queue except the above-mentioned first device at the same time, so that all the above-mentioned devices in the above-mentioned virtual queue except the above-mentioned first device are connected in sequence according to the order in the above-mentioned virtual queue; when the current connection capacity of the above-mentioned server is less than the above-mentioned preset capacity, the above-mentioned connection request is first sent to the Nth device in the above-mentioned virtual queue so that the above-mentioned Nth device attempts to connect to the above-mentioned server, and when the above-mentioned Nth device is successfully connected, the above-mentioned connection request is sent to the N+1th device so that the above-mentioned N+1th device attempts to connect to the above-mentioned server, until all of the above-mentioned devices are connected to the corresponding above-mentioned servers or the waiting time of the above-mentioned devices in the above-mentioned virtual queue is greater than or equal to the queue timeout time.

[0133] Optionally, the method further includes: obtaining a queue timeout; if the waiting time of the device in the virtual queue is greater than or equal to the queue timeout, removing the device from the virtual queue and sending a device connection failure notification.

[0134] Optionally, the above method also includes: generating a standby queue and / or a priority queue; when the priority of the above device is greater than or equal to the preset priority, adding the above device to the above priority queue to preferentially connect the above device to the corresponding above server; when the number of the above devices in the above virtual queue is equal to the maximum threshold number, adding the above device with a connection status of connection failure to the above standby queue for queuing and waiting.

[0135] Obviously, those skilled in the art should understand that the above modules or steps of the present invention 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, 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 than here, 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 invention is not limited to any specific combination of hardware and software.

[0136] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0137] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0138] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0140] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0141] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0142] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0143] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0144] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0145] 1) The connection method of the above-mentioned LAN device of the present application first monitors the connection status of each device in the LAN in real time, and the connection status is a connection failure status or a connection success status; then, when the connection status of the target device is a connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, and the target device belongs to multiple devices; finally, the running status of the server is monitored in real time, and when the running status of the server is restored to a connectable state, each target device is controlled to connect in sequence according to the order in the virtual queue. When the device requests server data, the method first pre-processes the data and then sends it to the server, saving the server's parsing time and resources, allowing the server to process data more attentively, reducing the user's waiting time, and solving the problem of service overload caused by a device connection failure and other devices continuing to connect when multiple devices try to connect to the same service at the same time in the prior art, and can generate a virtual queue and notify other devices to queue and wait when a device fails to connect to the service, and notify the device connection in order after the service is restored, solving the overload and confusion problems when the device connects to the service in the LAN. At the same time, the stability of the system is improved and the user experience is enhanced through optimization measures.

[0146] 2) The connection device of the above-mentioned LAN device of the present application includes: a monitoring unit, a generating unit and a connecting unit, the monitoring unit is used to monitor the connection status of each device in the LAN in real time, the connection status is a connection failure status or a connection success status; the generating unit is used to generate a virtual queue and add the target device to the virtual queue for queuing and waiting when the connection status of the target device is a connection failure status, and the target device belongs to multiple devices; the connecting unit is used to monitor the running status of the server in real time, and when the running status of the server is restored to a connectable state, control each target device to connect in sequence according to the order in the virtual queue. When the device requests the server data, the device first pre-processes the data and then sends it to the server, saving the server's parsing time and resources, allowing the server to process the data more attentively, reducing the user's waiting time, solving the problem in the prior art that when multiple devices try to connect to the same service at the same time, a device fails to connect while other devices continue to connect, which will cause service overload, and can generate a virtual queue and notify other devices to queue and wait when a device fails to connect to the service, and notify the device to connect in order after the service is restored, solving the overload and confusion problems when the devices in the LAN connect to the service. At the same time, optimization measures are taken to improve system stability and enhance user experience.

[0147] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for connecting local area network devices, characterized in that: include: Real-time monitoring of the connection status of each device in the local area network, wherein the connection status is a connection failure status or a connection success status; When the connection state of the target device is the connection failure state, generating a virtual queue and adding the target device to the virtual queue for queuing and waiting, the target device belonging to a plurality of the devices; The running state of the server is monitored in real time, and when the running state of the server is restored to a connectable state, each of the target devices is controlled to connect in sequence according to the order in the virtual queue.

2. The method according to claim 1, characterized in that: There is one server, all the devices request to connect to the server, and when the connection status of the target device is the connection failure status, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, including: When the connection status of the first target device is connection failure, a virtual queue is generated and the first target device and all unconnected devices are added to the virtual queue for queuing and waiting, and the queuing order of the first target device and all the unconnected devices in the virtual queue is the time order of requesting to connect to the server; Or, when the connection status of the second target device is connection failure, a virtual queue is generated and the second target device is added to the virtual queue for queue waiting, the unconnected devices try to connect to the server in turn, and when the connection fails, they are added to the virtual queue in turn for queue waiting, and the queuing order of the second target device and all the unconnected devices in the virtual queue is the chronological order of the connection failure with the server.

3. The method according to claim 1, characterized in that There are multiple servers, and the devices correspond to the servers one by one. When the connection state of the target device is the connection failure state, a virtual queue is generated and the target device is added to the virtual queue for queuing and waiting, including: When the connection status of the third target device is connection failure, a virtual queue is generated and the third target device and all first-category unconnected devices are added to the virtual queue for queueing and waiting. The first-category unconnected devices are devices connected to the same server as the third target device. The virtual queue also includes second-category unconnected devices and the correspondence between all the devices and all the servers. The second-category unconnected devices are devices connected to different servers than the third target device.

4. The method according to claim 1, characterized in that When the running state of the server is restored to a connectable state, controlling each of the target devices to connect in sequence according to the order in the virtual queue includes: Obtaining the current network capacity of the local area network and the number of devices in the virtual queue; Determine the current connection capacity of the server according to the current network capacity and / or the number of devices in the virtual queue, wherein the current connection capacity is proportional to the current network capacity and inversely proportional to the device capacity in the virtual queue; According to the current connection capacity of the server, connection requests are sent to each of the devices in the virtual queue in sequence, so that each of the devices is connected in sequence according to the order in the virtual queue.

5. The method according to claim 4, characterized in that The sending of connection requests to the devices in the virtual queue in sequence according to the current connection capacity of the server, so that the devices are connected in sequence according to the order in the virtual queue, comprises: When the current connection capacity of the server is greater than or equal to the preset capacity, a connection request is sent to a first device ranked first in the virtual queue, and when the first device is successfully connected, the connection request is simultaneously sent to all the devices in the virtual queue except the first device, so that all the devices in the virtual queue except the first device are connected in sequence according to the order in the virtual queue; When the current connection capacity of the server is less than the preset capacity, the connection request is first sent to the Nth device in the virtual queue so that the Nth device attempts to connect to the server. When the connection of the Nth device is successful, the connection request is then sent to the N+1th device so that the N+1th device attempts to connect to the server, until all the devices are connected to the corresponding server or the waiting time of the device in the virtual queue is greater than or equal to the queue timeout time.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Get the queue timeout; When the waiting time of the device in the virtual queue is greater than or equal to the queue timeout time, the device is removed from the virtual queue and a device connection failure notification is sent.

7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Generate standby queues and / or priority queues; When the priority of the device is greater than or equal to the preset priority, the device is added to the priority queue to preferentially connect the device to the corresponding server; When the number of the devices in the virtual queue is equal to the maximum threshold number, the devices whose connection status is connection failure are added to the standby queue for queuing.

8. A connection device for local area network equipment, characterized in that: include: A monitoring unit, used to monitor the connection status of each device in the local area network in real time, wherein the connection status is a connection failure status or a connection success status; A generating unit, configured to generate a virtual queue and add the target device to the virtual queue for queuing and waiting when the connection state of the target device is the connection failure state, wherein the target device belongs to a plurality of the devices; The connection unit is used to monitor the running state of the server in real time, and when the running state of the server is restored to a connectable state, control each of the target devices to connect in sequence according to the order in the virtual queue.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for connecting local area network devices according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the connection method of the local area network device described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Queuing method for coordinating connection attempt to server

    CN101383878A

  • Network connection method and device

    CN111372300A

  • Data request processing method and device and electronic equipment

    CN112291307A

  • Call management method and related device

    CN116156066A

  • Multi-local area network optimized connection method and device, computer equipment and storage medium

    CN116743835A

Cited By

  • Network connection processing method and device, product, equipment and medium

    CN119906750A