A method for identifying network type, related device, equipment and storage medium
By generating feature vectors and using network type recognition model, the problem of low accuracy of wireless network type recognition is solved, accurate identification of wireless network types and community network discovery is achieved, and identification accuracy and community member identification are improved. .
Patent Information
- Application Number
- CN202011119980.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-19
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2040-10-19
AI Technical Summary
In the prior art, when identifying wireless network types, the network identification configuration is inaccurate or omitted, resulting in a decrease in recognition rate and the inability to accurately distinguish the type of WiFi network.
By obtaining the data to be predicted by the wireless network, a feature vector is generated, and the network type identification model is used to determine the target type of the wireless network based on category probability, including the number of connections, independent connections, connection time, active status, number of connections, and proportion of retained people and other features, and use decision trees, xgboost, random forests, deep neural networks and other models for prediction.
It realizes a more objective and accurate identification of wireless network types, improves identification accuracy, and can discover community networks and merge wireless networks with the same subject network, excluding non-community members, and improves the accuracy of community member identification.
Smart Images

Figure CN114390550B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method for identifying a network type, related devices, equipment, and storage medium. Background Art
[0002] Wireless network access can be simply understood as wireless Internet access. Almost all smartphones, tablets and laptops support wireless Internet access (WiFi). WiFi signals are also provided by wired networks. For example, at home, in offices, hospitals and universities, wireless routers can be used to convert wired signals into WiFi signals for users to connect to the Internet.
[0003] The premise of many studies is that it is often necessary to discover the type of WiFi network, for example, discovering that a WiFi network belongs to a home WiFi or discovering that a WiFi network belongs to a public network. Currently, a network identifier is usually used to define the type of the WiFi network, and the user can configure the corresponding network identifier for the WiFi network currently in use.
[0004] However, in actual applications, the network identification configuration may be inaccurate, or the network identification configuration of the WiFi network may be omitted, resulting in a reduced recognition rate of the WiFi network type. Summary of the invention
[0005] The embodiments of the present application provide a method, related apparatus, device and storage medium for identifying a network type, which can more objectively and accurately identify the network type of a wireless network.
[0006] In view of this, the present application provides a method for identifying a network type, including:
[0007] Acquire the data to be predicted corresponding to the first wireless network, wherein the data to be predicted includes data related to the connection state of the first wireless network, and the data to be predicted includes at least one feature type, and the at least one feature type includes one or more of the number of connections, the number of independent connections, the connection time, the active state, the proportion of the number of connections, the proportion of the number of retained people, and the number of connections segmented by the first wireless network;
[0008] Generate a feature vector to be predicted according to the data to be predicted, wherein the feature vector to be predicted has a corresponding relationship with at least one feature type;
[0009] Based on the feature vector to be predicted, the category probability is obtained through the network type recognition model;
[0010] A target network type corresponding to the first wireless network is determined according to the category probability.
[0011] Another aspect of the present application provides a network type identification device, comprising:
[0012] an acquisition module, configured to acquire data to be predicted corresponding to the first wireless network, wherein the data to be predicted includes data related to the connection state of the first wireless network, and the data to be predicted includes at least one feature type, and the at least one feature type includes one or more of the number of connections, the number of independent connections, the connection time, the active state, the proportion of the number of connections, the proportion of the number of retained people, and the number of connections segmented by the first wireless network;
[0013] A generating module, used for generating a feature vector to be predicted according to the data to be predicted, wherein the feature vector to be predicted has a corresponding relationship with at least one feature type;
[0014] The acquisition module is also used to obtain the category probability through the network type recognition model based on the feature vector to be predicted;
[0015] The determination module is used to determine the target network type corresponding to the first wireless network according to the category probability.
[0016] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0017] The number of connections includes at least one of an average number of connections to the first wireless network on working days, an average number of connections to the first wireless network on non-working days, and an average number of connections to the first wireless network;
[0018] The number of independent connections includes at least one of an average number of independent connections connected to the first wireless network on working days, an average number of independent connections connected to the first wireless network on non-working days, and an average number of independent connections connected to the first wireless network;
[0019] The connection time includes at least one of the number of days of connection with the first wireless network, the number of weeks of connection with the first wireless network, and the number of months of connection with the first wireless network;
[0020] The active state includes the activity status of the first wireless network corresponding to K moments, where K is an integer greater than 1;
[0021] The connection times ratio includes a ratio of the total number of connections of the first wireless network to the total number of connections in at least one time period;
[0022] The retention ratio includes a retention ratio of the number of independent connections of the first wireless network in the first time period relative to the number of independent connections in the second time period;
[0023] The connection time segment includes a target segment of the first wireless network in the continuous time segment.
[0024] In one possible design, in another implementation of another aspect of an embodiment of the present application, the network type identification model includes at least one of a decision tree model, an extreme gradient boosting xgboost model, a random forest model, a deep neural network DNN model, a convolutional neural network CNN model, and a recursive neural network RNN model.
[0025] In one possible design, in another implementation of another aspect of the embodiment of the present application, the network type identification device further includes a training module;
[0026] The acquisition module is further used to acquire a positive sample data set and a negative sample data set before acquiring the category probability through the network type recognition model based on the feature vector to be predicted, wherein the positive sample data set includes at least one positive sample data, each positive sample data corresponds to the first labeled network type, and the negative sample data set includes at least one negative sample data, each negative sample data corresponds to the second labeled network type;
[0027] The generating module is further used to generate a positive sample feature vector set according to the positive sample data set, wherein the positive sample feature vector set includes at least one positive sample feature vector, and the positive sample feature vector has a corresponding relationship with the positive sample data;
[0028] The generating module is further used to generate a negative sample feature vector set according to the negative sample data set, wherein the negative sample feature vector set includes at least one negative sample feature vector, and the negative sample feature vector has a corresponding relationship with the positive sample data;
[0029] The acquisition module is further used to acquire the predicted category probability corresponding to each positive sample feature vector and the predicted category probability corresponding to each negative sample feature vector through the network type recognition model to be trained based on the positive sample feature vector set and the negative sample feature vector set;
[0030] The training module is used to update the model parameters of the network type recognition model to be trained according to the predicted category probability corresponding to each positive sample feature vector, the first labeled network type corresponding to each positive sample data, the predicted category probability corresponding to each negative sample feature vector, and the second labeled network type corresponding to each negative sample data, until the model training conditions are met, and output the network type recognition model.
[0031] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0032] The acquisition module is further used to determine the target network type corresponding to the first wireless network according to the category probability, and if the target network type is a community network type, acquire the second wireless network, wherein the network type of the second wireless network is a community network type;
[0033] The acquisition module is further used to acquire the number of common objects between the first wireless network and the second wireless network;
[0034] The acquisition module is further used to acquire the length of the common string between the first wireless network and the second wireless network;
[0035] The determination module is further used to determine the edge weight between the first wireless network and the second wireless network according to the number of shared objects and the length of the shared character string;
[0036] The determination module is further configured to determine the first wireless network and the second wireless network as main networks if the edge weight is greater than a weight threshold, wherein the main network corresponds to a community identifier.
[0037] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0038] The acquisition module is further used to determine the target network type corresponding to the first wireless network according to the category probability, and if the target network type is a community network type, acquire the second wireless network, wherein the network type of the second wireless network is a community network type;
[0039] The acquisition module is further used to acquire the number of common objects between the first wireless network and the second wireless network;
[0040] The acquisition module is further used to acquire the distance between the first wireless network and the second wireless network;
[0041] The determination module is further used to determine the edge weight between the first wireless network and the second wireless network according to the number and distance of the shared objects;
[0042] The determination module is further configured to determine the first wireless network and the second wireless network as main networks if the edge weight is greater than a weight threshold, wherein the main network corresponds to a community identifier.
[0043] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0044] The acquisition module is further used to determine the target network type corresponding to the first wireless network according to the category probability, and if the target network type is a community network type, acquire the second wireless network, wherein the network type of the second wireless network is a community network type;
[0045] The acquisition module is further used to acquire the length of the common string between the first wireless network and the second wireless network;
[0046] The acquisition module is further used to acquire the distance between the first wireless network and the second wireless network;
[0047] The determination module is further used to determine the edge weight between the first wireless network and the second wireless network according to the length and distance of the common character string;
[0048] The determination module is further configured to determine the first wireless network and the second wireless network as main networks if the edge weight is greater than a weight threshold, wherein the main network corresponds to a community identifier.
[0049] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0050] The acquisition module is further used to determine the target network type corresponding to the first wireless network according to the category probability, and if the target network type is a community network type, acquire the second wireless network, wherein the network type of the second wireless network is a community network type;
[0051] The acquisition module is further used to acquire the number of common objects between the first wireless network and the second wireless network;
[0052] The acquisition module is further used to acquire the length of the common string between the first wireless network and the second wireless network;
[0053] The acquisition module is further used to acquire the distance between the first wireless network and the second wireless network;
[0054] The determination module is further used to determine the edge weight between the first wireless network and the second wireless network according to the number of shared objects, the length of the shared character string, and the distance;
[0055] The determination module is further configured to determine the first wireless network and the second wireless network as main networks if the edge weight is greater than a weight threshold, wherein the main network corresponds to a community identifier.
[0056] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0057] The acquisition module is further configured to acquire P terminal devices having a connection relationship with the main network after the determination module determines the first wireless network and the second wireless network as the main network, where P is an integer greater than 1;
[0058] The determination module is further used to determine at least one connected component according to the edge relationship corresponding to the P terminal devices;
[0059] The determination module is also used to determine Q terminal devices belonging to legal devices from P terminal devices based on at least one connected component, and determine (PQ) terminal devices belonging to illegal devices, where Q is an integer greater than or equal to 1 and less than or equal to P.
[0060] In one possible design, in another implementation of another aspect of the embodiment of the present application, the network type identification device further includes a sending module, a receiving module, and a processing module;
[0061] A sending module, configured to send an illegal connection message to a target terminal device after the determination module determines Q terminal devices that are legal devices from P terminal devices according to at least one connected component and determines (PQ) terminal devices that are illegal devices, wherein the target terminal device is a legal device and the illegal connection message carries device information of the illegal device;
[0062] A receiving module, used for receiving a network disconnection instruction sent by a terminal device, wherein the network disconnection instruction carries an illegal device identifier;
[0063] The processing module is used to disconnect the terminal device corresponding to the illegal device identifier from the main network in response to the network disconnection instruction.
[0064] In one possible design, in another implementation of another aspect of the embodiment of the present application, the network type identification device further includes a sending module;
[0065] The sending module is also used to send network aggregation information to the server after the determination module determines the first wireless network and the second wireless network as the main networks, so that when the server receives the value package distribution instruction, it sends a value package message to the terminal device connected to the first wireless network or the second wireless network according to the network aggregation information, wherein the network aggregation information includes the community identifier, the network name of the first wireless network and the network name of the second wireless network.
[0066] In one possible design, in another implementation of another aspect of the embodiment of the present application, the network type identification device further includes a sending module;
[0067] The sending module is also used to send network aggregation information to the server after the determination module determines the first wireless network and the second wireless network as the main networks, so that when the server receives the data transmission instruction sent by the first terminal device, it sends data to the second terminal device according to the network aggregation information, wherein the network aggregation information includes the community identifier, the network name of the first wireless network and the network name of the second wireless network, the first terminal device is connected to the first wireless network or the second wireless network, and the second terminal device is connected to the first wireless network or the second wireless network.
[0068] In one possible design, in another implementation of another aspect of the embodiment of the present application,
[0069] The acquisition module is further used to determine the target network type corresponding to the first wireless network according to the category probability, and if the target network type is a community network type, obtain P terminal devices that have a connection relationship with the first wireless network, where P is an integer greater than 1;
[0070] The determination module is further used to determine at least one connected component according to the edge relationship corresponding to the P terminal devices;
[0071] The determination module is also used to determine Q terminal devices belonging to legal devices from P terminal devices based on at least one connected component, and determine (PQ) terminal devices belonging to illegal devices, where Q is an integer greater than or equal to 1 and less than or equal to P.
[0072] In one possible design, in another implementation of another aspect of the embodiment of the present application, the network type identification device further includes a sending module, a receiving module, and a processing module;
[0073] The sending module is further used to determine, based on at least one connected component, Q terminal devices that are legal devices from the P terminal devices, and after determining (PQ) terminal devices that are illegal devices, send an illegal connection message to the target terminal device, wherein the target terminal device is a legal device, and the illegal connection message carries device information of the illegal device;
[0074] The receiving module is further used to receive a network disconnection instruction sent by the terminal device, wherein the network disconnection instruction carries an illegal device identifier;
[0075] The processing module is further used to disconnect the connection between the terminal device corresponding to the illegal device identifier and the first wireless network in response to the network disconnection instruction.
[0076] Another aspect of the present application provides a computer device, comprising: a memory, a transceiver, a processor, and a bus system;
[0077] Wherein, the memory is used to store programs;
[0078] The processor is used to execute the program in the memory, and the processor is used to execute the methods provided by the above aspects according to the instructions in the program code;
[0079] The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
[0080] Another aspect of the present application provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the above-mentioned methods.
[0081] Another aspect of the present application provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided by the above aspects.
[0082] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0083] In an embodiment of the present application, a method for identifying a network type is provided, wherein the data to be predicted corresponding to the first wireless network is first obtained, and then a feature vector to be predicted is generated based on the data to be predicted, and then based on the feature vector to be predicted, a category probability is obtained through a network type identification model, and finally, the target network type corresponding to the first wireless network is determined based on the category probability. In the above manner, data related to the connection status of the wireless network to be identified is extracted, and the feature vectors corresponding to these data are used as inputs to the network model, and the network model predicts the network type of the wireless network to be identified, so that the network type of the wireless network can be identified more objectively and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 This is a schematic diagram of an environment of a wireless communication system in an embodiment of the present application;
[0085] Figure 2 A schematic diagram of an architecture for determining community members in an embodiment of the present application;
[0086] Figure 3 A schematic diagram of a flow chart of a network type identification method in an embodiment of the present application;
[0087] Figure 4 A schematic diagram of outputting category probabilities through a decision tree model in an embodiment of the present application;
[0088] Figure 5 A schematic diagram of outputting category probabilities through the xgboost model in an embodiment of the present application;
[0089] Figure 6 A schematic diagram of outputting category probabilities through a random forest model in an embodiment of the present application;
[0090] Figure 7 A schematic diagram of determining a subject network in an embodiment of the present application;
[0091] Figure 8 Another schematic diagram for determining a subject network in an embodiment of the present application;
[0092] Fig. 9Another schematic diagram for determining a subject network in an embodiment of the present application;
[0093] Fig.10 Another schematic diagram for determining a subject network in an embodiment of the present application;
[0094] Fig.11 A schematic diagram of determining an illegal device based on a main network in an embodiment of the present application;
[0095] Fig.12 A schematic diagram of setting the network connection status based on the network connection setting interface in an embodiment of the present application;
[0096] Fig.13 A schematic diagram of distributing electronic red envelopes based on an electronic red envelope distribution interface in an embodiment of the present application;
[0097] Fig.14 This is a schematic diagram of performing data transmission based on a data transmission interface in an embodiment of the present application;
[0098] Fig.15 A schematic diagram of determining an illegal device based on a wireless network in an embodiment of the present application;
[0099] Fig.16 Another schematic diagram of performing network connection status setting based on the network connection setting interface in an embodiment of the present application;
[0100] Fig.17 This is a schematic diagram of an embodiment of a network type identification device in an embodiment of the present application;
[0101] Fig.18 A schematic diagram of the structure of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0102] The embodiments of the present application provide a method, related apparatus, device and storage medium for identifying a network type, which can more objectively and accurately identify the network type of a wireless network.
[0103] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0104] With the continuous development of the Internet and community networks, community network detection has become one of the hot topics. Network systems, including social networks, are divided into many modules, and these modules are called communities. Simply put, a community is a cluster of connected nodes in a network system. This application can discover communities based on wireless networks, and further merge communities belonging to the same main network. By calculating the connected components of each member in the main network (or a wireless network), it can also exclude people who are not related to the community, thereby improving the accuracy of discovering community members.
[0105] It should be understood that the wireless network involved in this application is a general term for a type of network that uses radio technology to transmit data. According to the network coverage, network application scenarios and network architecture, the wireless network can be divided into wireless wide area network (Wireless Wide Area Network, WWAN), wireless local area network (Wireless Local Area Network, WLAN), wireless metropolitan area network (Wireless Metropolitan Area Network, WMAN) and wireless personal area network (Wireless Personal Area Network, WPAN). More specifically, the wireless network involved in this application can specifically refer to wireless fidelity (Wireless Fidelity, WiFi) network, hotspot network, Bluetooth (Bluetooth) or ultra wide band (Ultra Wide Band, UWB), etc. For the sake of convenience, this application will take WiFi network as an example for explanation, but this should not be understood as a limitation of this application.
[0106] In order to discover communities through wireless networks, you first need to identify the network type of the wireless network. For example, if you identify that a wireless network belongs to a home WiFi, you can continue to find other wireless networks that belong to the same entity based on the home WiFi. For easier understanding, please refer to Figure 1 , Figure 1 This is an environmental schematic diagram of a wireless communication system in an embodiment of the present application. As shown in the figure, a wireless network A is set up in room A, wherein terminal device A, terminal device B and terminal device C are all connected to wireless network A, and another wireless network is set up in room B, namely wireless network B, and terminal D and terminal device E are all connected to wireless network B.
[0107] Based on this, the computer device can obtain the data to be predicted of wireless network A and wireless network B respectively, and further generate the corresponding feature vectors to be predicted. Figure 2 , Figure 2 This is a schematic diagram of an architecture for determining community members in an embodiment of the present application. As shown in the figure, a feature vector A to be predicted is generated according to the data to be predicted corresponding to wireless network A, and the feature vector A to be predicted is input into the network type recognition model, and the network type recognition model outputs the corresponding category probability, and the network type of wireless network A is determined according to the category probability. Similarly, a feature vector B to be predicted is generated according to the data to be predicted corresponding to wireless network B, and the feature vector B to be predicted is input into the network type recognition model, and the network type recognition model outputs the corresponding category probability, and the network type of wireless network B is determined according to the category probability. If the network types of wireless network A and wireless network B are both community network types, operations such as merging wireless networks can be implemented based on business rules. Assume that the computer device determines that the network types of wireless network A and wireless network B are both community network types and belong to the same subject, that is, it is determined that wireless network A and wireless network B constitute a subject network, and then users can be further merged based on business rules to exclude non-community members.
[0108] It is understandable that for certain services (for example, data transmission and sending electronic red envelopes), it may be considered whether the associated objects (for example, data transmission parties and recipients, and electronic red envelope recipients, etc.) are community members. Therefore, the computer device can also send the predicted subject network and community member information to the server that carries these services, so that the server can perform corresponding operations according to the rules.
[0109] It should be noted that the computer devices involved in this application may be servers, terminal devices, wireless access points or routers, etc., which are not limited here. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal device can be a smart phone, tablet computer, laptop computer, PDA, personal computer, smart TV, smart watch, etc., but is not limited to this.
[0110] It should be understood that the network type identification method provided in the present application predicts wireless networks of community network type through machine learning technology, thereby obtaining wireless networks belonging to the community network type, thereby further discovering communities based on wireless networks of the community network type.
[0111] This application uses machine learning (ML) technology in artificial intelligence (AI) to predict community network type wireless networks. Among them, artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0112] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0113] Machine learning is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0114] The solution provided in the embodiment of the present application involves artificial intelligence machine learning and other technologies. In combination with the above introduction, the method for identifying the network type in the present application will be introduced below. Please refer to Figure 3 , an embodiment of the network type identification method in the embodiment of the present application includes:
[0115] 101. Obtain data to be predicted corresponding to a first wireless network, wherein the data to be predicted includes data related to a connection state of the first wireless network, and the data to be predicted includes at least one feature type, and the at least one feature type includes one or more of the number of connections, the number of independent connections, the connection time, the active state, the proportion of the number of connections, the proportion of the number of retained people, and the number of connections segmented by the first wireless network;
[0116] In this embodiment, the network type identification device obtains the to-be-predicted data corresponding to the first wireless network, wherein the first wireless network may be a WiFi network or other network. The network type identification device may be deployed on a computer device, and the computer device may be a server, a terminal device, a wireless access point (Access Point, AP) or a router, etc., which is not limited here.
[0117] Exemplarily, assuming that the network type identification device is deployed on a wireless access point or a router, the data to be predicted is recorded by the wireless access point or the router, so the network type identification device can directly obtain the recorded data to be predicted. Exemplarily, assuming that the network type identification device is deployed on a server, the server can request the data to be predicted from the provider of the first wireless network (for example, a wireless access point, a router or a terminal device, etc.), and the provider of the first wireless network feeds back the collected data to be predicted to the server. Exemplarily, assuming that the network type identification device is deployed on a terminal device, if the terminal device starts the hotspot function, the terminal device records the data to be predicted, so the network type identification device can directly obtain the recorded data to be predicted. If the terminal device does not start the hotspot function, the terminal device can request the data to be predicted from the provider of the first wireless network (for example, a wireless access point, a router or a terminal device, etc.), and the provider of the first wireless network feeds back the collected data to be predicted to the terminal device.
[0118] Specifically, the data to be predicted includes at least one feature type, and these feature types include one or more of the number of connections of the first wireless network, the number of independent connections, the connection time, the active state, the proportion of the number of connections, the proportion of the number of retained people, and the segmentation of the number of connections.
[0119] 102. Generate a feature vector to be predicted according to the data to be predicted, wherein the feature vector to be predicted has a corresponding relationship with at least one feature type;
[0120] In this embodiment, after the network type identification device obtains the data to be predicted, it can generate a feature vector to be predicted based on the data corresponding to each feature type. For example, the data to be predicted includes the number of connections and the number of independent connections of the first wireless network, where the number of connections is 80 and the number of independent connections is 35, then the feature vector to be predicted can be expressed as (80,35). It should be noted that the feature vector to be predicted includes at least one feature vector, each feature vector corresponds to a feature type, and each feature vector includes one or more elements, which are not limited here.
[0121] 103. Based on the feature vector to be predicted, the category probability is obtained through the network type recognition model;
[0122] In this embodiment, the network type recognition device inputs the feature vector to be predicted into a trained network type recognition model, and the network type recognition model outputs the category probability, which can be expressed as a probability distribution or a probability score.
[0123] Assume that the class probability is represented as a probability distribution, and the probability distribution corresponds to at least two network types. For example, the class probability can be represented as (a, b), where a represents the probability value belonging to the first network type, b represents the probability value belonging to the second network type, and a+b equals 1. For another example, the class probability can be represented as (a, b, c), where a represents the probability value belonging to the first network type, b represents the probability value belonging to the second network type, c represents the probability value belonging to the third network type, and a+b+c equals 1.
[0124] 104. Determine a target network type corresponding to the first wireless network according to the category probability.
[0125] In this embodiment, the network type identification device determines the target network type corresponding to the first wireless network according to the category probability, wherein the target network type may be a community network type or a non-community network type, the community network type includes but is not limited to a home network type, an office network type, and a building network type, etc., and the non-community network type includes but is not limited to a public network and a temporary network, etc.
[0126] Specifically, if the target network type corresponding to the first wireless network is a community network type, the user's profile characteristics of the community can be obtained based on the terminal device connected to the first wireless network. For ease of explanation, the community network type is taken as an example as a home network type. Assuming that there are 5 terminal devices connected to the first wireless network, please refer to Table 1, which is an illustration of the terminal device, the user, and the user's characteristic profile.
[0127] Table 1
[0128]
[0129] As can be seen from Table 1, user "John" uses the terminal device with device identification "100001" and the terminal device "100003" to connect to the first wireless network, based on which the user portrait characteristics of user "John" are obtained. User "Mary" uses the terminal device with device identification "100002" and the terminal device "100004" to connect to the first wireless network, based on which the user portrait characteristics of user "Mary" are obtained. User "Betty" uses the terminal device with device identification "100005" to connect to the first wireless network, based on which the user portrait characteristics of user "Betty" are obtained. Given that user "John", user "Mary" and user "Betty" are all connected to the first wireless network, and the target network type corresponding to the first wireless network is a home network type, it can be inferred that these three users may be a family. Therefore, combining the user portrait characteristics of each user can obtain the user portrait characteristics of the entire family, so as to facilitate subsequent analysis or information recommendation, etc., which is not limited here.
[0130] It can be understood that if the target network type corresponding to the first wireless network is an office network type, then the user who uses the terminal device to connect to the first wireless network is most likely an employee of the company; if the target network type corresponding to the first wireless network is a building network type, then the user who uses the terminal device to connect to the first wireless network is most likely a resident of the same building.
[0131] In an embodiment of the present application, a method for identifying a network type is provided, wherein the data to be predicted corresponding to the first wireless network is first obtained, and then a feature vector to be predicted is generated based on the data to be predicted, and then based on the feature vector to be predicted, a category probability is obtained through a network type identification model, and finally, based on the category probability, a target network type corresponding to the first wireless network is determined, and the probability value corresponding to the target network type is the maximum value of at least two probability values. In the above manner, data related to the connection status of the wireless network to be identified is extracted, and the feature vectors corresponding to these data are used as inputs to the network model, and the network model predicts the network type of the wireless network to be identified, so that the network type of the wireless network can be identified more objectively and accurately.
[0132] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, the number of connections includes at least one of an average number of connections to the first wireless network on working days, an average number of connections to the first wireless network on non-working days, and an average number of connections to the first wireless network;
[0133] The number of independent connections includes at least one of an average number of independent connections connected to the first wireless network on working days, an average number of independent connections connected to the first wireless network on non-working days, and an average number of independent connections connected to the first wireless network;
[0134] The connection time includes at least one of the number of days of connection with the first wireless network, the number of weeks of connection with the first wireless network, and the number of months of connection with the first wireless network;
[0135] The active state includes the activity status of the first wireless network corresponding to K moments, where K is an integer greater than 1;
[0136] The connection times ratio includes a ratio of the total number of connections of the first wireless network to the total number of connections in at least one time period;
[0137] The retention ratio includes a retention ratio of the number of independent connections of the first wireless network in the first time period relative to the number of independent connections in the second time period;
[0138] The connection time segment includes a target segment of the first wireless network in the continuous time segment.
[0139] In this embodiment, the specific contents included in the feature type are introduced. In the aforementioned embodiment, the data to be predicted includes at least one feature type, which may specifically include one or more of the number of connections to the first wireless network, the number of independent connections, the connection time, the active status, the proportion of the number of connections, the proportion of the number of retained people, and the number of connections segmented. Each feature type will be explained below.
[0140] 1. the number of connections to the first wireless network;
[0141] The number of connections to the first wireless network includes at least one of the average number of connections to the first wireless network on working days, the average number of connections to the first wireless network on non-working days, and the average number of connections to the first wireless network, and the average number of connections may be the average number of connections per day, the average number of connections per week, or the average number of connections per month, etc. This application is introduced by taking the average number of connections per month as an example, but this should not be understood as a limitation of this application. Specifically, working days are usually Monday to Friday, and non-working days are Saturday and Sunday. Taking June 2020, July 2020, and August 2020 as examples, please refer to Table 2, which is a statistical result of the number of connections to the first wireless network within three months.
[0142] Table 2
[0143]
[0144] It can be seen from Table 2 that the monthly connection times based on working days and the monthly connection times based on non-working days are counted, and the monthly average connection times for connecting to the first wireless network on working days is (66+44+58) / 3=56, and the monthly average connection times for connecting to the first wireless network on non-working days is (15+12+12) / 3=13, and the monthly average connection times for connecting to the first wireless network is (66+44+58+15+12+12) / 6=34.5.
[0145] Taking the number of connections to the first wireless network including the average number of connections to the first wireless network on working days, the average number of connections to the first wireless network on non-working days, and the average number of connections to the first wireless network as an example, a feature vector (56, 13, 34.5) is obtained. Further, normalization processing can be performed to obtain a feature vector (1, 0.23, 0.62), which is included in the feature vector to be predicted.
[0146] 2. the number of independent connections of the first wireless network (including the number of independent connected users or the number of independent connected devices);
[0147] The number of independent connections includes at least one of the average number of independent connections connected to the first wireless network on working days, the average number of independent connections connected to the first wireless network on non-working days, and the average number of independent connections connected to the first wireless network, and the average number of independent connections can be the average number of independent connections per day, the average number of independent connections per week, or the average number of independent connections per month, etc. This application takes the average number of independent connections per month as an example for introduction, but this should not be understood as a limitation of this application. Specifically, the number of independent connections refers to the number of connections after deduplication.
[0148] Exemplarily, taking the number of independently connected devices as an example, assuming that there are K1 terminal devices that establish a communication connection with the first wireless network, then no matter how many times these K1 terminal devices are connected to the first wireless network, the K1 value is used as the number of independently connected devices. Exemplarily, taking the number of independently connected users as an example, and assuming that there are K2 users using terminal devices to establish a communication connection with the first wireless network, then no matter how many times these K2 users use the terminal devices to connect to the first wireless network, the K2 value is used as the number of independently connected users. The number of independent connections in this application can be the number of independently connected devices or the number of independently connected users, which is not limited here. Taking June 2020, July 2020 and August 2020 as examples, please refer to Table 3, which shows the statistical results of the number of independent connections connected to the first wireless network within three months.
[0149] Table 3
[0150]
[0151] It can be seen from Table 2 that the monthly independent connection numbers based on working days and the monthly independent connection numbers based on non-working days are counted, and the monthly average independent connection numbers for connecting to the first wireless network on working days are (2+4+3) / 3=3, and the monthly average independent connection numbers for connecting to the first wireless network on non-working days are (5+6+7) / 3=6, and the monthly average connection times for connecting to the first wireless network are (2+4+3+5+6+7) / 6=4.5.
[0152] Taking the number of connections to the first wireless network including the average number of independent connections to the first wireless network on working days, the average number of independent connections to the first wireless network on non-working days, and the average number of independent connections to the first wireless network as an example, a feature vector (3, 6, 4.5) is obtained. Further, normalization processing can be performed to obtain a feature vector (0.5, 1, 0.75), which is included in the feature vector to be predicted.
[0153] 3. the connection time of the first wireless network;
[0154] The connection time includes at least one of the number of days the first wireless network is connected, the number of weeks the first wireless network is connected, and the number of months the first wireless network is connected. Specifically, for a home network type, generally, there is a high probability of connecting to the wireless network on both working days and non-working days, for an office network type, generally, there is a high probability of connecting to the wireless network on working days, and for a temporary network, generally, the wireless network is canceled after a period of time.
[0155] Assuming that the number of connection days of the first wireless network is 320, the number of connection weeks of the first wireless network is 50, and the number of connection months is 12, taking the connection time of the first wireless network including the number of connection days of the first wireless network, the number of connection weeks of the first wireless network, and the number of connection months of the first wireless network as an example, a feature vector (320, 50.12) is obtained. Further, normalization processing can be performed to obtain a feature vector (1, 0.16, 0.04), which is included in the feature vector to be predicted.
[0156] 4. the activity status of the first wireless network;
[0157] The active state includes the activity status of the first wireless network at K times. A day can be divided into K time periods, for example, 4 time periods, that is, K can be equal to 4. In practical applications, K is an integer greater than 1, thereby obtaining the following calculation formula:
[0158]
[0159] Among them, h j Indicates the activity status of the first wireless network in a day. δi indicates whether it is active in the i-th hour. The active state means that the first wireless network is connected, and the inactive state means that the first wireless network is not connected. If it is "active", δi=1, if it is "inactive", δi=0. j indicates an increasing time period. i indicates the i-th hour.
[0160] Assume that a day is divided into K time periods, and the 0th hour in the first day is in the "active state" state, which is recorded as "1", the 6th hour is in the "active state" state, which is recorded as "1", the 12th hour is in the "inactive state" state, which is recorded as "0", and the 18th hour is in the "inactive state" state, which is recorded as "0". The active state of the first wireless network in the first day is represented by 1+1+0+0=2. The 0th hour in the second day is in the "active state" state, which is recorded as "1", the 6th hour is in the "inactive state" state, which is recorded as "0", the 12th hour is in the "inactive state" state, which is recorded as "0", and the 18th hour is in the "inactive state" state, which is recorded as "0". The active state of the first wireless network in the second day is represented by 1+0+0+0=1. Similarly, assume that the active state of the first wireless network in the third day is represented by 1. Thus, the feature vector (2, 1, 1) of the active state of these three days is obtained. Further, normalization processing can be performed to obtain the feature vector (1, 0.5, 0.5, which is included in the feature vector to be predicted.
[0161] 5. the proportion of the number of connections to the first wireless network;
[0162] The connection times ratio includes the ratio of the total number of connections of the first wireless network in at least one time period to the total number of connections, wherein the time period unit here can be a day, a week, a month, or a year, etc. This application is introduced with "month" as the time period unit, but this should not be understood as a limitation of this application. Based on this, the following calculation formula is used to calculate the connection times ratio of the first wireless network:
[0163]
[0164] Wherein, ci represents the number of connections of the first wireless network in the i-th month, ui represents the number of connections of the first wireless network in the i-th month, and the number of connections may be the number of independent connected users or the number of independent connected devices, which is not limited here. n represents n months, that is, n is an integer greater than or equal to 1.
[0165] In order to better distinguish public networks from private networks, the connection times ratio can be used to better distinguish public networks from private networks. Assuming that n is equal to 3, and the number of connections to the first wireless network within three months is 7, 8, and 9 respectively, and the number of independent connected devices to the first wireless network within three months is 6, the connection times ratio of the first wireless network is (7+8+9) / 6=4. Assuming that the number of independent connected devices to the first wireless network within three months is 24, the connection times ratio of the first wireless network is (7+8+9) / 24=1. In theory, the number of independent connected devices for home network types will be much smaller than the number of independent connected devices for public networks. Therefore, the higher the connection times ratio, the greater the probability of belonging to the community network type.
[0166] 6. The percentage of people who have retained the first wireless network;
[0167] The retention ratio includes the retention ratio of the number of independent connections in the first wireless network in the first time period relative to the number of independent connections in the second time period, wherein the first time period may be the last N time period units, and the second time period may be the first M time period units. It can be understood that the time period unit may be a day, a week, a month, or a year, etc. This application is introduced with "month" as the time period unit, but this should not be understood as a limitation of this application. Based on this, the following calculation formula is used to calculate the retention ratio of the first wireless network:
[0168]
[0169] Wherein, L represents the proportion of retained people, i represents the i-th user (or terminal device) connected to the first wireless network in the first time period, and j represents the j-th user (or terminal device) connected to the first wireless network in the second time period. M represents the first M time period units, for example, the number of independent connections to the first wireless network in the first three months, and N represents the last N time period units, for example, the number of independent connections to the first wireless network in the last three months. s(i,j) represents whether the i-th user (or terminal device) and the j-th user (or terminal device) are consistent in the first M time period units and the last N time period units. If they are consistent, it is recorded as 1, and if they are inconsistent, it is recorded as 0, and then accumulated.
[0170] 7. The number of connections to the first wireless network is divided into segments;
[0171] The connection times segmentation includes the target segmentation of the first wireless network in the continuous times segmentation. Specifically, the connection times can be pre-divided into several segments, for example, the connection times 0 to 9 are one segment, 10 to 19 are another segment, and so on. Assuming that there are 8 segments in total, based on this, if the connection times of the first wireless network is 8, the target segmentation is 0 to 9, that is, the feature vector is represented by (1, 0, 0, 0, 0, 0, 0). It can be understood that the above segmentation method is only an illustration and should not be understood as a limitation on the present application.
[0172] It should be noted that the advantage of representing the number of connections in segments here is that it can enhance the learning ability of the model and improve the training effect of the model, thereby facilitating more accurate prediction results.
[0173] Secondly, in an embodiment of the present application, specific content included in the feature type is provided. Through the above content, when predicting the network type of a wireless network, it is necessary to consider data of various different dimensions. These data can measure the network type of the wireless network from different aspects, which is conducive to predicting more accurate results.
[0174] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiments of the present application, the network type identification model includes at least one of a decision tree model, an extreme gradient boosting xgboost model, a random forest model, a deep neural network DNN model, a convolutional neural network CNN model and a recursive neural network RNN model.
[0175] In this embodiment, a variety of model structures suitable for network type recognition models are introduced, and the network type recognition model includes at least one of a decision tree model, an extreme gradient boosting (extreme gradient boosting, xgboost) model, a random forest model, a deep neural network (Deep Neural Networks, DNN) model, a convolutional neural network (Convolutional Neural Network, CNN) model, and a recurrent neural network (Recurrent Neural Network, RNN) model. Each model structure will be described below.
[0176] 1. The network type recognition model belongs to the decision tree model;
[0177] For the sake of illustration, the data to be predicted include the number of connection days, the proportion of connection times, the proportion of retained users, and the average number of monthly connections on non-working days as examples. Figure 4 , Figure 4 This is a schematic diagram of outputting the category probability through the decision tree model in the embodiment of the present application. As shown in the figure, the feature vector to be predicted is generated according to the data to be predicted. Based on the feature vector to be predicted, it is first determined whether the number of connection days is 0 to 50 days, 51 to 300 days, or greater than 300 days. If the number of connection days in the data to be predicted is 320 days, it is further determined that the average number of connections per month on non-working days is greater than or equal to 12. If the average number of connections per month on non-working days in the data to be predicted is 15, the category probability can be expressed as 1, that is, the target network type is determined to be a community network type. On the contrary, if the category probability is 0, the target network type is determined to be a non-community network type.
[0178] 2. The network type recognition model belongs to the xgboost model;
[0179] The xgboost model is derived from the gradient boosting framework, but is more efficient, mainly because the algorithm can parallelize calculations, approximate tree building, effectively handle sparse data, and optimize memory usage. In addition, the xgboost model is highly interpretable. For ease of explanation, the data to be predicted includes the number of connection days, the proportion of connection times, and the proportion of retained users. Please refer to Figure 5 , Figure 5 This is a schematic diagram of outputting category probabilities through the xgboost model in an embodiment of the present application, as shown in the figure, Figure 5 The figure (A) in the middle is a decision tree. Figure 5 The middle (B) figure is another decision tree. The feature vector to be predicted is input into the two trained decision trees. The conclusions of the two decision trees are added together to form the final conclusion. Therefore, the probability that the target network type belongs to the community network type is 2+1.2=3.
[0180] 3. The network type recognition model belongs to the random forest model;
[0181] The random forest model can effectively determine the importance of features without dimensionality reduction and feature selection. It is not easy to overfit, has a relatively fast training speed, and can be easily parallelized. For unbalanced data sets, it can also balance errors to a certain extent. For easier understanding, please refer to Figure 6 , Figure 6 This is a schematic diagram of outputting category probabilities through a random forest model in an embodiment of the present application. As shown in the figure, specifically, assuming that the random forest model includes 5 decision trees, after the feature vectors to be predicted are respectively input into the 5 decision trees, the 5 decision trees output 5 results, of which 3 results are community network types and 2 results are non-community network types, that is, after voting, the category probability is determined to be 3 / 5, therefore, it is more likely that the target network type belongs to the community network type.
[0182] 4. The network type recognition model belongs to the DNN model;
[0183] The DNN model includes input layer, hidden layer and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer is connected to any neuron in the i+1-th layer. A fully connected layer can be connected after the output layer, and the category probability is output through the fully connected layer. The category corresponding to the maximum value determined from the category probability is the target network type.
[0184] 5. The network type recognition model belongs to the CNN model;
[0185] The input layer of the CNN network can process multi-dimensional data. The hidden layer of the CNN network includes a convolutional layer, a pooling layer, and a fully connected layer. Similarly, the category probability is output through the fully connected layer, and the category corresponding to the maximum value is determined from the category probability, which is the target network type.
[0186] 6. The network type recognition model belongs to the RNN model;
[0187] The RNN model can be used to process and predict sequence data. The time-related data in the feature vector to be predicted is input in order, and the output of the RNN model is input to the fully connected layer. The category probability is output through the fully connected layer, and the category corresponding to the maximum value is determined from the category probability, which is the target network type.
[0188] Secondly, in the embodiments of the present application, a variety of model structures suitable for use as network type identification models are provided. Through the above content, it is possible to select a suitable model structure according to actual needs, thereby improving the flexibility and diversity of the solution.
[0189] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, before obtaining the category probability through the network type recognition model based on the feature vector to be predicted, the following steps are also included:
[0190] Acquire a positive sample data set and a negative sample data set, wherein the positive sample data set includes at least one positive sample data, each positive sample data corresponds to a first labeled network type, and the negative sample data set includes at least one negative sample data, each negative sample data corresponds to a second labeled network type;
[0191] Generate a positive sample feature vector set according to the positive sample data set, wherein the positive sample feature vector set includes at least one positive sample feature vector, and the positive sample feature vector has a corresponding relationship with the positive sample data;
[0192] Generate a negative sample feature vector set according to the negative sample data set, wherein the negative sample feature vector set includes at least one negative sample feature vector, and the negative sample feature vector has a corresponding relationship with the positive sample data;
[0193] Based on the positive sample feature vector set and the negative sample feature vector set, the predicted category probability corresponding to each positive sample feature vector and the predicted category probability corresponding to each negative sample feature vector are obtained through the network type recognition model to be trained, wherein the predicted category probability distribution includes two probability values, and each probability value corresponds to a network type;
[0194] According to the predicted category probability corresponding to each positive sample feature vector, each positive sample data corresponds to the first labeled network type, the predicted category probability corresponding to each negative sample feature vector, and each negative sample data corresponds to the second labeled network type, the model parameters of the network type recognition model to be trained are updated until the model training conditions are met, and the network type recognition model is output.
[0195] In this embodiment, a method for training a network type recognition model is introduced. First, the data of wireless networks in the Point of Interest (POI) of the community is determined. In the geographic information system, a POI can be a house, a shop, a mailbox, a bus stop, etc. Then, natural language processing (NLP) is used to classify and sample the names of the wireless networks in the community. For example, data from different industries such as homes, hospitals, government agencies, shopping malls, restaurants, schools, entertainment venues, offices, etc. are extracted to ensure that they are closer to the real data of the market.
[0196] Specifically, based on these data, they can be divided into a positive sample data set and a negative sample data set, wherein the positive sample data set includes at least one positive sample data, each positive sample data corresponds to a first labeled network type, wherein the first labeled network type can be specifically a "community network type", or a more specific "home network type", "office network type" or "building network type", etc. This application is introduced by taking the first labeled network type as "community network type" as an example, which should not be understood as a limitation on this application. The negative sample data set includes at least one negative sample data, each negative sample data corresponds to a second labeled network type, wherein the second labeled network type can be specifically a "non-community network type", or a more specific "public network type" or "temporary network type", etc. This application is introduced by taking the second labeled network type as "non-community network type" as an example, which should not be understood as a limitation on this application.
[0197] Next, feature extraction is performed on each positive sample data in the positive sample data set to obtain a positive sample feature vector. Similarly, feature extraction is performed on each negative sample data in the negative sample data set to obtain a negative sample feature vector. Based on this, the positive sample feature vector set and the negative sample feature vector set are input into the network type recognition model to be trained, and the network type recognition model to be trained outputs the predicted category probability corresponding to the positive sample feature vector and the predicted category probability corresponding to the negative sample feature vector. Finally, the loss function is used to calculate the predicted category probability corresponding to each positive sample feature vector, each positive sample data corresponding to the first labeled network type, each negative sample feature vector corresponding to the predicted category probability, and each negative sample data corresponding to the second labeled network type, so as to obtain the loss value, and the model parameters of the network type recognition model to be trained are updated based on the loss value. If the loss value converges, or reaches the iteration number threshold, it means that the model training condition is met, and thus the network type recognition model is output.
[0198] Exemplarily, taking the xgboost model based on the computing engine (spark framework) as an example, a set of positive sample feature vectors and a set of negative sample feature vectors are input, and the area under the receiver operating characteristic curve (ROC) is about 0.946, and the decision function of xgboost is finally obtained as P(y=1|x;θ), where x represents a positive sample feature vector or a negative sample feature vector, y represents the first labeled network type or the second labeled network type, and θ represents the model parameter. P(y=1|x;θ) represents the possibility that sample x is a community network type under the model parameter θ.
[0199] Again, in an embodiment of the present application, a method for training a network type recognition model is provided. Through the above method, as many categories as possible in the large disk can be extracted to collect positive and negative samples, thereby obtaining a large number of training sets, which is conducive to improving the feasibility and accuracy of training.
[0200] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after determining the target network type corresponding to the first wireless network according to the category probability, the following steps are also included:
[0201] If the target network type is a community network type, obtaining a second wireless network, wherein the network type of the second wireless network is a community network type;
[0202] Acquire the number of common objects between the first wireless network and the second wireless network;
[0203] Obtaining the length of a common string between the first wireless network and the second wireless network;
[0204] Determine the edge weight between the first wireless network and the second wireless network according to the number of shared objects and the length of the shared character string;
[0205] If the edge weight is greater than the weight threshold, the first wireless network and the second wireless network are determined as subject networks, wherein the subject network corresponds to a community identifier.
[0206] In this embodiment, a method for determining the subject network based on the number of shared objects and the length of shared character strings is introduced. The number of shared objects can be the number of shared devices or the number of shared users. The number of shared devices indicates the number of shared terminal devices, and the number of shared users indicates the number of shared users. The terminal devices can be identified by device identification, physical address or Internet Protocol (IP) address, etc., and the users can be identified by user identification, mobile phone number, email address and account number, etc.
[0207] Specifically, when performing community division on any two wireless networks (for example, the first wireless network and the second wireless network), it is first necessary to determine whether the two networks belong to the community network type, and then further determine whether the two wireless networks belonging to the same community network type can be merged into the same main network, that is, the wireless networks can be used as nodes to perform community division.
[0208] This application can use the fast community discovery algorithm (fast unfolding) as a method for dividing communities. The main idea of fast unfolding is to continuously divide communities so that the modularity of the entire network after division continues to increase. For ease of introduction, please refer to Figure 7 , Figure 7 This is a schematic diagram for determining the main network in an embodiment of the present application. As shown in the figure, it is assumed that the name of the first wireless network is "the wireless network in my living room" and the name of the second wireless network is "the wireless network in my bedroom". Terminal devices A, B, C, D and E establish communication connections with the first wireless network, and terminal devices A, B and E establish communication connections with the second wireless network. Based on this, the number of common objects between the first wireless network and the second wireless network is 3, and the total string length is 7. In order to construct the weights between wireless networks, the edge weights between the first wireless network and the second wireless network can be calculated as follows:
[0209]
[0210] Where W represents the edge weight. N represents the number of shared objects (i.e., the number of shared devices or the number of shared users), a1 represents the first adjustment weight factor, which can be set to 1. a2 represents the second adjustment weight factor, which can be set to 1. m0 represents the shared string length, m1 represents the string length of the first wireless network, and m2 represents the string length of the second wireless network. A(i,j) indicates that the i-th terminal device (or user) in the first wireless network is consistent with the j-th terminal device (or user) in the second wireless network, that is, there is an edge relationship. δab indicates whether there is a common terminal device (or user) connection between the first wireless network and the second wireless network. δab is calculated as follows:
[0211]
[0212] Among them, when ∑ i,j A(i,j)>0, Sab=1. When ∑ i,j A(i,j)≤0, Sab=-1.
[0213] Based on this, if the calculated edge weight between the first wireless network and the second wireless network is greater than the weight threshold, the first wireless network and the second wireless network are determined to be the same main network, and the main network has the same community identifier. Thus, the result pair of <community identifier, wireless network> is obtained, and the <community identifier, wireless network list> is obtained by aggregation according to the community identifier. For example, <101100, my living room wireless network, my bedroom wireless network> , so far, multiple home wireless networks are merged into the same main network.
[0214] Secondly, in an embodiment of the present application, a method for determining the main network based on the number of shared objects and the length of shared character strings is provided. Through the above method, the number of shared objects and the length of shared character strings between two wireless networks can be effectively utilized, that is, based on the number of common links and the similarity of names as weights, the internal connection between the two wireless networks is determined, thereby obtaining a more accurate main network identification result.
[0215] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after determining the target network type corresponding to the first wireless network according to the category probability, the following steps are also included:
[0216] If the target network type is a community network type, obtaining a second wireless network, wherein the network type of the second wireless network is a community network type;
[0217] Acquire the number of common objects between the first wireless network and the second wireless network;
[0218] Acquire the distance between the first wireless network and the second wireless network;
[0219] Determine the edge weight between the first wireless network and the second wireless network according to the number and distance of the shared objects;
[0220] If the edge weight is greater than the weight threshold, the first wireless network and the second wireless network are determined as subject networks, wherein the subject network corresponds to a community identifier.
[0221] In this embodiment, a method for determining the main network based on the number of shared objects and distance is introduced. The method for counting the number of shared objects is similar to the above embodiment and will not be repeated here. The distance represents the physical distance between two wireless networks, usually in meters.
[0222] Similarly, if both networks belong to the community network type, it is further determined whether the two wireless networks belonging to the community network type can be merged into the same main network. This application can use fast unfolding as a method for dividing the community. For ease of introduction, please refer to Figure 8 , Figure 8Another schematic diagram for determining the main network in the embodiment of the present application, as shown in the figure, assume that the distance between the first wireless network and the second wireless network is 18 meters. Terminal devices A, B, C, D and E establish communication connections with the first wireless network, and terminal devices A, B and E establish communication connections with the second wireless network. Based on this, the number of common objects between the first wireless network and the second wireless network is 3, and the distance is 18. In order to construct the weight between wireless networks, the edge weight between the first wireless network and the second wireless network can be calculated as follows:
[0223]
[0224] Among them, W represents the edge weight. N represents the number of shared objects (i.e., the number of shared devices or the number of shared users), a1 represents the first adjustment weight factor, which can be set to 1. a3 represents the third adjustment weight factor, which can be set to 1. d represents the distance between the first wireless network and the second wireless network, and D represents the preset distance. For example, D is 500, that is, wireless networks within 500 meters are suitable for merging into the main network, so D=500 can be used as the normalization parameter of this item. A(i,j) indicates that the i-th terminal device (or user) in the first wireless network is consistent with the j-th terminal device (or user) in the second wireless network, that is, there is an edge relationship. The calculation method of δab is similar to that described in the previous embodiment and will not be repeated here.
[0225] Based on this, if the calculated edge weight between the first wireless network and the second wireless network is greater than the weight threshold, the first wireless network and the second wireless network are determined to be the same main network, and <community identifier, wireless network list> is further constructed. The construction method is similar to that described in the previous embodiment and will not be repeated here.
[0226] Secondly, in an embodiment of the present application, a method for determining the main network based on the number and distance of shared objects is provided. Through the above method, the number and distance of shared objects between two wireless networks can be effectively utilized, that is, based on the number of common links and geographic location attributes as weights, the internal connection between the two wireless networks is determined, thereby obtaining a more accurate main network identification result.
[0227] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after determining the target network type corresponding to the first wireless network according to the category probability, the following steps are also included:
[0228] If the target network type is a community network type, obtaining a second wireless network, wherein the network type of the second wireless network is a community network type;
[0229] Obtaining the length of a common string between the first wireless network and the second wireless network;
[0230] Acquire the distance between the first wireless network and the second wireless network;
[0231] Determine the edge weight between the first wireless network and the second wireless network according to the length and distance of the common character string;
[0232] If the edge weight is greater than the weight threshold, the first wireless network and the second wireless network are determined as subject networks, wherein the subject network corresponds to a community identifier.
[0233] In this embodiment, a method for determining a subject network based on the length and distance of a common string is introduced. The statistical method for the number of common objects and the distance is similar to that in the previous embodiment, and will not be described in detail here.
[0234] Similarly, if both networks belong to the community network type, it is further determined whether the two wireless networks belonging to the community network type can be merged into the same main network. This application can use fast unfolding as a method for dividing the community. For ease of introduction, please refer to Fig. 9 , Fig. 9 Another schematic diagram for determining the main network in the embodiment of the present application, as shown in the figure, assume that the name of the first wireless network is "the wireless network in my living room" and the name of the second wireless network is "the wireless network in my bedroom". Assume that the distance between the first wireless network and the second wireless network is 18 meters. Based on this, the total string length is 7 and the distance is 18. In order to construct the weight between the wireless networks, the edge weight between the first wireless network and the second wireless network can be calculated as follows:
[0235]
[0236] Wherein, W represents the edge weight. a2 represents the second adjustment weight factor, which can be set to 1. a3 represents the third adjustment weight factor, which can be set to 1. m0 represents the total string length, m1 represents the string length of the first wireless network, and m2 represents the string length of the second wireless network. d represents the distance between the first wireless network and the second wireless network, and D represents the preset distance. For example, D is 500, that is, wireless networks within 500 meters are suitable for merging into the main network. Therefore, D=500 can be used as the normalization parameter of this item. The calculation method of δab is similar to that described in the above embodiment and will not be repeated here.
[0237] Based on this, if the calculated edge weight between the first wireless network and the second wireless network is greater than the weight threshold, the first wireless network and the second wireless network are determined to be the same main network, and <community identifier, wireless network list> is further constructed. The construction method is similar to that described in the previous embodiment and will not be repeated here.
[0238] Secondly, in an embodiment of the present application, a method for determining the main network based on the length and distance of the common string is provided. Through the above method, the common string length and distance between the two wireless networks can be effectively utilized, that is, based on the name similarity and geographic location attributes as weights, the internal connection between the two wireless networks is determined, thereby obtaining a more accurate main network identification result.
[0239] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after determining the target network type corresponding to the first wireless network according to the category probability, the following steps are also included:
[0240] If the target network type is a community network type, obtaining a second wireless network, wherein the network type of the second wireless network is a community network type;
[0241] Acquire the number of common objects between the first wireless network and the second wireless network;
[0242] Obtaining the length of a common string between the first wireless network and the second wireless network;
[0243] Acquire the distance between the first wireless network and the second wireless network;
[0244] Determine the edge weight between the first wireless network and the second wireless network according to the number of shared objects, the length of the shared character string, and the distance;
[0245] If the edge weight is greater than the weight threshold, the first wireless network and the second wireless network are determined as subject networks, wherein the subject network corresponds to a community identifier.
[0246] In this embodiment, a method for determining a subject network based on the number of shared objects, the length of shared strings and the distance is introduced. The statistical method for the number of shared objects, the length of shared strings and the distance is similar to that in the previous embodiment and will not be described in detail here.
[0247] Similarly, if both networks belong to the community network type, it is further determined whether the two wireless networks belonging to the community network type can be merged into the same main network. This application can use fast unfolding as a method for dividing the community. For ease of introduction, please refer to Fig.10 , Fig.10Another schematic diagram for determining the main network in the embodiment of the present application is to assume that the name of the first wireless network is "the wireless network in my living room" and the name of the second wireless network is "the wireless network in my bedroom". Terminal devices A, B, C, D and E establish communication connections with the first wireless network, and terminal devices A, B and E establish communication connections with the second wireless network. Assume that the distance between the first wireless network and the second wireless network is 18 meters, the number of common objects between the first wireless network and the second wireless network is 3, the common string length is 7, and the distance is 18. In order to construct the weights between the wireless networks, the edge weights between the first wireless network and the second wireless network can be calculated as follows:
[0248]
[0249] Wherein, W represents the edge weight. N represents the number of shared objects (i.e., the number of shared devices or the number of shared users), a1 represents the first adjustment weight factor, which can be set to 1. a2 represents the second adjustment weight factor, which can be set to 1. a3 represents the third adjustment weight factor, which can be set to 1. m0 represents the shared string length, m1 represents the string length of the first wireless network, and m2 represents the string length of the second wireless network. A(i,j) indicates that the i-th terminal device (or user) in the first wireless network is consistent with the j-th terminal device (or user) in the second wireless network, that is, there is an edge relationship. δab indicates whether there is a common terminal device (or user) connection between the first wireless network and the second wireless network. d represents the distance between the first wireless network and the second wireless network, and D represents the preset distance. For example, D is 500, that is, wireless networks within 500 meters are suitable for merging into the network body, so D=500 can be used as the normalization parameter of this item. The calculation method of δab is similar to that described in the aforementioned embodiment, and will not be repeated here.
[0250] Based on this, if the calculated edge weight between the first wireless network and the second wireless network is greater than the weight threshold, the first wireless network and the second wireless network are determined to be the same main network, and <community identifier, wireless network list> is further constructed. The construction method is similar to that described in the previous embodiment and will not be repeated here.
[0251] Secondly, in an embodiment of the present application, a method for determining the main network based on the number of shared objects, the length of shared strings and the distance is provided. Through the above method, the number of shared objects, the length of shared strings and the distance between two wireless networks can be effectively utilized, that is, based on the number of common links, name similarity and geographical location attributes as weights, the internal connection between the two wireless networks is determined, thereby obtaining a more accurate main network identification result.
[0252] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after the first wireless network and the second wireless network are determined as the main networks, the following steps are further included:
[0253] Acquire P terminal devices that have a connection relationship with the main network, where P is an integer greater than 1;
[0254] Determine at least one connected component according to the edge relationships corresponding to the P terminal devices;
[0255] According to at least one connected component, Q terminal devices belonging to legal devices are determined from P terminal devices, and (PQ) terminal devices belonging to illegal devices are determined, where Q is an integer greater than or equal to 1 and less than or equal to P.
[0256] In this embodiment, a method of excluding non-community members based on the main network is introduced. Taking the main network including the first wireless network and the second wireless network as an example, first, based on the main network, terminal devices (or users) with a connection relationship in the first wireless network and the second wireless network need to be obtained respectively. Assuming that there are a total of P terminal devices (or users) with a connection relationship, based on this, continue to obtain whether there are connected components between these P terminal devices (or users). If there are connected components, Q terminal devices (or users) belonging to legal devices (or legal users) are determined from the P terminal devices, so as to determine that the remaining (PQ) terminal devices (or users) are illegal devices (or illegal users).
[0257] Specifically, the present application calculates the connected components of terminal devices (or users) within a single wireless network. If an undirected graph G = (V, E) is connected, then the number of edges is greater than or equal to the number of vertices minus one, that is, |E|>=|V|-1. For example, red envelope transfers are used as the connecting edges between terminal devices (or users). By calculating the connected components between members, freeloading and guest terminal devices (or users) can be effectively excluded.
[0258] For easier understanding, see Fig.11 , Fig.11 This is a schematic diagram of determining illegal devices based on the main network in an embodiment of the present application, wherein the first wireless network and the second wireless network belong to the same main network. The following will be introduced from the perspectives of the terminal device and the user respectively. Fig.11In the figure (A), the first wireless network has two connected components, connected component 1 includes terminal device A and terminal device B, and connected component 2 includes terminal device C. The second wireless network has one connected component, connected component 3 includes terminal device D and terminal device E. Based on this, P is equal to 5, and the legal devices are terminal device A, terminal device B, terminal device D, and terminal device E, that is, Q is equal to 4. The illegal device is terminal device C.
[0259] See also Fig.11 In the middle (B) figure, the first wireless network has two connected components, connected component 1 includes user A, connected component 2 includes user B and user C, and the second wireless network has one connected component, connected component 3 includes user D and user E. Based on this, P is equal to 5, and the legal users are user B, user C, user D and user E, that is, Q is equal to 4. The illegal user is user A.
[0260] Again, in the embodiment of the present application, a method for excluding non-community members based on the subject network is provided. Through the above method, users or terminal devices belonging to the same community can be effectively identified, thereby discovering various different communities and then obtaining community members, which can be applied to various scenarios where personnel diffusion is required. In addition, the present application can also be flexibly applied to the discovery of different business communities. For example, company communities can be discovered in the work group industry, financial communities can be discovered in the banking industry, and catering communities can be discovered in the catering industry.
[0261] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, according to at least one connected component, after determining Q terminal devices belonging to legal devices from P terminal devices and determining (PQ) terminal devices belonging to illegal devices, the following steps are also included:
[0262] Sending an illegal connection message to a target terminal device, wherein the target terminal device is a legal device and the illegal connection message carries device information of the illegal device;
[0263] Receiving a network disconnection instruction sent by a terminal device, wherein the network disconnection instruction carries an illegal device identifier;
[0264] In response to the network disconnection instruction, the connection between the terminal device corresponding to the illegal device identifier and the main network is disconnected.
[0265] In this embodiment, a method for disconnecting an illegal terminal device is introduced. After determining the legal device and the illegal device, an illegal connection message can be sent to the target terminal device, the illegal connection message carries the device information of the illegal device, and the target terminal device is one of the legal devices. The user can choose whether to disconnect the illegal device through the target terminal device. If necessary, a network disconnection instruction is triggered, and the network disconnection instruction carries the illegal device identifier, thereby disconnecting the illegal terminal from the main network.
[0266] For easier understanding, see Fig.12 , Fig.12 This is a schematic diagram of setting the network connection status based on the network connection setting interface in an embodiment of the present application. As shown in the figure, the first wireless network and the second wireless network belong to the same main network, the name of the first wireless network is "the wireless network in my living room", and the name of the second wireless network is "the wireless network in my bedroom". There are 5 terminal devices connected to the first wireless network, and "unknown device 123" is an illegal device. Therefore, when the user triggers the "disconnect" button, the connection between "unknown device 123" and the first wireless network can be disconnected. When the user triggers the "view" button, the connection duration and IP address of the terminal device can be viewed.
[0267] Furthermore, in an embodiment of the present application, a method for disconnecting illegal terminal devices is provided. Through the above method, legal users or users using legal devices can disconnect illegal devices, effectively prevent users from using illegal devices to surf the Internet, and exclude members who are not closely linked to the community. In addition, non-community members can also be excluded, which is conducive to obtaining a more accurate portrait of community users, thereby improving the feasibility and operability of the solution.
[0268] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after the first wireless network and the second wireless network are determined as the main networks, the following steps are further included:
[0269] Send network aggregation information to the server so that when the server receives a value package distribution instruction, it sends a value package message to a terminal device connected to the first wireless network or the second wireless network according to the network aggregation information, wherein the network aggregation information includes a community identifier, a network name of the first wireless network, and a network name of the second wireless network.
[0270] In this embodiment, a method for distributing electronic red envelopes based on the main network is introduced. First, network aggregation information is sent to the server, and the network aggregation information can be the "<community identifier, wireless network list>" involved in the aforementioned embodiment, and the server can specifically be an instant messaging server or an electronic red envelope service server, etc., which is not limited here. When the server receives the value package distribution instruction (i.e., the red envelope distribution instruction), based on the network aggregation information, it sends a value package message (i.e., an electronic red envelope) to the terminal device connected to the first wireless network or the second wireless network, while the terminal device not connected to the first wireless network or the second wireless network cannot receive the electronic red envelope.
[0271] For easier understanding, see Fig.13 , Fig.13 Schematic diagram of distributing electronic red envelopes based on the electronic red envelope distribution interface in the embodiment of the present application, such as Fig.13 As shown in Figure (A), the team leader triggers the value package distribution command in the "Department A Group". If employee A is connected to the company's first wireless network, he clicks the value package to enter the following Fig.13 If employee D is not connected to the company's first wireless network or second wireless network, he / she can click on the value package message and enter the following interface: Fig.13 The interface shown in (C) means that you cannot receive the electronic red envelope.
[0272] Again, in an embodiment of the present application, a method for distributing electronic red envelopes based on a main network is provided. Through the above method, users need to receive electronic red envelopes within a specified area, and there is no restriction on the location of the sender of the electronic red envelope. This can improve the diversity of electronic red envelope collection to a certain extent, and by setting certain thresholds, the fun and diversity of red envelope collection can be improved.
[0273] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after the first wireless network and the second wireless network are determined as the main networks, the following steps are further included:
[0274] Send network aggregation information to the server so that when the server receives a data transmission instruction sent by the first terminal device, it sends data to the second terminal device according to the network aggregation information, wherein the network aggregation information includes a community identifier, a network name of the first wireless network, and a network name of the second wireless network, the first terminal device is connected to the first wireless network or the second wireless network, and the second terminal device is connected to the first wireless network or the second wireless network.
[0275] In this embodiment, a method of data transmission based on a main network is introduced. First, network aggregation information is sent to the server, and the network aggregation information can be the "<community identifier, wireless network list>" involved in the above embodiment, and the server can be an instant messaging server, etc., which is not limited here. When the server receives the data transmission instruction sent by the first terminal device, it sends data to the second terminal device based on the network aggregation information. Here, the first terminal device and the second terminal device are both connected to the same main network, for example, connected to at least one of the first wireless network and the second wireless network.
[0276] For easier understanding, see Fig.14 , Fig.14 Schematic diagram of data transmission based on the data transmission interface in the embodiment of the present application, such as Fig.14 As shown in Figure (A), employee A sends a confidential file to employee B. Assuming that employee A and employee B are not connected to the same main network, Fig.14 The interface shown in Figure (B) indicates that employee B cannot receive the confidential document. Assuming that employee A and employee B are connected to the same main network, Fig.14 The interface is shown in Figure (C), and you can further select the file storage location.
[0277] Again, in an embodiment of the present application, a method for data transmission based on a main network is provided. Through the above method, users need to be connected to the same main network to transmit data. This can greatly improve the security of data transmission and enable data to be transmitted within a specified range, thereby improving the practicality and feasibility of the solution.
[0278] Optionally, in the above Figure 3 On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, after determining the target network type corresponding to the first wireless network according to the category probability, the following steps are also included:
[0279] If the target network type is a community network type, obtaining P terminal devices that have a connection relationship with the first wireless network, where P is an integer greater than 1;
[0280] Determine at least one connected component according to the edge relationships corresponding to the P terminal devices;
[0281] According to at least one connected component, Q terminal devices belonging to legal devices are determined from P terminal devices, and (PQ) terminal devices belonging to illegal devices are determined, where Q is an integer greater than or equal to 1 and less than or equal to P.
[0282] In this embodiment, a method of excluding non-community members is introduced. If the first wireless network is a community network type, it is first necessary to obtain terminal devices (or users) with a connection relationship in the first wireless network. Assuming that there are P terminal devices (or users) with a connection relationship, based on this, continue to obtain whether there are connected components between the P terminal devices (or users). If there are connected components, Q terminal devices (or users) that are legal devices (or legal users) are determined from the P terminal devices, so as to determine that the remaining (PQ) terminal devices (or users) are illegal devices (or illegal users).
[0283] Specifically, the present application calculates the connected components of terminal devices (or users) within a single wireless network. If an undirected graph G = (V, E) is connected, then the number of edges is greater than or equal to the number of vertices minus one, that is, |E|>=|V|-1. For example, red envelope transfers are used as the connecting edges between terminal devices (or users). By calculating the connected components between members, freeloading and guest terminal devices (or users) can be effectively excluded.
[0284] For easier understanding, see Fig.15 , Fig.15 This is a schematic diagram of determining illegal devices based on a wireless network in an embodiment of the present application. The following will introduce it from the perspectives of terminal devices and users. Fig.15 In the figure (A), the first wireless network has two connected components. Connected component 1 includes terminal device A and terminal device B, and connected component 2 includes terminal device C. Based on this, P is equal to 3, and the legal devices are terminal device A and terminal device B, that is, Q is equal to 2. The illegal device is terminal device C.
[0285] See also Fig.15 In the middle (B) figure, the first wireless network has two connected components, connected component 1 includes user A, and connected component 2 includes user B and user C. Based on this, P is equal to 3, and the legal users are user B and user C, that is, Q is equal to 2. The illegal user is user A.
[0286] Secondly, in the embodiment of the present application, a method for excluding non-community members is provided. Through the above method, users or terminal devices belonging to the same community can be effectively identified, thereby discovering various different communities and obtaining community members, which can be applied to various scenarios where personnel diffusion is required. In addition, the present application can also be flexibly applied to the discovery of different business communities. For example, company communities can be discovered in the work group industry, financial communities can be discovered in the banking industry, and catering communities can be discovered in the catering industry.
[0287] Optionally, in the above Figure 3On the basis of the corresponding embodiments, in another optional embodiment provided by the embodiment of the present application, according to at least one connected component, after determining Q terminal devices belonging to legal devices from P terminal devices and determining (PQ) terminal devices belonging to illegal devices, the following steps are also included:
[0288] Sending an illegal connection message to a target terminal device, wherein the target terminal device is a legal device and the illegal connection message carries device information of the illegal device;
[0289] Receiving a network disconnection instruction sent by a terminal device, wherein the network disconnection instruction carries an illegal device identifier;
[0290] In response to the network disconnection instruction, the connection between the terminal device corresponding to the illegal device identifier and the first wireless network is disconnected.
[0291] In this embodiment, a method for disconnecting an illegal terminal device is introduced. After determining the legal device and the illegal device, an illegal connection message can be sent to the target terminal device, the illegal connection message carries the device information of the illegal device, and the target terminal device is one of the legal devices. The user can choose whether to disconnect the illegal device through the target terminal device. If necessary, a network disconnection instruction is triggered, and the network disconnection instruction carries the illegal device identifier, thereby disconnecting the illegal terminal from the main network.
[0292] For easier understanding, see Fig.16 , Fig.16 Another schematic diagram of setting the network connection status based on the network connection setting interface in the embodiment of the present application is shown in the figure, where the name of the first wireless network is "My Living Room Wireless Network", and there are 5 terminal devices connected to the first wireless network, and "Unknown Device 123" is an illegal device, so when the user triggers the "Disconnect" button, the connection between "Unknown Device 123" and the first wireless network can be disconnected. When the user triggers the "View" button, the connection duration and IP address of the terminal device can be viewed.
[0293] Again, in an embodiment of the present application, a method for disconnecting illegal terminal devices is provided. Through the above method, legal users or users using legal devices can disconnect illegal devices, effectively prevent users from using illegal devices to surf the Internet, and exclude members who are not closely connected to the community. In addition, non-community members can also be excluded, which is conducive to obtaining a more accurate portrait of community users, thereby improving the feasibility and operability of the solution.
[0294] The network type identification device in this application is described in detail below. Fig.17 , Fig.17This is a schematic diagram of an embodiment of a network type identification device in an embodiment of the present application. The network type identification device 20 includes:
[0295] The acquisition module 201 is used to acquire the data to be predicted corresponding to the first wireless network, wherein the data to be predicted includes data related to the connection state of the first wireless network, and the data to be predicted includes at least one feature type, and the at least one feature type includes one or more of the number of connections, the number of independent connections, the connection time, the active state, the proportion of the number of connections, the proportion of the number of retained people, and the number of connections segmented by the first wireless network;
[0296] A generating module 202, configured to generate a feature vector to be predicted according to the data to be predicted, wherein the feature vector to be predicted has a corresponding relationship with at least one feature type;
[0297] The acquisition module 201 is further used to acquire the category probability through the network type recognition model based on the feature vector to be predicted;
[0298] The determination module 203 is configured to determine the target network type corresponding to the first wireless network according to the category probability.
[0299] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application,
[0300] The number of connections includes at least one of an average number of connections to the first wireless network on working days, an average number of connections to the first wireless network on non-working days, and an average number of connections to the first wireless network;
[0301] The number of independent connections includes at least one of an average number of independent connections connected to the first wireless network on working days, an average number of independent connections connected to the first wireless network on non-working days, and an average number of independent connections connected to the first wireless network;
[0302] The connection time includes at least one of the number of days of connection with the first wireless network, the number of weeks of connection with the first wireless network, and the number of months of connection with the first wireless network;
[0303] The active state includes the activity status of the first wireless network corresponding to K moments, where K is an integer greater than 1;
[0304] The connection times ratio includes a ratio of the total number of connections of the first wireless network to the total number of connections in at least one time period;
[0305] The retention ratio includes a retention ratio of the number of independent connections of the first wireless network in the first time period relative to the number of independent connections in the second time period;
[0306] The connection time segment includes a target segment of the first wireless network in the continuous time segment.
[0307] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application, the network type identification model includes at least one of a decision tree model, an extreme gradient boosting xgboost model, a random forest model, a deep neural network DNN model, a convolutional neural network CNN model and a recursive neural network RNN model.
[0308] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application, the network type identification device 20 further includes a training module 204;
[0309] The acquisition module 201 is further used to acquire a positive sample data set and a negative sample data set before acquiring the category probability through the network type recognition model based on the feature vector to be predicted, wherein the positive sample data set includes at least one positive sample data, each positive sample data corresponds to the first labeled network type, and the negative sample data set includes at least one negative sample data, each negative sample data corresponds to the second labeled network type;
[0310] The generating module 202 is further configured to generate a positive sample feature vector set according to the positive sample data set, wherein the positive sample feature vector set includes at least one positive sample feature vector, and the positive sample feature vector has a corresponding relationship with the positive sample data;
[0311] The generating module 202 is further configured to generate a negative sample feature vector set according to the negative sample data set, wherein the negative sample feature vector set includes at least one negative sample feature vector, and the negative sample feature vector has a corresponding relationship with the positive sample data;
[0312] The acquisition module 201 is further used to acquire the predicted category probability corresponding to each positive sample feature vector and the predicted category probability corresponding to each negative sample feature vector through the network type recognition model to be trained based on the positive sample feature vector set and the negative sample feature vector set;
[0313] The training module 204 is used to update the model parameters of the network type recognition model to be trained according to the predicted category probability corresponding to each positive sample feature vector, the first labeled network type corresponding to each positive sample data, the predicted category probability corresponding to each negative sample feature vector, and the second labeled network type corresponding to each negative sample data, until the model training conditions are met, and output the network type recognition model.
[0314] Optionally, in the above Fig.17On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application,
[0315] The acquisition module 201 is further configured to, after determining the target network type corresponding to the first wireless network according to the category probability, acquire the second wireless network if the target network type is a community network type, wherein the network type of the second wireless network is a community network type;
[0316] The acquisition module 201 is further used to acquire the number of common objects between the first wireless network and the second wireless network;
[0317] The acquisition module 201 is further used to acquire the length of the common string between the first wireless network and the second wireless network;
[0318] The determination module 202 is further configured to determine the edge weight between the first wireless network and the second wireless network according to the number of shared objects and the length of the shared character string;
[0319] The determination module 202 is further configured to determine the first wireless network and the second wireless network as subject networks if the edge weight is greater than a weight threshold, wherein the subject network corresponds to a community identifier.
[0320] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application,
[0321] The acquisition module 201 is further configured to, after determining the target network type corresponding to the first wireless network according to the category probability, acquire the second wireless network if the target network type is a community network type, wherein the network type of the second wireless network is a community network type;
[0322] The acquisition module 201 is further used to acquire the number of common objects between the first wireless network and the second wireless network;
[0323] The acquisition module 201 is further used to acquire the distance between the first wireless network and the second wireless network;
[0324] The determination module 203 is further configured to determine the edge weight between the first wireless network and the second wireless network according to the number and distance of the shared objects;
[0325] The determination module 203 is further configured to determine the first wireless network and the second wireless network as subject networks if the edge weight is greater than a weight threshold, wherein the subject network corresponds to a community identifier.
[0326] Optionally, in the above Fig.17On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application,
[0327] The acquisition module 201 is further configured to determine the target network type corresponding to the first wireless network according to the category probability, and if the target network type is a community network type, acquire a second wireless network, wherein the network type of the second wireless network is a community network type;
[0328] The acquisition module 201 is further used to acquire the length of the common string between the first wireless network and the second wireless network;
[0329] The acquisition module 201 is further used to acquire the distance between the first wireless network and the second wireless network;
[0330] The determination module 203 is further configured to determine the edge weight between the first wireless network and the second wireless network according to the length and distance of the common character string;
[0331] The determination module 203 is further configured to determine the first wireless network and the second wireless network as subject networks if the edge weight is greater than a weight threshold, wherein the subject network corresponds to a community identifier.
[0332] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application,
[0333] The acquisition module 201 is further configured to determine the target network type corresponding to the first wireless network according to the category probability, and if the target network type is a community network type, acquire a second wireless network, wherein the network type of the second wireless network is a community network type;
[0334] The acquisition module 201 is further used to acquire the number of common objects between the first wireless network and the second wireless network;
[0335] The acquisition module 201 is further used to acquire the length of the common string between the first wireless network and the second wireless network;
[0336] The acquisition module 201 is further used to acquire the distance between the first wireless network and the second wireless network;
[0337] The determination module 203 is further used to determine the edge weight between the first wireless network and the second wireless network according to the number of shared objects, the length of the shared string, and the distance;
[0338] The determination module 203 is further configured to determine the first wireless network and the second wireless network as subject networks if the edge weight is greater than a weight threshold, wherein the subject network corresponds to a community identifier.
[0339] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application,
[0340] The acquisition module 201 is further configured to acquire P terminal devices connected to the main network after the determination module 203 determines the first wireless network and the second wireless network as the main network, where P is an integer greater than 1;
[0341] The determination module 203 is further configured to determine at least one connected component according to the edge relationship corresponding to the P terminal devices;
[0342] The determination module 203 is also used to determine Q terminal devices that are legal devices from P terminal devices based on at least one connected component, and determine (PQ) terminal devices that are illegal devices, where Q is an integer greater than or equal to 1 and less than or equal to P.
[0343] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application, the network type identification device 20 further includes a sending module 205, a receiving module 206 and a processing module 207;
[0344] The sending module 205 is configured to send an illegal connection message to a target terminal device after the determining module 203 determines Q terminal devices that are legal devices from P terminal devices and (PQ) terminal devices that are illegal devices according to at least one connected component, wherein the target terminal device is a legal device and the illegal connection message carries device information of the illegal device;
[0345] A receiving module 206 is used to receive a network disconnection instruction sent by a terminal device, wherein the network disconnection instruction carries an illegal device identifier;
[0346] The processing module 207 is used to disconnect the terminal device corresponding to the illegal device identifier from the main network in response to the network disconnection instruction.
[0347] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application, the network type identification device 20 further includes a sending module 205;
[0348] The sending module 205 is also used to send network aggregation information to the server after the determination module 203 determines the first wireless network and the second wireless network as the main networks, so that when the server receives the value package distribution instruction, it sends a value package message to the terminal device connected to the first wireless network or the second wireless network according to the network aggregation information, wherein the network aggregation information includes the community identifier, the network name of the first wireless network and the network name of the second wireless network.
[0349] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application, the network type identification device 20 further includes a sending module 205;
[0350] The sending module 205 is also used to send network aggregation information to the server after the determination module 203 determines the first wireless network and the second wireless network as the main networks, so that when the server receives the data transmission instruction sent by the first terminal device, it sends data to the second terminal device according to the network aggregation information, wherein the network aggregation information includes the community identifier, the network name of the first wireless network and the network name of the second wireless network, the first terminal device is connected to the first wireless network or the second wireless network, and the second terminal device is connected to the first wireless network or the second wireless network.
[0351] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application,
[0352] The acquisition module 201 is further configured to, after the determination module 203 determines the target network type corresponding to the first wireless network according to the category probability, if the target network type is a community network type, obtain P terminal devices having a connection relationship with the first wireless network, where P is an integer greater than 1;
[0353] The determination module 203 is further configured to determine at least one connected component according to the edge relationship corresponding to the P terminal devices;
[0354] The determination module 203 is also used to determine Q terminal devices that are legal devices from P terminal devices based on at least one connected component, and determine (PQ) terminal devices that are illegal devices, where Q is an integer greater than or equal to 1 and less than or equal to P.
[0355] Optionally, in the above Fig.17 On the basis of the corresponding embodiment, in another embodiment of the network type identification device 20 provided in the embodiment of the present application, the network type identification device 20 further includes a sending module 205, a receiving module 206 and a processing module 207;
[0356] The sending module 205 is further configured to determine, based on at least one connected component, Q terminal devices that are legal devices from the P terminal devices, and after determining (PQ) terminal devices that are illegal devices, send an illegal connection message to the target terminal device, wherein the target terminal device is a legal device, and the illegal connection message carries device information of the illegal device;
[0357] The receiving module 206 is further configured to receive a network disconnection instruction sent by the terminal device, wherein the network disconnection instruction carries an illegal device identifier;
[0358] The processing module 207 is further configured to disconnect the terminal device corresponding to the illegal device identifier from the first wireless network in response to the network disconnection instruction.
[0359] Fig.18 3 is a schematic diagram of the structure of a computer device 30 according to an embodiment of the present application. The computer device 30 may include an input device 310, an output device 320, a processor 330, and a memory 340. The output device in the embodiment of the present application may be a display device.
[0360] The memory 340 may include a read-only memory and a random access memory, and provides instructions and data to the processor 330. A portion of the memory 340 may also include a non-volatile random access memory (NVRAM).
[0361] The memory 340 stores the following elements, executable modules or data structures, or a subset thereof, or an extended set thereof:
[0362] Operation instructions: include various operation instructions, used to implement various operations.
[0363] Operating system: includes various system programs used to implement various basic businesses and handle hardware-based tasks.
[0364] The processor 330 controls the operation of the computer device 30, and the processor 330 may also be referred to as a central processing unit (CPU). The memory 340 may include a read-only memory and a random access memory, and provides instructions and data to the processor 330. A portion of the memory 340 may also include an NVRAM. In a specific application, the various components of the computer device 30 are coupled together via a bus system 350, wherein the bus system 350 may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are labeled as bus systems 350 in the figure.
[0365] The method disclosed in the above embodiment of the present application can be applied to the processor 330, or implemented by the processor 330. The processor 330 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 330. The above processor 330 may be a general processor, a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 340, and the processor 330 reads the information in the memory 340 and completes the steps of the above method in combination with its hardware.
[0366] Fig.18 For a description of Figure 3 You can understand the relevant descriptions and effects in the method part, and will not go into details here.
[0367] A computer-readable storage medium is also provided in an embodiment of the present application. The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.
[0368] The present application also provides a computer program product including a program, which, when executed on a computer, enables the computer to execute the methods described in the aforementioned embodiments.
[0369] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0370] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0371] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0372] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0373] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0374] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for identifying a network type, characterized in that: include: Acquire data to be predicted corresponding to the first wireless network, wherein the data to be predicted includes data related to the connection state of the first wireless network, and the data to be predicted includes at least one feature type, and the at least one feature type includes one or more of the number of connections, the number of independent connections, the connection time, the active state, the proportion of the number of connections, the proportion of the number of retained people, and the number of connections segmented by the first wireless network; Generating a feature vector to be predicted according to the data to be predicted, wherein the feature vector to be predicted has a corresponding relationship with the at least one feature type; Based on the feature vector to be predicted, obtaining the category probability through a network type recognition model; Determining a target network type corresponding to the first wireless network according to the category probability; If the target network type is a community network type, obtaining a second wireless network, wherein the network type of the second wireless network is the community network type; Determine an edge weight between the first wireless network and the second wireless network according to at least two parameters of the number of common objects between the first wireless network and the second wireless network, the length of a common string between the first wireless network and the second wireless network, and the distance between the first wireless network and the second wireless network; If the edge weight is greater than a weight threshold, the first wireless network and the second wireless network are determined as subject networks, wherein the subject network corresponds to a community identifier.
2. The method according to claim 1, characterized in that The number of connections includes at least one of an average number of connections to the first wireless network on working days, an average number of connections to the first wireless network on non-working days, and an average number of connections to the first wireless network; The number of independent connections includes at least one of an average number of independent connections connected to the first wireless network on working days, an average number of independent connections connected to the first wireless network on non-working days, and an average number of independent connections connected to the first wireless network; The connection time includes at least one of the number of days the first wireless network is connected, the number of weeks the first wireless network is connected, and the number of months the first wireless network is connected; The active state includes the activity status of the first wireless network corresponding to K moments, where K is an integer greater than 1; The connection times ratio includes a ratio of the total number of connections of the first wireless network to the total number of connections in at least one time period; The retention ratio includes a retention ratio of the number of independent connections of the first wireless network in the first time period relative to the number of independent connections in the second time period; The connection time segment includes a target segment of the first wireless network in a continuous time segment.
3. The method according to claim 1, characterized in that The network type identification model includes at least one of a decision tree model, an extreme gradient boosting xgboost model, a random forest model, a deep neural network DNN model, a convolutional neural network CNN model and a recursive neural network RNN model.
4. The method according to any one of claims 1 to 3, characterized in that Before obtaining the category probability through the network type recognition model based on the feature vector to be predicted, the method further includes: Acquire a positive sample data set and a negative sample data set, wherein the positive sample data set includes at least one positive sample data, each positive sample data corresponds to a first labeled network type, and the negative sample data set includes at least one negative sample data, each negative sample data corresponds to a second labeled network type; Generating a positive sample feature vector set according to the positive sample data set, wherein the positive sample feature vector set includes at least one positive sample feature vector, and the positive sample feature vector has a corresponding relationship with the positive sample data; Generating a negative sample feature vector set according to the negative sample data set, wherein the negative sample feature vector set includes at least one negative sample feature vector, and the negative sample feature vector has a corresponding relationship with the positive sample data; Based on the positive sample feature vector set and the negative sample feature vector set, obtaining the predicted category probability corresponding to each positive sample feature vector and the predicted category probability corresponding to each negative sample feature vector through the network type recognition model to be trained; According to the predicted category probability corresponding to each positive sample feature vector, the first labeled network type corresponding to each positive sample data, the predicted category probability corresponding to each negative sample feature vector, and the second labeled network type corresponding to each negative sample data, the model parameters of the network type recognition model to be trained are updated until the model training conditions are met, and the network type recognition model is output.
5. The method according to claim 1, characterized in that After determining the first wireless network and the second wireless network as main networks, the method further includes: Acquire P terminal devices that have a connection relationship with the main network, where P is an integer greater than 1; Determine at least one connected component according to the edge relationship corresponding to the P terminal devices; According to the at least one connected component, Q terminal devices that are legal devices are determined from the P terminal devices, and (PQ) terminal devices that are illegal devices are determined, where Q is an integer greater than or equal to 1 and less than or equal to P.
6. The method according to claim 5, characterized in that After determining, according to the at least one connected component, Q terminal devices that are legal devices from the P terminal devices, and determining (PQ) terminal devices that are illegal devices, the method further includes: Sending an illegal connection message to a target terminal device, wherein the target terminal device belongs to the legal device, and the illegal connection message carries device information of the illegal device; Receiving a network disconnection instruction sent by the terminal device, wherein the network disconnection instruction carries an illegal device identifier; In response to the network disconnection instruction, the connection between the terminal device corresponding to the illegal device identifier and the main network is disconnected.
7. The method according to claim 1, characterized in that After determining the first wireless network and the second wireless network as main networks, the method further includes: Send network aggregation information to the server, so that when the server receives the value package distribution instruction, the server sends a value package message to the terminal device connected to the first wireless network or the second wireless network according to the network aggregation information, wherein the network aggregation information includes a community identifier, a network name of the first wireless network, and a network name of the second wireless network.
8. The method according to claim 1, characterized in that After determining the first wireless network and the second wireless network as main networks, the method further includes: Send network aggregation information to a server so that when the server receives a data transmission instruction sent by a first terminal device, it sends data to a second terminal device according to the network aggregation information, wherein the network aggregation information includes a community identifier, a network name of the first wireless network, and a network name of the second wireless network, the first terminal device is connected to the first wireless network or the second wireless network, and the second terminal device is connected to the first wireless network or the second wireless network.
9. A network type identification device, characterized in that: include: an acquisition module, configured to acquire data to be predicted corresponding to the first wireless network, wherein the data to be predicted includes data related to the connection state of the first wireless network, and the data to be predicted includes at least one feature type, and the at least one feature type includes one or more of the number of connections, the number of independent connections, the connection time, the active state, the proportion of the number of connections, the proportion of the number of retained people, and the number of connections segmented by the first wireless network; A generating module, configured to generate a feature vector to be predicted according to the data to be predicted, wherein the feature vector to be predicted has a corresponding relationship with the at least one feature type; The acquisition module is further used to acquire the category probability through the network type recognition model based on the feature vector to be predicted; A determination module, configured to determine a target network type corresponding to the first wireless network according to the category probability; The acquisition module is configured to acquire a second wireless network if the target network type is a community network type, wherein the network type of the second wireless network is the community network type; The determination module is further configured to determine the edge weight between the first wireless network and the second wireless network according to at least two parameters of the number of common objects between the first wireless network and the second wireless network, the length of the common string between the first wireless network and the second wireless network, and the distance between the first wireless network and the second wireless network; The determination module is further configured to determine the first wireless network and the second wireless network as main networks if the edge weight is greater than a weight threshold, wherein the main network corresponds to a community identifier.
10. The device according to claim 9, characterized in that The device also includes a training module; The acquisition module is further used to acquire a positive sample data set and a negative sample data set before acquiring the category probability through the network type recognition model based on the feature vector to be predicted, wherein the positive sample data set includes at least one positive sample data, each positive sample data corresponds to the first labeled network type, and the negative sample data set includes at least one negative sample data, each negative sample data corresponds to the second labeled network type; The generating module is further used to generate a positive sample feature vector set according to the positive sample data set, wherein the positive sample feature vector set includes at least one positive sample feature vector, and the positive sample feature vector has a corresponding relationship with the positive sample data; The generating module is further used to generate a negative sample feature vector set according to the negative sample data set, wherein the negative sample feature vector set includes at least one negative sample feature vector, and the negative sample feature vector has a corresponding relationship with the positive sample data; The acquisition module is further used to acquire the predicted category probability corresponding to each positive sample feature vector and the predicted category probability corresponding to each negative sample feature vector through the network type recognition model to be trained based on the positive sample feature vector set and the negative sample feature vector set; The training module is used to update the model parameters of the network type identification model to be trained according to the predicted category probability corresponding to each positive sample feature vector, the first labeled network type corresponding to each positive sample data, the predicted category probability corresponding to each negative sample feature vector, and the second labeled network type corresponding to each negative sample data, until the model training conditions are met, and output the network type identification model.
11. The device according to claim 9, characterized in that The acquisition module is further configured to, after determining the first wireless network and the second wireless network as the main network, acquire P terminal devices having a connection relationship with the main network, wherein P is an integer greater than 1; The determination module is further configured to determine at least one connected component according to the edge relationship corresponding to the P terminal devices; The determination module is further used to determine Q terminal devices that are legal devices from the P terminal devices based on the at least one connected component, and to determine (PQ) terminal devices that are illegal devices, wherein Q is an integer greater than or equal to 1 and less than or equal to P.
12. The device according to claim 11, characterized in that The device also includes a sending module, a receiving module and a processing module; The sending module is used to determine, according to the at least one connected component, Q terminal devices that are legal devices from the P terminal devices, and after determining (PQ) terminal devices that are illegal devices, send an illegal connection message to a target terminal device, wherein the target terminal device is the legal device, and the illegal connection message carries device information of the illegal device; The receiving module is used to receive a network disconnection instruction sent by the terminal device, wherein the network disconnection instruction carries an illegal device identifier; The processing module is used to disconnect the terminal device corresponding to the illegal device identifier from the main network in response to the network disconnection instruction.
13. The device according to claim 9, characterized in that The device also includes a sending module; The sending module is used to send network aggregation information to the server after determining the first wireless network and the second wireless network as the main network, so that when the server receives the value package distribution instruction, the server sends a value package message to the terminal device connected to the first wireless network or the second wireless network according to the network aggregation information, wherein the network aggregation information includes a community identifier, a network name of the first wireless network, and a network name of the second wireless network.
14. A computer device, characterized in that: include: memories, transceivers, processors, and bus systems; Wherein, the memory is used to store programs; The processor is used to execute the program in the memory, and the processor is used to execute the method according to any one of claims 1 to 8 according to the instructions in the program code; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
15. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 8.
16. A computer program product, characterized in that The computer program product comprises a program, and when the program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and apparatus for determining application scene of network device, and computing device
CN107070675A
