Method and device for acquiring number of terminals
By receiving and comparing the spatiotemporal information of random MAC addresses sent by different APs, the problem of determining the number of terminals is solved, and accurate counting and high privacy security are achieved in the random MAC address environment, which is suitable for a variety of scenarios.
Patent Information
- Application Number
- CN202310809715.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
When the terminal uses a random MAC address, how to accurately determine the number of terminals in the area, especially without relying on a fixed MAC address, improve the privacy and security of the communication process.
The controller receives the space-time information used by the random MAC addresses sent by different APs in the area, compares and matches these information to determine the random MAC addresses used by the same terminal, and thus calculates the number of terminals in the area. The method includes obtaining the number of random MAC addresses that are not repeated and repeated, and improving the accuracy of the number of terminals through difference or clustering techniques.
It realizes accurate acquisition of the number of terminals when using random MAC addresses, improves the privacy and security of the communication process, and is suitable for scenarios where fixed MAC addresses and random MAC addresses are used together, with strong flexibility and applicability.
Smart Images

Figure CN119233231A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method and device for obtaining the number of terminals. Background Art
[0002] With the development of communication technology, the coverage of wireless access points (AP) in various areas is getting higher and higher. Terminals in the area can access the communication network through AP to communicate based on the communication network. During the communication process, the terminal needs to use the media access control (MAC) address, which is a fixed MAC address or a random MAC address.
[0003] Compared with using fixed MAC addresses, using random MAC addresses can improve the privacy and security of the communication process, so the use of random MAC addresses is gradually becoming popular. Since the random MAC addresses used by terminals may not correspond one to one, how to determine the number of terminals in an area when the terminals use random MAC addresses has become a problem worthy of attention. Summary of the invention
[0004] The present application provides a method and device for obtaining the number of terminals, so as to determine the number of terminals in an area when the terminals use random MAC addresses. The technical solution provided by the present application includes the following aspects.
[0005] In a first aspect, a method for obtaining the number of terminals is provided. In the method, a controller receives first information sent by a first AP and second information sent by a second AP in a region, wherein the first information includes time and space information when a first random MAC address is used, and the second information includes time and space information when a second random MAC address is used. Then, the controller obtains the number of terminals in the region based on the first information and the second information.
[0006] Among them, the area in the present application can be a physical area, such as a shopping mall, a school and the like, which includes at least two APs, namely a first AP and a second AP. The first information sent by the first AP to the controller includes the time-space information when the first random MAC address is used, and the first random MAC address is a random MAC address used by the terminal connected to the first AP. The second information sent by the second AP to the controller includes the time-space information when the second random MAC address is used, and the second random MAC address is a random MAC address used by the terminal connected to the second AP. Therefore, the controller can determine which random MAC addresses corresponding to which time-space information are random MAC addresses used by the same terminal based on the time-space information when different random MAC addresses in the first information and the second information are used, and then obtain the number of terminals in the area.
[0007] It can be seen that the present application does not need to rely on fixed MAC addresses, and can accurately obtain the number of terminals through the time and space information of random MAC addresses being used, thereby improving the privacy and security of the communication process. Moreover, whether it is a scenario where fixed MAC addresses and random MAC addresses are used together, or a scenario where only random MAC addresses are used, the number of terminals can be obtained through the method provided by the present application, making the method provided by the present application more flexible and more applicable.
[0008] In a possible implementation, obtaining the number of terminals in the area based on the first information and the second information includes: obtaining a first parameter based on the first information and the second information, the first parameter being used to indicate the number of non-repeated random MAC addresses; obtaining the number of terminals in the area based on the first parameter. The non-repeated random MAC addresses are random MAC addresses used by different terminals, and thus the number of terminals in the area can be obtained based on the first parameter, such as using the first parameter as the number of terminals in the area, or correcting the first parameter to obtain the number of terminals in the area, and the purpose of the correction is to improve the accuracy of the number of terminals obtained.
[0009] Alternatively, in a possible implementation, obtaining the number of terminals in the area based on the first information and the second information includes: obtaining a second parameter based on the first information and the second information, the second parameter being used to indicate the number of repeated random MAC addresses; obtaining a third parameter based on the first information and the second information, the third parameter being used to indicate the total number of random MAC addresses; obtaining the number of terminals in the area based on the second parameter and the third parameter, the number of terminals being the difference between the second parameter and the third parameter, or the number of terminals being the difference obtained by subtracting the second parameter from the third parameter. The total number of random MAC addresses minus the number of repeated random MAC addresses (i.e., the difference) is the number of non-repeated random MAC addresses, and thus the number of terminals in the area can be obtained based on the difference, such as using the difference as the number of terminals in the area, or correcting the difference to obtain the number of terminals in the area, and the purpose of the correction is to improve the accuracy of the number of terminals obtained.
[0010] In a possible implementation, the first information further includes a fourth parameter for identifying the type of the first terminal, the second information further includes a fifth parameter for identifying the type of the second terminal, and obtaining the second parameter based on the first information and the second information includes: obtaining a sixth parameter corresponding to the group to which the first information and the second information belong based on the first information and the second information, the sixth parameter being used to indicate the number of repeated random MAC addresses in the group to which the first information and the second information belong; and obtaining the second parameter based on the sixth parameter corresponding to the group to which the first information and the second information belong. The types of terminals included in the groups to which the first information and the second information belong are the same.
[0011] Alternatively, in another possible implementation, the first information also includes time-space information when the third random MAC address is used and a seventh parameter for identifying the type of the third terminal, and the second information also includes time-space information when the fourth random MAC address is used and an eighth parameter for identifying the type of the fourth terminal. The second parameter is obtained based on the first information and the second information, including: obtaining a ninth parameter corresponding to the first group and a tenth parameter corresponding to the second group based on the first information and the second information, the ninth parameter is used to indicate the number of repeated random MAC addresses in the first group, and the tenth parameter is used to indicate the number of repeated random MAC addresses in the second group; the second parameter is obtained based on the ninth parameter and the tenth parameter. The first group includes terminals of the same type, the second group includes terminals of the same type, and the first group and the second group include terminals of different types.
[0012] The above two implementations are the process of clustering according to the type of terminal. At least one group can be obtained through the clustering process. The information included in the same group is the information corresponding to the random MAC address used by the same type of terminal, and the information included in different groups is the information corresponding to the random MAC address used by different types of terminals. Afterwards, the corresponding parameters (i.e., the sixth parameter, the ninth parameter, or the tenth parameter) can be obtained for each group respectively, and the second parameter can be obtained according to the parameters corresponding to each group, thereby improving the efficiency of obtaining the second parameter.
[0013] In a possible implementation, the fourth parameter includes at least one of throughput information, service set identifier (SSID) information, designated service provider information, and frame aggregation information; the fifth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information. The fourth parameter and the fifth parameter are parameters of the same type. For example, when the fourth parameter includes throughput information, the fifth parameter also includes throughput information, thereby ensuring the uniformity of the fourth parameter and the fifth parameter, and further ensuring the accuracy of calculation based on the fourth parameter and the fifth parameter.
[0014] In a possible implementation, the seventh parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the eighth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the seventh parameter and the eighth parameter are parameters of the same type. For the meaning of the same type, please refer to the description of the fourth parameter and the fifth parameter above.
[0015] It should be understood that the above throughput information, SSID information, designated service provider information and frame aggregation information are easy to obtain, have good universality, and are suitable for indicating the type of terminal.
[0016] In a possible implementation, obtaining a sixth parameter corresponding to the group to which the first information and the second information belong based on the first information and the second information includes: determining the group to which the first information and the second information belong based on the fourth parameter and the fifth parameter; obtaining a sixth parameter corresponding to the group to which the first information and the second information belong based on the matching time-space information in the time-space information when the first random MAC address is used and the time-space information when the second random MAC address is used. Since the fourth parameter and the fifth parameter are used to indicate the type of the terminal, clustering can be performed based on this to obtain the group to which the first information and the second information belong. Afterwards, the sixth parameter corresponding to the group to which the first information and the second information belong can be used as the second parameter, or the sixth parameter can be modified to obtain the second parameter.
[0017] In a possible implementation, the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group are obtained based on the first information and the second information, including: determining the first group and the second group based on the seventh parameter and the eighth parameter; obtaining the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group based on the matching time-space information in the time-space information when the first random MAC address is used, the time-space information when the second random MAC address is used, the time-space information when the third random MAC address is used, and the time-space information when the fourth random MAC address is used. Since the seventh parameter and the eighth parameter are used to indicate the type of the terminal, clustering can be performed based on this to obtain the first group and the second group. Afterwards, the sum of the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group can be used as the second parameter, or the second parameter can be obtained by correcting the sum.
[0018] In a possible implementation, when the used spatiotemporal information includes a time point for identifying the time of use, the difference between the time points indicated by the time points included in the matched spatiotemporal information is greater than the time threshold. The reason is that the same terminal will not continuously switch the random MAC address used in a short period of time, so when the difference between the time points used by the two random MAC addresses by the terminal is greater than the time threshold, the two random MAC addresses may be used by the same terminal. In the case where the used spatiotemporal information includes a signal strength for identifying the location of the terminal when it is used, the relationship between the similarity between the positions indicated by the signal strength included in the matched spatiotemporal information and the similarity threshold meets the requirements. Among them, the relationship between the similarity and the similarity threshold meets the requirements, which may mean that the similarity is greater than or equal to the similarity threshold (that is, the position of the terminal changes slightly, which is suitable for scenarios where the terminal is not easy to move), or it may mean that the similarity is less than the similarity threshold (that is, the position of the terminal changes significantly, which is suitable for scenarios where the terminal is easy to move). It can be determined according to the scene and is not limited here.
[0019] In a possible implementation, the signal strength is in vector form, the similarity between the positions indicated by the signal strength includes the vector distance between the signal strengths in vector form, and accordingly, the relationship between the similarity and the similarity threshold satisfies the requirement, including the relationship between the vector distance and the distance threshold satisfies the requirement. The process of calculating the vector distance is simple and easy, and has a wide range of applications.
[0020] In a possible implementation, obtaining a third parameter based on the first information and the second information includes: taking the number of used spatiotemporal information in the first information and the second information as the third parameter; or, the first information and the second information also include a random MAC address, and determining the third parameter based on the received random MAC address; or, the first information also includes a first quantity, and the second information also includes a second quantity, and determining the sum of the first quantity and the second quantity as the third parameter, the first quantity being used to identify the number of used spatiotemporal information in the first information, and the second quantity being used to identify the number of used spatiotemporal information in the second information. It can be seen that the controller can obtain the third parameter indicating the total number of random MAC addresses in a variety of ways, and various ways can be flexibly selected according to actual needs.
[0021] In a possible implementation, the used spatiotemporal information includes at least one of a time point and a signal strength, the time point is used to identify the moment of use, and the signal strength is used to identify the location of the terminal when it is used.
[0022] In a possible implementation, the first information is determined based on the first probe request frame received by the first AP from the terminal, and the time point in the spatiotemporal information when the first random MAC address is used is determined based on the generation time of the first probe request frame; the second information is determined based on the second probe request frame received by the second AP from the terminal, and the time point in the spatiotemporal information when the second random MAC address is used is determined based on the generation time of the second probe request frame. Among them, since the terminal will trigger the generation and sending of the first probe request frame in real time after starting to use the first random MAC address, the generation time of the first probe request frame can reflect the time when the terminal uses the first random MAC address, and the time point determined based on the generation time of the first probe request frame can be used to identify the time when the first random MAC address is used by the terminal. The principle of the second probe request frame is similar to that of the first probe request frame, which will not be repeated here.
[0023] In a possible implementation, the signal strength includes a first signal strength and a second signal strength, the first signal strength being the strength of a signal received by the terminal from the third AP when the terminal is in use, and the second signal strength being the strength of a signal received by the terminal from the fourth AP when the terminal is in use. Since the first signal strength reflects the first distance between the terminal and the third AP when the random MAC address is used by the terminal, and the second signal strength reflects the second distance between the terminal and the fourth AP when the random MAC address is used by the terminal, and the positions of the third AP and the fourth AP are fixed, the first distance and the second distance can reflect the position of the terminal when the random MAC address is used by the terminal, and the signal strengths including the first signal strength and the second signal strength can be used to identify the position of the terminal when the random MAC address is used by the terminal.
[0024] In a second aspect, a method for obtaining the number of terminals is provided. In the method, an AP sends information to a controller, the information including time and space information of when a random MAC address is used, and the information is used by the controller to obtain the number of terminals in an area.
[0025] For example, a first AP sends first information to a controller, the first information including time and space information when a first random MAC address is used. For another example, a second AP sends second information to a controller, the second information including time and space information when a second random MAC address is used. The first AP and the second AP are different APs in the area.
[0026] In a possible implementation, the information sent by the AP to the controller may further include at least one of the following: a parameter indicating the type of the terminal, a random MAC address, and a quantity, where the quantity is used to identify the amount of spatiotemporal information in which the random MAC address is used.
[0027] In a third aspect, a device for obtaining the number of terminals is provided, the device comprising:
[0028] A receiving module, configured to receive first information sent by a first AP and second information sent by a second AP in a region, wherein the first information includes time and space information when the first random MAC address is used, and the second information includes time and space information when the second random MAC address is used;
[0029] The acquisition module is used to acquire the number of terminals in the area based on the first information and the second information.
[0030] In a possible implementation, the acquisition module is used to acquire a first parameter based on the first information and the second information, where the first parameter is used to indicate the number of non-repeated random MAC addresses; and acquire the number of terminals in the area based on the first parameter.
[0031] In one possible implementation, the acquisition module is used to acquire a second parameter based on the first information and the second information, the second parameter being used to indicate the number of repeated random MAC addresses; to acquire a third parameter based on the first information and the second information, the third parameter being used to indicate the total number of random MAC addresses; and to acquire the number of terminals in the area based on the second parameter and the third parameter, the number of terminals being the difference between the second parameter and the third parameter.
[0032] In one possible implementation, the first information also includes a fourth parameter for identifying the type of the first terminal, and the second information also includes a fifth parameter for identifying the type of the second terminal. The acquisition module is used to acquire a sixth parameter corresponding to the group to which the first information and the second information belong based on the first information and the second information, and the sixth parameter is used to indicate the number of repeated random MAC addresses in the group to which the first information and the second information belong; and acquire the second parameter based on the sixth parameter corresponding to the group to which the first information and the second information belong.
[0033] In one possible implementation, the first information also includes time and space information when the third random MAC address is used and a seventh parameter for identifying the type of the third terminal, and the second information also includes time and space information when the fourth random MAC address is used and an eighth parameter for identifying the type of the fourth terminal. The acquisition module is used to acquire a ninth parameter corresponding to the first group and a tenth parameter corresponding to the second group based on the first information and the second information. The terminals included in the first group are of the same type, and the terminals included in the second group are of the same type. The ninth parameter is used to indicate the number of repeated random MAC addresses in the first group, and the tenth parameter is used to indicate the number of repeated random MAC addresses in the second group; the second parameter is acquired based on the ninth parameter and the tenth parameter.
[0034] In one possible implementation, the fourth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the fifth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the fourth parameter and the fifth parameter are parameters of the same type.
[0035] In one possible implementation, the seventh parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the eighth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the seventh parameter and the eighth parameter are parameters of the same type.
[0036] In one possible implementation, the acquisition module is used to determine the group to which the first information and the second information belong based on the fourth parameter and the fifth parameter; in the space-time information when the first random MAC address is used and the space-time information when the second random MAC address is used, the sixth parameter corresponding to the group to which the first information and the second information belong is obtained based on the matching space-time information.
[0037] In one possible implementation, the acquisition module is used to determine the first group and the second group based on the seventh parameter and the eighth parameter; in the space-time information when the first random MAC address is used, the space-time information when the second random MAC address is used, the space-time information when the third random MAC address is used, and the space-time information when the fourth random MAC address is used, the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group are obtained based on the matching space-time information.
[0038] In one possible implementation, when the used space-time information includes a time point for identifying the moment of use, the difference between the moments indicated by the time points included in the matching space-time information is greater than a time threshold; when the used space-time information includes a signal strength for identifying the location of the terminal when it is used, the relationship between the similarity between the positions indicated by the signal strength included in the matching space-time information and the similarity threshold meets the requirements.
[0039] In a possible implementation, the signal strength is in vector form, the similarity between the positions indicated by the signal strength includes the vector distance between the signal strengths in vector form, and the relationship between the similarity and the similarity threshold satisfies the requirement including the relationship between the vector distance and the distance threshold satisfies the requirement.
[0040] In a possible implementation manner, the acquisition module is used to take the amount of used spatiotemporal information in the first information and the second information as the third parameter; or
[0041] The first information and the second information further include a random MAC address, and the acquisition module is used to determine the third parameter based on the received random MAC address; or
[0042] The first information also includes a first quantity, and the second information also includes a second quantity. The acquisition module is used to determine the sum of the first quantity and the second quantity as a third parameter. The first quantity is used to identify the amount of used spatiotemporal information in the first information, and the second quantity is used to identify the amount of used spatiotemporal information in the second information.
[0043] In a possible implementation, the used spatiotemporal information includes at least one of a time point and a signal strength, the time point is used to identify the moment of use, and the signal strength is used to identify the location of the terminal when it is used.
[0044] In one possible implementation, the first information is determined based on a first probe request frame received by a first AP from a terminal, and the time point in the spatiotemporal information when the first random MAC address is used is determined based on the generation time of the first probe request frame; the second information is determined based on a second probe request frame received by a second AP from a terminal, and the time point in the spatiotemporal information when the second random MAC address is used is determined based on the generation time of the second probe request frame.
[0045] In a possible implementation, the signal strength includes a first signal strength and a second signal strength, the first signal strength being the strength of a signal received by the terminal from the third AP when in use, and the second signal strength being the strength of a signal received by the terminal from the fourth AP when in use.
[0046] In a fourth aspect, a device for obtaining the number of terminals is provided, the device comprising:
[0047] The sending module is used to send information to the controller, the information includes the time and space information of the random MAC address being used, and the information is used by the controller to obtain the number of terminals in the area.
[0048] In a fifth aspect, a device for obtaining the number of terminals is provided, the device comprising a memory and a processor; at least one computer instruction is stored in the memory, and the at least one computer instruction is loaded and executed by the processor so that the device implements the method for obtaining the number of terminals provided in the above aspects.
[0049] Optionally, there are one or more processors and one or more memories.
[0050] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.
[0051] In a sixth aspect, a system for obtaining the number of terminals is provided, the system comprising a controller, a first AP and a second AP, the controller being used to execute the method for obtaining the number of terminals provided in the first aspect, the first AP being used to execute the method for obtaining the number of terminals provided in the second aspect, and the second AP being used to execute the method for obtaining the number of terminals provided in the second aspect.
[0052] In a seventh aspect, a computer-readable storage medium is provided, in which at least one computer instruction is stored. The computer instruction is loaded and executed by a processor so that the computer implements the method for obtaining the number of terminals provided in the above aspects.
[0053] In an eighth aspect, a computer program or a computer program product is provided, wherein the computer program or the computer program product comprises computer instructions, and the computer instructions are executed by a processor so that a computer implements the method for obtaining the number of terminals provided in the above aspects.
[0054] In a ninth aspect, a chip is provided, comprising a processor, wherein the processor is used to call and execute instructions stored in a memory, so that a computer equipped with the chip executes the method for obtaining the number of terminals provided in the above aspects.
[0055] In the tenth aspect, another chip is provided, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, a computer equipped with the chip implements the method for obtaining the number of terminals provided in the above aspects.
[0056] It should be understood that the technical effects achieved by the technical solutions provided by the third to tenth aspects of the present application and the corresponding possible implementation methods can be referred to the above description of the technical effects achieved by the technical solutions provided by the first and second aspects and the corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A schematic diagram of an implementation environment provided for an embodiment of the present application;
[0058] Figure 2 A schematic diagram of another implementation environment provided for an embodiment of the present application;
[0059] Figure 3 A flowchart of a method for obtaining the number of terminals provided in an embodiment of the present application;
[0060] Figure 4 A schematic diagram of obtaining the number of terminals provided in an embodiment of the present application;
[0061] Figure 5 A schematic diagram of the structure of a device for obtaining the number of terminals provided in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of the structure of another device for obtaining the number of terminals provided in an embodiment of the present application;
[0063] Figure 7 A schematic diagram of the structure of a device for obtaining the number of terminals provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] With the development of communication technology, many areas (or places) have achieved full AP coverage. In such areas, no matter where the terminal is in the area, it can access the communication network through the AP to communicate, which is convenient for terminal users to travel, work and live. The terminal needs to use the MAC address during the communication process, which is equivalent to the terminal's identity in the communication network.
[0065] A fixed MAC address (also called a real MAC address) is a type of MAC address. A network card is installed in the terminal, and the network card has a unique corresponding fixed MAC address. The terminal and the fixed MAC address are often in a one-to-one correspondence. When the number of terminals in an area needs to be obtained, it is only necessary to obtain all the fixed MAC addresses through the APs in the area, and then perform deduplication processing, and the number of remaining fixed MAC addresses can be used as the number of terminals in the area. However, it is easy to index the network card based on the fixed MAC address, and then it is easy to query the personal information of the terminal user based on the network card, which reduces privacy and security.
[0066] Therefore, a MAC address randomization mechanism is proposed based on the fixed MAC address. In this mechanism, another MAC address is proposed, namely a random MAC address (also called a pseudo MAC address). A random MAC address is a MAC address that is randomly generated and assigned to a terminal. The same terminal can switch to use multiple random MAC addresses during the communication process, so that the terminal and the random MAC address are often not in a one-to-one correspondence. Since it is difficult to index the network card and query the personal information of the terminal user based on the random MAC address, privacy and security can be guaranteed. However, the use of random MAC addresses by terminals also increases the difficulty of obtaining the number of terminals in the area.
[0067] In the related art, the deduplication ratio of the fixed MAC address is obtained, the random MAC address is deduplicated with reference to the deduplication ratio, and the number of terminals in the area is obtained according to the number of remaining random MAC addresses. It can be seen that this method still needs to rely on fixed MAC addresses, and there are problems of low privacy and security. Moreover, this method is only applicable to scenarios where fixed MAC addresses can be obtained and the deduplication ratio can be determined. It has strong limitations and poor applicability.
[0068] In view of the problems existing in the related art, the embodiment of the present application provides a method for obtaining the number of terminals, which can be applied to Figure 1 In the implementation environment shown. Figure 1 As shown, the implementation environment includes a controller and N APs (N is a positive integer greater than or equal to 2), and the controller is connected to each of the N APs in communication. Through the communication connection, the controller can receive information sent by each AP to obtain the number of terminals in the area where the N APs are located according to the received information.
[0069] Exemplarily, the controller is, for example, a network cloud engine (NCE) controller, and the NCE controller can support multiple types of APs, such as APs provided by different manufacturers. The embodiment of the present application does not limit the form of the controller. Figure 2 An exemplary controller is shown, which includes a southbound interface, a processing device, and a northbound interface. The southbound interface is used to receive information sent by an AP, the processing device is used to determine the number of terminals based on the received information, and the northbound interface is used to output the determined number of terminals. The above southbound interface and northbound interface are exemplary descriptions, and information sent by an AP or the determined number of terminals can also be received or output through other interfaces.
[0070] The above AP is connected to a terminal ( Figure 1 and Figure 2 ). Exemplarily, a terminal may refer to an electronic product that performs human-computer interaction with a terminal user through one or more methods such as a keyboard, a touch pad, a touch screen, a remote controller, voice interaction, or a handwriting device. For example, a terminal includes, but is not limited to: a personal computer (PC), a mobile phone, a smart phone, a personal digital assistant (PDA), a wearable device, a pocket PC (PPC), a tablet computer, etc., which are not limited here.
[0071] The present invention provides a method for obtaining the number of terminals. Figure 1 or Figure 2 In the implementation environment shown in FIG. 1 , for example, the method can be implemented by Figure 1 or Figure 2 The implementation environment shown includes the interaction between the controller and at least two APs. Figure 3 As shown, the method provided in the embodiment of the present application includes the following steps 301 to 304.
[0072] Step 301: A first AP in an area sends first information to a controller, where the first information includes time and space information when a first random MAC address is used.
[0073] The area may be a physical area, which includes at least two APs, namely a first AP and a second AP. The first AP and the second AP are different APs. In step 301, the content related to the first AP is first described, and the content related to the second AP is described in detail in step 302 below.
[0074] Exemplarily, the area may be an area divided according to regional functions, including but not limited to commercial areas, office areas, learning areas, residential areas, and transportation areas. The granularity of the division of these areas is not limited in the embodiments of the present application. For example, a commercial area may be a shopping mall, a store in a shopping mall, or a commercial street including multiple shopping malls. An office area may be an office building including multiple floors or a company occupying part of a floor. A learning area may be a teaching building or a school including multiple teaching buildings. A residential area may be a residential building, a house used by a family in a residential building, or a community including multiple residential buildings. A transportation area may be a subway station, etc. Of course, the physical area may also be an area covered by a certain number of APs, or an area with a certain shape or area. The area can be determined based on experience or actual needs.
[0075] Terminals in the area can connect to the first AP to access a communication network (such as the Internet, etc.) through the connected first AP, thereby communicating based on the communication network using a random MAC address. For the first AP, the terminals connected to the first AP correspond to at least one type of information respectively. The first AP can obtain at least one type of information corresponding to the terminal, so as to determine and send the first information to the controller based on the obtained information. Exemplarily, the first AP can receive a first probe request frame sent by a terminal connected to itself. The first probe request frame carries information of the type corresponding to the terminal (i.e., the terminal used to send the first probe request frame). The first AP parses the received first probe request frame to obtain information of the type corresponding to the terminal connected to itself. For ease of understanding, before explaining the first information, the type of information that the first AP can obtain from the terminal is explained.
[0076] Type 1, the spatial and temporal information of random MAC addresses being used.
[0077] Among them, the random MAC address used by the terminal corresponds to the time and space information of the random MAC address being used. The time and space information is used to indicate at least one of the time characteristics and spatial characteristics corresponding to the random MAC address. In an exemplary embodiment, the time and space information of the random MAC address used includes at least one of the time point (also called a timestamp) and the signal strength, the time point is used to identify the moment of use (i.e., the time characteristic), and the signal strength is used to identify the location of the terminal when it is used (i.e., the spatial characteristic). In other words, the time point when the random MAC address is used is used to identify the moment when the random MAC address is used by the terminal, and the signal strength when the random MAC address is used is used to identify the location of the terminal when the random MAC address is used by the terminal.
[0078] In some embodiments, since the spatiotemporal information of the use of the random MAC address can be carried in the first probe request frame, the time point can be determined based on the generation time of the first probe request frame. For example, the time point is used to identify the generation time of the first probe request frame. For another example, the time point has a fixed difference between the time identified and the generation time of the first probe request frame. Since the terminal will trigger the generation and sending of the first probe request frame in real time after starting to use the random MAC address, the generation time of the first probe request frame can reflect the time when the terminal uses the random MAC address, and the time point determined based on the generation time of the first probe request frame can be used to identify the time when the random MAC address is used by the terminal. In other embodiments, the terminal may also record the time when the random MAC address is used, and use the recorded time as the time point.
[0079] Exemplarily, the above-mentioned signal strength includes a first signal strength and a second signal strength, the first signal strength is the strength of the signal received by the terminal from the third AP when the random MAC address is used, and the second signal strength is the strength of the signal received by the terminal from the fourth AP when the random MAC address is used. Among them, the first signal strength reflects the first distance between the terminal and the third AP when the random MAC address is used by the terminal, and the second signal strength reflects the second distance between the terminal and the fourth AP when the random MAC address is used by the terminal. Taking the first signal strength as an example, since the signal may be lost during the transmission from the third AP to the terminal, and the greater the first distance, the greater the loss and the smaller the first signal strength, reverse reasoning shows that the smaller the first signal strength, the greater the first distance, so the first signal strength can reflect the first distance. The reason why the second signal strength can reflect the second distance is similar, and it will not be repeated here. On this basis, since the position of the third AP and the position of the fourth AP are fixed, the first distance and the second distance can reflect the position of the terminal when the random MAC address is used by the terminal, and the signal strength including the first signal strength and the second signal strength can be used to identify the position of the terminal when the random MAC address is used by the terminal. It should be understood that the third AP and the fourth AP are APs other than the first AP and the second AP included in the area. The third AP corresponds to the first signal strength one-to-one, and the fourth AP corresponds to the second signal strength one-to-one.
[0080] In some implementations, the third AP and the fourth AP are all APs of at least two APs. In this implementation, the total number of the first signal strength and the second signal strength is relatively large, so that the location of the terminal is relatively accurate when the random MAC address identified by the signal strength is used by the terminal. For example, there are 4 APs in the area, including AP 1, AP 2, AP 3 and AP 4. The first AP is AP 1, the second AP is AP 2, AP3 and AP 4, the third AP includes AP 1 and AP 2, and the fourth AP includes AP 3 and AP 4. Accordingly, the first signal strength includes the strength S1 of the signal received by the terminal from AP 1 and the strength S2 of the signal received by the terminal from AP 2, and the second signal strength includes the strength S3 of the signal received by the terminal from AP 3 and the strength S4 of the signal received by the terminal from AP 4. Therefore, the signal strength includes S1, S2, S3 and S4.
[0081] In other implementations, the third AP and the fourth AP are some APs of at least two APs. In this implementation, the total number of the first signal strength and the second signal strength is small, so the amount of signal strength data is small, saving the overhead of applying the signal strength (for example, transmitting signal strength, performing subsequent calculations based on signal strength, etc.). Still taking the example of a total of 4 APs including AP 1, AP 2, AP 3 and AP 4 in the area, the first AP is AP 1, the second AP is AP 2, AP 3 and AP 4, the third AP is AP 2, and the fourth AP is AP 4. Accordingly, the first signal strength includes the strength S2 of the signal received by the terminal from AP 2, and the second signal strength includes the strength S4 of the signal received by the terminal from AP 4. Therefore, the signal strength includes S2 and S4.
[0082] It should be understood that the time point and signal strength described above are only examples and are not used to limit the time and space information of the random MAC address being used. For example, in addition to indicating the location of the terminal when the random MAC address is used by the terminal through the above-mentioned signal strength, the location of the terminal when the random MAC address is used by the terminal can also be indicated by longitude and latitude. In the embodiment of the present application, the time and space information of the random MAC address being used can be set according to experience or actual needs.
[0083] Type 2: digital fingerprint information of the terminal.
[0084] The digital fingerprint information of the terminal is used to identify the type of the terminal. Different terminals may have the same or different types. Exemplarily, the digital fingerprint information of the terminal includes but is not limited to at least one of throughput information, SSID information, vender specific information, and frame aggregation information. The digital fingerprint information is described as follows.
[0085] (1) Throughput information is a characteristic of a terminal. The throughput information is used to indicate the ability of the terminal to support throughput transmission. Exemplarily, the throughput information includes but is not limited to at least one of high throughput (HT) capabilities information, HT operations information, very high throughput (VHT) capabilities information, VHT operations information, extremely high throughput (EHT) capabilities information, and EHT operations information.
[0086] (2) SSID information. SSID information is used to indicate the communication network that the terminal can access. SSID includes multiple tags. Exemplarily, SSID information may include the content of the tag (such as the characters included in the tag), or may include the content of the tag and the length of the tag.
[0087] (3) Designated service provider information: The designated service provider information is used to indicate the service provider that can provide services to the terminal.
[0088] (4) Frame aggregation information. The frame aggregation information is used to indicate the frame aggregation technology that the terminal can support. In an exemplary embodiment, the frame aggregation information includes but is not limited to at least one of an aggregation MAC protocol data unit (A-MPDU) and an aggregation MAC service data unit (A-MSDU).
[0089] It should be understood that the digital fingerprint information described above is only an example and is not intended to limit the digital fingerprint information of the terminal. The embodiment of the present application can update the digital fingerprint information of the terminal according to experience or actual needs.
[0090] Type 3, random MAC address, that is, the random MAC address used by the terminal itself, which is not described here.
[0091] The above describes the types of information that the first AP can obtain from the terminal. Exemplarily, the information obtained by the first AP from the terminal is the same type of information. For example, the first AP is connected to terminal 1 and terminal 2. If the first AP obtains two types of information, type 1 and type 2, from terminal 1, then the first AP also obtains two types of information, type 1 and type 2, from terminal 2. And, for type 1 information, if the first AP obtains the time point and signal strength from terminal 1, then the first AP also obtains the time point and signal strength from terminal 2. After the first AP obtains the type of information from the terminal, the first information can be determined based on the obtained information. Since the first AP can obtain information by parsing the first probe request frame, it can be considered that the first information is determined based on the first probe request frame received by the first AP from the terminal. Exemplarily, the first information includes but is not limited to the following situations A1 to A5.
[0092] In case A1, the first information includes information of type 1. For ease of explanation, the random MAC address in case A1 is taken as the first random MAC address, and the first information includes time and space information when the first random MAC address is used.
[0093] For example, in the first information, the first random MAC address corresponds to information [time point, signal strength].
[0094] In case A2, based on case A1, the first information also includes type 2 information, and the type of terminal indicated by the type 2 information is the same. For ease of explanation, the terminal connected to the first AP in case A2 is taken as the first terminal, and the digital fingerprint information of the first terminal (i.e., type 2 information) is taken as the fourth parameter for identifying the type of the first terminal, and the fourth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information. Then, the first information includes the time and space information when the first random MAC address is used, and also includes the fourth parameter for identifying the type of the first terminal.
[0095] For example, in the first information, the first random MAC address corresponds to information [time point, HT capability, SSID information, signal strength].
[0096] Case A3, based on case A1, the first information also includes type 2 information, and the type 2 information indicates a different terminal type. For ease of explanation, the terminal connected to the first AP in case A3 is taken as the third terminal, and the digital fingerprint information of the third terminal (i.e., type 2 information) is taken as the seventh parameter for identifying the type of the third terminal, and the seventh parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information. Then, the first information includes the time and space information when the first random MAC address is used, and also includes the time and space information when the third random MAC address is used, and also includes the seventh parameter for identifying the type of the third terminal. Among them, the first random MAC address and the third random MAC address are random MAC addresses used by third terminals of different types.
[0097] For example, in the first information, the first random MAC address corresponds to the information [time point, HT capability, SSID information, signal strength], and the third random MAC address also corresponds to the information [time point, HT capability, SSID information, signal strength].
[0098] Case A4: Based on Case A1, Case A2 or Case A3, the first information further includes type 3 information.
[0099] For example, for case A1, in the first information, the first random MAC address corresponds to the information [first random MAC address, time point, signal strength], for case A2, in the first information, the first random MAC address corresponds to the information [first random MAC address, time point, HT capability, SSID information, signal strength], for case A3, in the first information, the first random MAC address corresponds to the information [first random MAC address, time point, HT capability, SSID information, signal strength], and the third random MAC address corresponds to the information [third random MAC address, time point, HT capability, SSID information, signal strength].
[0100] Case A5: Based on Case A1, Case A2 or Case A3, the first information further includes a first quantity, and the first quantity is used to identify the quantity of the used spatiotemporal information in the first information.
[0101] As mentioned above, the random MAC address used by the terminal corresponds to the number of spatiotemporal information in which the random MAC address is used, so the first quantity identifies the number of random MAC addresses used by the terminal connected to the first AP. The first AP can count the number of pieces of information received in situation A1, situation A2, situation A3 or situation A4 to obtain the first quantity.
[0102] Regardless of which of the situations A1 to A5 the first information determined by the first AP is, the first AP can send the first information to the controller after determining the first information. It should be understood that although the first information is given as examples in the above situations A1 to A5, these examples are not used to limit the order in which the first AP sends the first information. The first AP can send the first information in any order. The specified order can be manually configured or obtained through negotiation between the first AP and the controller, as long as the controller can recognize the content of the first information after receiving it.
[0103] For example, the first information includes 3 pieces of information, each piece of information is [time point, signal strength]. Then, the first AP may send the first information in the following manner: send each piece of information in sequence, and when sending each piece of information, send the time point first and then the signal strength, or send the signal strength first and then the time point, or interleave the time point and the signal strength before sending. The first AP may also send the first information in the following manner: send 3 time points first and then 3 signal strengths, or send 3 signal strengths first and then 3 time points.
[0104] Step 302: A second AP in the area sends second information to the controller, where the second information includes time and space information when the second random MAC address is used.
[0105] For the terminals in the area, in addition to connecting to the first AP, they can also connect to the second AP to access the communication network through the connected second AP, so as to communicate based on the communication network and using a random MAC address. The terminal connected to the first AP and the terminal connected to the second AP can be completely identical, partially identical, or completely different, which is not limited here. For the case of being completely identical or partially identical, the same terminal may first connect to the first AP and then switch to connecting to the second AP, or may first connect to the second AP and then switch to connecting to the first AP. Exemplarily, the reason for switching the AP to which the terminal is connected includes but is not limited to a change in the location of the terminal, which is not limited in the embodiments of the present application. For example, if the terminal moves from the range covered by the first AP to the range covered by the second AP, the terminal first connects to the first AP and then switches to connecting to the second AP.
[0106] For the second AP, the terminals connected to the second AP respectively correspond to at least one type of information. The second AP can obtain at least one type of information corresponding to the terminal, so as to determine and send the second information to the controller based on the obtained information. Exemplarily, the second AP can receive a second probe request frame sent by a terminal connected to itself. The second probe request frame carries at least one type of information corresponding to the terminal (i.e., the terminal used to send the second probe request frame). The second AP parses the received second probe request frame and can obtain at least one type of information corresponding to the terminal connected to itself. For ease of understanding, before explaining the second information, the types of information that the second AP can obtain from the terminal are explained first.
[0107] Type 1, time-space information of the use of the random MAC address. Exemplarily, the time-space information of the use of the random MAC address includes at least one of a time point and a signal strength, and the time point can be determined based on the generation time of the second probe request frame.
[0108] Type 2: digital fingerprint information of the terminal.
[0109] Type 3, random MAC address.
[0110] For the type of information that the second AP can obtain from the terminal, you can refer to the type of information that the first AP can obtain from the terminal described in step 301, which will not be repeated here. In an exemplary embodiment, the information obtained by the second AP from the terminal is the same type of information, and the information obtained by the first AP and the second AP from the terminal is also the same type of information. After the second AP obtains the type of information from the terminal, the second information can be determined based on the obtained information. Since the second AP can obtain information by parsing the second probe request frame, it can be considered that the second information is determined based on the second probe request frame received by the second AP from the terminal. Exemplarily, the second information includes but is not limited to the following situations B1 to B5.
[0111] In case B1, the second information includes information of type 1. For ease of explanation, the random MAC address in case B1 is used as the second random MAC address, and the second information includes time and space information when the second random MAC address is used.
[0112] Case B2, based on case B1, the second information also includes type 2 information, and the type 2 information indicates the same type of terminal. For ease of explanation, the terminal connected to the second AP in case B2 is taken as the second terminal, and the digital fingerprint information of the second terminal (i.e., type 2 information) is taken as the fifth parameter for identifying the type of the second terminal. The fifth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information, and the fifth parameter is the same type of parameter as the fourth parameter in the above case A2, such as the fourth parameter and the fifth parameter both include HT capability and SSID information. Other cases are not given further examples. Then, the second information includes the spatiotemporal information of the use of the second random MAC address, and also includes the fifth parameter for identifying the type of the second terminal.
[0113] Case B3, based on case B1, the second information also includes information of type 2, and the type of terminal indicated by the information of type 2 is different. For ease of explanation, the terminal connected to the second AP in case B3 is taken as the fourth terminal, and the digital fingerprint information of the fourth terminal (i.e., information of type 2) is taken as the eighth parameter for identifying the type of the fourth terminal. The eighth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information. The eighth parameter is a parameter of the same type as the seventh parameter in the above case B3. Then, the second information includes the spatiotemporal information when the second random MAC address is used, the spatiotemporal information when the fourth random MAC address is used, and the eighth parameter for identifying the type of the fourth terminal. Among them, the second random MAC address and the fourth random MAC address are random MAC addresses used by fourth terminals of different types.
[0114] Case B4: based on Case B1, Case B2 or Case B3, the second information further includes type 3 information.
[0115] Case B5: Based on Case B1, Case B2 or Case B3, the second information further includes a second quantity, and the second quantity is used to identify the quantity of the used spatiotemporal information in the second information.
[0116] As mentioned above, the random MAC address used by the terminal corresponds to the number of spatiotemporal information in which the random MAC address is used, so the second number identifies the number of random MAC addresses used by the terminal connected to the second AP. The second AP can count the number of pieces of information received in case B1, case B2, case B3 or case B4 to obtain the second number.
[0117] It should be understood that situation B1 corresponds to the above situation A1, situation B2 corresponds to the above situation A2, situation B3 corresponds to the above situation A3, situation B4 corresponds to the above situation A4, and situation B5 corresponds to the above situation A5. The situation to which the first information determined by the first AP belongs should correspond to the situation to which the second information determined by the second AP belongs, or the types of the first information and the second information are the same. In addition, no matter which situation from situation B1 to situation B5 the second information determined by the second AP belongs to, the second AP can send the second information to the controller after determining the second information. The way the second AP sends the second information can refer to the way the first AP sends the first information described in step 301 above, which will not be repeated here.
[0118] Step 303: The controller receives first information sent by a first AP and second information sent by a second AP in the area.
[0119] The first information and the second information can refer to the description in the above step 301 and step 302, which will not be repeated here. After the first AP sends the first information to the controller and the second AP sends the second information to the controller (the embodiment of the present application does not limit the sending order of the first information and the second information), the controller can correspondingly receive the first information sent by the first AP in the area and the second information sent by the second AP.
[0120] Step 304: The controller obtains the number of terminals in the area based on the first information and the second information.
[0121] In the embodiment of the present application, the controller can compare the time-space information of different random MAC addresses used in the first information and the second information to determine which random MAC addresses corresponding to the time-space information used are random MAC addresses used by the same terminal, thereby obtaining the number of terminals in the area. In an exemplary embodiment, the controller obtains the number of terminals in the area based on the first information and the second information, including but not limited to the following two acquisition methods.
[0122] Acquisition method one, acquiring the number of terminals in the area based on the first information and the second information, including: acquiring a second parameter based on the first information and the second information, the second parameter is used to indicate the number of repeated random MAC addresses; acquiring a third parameter based on the first information and the second information, the third parameter is used to indicate the total number of random MAC addresses; acquiring the number of terminals in the area based on the second parameter and the third parameter.
[0123] Exemplarily, the number of terminals is the difference between the second parameter and the third parameter, or the number of terminals is the difference obtained by subtracting the second parameter from the third parameter. Alternatively, the number of terminals is the number obtained by calculating the difference according to the first calculation method, which is equivalent to correcting the difference to obtain the number of terminals, thereby improving the accuracy of the number of terminals. The implementation of this application does not limit the first calculation method.
[0124] In the embodiment of the present application, since there are multiple situations for the first information and the second information respectively, the first acquisition method 1 is described below for the first information and the second information in different situations respectively.
[0125] Acquisition method 1, case C1, for the first information in case A1 and the second information in case B1.
[0126] Exemplarily, obtaining the second parameter based on the first information and the second information includes: obtaining the second parameter based on the matching time-space information in the time-space information when the first random MAC address is used and the time-space information when the second random MAC address is used, wherein the random MAC addresses corresponding to the matching time-space information are used by the same terminal.
[0127] As mentioned above, the temporal and spatial information of the random MAC address used includes at least one of a time point and a signal strength. Exemplarily, when the temporal and spatial information used includes a time point for identifying the time of use, the difference between the moments indicated by the time points included in the matched temporal and spatial information is greater than the time threshold. When the temporal and spatial information used includes a signal strength for identifying the location of the terminal when used, the relationship between the similarity between the locations indicated by the signal strength included in the matched temporal and spatial information and the similarity threshold meets the requirement.
[0128] In some implementations, if the spatiotemporal information includes only time points, then if the difference between the moments indicated by two time points is greater than a time threshold, it is considered that the two time points match and the random MAC addresses corresponding to the two time points are used by the same terminal. The reason is that the same terminal will not continuously switch the used random MAC addresses in a short period of time, so when the difference between the moments (indicated by the time points) when the two random MAC addresses are used by the terminal is greater than the time threshold, the two random MAC addresses may be used by the same terminal.
[0129] In other embodiments, if the spatiotemporal information only includes signal strength, then if the relationship between the similarity between the locations of the terminals indicated by the two signal strengths and the similarity threshold meets the requirements, it is considered that the two signal strengths match and the random MAC addresses corresponding to the two signal strengths are used by the same terminal. In the embodiment of the present application, the relationship between the similarity and the similarity threshold meets the requirements, which may mean that the similarity is greater than or equal to the similarity threshold (i.e., the similarity is large enough), or that the similarity is less than the similarity threshold (i.e., the similarity is small enough), which can be determined according to the scenario and is not limited here.
[0130] For example, in a scenario where the terminal is not likely to move (for example, the area is a supermarket in a shopping mall, and the terminal user will stop in front of the shelves in the supermarket, making it difficult for the terminal to move), when the similarity between the locations of the terminals (indicated by signal strength) when the two random MAC addresses are used by the terminals is large enough (that is, the locations of the terminals change very little), the two random MAC addresses may be used by the same terminal. Therefore, in this scenario, the relationship between the similarity and the similarity threshold meets the requirement, which means that the similarity is greater than or equal to the similarity threshold.
[0131] For another example, in a scenario where a terminal is prone to movement (for example, the area is a subway, and terminal users will take the subway, making it easy for the terminal to move), when the similarity between the locations of the terminals (indicated by signal strength) when two random MAC addresses are used by the terminals is small enough (that is, the locations of the terminals change greatly), the two random MAC addresses may be used by the same terminal. Therefore, in this scenario, the relationship between the similarity and the similarity threshold meets the requirement, which means that the similarity is less than the similarity threshold.
[0132] In some other embodiments, if the spatiotemporal information includes a time point and a signal strength, then if the difference between the moments indicated by the time points in the two spatiotemporal information is greater than the time threshold, and the relationship between the similarity between the positions of the terminals indicated by the signal strengths in the two spatiotemporal information and the similarity threshold meets the requirement, then it is considered that the two spatiotemporal information match and the random MAC addresses corresponding to the two spatiotemporal information are used by the same terminal. This is not elaborated here.
[0133] In an exemplary embodiment, the signal strength in the embodiment of the present application is in vector form, and the similarity between the positions indicated by the signal strength includes the vector distance between the signal strengths in vector form. Then, the relationship between the similarity and the similarity threshold meets the requirement, including the relationship between the vector distance and the distance threshold meets the requirement. Exemplarily, the vector distance includes but is not limited to at least one of cosine distance, Manhattan distance, Euclidean distance (also known as Euclidean distance), and covariance distance. The embodiment of the present application does not limit the vector distance.
[0134] In addition, the embodiments of the present application do not limit the acquisition methods of the time threshold and the similarity threshold involved in these embodiments. For example, at least one of the time threshold and the similarity threshold can be set manually based on experience, or can be acquired through machine learning, big data mining, or mathematical modeling.
[0135] According to the above description, by comparing the time-space information, it can be determined whether different time-space information matches, so that the second parameter indicating the number of repeated random MAC addresses can be obtained based on the matched time-space information.
[0136] In some embodiments, all the spatiotemporal information included in each piece of information in the first information and the second information is compared without replacement, and the second parameter is determined. For example, the initial value of the second parameter is set to 0, and two spatiotemporal information are first selected from all the spatiotemporal information for comparison. If the two spatiotemporal information are matching spatiotemporal information, one of the spatiotemporal information is discarded (equivalent to not replacing), and the value of the second parameter is increased by 1 (from 0 to 1), and then the other spatiotemporal information that is not discarded is compared with any remaining spatiotemporal information (any spatiotemporal information in all spatiotemporal information except the two selected spatiotemporal information), and the value of the second parameter is maintained according to the comparison result (whether it matches), until all the spatiotemporal information is compared, and the second parameter for indicating the number of repeated random MAC addresses is obtained.
[0137] For example, there are three matching spatiotemporal information [time point 1, signal strength 1], [time point 2, signal strength 2], and [time point 3, signal strength 3]. In this implementation, [time point 1, signal strength 1] and [time point 2, signal strength 2] are compared and it is determined that the two spatiotemporal information match, so [time point 1, signal strength 1] is discarded, and the value of the second parameter is changed from 0 to 1. Afterwards, [time point 2, signal strength 2] and [time point 3, signal strength 3] are compared and it is determined that the two spatiotemporal information match, so [time point 2, signal strength 2] is discarded, and the value of the second parameter is changed from 1 to 2. Thus, the comparison of all spatiotemporal information is completed, and the second parameter is 2.
[0138] In other implementations, the matched spatiotemporal information is taken as a set, and for a set of matched spatiotemporal information (including at least two spatiotemporal information), the number of spatiotemporal information included in the set is reduced by one, and the number of repeated random MAC addresses in the set can be obtained. If there is only one set, the second parameter is equal to the number of repeated random MAC addresses in the set. If there are multiple sets, the second parameter is equal to the sum of the numbers of repeated random MAC addresses in the multiple sets.
[0139] For example, there are three matching spatiotemporal information [time point 1, signal strength 1], [time point 2, signal strength 2] and [time point 3, signal strength 3]. In this implementation, the set includes three spatiotemporal information, namely [time point 1, signal strength 1], [time point 2, signal strength 2] and [time point 3, signal strength 3]. Since 3-1=2, the second parameter is 2, which is the same as the result of the previous implementation.
[0140] The above describes a method for obtaining the second parameter. The following describes a method for obtaining the third parameter, which indicates the total number of random MAC addresses. Exemplarily, obtaining the third parameter based on the first information and the second information includes: taking the number of spatiotemporal information used in the first information and the second information as the third parameter. In other words, the sum of the number of pieces of information included in the first information and the number of pieces of information included in the second information is taken as the third parameter. For example, the first information includes [time point 1, signal strength 1] (a total of 1 piece of information), and the second information includes [time point 2, signal strength 2] and [time point 3, signal strength 3] (a total of 2 pieces of information), then the third parameter is 3.
[0141] Acquisition method 1, case C2, for the first information in case A2 and the second information in case B2.
[0142] Exemplarily, obtaining the second parameter based on the first information and the second information includes: obtaining the sixth parameter corresponding to the group to which the first information and the second information belong based on the first information and the second information, the sixth parameter being used to indicate the number of repeated random MAC addresses in the group to which the first information and the second information belong. For example, obtaining the sixth parameter corresponding to the group to which the first information and the second information belong based on the first information and the second information includes: determining the group to which the first information and the second information belong based on the fourth parameter and the fifth parameter; obtaining the sixth parameter corresponding to the group to which the first information and the second information belong based on the matching spatiotemporal information in the spatiotemporal information when the first random MAC address is used and the spatiotemporal information when the second random MAC address is used. After obtaining the sixth parameter corresponding to the group to which the first information and the second information belong, the second parameter may be obtained based on the sixth parameter.
[0143] In an embodiment of the present application, for each piece of information included in the first information and each piece of information included in the second information, each piece of information can be clustered to obtain a group according to the type of terminal indicated by the parameters in each piece of information. The type of terminal indicated by the parameters in each piece of information included in the same group is the same, while the type of terminal indicated by the parameters in each piece of information included in different groups is different.
[0144] In case C2, since the type of the first terminal is the same and the type of the second terminal is also the same, the type of the first terminal identified by the fourth parameter in each piece of information included in the first information is the same as the type of the second terminal identified by the fifth parameter in each piece of information included in the second information. Therefore, after clustering the pieces of information according to the fourth parameter and the fifth parameter, the pieces of information are in the same group (i.e., the group to which the first information and the second information belong).
[0145] After the group is obtained by clustering, since each piece of information in the group includes spatiotemporal information, it is possible to determine whether different spatiotemporal information matches by comparing the spatiotemporal information, so that the sixth parameter corresponding to the group can be obtained based on the matched spatiotemporal information, and the sixth parameter is used to indicate the number of repeated random MAC addresses in the group. Among them, the method of obtaining the sixth parameter corresponding to the group in case C2 can refer to the method of obtaining the second parameter in case C1 above, and will not be repeated here. In addition, in case C2, the sixth parameter corresponding to the group can be used as the second parameter, or the sixth parameter corresponding to the group can be calculated according to the second calculation method to obtain the second parameter (equivalent to correcting the sixth parameter to obtain the second parameter, which improves the accuracy of the second parameter). The embodiment of the present application does not limit the second calculation method.
[0146] For example, the first information includes [time point 1, HT capability 1, SSID information 1, signal strength 1], and the second information includes [time point 2, HT capability 1, SSID information 1, signal strength 2] and [time point 3, HT capability 1, SSID information 1, signal strength 3]. Since the HT capabilities in the three pieces of information are all HT capability 1 and the SSID information is all SSID information 1, the three pieces of information correspond to the same type of terminal and are in the same group after clustering. For the spatiotemporal information included in the three pieces of information in the group, the sixth parameter corresponding to the group can be determined in the manner described in the above case C1, so that the second parameter can be obtained according to the sixth parameter.
[0147] Exemplarily, obtaining the third parameter based on the first information and the second information includes: using the amount of spatiotemporal information used in the first information and the second information as the third parameter. The method for obtaining the third parameter in case C2 can refer to the method for obtaining the third parameter in case C1 above, which is not limited here.
[0148] Acquisition method 1, case C3, for the first information in case A3 and the second information in case B3.
[0149] Exemplarily, obtaining the second parameter based on the first information and the second information includes: obtaining the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group based on the first information and the second information, the first group includes the same type of terminals, the second group includes the same type of terminals, the ninth parameter is used to indicate the number of repeated random MAC addresses in the first group, and the tenth parameter is used to indicate the number of repeated random MAC addresses in the second group. For example, obtaining the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group based on the first information and the second information includes: determining the first group and the second group based on the seventh parameter and the eighth parameter; then, in the time-space information when the first random MAC address is used, the time-space information when the second random MAC address is used, the time-space information when the third random MAC address is used, and the time-space information when the fourth random MAC address is used, obtaining the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group based on the matching time-space information. After obtaining the ninth parameter and the tenth parameter, the second parameter can be obtained based on the ninth parameter and the tenth parameter.
[0150] As described above, in an embodiment of the present application, for each piece of information included in the first information and each piece of information included in the second information, each piece of information can be clustered to obtain a group based on the type of terminal indicated by the parameters in each piece of information, and the type of terminal indicated by the parameters in each piece of information included in the same group is the same, while the type of terminal indicated by the parameters in each piece of information included in different groups is different.
[0151] In case C3, since there are different types of terminals in the third terminal and different types of terminals in the fourth terminal, the type of the third terminal identified by the seventh parameter in each piece of information included in the first information is different from the type of the fourth terminal identified by the eighth parameter in each piece of information included in the second information. Therefore, after clustering the pieces of information according to the seventh parameter and the eighth parameter, the pieces of information are located in at least two groups (i.e., the first group and the second group, and the embodiment of the present application does not limit the number of the first group and the number of the second group).
[0152] After clustering to obtain the first group and the second group, for the first group, since each piece of information in the first group includes space-time information, it is possible to determine whether different space-time information matches by comparing the space-time information, so that the ninth parameter corresponding to the first group can be obtained based on the matched space-time information, and the ninth parameter is used to indicate the number of repeated random MAC addresses in the first group. Similarly, it is also possible to determine whether different space-time information matches by comparing the space-time information included in each piece of information in the second group, so that the tenth parameter corresponding to the second group can be obtained based on the matched space-time information, and the tenth parameter is used to indicate the number of repeated random MAC addresses in the second group. Among them, the method of obtaining the ninth parameter corresponding to the first group in case C3 and the method of obtaining the tenth parameter corresponding to the second group can refer to the method of obtaining the second parameter in case C1 above, and will not be repeated here. In addition, in case C3, the sum of the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group can be used as the second parameter, or the sum of the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group can be calculated according to the third calculation method to obtain the second parameter (equivalent to correcting the sum to obtain the second parameter, thereby improving the accuracy of the second parameter). The embodiment of the present application is not limited to the third calculation method.
[0153] For example, the first information includes [time point 1, HT capability 1, SSID information 1, signal strength 1] and [time point 2, HT capability 2, SSID information 2, signal strength 2], and the second information includes [time point 3, HT capability 1, SSID information 1, signal strength 3] and [time point 4, HT capability 2, SSID information 2, signal strength 4]. After clustering, the two pieces of information including HT capability 1 and SSID information 1 among the four pieces of information are located in the first group, and the two pieces of information including HT capability 2 and SSID information 2 are located in the second group. Thereafter, the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group can be determined respectively in the manner described in the above case C1, so as to obtain the second parameter according to the ninth parameter and the tenth parameter.
[0154] Exemplarily, obtaining the third parameter based on the first information and the second information includes: using the amount of spatiotemporal information used in the first information and the second information as the third parameter. The method of obtaining the third parameter in case C3 can refer to the method of obtaining the third parameter in case C1 above, which is not repeated here.
[0155] Case C4 of the acquisition method 1 is for the first information in case A4 and the second information in case B4.
[0156] Among them, the method of obtaining the second parameter in case C4 can refer to the method of obtaining the second parameter in the above-mentioned case C1, case C2 or case C3, which will not be repeated here.
[0157] Exemplarily, obtaining the third parameter based on the first information and the second information includes: determining the third parameter based on the received random MAC address. That is, in case C4, since the first information and the second information include the random MAC address, the third parameter can be determined based on the number of received random MAC addresses, such as using the number of received random MAC addresses as the third parameter.
[0158] For example, the first information includes [MAC 1, time point 1, HT capability 1, SSID information 1, signal strength 1], the second information includes [MAC 2, time point 2, HT capability 2, SSID information 2, signal strength 2] and [MAC 3, time point 3, HT capability 3, SSID information 3, signal strength 3]. Since there are 3 random MAC addresses, MAC 1, MAC 2 and MAC 3, the third parameter is 3.
[0159] Acquisition method 1, case C5, for the first information in case A5 and the second information in case B5.
[0160] Among them, the method of obtaining the second parameter in case C5 can refer to the method of obtaining the second parameter in the above-mentioned case C1, case C2 or case C3, which will not be repeated here.
[0161] Exemplarily, acquiring the third parameter based on the first information and the second information includes: determining the sum of the first quantity and the second quantity as the third parameter. In case C5, since the first quantity included in the first information is used to indicate the quantity of spatiotemporal information used in the first information, and the second quantity included in the second information is used to indicate the quantity of spatiotemporal information used in the second information, the sum of the first quantity and the second quantity can be determined as the third parameter.
[0162] For example, the first information includes [time point 1, HT capability 1, SSID information 1, signal strength 1] and a first quantity 1, and the second information includes [time point 2, HT capability 2, SSID information 2, signal strength 2], [time point 3, HT capability 3, SSID information 3, signal strength 3] and a second quantity 2, and thus the sum of the first quantity and the second quantity is taken as the third parameter, and the third parameter is 3.
[0163] The above describes the situations C1 to C5 corresponding to the acquisition method 1. Figure 4 The method for obtaining the number of terminals provided in the embodiment of the present application is illustrated by way of example. Figure 4 As shown, there are two APs (ie, AP 1 and AP 2) and three terminals (ie, terminal A, terminal B, and terminal C) in the area, wherein terminal A and terminal B are of the same type, and the type of terminal C is different from that of terminal A.
[0164] 1. AP 1 and AP 2 send information to the controller respectively.
[0165] At time 1, the three terminals are in the coverage of AP 1, so the three terminals all access the communication network through AP 1, and:
[0166] Terminal A sends frame 1 to AP 1. AP 1 sends information 1 corresponding to terminal A to the controller based on frame 1 as follows:
[0167] [MAC a1, timestamp a1, (HT a1, SSID a1), signal strength a1];
[0168] Terminal B sends frame 2 to AP 1. AP 1 sends information 2 corresponding to terminal B to the controller based on frame 2 as follows:
[0169] [MAC b1, timestamp b1, (HT b1, SSID b1), signal strength b1];
[0170] Terminal C sends frame 3 to AP 1. AP 1 sends information 3 corresponding to terminal C to the controller based on frame 3 as follows:
[0171] [MAC c1, timestamp c1, (HT c1, SSID c1), signal strength c1].
[0172] At time 2, the three terminals move to the coverage of AP 2, and then the three terminals switch to access the communication network through AP 2, and:
[0173] Terminal A sends frame 4 to AP 2. AP 2 sends information 4 corresponding to terminal A to the controller according to frame 4 as follows:
[0174] [MAC a2, timestamp a2, (HT a2, SSID a2), signal strength a2];
[0175] Terminal B sends frame 5 to AP 2. AP 2 sends information 5 corresponding to terminal B to the controller according to frame 5 as follows:
[0176] [MAC b2, timestamp b2, (HT b2, SSID b2), signal strength b2];
[0177] Terminal C sends frame 6 to AP 2. AP 2 sends information 6 corresponding to terminal C to the controller according to frame 6 as follows:
[0178] [MAC c2, timestamp c2, (HT c2, SSID c2), signal strength c2].
[0179] 2. After the controller receives information 1 to information 3 (ie, first information) at time 1 and information 4 to information 6 (ie, second information) at time 2, it performs a filtering step.
[0180] Since information 1 to information 6 include 6 random MAC addresses, namely MAC a1, MAC b1, MAC c1, MAC a2, MAC b2 and MAC c2, the controller determines L=6 (ie, the third parameter is 6).
[0181] 3. The controller performs a clustering step to improve the efficiency of obtaining the number of terminals and save the overhead required for calculation.
[0182] The controller clusters the information with the same (HT, SSID) into the same group, and clusters the information with different (HT, SSID) into different groups. According to the above description, the types of terminal A and terminal B are the same, so (HT a1, SSID a1), (HT a2, SSID a2) used to indicate the type of terminal A and (HT b1, SSID b1), (HT b2, SSIDb2) used to indicate the type of terminal B are the same, so the controller clusters information 1, information 2, information 4 and information 5 into the first group. According to the above description, the types of terminal A and terminal C are different, so only (HT c1, SSID c1), (HT c2, SSID c2) used to indicate the type of terminal C are the same, so the controller clusters information 3 and information 6 into the second group.
[0183] Fourth, the controller initializes the constant C=0, and defines the time threshold T and similarity D (equivalent to the deduplication condition) to facilitate the execution of the deduplication step.
[0184] For the first group, information 1 and information 4 meet the deduplication condition, C = 0 + 1 = 1;
[0185] For the first group, information 2 and information 5 also meet the deduplication condition, C = 1 + 1 = 2;
[0186] Therefore, the number of repeated random MAC addresses in the first group (i.e., the ninth parameter corresponding to the first group) is 2;
[0187] For the second group, information 3 and information 6 meet the deduplication condition, C = 0 + 1 = 1;
[0188] Therefore, the number of repeated random MAC addresses in the second group (i.e., the tenth parameter corresponding to the second group) is 1;
[0189] Thus, by adding 2 corresponding to the first group and 1 corresponding to the second group, the number of repeated random MAC addresses C=3 is obtained.
[0190] 5. The controller obtains the number of terminals in the area.
[0191] The controller calculates L-C=6-3, which is equal to 3, and thus the number of terminals in the area is 3.
[0192] The second acquisition method, based on the first information and the second information, acquires the number of terminals in the area, including: acquiring a first parameter based on the first information and the second information, the first parameter being used to indicate the number of non-repeated random MAC addresses; acquiring the number of terminals in the area based on the first parameter. Since there are multiple situations for the first information and the second information, the second acquisition method is described below for the first information and the second information in different situations.
[0193] The second acquisition method is situation D1, which is for the first information in situation A1 and the second information in situation B1.
[0194] Among them, since the first information and the second information include the time and space information when the random MAC is used, it is possible to determine whether different time and space information match by comparing the time and space information (the judgment method is detailed in the description of situation C1 above, which is not repeated here), thereby obtaining the first parameter for indicating the number of non-repeated random MAC addresses based on the matching time and space information.
[0195] Exemplarily, the matching spatiotemporal information is taken as a set, and the set includes at least two spatiotemporal information, and the number of sets is the first parameter. For example, there are three matching spatiotemporal information [time point 1, signal strength 1], [time point 2, signal strength 2] and [time point 3, signal strength 3]. In this implementation, the set includes three spatiotemporal information, namely, [time point 1, signal strength 1], [time point 2, signal strength 2] and [time point 3, signal strength 3]. Since there is one set, the first parameter is 1.
[0196] The second acquisition method is situation D2, which is for the first information in situation A2 and the second information in situation B2.
[0197] In case D2, the group to which the first information and the second information belong is first obtained by clustering (the clustering process is detailed in the description of case C2), and the parameter 1 corresponding to the group to which the first information and the second information belong is determined in accordance with the method described in case D1 (used to identify the number of non-repeated random MAC addresses in the group to which the first information and the second information belong), so as to obtain the first parameter based on the parameter 1, such as using the parameter 1 as the first parameter, or modifying the parameter 1 to obtain a first parameter with higher accuracy.
[0198] The second acquisition method is situation D3, for the first information in situation A3 and the second information in situation B3.
[0199] In case D3, the first group and the second group are first obtained by clustering (the clustering process is detailed in the description of case C3), and parameter 2 corresponding to the first group (used to identify the number of non-repeated random MAC addresses in the first group) and parameter 3 corresponding to the second group (used to identify the number of non-repeated random MAC addresses in the second group) are determined in the manner described in case D1, so as to obtain the first parameter based on parameter 2 and parameter 3, for example, the sum of parameter 2 and parameter 3 is used as the first parameter, or the sum is modified to obtain the first parameter.
[0200] For situation D4 of the second acquisition method, for the first information in situation A4 and the second information in situation B4, as well as for the first information in situation A5 and the second information in situation B5, refer to the methods of acquiring the first parameter in situation D1, situation D2 and situation D3, which will not be repeated here.
[0201] In summary, the embodiments of the present application do not need to rely on fixed MAC addresses, and the number of terminals can be obtained through the time and space information of the random MAC address being used, which not only improves privacy and security, but also the accuracy of the number of terminals obtained is as high as more than 90%. Moreover, whether it is a scenario where a fixed MAC address and a random MAC address are used together, or a scenario where only a random MAC address is used, the number of terminals can be obtained by the method provided in the embodiments of the present application, making the method provided in the embodiments of the present application more flexible and highly applicable.
[0202] The above describes the method for obtaining the number of terminals provided in the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a device for obtaining the number of terminals. The device is applied to a controller. The device is used to obtain the number of terminals through Figure 5 The modules shown above perform the Figure 3 The steps performed by the controller in the method shown. Figure 5 As shown, the device for obtaining the number of terminals provided in the embodiment of the present application includes the following modules.
[0203] A receiving module 501 is used to receive first information sent by a first AP and second information sent by a second AP in a region, wherein the first information includes time and space information when the first random MAC address is used, and the second information includes time and space information when the second random MAC address is used;
[0204] The acquisition module 502 is used to acquire the number of terminals in the area based on the first information and the second information.
[0205] In a possible implementation, the acquisition module 502 is used to acquire a first parameter based on the first information and the second information, where the first parameter is used to indicate the number of non-repeated random MAC addresses; and acquire the number of terminals in the area based on the first parameter.
[0206] In one possible implementation, the acquisition module 502 is used to acquire a second parameter based on the first information and the second information, where the second parameter is used to indicate the number of repeated random MAC addresses; acquire a third parameter based on the first information and the second information, where the third parameter is used to indicate the total number of random MAC addresses; and acquire the number of terminals in the area based on the second parameter and the third parameter, where the number of terminals is the difference between the second parameter and the third parameter.
[0207] In one possible implementation, the first information also includes a fourth parameter for identifying the type of the first terminal, and the second information also includes a fifth parameter for identifying the type of the second terminal. The acquisition module 502 is used to acquire a sixth parameter corresponding to the group to which the first information and the second information belong based on the first information and the second information, and the sixth parameter is used to indicate the number of repeated random MAC addresses in the group to which the first information and the second information belong; and acquire the second parameter based on the sixth parameter corresponding to the group to which the first information and the second information belong.
[0208] In one possible implementation, the first information also includes time and space information when the third random MAC address is used and a seventh parameter for identifying the type of the third terminal, and the second information also includes time and space information when the fourth random MAC address is used and an eighth parameter for identifying the type of the fourth terminal. The acquisition module 502 is used to acquire a ninth parameter corresponding to the first group and a tenth parameter corresponding to the second group based on the first information and the second information. The terminals included in the first group are of the same type, and the terminals included in the second group are of the same type. The ninth parameter is used to indicate the number of repeated random MAC addresses in the first group, and the tenth parameter is used to indicate the number of repeated random MAC addresses in the second group; the second parameter is acquired based on the ninth parameter and the tenth parameter.
[0209] In one possible implementation, the fourth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the fifth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the fourth parameter and the fifth parameter are parameters of the same type.
[0210] In one possible implementation, the seventh parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the eighth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; the seventh parameter and the eighth parameter are parameters of the same type.
[0211] In one possible implementation, the acquisition module 502 is used to determine the group to which the first information and the second information belong based on the fourth parameter and the fifth parameter; in the space-time information when the first random MAC address is used and the space-time information when the second random MAC address is used, obtain the sixth parameter corresponding to the group to which the first information and the second information belong based on the matching space-time information.
[0212] In one possible implementation, the acquisition module 502 is used to determine the first group and the second group based on the seventh parameter and the eighth parameter; in the space-time information when the first random MAC address is used, the space-time information when the second random MAC address is used, the space-time information when the third random MAC address is used, and the space-time information when the fourth random MAC address is used, the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group are obtained based on the matching space-time information.
[0213] In one possible implementation, when the used space-time information includes a time point for identifying the moment of use, the difference between the moments indicated by the time points included in the matching space-time information is greater than a time threshold; when the used space-time information includes a signal strength for identifying the location of the terminal when it is used, the relationship between the similarity between the positions indicated by the signal strength included in the matching space-time information and the similarity threshold meets the requirements.
[0214] In a possible implementation, the signal strength is in vector form, the similarity between the positions indicated by the signal strength includes the vector distance between the signal strengths in vector form, and the relationship between the similarity and the similarity threshold satisfies the requirement including the relationship between the vector distance and the distance threshold satisfies the requirement.
[0215] In a possible implementation, the acquisition module 502 is configured to use the amount of used spatiotemporal information in the first information and the second information as a third parameter; or
[0216] The first information and the second information further include a random MAC address, and the acquisition module 502 is configured to determine a third parameter based on the received random MAC address; or
[0217] The first information also includes a first quantity, and the second information also includes a second quantity. The acquisition module 502 is used to determine the sum of the first quantity and the second quantity as a third parameter. The first quantity is used to identify the quantity of used spatiotemporal information in the first information, and the second quantity is used to identify the quantity of used spatiotemporal information in the second information.
[0218] In a possible implementation, the used spatiotemporal information includes at least one of a time point and a signal strength, the time point is used to identify the moment of use, and the signal strength is used to identify the location of the terminal when it is used.
[0219] In one possible implementation, the first information is determined based on a first probe request frame received by a first AP from a terminal, and the time point in the spatiotemporal information when the first random MAC address is used is determined based on the generation time of the first probe request frame; the second information is determined based on a second probe request frame received by a second AP from a terminal, and the time point in the spatiotemporal information when the second random MAC address is used is determined based on the generation time of the second probe request frame.
[0220] In a possible implementation, the signal strength includes a first signal strength and a second signal strength, the first signal strength being the strength of a signal received by the terminal from the third AP when in use, and the second signal strength being the strength of a signal received by the terminal from the fourth AP when in use.
[0221] In addition, the embodiment of the present application also provides another device for obtaining the number of terminals. The device is applied to the first AP or the second AP. The device is used to obtain the number of terminals by Figure 6 The modules shown above perform the Figure 3 The steps performed by the first AP or the second AP in the method shown. Figure 6 As shown, the device for obtaining the number of terminals provided in the embodiment of the present application includes the following modules.
[0222] The sending module 601 is used to send information to the controller, where the information includes time and space information when the random MAC address is used, and the information is used by the controller to obtain the number of terminals in the area.
[0223] Of course, the information sent by the sending module 601 is not limited to the time and space information of the random MAC address being used, but may also include other information, as described in the above method embodiment, which will not be repeated here.
[0224] It should be understood that the above Figure 5 or Figure 6 The device shown in the figure has the following beneficial effects when realizing its function: Figure 3 The methods shown have the same beneficial effects. Figure 5 or Figure 6 When the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0225] Exemplarily, an embodiment of the present application provides a device for obtaining the number of terminals, the device comprising a memory and a processor; the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to enable the device to implement Figure 3 The method shown includes steps performed by a controller or an AP (a first AP or a second AP).
[0226] See also Figure 7 , Figure 7 A schematic structural diagram of an exemplary device 700 for obtaining the number of terminals of the present application is shown. The device 700 for obtaining the number of terminals includes at least one processor 701 , a memory 703 , and at least one network interface 704 .
[0227] Processor 701 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor or one or more integrated circuits or application-specific integrated circuits (ASICs) for implementing the solution of the present application, a programmable logic device (PLD), other general-purpose processors or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components or any combination thereof. PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting an advanced RISC machines (ARM) architecture. It can implement or execute various logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0228] Optionally, the device 700 for obtaining the number of terminals further includes a bus 702. The bus 702 is used to transmit information between components of the device 700 for obtaining the number of terminals. The bus 702 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 702 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.
[0229] The memory 703 is, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache.
[0230] By way of example but not limitation, many forms of ROM and RAM are available. For example, ROM is a compact disc read-only memory (CD-ROM). RAM includes, but is not limited to, static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).
[0231] The memory 703 may also be other types of storage devices that can store static information and instructions. Or it may be other types of dynamic storage devices that can store information and instructions. Or it may be other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, blue-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by the computer, but is not limited to this. The memory 703, for example, exists independently and is connected to the processor 701 through the bus 702. The memory 703 may also be integrated with the processor 701.
[0232] The network interface 704 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The network interface 704 may include a wired network interface and may also include a wireless network interface. Specifically, the network interface 704 may be an Ethernet interface, such as a fast Ethernet (FE) interface, a gigabit Ethernet (GE) interface, an asynchronous transfer mode (ATM) interface, a WLAN interface, a cellular network interface or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface or a combination thereof. In some embodiments of the present application, the network interface 704 may be used for the device 700 for obtaining the number of terminals to communicate with other devices.
[0233] In a specific implementation, as some embodiments, the processor 701 may include one or more CPUs, such as Figure 7 0 and CPU1 shown in FIG. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0234] In a specific implementation, as some implementation methods, the device 700 for obtaining the number of terminals may include multiple processors, such as Figure 7 1 and 10. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0235] In some implementations, the memory 703 is used to store program instructions 710 for executing the solution of the present application, and the processor 701 can execute the program instructions 710 stored in the memory 703. That is, the device 700 for obtaining the number of terminals can implement the method provided in the method embodiment through the processor 701 and the program instructions 710 in the memory 703, that is, Figure 3 The method shown. The program instruction 710 may include one or more software modules. Optionally, the processor 701 itself may also store program instructions for executing the solution of the present application.
[0236] In a specific implementation process, the device 700 for obtaining the number of terminals of the present application may correspond to a controller, a first AP or a second AP for executing the above method, and the processor 701 in the device 700 for obtaining the number of terminals reads the instruction in the memory 703, so that Figure 7 The device 700 for obtaining the number of terminals shown can execute all or part of the steps in the method embodiment.
[0237] The device 700 for obtaining the number of terminals may also correspond to the above Figure 5 or Figure 6 The device shown, Figure 5 or Figure 6 Each functional module in the device shown is implemented using software of the device 700 for obtaining the number of terminals. In other words, Figure 5 or Figure 6 The functional modules included in the apparatus shown are generated after the processor 701 of the device 700 for obtaining the number of terminals reads the program instructions 710 stored in the memory 703 .
[0238] in, Figure 3 Each step of the method shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the device 700 for obtaining the number of terminals. The steps of the method embodiment disclosed in the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art 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, and the processor reads the information in the memory, and completes the steps of the above method embodiment in combination with its hardware. To avoid repetition, it is not described in detail here.
[0239] Exemplarily, an embodiment of the present application provides a system for obtaining the number of terminals, the system comprising a controller, a first AP and a second AP, the controller being configured to execute Figure 3 In the method shown, the controller performs the steps, the first AP is used to perform Figure 3 The steps performed by the first AP in the method shown are performed by the second AP Figure 3 The steps performed by the second AP in the method shown.
[0240] Exemplarily, an embodiment of the present application provides a computer-readable storage medium, in which at least one computer instruction is stored, and the computer instruction is loaded and executed by a processor to enable a computer to implement Figure 3 The method shown includes steps performed by a controller or an AP (a first AP or a second AP).
[0241] In an exemplary embodiment, the present application provides a computer program or a computer program product, wherein the computer program or the computer program product includes computer instructions, and the computer instructions are executed by a processor to enable a computer to implement Figure 3 The method shown includes steps performed by a controller or an AP (a first AP or a second AP).
[0242] Exemplarily, an embodiment of the present application provides a chip, including a processor, the processor is used to call and execute instructions stored in the memory from a memory, so that a computer equipped with the chip executes Figure 3 The method shown includes steps performed by a controller or an AP (a first AP or a second AP).
[0243] Exemplarily, the embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the computer equipped with the chip realizes Figure 3 The method shown includes steps performed by a controller or an AP (a first AP or a second AP).
[0244] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk), etc.
[0245] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.
[0246] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0247] In this application, the term "at least one" means one or more, and the term "multiple" means two or more, for example, multiple APs means two or more APs. In addition, the terms "system" and "network" are used interchangeably in this document.
[0248] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0249] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0250] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.
[0251] The above description is only an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for obtaining the number of terminals, characterized in that: The method comprises: receiving first information sent by a first access point AP and second information sent by a second AP in a receiving area, wherein the first information includes time and space information when a first random media access control MAC address is used, and the second information includes time and space information when a second random MAC address is used; The number of terminals in the area is acquired based on the first information and the second information.
2. The method according to claim 1, characterized in that The acquiring the number of terminals in the area based on the first information and the second information includes: Acquire a first parameter based on the first information and the second information, where the first parameter is used to indicate the number of non-repeated random MAC addresses; The number of terminals in the area is obtained based on the first parameter.
3. The method according to claim 1, characterized in that The acquiring the number of terminals in the area based on the first information and the second information includes: Acquire a second parameter based on the first information and the second information, where the second parameter is used to indicate the number of repeated random MAC addresses; Acquire a third parameter based on the first information and the second information, where the third parameter is used to indicate the total number of random MAC addresses; The number of terminals in the area is obtained based on the second parameter and the third parameter, where the number of terminals is a difference between the second parameter and the third parameter.
4. The method according to claim 3, characterized in that: The first information further includes a fourth parameter for identifying a type of the first terminal, the second information further includes a fifth parameter for identifying a type of the second terminal, and acquiring the second parameter based on the first information and the second information includes: Acquire, based on the first information and the second information, a sixth parameter corresponding to the group to which the first information and the second information belong, where the sixth parameter is used to indicate the number of repeated random MAC addresses in the group to which the first information and the second information belong; The second parameter is obtained based on a sixth parameter corresponding to the group to which the first information and the second information belong.
5. The method according to claim 3, characterized in that: The first information further includes time and space information when the third random MAC address is used and a seventh parameter for identifying the type of the third terminal, the second information further includes time and space information when the fourth random MAC address is used and an eighth parameter for identifying the type of the fourth terminal, and acquiring the second parameter based on the first information and the second information includes: acquiring, based on the first information and the second information, a ninth parameter corresponding to the first group and a tenth parameter corresponding to the second group, wherein the first group includes terminals of the same type, the second group includes terminals of the same type, the ninth parameter is used to indicate the number of repeated random MAC addresses in the first group, and the tenth parameter is used to indicate the number of repeated random MAC addresses in the second group; The second parameter is obtained based on the ninth parameter and the tenth parameter.
6. The method according to claim 4, characterized in that The fourth parameter includes at least one of throughput information, service set identifier SSID information, designated service provider information and frame aggregation information; The fifth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; The fourth parameter and the fifth parameter are parameters of the same type.
7. The method according to claim 5, characterized in that The seventh parameter includes at least one of throughput information, service set identifier SSID information, designated service provider information and frame aggregation information; The eighth parameter includes at least one of throughput information, SSID information, designated service provider information, and frame aggregation information; The seventh parameter and the eighth parameter are parameters of the same type.
8. The method according to claim 4 or 6, characterized in that: The acquiring, based on the first information and the second information, a sixth parameter corresponding to the group to which the first information and the second information belong, includes: Based on the fourth parameter and the fifth parameter, determining the group to which the first information and the second information belong; In the time-space information when the first random MAC address is used and the time-space information when the second random MAC address is used, a sixth parameter corresponding to the group to which the first information and the second information belong is obtained based on the matched time-space information.
9. The method according to claim 5 or 7, characterized in that: The acquiring, based on the first information and the second information, a ninth parameter corresponding to the first group and a tenth parameter corresponding to the second group includes: Determining the first group and the second group based on the seventh parameter and the eighth parameter; In the space-time information when the first random MAC address is used, the space-time information when the second random MAC address is used, the space-time information when the third random MAC address is used, and the space-time information when the fourth random MAC address is used, the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group are obtained based on the matching space-time information.
10. The method according to claim 8 or 9, characterized in that: In a case where the used spatiotemporal information includes a time point for identifying a used moment, a difference between moments indicated by the time points included in the matched spatiotemporal information is greater than a time threshold; In the case where the used spatiotemporal information includes a signal strength for identifying the location of the terminal when used, the relationship between the similarity between the locations indicated by the signal strength included in the matched spatiotemporal information and the similarity threshold meets the requirement.
11. The method according to claim 10, characterized in that The signal strength is in vector form, the similarity between the positions indicated by the signal strength includes the vector distance between the signal strengths in vector form, and the relationship between the similarity and the similarity threshold satisfies the requirement including the relationship between the vector distance and the distance threshold satisfies the requirement.
12. The method according to any one of claims 3 to 11, characterized in that: The acquiring a third parameter based on the first information and the second information includes: Taking the amount of used spatiotemporal information in the first information and the second information as the third parameter; Alternatively, the first information and the second information further include a random MAC address, and the third parameter is determined based on the received random MAC address; Alternatively, the first information also includes a first quantity, and the second information also includes a second quantity, and the sum of the first quantity and the second quantity is determined as the third parameter, the first quantity is used to identify the amount of used spatiotemporal information in the first information, and the second quantity is used to identify the amount of used spatiotemporal information in the second information.
13. The method according to any one of claims 1 to 9, characterized in that: The used spatiotemporal information includes at least one of a time point and a signal strength, wherein the time point is used to identify the moment of use, and the signal strength is used to identify the location of the terminal when used.
14. The method according to any one of claims 10, 11 and 13, characterized in that: The first information is determined according to a first probe request frame received by the first AP from a terminal, and a time point in the spatiotemporal information when the first random MAC address is used is determined based on a generation time of the first probe request frame; The second information is determined according to a second probe request frame received by the second AP from the terminal, and the time point in the spatiotemporal information at which the second random MAC address is used is determined based on a generation time of the second probe request frame.
15. The method according to any one of claims 10, 11, 13 and 14, characterized in that: The signal strength includes a first signal strength and a second signal strength, the first signal strength being the strength of a signal received by the terminal from the third AP when in use, and the second signal strength being the strength of a signal received by the terminal from the fourth AP when in use.
16. A device for obtaining the number of terminals, characterized in that: The device comprises: A receiving module, configured to receive first information sent by a first access point AP and second information sent by a second AP in a region, wherein the first information includes time and space information when a first random media access control MAC address is used, and the second information includes time and space information when a second random MAC address is used; An acquisition module is used to acquire the number of terminals in the area based on the first information and the second information.
17. The device according to claim 16, characterized in that The acquisition module is used to acquire a first parameter based on the first information and the second information, where the first parameter is used to indicate the number of non-repeated random MAC addresses; and acquire the number of terminals in the area based on the first parameter.
18. The device according to claim 16, characterized in that The acquisition module is used for: Acquire a second parameter based on the first information and the second information, where the second parameter is used to indicate the number of repeated random MAC addresses; Acquire a third parameter based on the first information and the second information, where the third parameter is used to indicate the total number of random MAC addresses; The number of terminals in the area is obtained based on the second parameter and the third parameter, where the number of terminals is a difference between the second parameter and the third parameter.
19. The device according to claim 18, characterized in that The first information further includes a fourth parameter for identifying a type of the first terminal, the second information further includes a fifth parameter for identifying a type of the second terminal, and the acquisition module is used to: Acquire, based on the first information and the second information, a sixth parameter corresponding to the group to which the first information and the second information belong, where the sixth parameter is used to indicate the number of repeated random MAC addresses in the group to which the first information and the second information belong; The second parameter is obtained based on a sixth parameter corresponding to the group to which the first information and the second information belong.
20. The device according to claim 18, characterized in that The first information further includes time and space information when the third random MAC address is used and a seventh parameter for identifying the type of the third terminal, the second information further includes time and space information when the fourth random MAC address is used and an eighth parameter for identifying the type of the fourth terminal, and the acquisition module is used to: acquiring, based on the first information and the second information, a ninth parameter corresponding to the first group and a tenth parameter corresponding to the second group, wherein the first group includes terminals of the same type, the second group includes terminals of the same type, the ninth parameter is used to indicate the number of repeated random MAC addresses in the first group, and the tenth parameter is used to indicate the number of repeated random MAC addresses in the second group; The second parameter is obtained based on the ninth parameter and the tenth parameter.
21. The device according to claim 19, characterized in that The fourth parameter includes at least one of throughput information, service set identifier SSID information, designated service provider information and frame aggregation information; the fifth parameter includes at least one of throughput information, SSID information, designated service provider information and frame aggregation information; the fourth parameter and the fifth parameter are parameters of the same type.
22. The device according to claim 20, characterized in that The seventh parameter includes at least one of throughput information, service set identifier SSID information, designated service provider information and frame aggregation information; the eighth parameter includes at least one of throughput information, SSID information, designated service provider information and frame aggregation information; the seventh parameter and the eighth parameter are parameters of the same type.
23. The device according to claim 19 or 21, characterized in that The acquisition module is used for: Based on the fourth parameter and the fifth parameter, determining the group to which the first information and the second information belong; In the time-space information when the first random MAC address is used and the time-space information when the second random MAC address is used, a sixth parameter corresponding to the group to which the first information and the second information belong is obtained based on the matched time-space information.
24. The device according to claim 20 or 22, characterized in that The acquisition module is used for: Determining the first group and the second group based on the seventh parameter and the eighth parameter; In the space-time information when the first random MAC address is used, the space-time information when the second random MAC address is used, the space-time information when the third random MAC address is used, and the space-time information when the fourth random MAC address is used, the ninth parameter corresponding to the first group and the tenth parameter corresponding to the second group are obtained based on the matching space-time information.
25. The device according to claim 23 or 24, characterized in that In the case where the used space-time information includes a time point for identifying the moment of use, the difference between the moments indicated by the time points included in the matched space-time information is greater than the time threshold; in the case where the used space-time information includes a signal strength for identifying the location of the terminal when it is used, the relationship between the similarity between the positions indicated by the signal strength included in the matched space-time information and the similarity threshold meets the requirements.
26. The device according to claim 25, characterized in that The signal strength is in vector form, the similarity between the positions indicated by the signal strength includes the vector distance between the signal strengths in vector form, and the relationship between the similarity and the similarity threshold satisfies the requirement including the relationship between the vector distance and the distance threshold satisfies the requirement.
27. The device according to any one of claims 18 to 26, characterized in that The acquisition module is used to use the amount of used spatiotemporal information in the first information and the second information as the third parameter; or The first information and the second information further include a random MAC address, and the acquisition module is used to determine the third parameter based on the received random MAC address; or The first information also includes a first quantity, and the second information also includes a second quantity. The acquisition module is used to determine the sum of the first quantity and the second quantity as the third parameter, the first quantity is used to identify the amount of used spatiotemporal information in the first information, and the second quantity is used to identify the amount of used spatiotemporal information in the second information.
28. The device according to any one of claims 16 to 24, characterized in that The used spatiotemporal information includes at least one of a time point and a signal strength, wherein the time point is used to identify the moment of use, and the signal strength is used to identify the location of the terminal when used.
29. The device according to any one of claims 25, 26 and 28, characterized in that The first information is determined according to a first probe request frame received by the first AP from a terminal, and a time point in the spatiotemporal information when the first random MAC address is used is determined based on a generation time of the first probe request frame; The second information is determined according to a second probe request frame received by the second AP from the terminal, and the time point in the spatiotemporal information at which the second random MAC address is used is determined based on a generation time of the second probe request frame.
30. The device according to any one of claims 25, 26, 28 and 29, characterized in that The signal strength includes a first signal strength and a second signal strength, the first signal strength being the strength of a signal received by the terminal from the third AP when in use, and the second signal strength being the strength of a signal received by the terminal from the fourth AP when in use.
