Business Scenario Recognition Method, Electronic Device, and Storage Medium
By using base station information to match scene feature data in electronic devices, combined with Cell-ID positioning and WiFi scanning, the problems of high power consumption and poor real-time performance in the prior art business scenario identification are solved, and the recognition effect of low power consumption and high real-time performance is achieved.
Patent Information
- Application Number
- CN202411180585.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-10-26
AI Technical Summary
When the prior art recognizes business scenarios in electronic devices, the power consumption is large and the real-time performance is poor, mainly due to the need to frequently query location information from the cloud service platform.
By matching the base station information with scene feature data in electronic devices, scene recognition is directly performed without requiring a cloud service platform, Cell-ID positioning and WiFi scanning are used to improve recognition accuracy and reduce power consumption.
It realizes low-power business scenario recognition, improves real-time recognition, reduces dependence on cloud service platforms, and reduces power consumption of electronic devices.
Smart Images

Figure CN118945815B_ABST
Abstract
Description
[0001] This application is a divisional application of a Chinese patent application submitted to the National Intellectual Property Administration on October 26, 2022, with the application number 202211320411.X and the application title "Business Scenario Recognition Method, Electronic Device and Storage Medium". Technical Field
[0002] This application relates to the field of terminal technologies, and in particular, to a business scenario recognition method, an electronic device, and a storage medium. Background Art
[0003] In daily life, in some scenarios such as companies, canteens, cinemas, shopping malls, railway stations, airports, schools, hospitals, scenic spots, etc., users usually need electronic devices to continuously perform scene recognition to determine the relationship between their locations and the scenes, so as to facilitate the realization of some quick services through the electronic devices. For example, when an electronic device (such as a mobile phone) recognizes that the user enters the canteen, a payment code quick card is automatically popped up on the mobile phone interface, so that when the user buys food in the canteen, the payment can be quickly completed based on the payment code quick card.
[0004] In the related art, when a certain service triggers an electronic device to perform scene recognition, the electronic device locates the current location information and sends the location information to the cloud service platform. A large number of scene features of different scenes are stored in the cloud service platform. The cloud service platform queries whether the corresponding location is in the target scene according to the received location information and feeds back the result to the electronic device.
[0005] However, since the electronic device needs to query the location from the cloud service platform every time, the power consumption is relatively large and the real-time performance is poor. Summary of the Invention
[0006] This application provides a business scenario recognition method, an electronic device, and a storage medium. The business scenario recognition method can achieve low-power business scenario recognition and can effectively improve the real-time performance of business scenario recognition.
[0007] In a first aspect, this application provides a business scenario recognition method, which is executed by an electronic device. The method includes: when a scene recognition request for a target service is monitored, obtaining the base station information of the base station currently accessed by the electronic device, where the base station information includes a target operator identifier, a target cell number, and a target base station number, and the scene recognition request is used to request to recognize whether the electronic device is located in a target scene associated with the target service; performing scene recognition based on the scene feature data and the base station information to determine whether the electronic device is located in the target scene, where the scene feature data includes at least one base station fence snapshot, and the base station fence snapshot includes an operator identifier, a cell number, and a base station number with an associated relationship.
[0008] When the scene recognition accuracy includes high accuracy, the base station information is detected to match the operator identification, cell number, and base station number in a base station fence snapshot, and the base station fence snapshot includes a scene fence identification; according to the scene fence identification in the base station fence snapshot that matches the base station information, a target scene fence snapshot is determined; the target scene fence snapshot includes WiFi features; the fence area corresponding to the target scene fence snapshot is determined; the current location of the electronic device is obtained; if it is detected that the current location is within the fence area, the WiFi list of the electronic device is obtained; if it is detected that the WiFi list matches the WiFi features, it is determined that the electronic device is located in the target scene.
[0009] Optionally, the target scene fence snapshot includes the longitude and latitude information of the center point of the scene fence and the radius of the scene fence, and the fence area is determined according to the longitude and latitude information of the center point of the scene fence and the radius of the scene fence in the target scene fence snapshot.
[0010] Optionally, the base station information of the base station currently accessed by the electronic device can be obtained by means of Cell-ID positioning.
[0011] Optionally, the target service can be a regular payment service, a ticket collection service, a QR code service, a ticket purchase service, etc.
[0012] Optionally, the operator identification, cell number, and base station number with an associated relationship are used to uniquely identify a base station.
[0013] Optionally, the base station fence snapshot can also include the longitude and latitude information of the center point of the base station fence and the radius of the base station fence.
[0014] The service scenario recognition method provided by the first aspect, when a scenario recognition request for a target service is monitored, obtains the base station information of the base station currently accessed by the electronic device, and performs scenario recognition based on the scenario feature data and the base station information to determine whether the electronic device is located within the target scenario. Among them, the scenario feature data includes at least one base station fence snapshot, and the base station fence snapshot includes an operator identifier, a cell number, and a base station number with an associated relationship. The base station information includes a target operator identifier, a target cell number, and a target base station number. Obviously, performing scenario recognition based on the scenario feature data and the base station information is to compare the operator identifier, cell number, and base station number in the base station fence snapshot with the target operator identifier, target cell number, and target base station number in the base station information. That is to say, this method determines whether the electronic device is located within the target scenario by comparing the base station information with the base station fence snapshot. During the process of performing service scenario recognition, the base station information is used, and there is no need to request the cloud service platform to obtain the location. Moreover, compared with GPS positioning in the related art, the power consumption of base station positioning is less than that of GPS positioning. In this method, there is also no need to compare with the data in the cloud service platform, thereby reducing the power consumption of the electronic device and improving the real-time performance.
[0015] For services with high-precision scenario recognition, when the base station information of the electronic device matches a certain base station fence snapshot in the base station fence snapshot set, and the current position of the electronic device is within the fence area corresponding to a certain scenario fence snapshot (the scenario fence snapshot determined by the scenario fence identifier in the base station fence snapshot), and the WiFi list matches the WiFi features in the base station fence snapshot, it can be recognized that the electronic device enters the service scenario with high-precision scenario recognition, and the real-time performance is high. Based on this, a quick card can be immediately recommended to the user, improving the intelligence of the electronic device, meeting the user's usage requirements, and improving the user experience.
[0016] During the process of high-precision service scenario recognition, on the one hand, Cell-ID positioning is adopted in the early stage (that is, Cell-ID positioning is adopted before matching with the scenario fence snapshot), and GPS positioning and WiFi scanning are adopted in the later stage, saving power while maintaining the recognition accuracy. On the other hand, there is no need to request the cloud service platform during the service scenario recognition process, which also saves power.
[0017] Optionally, the scenario feature data can be the data sent by the cloud service platform to the electronic device based on the feature acquisition request sent by the electronic device to the cloud service platform. The electronic device pre-caches the scenario feature data in the local database.
[0018] In a possible implementation, when the scene recognition accuracy of the target service is detected to be low, scene recognition is performed based on the scene feature data and the base station information to determine whether the electronic device is located in the target scene, including: if the base station information matches the operator identifier, cell number, and base station number in a base station fence snapshot, it is determined that the electronic device is located in the target scene.
[0019] In this implementation, for a service with low scene recognition accuracy, as long as the base station information of the electronic device matches a certain base station fence snapshot in the base station fence snapshot set, it can be recognized that the electronic device enters the service scene with low scene recognition accuracy, and the real-time performance is high. Based on this, a quick card can be immediately recommended to the user, improving the intelligence of the electronic device, meeting the user's usage requirements, and improving the user experience.
[0020] In the process of low-accuracy service scene recognition, on the one hand, the power consumption of the electronic device using Cell-ID positioning is less than that of using GPS positioning. Therefore, the method of matching the base station information of the electronic device with the base station fence snapshot is used to recognize whether the electronic device enters the service scene with low scene recognition accuracy, saving power consumption. On the other hand, it is not necessary to request the cloud service platform during the service scene recognition process, which also saves power consumption.
[0021] Optionally, if no base station fence snapshot matching the base station information is found in the scene feature data, it is determined that the electronic device is not currently located in the target scene associated with the target service. For example, if no base station fence snapshot in the scene feature data has the operator identifier, cell number, and base station number that are all the same as the target operator identifier, target cell number, and target base station number in the base station information, it is determined that the electronic device is not currently located in the target scene associated with the target service.
[0022] In a possible implementation, when the scene recognition accuracy of the target service is detected to be low, scene recognition is performed based on the scene feature data and the base station information to determine whether the electronic device is located in the target scene, and it may further include: if the base station information does not match the operator identifier, cell number, and base station number in any base station fence snapshot, the target area is determined according to the target service, and the target area is the area corresponding to the destination, and the destination is the location to achieve the target service; obtain the current location of the electronic device; if it is detected that the current location of the electronic device is within the target area, it is determined that the electronic device is located in the target scene.
[0023] In this implementation method, before the base station information of the electronic device is matched with any base station fence snapshot, the current position information of the electronic device and the target area can be used to determine whether the current position of the electronic device is within the target area, so as to identify whether the electronic device enters a service scenario with low-precision scene recognition accuracy, providing support for the cold start of low-precision service scenario recognition.
[0024] Optionally, the base station fence snapshot may further include a scene fence identifier. The scene feature data may further include at least one base station fence snapshot, and the base station fence snapshot includes the longitude and latitude information of the scene fence center point with an associated relationship and the scene fence radius.
[0025] In a possible implementation method, when it is detected that the scene recognition accuracy of the target service is medium-precision, scene recognition is performed based on the scene feature data and the base station information to determine whether the electronic device is located in the target scene, including: if the base station information matches the operator identifier, cell number, and base station number in a base station fence snapshot, the target scene fence snapshot is determined according to the scene fence identifier in the base station fence snapshot that matches the base station information; the fence area is determined according to the longitude and latitude information of the scene fence center point and the scene fence radius in the target scene fence snapshot; the current position of the electronic device is obtained; if it is detected that the current position of the electronic device is within the fence area, it is determined that the electronic device is located in the target scene.
[0026] In this implementation method, for a service with medium-precision scene recognition, when the base station information of the electronic device matches a certain base station fence snapshot and the current position of the electronic device is within the fence area corresponding to a certain base station fence snapshot (the base station fence snapshot determined by the scene fence identifier in this base station fence snapshot), it can be recognized that the electronic device enters a service scenario with medium-precision scene recognition accuracy, and the real-time performance is high. Based on this, a quick card can be immediately recommended to the user, improving the intelligence of the electronic device, meeting the user's usage requirements, and improving the user experience. And when the base station information of the electronic device matches a certain base station fence snapshot in the base station fence snapshot set, it is detected whether the current position of the electronic device is within the fence area corresponding to a certain base station fence snapshot, that is, the medium-precision service scenario recognition is started, effectively avoiding the power consumption waste of the medium-precision service scenario recognition.
[0027] During the medium-precision service scenario recognition process, on the one hand, Cell-ID positioning is used in the early stage (that is, Cell-ID positioning is used before matching with the scene fence snapshot), and it is not necessary to use GPS positioning throughout the process, saving power consumption. On the other hand, it is not necessary to request the cloud service platform during the service scenario recognition process, also saving power consumption.
[0028] Optionally, obtaining the current location of the electronic device may include: obtaining the current location of the electronic device through the Global Positioning System, which can ensure the accuracy of the obtained current location of the electronic device, thereby improving the accuracy of business scenario recognition.
[0029] Optionally, the WiFi list includes at least one WiFi identification information and the WiFi strength corresponding to each WiFi identification information.
[0030] In a possible implementation, if it is detected that the WiFi list matches the WiFi characteristics of the target scenario fence snapshot, it is determined that the electronic device is located within the target scenario, including: determining the matching degree threshold corresponding to the WiFi list; if it is detected that the WiFi identification information in the WiFi list matches the WiFi identification information list in the WiFi characteristics, and the matching degree threshold is greater than or equal to the target matching degree threshold, it is determined that the electronic device is located within the target scenario.
[0031] Optionally, if it is detected that the WiFi list matches the WiFi characteristics of the target scenario fence snapshot, determining that the electronic device is located within the target scenario may further include: if the WiFi identification information in the WiFi list and the WiFi strength corresponding to each WiFi identification information match the WiFi identification information in the WiFi identification information list in the WiFi characteristics and the WiFi strength corresponding to each WiFi identification information, it is determined that the electronic device is located within the target scenario.
[0032] In this implementation, the accuracy of the result of the match between the WiFi list and the WiFi characteristics is improved, which is beneficial to improving the accuracy of business scenario recognition.
[0033] Optionally, the WiFi list can be obtained by using the WiFi hitchhiking technology. The WiFi hitchhiking technology refers to obtaining the WiFi scan results generated by the system or third-party applications, and the WiFi scan results can include the WiFi list.
[0034] In a possible implementation, the business scenario recognition method provided in this application may further include: if it is detected that the WiFi list does not match the WiFi characteristics of the target scenario fence snapshot, obtaining the WiFi list generated by the third-party application; if it is detected that the WiFi list generated by the third-party application matches the WiFi characteristics of the target scenario fence snapshot, it is determined that the electronic device is located within the target scenario.
[0035] In this implementation, when the WiFi list does not match the WiFi characteristics, the WiFi hitchhiking technology is used to obtain WiFi-related data without performing a separate WiFi scan, effectively saving power consumption.
[0036] In a possible implementation, when the scene recognition accuracy of the target service is high, scene recognition is performed based on the scene feature data and the base station information to determine whether the electronic device is located in the target scene. It may further include: if it is detected that the WiFi list of the electronic device matches the WiFi features in any one of the scene fence snapshots, it is determined that the electronic device is located in the target scene.
[0037] In this implementation, when the scene recognition accuracy of the target service is high, if it is first detected that the WiFi list matches a certain WiFi feature, it is immediately recognized that the electronic device is located in the target scene, which improves the real-time performance of the service scene recognition and saves the power consumption required for pre-positioning.
[0038] In a possible implementation, the service scene recognition method provided by this application may further include: obtaining the motion state of the user carrying the electronic device; predicting the first motion speed of the user according to the motion state; determining the destination for implementing the target service according to the target service, and determining the first distance between the current position of the user and the destination; predicting the time of the next positioning according to the first motion speed and the first distance.
[0039] Optionally, the current motion state of the user may include a walking state, a running state, a fast walking state, a vehicle driving state, etc.
[0040] In this implementation, the motion speed is evaluated according to the current motion state of the user, and then the time of the next positioning is predicted according to the motion speed and the distance to the destination. Throughout the process, there is no need to always use the GPS method for positioning, which greatly reduces the number of positionings and the power consumption.
[0041] In a possible implementation, the service scene recognition method provided by this application may further include: if during the movement of the electronic device, it is detected that the base station information of the base station currently accessed by the electronic device matches the target base station fence snapshot, then determine the position of the user according to the longitude and latitude information of the center point of the base station fence in the target base station fence snapshot; determine the second distance according to the position of the user and the destination; determine the second motion speed of the user, and update the time of the next positioning according to the second motion speed and the second distance.
[0042] In this implementation, according to the matching base station fence snapshots during the user's movement, the time of the next positioning is continuously refreshed. Throughout the process, there is no need to always use the GPS method for positioning. While maintaining the accuracy of the service scene recognition, it greatly reduces the number of positionings and the power consumption. And as the learning of scene features increases, the scene feature data is continuously improved. In the later stage, no matter where the user wants to go, the number of times of using the GPS method for positioning is less and less, and the overall power consumption that can be saved for realizing the service scene recognition is more and more.
[0043] In a possible implementation, the business scenario recognition method provided by this application may further include: when the electronic device is within the target scenario, obtaining the latest location of the electronic device; determining whether the electronic device has left the target scenario based on the latest location. This implementation can effectively avoid misrecognition and improve the accuracy of business scenario recognition, that is, accurately determine whether the electronic device has truly left the target scenario associated with the target service based on the latest location, thereby bringing a better experience to the user.
[0044] In a possible implementation, the business scenario recognition method provided by this application may further include: when it is detected that the electronic device is stationary, the electronic device stops positioning and / or stops scanning for WiFi, which can effectively save power consumption.
[0045] In a possible implementation, the business scenario recognition method provided by this application may further include: when it is detected that the moving range of the electronic device is less than or equal to a preset range, the electronic device stops positioning and / or stops scanning for WiFi, which can effectively save power consumption.
[0046] Optionally, this application also provides a WIFI chip. This WIFI chip can be installed in an electronic device. The method used by this WIFI chip when scanning for WIFI is different from the method used in the related art for scanning for WIFI, such that the scanning power consumption of this WIFI chip is much lower than that of existing WIFI chips. Based on this WIFI chip for business scenario recognition, the scanning power consumption is greatly reduced.
[0047] Optionally, this application also provides a method for collecting scenario crowdsourcing data, including: a first application in the electronic device executes a first service; a sensing module in the electronic device obtains service data of the first service; the sensing module in the electronic device collects the current environmental data of the electronic device; the sensing module reports a collection of collected data to a cloud service platform, and the collection of collected data includes environmental data and service data, so as to facilitate the cloud service platform to perform cloud computing, thereby learning scenario features based on these data.
[0048] Optionally, this application also provides a method for learning scenario features. This method is usually executed by a cloud service platform and includes: constructing a grid map based on earth surface spatial data; mapping scenario crowdsourcing data into the grid map; determining scenario fence snapshots corresponding to each service; determining base station fence snapshots of each base station. This method provides a basis for subsequent business scenario recognition.
[0049] Optionally, the scenario crowdsourcing data may include multiple sets of scenario collection data. Each set of scenario collection data may include service data and environmental data collected by an electronic device when implementing a corresponding service. Each set of scenario collection data corresponds to a service type, and each set of scenario collection data includes longitude and latitude information.
[0050] Optionally, determining the scenario fence snapshots corresponding to each service may include: determining points of the same attribute in a grid map; clustering the points of the same attribute to obtain a first clustering result, where the first clustering result includes at least one cluster; determining the longitude and latitude information of the center point of the scenario fence according to the first clustering result; determining the radius of the scenario fence according to the first clustering result; and generating a scenario fence snapshot based on the longitude and latitude information of the center point of the scenario fence, the radius of the scenario fence, the service type information, and the city code corresponding to the service type information. This method provides a basis for subsequent service scenario recognition.
[0051] Optionally, the points of the same attribute are the points corresponding to the sets of scenario collection data of the same attribute. The same attribute means that the service type information is the same and the city code is the same.
[0052] Optionally, determining the base station fence snapshots of each base station may include: determining points of the same base station in a grid map; clustering the points of the same base station to obtain a second clustering result, where the second clustering result includes at least one cluster; determining the longitude and latitude information of the center point of the base station fence according to the second clustering result; determining the radius of the base station fence according to the second clustering result; and generating a base station fence snapshot based on the longitude and latitude information of the center point of the base station fence, the radius of the base station fence, the base station indication information, and the city code corresponding to the base station. This method provides a basis for subsequent service scenario recognition.
[0053] Optionally, the points of the same base station are the points corresponding to the sets of scenario collection data of the same base station. The same base station means that the base station indication information is the same, that is, the operator identifier, cell number, and base station number are the same.
[0054] In a second aspect, the present application provides a device. The device is included in an electronic device and has the function of implementing the behavior of the electronic device in the first aspect and the possible implementation manners of the first aspect. The function may be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a listening module or unit, a processing module or unit, etc.
[0055] In a third aspect, the present application provides an electronic device. The electronic device includes: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other to enable the electronic device to execute any one of the methods provided in the first aspect.
[0056] Fourthly, the present application provides a chip, including a processor. The processor is configured to read and execute a computer program stored in a memory to execute the method in the first aspect and any possible implementation manners thereof.
[0057] Optionally, the chip further includes a memory, and the memory is connected to the processor through a circuit or a wire.
[0058] Optionally, the chip further includes a communication interface.
[0059] Optionally, the WIFI chip provided by the present application may also be integrated in the chip.
[0060] Fifthly, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor is caused to execute any one of the technical solutions in the first aspect.
[0061] Sixthly, the present application provides a computer program product, including: computer program code. When the computer program code runs on an electronic device, the electronic device is caused to execute any one of the technical solutions in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A schematic diagram of an application scenario shown in an exemplary embodiment of the present application;
[0063] Figure 2 A schematic diagram of a process of opening a payment code shown in an exemplary embodiment of the present application;
[0064] Figure 3 A schematic diagram of an application scenario shown in another exemplary embodiment of the present application;
[0065] Figure 4 A schematic diagram of a process of opening a two-dimensional code shown in an exemplary embodiment of the present application;
[0066] Figure 5 A schematic diagram of an application scenario shown in yet another exemplary embodiment of the present application;
[0067] Figure 6 A schematic diagram of a system architecture shown in an exemplary embodiment of the present application;
[0068] Figure 7 A schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present application;
[0069] Figure 8 A software structure block diagram of an electronic device shown in an exemplary embodiment of the present application;
[0070] Figure 9 It is a flowchart of the electronic device collecting crowdsourcing data shown in an exemplary embodiment of the present application;
[0071] Figure 10 It is a flowchart of a method for learning scene features shown in an exemplary embodiment of the present application;
[0072] Figure 11 It is a schematic diagram of a grid map shown in an exemplary embodiment of the present application;
[0073] Figure 12 It is a schematic diagram of another grid map shown in an exemplary embodiment of the present application;
[0074] Figure 13 It is a schematic diagram of data distribution shown in an exemplary embodiment of the present application;
[0075] Figure 14 It is a schematic diagram of caching scene features shown in an exemplary embodiment of the present application;
[0076] Figure 15 It is a flowchart of a method for identifying business scenarios shown in an exemplary embodiment of the present application;
[0077] Figure 16 It is a flowchart of a method for predicting the time of the next positioning shown in an exemplary embodiment of the present application;
[0078] Figure 17 It is a schematic diagram of an application scenario for predicting time shown in an exemplary embodiment of the present application;
[0079] Figure 18 It is a schematic diagram of another application scenario for predicting time shown in an exemplary embodiment of the present application;
[0080] Figure 19 It is a schematic diagram of switching the positioning mode shown in an exemplary embodiment of the present application;
[0081] Figure 20 It is a schematic diagram of the power consumption and real-time change shown in an exemplary embodiment of the present application. Detailed implementation manners
[0082] Next, the technical solutions in the present application will be described in conjunction with the accompanying drawings.
[0083] In the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B. The "and / or" herein is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.
[0084] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of this embodiment, unless otherwise specified, the meaning of "a plurality of" is two or more.
[0085] The reference to "an embodiment" or "some embodiments" etc. described in the specification of the present application means that a specific feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, the statements "in an embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprise", "include", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0086] First, some terms in the embodiments of the present application are explained to facilitate the understanding of those skilled in the art.
[0087] 1. Coarse positioning service, also known as Cell-ID positioning or base station positioning. Cell-ID positioning determines the location of a mobile phone based on the location of the cellular base station to which the electronic device (such as a mobile phone) is currently connected. During the process of a user carrying a mobile phone and moving, the location of the user is almost the same as the location of the mobile phone. Therefore, the location of the mobile phone usually determined is also used as the location of the user.
[0088] 2. Point of Interest (POI). Each POI includes at least four basic pieces of information: name, address, category, and latitude and longitude coordinates. For example, a POI can represent a house, a store, the entrance of a community, a mailbox, a bus stop, etc.
[0089] 3. Area Of Interest (AOI), also known as the information area, is mainly used to represent regional geographical entities in map data. For example, an AOI can represent a residential community, a university, an office building, a shopping mall, a scenic spot, a railway station, etc.
[0090] 4. The Density-Based Spatial Clustering of Applications with Noise (DBSCAN) is an unsupervised clustering algorithm. This algorithm divides regions with sufficient density into clusters and defines a cluster as the largest set of density-connected points.
[0091] 5. Morton coding is an algorithm for encoding rasters.
[0092] 6. The Global Positioning System (GPS) is a high-precision radio navigation positioning system based on artificial earth satellites. It can provide accurate geographical locations, vehicle speeds, and precise time information anywhere in the world and in near-earth space.
[0093] The above is a simple introduction to the nouns involved in the embodiments of this application, which will not be elaborated below.
[0094] With the rapid development of electronic devices, users have more and more demands for electronic devices. In some scenarios, users hope that electronic devices can automatically implement certain quick services through scene recognition. For example, taking the electronic device as a mobile phone, when the user enters the airport, they hope that the mobile phone can automatically pop up a prompt card with information such as the waiting hall, flight number, and airline on the interface. Another example is that when the user enters the hospital, they usually hope that the mobile phone can automatically display a QR code on the interface. Another example is that when the user enters the company cafeteria, they hope that the mobile phone can automatically pop up a payment code on the interface.
[0095] To implement scene recognition, usually the electronic device needs to determine the associated services and its own location. For example, when a certain service pre-associated in the electronic device triggers the electronic device to perform scene recognition, the electronic device locates the current location information and then sends this location information to the cloud service platform. A large amount of scene features of different scenes are stored in the cloud service platform. The cloud service platform queries whether the corresponding location is in the target scene based on the received location information and feeds back the result to the electronic device.
[0096] In this implementation method, the electronic device needs to request the cloud service platform every time, resulting in high power consumption and poor real-time performance. For this reason, the embodiments of this application provide a service scene recognition method, which can achieve low-power service scene recognition and can effectively improve the real-time performance of service scene recognition.
[0097] Before introducing the business scenario recognition method provided in the embodiments of the present application in detail, several possible application scenarios involved in the embodiments of the present application (such as scenarios of companies, canteens, cinemas, shopping malls, railway stations, airports, schools, hospitals, scenic spots, etc.) will be introduced. In the embodiments of the present application, taking the electronic device as a mobile phone as an example, several possible application scenarios will be described.
[0098] In one example, please refer to Figure 1 , Figure 1 which is a schematic diagram of an application scenario shown in an exemplary embodiment of the present application. For example, the mobile phone used by user A supports the regular payment service, and user A goes to the company canteen for meals between 11:45 and 12:10 every working day. As Figure 1 shown, user A carries the mobile phone and moves from position S1 to the company canteen at 11:40 am on a working day. During the process of user A carrying the mobile phone and moving, the mobile phone starts to perform scene recognition in the screen-on state to determine whether user A enters the company canteen. After that, when user A enters the area where the company canteen is located, for example, user A moves to position S2 (such as at the entrance of the company canteen) as Figure 1 shown, at this time, the mobile phone displays a card with a payment code on the main interface, so that user A can quickly make a payment using this payment code when buying food.
[0099] For the convenience of understanding, the process of displaying the payment code will be described in combination with the main interface of the mobile phone. Please refer to Figure 2 , Figure 2 which is a schematic diagram of a process of opening a payment code shown in an exemplary embodiment of the present application. For example, when user A is at the company workstation or on the way to the company canteen, the main interface of the mobile phone is as Figure 2 shown in (a), that is, the file management icon 102 is displayed in the YOYO suggestion card 101 shown on the main interface of the mobile phone. When user A enters the area where the company canteen is located, for example, when user A moves to the entrance of the company canteen, the mobile phone recommends a payment code quick card to the user. At this time, the main interface of the mobile phone is as Figure 2 shown in (b), that is, the payment code icon 103 is displayed in the YOYO suggestion card 101 shown on the main interface of the mobile phone. The payment code icon 103 is a shortcut. When the user buys food, clicking on the payment code icon 103 can quickly jump to the payment code interface of the third party, as Figure 2 shown in (c), and quick payment can be realized based on this payment code interface. After the payment is completed, the payment code quick card automatically disappears, and the main interface of the mobile phone is as Figure 2 shown in (d), that is, the file management icon 102 is displayed in the YOYO suggestion card 101 shown on the main interface of the mobile phone.
[0100] Optionally, the payment code quick card can also be displayed above the main interface of the mobile phone. For example, it is displayed at the place of the current display time, date, and day of the week shown in Figure 2 (b).
[0101] In another example, please refer to Figure 3 , Figure 3 which is a schematic diagram of an application scenario shown in another exemplary embodiment of the present application. During the epidemic, two-dimensional codes are required to enter public places and take public transportation. For example, the mobile phone used by user A supports the quick display of two-dimensional codes, and this user A needs to take a bus from bus stop BS1 to bus stop BS2 at 7:25 to 7:35 every working day, and then walk from bus stop BS2 to the company to go to work. As Figure 3 shown, at 7:20 on a working day, the mobile phone starts to perform scene recognition. When the mobile phone determines that user A moves to the S3 position 100 meters away from bus stop BS1, the mobile phone displays a card with a two-dimensional code in the main interface. In this way, the user can quickly display the two-dimensional code before getting on the bus.
[0102] For ease of understanding, the process of displaying the two-dimensional code is described in combination with the main interface of the mobile phone. Please refer to Figure 4 , Figure 4 which is a schematic diagram of a process of opening a two-dimensional code shown in an exemplary embodiment of the present application. For example, when user A is on the way to bus stop BS1, the main interface of the mobile phone is as shown in Figure 4 (a), that is, the file management icon 202 is displayed in the YOYO suggestion card 201 displayed on the main interface of the mobile phone. The mobile phone starts to perform scene recognition at 7:20 on a working day. When the mobile phone determines that user A moves to the S3 position 100 meters away from bus stop BS1, it recommends a two-dimensional code quick card to the user. At this time, the main interface of the mobile phone is as shown in Figure 4 (b), that is, the two-dimensional code icon 203 is displayed in the YOYO suggestion card 201 displayed on the main interface of the mobile phone. The two-dimensional code icon 203 is a shortcut. The user can quickly jump to the two-dimensional code interface of the third party by clicking the two-dimensional code icon 203. For example, after the user clicks the two-dimensional code icon 203, it first jumps to the interface shown in Figure 4 (c). The user then clicks the "My Electronic Code" control in the interface and jumps to the two-dimensional code interface shown in Figure 4 (d), and can quickly display the two-dimensional code to the driver based on this two-dimensional code interface. After the display is completed, the two-dimensional code interface can be exited, and the two-dimensional code quick card automatically disappears. The main interface of the mobile phone is as shown in Figure 4 (e), that is, the file management icon 202 is displayed in the YOYO suggestion card 201 displayed on the main interface of the mobile phone.
[0103] Optionally, the QR code can be a ride code. For example, the position where the QR code icon 203 was originally displayed on the main interface of the mobile phone is now displayed as a ride code icon. The ride code icon is a shortcut, and by clicking on the ride code icon, the user can quickly switch to the ride code interface of the third party. In this way, the user can directly swipe the card with the ride code on the ride code interface after getting on the vehicle.
[0104] In yet another example, refer to Figure 5 , Figure 5 which is a schematic diagram of an application scenario shown in another exemplary embodiment of the present application. For example, the mobile phone used by user A supports quick display of ticket purchasing services, and user A often watches movies at cinema B. Suppose user A goes to cinema B to watch a movie one day. As Figure 5 shown, when the user holds the mobile phone and moves to the entrance of cinema B, the mobile phone automatically displays a movie ticket purchasing icon 302 in the recommended card 301 on the negative first screen. The movie ticket purchasing icon 302 is a shortcut. When the user clicks on the movie ticket purchasing icon 302, the mobile phone responds to the user's click operation and jumps to the ticket purchasing page, facilitating the user to purchase movie tickets based on the ticket purchasing page.
[0105] For ease of understanding, the system architecture involved in the embodiments of the present application will be briefly introduced next. Please refer to Figure 6 , Figure 6 which is a schematic diagram of a system architecture shown in an exemplary embodiment of the present application. This system architecture includes an electronic device 400 and a cloud service platform 500. A communication connection is established between the electronic device 400 and the cloud service platform 500.
[0106] The electronic device 400 is capable of performing scene recognition for some services, so as to automatically implement some quick functions when it is determined that it enters certain specific scenes. For example, automatically display a QR code card, automatically display a ride code card, automatically display a payment code card, etc.
[0107] As an example of the present application, the electronic device 400 has the ability to access a mobile communication network and can support at least one network type. Exemplarily, the electronic device 400 can support the third generation (3G network), the fourth generation (4G), the fifth generation (5G) network, etc. The electronic device 400 provided in the embodiments of the present application can be a mobile phone, a tablet computer, a wearable device, a laptop computer, a netbook, a portable terminal, etc. The embodiments of the present application do not impose any restrictions on the specific type of the electronic device 400.
[0108] The cloud service platform 500 is used to collect data based on scenario crowdsourcing, that is, to collect scenario crowdsourcing data and learn the scenario features corresponding to different services. In this way, the electronic device 400 can pull / obtain some scenario features from the cloud service platform 500 according to the requirements, so as to be able to perform scenario recognition for a certain service based on the pulled / obtained some scenario features.
[0109] The cloud service platform 500 provided by the embodiment of the present application may include a server, such as a cloud server.
[0110] Optionally, on the basis of including the electronic device 400 and the cloud service platform 500, the system structure may further include a map merchant cloud platform. The map merchant cloud platform can provide a positioning service for the electronic device 400, and can also provide scenario crowdsourcing data, etc. for the cloud service platform 500 according to the positioning result. In addition, the cloud service platform 500 can also customize / obtain POI data, AOI data, etc. from the map merchant cloud platform.
[0111] The above briefly introduced the system architecture involved in the embodiment of the present application. Next, the structure of the electronic device 400 involved in the embodiment of the present application will be briefly introduced. Please refer to Figure 7 , Figure 7 is a schematic structural diagram of an electronic device shown in an exemplary embodiment of the present application. The electronic device 400 may include a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a speaker 470A, a receiver 470B, a microphone 470C, a headphone interface 470D, a sensor module 480, a button 490, a motor 491, an indicator 492, a camera 493, a display screen 494, and a subscriber identification module (SIM) card interface 495, etc. The sensor module 480 may include a pressure sensor 480A, a gyroscope sensor 480B, a barometric pressure sensor 480C, a magnetic sensor 480D, an acceleration sensor 480E, a distance sensor 480F, a proximity light sensor 480G, a fingerprint sensor 480H, a temperature sensor 480J, a touch sensor 480K, an ambient light sensor 480L, a bone conduction sensor 480M, etc.
[0112] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 400. In other embodiments of the present application, the electronic device 400 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0113] The processor 410 may include one or more processing units. For example, the processor 410 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0114] Among them, the controller may be the nerve center and command center of the electronic device 400. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0115] A memory may also be provided in the processor 410 for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. This memory may save the instructions or data that the processor 410 has just used or recycled. If the processor 410 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 410, and thus improves the efficiency of the system.
[0116] The wireless communication function of the electronic device 400 may be implemented through antenna 1, antenna 2, a mobile communication module 450, a wireless communication module 460, a modem processor, and a baseband processor, etc.
[0117] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Figure 4 The structure of antenna 1 and antenna 2 in the figure is only an example. Each antenna in the electronic device 400 may be used to cover a single or multiple communication frequency bands. Different antennas may also be multiplexed to improve the utilization rate of the antennas. For example, antenna 1 may be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna may be used in combination with a tuning switch.
[0118] The mobile communication module 450 may provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 400. The mobile communication module 450 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 450 may receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 450 may also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 450 may be provided in the processor 410. In some embodiments, at least some functional modules of the mobile communication module 450 and at least some modules of the processor 410 may be provided in the same device.
[0119] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 470A, receiver 470B, etc.), or displays an image or video through the display screen 494. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 410 and provided in the same device as the mobile communication module 450 or other functional modules.
[0120] The wireless communication module 460 may provide solutions for wireless communications applied to the electronic device 400, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 460 may be one or more devices integrating at least one communication processing module. The wireless communication module 460 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 410. The wireless communication module 460 may also receive the signals to be sent from the processor 410, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.
[0121] In some embodiments, antenna 1 of the electronic device 400 is coupled to the mobile communication module 450, and antenna 2 is coupled to the wireless communication module 460, such that the electronic device 400 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS). It can be understood that, in the embodiments of the present application, the hardware modules in the positioning or navigation system may be referred to as positioning sensors.
[0122] The electronic device 400 implements the display function through the GPU, the display screen 494, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 494 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 410 may include one or more GPUs, which execute program instructions to generate or change the display information.
[0123] The display screen 494 is used to display images, videos, etc. The display screen 494 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 400 may include one or N display screens 494, where N is a positive integer greater than 1.
[0124] The external memory interface 420 can be used to connect to an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 400. The external memory card communicates with the processor 410 through the external memory interface 420 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.
[0125] The internal memory 421 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the instructions stored in the internal memory 421. The internal memory 421 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, APPs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the electronic device 400 (such as audio data, phone book, etc.). In addition, the internal memory 421 can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0126] The pressure sensor 480A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 480A may be disposed on the display screen 494. There are many types of pressure sensors 480A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor may include at least two parallel plates having conductive materials. When a force acts on the pressure sensor 480A, the capacitance between the electrodes changes. The electronic device 400 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 494, the electronic device 400 detects the intensity of the touch operation according to the pressure sensor 480A. The electronic device 400 can also calculate the position of the touch according to the detection signal of the pressure sensor 480A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, the instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
[0127] The acceleration sensor 480E can detect the magnitude of the acceleration of the electronic device 400 in various directions (generally three axes). When the electronic device 400 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0128] It can be understood that the electronic device may further include a speed sensor. The speed sensor is used to obtain the moving speed of the electronic device.
[0129] The ambient light sensor 480L is used to sense the ambient light brightness. The electronic device 400 can adaptively adjust the brightness of the display screen 494 according to the sensed ambient light brightness. The ambient light sensor 480L can also be used to automatically adjust the white balance during photography. The ambient light sensor 480L can also cooperate with the proximity light sensor 480G to detect whether the electronic device 400 is in the pocket to prevent accidental touch. Specifically, in the method of the embodiment of the present application, the electronic device 400 can perform scene recognition according to the ambient light brightness sensed by the ambient light sensor 480L to determine whether the environmental scene (indoor scene or outdoor scene) where the electronic device 400 is located has changed.
[0130] The touch sensor 480K, also known as the "touch panel". The touch sensor 480K can be disposed on the display screen 494, and the touch sensor 480K and the display screen 494 form a touch screen, also known as the "touch control screen". The touch sensor 480K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 494. In some other embodiments, the touch sensor 480K can also be disposed on the surface of the electronic device 400, at a different position from the display screen 494.
[0131] The above briefly introduced the structure of the electronic device 400 involved in the embodiments of the present application. Next, a brief introduction to the software structure involved in the embodiments of the present application will be given. Please refer to Figure 8 , Figure 8 which is a software structure block diagram of an electronic device shown in an exemplary embodiment of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Communication between layers is through software interfaces. In some embodiments, taking the electronic device 400 as an Android system as an example for illustration, the Android system is divided into four layers, from top to bottom are the application layer, the application framework layer, the Android runtime, and the system library, and the kernel layer.
[0132] The application layer may include a series of application packages. As Figure 8 shown, the application packages may include applications such as cameras, calendars, instant messaging, payment, ticket purchasing, maps, navigation, wireless local area networks (WLAN), music, short messages, etc.
[0133] Among them, the instant messaging application can be used not only to implement instant messaging services, but also to implement services such as presenting QR codes and bus codes. For example, the instant messaging application can be but not limited to etc. The payment application can be used to implement online payment services. For example, the payment application can be but not limited to UnionPay, etc. The ticket purchasing application can be used to implement ticket purchasing services. For example, it can include but not limited to applications for purchasing movie tickets, applications for purchasing train tickets or air tickets, etc.
[0134] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.
[0135] As an example of this application, the application framework layer may include a business program module (which may also be referred to as YOYO Suggestion) for displaying a card or controlling the disappearance of a card on the screen of the electronic device 400.
[0136] Optionally, the application framework layer may further include a decision module and a perception module. Among them, the perception module is used to send the generated business data to the notification decision module when it perceives that other applications and the system execute a certain business. In addition, the perception module can also be used for scenario recognition for a certain business. The decision module is used for business event management based on business data, such as requesting the perception module to perform scenario recognition based on business data.
[0137] Optionally, the application framework layer may further include a general collection module for collecting environmental data.
[0138] Optionally, the application framework layer may further include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc. The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0139] The content provider is used to store and obtain data and make these data accessible to application programs. These data may include videos, images, audio, incoming and outgoing calls, browsing history and bookmarks, phone books, etc.
[0140] The view system may include visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to construct the display interface of an application program. The display interface can be composed of one or more views. For example, it includes a view for displaying a short message notification icon, a view for displaying text, and a view for displaying pictures.
[0141] The phone manager is used to provide the communication function of the electronic device 400, such as the management of call status (including answering, hanging up, etc.).
[0142] The resource manager provides various resources for application programs, such as localized strings, icons, pictures, layout files, video files, etc.
[0143] The notification manager enables an application to display notification information in the status bar. It can be used to convey message notifications, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that a download is completed, a message reminder, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as the notification of a background-running application. The notification manager can also be a notification that appears on the screen in the form of a dialogue window, such as prompting text information in the status bar, emitting a prompt tone, vibrating the electronic device, and flashing the indicator light, etc.
[0144] The Android Runtime includes core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core libraries of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as the management of object life cycles, stack management, thread management, security and exception management, and garbage collection.
[0145] The system libraries can include multiple functional modules, such as: surface manager, Media Libraries, 3D graphics processing libraries (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0146] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
[0147] The media libraries support the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0148] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.
[0149] The 2D graphics engine is a drawing engine for 2D drawing.
[0150] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.
[0151] In addition, the electronic device 400 provided in the embodiment of the present application may further include, but is not limited to, a wireless fidelity (WiFi) chip, etc. The WiFi chip can be used to display the WiFi scanning function.
[0152] The software structure involved in the embodiments of the present application was briefly introduced above. Next, the process of collecting crowdsourced data for the collection scenarios involved in the embodiments of the present application will be introduced. Exemplarily, during the implementation process, the electronic device 400 will collect environmental data of the surrounding environment when implementing a service, and report the collected environmental data and service data related to the service to the cloud service platform 500. The cloud service platform 500 collects the crowdsourced environmental data and service data related to the service, and performs cloud computing based on the collected data to determine the scenario features corresponding to different services. In this way, the electronic device 400 can pull some scenario features from the cloud service platform 500 according to actual needs to perform scenario recognition for a certain service.
[0153] As an example of the present application, please refer to Figure 9 , Figure 9 which is a flowchart of an electronic device collecting crowdsourced data for scenarios shown in an exemplary embodiment of the present application. The process of the electronic device collecting crowdsourced data for scenarios may include: S601 to S604.
[0154] S601: A first application in the electronic device executes a first service.
[0155] The first service is any one of multiple services supported by the electronic device for scenario recognition, and the first application is an application that can implement the first service. For example, the first service may be a QR code service, a payment code service, a ride code service, etc., and the first application may be a WeChat application, an Alipay application, etc.
[0156] S602: The sensing module obtains the service data of the first service.
[0157] Exemplarily, the service data may include service type information. For example, if the service type information is "pay", it indicates that the current first service is a payment service.
[0158] Optionally, in a possible implementation, the service data may further include, but is not limited to, one or more of the service package name of the first service, service additional description information, and scenario recognition accuracy.
[0159] Among them, the service package name is used to identify which application implements the current first service. For example, for the payment service, it may be implemented by a WeChat application, an Alipay application, or a UnionPay application.
[0160] The service additional description information can be used to identify some additional service information. Exemplarily, the service additional description information can be the store name associated with the first service. For example, in the case where the first service is a payment service, the service additional description information is used to identify the store name paid by the first service. In one example, the service additional description information can be a JSON-formatted string, such as {"payType":"qrcode","payee":"milk tea shop"}.
[0161] As an example of this application, the scene recognition accuracy of services includes three levels: low, medium, and high. The scene recognition accuracy of different services is usually determined by the services themselves. For example, different scene recognition accuracies can be set for different services in advance according to different user requirements. Exemplarily, the scene recognition accuracy of the regular payment service can be low accuracy, the scene recognition accuracy of the QR code service can be medium accuracy, and the scene recognition accuracy of the ticket collection service can be high accuracy. This is only for exemplary illustration and is not limited thereto.
[0162] In one example, the sensing module can include service collection plugins for multiple services. Each service collection plugin can be used to sense a service and collect the service data generated by the service. For example, the sensing module includes, but is not limited to, the service collection plugin for the QR code service, the service collection plugin for the bus code service, the service collection plugin for the regular payment service, the service collection plugin for the ticket collection service, the service collection plugin for the ticket purchase service, etc. When a certain application or system in the electronic device implements a service, the corresponding service collection plugin can sense and obtain the service data of the service. In addition, the service collection plugin notifies the general collection module to collect environmental data.
[0163] For example, when the WeChat application in the electronic device presents a QR code, the service collection plugin corresponding to the QR code service can sense this operation. At this time, the service collection plugin corresponding to the QR code obtains the relevant service data and notifies the general collection module to collect environmental data.
[0164] S603: The sensing module collects the current environmental data of the electronic device.
[0165] The sensing module collects environmental data through the general collection module. In one example, the environmental data can include base station indication information, longitude and latitude information, and city code.
[0166] Among them, the base station indication information is used to uniquely identify a base station. The base station indication information can include the operator identifier (operator), the location area code (lac), and the cell identifier (cellid).
[0167] The longitude and latitude information may include longitude and latitude, and the longitude and latitude information can be determined by means of global positioning system (GPS) positioning or network positioning. Among them, network positioning can determine the longitude and latitude information based on the base station positioning method, or can determine the longitude and latitude information based on the base station and Wireless Fidelity (WiFi).
[0168] The city code is used to uniquely identify a city. For example, the city code is 0755, and at this time the city code is used to identify Shenzhen. Another example is that the city code is 029, and at this time the city code is used to identify Xi'an. The city code can be obtained by calling the geo interface based on location based service (LBS).
[0169] In one example, the environmental data may further include at least one of positioning accuracy, data collection time, connected base station strength, positioning type, coordinate system type, device type, and base station type.
[0170] In one example, when the scenario recognition of the service involves multiple different regions (for example, involves different countries), the environmental data may further include the region name, and the region name is used to distinguish different regions.
[0171] In one example, the environmental data may further include the number of satellites in view, and the number of satellites in view is used to analyze whether the electronic device is currently indoors or outdoors.
[0172] In one example, for services with medium-precision requirements for scenario recognition, the environmental data may further include information about adjacent base stations. The adjacent base stations are the base stations adjacent to the currently connected base station, and the information about the adjacent base stations may include the base station numbers, base station strengths, etc. of the adjacent base stations.
[0173] As an example of the present application, for services with high-precision requirements for scenario recognition, the environmental data may further include WiFi data, and the WiFi data includes at least one WiFi identification information and the WiFi strength corresponding to each WiFi identification information. Among them, the WiFi identification information can be used to uniquely identify a WiFi hotspot. In one example, the WiFi identification information may include WiFi physical address information and WiFi name.
[0174] S604: The sensing module reports the collected data set to the cloud service platform, and the collected data set includes environmental data and service data.
[0175] Exemplarily, after the perception module obtains the service data and environmental data, it can generate scenario crowdsourcing data based on the service data and environmental data. The scenario crowdsourcing data includes multiple scenario collection data sets, and each scenario collection data set may include longitude and latitude information, base station information, WiFi data, service type information, etc. The perception module sends the generated scenario crowdsourcing data to the cloud service platform for cloud computing by the cloud service platform.
[0176] As an example of the present application, for each element in each scenario collection data set, different field types can be set according to requirements. Exemplarily, the elements included in each scenario collection data set and the field types of the elements are shown in Table 1.
[0177] Table 1
[0178]
[0179] It should be noted that the above is described by taking the electronic device collecting data in the default manner as an example. In another example, the cloud service platform can also send different collection configuration information to the electronic device according to the scenario recognition accuracy required by different services, so as to instruct the electronic device how to collect data for different services. In one example, please refer to Table 2. The collection configuration information may include service type, collection level, maximum number of collections per day, etc.
[0180] Table 2
[0181]
[0182]
[0183] Among them, the collection level is also the scenario recognition level of the service, that is, the scenario recognition accuracy of the service. After the cloud service platform configures the collection level for the electronic device, the electronic device can know whether it needs to collect WiFi data. For example, in the case of a low collection level (for example, 0), WiFi data does not need to be collected, while in the case of a high collection level (for example, 2), WiFi data needs to be collected.
[0184] The maximum number of collections per day indicates the maximum number of times the electronic device can perform data collection for the configured service per day. This can control the power consumption of the electronic device during data collection, thereby saving the collection power consumption of the electronic device.
[0185] Further, please refer to Table 2, the collection configuration information may also include service description information. The service description information is used to explain the service so that the user can view it intuitively. For example, the service description information may be location-based ride-hailing, regular payment, QR code, etc. It is worth noting that when an electronic device runs a third-party application (an application that requires positioning operations), it will also generate base station indication information, longitude and latitude information, positioning accuracy, WiFi scan results (such as WiFi lists), etc. Obtaining the base station indication information, longitude and latitude information, positioning accuracy, WiFi scan results (such as WiFi lists), etc. generated by these applications is called location-based ride-hailing.
[0186] For similar electronic devices, while implementing the business, the scene crowdsourcing data related to the business can be determined according to the above process, and the scene crowdsourcing data can be reported to the cloud service platform. In this way, the cloud service platform can obtain a large amount of scene crowdsourcing data through the crowdsourcing collection mode. On this basis, the cloud service platform can use these scene crowdsourcing data to learn the scene characteristics corresponding to different businesses.
[0187] The following describes how to use the collected scene collection data sets to learn the scene features corresponding to different services. As an example of this application, please refer to Figure 10 , Figure 10 This is a flow chart of a method for learning scene features shown in an exemplary embodiment of the present application. The method is usually executed by a cloud service platform. In a possible implementation, the method can also be executed by an electronic device. The method may include S701 to S704:
[0188] S701: Construct a raster map based on the spatial data of the earth's surface.
[0189] In one example, the spatial data on the earth's surface may include longitude and latitude information, and a grid map may be constructed by Morton coding based on the longitude and latitude information in the spatial data on the earth's surface. It can be generally understood that the earth's surface is divided into a grid map. The grid map may include multiple levels of grids, and each level of grid corresponds to a Morton code. For example, the grid map may include a kilometer-level group granularity grid and a hundred-meter-level fine-grained grid. Exemplarily, the longitude and latitude information of a location point in the physical space is Morton-coded, so that the location point is mapped to the grid of the grid map.
[0190] For easier understanding, please refer to Figure 11 , Figure 11 is a schematic diagram of a grid map shown in an exemplary embodiment of the present application. Here, it is assumed that the data in the base station and the data within the WiFi coverage area are mapped into the grid map, as shown in FIG. Figure 11As shown in (a) therein, the data within the dashed line is the data within the coverage range of the base station, and the data within the solid line is the data within the coverage range of WiFi. For Figure 11 After magnifying the local area of (a) therein, it is as shown in Figure 11 (b) therein. It can be seen that some grids only include base station data. At this time, it can be understood that the position points included by the electronic device in these grids are only connected to the base station covering this grid; some grids include both base station data and WiFi data. At this time, it can be understood that the position points included by the electronic device in these grids are not only connected to the base station covering this grid, but also connected to the WiFi covering this grid.
[0191] S702: Map the scene crowdsourcing data to the grid map.
[0192] The scene crowdsourcing data may include multiple scene acquisition data sets. Each scene acquisition data set can be obtained through the above Figure 9 corresponding embodiments. According to the previous records, each scene acquisition data set may include service data and environmental data collected by the electronic device when implementing the corresponding service. Each scene acquisition data set corresponds to a service type, and each scene acquisition data set includes longitude and latitude information.
[0193] As an example of the present application, the cloud service platform can perform Morton encoding on the longitude and latitude information in each scene acquisition data set to obtain the Morton code corresponding to the longitude and latitude information in each scene acquisition data set. Then, each scene acquisition data set can be mapped to the grid map based on the Morton code.
[0194] As an example of the present application, the cloud service platform may also include POI data and AOI data, and both the POI data and the AOI data include longitude and latitude information. The cloud service platform can map the POI data to the grid map according to the longitude and latitude information in the POI data, and similarly, map the AOI data to the grid map according to the longitude and latitude information in the AOI data.
[0195] For example, a certain POI data carries "_point": "POINT(114.064829 22.572986)". A certain AOI data carries POLYGON data: "_polygon": "MULTIPOLYGON(((114.064063
[0196] 22.573102,114.063954 22.572744,114.063946 22.572678,114.063946 22.572652,114.063954 22.572625,114.063964 22.572609,114.064751 22.572433,114.064795
[0197] 22.572432,114.064893……114.064063 22.573102)))”。
[0198] Map the AOI data and POI data to the raster map respectively. For the convenience of understanding, please refer to Figure 12 , Figure 12 is a schematic diagram of another raster map shown in an exemplary embodiment of the present application. As Figure 12 shown, the grid set formed by the grids passed by each side of the irregular area and the grids covered within the irregular area is the representation of the AOI data mapped in the raster map, which can be understood as the AOI data corresponding to a grid set in the raster map. Figure 11 The independent circles in
[0199] are the representations of multiple POI data mapped in the raster map respectively, which can be understood as a POI data corresponding to a grid in the raster map.
[0200] As an example of the present application, when the scenario acquisition data set includes the coordinate system type, if the scenario acquisition data set collected by crowdsourcing involves different coordinate system types (such as GCJ02 Mars coordinate system, BD09 Baidu coordinate system, and WGS84 Earth coordinate system), then before mapping the scenario acquisition data set, the cloud service platform can first unify the scenario acquisition data sets under different types of coordinate systems to the same type of coordinate system, for example, all unified to the WGS84 Earth coordinate system, and then map the scenario acquisition data set with the unified coordinate system type to the raster map, so that the mapping result can be more accurate.
[0201] As an example of the present application, when the scene acquisition data set includes the scene recognition level, the scene acquisition data set collected through crowdsourcing can also be filtered based on the scene recognition level. Specifically, since the scene recognition accuracy of a certain service may change, for example, the scene recognition accuracy of a certain service is improved from low accuracy to high accuracy. In this case, if the scene feature learning is still based on the scene acquisition data set of the low level, it is easy to cause inaccurate subsequent scene recognition. Therefore, the cloud service platform can filter out the scene acquisition data set with the same scene recognition level as the current service from the scene acquisition data set collected through crowdsourcing, and then map the filtered scene acquisition data set to the grid map in the above manner. This implementation method can ensure the effectiveness and accuracy of subsequent scene recognition for the learned scene features.
[0202] As an example of the present application, when the scene acquisition data set also includes the positioning type and the accuracy of the longitude and latitude information, some scene acquisition data sets can also be filtered according to the positioning type and the accuracy of the longitude and latitude information. For example, the scene acquisition data sets with accuracy lower than the accuracy threshold are filtered out, so as to filter out some scene acquisition data sets with lower confidence, and ensure the effectiveness and accuracy of subsequent scene feature learning. The accuracy threshold can be set according to actual needs and is not limited herein.
[0203] As an example of the present application, when the scene acquisition data set also includes the region name, the scene acquisition data set collected through crowdsourcing can be grouped according to the region name, and each group of scene acquisition data sets corresponds to a region name. Then, the scene feature learning is carried out separately for each group, that is, learning is carried out by region, thereby improving the efficiency of subsequent scene feature learning.
[0204] S703: Determine the scene fence snapshots corresponding to each service.
[0205] Exemplarily, in the scene fence snapshot of any service, it may include the scene features of this service in its corresponding scene. For example, it may include service type information, longitude and latitude information of the center point of the scene fence (i.e., the center point of the scene fence), the radius of the scene fence (i.e., the radius of the scene fence), etc.
[0206] As an example of the present application, the specific implementation manner of the above S703 may include S7031 to S7035:
[0207] S7031: Determine the points with the same attribute in the grid map.
[0208] Points belonging to the same attribute are the points corresponding to the scene collection data sets belonging to the same attribute. The same attribute means that the service type information is the same and the city code is the same. It can be understood that points with the same attribute are the points corresponding to the scene collection data sets with the same service type information and including the same city code.
[0209] Exemplarily, taking the service type information as an index, the points corresponding to the scene collection data sets with the same service type information and including the same city code are determined in the grid map.
[0210] As an example of the present application, since the same service may involve different cities, the cloud service platform can first bucket the data corresponding to the same service type information with the city code as the dimension, so as to divide the data of the same service under the same city into the same bucket. According to the foregoing records, each scene collection data set includes a service type information (i.e., tag) and a city code. Therefore, the cloud service platform can take the service type information as an index and query in the grid map for the points corresponding to the scene collection data sets with the same service type information and the same city code, so as to bucket the data of these points to obtain at least one bucket, and each bucket corresponds to a service type information and a city code. Then, feature learning can be performed based on the data in each bucket to determine the scene fence snapshot of each service in a city.
[0211] For the convenience of understanding and description, next, taking the feature learning based on the data in the bucket corresponding to any service type information as an example for illustration.
[0212] S7032: Cluster the points with the same attribute to obtain a first clustering result, and the first clustering result includes at least one cluster.
[0213] Each point with the same attribute has longitude and latitude information. The points with the same attribute are clustered through a clustering algorithm to obtain at least one cluster. It can also be understood that the longitude and latitude information corresponding to a service type information is clustered through a clustering algorithm to obtain at least one cluster.
[0214] Exemplarily, please refer to Figure 13 , Figure 13 which is a schematic diagram of data distribution shown in an exemplary embodiment of the present application. Specifically, Figure 13 is a schematic diagram of the distribution of the data in the bucket corresponding to this service type information shown in an exemplary embodiment in the grid map. The cloud service platform can cluster the longitude and latitude information of the points in the bucket through a clustering algorithm to obtain at least one cluster. For example, as Figure 13 shown, three clusters are obtained. Among them, the clustering algorithm can be a spatial clustering algorithm (DBSCAN).
[0215] It should be noted that the data outside the cluster can be regarded as noise points, and these data do not need to be calculated. That is, the DBSCAN clustering algorithm can filter out the dirty data outside the cluster.
[0216] It should be noted that during the process of using the DBSCAN clustering algorithm, the neighborhood radius can be set to the first preset distance, and the first preset distance can be set according to actual requirements. For example, the first preset distance can be set to 50 meters, which means that for any two clusters, when the distance between the two closest points is greater than 50 meters, the DBSCAN clustering algorithm will determine that these two points are not relevant.
[0217] The center point and radius of the scenario fence of a business type information can determine the scenario fence corresponding to the business type information, that is, determine the scenario fence corresponding to a business. It can be understood that one cluster corresponds to one scenario fence. Next, how to determine the center point of the scenario fence and the longitude and latitude information of the center point of the scenario fence will be described.
[0218] S7033: Determine the longitude and latitude information of the center point of the scenario fence according to the first clustering result.
[0219] Exemplarily, the center point of the scenario fence of each cluster can be determined first. For example, for any one of the multiple clusters, the cloud service platform can determine the average value of all the longitude and latitude information included in the cluster, and thus calculate the longitude and latitude information of the center point (i.e., the center point of the scenario fence) of the cluster based on the average value of all the longitude and latitude information. In this way, the longitude and latitude information of the center point (i.e., the center point of the scenario fence) of each of the multiple clusters can be determined. That is, the longitude and latitude information of the center point of the scenario fence of each business type information is obtained.
[0220] S7034: Determine the radius of the scenario fence according to the first clustering result.
[0221] As an example of the present application, when the number of at least one cluster is one, the radius of this cluster is determined as the scenario fence radius of the scenario fence of this business type information. That is, when the number of clusters is one, the radius of this cluster is determined as the scenario fence radius of the scenario fence of this business type information.
[0222] As an example of the present application, when the number of at least one cluster is multiple, the radius of each cluster is determined as the scenario fence radius of the scenario fence corresponding to the business type information of each cluster.
[0223] S7035: Generate a scenario fence snapshot based on the longitude and latitude information of the center point of the scenario fence, the radius of the scenario fence, the business type information, and the city code corresponding to the business type information.
[0224] Exemplarily, obtain the city code corresponding to the service type information, and generate a scene fence snapshot of this service type information based on the longitude and latitude information of the center point of the scene fence corresponding to this service type information, the radius of the scene fence, this service type information, and its corresponding city code.
[0225] During implementation, the scene fence can be determined in the grid map according to the longitude and latitude information of the center point of the scene fence and the radius of the scene fence, and then a scene fence snapshot is generated based on the data within the scene fence. As an example of the present application, the scene fence snapshot may include a scene fence identifier, a city code, the longitude and latitude information (longitude information and latitude information) of the center point of the scene fence, the fence radius, the service type information, and the Morton code within the scene fence.
[0226] Optionally, when the service package name and service additional description information are further included in the scene collection data set, bucketing can also be performed according to the city code, service package name, and service additional description information. For example, for the same service, data that occurs in the same city, has the same service package name, and the same service additional description information is divided into the same bucket. Then, clustering is performed based on the data within each bucket.
[0227] In one example, if the scene fence in the grid map further includes POI and / or AOI, the scene fence snapshot may further include the POI and / or AOI.
[0228] Optionally, on the basis that the scene fence snapshot includes a fence identifier, a city code, the longitude and latitude information (longitude information and latitude information) of the center point of the scene fence, the scene fence radius, the service type information, the Morton code within the scene fence, POI and / or AOI, the scene fence snapshot may further include WiFi features.
[0229] Exemplarily, if the bucket also includes WiFi data, the WiFi characteristics in the scenario fence can also be determined based on the WiFi data in the bucket. As can be seen from the previous description, the WiFi data can include multiple WiFi identification information and the WiFi strength corresponding to each WiFi identification information. In one example, the cloud service platform can determine the frequency of occurrence of each WiFi identification information in the bucket to obtain the frequency corresponding to each WiFi identification information. For the WiFi identification information with a frequency lower than the frequency threshold, it may be a WiFi hotspot outside the scenario and can be considered as dirty data. Therefore, the cloud service platform can delete the WiFi identification information with a frequency lower than the frequency threshold and its corresponding WiFi strength. The frequency threshold can be set according to requirements and is not limited in this regard. After that, the cloud service platform learns the WiFi characteristics in the scenario fence based on the remaining WiFi identification information in the bucket and the WiFi strength corresponding to each remaining WiFi identification information.
[0230] In one example, the specific implementation method for the cloud service platform to learn the WiFi characteristics in the scenario fence based on the list of remaining WiFi identification information in the bucket and the WiFi strength corresponding to each remaining WiFi identification information in the list can include: for each WiFi identification information in the list of remaining WiFi identification information, the cloud service platform determines the average strength of the WiFi strength corresponding to each WiFi identification information, determines the strength matching degree between each WiFi strength corresponding to each WiFi identification information and the average strength corresponding to each WiFi identification information, obtains a plurality of strength matching degrees, sorts them in ascending order of the strength matching degree, and obtains the nth strength matching degree from the sorted strength matching degrees as the target matching degree threshold for the list of remaining WiFi identification information. The list of remaining WiFi identification information, the average strength and frequency corresponding to each WiFi identification information in the list of remaining WiFi identification information, and the target matching degree threshold corresponding to the list of remaining WiFi identification information are used as the WiFi characteristics within the scenario fence.
[0231] In one example, when the cloud service platform determines the strength matching degree between each WiFi strength and the average strength corresponding to each WiFi identification information, it can determine the Hellinger Distance between each WiFi strength and the average strength corresponding to each WiFi identification information, and then use the obtained data as the strength matching degree between each WiFi strength and the average strength corresponding to each WiFi identification information.
[0232] Optionally, before learning the WiFi features within the learning scenario fence, the cloud service platform can also filter some of the WiFi data in the bucket according to WiFi similarity. For example, the cloud service platform can determine the similarity of the longitude and latitude information of each pair of WiFi identification information, and then filter out the WiFi identification information with a similarity lower than the similarity threshold. After that, scene feature learning is performed based on the filtered WiFi data, which can improve the effectiveness and accuracy of scene feature learning.
[0233] As an example of the present application, when the electronic device model is included in the collected data set, since the WiFi scanning stability of different models of electronic devices is different, therefore, if the WiFi data scanned by different models of electronic devices is included in the scene fence, in order not to lower the target matching degree threshold of the WiFi data with stronger WiFi scanning stability, the cloud service platform can bucket the WiFi data according to the electronic device model, and then respectively determine the target matching degree threshold corresponding to the WiFi identification information list in each bucket based on the WiFi data in each bucket in the above manner. It is not difficult to understand that at this time, the WiFi features in the scene fence include multiple WiFi identification information lists, and each WiFi identification information list corresponds to a target matching degree threshold.
[0234] Exemplarily, the scene fence snapshot can be as shown in Table 3, where each row represents a scene fence snapshot.
[0235] Table 3
[0236]
[0237] S704: Determine the base station fence snapshots of each base station.
[0238] Exemplarily, the base station snapshot of any base station may include the city code (citycode), operator identifier (operator), location area code (lac), cell ID (cellID), longitude (longitude), latitude (latitude), radius (radius), service list (taglist), etc. of this base station.
[0239] As an example of the present application, the specific implementation manner of the above S704 may include S7041 to S7045:
[0240] S7041: Determine the points belonging to the same base station in the grid map.
[0241] The points belonging to the same base station are the points corresponding to the scene collection data sets belonging to the same base station. The same base station means that the base station indication information is the same, that is, the operator identifier, location area code, and cell ID are the same.
[0242] Exemplarily, taking the base station indication information as an index, the points corresponding to the scene acquisition data sets belonging to the same base station are determined in the grid map.
[0243] As an example of the present application, according to the foregoing description, each scene acquisition data set includes base station indication information. Therefore, the cloud service platform can take the base station indication information as an index, query the points corresponding to the scene acquisition data sets belonging to the same base station in the grid map, and perform feature learning based on these points to determine the base station snapshot corresponding to each base station.
[0244] For the convenience of understanding and description, hereinafter, taking the feature learning of the points corresponding to the scene acquisition data sets belonging to the same base station as an example will be described.
[0245] S7042: Cluster the points of the same base station to obtain a second clustering result, and the second clustering result includes at least one cluster.
[0246] Each point corresponding to the scene acquisition data set of the same base station has longitude and latitude information. By using a clustering algorithm to cluster the points corresponding to the scene acquisition data sets of the same base station, at least one cluster is obtained. That is, by using a clustering algorithm to cluster the longitude and latitude information of the points corresponding to the scene acquisition data sets of the same base station, at least one cluster is obtained. Among them, the clustering algorithm can be a spatial clustering algorithm (DBSCAN).
[0247] It should be noted that the data outside the cluster can be considered as noise points, and these data may not be calculated. That is, the dirty data outside the cluster can be filtered out by the DBSCAN clustering algorithm.
[0248] It should be noted that during the process of using the DBSCAN clustering algorithm, the neighborhood radius can be set to a second preset distance, and the second preset distance can be set according to actual requirements. For example, the second preset distance can be set to 50 meters, which means that for any two clusters, when the distance between the two closest points is greater than 50 meters, the DBSCAN clustering algorithm will determine that these two points are not relevant.
[0249] The center point and radius of the base station fence corresponding to a base station can determine the base station fence corresponding to the base station. Hereinafter, how to determine the center point of the base station fence and the longitude and latitude information of the center point of the base station fence will be described.
[0250] S7043: According to the second clustering result, determine the longitude and latitude information of the center point of the base station fence.
[0251] Exemplarily, the center point of each cluster can be determined first, and the longitude and latitude information of the center point of each cluster can be determined. Calculate the average value of the longitude and latitude information of the center points of multiple clusters, and determine the center point of the base station fence of this base station according to this average value, and at the same time determine the longitude and latitude information of the center point of the base station fence. Exemplarily, for any one of the multiple clusters, the cloud service platform can determine the average value of all the longitude and latitude information included in this cluster, so as to calculate the longitude and latitude information of the center point of this cluster based on the average value of all the longitude and latitude information. In this way, the longitude and latitude information of the center point of each cluster among the multiple clusters can be determined.
[0252] After that, the cloud service platform can calculate the average value of the longitude and latitude information of the center points of multiple clusters according to the longitude and latitude information of the center point of each cluster, and use the average value of the longitude and latitude information of the center points of multiple clusters as the longitude and latitude information of the center point of the base station fence of this base station.
[0253] S7044: Determine the base station fence radius according to the second clustering result.
[0254] As an example of the present application, when the number of at least one cluster is one, the radius of this cluster is determined as the base station fence radius of this base station fence. That is, when the number of clusters is one, the radius of this cluster is determined as the base station fence radius of this base station.
[0255] As an example of the present application, when the number of at least one cluster is multiple, determine the distances between the center point of the base station fence and the center points of each cluster among the multiple clusters, obtain multiple distances, and determine the base station fence radius of the base station fence according to the multiple distances.
[0256] Exemplarily, the cloud service platform can calculate the distances between the center point of the base station fence of this base station and the center points of each cluster based on the longitude and latitude information of the center point of the base station fence of this base station and the longitude and latitude information of the center point of each cluster, so that multiple distances can be obtained in this way. The maximum distance among the multiple distances can be used as the base station fence radius of this base station. In a possible implementation manner, it can also be to calculate the average value of the multiple distances and use the calculated average value as the base station fence radius of this base station.
[0257] S7045: Generate a base station fence snapshot based on the longitude and latitude information of the center point of the base station fence, the base station fence radius, the base station indication information, and the city code corresponding to this base station.
[0258] As can be seen from the above, the base station indication information is used to uniquely identify a base station, and the base station indication information can include an operator identifier, a cell number, and a base station number.
[0259] Exemplarily, the base station fence can be determined in the grid map according to the radius of the base station fence and the longitude and latitude information of the center point of the base station fence, and then a base station fence snapshot can be generated based on the data within the base station fence. As an example of the present application, the base station fence snapshot may include the city code (citycode), operator identifier (operator), location area code (lac), cell ID (cellID), longitude (longitude), latitude (latitude), radius (radius), service list (taglist), etc. of the base station.
[0260] Exemplarily, as shown in Table 4 of the base station snapshot generated by the cloud service platform, each row represents a base station fence snapshot:
[0261] Table 4
[0262]
[0263] In the above Table 4, taglist represents the service list, which is the service type information included within the base station fence in the grid map and the corresponding scene fence identifier of the service type information. That is, it is possible to first determine which service type information is included within the base station fence in the grid map, and then query the corresponding scene fence identifier of these service type information from the scene fence snapshot, so as to establish this taglist and add this taglist to the base station snapshot.
[0264] Optionally, when the base station strength is also included in the scene acquisition data set, the base station strength distribution information within the base station fence can also be determined, and the base station strength distribution information can be carried in the base station snapshot, so that when performing scene recognition subsequently, the position of the electronic device can be determined according to the base station strength distribution information and the base station strength of the base station currently connected by the electronic device, improving the positioning accuracy and thus improving the accuracy of scene recognition.
[0265] As an example of the present application, after scene feature learning, the cloud service platform can display the data distribution in the grid map in the form of a visual graph, and when displaying, the base station type can be marked for each base station, such as being of type 4G or 5G, etc., so that technicians, etc. can intuitively view the distribution of different types of networks in the visual graph.
[0266] As an example of the present application, the cloud service platform can perform scene feature learning and update periodically, and the cycle duration can be set according to actual needs. For example, the cycle duration can be one day, one week, or one month, etc. The embodiments of the present application do not limit this.
[0267] The above describes the process of using the collected scenario collection data set to learn the scenario features corresponding to different services. Next, the process of caching scenario features involved in the embodiments of the present application will be described.
[0268] Based on the storage of scenario features in the cloud service platform, the electronic device can download the scenario features from the cloud service platform. Since the data volume of the full set of scenario features is large, in order to improve the timeliness when downloading scenario features, reduce traffic, lower the operating power consumption of the electronic device, and reduce the occupied storage space, the electronic device can obtain some of the scenario features according to business requirements.
[0269] As an example of the present application, for each service that supports scenario recognition, the cloud service platform can configure the feature update configuration information for each service, and then send the feature update configuration information for each service to the electronic device, so that the electronic device determines the scenario feature update method for each service according to the feature update configuration information for each service, that is, so that the electronic device obtains some of the scenario features from the cloud service platform according to business requirements, thereby reducing the downloaded data volume.
[0270] In an example, the electronic device sends a feature acquisition request to the cloud service platform, and the feature acquisition request may include a city code. Correspondingly, the cloud service platform obtains a set of base station fence snapshots including the city code from the full set of scenario features. The set of base station fence snapshots includes scenario fence identifiers corresponding to each service type information. Then, according to the scenario fence identifiers corresponding to each service type information in the obtained sets of base station fence snapshots, the scenario fence snapshots corresponding to each scenario fence identifier are obtained to obtain a set of scenario fence snapshots. The cloud service platform sends the obtained data (i.e., the set of base station fence snapshots and the set of scenario fence snapshots) to the electronic device. For the electronic device, after receiving the data sent by the cloud service platform, it stores it in a database, for example, stores it in a local database.
[0271] In an example, the feature acquisition request may include a city code and the service type information of the target service. Correspondingly, the cloud service platform obtains a set of base station fence snapshots including the city code and the service type information from the full set of scenario features. The set of base station fence snapshots includes scenario fence identifiers corresponding to each service type information. Then, according to the scenario fence identifiers corresponding to each service type information in the obtained sets of base station fence snapshots, the scenario fence snapshots corresponding to each scenario fence identifier are obtained to obtain a set of scenario fence snapshots. The cloud service platform sends the obtained data (i.e., the set of base station fence snapshots and the set of scenario fence snapshots) to the electronic device. After receiving the data sent by the cloud service platform, the electronic device stores it in a database.
[0272] In one example, based on the business type information including the city code and the target business, the feature acquisition request may further carry the base station indication information of the base stations connected by the electronic device. In this way, after the cloud service platform obtains the base station fence snapshot set including the city code and the business type information from the full set of scenario features, it filters out the base station fence snapshot set including the base station indication information from the obtained base station fence snapshot set. The filtered base station fence snapshot set including the base station indication information includes the scenario fence identifiers corresponding to each business type information. According to the scenario fence identifiers corresponding to each business type information in each filtered base station fence snapshot set, the scenario fence snapshots corresponding to each scenario fence identifier are obtained, and a scenario fence snapshot set is obtained. The cloud service platform sends the filtered base station fence snapshot set and the scenario fence snapshot set to the electronic device. After receiving the base station fence snapshot set and the scenario fence snapshot set sent by the cloud service platform, the electronic device stores them in the database.
[0273] For ease of understanding, please refer to Figure 14 , Figure 14 which is a schematic diagram showing caching scenario features in an exemplary embodiment of the present application. If the current location of the electronic device reaches a new city, that is, the scenario features of the new city are not stored in the electronic device, the scenario features of the nearby area of the current location can be obtained from the cloud service platform in real time according to the current location of the electronic device.
[0274] Such as Figure 14 the (a) area shown. In the grid map, with the current location of the electronic device as the center, a number of (such as 2048*2048) grids are expanded to the surrounding as the range to be downloaded. In one implementation, the data covered in these grids (that is, the base station fence snapshot set and the scenario fence snapshot set) are all downloaded to the electronic device. In another implementation, such as Figure 14 the (b) area shown, according to the service requirements (such as the base station indication information of the base stations connected by the electronic device), the dark gray grids are filtered out in the range to be downloaded, and the data covered in these dark gray grids (that is, the base station fence snapshot set and the scenario fence snapshot set) are used as the data in the actually downloaded range and downloaded to the electronic device.
[0275] In one example, when the electronic device reaches a new location, if the distance from the new location to the original location exceeds a preset distance, in order to ensure the recall rate of the services on the electronic device side, the electronic device may send the current longitude and latitude information and the longitude and latitude information of the previous positioning to the cloud service platform. Herein, the preset distance can be set according to actual requirements. For example, the preset distance can be 1000 meters. Correspondingly, the cloud service platform removes the intersection data of the scene features based on the previous longitude and latitude information and the current longitude and latitude information, and sends the scene features within the range to the electronic device side. For the electronic device side, the intersection part of the data is retained, and the new scene features sent by the electronic device side are written into the database. In this way, the download traffic can be saved, that is, the online real-time download power consumption can be saved, and the electronic device side can also reduce the erasure and writing of the database.
[0276] As Figure 14 shown in the (c) area, the electronic device side moves from the original location to the current location (here the current location refers to the new location). Centered on the current location of the electronic device in the grid map, a number of (such as 2048*2048) grids are expanded to the surrounding as the new range to be downloaded. As Figure 14 shown in the (d) area, according to the service requirements (such as the base station indication information of the base stations connected by the electronic device), the gray grids are screened out in the new range to be downloaded, and the data covered in these gray grids (that is, the base station fence snapshot set and the scene fence snapshot set) are used as the data in the range that should be downloaded. As Figure 14 shown in the (e) area, there is an intersection part (hit cache part) between the download range corresponding to the original location and the download range corresponding to the current location. After removing the intersection data, the data covered in the remaining gray grids (that is, the base station fence snapshot set and the scene fence snapshot set) are used as the data in the actual download range and downloaded to the electronic device.
[0277] The process of caching scene features involved in the embodiments of the present application is described above. Next, the service scenario recognition method involved in the embodiments of the present application will be described. Please refer to Figure 15 , Figure 15 which is a flowchart of a service scenario recognition method shown in an exemplary embodiment of the present application. The method may include:
[0278] S801: When a scene recognition request for a target service is monitored, obtain the base station information of the base station currently accessed by the electronic device.
[0279] S802: Perform scene recognition based on the scene feature data and the base station information to determine whether the electronic device is located in the target scene.
[0280] The base station information includes a target operator identifier, a target cell number, and a target base station number. The scenario recognition request is used to request recognition of whether the electronic device is located within a target scenario associated with the target service. The scenario feature data includes at least one base station fence snapshot, and the base station fence snapshot includes an operator identifier, a cell number, and a base station number with an associated relationship.
[0281] Exemplarily, when a scenario recognition request for a target service is monitored, the base station information of the base station to which the electronic device is currently connected is obtained, and based on the base station information of the base station to which the electronic device is currently connected and one or more base station fence snapshots in the scenario feature data, it is determined whether the electronic device is located within the target scenario. For example, when the target operator identifier, the target cell number, and the target base station number in the base station information are the same as the operator identifier, the cell number, and the base station number in a certain base station fence snapshot, it is determined that the electronic device is located within the target scenario.
[0282] In this service scenario recognition method, when a scenario recognition request for a target service is monitored, the base station information of the base station to which the electronic device is currently connected is obtained, and scenario recognition is performed based on the scenario feature data and the base station information to determine whether the electronic device is located within the target scenario. Among them, the scenario feature data includes at least one base station fence snapshot, the base station fence snapshot includes an operator identifier, a cell number, and a base station number with an associated relationship, and the base station information includes a target operator identifier, a target cell number, and a target base station number. Obviously, performing scenario recognition based on the scenario feature data and the base station information is to compare the operator identifier, the cell number, the base station number in the base station fence snapshot with the target operator identifier, the target cell number, and the target base station number in the base station information. That is to say, this method determines whether the electronic device is located within the target scenario by comparing the base station information with the base station fence snapshot. During the process of performing service scenario recognition, the base station information is used, and there is no need to request the cloud service platform to obtain the location. Moreover, compared with GPS positioning in related technologies, the power consumption of base station positioning is less than that of GPS positioning. In this method, there is also no need to compare with the data in the cloud service platform, thereby reducing the power consumption of the electronic device and improving the real-time performance.
[0283] As an example of this application, the scenario recognition accuracy of a service can include three levels: low, medium, and high. The scenario recognition accuracy of different services is usually determined by the service itself. For example, different scenario recognition accuracies can be set for different services in advance according to different user requirements. Exemplarily, the scenario recognition accuracy of the regular payment service can be low accuracy, the scenario recognition accuracy of the QR code service can be medium accuracy, and the scenario recognition accuracy of the ticket collection service can be high accuracy. This is only for exemplary illustration and is not limited thereto.
[0284] In one example, the scenario recognition accuracy of the service is low. When a scenario recognition request for the target service is monitored, the base station information of the base station to which the electronic device is currently connected is obtained. Based on the base station information of the base station to which the electronic device is currently connected and the set of base station fence snapshots, it is determined whether the electronic device is located within the target scenario associated with the target service. Among them, the base station information of the base station to which the electronic device is currently connected may include the target operator identifier, the target cell number, and the target base station number, and the target service is a service with low scenario recognition accuracy. And from the above description, it can be seen that the set of base station fence snapshots is stored in the electronic device, and the set of base station fence snapshots includes multiple base station fence snapshots.
[0285] The electronic device continuously performs Cell-ID positioning. When the electronic device is an Android phone, the switching of the base station can be sensed / monitored through the telephonyManager built in the Android phone. Exemplarily, the base station information of the base station to which the electronic device is currently connected can be obtained through Cell-ID positioning. Check whether there is a base station fence snapshot matching the base station information in the set of base station fence snapshots. If a base station fence snapshot matching the base station information is found in the set of base station fence snapshots, it is determined that the electronic device is currently located within the target scenario associated with the target service. If a base station fence snapshot matching the base station information is not found in the set of base station fence snapshots, it is determined that the electronic device is not currently located within the target scenario associated with the target service.
[0286] For example, the scenario recognition accuracy of the regular payment service is low, that is to say, the target service in this embodiment is the regular payment service. The target operator identifier, the target cell number, and the target base station number of the electronic device are obtained through Cell-ID positioning. If the operator, lac, and cellID in a certain base station fence snapshot in the set of base station fence snapshots are the same as the target operator identifier, the target cell number, and the target base station number of the electronic device currently, it is determined that the electronic device is currently located within the target scenario associated with the regular payment service. At this time, a payment code quick card is displayed on the display interface of the electronic device, so that the user can use the payment code quick card to achieve quick payment.
[0287] For another example, if the operator, lac, and cellID in a certain base station fence snapshot in the set of base station fence snapshots are not found to be the same as the target operator identifier, the target cell number, and the target base station number of the electronic device currently, it is determined that the electronic device is not currently located within the target scenario associated with the regular payment service. At this time, the payment code quick card will not be displayed on the display interface of the electronic device. The electronic device will continue to perform Cell-ID positioning and repeat the above process to determine whether the electronic device is located within the target scenario associated with the regular payment service.
[0288] In this implementation, for services with low-precision scene recognition accuracy, as long as the base station information of the electronic device matches a certain base station fence snapshot in the base station fence snapshot set, or in other words, as long as the base station information of the electronic device has an intersection with the base station fence snapshot set within the low-precision features, it can be recognized that the electronic device has entered the service scenario with low-precision scene recognition accuracy. This has low latency, that is, high real-time performance. Based on this, quick cards can be immediately recommended to the user, improving the intelligence of the electronic device, meeting the user's usage needs, and enhancing the user experience. Among them, if the service type information included in the base station fence snapshot represents a service with low-precision scene recognition accuracy, then this base station fence snapshot can be said to conform to the low-precision features.
[0289] In the process of low-precision service scene recognition, on the one hand, the power consumption of the electronic device using Cell-ID positioning is less than that of using GPS positioning. Therefore, by matching the base station information of the electronic device with the base station fence snapshot set, it is recognized whether the electronic device has entered the service scenario with low-precision scene recognition accuracy, saving power. On the other hand, in the process of service scene recognition, there is no need to request the cloud service platform, which also saves power.
[0290] In one example, when the scene recognition accuracy of the service is low-precision, in addition to determining whether the electronic device is located in the target scene associated with the target service based on the base station information of the base station currently accessed by the electronic device and the base station fence snapshot set, it can also be determined whether the electronic device is located in the target scene associated with the target service based on the current location information of the electronic device and the target area. Among them, the current location information of the electronic device is used to represent the current location of the electronic device, and the current location information of the electronic device may include longitude information and latitude information. The target area is the area corresponding to the destination for realizing the target service, and the target area is determined by the center point of the destination and the radius corresponding to the destination. It can be understood that the destination usually appears as an area in the real environment, so it has a corresponding center point and radius.
[0291] Exemplarily, the target area is obtained. For example, the electronic device stores a set of scene fence snapshots, and the set of scene fence snapshots includes multiple scene fence snapshots. The scene recognition request of the monitored target service may carry service type information, and one or more scene fence snapshots matching the service type information can be determined in the set of scene fence snapshots. Each scene fence snapshot includes longitude information, latitude information, and the scene fence radius, and the target area corresponding to each scene fence snapshot is determined based on the longitude information, latitude information, and the scene fence radius.
[0292] Optionally, in a possible implementation, each scene fence snapshot may further include a POI, and the POI data may also be carried in the scene recognition request. If multiple scene fence snapshots matching the service type information are determined in the scene fence snapshot set, then based on the POI data and the POI included in the scene fence snapshot, a scene fence snapshot is determined again from the initially determined multiple scene fence snapshots. Then, based on the longitude information, latitude information, and scene fence radius included in the finally determined scene fence snapshot, the target area corresponding to the scene fence snapshot is determined.
[0293] Exemplarily, the current location information of the electronic device can be obtained through the GPS method, or the current location information of the electronic device can be obtained by means of location hitchhiking. Based on the current location information of the electronic device and the target area, it is determined whether the current location of the electronic device is within the target area. Generally understood, a point is determined through the longitude information and latitude information of the electronic device, and it is determined whether the point is within the target area. If the current location of the electronic device is within the target area, it is determined that the electronic device is currently located in the target scene associated with the target service. If the current location of the electronic device is not within the target area, it is determined that the electronic device is not currently located in the target scene associated with the target service.
[0294] In this implementation, before the base station information of the electronic device is matched with any of the base station fence snapshots in the base station fence snapshot set, it can be determined whether the current location of the electronic device is within the target area through the current location information of the electronic device and the target area, so as to identify whether the electronic device enters the service scene with low-precision scene recognition accuracy, providing support for the cold start of low-precision service scene recognition.
[0295] In one example, the scene recognition accuracy of the service is medium-precision. When a scene recognition request for the target service is monitored, the base station information of the base station currently accessed by the electronic device is obtained. Based on the base station information of the base station currently accessed by the electronic device, the currently obtained location information of the electronic device, the base station fence snapshot set, and the scene fence snapshot set, it is determined whether the electronic device is located in the target scene associated with the target service. It should be noted that the target service here refers to the service with medium-precision scene recognition accuracy. The base station fence snapshot set and the scene fence snapshot set are stored in the electronic device. The base station fence snapshot set includes multiple base station fence snapshots, and the scene fence snapshot set includes multiple scene fence snapshots.
[0296] Exemplarily, the base station information of the electronic device is obtained through Cell-ID positioning. Whether there is a base station fence snapshot matching the base station information is searched in the set of base station fence snapshots. If a base station fence snapshot matching the base station information is found in the set of base station fence snapshots, the service list included in the base station fence snapshot is obtained. The service list includes service type information and the corresponding scene fence identifier for the service type information. One or more scene fence snapshots can be found in the set of scene fence snapshots according to the scene fence identifier. According to the longitude information and latitude information included in the scene fence snapshot, a center point can be determined, and then the fence area corresponding to the scene fence snapshot can be determined based on the center point and the scene fence radius included in the scene fence snapshot. The current location information of the electronic device is obtained through the GPS method, and it is determined whether the current location of the electronic device is within the fence area corresponding to the scene fence snapshot, so as to determine whether the electronic device is located in the target scene associated with the target service.
[0297] In the case where a scene fence snapshot is found in the set of scene fence snapshots according to the scene fence identifier, the fence area corresponding to the scene fence snapshot is determined based on the longitude information, latitude information, and scene fence radius included in the scene fence snapshot. The location information of the electronic device is obtained, and the location of the electronic device is determined based on the location information. It is determined whether the current location of the electronic device is within the fence area. If the current location of the electronic device is within the fence area, it is determined that the electronic device is located in the target scene associated with the target service. If the current location of the electronic device is not within the fence area, it is determined that the electronic device is not located in the target scene associated with the target service.
[0298] Optionally, in a possible implementation manner, when it is determined that the electronic device is located in the target scene associated with the target service, a quick card related to the target service (a service with medium scene recognition accuracy) is displayed on the display interface of the electronic device, so that the user can use the quick card to implement the target service. When it is determined that the electronic device is not located in the target scene associated with the target service, at this time, the quick card is not displayed on the display interface of the electronic device either. The electronic device will repeatedly execute the judgment process to determine whether the electronic device is located in the target scene associated with the target service.
[0299] In the case where multiple scene fence snapshots are found in the scene fence snapshot set according to the scene fence identifier, if POI data is detected, then according to the POI data, in the multiple scene fence snapshots, the scene fence snapshot that matches the POI data is searched for. For example, in the multiple scene fence snapshots, a scene fence snapshot that contains the same POI as the POI data is searched for. The fence area corresponding to the found scene fence snapshot is determined, and according to the obtained location information of the electronic device, it is judged whether the current location of the electronic device is within the fence area. In this way, the fence area of the scene fence snapshot related to the target service can be quickly determined without comparing the current location of the electronic device with each fence area, thereby improving the speed of business scenario recognition.
[0300] In the case where multiple scene fence snapshots are found in the scene fence snapshot set according to the scene fence identifier, if no POI data is detected, then according to the longitude information, latitude information and scene fence radius included in each scene fence snapshot, the fence area corresponding to each scene fence snapshot is determined. According to the obtained location information of the electronic device, if it is determined that the current location of the electronic device is within any one of the fence areas, it is determined that the electronic device is located in the target scene associated with the target service, and the applicability is wider.
[0301] In this implementation manner, for a service with medium-precision scene recognition accuracy, when the base station information of the electronic device matches a certain base station fence snapshot in the base station fence snapshot set, and the current location of the electronic device is within the fence area corresponding to a certain scene fence snapshot (the scene fence snapshot determined by the scene fence identifier in the base station fence snapshot), it can be recognized that the electronic device enters the business scenario with medium-precision scene recognition accuracy, and the real-time performance is high. Based on this, a quick card can be immediately recommended to the user, improving the intelligence of the electronic device, meeting the user's usage requirements, and improving the user experience. And when the base station information of the electronic device matches a certain base station fence snapshot in the base station fence snapshot set, it is detected whether the current location of the electronic device is within the fence area corresponding to a certain scene fence snapshot (the scene fence snapshot determined by the scene fence identifier in the base station fence snapshot), or rather, as long as the base station information of the electronic device has an intersection with the base station fence snapshot set in the medium-precision feature, the medium-precision business scenario recognition is started, effectively avoiding the power consumption waste of the medium-precision business scenario recognition. Among them, if the business type information included in the base station fence snapshot represents a business with medium-precision scene recognition accuracy, then the base station fence snapshot can be said to conform to the medium-precision feature.
[0302] In the process of medium-precision business scenario recognition, on the one hand, Cell-ID positioning is adopted in the early stage (that is, Cell-ID positioning is adopted before matching with the scene fence snapshot), and it is not necessary to use GPS positioning throughout the process, saving power consumption. On the other hand, it is not necessary to request the cloud service platform during the business scenario recognition process, which also saves power consumption.
[0303] In one example, the scenario recognition accuracy of the business is high precision. When a scenario recognition request for the target business is monitored, the base station information of the base station to which the electronic device is currently connected is obtained. According to the base station information of the base station to which the electronic device is currently connected, the currently obtained location information of the electronic device, the current WiFi list corresponding to the electronic device, the base station fence snapshot set, and the scene fence snapshot set, it is determined whether the electronic device is located in the target scene associated with the target business. Among them, the WiFi list may include at least one WiFi identification information and the WiFi strength corresponding to each WiFi identification information. Among them, the WiFi identification information may include the WiFi physical address information and the WiFi name. It is worth noting that the target business here refers to a business with high-precision scenario recognition. The base station fence snapshot set and the scene fence snapshot set are stored in the electronic device. The base station fence snapshot set includes multiple base station fence snapshots, the scene fence snapshot set includes multiple scene fence snapshots, and the scene fence snapshot includes WiFi features.
[0304] Exemplarily, the base station information of the electronic device is obtained through Cell-ID positioning, and it is searched in the base station fence snapshot set whether there is a base station fence snapshot matching the base station information. If a base station fence snapshot matching the base station information is found in the base station fence snapshot set, the base station fence snapshot is determined through the scene fence identifier in the base station fence snapshot. The fence area corresponding to the scene fence snapshot is determined according to the longitude information, latitude information, and scene fence radius included in the scene fence snapshot. The current location information of the electronic device is obtained by GPS, and it is judged whether the current location of the electronic device is within the fence area corresponding to the scene fence snapshot according to the current location information of the electronic device and the fence area corresponding to the scene fence snapshot. If the current location of the electronic device is within the fence area, the current WiFi list of the electronic device is obtained. It is judged whether the WiFi list matches the WiFi features in the scene fence snapshot. If the WiFi list matches the WiFi features in the scene fence snapshot, it is determined that the electronic device is located in the target scene associated with the target business. If the WiFi list does not match the WiFi features in the scene fence snapshot, it is determined that the electronic device is not located in the target scene associated with the target business.
[0305] Determining whether the WiFi list matches the WiFi features in the snapshot of the scene fence may include: The WiFi identification information in the WiFi list and the WiFi strength corresponding to each WiFi identification information are the same as each WiFi identification information in the WiFi identification information list in the WiFi features and the WiFi strength corresponding to each WiFi identification information, and it is determined that the WiFi list matches the WiFi features in the snapshot of the scene fence.
[0306] Determining whether the WiFi list matches the WiFi features in the snapshot of the scene fence may also include: Determining the matching degree threshold corresponding to the current WiFi list of the electronic device. When the similarity between the WiFi identification information in the WiFi list and the WiFi identification information in the WiFi identification information list in the WiFi features is greater than or equal to the preset similarity threshold, and the matching degree threshold corresponding to the WiFi list is greater than or equal to the target matching degree threshold in the WiFi features, it is determined that the WiFi list matches the WiFi features in the snapshot of the scene fence. Among them, the preset similarity threshold can be set to 50%, 60%, 70%, etc. The process of determining the matching degree threshold corresponding to the current WiFi list can refer to the relevant descriptions in the process of determining the WiFi features mentioned above, and will not be elaborated here.
[0307] Determining whether the WiFi list matches the WiFi features in the snapshot of the scene fence may also include: Determining the strength matching degree corresponding to each WiFi strength in the WiFi list. When the similarity between the WiFi identification information in the WiFi list and the WiFi identification information in the WiFi identification information list in the WiFi features is greater than or equal to the preset similarity threshold, and the strength matching degree corresponding to each WiFi strength in the WiFi list is greater than or equal to the strength matching degree corresponding to each WiFi strength in the WiFi features, it is determined that the WiFi list matches the WiFi features in the snapshot of the scene fence. Among them, the process of determining the strength matching degree corresponding to each WiFi strength in the WiFi list can refer to the relevant descriptions in the process of determining the WiFi features mentioned above, and will not be elaborated here. These three ways of determining whether the WiFi list matches the WiFi features in the snapshot of the scene fence improve the accuracy of the matching result and are beneficial to improving the accuracy of business scenario recognition.
[0308] In this implementation, for services with high-precision scene recognition accuracy, when the base station information of the electronic device matches a certain base station fence snapshot in the base station fence snapshot set, and the current location of the electronic device is within the fence area corresponding to a certain scene fence snapshot (the scene fence snapshot determined by the scene fence identifier in the base station fence snapshot), and the WiFi list matches the WiFi features in the scene fence snapshot, it can be recognized that the electronic device enters the service scene with high-precision scene recognition accuracy, with high real-time performance. Based on this, quick cards can be immediately recommended to the user, improving the intelligence of the electronic device, meeting the user's usage needs, and enhancing the user experience. Moreover, as long as the base station information of the electronic device has an intersection with the base station fence snapshot set in the high-precision features, high-precision service scene recognition is started, effectively avoiding power consumption waste in high-precision service scene recognition. Among them, if the service type information included in the base station fence snapshot represents a service with high-precision scene recognition accuracy, then the base station fence snapshot can be said to conform to the high-precision features.
[0309] In the process of high-precision service scene recognition, on the one hand, Cell-ID positioning is adopted in the early stage (i.e., Cell-ID positioning is adopted before matching with the scene fence snapshot), and GPS positioning and WiFi scanning are adopted in the later stage, saving power while maintaining the recognition accuracy. On the other hand, there is no need to request the cloud service platform during the service scene recognition process, which also saves power.
[0310] Optionally, in a possible implementation, when the scene recognition accuracy of the service is high-precision, if it is first detected that the WiFi list matches the WiFi features in a certain scene fence snapshot, the electronic device can be directly recognized as entering the service scene with high-precision scene recognition accuracy without having to match the base station fence snapshot and the scene fence snapshot anymore. This implementation method improves the real-time performance of service scene recognition and saves the power consumption required for early positioning.
[0311] Optionally, in a possible implementation, when the scene recognition accuracy of the service is high-precision, if it is detected that the WiFi features of the WiFi list do not match the target scene fence snapshot (the scene fence snapshot determined by the scene fence identifier in the matched base station fence snapshot), the WiFi hitchhiking technology can be used to obtain the WiFi scan result. Here, obtaining the WiFi scan result using the WiFi hitchhiking technology means obtaining the WiFi scan result generated by the system or a third-party application, and this WiFi scan result may include the WiFi list. If it is detected that the WiFi list generated by the system or a third-party application matches the WiFi features of the target scene fence snapshot, it is determined that the electronic device is located within the target scene. In this implementation, when there is no intersection between the WiFi list and the WiFi features, the WiFi hitchhiking technology is used to obtain WiFi-related data, and there is no need to perform a separate WiFi scan, effectively saving power consumption.
[0312] The above describes how to identify whether an electronic device enters the target scene associated with the target service. Next, the identification of the electronic device leaving the target scene associated with the target service will be described.
[0313] In an example, when the scene recognition accuracy of the service is low-precision, it can be determined that the electronic device is located within the target scene associated with the target service by matching the base station information of the electronic device with a certain base station fence snapshot in the set of base station fence snapshots. After the electronic device enters this target scene, if the base station information of the electronic device no longer matches this base station fence snapshot, it can be recognized that the electronic device has left this target scene. This implementation has high real-time performance.
[0314] Optionally, in a possible implementation, after the electronic device enters this target scene, if the base station information of the electronic device no longer matches this base station fence snapshot, obtain the location information of the electronic device. For example, obtain the current location information of the electronic device through the GPS method. According to the current location information of the electronic device and the target area, determine whether the electronic device has truly left this target scene currently. If the current location of the electronic device is not within the target area, it is determined that the electronic device has truly left this target scene currently. If the current location of the electronic device is still within the target area, it is determined that the electronic device has not left this target scene currently. This implementation can effectively avoid misidentification and improve the accuracy of service scene recognition, that is, accurately determine whether the electronic device has truly left the target scene associated with the target service, thereby bringing a better experience to the user.
[0315] In one example, when the scene recognition accuracy of a service is medium accuracy, the base station information of an electronic device is matched with a certain base station fence snapshot in the set of base station fence snapshots, and the current location of the electronic device is within the fence area corresponding to a certain scene fence snapshot (the scene fence snapshot determined by the scene fence identifier in the base station fence snapshot), that is, it is determined that the electronic device enters the service scene with medium scene recognition accuracy. After the electronic device enters this service scene, if it is detected that the location of the electronic device is not within this fence area, it is determined that the electronic device has truly left this service scene. This implementation method can effectively avoid misrecognition and improve the accuracy of service scene recognition, that is, accurately determine whether the electronic device has truly left this service scene, thereby bringing a better experience to the user.
[0316] In one example, when the scene recognition accuracy of a service is high accuracy, the base station information of the electronic device is matched with a certain base station fence snapshot in the set of base station fence snapshots, and the current location of the electronic device is within the fence area corresponding to a certain scene fence snapshot (the scene fence snapshot determined by the scene fence identifier in the base station fence snapshot), and the WiFi list matches the WiFi features in this scene fence snapshot, then it is recognized that the electronic device enters the target scene. After the electronic device enters this target scene, if it is detected that the WiFi list does not match the WiFi features in this scene fence snapshot, it can be recognized that the electronic device leaves this target scene. This implementation method has high real-time performance.
[0317] Optionally, in a possible implementation method, after the electronic device enters this target scene, if it is detected that the WiFi list does not match the WiFi features in this scene fence snapshot, obtain the location information of the electronic device. According to the current location information of the electronic device and the fence area, determine whether the electronic device has truly left this target scene currently. If the current location of the electronic device is not within the fence area, it is determined that the electronic device has truly left this target scene currently. If the current location of the electronic device is still within the fence area, it is determined that the electronic device has not left this target scene currently. This implementation method can effectively avoid misrecognition and improve the accuracy of service scene recognition, that is, accurately determine whether the electronic device has truly left the target scene associated with the target service, thereby bringing a better experience to the user.
[0318] The embodiment of the present application also provides a method for predicting the next positioning time according to the current motion state of the user. The method will be described below. As an example of the present application, please refer to Figure 16 , Figure 16 is a flowchart of a method for predicting the time of the next positioning shown in an exemplary embodiment of the present application. The method may include:
[0319] S901: Obtain the current motion state of the user.
[0320] Exemplarily, sensors such as an acceleration sensor and a gyroscope sensor in an electronic device can be used, and combined with a network model capable of realizing attitude learning to analyze the user's current attitude, so as to obtain the user's current motion state. The user's current motion state may include a walking state, a running state, a fast walking state, a vehicle driving state, etc.
[0321] S902: Determine the user's current first motion speed according to the motion state.
[0322] Evaluate the user's current first motion speed according to the user's current motion state. A corresponding relationship between different motion states and different motion speeds can be established in advance, and the user's current motion speed can be determined based on this corresponding relationship. For example, when the motion state is a walking state, the motion speed can be 1 m / s, and when the motion state is a vehicle driving state, the first motion speed can be 10 m / s. The user's current first motion speed can also be determined by at least two positionings. For example, obtain the time interval between two positionings, obtain the distance between the two positions of the two positionings, and determine the user's current first motion speed according to this time interval and this distance. This is only an exemplary illustration and is not limited thereto.
[0323] Optionally, in a possible implementation manner, during the user's progress, the user's current first motion speed can be refreshed according to historical positioning. For example, obtain the time interval between the historical positioning and the most recent positioning, obtain the distance between the two positions of the two positionings, and refresh the user's current first motion speed according to this time interval and this distance. This can ensure that the determined user's current motion speed is more accurate, which is beneficial to accurately determining the positioning time of the next positioning subsequently, reducing the number of positionings, and thus saving power consumption.
[0324] S903: Determine the destination for realizing the target service according to the target service, and determine the first distance between the user's current position and the destination.
[0325] In one example, determining the destination for realizing the target service according to the target service may include: the scene recognition request of the monitored target service may carry service type information and POI data. The service type information is used to represent the service type of the target service, and the POI data represents the destination. According to the service type information and the carried POI data, a scene fence snapshot can be determined in the set of scene fence snapshots. The scene fence snapshot includes longitude information, latitude information, and a scene fence radius. A fence area can be formed by the longitude information, the latitude information, and the scene fence radius, and this fence area represents the target area corresponding to the destination. Then, the longitude information and the latitude information represent the center point of the target area corresponding to the destination, and the scene fence radius represents the radius of the target area corresponding to the destination.
[0326] If the base station information of the current electronic device does not match any base station fence snapshots in the base station fence snapshot set, that is, no base station fence snapshot matching the base station information of the base station to which the electronic device is currently connected is found in the base station fence snapshot set, then the current location of the user is obtained, that is, the current location information of the user is obtained. It can be understood that during the process of the user carrying the electronic device and moving, the location of the electronic device is almost the same as the location of the user. Therefore, obtaining the current location of the electronic device also means obtaining the current location of the user.
[0327] The distance difference between the current location of the user and the destination can be calculated through the longitude and latitude information of the current location of the user and the longitude and latitude information of the center point corresponding to the destination. The result obtained by subtracting the scene fence radius (i.e., the radius of the target area corresponding to the destination) from the distance difference is the first distance between the current location of the user and the destination.
[0328] For ease of understanding, please refer to Figure 17 , Figure 17 which is a schematic diagram of an application scenario for predicting time shown in an exemplary embodiment of the present application. As Figure 17 shown in (a) of [], S4 represents the current location of the user. Here, the base station information of the electronic device does not match any base station fence snapshots in the base station fence snapshot set, and there is a corresponding target area (fence area) at the destination location. Here, the location information of the electronic device can match a certain scene fence snapshot. It can be understood that as long as the user moves to the edge of the target area, it can be recognized that the electronic device enters the target scene. Therefore, when calculating the first distance, the scene fence radius needs to be subtracted.
[0329] Optionally, in a possible implementation manner, if the base station information of the current electronic device matches a certain base station fence snapshot in the base station fence snapshot set, then the longitude and latitude information of the center point of the base station fence and the base station fence radius in the base station fence snapshot are obtained. At this time, the longitude and latitude information of the center point of the base station fence can be used to represent the current location of the user. The distance difference between the two points is calculated through the longitude and latitude information of the center point of the base station fence and the longitude and latitude information of the center point corresponding to the destination. The result obtained by subtracting the scene fence radius (i.e., the radius of the target area corresponding to the destination) from the distance difference is the first distance between the current location of the user and the destination.
[0330] For ease of understanding, please refer to Figure 17In (b) of [description], the circular area on the left represents the base station fence corresponding to the base station fence snapshot that matches the base station information of the electronic device, and S5 represents the current position of the user determined according to the base station fence snapshot. The circular area on the right represents the target area (fence area) corresponding to the destination location, where the position information of the electronic device can match a certain scenario fence snapshot. It can be understood that as long as the user moves to the edge of the target area, it can be recognized that the electronic device enters the target scenario. Similarly, when calculating the first distance, the scenario fence radius needs to be subtracted.
[0331] S904: Predict the time of the next positioning according to the user's current first movement speed and the first distance.
[0332] Calculate the quotient between the first distance and the current first movement speed, and the obtained value is the time of the next positioning. For example, the destination is the company. It is calculated that the first distance between the user's current position and the company is 2000 meters, and the user's current first movement speed is 1 m / s. The user will move to the target area corresponding to the company after 2000 seconds. Then the predicted time of the next positioning is 2000 seconds later. During the user's progress, the GPS method may not be used for positioning. After 2000 seconds, the latest position information of the user is obtained through positioning, and it can be judged whether the user enters the target scenario according to the latest position information.
[0333] It should be noted that the methods in the above S901 to S904 can be applied to business scenario identifications with different accuracies of scenario identification accuracy.
[0334] In this implementation method, the movement speed is evaluated according to the user's current movement state, and then the time of the next positioning is predicted according to the movement speed and the distance to the destination. Throughout the process, it is not necessary to always use the GPS method for positioning, which greatly reduces the number of positionings and reduces the power consumption.
[0335] The embodiment of the present application also provides a method for refreshing the time of the next positioning. The method may include: during the user's progress, the electronic device will always perform Cell-ID positioning. If the base station information of the base station currently accessed by the electronic device obtained through a certain time matches a certain base station fence snapshot, the longitude and latitude information of the center point of the base station fence of the base station fence snapshot and the base station fence radius are obtained. According to the longitude and latitude information of the center point of the base station fence and the base station fence radius, the second distance between the user's current position and the destination is determined, and the user's second movement speed is predicted according to the user's current movement state. The method for calculating the second distance is the same as the method for calculating the first distance described above, and the method for predicting the second movement speed is the same as the method for predicting the first movement speed described above, which will not be elaborated here. The time of the next positioning is updated according to the second movement speed and the second distance.
[0336] For ease of understanding, please refer toFigure 18 , Figure 18 is a schematic diagram of another application scenario for predicting time shown in an exemplary embodiment of the present application. During the user's movement, several base station fence snapshots may be matched. These base station fence snapshots may be those that the user has previously matched, or may be newly matched during the current movement process. Each base station fence snapshot is represented as a base station fence in Figure 18 . The rightmost circular area represents the target area (fence area) corresponding to the destination location, where the position information of the electronic device can be matched with a certain scenario fence snapshot.
[0337] For example, the destination is the company. As Figure 18 shown, the user's starting point is within the first base station fence, that is, at the starting point, the electronic device matches the first base station fence snapshot. At this time, the calculated distance between the user's current position and the company is 2000 meters, and the user's current movement speed is 1 meter per second. After 2000 seconds, the user will move to the target area corresponding to the company, so the next positioning time is 2000 seconds later. Then, the user walks into the second base station fence, that is, the electronic device matches the second base station fence snapshot. At this time, the calculated distance between the user's current position and the company is 1500 meters, and the user's current movement speed is 1 meter per second. After 1500 seconds, the user will move to the target area corresponding to the company, refreshing the next positioning time, that is, determining that the next positioning time is 1500 seconds later.
[0338] If the user changes the movement state during the movement, the movement speed also changes accordingly. The next positioning time is refreshed according to the changed movement speed and the remaining distance. For example, the user walks into the third base station fence, that is, the electronic device matches the third base station fence snapshot. At this time, the calculated distance between the user's current position and the company is 1000 meters, and the user's current movement speed is 10 meters per second. After 100 seconds, the user will move to the target area corresponding to the company, refreshing the next positioning time, that is, determining that the next positioning time is 100 seconds later. And so on, until the user walks into the target area and the electronic device recognizes that it has entered the target scenario.
[0339] In this implementation method, according to the base station fence snapshots matched during the user's movement, the next positioning time is continuously refreshed. Throughout the process, it is not necessary to always use the GPS method for positioning. While maintaining the accuracy of business scenario recognition, the number of positioning times is greatly reduced, and the power consumption is reduced. And with the increase in the learning of scene features, the scene feature data is continuously improved. In the later stage, no matter where the user wants to go, the number of times of using the GPS method for positioning is less and less, and the overall power consumption that can be saved for realizing business scenario recognition is more and more.
[0340] The method for refreshing the time of the next positioning in the embodiments of the present application has been described above. Next, some power-saving methods involved in the embodiments of the present application will be described. It should be noted that the power-saving method can be applied to business scenario identifications with different accuracies of scenario recognition accuracy.
[0341] In one example, when it is detected that the user stops moving / stays still, the electronic device stops positioning and / or stops scanning for WiFi. For example, sensors such as an acceleration sensor and a gyroscope sensor in the electronic device can be used, and combined with a network model capable of realizing attitude learning to analyze the user's current attitude to determine whether the user is currently in a state of stopping moving. When it is determined that the user currently stops moving / stays still, there is no need to identify again whether the electronic device is located in the target scenario for the time being, and the electronic device can stop positioning and / or stop scanning for WiFi operations, which can effectively save power.
[0342] In one example, when it is detected that the user's moving range is less than or equal to a preset range, the electronic device stops positioning and / or stops scanning for WiFi. The moving range can be represented by the number of steps. For example, the user's moving range is less than or equal to the preset range, which can be that the number of steps the user is currently walking is less than or equal to the preset number of steps (such as 40 steps). The number of steps can be counted by a pedometer in the electronic device. When it is determined that the user's moving range is less than or equal to the preset range, there is no need to identify again whether the electronic device is located in the target scenario for the time being, and the electronic device can stop positioning and / or stop scanning for WiFi operations, which can effectively save power.
[0343] Optionally, the embodiments of the present application also provide a method for switching the positioning mode. The process will be described in detail below. Please refer to Figure 19 , Figure 19 is a schematic diagram of switching the positioning mode shown in an exemplary embodiment of the present application.
[0344] In one example, as Figure 18 shown, the areas where the electronic device may be located are divided into an irrelevant area, a low-correlation area, and a high-correlation area. The method of using Cell-ID positioning is called the base station scanning mode, and the base station scanning mode is adopted when the electronic device is in the irrelevant area. As Figure 19 shown, when starting the business scenario recognition, the electronic device adopts the base station scanning mode. If the base station signal cannot match the low-correlation area at this time, it is determined that the electronic device is currently in the irrelevant area. It can be understood that at this time, the base station information of the base station to which the electronic device is currently connected does not match any base station fence snapshots, and it is determined that the electronic device is currently in the irrelevant area.
[0345] If the base station signal matches a low-correlation area but the WIFI signal does not match a high-correlation area, it is determined that the electronic device is currently in a low-correlation area. It can be understood that at this time, the base station information of the base station currently accessed by the electronic device matches a base station fence snapshot, but the WIFI list of the electronic device does not match the WIFI characteristics, and it is determined that the electronic device is currently in a low-correlation area. When the electronic device is in a low-correlation area, a network scanning mode is adopted. For example, positioning is performed by using the GPS method. Optionally, when the electronic device is in a low-correlation area, if the base station signal does not match the low-correlation area, it is determined that the electronic device is currently in an irrelevant area.
[0346] When the electronic device is in a high-correlation area, an online positioning mode is adopted. For example, the base station information of the base station currently accessed by the electronic device matches a base station fence snapshot, and the WIFI list of the electronic device also matches, and it is determined that the electronic device is currently in a high-correlation area. Optionally, when the electronic device is in a high-correlation area, the online positioning result can be used again to determine whether the electronic device is currently in a high-correlation area, a low-correlation area, or an irrelevant area. For example, according to the online positioning result, it is determined that the base station information of the base station currently accessed by the electronic device matches a base station fence snapshot, and the WIFI list of the electronic device also matches, and it is determined that the electronic device is still in a high-correlation area. Another example is that according to the online positioning result, it is determined that the base station signal matches a low-correlation area but the WIFI signal does not match a high-correlation area, and it is determined that the electronic device is currently in a low-correlation area. Another example is that according to the online positioning result, it is determined that the base station signal does not match the low-correlation area, and it is determined that the electronic device is currently in an irrelevant area.
[0347] In this embodiment, the base station scanning mode, the network scanning mode, and the online positioning mode are flexibly switched, accurately determining whether the electronic device is currently in an irrelevant area, a low-correlation area, or a high-correlation area, improving the flexibility and real-time performance of the determination of the area where the electronic device is located, and providing guarantee for the accuracy and real-time performance of service scenario recognition.
[0348] Finally, a simple summary is made of the power-saving methods in the service scenario recognition methods provided in the embodiments of the present application. Specifically as follows:
[0349] It has been verified that the power consumption required to achieve indoor and outdoor recognition is 0.1 mAh per time, the power consumption required for WIFI feature matching is 0.05 mAh per time, the power consumption required for GPS positioning is 0.05 mAh per time, the power consumption required for Cell-ID positioning is 0.005 mAh per time, and the power consumption required for cellular feature matching (such as the matching of base station information and base station fence snapshots) is negligible. Correspondingly, there is no error in indoor and outdoor recognition, the error of WIFI feature matching is 5 - 50 meters, the error of GPS positioning is 10 - 15 meters, the error of Cell-ID positioning is 100 - 200 meters, and the error of cellular feature matching is 400 - 800 meters.
[0350] The method for business scenario recognition provided by the embodiments of the present application is mainly implemented by combining cellular feature matching, Cell-ID positioning, GPS positioning, and WIFI feature matching. Moreover, in most cases, cellular feature matching and Cell-ID positioning are the main methods, while GPS positioning and WIFI feature matching are the auxiliary methods. The former requires extremely low power consumption, and the latter has very small errors. Therefore, while ensuring the accuracy of business scenario recognition, the power consumption required for business scenario recognition is greatly reduced.
[0351] The embodiments of the present application collect scenario crowdsourcing data and learn the scenario features corresponding to different services. As the learning progresses, the learned scenario features become more and more complete. When performing business scenario recognition based on these scenario features, in most cases, cellular feature matching and Cell-ID positioning can be used to achieve it, and the number of times GPS positioning is required will be less and less, and the power consumption will continue to decrease. At the same time, due to the increasingly complete learned scenario features, no matter where the user moves to in the later stage, it can quickly identify whether the user has entered a business scenario through the scenario features, improving the real-time performance.
[0352] For ease of understanding, please refer to Figure 20 , Figure 20 which is a schematic diagram showing the changes in power consumption and real-time performance shown in an exemplary embodiment of the present application. As shown in (a) of Figure 20 , at cold start, that is, when the scenario features have not been learned yet, the required power consumption is 2.5 mAh per day. After the scenario features are learned, the power consumption drops to 1.5 mAh per day. As shown in (b) of Figure 20 , at cold start, that is, when the scenario features have not been learned yet, the real-time performance is 30 seconds. After the scenario features are learned, the real-time performance is 3 seconds.
[0353] The embodiments of the present application also evaluate the movement speed based on the user's current movement state, and then predict the time of the next positioning according to the movement speed and the distance to the destination. Throughout the process, there is no need to always use the GPS method for positioning, greatly reducing the number of positioning times and lowering the power consumption.
[0354] In the embodiment of the present application, according to the snapshot of the base station fence matched during the user's movement, the time for the next positioning is continuously refreshed. Throughout the process, there is no need to always use the GPS method for positioning. While maintaining the accuracy of business scenario recognition, the number of positioning times and WIFI scanning times is greatly reduced, and the power consumption is reduced. Moreover, with the increase in the learning of scene features, the scene feature data is continuously improved. Later, no matter where the user wants to go, the number of times of using the GPS method for positioning is less and less, and the overall power consumption that can be saved for realizing business scenario recognition is more and more.
[0355] The embodiment of the present application also provides a WIFI chip, which can be installed in an electronic device, and the scanning power consumption of this WIFI chip is much lower than that of the existing WIFI chips. Through experiments, the scanning power consumption of the WIFI chip provided by the present application is only one-tenth of the scanning power consumption of the existing WIFI chips.
[0356] In one example, when the WIFI chip provided by the present application scans WIFI, it will also parse the data packets discarded in the prior art, so as to scan more results in one scanning process. The WIFI chip provided by the present application can also perform multi-channel parallel scanning, greatly improving the coverage rate of the WIFI scanning results. When the same number of scanning results are required, the number of scans of the WIFI chip provided by the present application is significantly reduced, thereby reducing the scanning power consumption.
[0357] In one example, since the power consumption required for the WIFI chip to scan the 5GHz band is much greater than the power consumption required for scanning the 2.4GHz band, the WIFI chip provided by the present application can only scan the 2.4GHz band, greatly reducing the scanning power consumption.
[0358] The above details the examples of business scenario recognition provided by the embodiments of the present application. It can be understood that in order for the electronic device to implement the above functions, it includes the corresponding hardware and / or software modules for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the present application.
[0359] Embodiments of the present application can divide the functional modules of an electronic device according to the above method examples. For example, each function can be corresponding to each functional module, such as a listening unit, an acquisition unit, a processing unit, a display unit, etc. Or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiments of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation.
[0360] It should be noted that all relevant contents of each step involved in the above method embodiment can be cited in the function description of the corresponding functional module, and will not be repeated here.
[0361] The electronic device provided in this embodiment is used to perform the above business scenario recognition, so the same effect as the above implementation method can be achieved.
[0362] In the case of adopting an integrated unit, the electronic device may further include a processing module, a storage module, and a communication module. Among them, the processing module can be used to control and manage the actions of the electronic device. The storage module can be used to support the electronic device to execute stored program codes and data, etc. The communication module can be used to support the communication between the electronic device and other devices.
[0363] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logical blocks, modules, and circuits described in combination with the disclosure of the present application. The processor can also be a combination that realizes computing functions, such as a combination including one or more microprocessors, a combination of a digital signal processing (DSP) and a microprocessor, and so on. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a WiFi chip, etc.
[0364] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment can be a device with Figure 7 the shown structure.
[0365] Embodiments of the present application also provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor is enabled to execute the business scenario recognition method of any of the above embodiments.
[0366] Embodiments of the present application also provide a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the above relevant steps to implement the business scenario recognition method in the above embodiments.
[0367] In addition, an embodiment of the present application further provides a device, which may specifically be a chip, component, or module. The device may include a processor and a memory connected to each other. The memory is used to store computer-executable instructions. When the device runs, the processor may execute the computer-executable instructions stored in the memory to enable the chip to execute the service scenario recognition method in each of the above method embodiments. Optionally, the WIFI chip provided in the present application may also be integrated in the chip.
[0368] Among them, the electronic device, computer-readable storage medium, computer program product, or chip provided in this embodiment is all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be elaborated here.
[0369] Through the description of the above embodiments, those skilled in the art can understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0370] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection of the device or unit may be in an electrical, mechanical, or other form.
[0371] The unit described as a separated component may or may not be physically separated, and the component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0372] In addition, each functional unit in each embodiment of the present application may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0373] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0374] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for identifying a service scenario, characterized in that Applied to an electronic device, the method includes: When a scene recognition request for a target service is monitored, obtaining base station information of the base station to which the electronic device is currently connected and the scene recognition accuracy of the target service, where the base station information includes a target operator identifier, a target cell number, and a target base station number, and the scene recognition request is used to request recognition of whether the electronic device is located in a target scene associated with the target service; the scene recognition accuracy includes high accuracy; For a target service with high scene recognition accuracy, when it is detected that the base station information matches the operator identifier, cell number, and base station number in a base station fence snapshot, where the base station fence snapshot includes a scene fence identifier; determining a target scene fence snapshot according to the scene fence identifier in the base station fence snapshot that matches the base station information; the target scene fence snapshot includes WiFi features; Determining the fence area corresponding to the target scene fence snapshot; Obtaining the current location of the electronic device; If it is detected that the current location is within the fence area, obtaining the WiFi list of the electronic device; If it is detected that the WiFi list matches the WiFi features, determining that the electronic device is located in the target scene.
2. The method according to claim 1, wherein When the scene recognition accuracy includes low accuracy, the method further includes: If the base station information matches the operator identifier, cell number, and base station number in a base station fence snapshot, determining that the electronic device is located in the target scene.
3. The method according to claim 2, characterized in that, The method further includes: If the base station information does not match the operator identifier, cell number, and base station number in any base station fence snapshot, determining a target area according to the target service, where the target area is the area corresponding to the destination, and the destination is the location for realizing the target service; Obtaining the current location of the electronic device; If it is detected that the current location of the electronic device is within the target area, determining that the electronic device is located in the target scene.
4. The method according to claim 1, wherein When the scene recognition accuracy includes medium accuracy, the method further includes: If the base station information matches the operator identifier, cell number, and base station number in a base station fence snapshot, determining a target scene fence snapshot according to the scene fence identifier in the base station fence snapshot that matches the base station information; the target scene fence snapshot includes the longitude and latitude information of the center point of the scene fence and the radius of the scene fence; Determining the fence area according to the longitude and latitude information of the center point of the scene fence and the radius of the scene fence; Obtaining the current location of the electronic device; If it is detected that the current location of the electronic device is within the fence area, determining that the electronic device is located in the target scene.
5. The method according to claim 1, characterized in that The WiFi list includes at least one WiFi identifier information and the WiFi strength corresponding to each WiFi identifier information, the WiFi features include a list of WiFi identifier information and a target matching degree threshold corresponding to the list of WiFi identifier information, and the step of if it is detected that the WiFi list matches the WiFi features and determining that the electronic device is located in the target scene includes: Determining the matching degree threshold corresponding to the WiFi list; If it is detected that the WiFi identification information in the WiFi list matches the WiFi identification information list in the WiFi feature, and the matching degree threshold is greater than or equal to the target matching degree threshold, it is determined that the electronic device is located within the target scenario.
6. The method according to claim 5, characterized in that The method further includes: If it is detected that the WiFi list does not match the WiFi feature, obtain the WiFi list generated by a third-party application; If it is detected that the WiFi list generated by the third-party application matches the WiFi feature, it is determined that the electronic device is located within the target scenario.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: If it is detected that the WiFi list of the electronic device matches the WiFi feature in any one of the scenario fence snapshots, it is determined that the electronic device is located within the target scenario.
8. The method according to claim 1, characterized in that The method further includes: Obtain the motion state of the user carrying the electronic device; Predict the first motion speed of the user according to the motion state; Determine the destination for implementing the target service according to the target service, and determine the first distance between the current position of the user and the destination; Predict the time of the next positioning according to the first motion speed and the first distance.
9. The method according to claim 1, wherein The obtaining of the current position of the electronic device includes: Obtain the current position of the electronic device through the Global Positioning System.
10. The method according to claim 8, characterized in that, The base station fence snapshot includes the longitude and latitude information of the center point of the base station fence. The method further includes: If, during the movement of the electronic device, it is detected that the base station information of the base station currently accessed by the electronic device matches the target base station fence snapshot, determine the position of the user according to the longitude and latitude information of the center point of the base station fence in the target base station fence snapshot; Determine the second distance according to the position of the user and the destination; Determine the second motion speed of the user, and update the time of the next positioning according to the second motion speed and the second distance.
11. The method according to claim 1, characterized in that, The method further includes: When the electronic device is located within the target scenario, obtain the latest position of the electronic device; Determine whether the electronic device has left the target scenario through the latest position.
12. An electronic device, characterized in that, Includes: One or more processors; one or more memories; The memory stores one or more programs. When the one or more programs are executed by the processor, the electronic device is caused to execute the method according to any one of claims 1 to 11.
13. A chip, characterized in that, Includes: A processor, configured to call and run a computer program from a memory, so that the electronic device installed with the chip executes the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Intelligent position monitoring method and device and electronic equipment
CN110267207A
Network positioning method and device, electronic equipment and storage medium
CN111698648A