Method, device and equipment for dynamic GO election in network group and storage medium
By monitoring multi-dimensional performance parameters and using a dynamic GO election mechanism, the problems of resource waste and handover interruption caused by the solidification of GO roles in Wi-Fi Direct networks have been solved, achieving optimized utilization of device resources and smooth network handover, thereby improving the stability and efficiency of teaching activities.
Patent Information
- Application Number
- CN202511684843.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2025-12-30
AI Technical Summary
The static and fixed GO role in the existing Wi-Fi Direct network group leads to wasted device resources and the risk of handover interruption, which cannot meet the dynamic needs of the education scenario.
By monitoring multi-dimensional performance parameters, dynamically electing candidate GOs, creating a reserve group and switching in case of network problems, and employing an adaptability evaluation model and pre-election operations, a smooth switchover is ensured.
It enables optimized utilization of equipment resources and smooth network switching in educational settings, avoiding interruptions caused by GO failures and improving the stability and efficiency of teaching activities.
Smart Images

Figure CN121240170A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication control, and more particularly, to a method and device for dynamic GO election in a network group, an apparatus, and a storage medium. BACKGROUND
[0002] In smart teaching, teachers and students can use Wi-Fi Direct to temporarily form a local area network (P2P) without an AP router. By default, the teacher device acts as a GO (Group Owner) device (which can access the Internet via 4G / 5G), and the student device connects to the teacher device via Wi-Fi Direct and acts as a GC (Group Client). The teacher can push teaching videos and initiate group discussions in real time, and the student device can access cloud resources without relying on campus Wi-Fi. By using Wi-Fi Direct networking, teachers and students can carry out teaching activities outdoors or in any other location without the need for an AP router, and can also achieve ultra-low latency in P2P transmission. In addition, in this network architecture, the GO controls the data relay and external network connection of all GCs, thereby providing an additional level of security for the teaching process.
[0003] As shown in Figure 1 , the GO election process of standard Wi-Fi Direct is shown in Figure 1 . However, the standard scheme has the following obvious defects:
[0004] ① Static role solidification: Once the GO is determined, it will continue to bear the forwarding task even if its power is below 20% or the bandwidth of the accessed cellular network is reduced to below 1 Mbps, resulting in a timeout when loading courseware on the devices in the group.
[0005] ② Lack of scene adaptation: The education scene has dynamic needs (such as high bandwidth for pre-class distribution of materials and low power standby after class), but the traditional election does not distinguish between scenes and uniformly assigns roles based on "device priority" (such as forcing teacher devices to be GO), which may result in resource waste (such as excessive consumption of teacher device power).
[0006] ③ Switching interruption risk: When the original GO fails (such as accidental shutdown), the devices in the group need to reinitiate the discovery-negotiation process, which can take up to 3-5 seconds, which is enough to interrupt real-time teaching activities. SUMMARY
[0007] To overcome the at least one defect of the prior art described above, the present application provides a method and device for dynamic GO election in a network group, an apparatus, and a storage medium. The technical solutions adopted by the present application are as follows.
[0008] In a first aspect, the present application provides a method for dynamic GO election in a network group, which is applied to a Wi-Fi Direct temporary group formed local area network, comprising:
[0009] periodically obtaining performance parameters of each device in the local area network; wherein the performance parameters include network performance parameters, device state parameters, connection quality parameters and role attribute parameters;
[0010] based on a preset adaptation evaluation model, obtaining adaptation scores of each device in each period according to the performance parameters;
[0011] when the adaptation scores of some GCs in the group are all higher than k times of the adaptation score of the GO in the adaptation scores of N continuous periods, determining one GC with the highest adaptation score in the some GCs as a candidate GO, and starting a pre-election operation; wherein N and k are both preset values, and k>1;
[0012] wherein the pre-election operation comprises:
[0013] establishing a connection between the candidate GO and the current GO, and synchronizing configuration information; wherein the configuration information includes a current IP address pool and an encryption key;
[0014] creating a new P2P group as a standby group, letting the candidate GO serve as the GO of the standby group, and letting other devices in the network group join the standby group.
[0015] In an embodiment, the method for dynamic GO election in a network group further comprises:
[0016] when one index parameter in a set of index parameters of the current GO is lower than a corresponding index parameter threshold, starting a switching process to switch the candidate GO to a new current GO, wherein the index parameters in the set of index parameters include adaptation scores.
[0017] In an embodiment, the index parameters in the set of index parameters further include bandwidth, delay, power, CPU, signal strength and packet loss rate.
[0018] In an embodiment, the method for dynamic GO election in a network group further comprises:
[0019] when the current GO is offline, if there is a candidate GO, starting a switching process to switch the candidate GO to a new current GO; if there is no candidate GO, selecting a GC with the highest adaptation score as the new current GO.
[0020] In an embodiment, the preset adaptation evaluation model is:
[0021] The fitness score = (network performance parameter score * network performance weight) + (device state parameter score * device state weight) + (connection quality parameter score * connection quality weight) + (role attribute parameter score * role attribute weight), wherein the sum of the weights is 1, and each parameter score is obtained based on a preset score model according to each performance parameter.
[0022] In an embodiment, the network performance parameters include: uplink / downlink bandwidth, delay;
[0023] The device state parameters include: remaining power, CPU occupancy;
[0024] The connection quality parameters include: average signal strength of devices in the group, packet loss rate;
[0025] The role attribute parameters include: role type, current task; wherein the role type is a teacher end or a student end.
[0026] In an embodiment, the method for dynamically electing a GO in a network group further comprises:
[0027] When the current GO is not a teacher end device, the current GO is caused to establish a reliable connection with a teacher end device, and all interactions of the teacher end device with student end devices are relayed through the current GO, downlink broadcast, and uplink unicast.
[0028] In a second aspect, the application provides a device for dynamically electing a GO in a network group, which is applied to a Wi-Fi Direct temporarily formed local area network, and comprises:
[0029] A obtaining module is configured to periodically obtain performance parameters of each device in the local area network; wherein the performance parameters include: network performance parameters, device state parameters, connection quality parameters, and role attribute parameters;
[0030] An analysis module is configured to obtain a fitness score of each device in each period based on a preset fitness evaluation model and according to the performance parameters;
[0031] An execution module is configured to determine a GC with the highest fitness score in some GCs as a candidate GO and start a pre-election operation when the fitness scores of the some GCs in N consecutive periods are all higher than k times of the fitness score of the GO; wherein N and k are both preset values, and k>1.
[0032] The pre-election operation includes:
[0033] The candidate GO is caused to establish a connection with the current GO and synchronize configuration information; wherein the configuration information includes: a current IP address pool and an encryption key.
[0034] creating a new P2P group as a standby group, letting the candidate GO serve as the GO of the standby group, and letting other devices in the network group join the standby group.
[0035] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any of the above embodiments when executing the program.
[0036] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, wherein the program, when executed by a processor, implements the method of any of the above embodiments.
[0037] In the present application, the health status of the current GO is monitored through multi-dimensional performance parameters, and a suitable device in the GC is selected as a candidate GO, and a network group with the candidate GO as the GO is created in advance, and when the network has a problem, the network group arranged in advance is switched to. The present application benefits from the network group arranged in advance, and the whole switching process is very smooth and fluent, and will not be suddenly interrupted. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a standard GO election flowchart of Wi-Fi Direct.
[0039] Figure 2 is a whole flowchart of an embodiment of the present application.
[0040] Figure 3 is a whole structure diagram of the second embodiment of the present application. DETAILED DESCRIPTION
[0041] Exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings; however, they are not limited to the embodiments set forth herein but can be implemented in various forms. The present disclosure will be described herein with reference to individual embodiments, but combinations of these embodiments can also be used. Unless otherwise defined, scientific and technical terms used in connection with the present disclosure shall have their commonly understood meanings. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0042] It should be noted that the terms "first", "second", "third", etc. in the embodiments of the present application are only to distinguish similar objects, and do not represent a specific order of the objects. Understandably, the specific order or sequence of "first", "second", "third", etc. can be interchanged as appropriate. It should be understood that the objects distinguished by "first", "second", "third", etc. can be interchanged as appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0043] Embodiment One
[0044] Please refer to Figure 2 , Figure 2 A flowchart of a method for dynamic GO election in a network group is provided for Embodiment One of the present application. The method is applied to a Wi-Fi Direct temporary group formed local area network, and includes steps S110, S120 and S130. It should be noted that steps S110, S120 and S130 are merely reference numerals for clearly explaining the correspondence between the embodiments and the accompanying drawings, and do not represent the order of the steps in this embodiment. Figure 2
[0045] In step S110, the performance parameters of each device in the local area network are periodically obtained; wherein the performance parameters include network performance parameters, device state parameters, connection quality parameters and role attribute parameters.
[0046] In step S120, based on a pre-set fitness evaluation model, the fitness scores of each device in each period are obtained according to the performance parameters.
[0047] In step S130, when the fitness scores of certain GCs in the group are all higher than k times of the fitness score of the GO in the fitness scores of the last N periods, the GC with the highest fitness score in the certain GCs is determined as the candidate GO, and a pre-election operation is started; wherein N and k are both pre-set values, and k>1.
[0048] In this method, the performance parameters of each device in the Wi-Fi Direct temporary group formed local area network are monitored in multiple dimensions in real time. The current GO collects each parameter of each GC link in real time, and these parameters are periodically obtained in step S110, for example, they can be updated every 100 ms.
[0049] Specifically, the performance parameters include network performance parameters, device state parameters, connection quality parameters and role attribute parameters; wherein the network performance parameters include uplink / downlink bandwidth (Mbps) and delay (ms); the device state parameters include remaining power (%) and CPU occupancy rate (%); the connection quality parameters include the average signal strength of the devices in the group (dBm) and the packet loss rate; and the role attribute parameters include the role type and the current task; wherein the role type is either the teacher end or the student end.
[0050] Compared with the traditional single indicator that only relies on "signal strength", the method is a multi-dimensional health monitoring indicator, which can comprehensively and real-timely perceive the subtle changes of the system.
[0051] It should be noted that the uplink and downlink bandwidths of the GC can be used to initiate a probe to the fixed cloud server to obtain the uplink and downlink bandwidths of the GC, and can also obtain the real-time uplink and downlink bandwidths of the GC in the current teaching activity. In addition, the uplink and downlink bandwidths of the GO can also be used to initiate a probe to the fixed cloud server, or take the average of the uplink and downlink bandwidths of the GO to the GC.
[0052] In step S120, according to the obtained parameters, the adaptation degree score of each device in each period is obtained by using a preset adaptation degree evaluation model.
[0053] In an embodiment, the adaptation degree score = (network performance parameter score x network performance weight) + (device state parameter score x device state weight) + (connection quality parameter score x connection quality weight) + (role attribute parameter score x role attribute weight), wherein the sum of the weights is 1, and each parameter score is obtained based on a preset score model according to each performance parameter.
[0054] The weights in the above formula can be flexibly configured according to different teaching scenarios and teaching contents.
[0055] The performance parameters in the above formula are specific numbers, so these parameters can be converted into parameter scores by using a preset score model. For example, different scores are assigned to different intervals of the remaining power.
[0056] In an embodiment, the network performance weight is 0.4, the device state weight is 0.3, the connection quality weight is 0.2, and the role attribute weight is 0.1.
[0057] The adaptation degree scores of the GO and the GCs are obtained through step S120. The purpose of obtaining the adaptation degree scores is to find the device that is most suitable to become the GO among the GCs. Once the GO device has a problem, the device that is most suitable to become the GO can immediately replace the GO device. Specifically, step S130 is a process of finding the device that is most suitable to become the GO based on the adaptation degree scores.
[0058] In the method, the process of step S130 is referred to as a first-level trigger. In step S130, for the GCs, the adaptation degree scores of the GCs are required to be higher than the adaptation degree score of the GO by a certain margin, for example, 20%. In addition, a single score that meets this requirement has a certain randomness, so it is also required to meet this requirement for N consecutive times, for example, 3 consecutive times. Since it is previously set that the score is updated every 100 ms, 3 consecutive times indicate that this state lasts at least 300 ms, so it is not random.
[0059] At this time, there can be no or multiple GCs meeting the requirements, if there is none, the candidate GO is not determined, if there are multiple, the one with the highest score is selected as the candidate GO from the GCs meeting the requirements.
[0060] It is pointed out here that step S130 is a dynamic process, that is, the GCs meeting the candidate GO conditions can change all the time, and the candidate GO can change all the time.
[0061] After the candidate GO is determined, a pre-election operation is started, which includes steps S210 and S220.
[0062] Step S210 establishes a connection between the candidate GO and the current GO, and synchronizes configuration information; the configuration information includes a current IP address pool, an encryption key, etc.
[0063] Step S220 creates a new P2P group as a standby group, lets the candidate GO serve as the GO of the standby group, and lets other devices in the network group join the standby group.
[0064] As described above, the purpose of establishing the candidate GO is to quickly switch when the current GO has a condition, so steps S210 and S220 are both for preparing for quick switching. Step S210 quickly transfers data of the current GO to the candidate GO, so the candidate GO establishes a connection with the current GO and synchronizes configuration information such as the current IP address pool and the encryption key. Step S220 quickly creates a new P2P group, which is used as a standby group, lets the candidate GO serve as the GO of the standby group, and lets other devices join, at this time, the standby group is actually a complete Wi-Fi Direct temporary local area network and can be enabled at any time.
[0065] In an embodiment, the method for dynamic GO election in the network group further includes step S140.
[0066] Step S140 starts a switching process to switch the candidate GO to a new current GO when one of the index parameters in the index parameter set of the current GO is lower than the index parameter threshold corresponding to the index parameter, wherein the index parameters in the index parameter set include an adaptation score.
[0067] The process of the embodiment is called secondary triggering. Before starting the secondary triggering, a series of index parameters are set as an index parameter set, such as an adaptation score, a bandwidth, etc., and the index parameters corresponding to the index parameters in the index parameter set are set, and when one of the index parameters in the index parameter set is lower than the index parameter threshold corresponding to the index parameter, a switching process is started.
[0068] Since the parameter in the index parameter set is generally a gradual decline, the process of determining the candidate GO has been triggered, so there is generally a candidate GO at this time.
[0069] The switching process in this embodiment is a proactive switching process, and the evaluation standard is the preset index parameter set. When the index parameters are abnormal, it is considered that the current GO is not suitable, and the candidate GO is switched to the new current GO.
[0070] Preferably, the index parameters of the index parameter set (the corresponding threshold values in the brackets are examples) further include: bandwidth (<5 Mbps), delay (>50 ms), power (<30%), CPU (occupancy rate >80%), signal strength (<-70 dBm), and packet loss rate (>5%).
[0071] In an embodiment, the method for dynamically electing a GO in the network group further comprises step S150.
[0072] Step S150, when the current GO is offline, if there is a candidate GO, start the switching process to switch the candidate GO to the new current GO; if there is no candidate GO, select the GC with the highest adaptation score as the new current GO.
[0073] The process of this embodiment is called three-level triggering, which is a fault emergency situation. When the GO device is offline (such as 3 times of heartbeat packet loss), emergency switching is needed. If there is a candidate GO determined before, the candidate GO is directly switched to the new current GO as in the previous embodiment, and immediate switching can achieve smooth transition. If there is no candidate GO, the GC with the highest score in the previous period can be selected as the new current GO.
[0074] It should be noted that how to detect that the GO device is offline can be as described above when testing the uplink and downlink bandwidth of the GO. A device can be deployed in the cloud platform or other places to send a heartbeat packet every second.
[0075] It should be noted that if the system has not triggered the "second-level triggering" and "third-level triggering", the "candidate GO" needs to keep synchronization with the "current GO"; if the score of the other GC activates the "first-level triggering", the "candidate GO" changes hands, a new "candidate GO" establishes another new P2P as a reserve group, the other devices join, and synchronizes information with the current GO, and the old "candidate GO" and the created P2P group need to be released immediately.
[0076] If the system triggers the "second trigger" or "third trigger", the standby group completes the instant switching (usually only takes 100ms-500ms), and the current GO and the new GO can enable double-path forwarding. That is, the data of the teacher end will be sent to the original GO and the new GO at the same time, ensuring that there is no any packet loss during path switching, of course, the application layer should support breakpoint resume. After the switching is completed, the P2P group related resources of the original GO will be released, and the new GO will collect the link parameters of each GC in real time and calculate the GC score…
[0077] In an embodiment, the method for dynamically electing a GO in a network group further comprises a step S160.
[0078] Step S160, when the current GO is not the teacher end device, establishing a reliable connection between the current GO and the teacher end device, and the interaction of all student end devices will be relayed through the current GO, downlink broadcast and uplink unicast.
[0079] The method is the core innovation of Wi-Fi Direct in the multi-device collaboration scene (especially in educational interaction) to improve stability. Its core value lies in solving the "single point bottleneck" problem caused by the static GO election (such as fixed by the initiator device or random election) in the standard Wi-Fi Direct protocol. For example, when the original GO device power drops, bandwidth is insufficient, or signal attenuation, the entire device group will appear lagging, disconnected, directly affecting the efficiency of classroom interaction.
[0080] The method realizes a major leap from "passive response" to "active prediction" through the organic combination of multi-dimensional performance parameter health monitoring indicators and dynamic election trigger mechanism. In the traditional mode, the system is like an emergency machine that can only start after a fault occurs, while the patent technology gives the system the ability to "plan ahead for rain". The multi-dimensional health monitoring indicators are like countless sensitive "sensors" installed for the system, which can perceive the subtle changes of the system in all directions and in real time. The dynamic election trigger mechanism is like the "intelligent brain" of the system, which quickly analyzes, judges, and makes decisions in advance based on the information feedback from the monitoring indicators, ensuring that teaching activities can continue and stabilize, and improving the quality of teaching.
[0081] The method monitors the health status of the current GO and GC through multi-dimensional performance parameters, selects appropriate devices in the GC as candidate GOs, and creates a network group with the candidate GO as the GO in advance. When the network has problems, switch to the network group arranged in advance. Thanks to the network group arranged in advance, the entire switching process is very smooth and smooth, without sudden interruption.
[0082] Embodiment Two
[0083] Corresponding to the method of embodiment one, asFigure 3 The application further provides a device 3 for dynamic GO election in a network group, which is applied to a local area network temporarily formed by Wi-Fi Direct, and comprises an acquisition module 310, an analysis module 320 and an execution module 330,
[0084] The acquisition module is used for periodically acquiring performance parameters of each device in the local area network, wherein the performance parameters comprise network performance parameters, device state parameters, connection quality parameters and role attribute parameters.
[0085] The analysis module is used for obtaining an adaptation degree score of each device in each period based on a preset adaptation degree evaluation model according to the performance parameters.
[0086] The execution module is used for determining one of some GCs with the highest adaptation degree score as a candidate GO and starting a pre-election operation when adaptation degree scores of the some GCs in N continuous periods are all higher than k times of an adaptation degree score of the GO, wherein N and k are preset values, and k>1.
[0087] The pre-election operation comprises:
[0088] establishing a connection between the candidate GO and the current GO and synchronizing configuration information, wherein the configuration information comprises a current IP address pool and an encryption key.
[0089] creating a new P2P group as a standby group, letting the candidate GO serve as a GO of the standby group, and letting other devices in the network group join the standby group.
[0090] In an implementation, the execution module is further used for starting a switching process to switch the candidate GO to a new current GO when one index parameter in an index parameter set of the current GO is lower than a corresponding index parameter threshold, wherein the index parameter in the index parameter set comprises the adaptation degree score.
[0091] In an implementation, the index parameter in the index parameter set further comprises bandwidth, delay, power, CPU, signal strength and packet loss rate.
[0092] In an implementation, the execution module is further used for starting a switching process to switch the candidate GO to a new current GO when the current GO is offline, and selecting a GC with the highest adaptation degree score as the new current GO if there is no candidate GO.
[0093] In an implementation, the preset adaptation degree evaluation model is:
[0094] The adaptation score = (network performance parameter score * network performance weight) + (device state parameter score * device state weight) + (connection quality parameter score * connection quality weight) + (role attribute parameter score * role attribute weight), wherein the sum of each weight is 1, and each parameter score is obtained based on a preset score model according to each performance parameter.
[0095] In an embodiment, the network performance parameters include: uplink / downlink bandwidth, delay;
[0096] The device state parameters include: remaining power, CPU occupancy rate;
[0097] The connection quality parameters include: average signal strength of devices in the group, packet loss rate;
[0098] The role attribute parameters include: role type, current task; wherein the role type is a teacher terminal or a student terminal.
[0099] In an embodiment, the execution module is further configured to, when the current GO is not a teacher terminal device, establish a reliable connection between the current GO and the teacher terminal device, and all interactions of the teacher terminal device with all student terminal devices will be relayed through the current GO, downlink broadcast and uplink unicast.
[0100] In the device, the health conditions of the current GO and the GC are monitored through multi-dimensional performance parameters, a suitable device in the GC is selected as a candidate GO, and a network group with the candidate GO as the GO is created in advance, and when a network problem occurs, the network group arranged in advance is switched to. Thanks to the network group arranged in advance, the entire switching process is very smooth and smooth, and will not be suddenly interrupted.
[0101] Embodiment three
[0102] The embodiment of the application further provides a storage medium having computer instructions stored thereon, and the instructions are executed by a processor to implement the method for dynamically electing a GO in a network group according to any one of the above embodiments.
[0103] Those skilled in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program is executed to perform the steps of the above method embodiments; and the foregoing storage medium includes: a mobile storage device, a random access memory (RAM, Random Access Memory), a read-only memory (ROM, Read-Only Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0104] Alternatively, the above-mentioned integrated unit of the present application, if realized in the form of a software function module and sold or used as an independent product, can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the methods of the embodiments of the present application. The aforementioned storage medium includes: a mobile storage device, a RAM, a ROM, a magnetic disk, or an optical disk, and various media that can store program codes.
[0105] Corresponding to the above-mentioned computer storage medium, in an embodiment, a computer device is also provided, which includes a memory, an encoder, and a computer program stored in the memory and executable on the encoder, wherein the encoder implements the method for dynamically electing a GO in a network group in any of the above-mentioned embodiments when executing the program.
[0106] The above-mentioned computer device monitors the health condition of the current GO through multi-dimensional performance parameters, selects a suitable device as a candidate GO in the GC, and creates a network group with the candidate GO as the GO in advance, so that when a network problem occurs, the network group arranged in advance is switched to. Thanks to the network group arranged in advance, the entire switching process is very smooth and smooth, and will not be suddenly interrupted.
[0107] The technical features of the above-mentioned embodiments can be combined in any way. In order to make the description simple, all possible combinations of the technical features in the above-mentioned embodiments are not described, but as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0108] Obviously, the above-mentioned embodiments of the present application are only examples for clearly illustrating the present application, and are not intended to limit the implementation manners of the present application. For those skilled in the art, other different forms of changes or modifications can be made on the basis of the above-mentioned description. Here, it is not necessary and impossible to exhaust all the implementation manners. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the claims of the present application.
Claims
1. A method for dynamic GO election in a network group, said method being applied to a local area network temporarily formed by Wi-Fi Direct, characterized in that, Comprise: Periodically acquire performance parameters of each device in the local area network; wherein, the performance parameters include: network performance parameters, device state parameters, connection quality parameters and role attribute parameters; Based on the preset adaptation evaluation model, the adaptation score of each device in each period is obtained according to the performance parameters; When the adaptation scores of some GCs in the group are all higher than k times of the adaptation score of GO in the adaptation scores of N continuous periods, the GC with the highest adaptation score in these GCs is determined as the candidate GO, and the pre-election operation is started; wherein, N and k are both preset values, and k>1; Wherein, the pre-election operation includes: Let the candidate GO establish connection with the current GO, and synchronize configuration information; wherein, the configuration information includes: current IP address pool, encryption key; Create a new P2P group as a reserve group, let the candidate GO serve as the GO of the reserve group, and let other devices in the network group join the reserve group.
2. The method for dynamic GO election in a network group according to claim 1, wherein, Also include: When one of the index parameters in the index parameter set of the current GO is lower than the corresponding index parameter threshold, start the switching process to switch the candidate GO to the new current GO, wherein the index parameters of the index parameter set include: adaptation score.
3. The method for dynamic GO election in a network group according to claim 2, wherein, The index parameters of the index parameter set also include: bandwidth, delay, power, CPU, signal strength and packet loss rate.
4. The method for dynamic GO election in a network group according to claim 1, wherein, Also include: When the current GO is offline, if there is a candidate GO, start the switching process to switch the candidate GO to the new current GO; If there is no candidate GO, select the GC with the highest adaptation score as the new current GO.
5. The method for dynamic GO election in a network group according to claim 1, wherein, The preset adaptation evaluation model: Adaptation score=(network performance parameter score×network performance weight)+(device state parameter score×device state weight)+(connection quality parameter score×connection quality weight)+(role attribute parameter score×role attribute weight), wherein, the sum of each weight is 1, and each parameter score is obtained based on the preset score model according to each performance parameter.
6. The method for dynamically electing GO in the network group according to claim 5, characterized in that: The network performance parameters include: uplink / downlink bandwidth, delay; The device state parameters include: remaining power, CPU occupancy; The connection quality parameters include: average signal strength of devices in the group, packet loss rate; The role attribute parameters include: role type, current task; wherein, the role type is teacher terminal or student terminal.
7. The method for dynamic GO election in a network group according to any of claims 1-6, characterized by, Also include: When the current GO is not a teacher terminal device, let the current GO establish reliable connection with the teacher terminal device, and the interaction of the teacher terminal device with all student terminal devices will be relayed through the current GO, downlink broadcast and uplink unicast.
8. An apparatus for dynamic GO election in a network group, the apparatus is applied to a local area network temporarily formed by Wi-Fi Direct, characterized in that, Comprise: An acquisition module, configured to periodically acquire performance parameters of each device in the local area network; wherein, the performance parameters include: network performance parameters, device state parameters, connection quality parameters and role attribute parameters; An analysis module, configured to obtain the adaptation score of each device in each period based on the preset adaptation evaluation model according to the performance parameters; The execution module is configured to determine one of the GCs with the highest fitness score as a candidate GO and start a pre-election operation when the fitness scores of some GCs in the group are all higher than k times of the fitness score of the GO in the last N cycles; wherein, N and k are preset values, and k>1; The pre-election operation includes: The candidate GO and the current GO establish a connection and synchronize configuration information; wherein, the configuration information includes a current IP address pool and an encryption key; A new P2P group is created as a reserve group, the candidate GO is made to serve as a GO of the reserve group, and other devices in the network group are made to join the reserve group.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the method of any one of claims 1-7 when executing the program.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method of any one of claims 1-7.