WO2022222576A1 - Scenario recognition method and electronic device - Google Patents

Scenario recognition method and electronic device Download PDF

Info

Publication number
WO2022222576A1
WO2022222576A1 PCT/CN2022/075559 CN2022075559W WO2022222576A1 WO 2022222576 A1 WO2022222576 A1 WO 2022222576A1 CN 2022075559 W CN2022075559 W CN 2022075559W WO 2022222576 A1 WO2022222576 A1 WO 2022222576A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
location
event
mobile phone
preset
Prior art date
Application number
PCT/CN2022/075559
Other languages
French (fr)
Chinese (zh)
Inventor
丁勇
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202110444566.3A external-priority patent/CN113115211A/en
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to CN202280004912.9A priority Critical patent/CN115668989B/en
Publication of WO2022222576A1 publication Critical patent/WO2022222576A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information

Definitions

  • the embodiments of the present application relate to the technical field of electronic communication, and in particular, to a scene recognition method and an electronic device.
  • NFC Near Field Communication
  • an electronic access card can also be set in the mobile phone, so that people can easily enter and exit certain areas.
  • the electronic access control card of the community can be set on the mobile phone, which can facilitate people to enter and leave the community access control.
  • the mobile phone needs to go through a multi-step operation before the mobile phone can display the interface required by the user (ie, the subway boarding code). That is to say, this method is relatively cumbersome to operate.
  • the present application provides a scene recognition method and an electronic device, so as to simplify the operation of the electronic device and improve user experience.
  • the present application provides a scene recognition method, the method may include: detecting that the electronic device enters the first area, and after detecting that the electronic device enters the first area, detecting that the electronic device is located in the first area in the first area.
  • the location label represents the environmental information acquired by the electronic device in the current location, and the first location is in the first area.
  • the electronic device compares the location label with the location information corresponding to the preset location to obtain a comparison result.
  • the preset position information represents the environmental information of the electronic device in the preset scene of the first position, and the preset position is within the first area.
  • the electronic device before the electronic device obtains the position label, the electronic device has obtained the preset position information, and the electronic device compares the position label of the first position with the position information corresponding to the preset position, and can determine that the electronic device Whether the current first position is the preset position.
  • the comparison result indicates that the position label matches the position information corresponding to the preset position, that is, the current first position of the electronic device is the preset position. If no user operation is received, the electronic device can be triggered to automatically perform the first action corresponding to the first position.
  • the first action includes the electronic device running the first application and displaying the first interface.
  • the first interface may include two dimensional code.
  • the first application may implement multiple functions, and when the electronic device runs the first application and the first application implements a corresponding function, a corresponding display interface is displayed.
  • the first application may be an electronic payment application, and the first application is Alipay
  • Alipay With electronic payment, electronic payment and other functions, when the electronic device runs Alipay Application, when realizing electronic payment and electronic payment, the display interface of electronic equipment is different. That is, after the electronic device runs the first application, the electronic device may display interfaces with different functions, and the first interface here corresponds to the display interface of the first application responding to the first action.
  • the comparison result indicates that the position label does not match the position information corresponding to the preset position, it means that the current first position of the electronic device is not the preset position, and the electronic device may not perform the first action, that is, the electronic device does not perform the first action. any response.
  • the electronic device if the electronic device is in the first position, the environment information in the current position is acquired to generate the position label. If the position label matches the preset position information, it means that the current scene matches the preset scene. Since the electronic device includes a preset logical relationship between the first position and the first action, and the current scene matches the preset scene, the electronic device can execute the first action without receiving any user operation. In order to simplify the operation of the electronic device, thereby improving the user experience.
  • the location label includes: all the first site addresses collected by the electronic device and the signal strength of each first site address, the electronic device obtains the first cell identifier and the signal strength of each first cell identifier, and the electronic device obtains the first cell identifier and the signal strength of each first cell identifier. At least one of the first satellite signal obtained by the device and the first light intensity collected by the electronic device.
  • the above-mentioned preset location information includes: all the second site addresses collected by the electronic device and the signal strength of each second site address, the second cell identifier acquired by the electronic device, and the signal of each second cell identifier Intensity, at least one of the second satellite signal obtained by the electronic device and the second light intensity collected by the electronic device.
  • the method may further include: after detecting that the electronic device enters the first area, detecting that the electronic device is located at the first position in the first area before the position label corresponding to the first position , the electronic device may further perform operations including: after detecting that the electronic device enters the first area, determining that the electronic device is in a preset position in the first area. Obtaining the confidence level of the electronic device executing the first event, the confidence level representing the execution degree of the user operation triggering the execution of the first event, wherein the first event and the first position have a preset logical relationship, and the first event has a relationship with the first action, The electronic device executes the first application when the first event is executed.
  • the electronic device may obtain the execution result of the first event, and verify the execution result to obtain the verification result. If the verification result indicates that the first event is successfully executed, the position label corresponding to the preset position of the electronic device is obtained, and the position label is transmitted to the cloud server, so that the cloud server can generate the position information corresponding to the preset position according to the position label.
  • the location tag represents the environmental information acquired by the electronic device in the current location.
  • the electronic device When the electronic device is in the first position, the electronic device receives a user operation, runs the first application in response to the user operating the electronic device, and displays the first interface.
  • the confidence level of the first event represents the execution degree of the first event, that is, the electronic device starts to run the first application and displays the first interface, then the confidence level of the first event indicates that the execution of the first event starts; Under the operation of , it is close to the scanning port of the subway gate, so that the user passes through the subway gate, and the confidence level of the first event indicates that the execution of the first event is completed.
  • the method may further include: after detecting that the electronic device enters the first area, detecting that the electronic device is located at the first position in the first area before the position label corresponding to the first position , the electronic device may further perform operations including: after detecting that the electronic device enters the first area, determining that the electronic device is in a preset position in the first area. Obtaining the confidence level of the electronic device executing the first event, the confidence level representing the execution degree of the user operation triggering the execution of the first event, wherein the first event and the first position have a preset logical relationship, and the first event has a relationship with the first action, The electronic device executes the first application when the first event is executed.
  • the electronic device may obtain the execution result of the first event, and verify the execution result to obtain the verification result. If the verification result indicates that the first event is successfully executed, a position label corresponding to the preset position of the electronic device is obtained, and the electronic device can generate position information corresponding to the preset position according to the position label.
  • the location tag represents the environmental information acquired by the electronic device in the current location.
  • the electronic device collects and obtains the environmental information of the current place where the electronic device executes the first event under the operation of the user according to the first event.
  • the electronic device can transmit the obtained environmental information to the cloud server, so that the cloud server generates preset environmental information.
  • the electronic device can generate preset environmental information according to the environmental information by itself.
  • the electronic device may also obtain the position information corresponding to the preset position of the electronic device before comparing the position label with the position information corresponding to the preset position and obtaining the comparison result.
  • the position information can be obtained first.
  • the electronic device can compare whether the position label is consistent with the preset position information according to the currently obtained position label, so as to determine whether the electronic device is located at the preset position in the first area, so as to decide whether to automatically execute the first action.
  • the above-mentioned when the confidence level indicates that the execution of the first event ends specifically includes: after the electronic device obtains the confidence level, if the confidence level is determined to be greater than the first preset threshold and less than or equal to With the second preset threshold, it can be determined that the electronic device starts to execute the first event; if the confidence level is greater than the second preset threshold, it is determined that the electronic device has completed executing the first event.
  • the first preset threshold is smaller than the second preset threshold.
  • the electronic device when the electronic device executes the first event in response to the user operation, the electronic device can acquire the confidence level of the first event in real time, so that the electronic device can determine the execution state of the first event according to the confidence level.
  • the confidence level may represent that the first event starts to be executed, the execution is completed, or the execution fails.
  • the above execution result includes the current display interface of the electronic device.
  • the electronic device when the electronic device executes the first event, a corresponding interface can be displayed based on the user operation. Therefore, the electronic device can determine the execution result of the first event by acquiring the current display interface. In other words, the electronic device may acquire the current display interface in real time, and the electronic device may determine the confidence level of the first event according to the display interface.
  • the location label includes: all the first site addresses collected by the electronic device, the signal strength of each first site address, and the first cell identifier obtained by the electronic device. , and the signal strength of the first cell identifier.
  • the electronic device compares the location label with the preset location information of the first location, and obtains the comparison result, which specifically includes: generating a first item set including the identifier of the first site and the first cell based on the location label; based on the preset location information A second item set of the identifiers of the second site and the second cell is generated; according to the first item set and the second item set, a comparison result between the position label and the preset position information is obtained by calculation.
  • the electronic device can calculate and obtain the comparison result of the position label and the preset position information according to the preset operation relationship.
  • the QR code is the subway boarding code or a health-related 2-dimensional code.
  • QR code (such as a QR code indicating whether you have been vaccinated or a QR code indicating health test results).
  • the two-dimensional code may be a bus ride code.
  • the method may further include: the electronic device starts executing the first event in response to a user operation.
  • the electronic device when the electronic device executes the first event in response to the user operation, it specifically includes: the electronic device receives a first operation input by the user, and the first operation is used to instruct the electronic device to run the first application . In response to the first operation, the electronic device runs the first application and displays a first interface, wherein the first interface includes a two-dimensional code, and the two-dimensional code is a subway boarding code. The electronic device receives the user's flipping operation, and in response to the flipping operation, the display screen of the electronic device faces the code swiping port of the subway gate.
  • the above-mentioned first event is taken as an example of swiping code at a subway station, and the first event is described in detail.
  • obtaining the confidence of the electronic device executing the first event specifically includes: in response to the first operation, the electronic device runs the first application and displays the first interface, and then the electronic device obtains first interface. Further, the electronic device recognizes the first interface to obtain a first recognition result, and the electronic device can determine the confidence level of the first event according to the first recognition result. Moreover, the electronic device may continue to acquire the current display interface of the electronic device once every first preset time period, and determine the confidence level of the first event according to the current display interface.
  • the present application further provides an electronic device, including: a detection module, a comparison module and an execution module.
  • the detection module is used to detect that the electronic device enters the first area, and after detecting that the electronic device enters the first area, to detect the position label corresponding to the first position when the electronic device is located at the first position in the first area, and the position label represents the electronic device.
  • the environmental information obtained by the device in the current location, and the first location is within the first area.
  • the comparison module is used to compare the position label with the position information corresponding to the preset position to obtain a comparison result.
  • the preset position information represents the environmental information of the electronic device in the preset scene of the first position, and the preset position is within the first area.
  • the preset location information represents the environmental information of the electronic device in the preset scene of the first location.
  • the execution module is used to trigger the electronic device to automatically execute the first action corresponding to the first position without receiving any user operation if the comparison result indicates that the position label is consistent with the preset position information, and the first action includes
  • the electronic device runs the first application and displays a first interface, where the first interface may include a two-dimensional code.
  • the electronic device may further include: a determination module and a response module.
  • the determining module is configured to, after detecting that the electronic device enters the first area, determine that the electronic device is in a preset position in the first area.
  • the response module is used to obtain the confidence level of the electronic device executing the first event, and the confidence level represents the execution level of the user operation triggering the execution of the first event, wherein the first event and the first position have a preset logical relationship, and the first event and the first event have a preset logical relationship.
  • An action is related, and the electronic device runs the first application when the first event is executed.
  • the confidence level represents the execution degree of the user operation triggering the execution of the first event, wherein the first event has a preset logical relationship with the first position, the first event has a relationship with the first action, and the electronic device executes the first event when the electronic device executes the first event. an application.
  • the electronic device determines to start executing the first event according to the confidence of the first event, the electronic device can obtain the execution result of the first event, and verify the execution result to obtain the verification result. If the verification result indicates that the first event is successfully executed, a location label corresponding to the first location is obtained, and the location label is transmitted to the cloud server, so that the cloud server can generate preset location information according to the location label.
  • the location tag represents the environmental information acquired by the electronic device in the current location.
  • the electronic device may further include: a determination module and a response module.
  • the determining module is configured to, after detecting that the electronic device enters the first area, determine that the electronic device is in a preset position in the first area.
  • the response module is used to obtain the confidence level of the electronic device executing the first event, and the confidence level represents the execution level of the user operation triggering the execution of the first event, wherein the first event and the first position have a preset logical relationship, and the first event and the first event have a preset logical relationship.
  • An action is related, and the electronic device runs the first application when the first event is executed.
  • the electronic device determines to start executing the first event according to the confidence of the first event, the electronic device can obtain the execution result of the first event, and verify the execution result to obtain the verification result. If the verification result indicates that the first event is successfully executed, a location label corresponding to the first location is obtained, and the electronic device can generate preset location information according to the location label.
  • the location tag represents the environmental information acquired by the electronic device in the current location.
  • the electronic device is located at the first position, and the position label corresponding to the first position is obtained.
  • the position label represents the environmental information obtained by the electronic device in the current place, and the electronic device can also obtain electronic equipment.
  • the preset location information of the device at the first location is obtained.
  • the electronic device after the electronic device obtains the confidence level, if it is determined that the confidence level is greater than the first preset threshold and less than or equal to the second preset threshold, it may be determined that the electronic device starts to execute the first an event; if the confidence level is greater than the second preset threshold, it is determined that the electronic device has completed the execution of the first event. Wherein, the first preset threshold is smaller than the second preset threshold.
  • the location label includes: all the first site addresses collected by the electronic device, the signal strength of each first site address, and the first cell identifier obtained by the electronic device , and the signal strength of the first cell identifier.
  • the electronic device compares the location label with the preset location information of the first location, and obtains the comparison result, which specifically includes: generating a first item set including the identifier of the first site and the first cell based on the location label; based on the preset location information A second item set of the identifiers of the second site and the second cell is generated; according to the first item set and the second item set, a comparison result between the position label and the preset position information is obtained by calculation.
  • the two-dimensional code is the subway boarding code. If the first action is that the electronic device has a passing bus vehicle, the two-dimensional code may be a bus ride code.
  • the electronic device is specifically configured to: the electronic device receives a first operation input by a user, and the first operation is used to instruct the electronic device to run the first application. In response to the first operation, the electronic device runs the first application and displays a first interface, wherein the first interface includes a two-dimensional code, and the two-dimensional code is a subway boarding code. The electronic device receives the user's flipping operation, and in response to the flipping operation, the display screen of the electronic device faces the code swiping port of the subway gate.
  • the above-mentioned first event is taken as an example of swiping code at a subway station, and the first event is described in detail.
  • the electronic device is specifically configured to: in response to the first operation, the electronic device runs the first application, and after displaying the first interface, the electronic device acquires the first interface. Further, the electronic device recognizes the first interface to obtain a first recognition result, and the electronic device can determine the confidence level of the first event according to the first recognition result. Moreover, the electronic device may continue to acquire the current display interface of the electronic device once every first preset time period, and determine the confidence level of the first event according to the current display interface.
  • the electronic device is specifically configured to: after the electronic device receives the user's grip and flip operation, the electronic device obtains the current display interface after a second preset time period. And the current display interface is identified to obtain a second identification result, and the electronic device determines the confidence level of the first event according to the second identification result.
  • the present application also provides an electronic device, comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs
  • the program includes instructions that, when executed by the electronic device, cause the electronic device to execute the method in the first aspect and any possible design manners thereof.
  • the present application also provides a computer-readable storage medium, which is characterized by comprising computer instructions, when the computer instructions are run on a computer, the computer is made to execute the first aspect and any possible design methods thereof. method.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, enables the computer to execute the method for executing the electronic device in the first aspect and any possible design thereof.
  • the electronic device of the second aspect can be understood that the electronic device of the third aspect, the computer-readable storage medium of the fourth aspect, the computer program product of the fifth aspect, and the chip system of the sixth aspect can be
  • the beneficial effects achieved reference may be made to the beneficial effects in the first aspect and any possible design manners thereof, which will not be repeated here.
  • FIG. 1 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a scene recognition method provided by an embodiment of the present application.
  • 3A is a schematic flowchart of a cloud server data mining process provided by an embodiment of the present application.
  • 3B is a schematic flowchart of a cloud server deleting a fingerprint feature according to an embodiment of the present application
  • FIG. 5 is a flowchart of another scene recognition method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an application scenario of a scene recognition method provided by an embodiment of the present application.
  • the phone can generate digital access cards.
  • multiple digital access cards can be stored in the mobile phone, such as company access cards, community access cards, etc.
  • the user needs to select the correct access control card on the mobile phone.
  • the mobile phone displays the digital access control card of the company access control card
  • the user can pass the company's access control
  • the mobile phone displays the digital access control card of the community access control card
  • the user can pass the residential access control.
  • the mobile phone stores two NFC cards, "home access control card” and "company access control card".
  • the user uses the NFC function of the mobile phone, and the user selects the "company access control card” on the mobile phone, and the mobile phone can be used as an access control card.
  • the user will bring the mobile phone close to the access control machine, and the access control machine is triggered, allowing the user to pass the company's access control.
  • the mobile phone may use a geo-fence to establish a corresponding relationship between the NFC card and the geographic location. For example, the location information (eg, the first location) when the user uses the "home access control card" is collected, and a corresponding relationship is established. When the mobile phone detects that the user has reached the first place again, and detects that the user triggers the NFC function, the mobile phone displays the NFC card of "home access control card".
  • the mobile phone can acquire the user's location information, and if the mobile phone detects that the user is located at a subway station, the mobile phone can display the subway boarding code. So that users can use the bus code to pass through the subway gates to simplify user operations. It can be understood that this method is based on the current location information of the mobile phone to provide the user with a service related to the location information (display the bus code). However, the subway station is a relatively extensive location.
  • the user When the user is located in the subway station, the user may not be close to the subway gate; or, the user is near the subway station and has not entered the subway station; that is, this method cannot accurately identify At the location of the subway gate, it is impossible to determine whether the user needs the mobile phone to provide the service of displaying the bus code. If the user is not close to the subway gate and does not want to pass the subway gate, the mobile phone will display the subway boarding code. Although this method simplifies the operation steps, it does not provide the user with a good experience.
  • Embodiments of the present application provide a scene recognition method and electronic device.
  • the mobile phone can identify the current scene, so that the mobile phone can provide the user with corresponding services according to the current scene. For example, if the mobile phone determines that the current location information is a subway station and it is close to the subway gate, the mobile phone displays the subway boarding code. For another example, if the mobile phone detects that the current location information is the door of the community, and the mobile phone is close to the access control machine of the community, the mobile phone displays the NFC card of "Access Control of Home".
  • the mobile phone can identify the current scene information through multiple sensors, etc., and detect the correlation between the current scene information and the service provided by the mobile phone. In this way, when the mobile phone detects the current scene again, the mobile phone displays the service.
  • the mobile phone when the mobile phone collects information, the scene information collected many times: when the mobile phone is in the subway station and close to the subway gate; at this time, the mobile phone displays the subway QR code based on the user operation.
  • FIG. 1 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, NFC chip module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and user identification module (subscriber identification module, SIM) card interface 195 et al.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the electronic device 100 can implement the NFC function through the NFC chip module 170 and the application processor.
  • the working modes of the NFC chip module 170 include:
  • Peer-to-peer mode Data exchange can be performed between two NFC-enabled devices, such as exchanging music, transferring files, etc. Using this mode requires both devices to have the NFC function.
  • NFC file transfer is basically an abandoned transmission method, because the NFC transmission speed is very slow, and it is usually only used to transfer data with a small amount of information such as a single contact and website between mobile phones. , so there are fewer scenes used in daily life.
  • Card Reader Mode Can be used as a contactless card reader. Can read or write information from electronic tags, but because NFC electronic tags on the market are not widely used, consumers mostly recharge physical bus cards through this mode, but with the gradual development of virtual bus card functions Realization, people's reliance on the physical bus card will become weaker and weaker, and the virtual bus card service integrated into the mobile phone will be more convenient.
  • Card simulation mode In fact, it is equivalent to a mobile phone equipped with NFC function to replace a large number of physical IC cards (bus cards, credit cards, etc.) usage scenarios to realize mobile payment function.
  • the electronic devices in the embodiments of the present application may be mobile phones, smart watches, smart bracelets, tablet computers, desktops, laptops, handheld computers, notebook computers, and ultra-mobile personal computers (ultra-mobile personal computers) with NFC functions.
  • mobile personal computer, UMPC netbooks, and devices including touch screens, such as cellular phones, personal digital assistants (PDAs), augmented reality (AR) ⁇ virtual reality (VR) devices, and the
  • PDAs personal digital assistants
  • AR augmented reality
  • VR virtual reality
  • the electronic device can control the device, and the specific form of the electronic device is not particularly limited in this embodiment of the present application.
  • the embodiments of the present application illustrate the method by taking the electronic device as a mobile phone and implementing the scene recognition method on the mobile phone as an example.
  • the mobile phone can identify the current scene and perform corresponding actions according to the current scene. For example, when the mobile phone is in a subway station, the mobile phone can recognize the current scene, and based on the current scene, the mobile phone displays an interface including "subway boarding code". Before this, the mobile phone needs to determine the current scene corresponding to the action, so as to perform the corresponding action after identifying the current scene subsequently.
  • the mobile phone when the mobile phone is in a preset position, a corresponding action is performed.
  • the mobile phone can count the scene information when the action is performed, and record the scene information. Based on the statistics of the scene information multiple times, the mobile phone can determine the corresponding relationship between the scene information and the action. In this way, when the mobile phone is in the preset position and the scene information is detected again, the mobile phone performs an action corresponding to the scene information.
  • the mobile phone may interact with a cloud server (or referred to as a remote server) to obtain a fingerprint database of the cloud server, where the fingerprint database includes multiple fingerprint information.
  • the fingerprint database includes multiple fingerprint information.
  • Each fingerprint information corresponds to a scene (eg, the first scene), and the fingerprint information may include WIFI, Cell, GNSS, and light intensity information, and the like.
  • the mobile phone detects that the current environment matches a type of fingerprint information in the fingerprint database, the mobile phone can determine an action strongly related to the current scene according to the fingerprint information that matches the current environment, and execute the action.
  • the mobile phone when used as a device for collecting fingerprint information, the mobile phone has the user authorization to report the collected information to the cloud server, and the mobile phone can upload the collected location information and related service actions to the cloud server.
  • the cloud server After the cloud server obtains the collection information uploaded by multiple devices, the cloud server can generate fingerprint information according to the collection information uploaded by the mobile phone according to a preset algorithm, and the multiple fingerprint information forms a fingerprint database.
  • FIG. 2 is a flow chart of the mobile phone transmitting the collected information to the cloud server.
  • this process can also be referred to as the training phase of the scene recognition method.
  • the training phase includes steps 201 to 206 .
  • Step 201 when the mobile phone is located at the first position, obtain the confidence level of the first event, and the first event and the first position have a preset logical relationship.
  • the confidence level of the first event is used to characterize the execution degree of the first event.
  • the first event may be that the mobile phone runs the first application under the operation of the user, or the first event may be that the mobile phone receives a preset user operation and displays a preset interface.
  • the mobile phone may display at least one preset interface.
  • the first location is the first subway station
  • the execution of the first event by the mobile phone is that the mobile phone runs the first application, and displays an interface including "subway boarding code".
  • the first location is the first subway station
  • the mobile phone executing the first event is the mobile phone running the second application
  • the mobile phone displays an interface including the "health code”
  • the mobile phone displays the interface including the "health code”
  • the mobile phone runs the second application.
  • An application the mobile phone displays an interface including the "subway code”.
  • the first application may be an application with an electronic payment function, such as Alipay ,WeChat Wait.
  • the preset logical relationship may be determined by the mobile phone according to the correlation between the first location and the first event.
  • the first location is the first subway station
  • the first event is that the mobile phone displays an interface including "subway boarding code". Judging by the preset logical relationship, when the mobile phone is determined to be at the first subway station, executing the first event can make the user pass through the subway gate, and then the user can take the subway.
  • the mobile phone is in the first subway station, the user needs to take the subway is a preset logic. Therefore, the mobile phone can determine that it is currently in the first subway station and needs to detect whether to execute the first event.
  • the mobile phone interacts with the cloud server, and determines according to the information fed back by the cloud server that the mobile phone is currently in the first subway station, and it is necessary to detect whether the mobile phone executes the first event. Based on this, the mobile phone can determine the data training stage, and can collect data when the mobile phone performs the first action.
  • this preset logical relationship can be preset in the mobile phone as a strong association rule (or called a strong rule).
  • the first position is an area, and when the phone is in the first position, the phone can perform multiple actions under the control of the user.
  • the mobile phone can run a video application under the control of the user, and play the video; or, the mobile phone can run the first application under the control of the user, so that the mobile phone can complete the payment action. That is, when the mobile phone is in the first position, it cannot be determined whether the mobile phone executes the first event, and when the mobile phone executes the first event. Therefore, a confidence level needs to be set.
  • the confidence level is used to represent the execution degree of the first event, for example, whether the mobile phone executes the first event, whether the execution of the first event is completed, and the like.
  • the mobile phone can identify the confidence level of the first event according to data collected by multiple sensors and the like. For example, continue to take the example that the first location is the first subway station and the first event is that the mobile phone displays an interface including "subway boarding code". After determining that the mobile phone is running the first application, the mobile phone can obtain the display interface of the current display screen. If the display interface of the mobile phone is an interface including "subway boarding code", the mobile phone can confirm that the first event starts to be executed. At this time, the confidence level of the first event may be 1, indicating that the mobile phone is executing the first event, that is, the mobile phone is credible to execute the first event.
  • the mobile phone obtains the display interface of the current display screen. If the display interface of the mobile phone does not include the "subway code", it can be confirmed that the confidence level of the first event is 0, that is, it is untrustworthy that the mobile phone executes the first event.
  • the obtained display interface may include “has entered.
  • the interface that prompts messages such as "stop”, “outbound”, “update QR code” or “scan code failed”. That is to say, when the mobile phone obtains the display interface of the display screen as an interface including: “inbound”, “outbound”, “update QR code” or “scan code failed” prompt information, it can also indicate that the first
  • the confidence level of an event may be 1, indicating that the mobile phone is executing the first event, that is, it is credible that the mobile phone executes the first event.
  • the mobile phone can acquire the display interface of the display screen in real time, so that the mobile phone can determine the confidence level of the first event. Specifically, the mobile phone can determine whether the display interface of the display screen needs to be acquired according to the currently running application. When the mobile phone determines that the current first application is running, the mobile phone can acquire the display interface of the display screen in real time (or at a preset time interval).
  • Step 202 Determine whether the confidence level is greater than a first preset threshold. If the confidence level is greater than the first preset threshold, go to step 203; if the confidence level is less than or equal to the first preset threshold, go to step 206.
  • the confidence degree may be set to be greater than or equal to the first preset threshold, and step 203 is performed; the degree of execution is less than the first preset threshold, and step 206 is performed.
  • the execution result includes successful execution of the first event (or understood as completion of execution of the first event) and failure of execution of the first event.
  • the execution result of the first event may be determined according to data collected by sensors in the mobile phone, or the execution result of the first event may be determined by acquiring information on the current display interface of the mobile phone.
  • the first event is that the mobile phone displays an interface including "subway boarding code”.
  • the confidence level of the first event indicates that the first event is credible.
  • the user aligns the display interface of the mobile phone with the code scanning port of the subway gate, so that the mobile phone completes the first event.
  • the display interface of the mobile phone will change.
  • the mobile phone obtains the execution result of the first event, that is, the current display interface of the display screen of the mobile phone.
  • the mobile phone obtains the execution result of the first event, and determines the verification result of the first event by identifying the current display interface of the display screen of the mobile phone.
  • the verification result indicates that the first event is successfully executed, or the verification result indicates that the first event is not successfully executed.
  • the above-mentioned determination of the execution result of the first event is determined according to the current display interface of the display screen of the mobile phone.
  • the mobile phone when it is determined that the display screen of the mobile phone includes an interface of "subway code”, the mobile phone obtains the current display interface of the display screen once every preset time interval, so as to determine the school of the first event according to the display interface. test results.
  • the mobile phone when it is determined that the display screen of the mobile phone includes an interface of "subway boarding code", and it is determined that the current display interface of the mobile phone has changed, the mobile phone obtains the current display interface of the display screen, so as to determine the status of the first event according to the display interface. Check the result.
  • Step 204 According to the verification result, determine whether the first event is successfully executed. If the execution of the first event is successful, go to step 205; if the execution of the first event fails, go to step 206.
  • the display interface includes the prompt information of "inbound” or "outbound"
  • the verification result indicates that the first event was successfully executed, and the execution steps 205.
  • the display interface does not include "inbound” or "outbound” prompt information, for example, the display interface includes "scan code failure” or "update QR code” prompt information, etc.
  • the verification result can be determined. Indicate that the first event is not successfully executed (the first event fails to execute), and step 206 is executed.
  • Step 205 Acquire the location label corresponding to the first location in the mobile phone, and upload the location label corresponding to the first location to the cloud server.
  • the location tag may include at least one of WIFI, Cell, GNSS and light intensity information. If the mobile phone obtains the permission granted by the user, after the completion of the first event, the collected WIFI, Cell, GNSS and light intensity information can be used as the location label of the first location, and the location label can be uploaded to the cloud server.
  • WIFI refers to all the site addresses (Basic Service Set Identifier, BSSID) searched by the WIFI of the mobile phone in the process of executing the first event, and the signal strength corresponding to each BSSID.
  • BSSID Basic Service Set Identifier
  • Cell refers to the cell identity obtained by the mobile phone and the signal strength of the cell identity during the execution of the first event process by the mobile phone.
  • GNSS refers to the satellite signal obtained by the mobile phone in the process of executing the first event.
  • the light intensity signal refers to the light intensity of the environment in which the mobile phone is located as determined by a sensor (eg, an ambient light sensor) during the execution of the first event by the mobile phone.
  • the first event is that the mobile phone displays an interface including "subway boarding code".
  • the location tag indicates that when the mobile phone is located near the subway gate in the first subway station (for example, the position where the subway gate scans the code or just passed the subway gate), after the mobile phone successfully executes the first event, the mobile phone will collect the data.
  • the location label is uploaded to the cloud server.
  • Step 206 No response.
  • the non-response here means that the mobile phone does not respond.
  • the mobile phone determines that the confidence level is less than or equal to the first preset threshold, indicating that the degree of correlation between the first position and the first event is not high, and the mobile phone does not need to perform subsequent steps. And, when the mobile phone determines that the verification result of the first event indicates that the execution of the first event fails, it is not necessary to report the first location and the first event to the cloud server for the time being, and also does not need to collect the location label corresponding to the first location. At this point, the phone does not respond.
  • multiple mobile phones can upload the location tag corresponding to the first location and the first event to the cloud server.
  • the first mobile phone can upload the location label of the first subway station and the first event to the cloud server; the second mobile phone can also upload the location label of the first subway station like the cloud server, and the first event.
  • the cloud server may generate a fingerprint tag of the first position (that is, unique corresponding information for the first position) according to the position tag corresponding to the first position.
  • the GNSS signal and light intensity signal can be used to determine whether the current mobile phone is indoors or outdoors, and the Cell information and WIFI information can be used to determine the area of the first location where the mobile phone is located.
  • the cloud server may store information uploaded by multiple terminals by means of data mining.
  • an association rule algorithm (Apriori algorithm) can be used to perform data mining on the cell and WIFI information corresponding to the first position, for example, frequent itemset mining can be performed on the cell and WIFI information. That is, when running the Apriori algorithm, in the frequent mode, the frequent itemsets are obtained. Frequent patterns are itemsets, sequences, or substructures that occur frequently in a dataset. An itemset is a collection of several items.
  • the WIFI information ie, the wireless network name list
  • the WIFI information ie, the wireless network name list
  • Frequent itemsets refer to the frequency of an itemset appearing in all items, which is greater than the set of preset frequencies (minimum support threshold).
  • the above-mentioned Apriori algorithm can be used to determine the item set with the highest occurrence frequency.
  • the minimum support threshold that is, the itemsets whose support is greater than the minimum support threshold.
  • the support degree of each item set is determined through data mining, and it is judged whether the item set meets the fingerprint requirements of the first position. If the support degree of the item set is greater than the minimum support degree threshold, it means that the item set can be used as a Fingerprint feature of the first location.
  • calculation method of the support of each itemset can refer to the following formula 1:
  • X represents the ID of the base station obtained by the cell signal, that is, the CELL ID
  • Y represents the wireless network signal address obtained by the WIFI signal, which refers to the site address (Basic Service Set Identifier, BSSID) included in the WIFI list, that is, the WIFI BSSID
  • BSSID Basic Service Set Identifier
  • support( X ⁇ Y) represents the support degree of the itemsets from the base station to the specific area
  • N represents the total number of itemsets
  • count(X, Y) represents the itemsets ⁇ cell, wifi>.
  • the above-mentioned process of data mining of the cloud server may be illustrated by the flowchart shown in FIG. 3A .
  • the cloud server data mining process includes:
  • Step 301 The cloud server uses a preset data processing algorithm to calculate the fingerprint feature of the first location according to the location tag uploaded by the terminal.
  • the cloud server may calculate the fingerprint feature of the location tag in the above manner.
  • Step 302 determine whether the fingerprint feature already exists in the fingerprint database of the first position; if the fingerprint feature already exists in the fingerprint database of the first position, execute step 303 ; otherwise, execute step 304 .
  • the fingerprint database of the first location includes a plurality of fingerprint features, and these fingerprint features enable the cloud server to uniquely determine the features of the first location.
  • the fingerprint features in the fingerprint database are generated according to the location tags from multiple terminals.
  • the currently calculated fingerprint features may have been stored in the fingerprint database. In order to avoid the repetition of fingerprint features and affect the matching of the first position, each additional Fingerprint features need to be compared.
  • Step 303 Do not add fingerprint database information.
  • the fingerprint database has the same fingerprint feature as the current fingerprint feature, it is not necessary to add the fingerprint feature to the fingerprint database.
  • the existing fingerprint features in the fingerprint database are obtained by data mining, the existing fingerprint features in the fingerprint database can be marked to increase the correlation between the fingerprint features and the first position.
  • Step 304 Save the itemsets obtained by data mining to the fingerprint database in the first location.
  • the mobile phone can determine the first action corresponding to the first position according to the fingerprint database information of the first position.
  • the cloud server can receive the location labels of the first location transmitted by multiple terminals, then the cloud server can update the fingerprint features in the fingerprint database according to the location labels, so that the fingerprint database provided by the cloud server for the mobile phone can accurately provide the mobile phone with The first action associated with the first position.
  • the cloud server when the cloud server updates the fingerprint database in real time, it also includes the "aging" fingerprint information that will be deleted.
  • the “aging” fingerprint information indicates that the fingerprint information has not been called within a preset time period. For example, when matching the current location of the mobile phone according to the fingerprint information in the fingerprint database, if the fingerprint information has not been used within 45 days, the fingerprint information is called “aging" fingerprint information.
  • the cloud server The "aging" fingerprint information can be deleted.
  • the process of deleting fingerprint information is shown in FIG. 3B , and the method includes steps 3-1 to 3-4.
  • the flowchart takes deleting a fingerprint feature as an example, and the cloud server may perform the above process for each fingerprint feature in the fingerprint database.
  • Step 3-1 The cloud server generates a timestamp of the fingerprint feature to determine the time interval during which the fingerprint feature is not used.
  • the cloud server can process the fingerprint features with an earlier generation time stamp to determine the judgment order of the fingerprint features.
  • Step 3-2 Determine whether the time interval exceeds the preset time interval. If yes, go to step 3-3; otherwise, go to step 3-4.
  • Step 3-3 Delete the fingerprint feature.
  • Step 3-4 Do not process the fingerprint feature.
  • the embodiment of the present application uses a mobile phone as a computing terminal to calculate the area of the current first location and provide the user with a first action as an example to illustrate the scene recognition method provided by the present application.
  • the mobile phone implements the flow chart of the method, wherein the process can also be referred to as the calculation phase of the scene recognition method.
  • the calculation phase includes steps 401 to 406 .
  • Step 401 When the mobile phone determines the current first position, the mobile phone receives a fingerprint database of the first position from the cloud server, and the fingerprint database includes a plurality of fingerprint features of the first position.
  • the first position is an area.
  • the mobile phone When the mobile phone is in a preset area of the first position (eg, a position close to the subway gate in the first subway station), the mobile phone only needs to perform the first action.
  • FIG. 6 it is a schematic diagram of the first subway station.
  • the mobile phone detects that the current position is in the first area 50 and determines that the mobile phone is near the subway gate at the entrance of the first subway station.
  • the mobile phone may display an interface including the "subway boarding code", that is, the mobile phone performs the first action.
  • the mobile phone when the mobile phone is in the first position 10 or in the second position 20, the mobile phone does not have to display an interface including "subway boarding code".
  • the calculation can be performed. Specifically, it needs to perform matching calculation with the fingerprint database of the first subway station to determine whether the mobile phone is currently in the first area 50 .
  • Step 402 The mobile phone obtains the location label of the first location.
  • the location label includes: at least one of WIFI, Cell, GNSS and light intensity information.
  • the corresponding location tag is determined according to the authority obtained by the mobile phone.
  • the mobile phone has the permission to collect WIFI, Cell, GNSS and light intensity information.
  • the mobile phone When the mobile phone is in the first position, it can obtain the WIFI, Cell, GNSS and light intensity information in real time.
  • the mobile phone collects a location tag, wherein the location tag includes WIFI, Cell, GNSS, and light intensity information.
  • the location label of the first location is updated. For example, when the mobile phone detects that it is currently located at the first position, the light intensity information collected by the mobile phone is the first light intensity, and the light intensity in the location tag of the first position is the first light intensity. After a preset time, the mobile phone is still in the first position. At this time, the mobile phone detects that the light intensity information has changed to the second light intensity, and the light intensity information in the updated location tag of the mobile phone is the second light intensity.
  • Step 403 The mobile phone matches the location label with the fingerprint features in the fingerprint database to obtain a matching degree, and the matching degree is used to represent the matching degree between the location label and the fingerprint feature.
  • the following formula 2 can be used to calculate the matching degree (ie, matching degree) between the location label and the fingerprint database feature.
  • score represents the matching degree
  • A represents the itemset ⁇ cell, wifi> obtained by the user's mobile phone
  • B represents the itemset ⁇ cell, wifi> in the fingerprint feature.
  • COUNT(A U B) represents the same number of items in the itemset ⁇ cell, wifi> corresponding to A and the itemset ⁇ cell, wifi> corresponding to B;
  • COUNT(B) represents the itemset ⁇ cell, wifi> corresponding to B > The number of items in the middle.
  • the location tag collected by the mobile phone does not include the item set ⁇ cell, wifi>, the specific location of the mobile phone at the first location can be located by means of CELL ID matching. It should be understood that since there is no WIFI signal to enhance the positioning, the positioning accuracy at this time is low.
  • the mobile phone After the mobile phone acquires the fingerprint features of the first subway station, the mobile phone can match all the fingerprint features with the location tags currently collected by the mobile phone. There are two fingerprint features that match the currently collected location tag, or three fingerprint features that match the currently collected location tag, all of which can indicate that the mobile phone is currently near the subway gate, and the mobile phone can perform the first action, that is, the display includes The display interface of "Subway Ride Code".
  • Step 404 Determine whether the matching degree is greater than a preset matching threshold. If the matching degree is greater than the preset matching threshold, step 405 is performed; if the matching degree is less than or equal to the preset matching threshold, step 406 is performed.
  • the matching degree is greater than the preset matching threshold, indicating that the specific position of the mobile phone in the first position is the preset area indicated by the fingerprint database.
  • the matching degree is less than or equal to the preset matching threshold, it means that the current specific location of the mobile phone does not match the preset area indicated by the fingerprint database.
  • the specific position of the mobile phone in the first position changes, so that the position label collected by the mobile phone changes.
  • the mobile phone can also obtain the location label in real time, and if the information in the location label is updated, the location label is updated. It can be understood that when the location tag of the mobile phone is updated, the mobile phone can perform step 403 again.
  • the mobile phone may also perform step 405 when the matching degree is greater than or equal to the preset matching threshold, and perform step 406 when the matching degree is less than the preset matching threshold.
  • Step 405 It is determined that the mobile phone is in a preset area in the first position, and the mobile phone performs the first action.
  • the mobile phone when it is determined that the mobile phone is in the preset area of the first position, and the mobile phone has a high probability of performing the first action when the mobile phone is in the preset area of the first position, the mobile phone performs the first action. In order to provide users with a good experience.
  • the mobile phone when the mobile phone is determined to be in the first subway station and the mobile phone is in the first area 50, after recognizing the user's operation, the mobile phone displays an interface including "subway boarding code". Based on the recognition of the mobile phone and the successful scanning of the "subway bus code", the user is instructed to carry the mobile phone through the subway gate. At this time, the mobile phone reports the currently collected location tag and the behavior of the mobile phone performing the first action (ie, displaying the interface including the "subway boarding code") to the cloud server.
  • the cloud server can generate the fingerprint database of the first location according to the data reported by the mobile phone.
  • the fingerprint database includes fingerprint features, and the fingerprint features are generated according to the position label of the first position.
  • the mobile phone can obtain the fingerprint database of the first position from the cloud server.
  • the mobile phone obtains the current location label, matches the location label with the fingerprint features in the fingerprint database, and determines the area of the current first location of the mobile phone, and then executes the first action.
  • the location label obtained by the mobile phone has a low degree of matching with the fingerprint features in the fingerprint database, indicating that the location label does not match the fingerprint database and the mobile phone does not respond.
  • the mobile phone is in the area of the first area 50
  • the mobile phone updates the location label, and matches the fingerprint feature in the fingerprint database here.
  • the matching degree between the location label and the fingerprint feature in the fingerprint database is higher than the preset matching threshold, indicating that the location label and If the fingerprint database matches, the mobile phone performs the first action.
  • the mobile phone when the mobile phone is in the first position, the mobile phone can detect the location tag in the first area 50 and report the data to the cloud server; the mobile phone can also detect the location tag in the second area 51 and report the data to the cloud server.
  • the first location may also be a beverage store (eg, a coffee shop), a bus station, a restaurant, a residential area, an office space, and the like.
  • the first location is the first subway station as an example.
  • the first subway station is a public place.
  • the mobile phone determines that it is currently at the position of the first subway station close to the gate, the first action is performed, which can simplify the user's operation and provide convenience for the user.
  • the mobile phone For specific public places, such as beverage shops, restaurants, residential quarters and office places, the mobile phone stores its specific membership card or access control card in these places, and the mobile phone only has the first action corresponding to these places.
  • the first location is a beverage shop.
  • the mobile phone When the mobile phone is close to the cashier of the beverage shop, and the mobile phone determines that the user has consumption needs, the first action is to display the electronic membership card of the beverage shop on the mobile phone; the mobile phone has the electronic access card of the residential area or office.
  • the first location is the residential area or office.
  • the mobile phone is close to the access control machine in the residential area or office, and the mobile phone determines that the user needs to pass the residential area or office access control, the first action is to display the residential area or office. electronic access card.
  • the company's access control card, community access control card and bus card are pre-stored.
  • the mobile phone obtains the location label corresponding to the company's location, and obtains the fingerprint database corresponding to the company's location from the cloud server.
  • the mobile phone detects that the current location tag matches the fingerprint database, and determines that the mobile phone is currently near the company's credit card machine, the mobile phone displays the company's access control card (electronic NFC card).
  • the mobile phone when the mobile phone is located on the first bus, the mobile phone obtains the location tag corresponding to the first bus, and at the same time, obtains the fingerprint database corresponding to the first bus stop from the cloud server.
  • the mobile phone detects that the location tag matches the fingerprint database, and when the first bus reaches the first stop, the mobile phone updates the location tag.
  • the mobile phone determines that the location tag matches the fingerprint database, and the mobile phone displays the bus card (electronic NFC card).
  • the bus includes a WiFi signal
  • the WiFi signal in the mobile phone changes and the location tag is updated, so that the mobile phone can match the location tag with the fingerprint database, so that the mobile phone can identify
  • the first bus is the usual bus.
  • the mobile phone displays the bus card, so that the user can take the first bus. That is to say, when the mobile phone reports data, it can create a corresponding fingerprint database for the mobile phone user, and recognize the action of scanning the bus code when the mobile phone is at the first bus stop. In order to perform matching calculation when the mobile phone is at the first bus stop, and then determine the bus that the user is about to take.
  • the first location is a beverage store (or other consumption place)
  • the first action performed by the mobile phone when it is determined to be in the first location is to display the beverage store membership card.
  • the mobile phone detects that it is in the first position (ie, the beverage shop)
  • the mobile phone can display the preferential information of the beverage shop.
  • the electronic device does not need to add additional auxiliary equipment, and the electronic device can report data to the cloud server, so that the cloud server builds a fingerprint database for the first position according to the data.
  • Other terminals can obtain the fingerprint database of the cloud server, so that when the terminal receives the fingerprint database, it can determine the preset area of other terminals in the first position by matching, so that the mobile phone can perform the first action.
  • the electronic device when the electronic device reports data, the electronic device can determine the confidence level of the first position and the first action according to the sensor, the display screen, and the like.
  • the electronic device may associate the first position with the first action, and report the association to the cloud server.
  • the cloud server when the cloud server generates the fingerprint database of the first location, it needs to perform data mining processing on a large amount of data according to the data uploaded by multiple terminals, so as to reduce the influence of noisy data on fingerprint characteristics, and obtain Fingerprint feature of the first location.
  • the mobile phone can sense the user's behavior of scanning the subway boarding code to pass through the subway gate, and the mobile phone can automatically collect the wifi/cell/light intensity/satellite information of the location and tag it with the truth value and upload it to the cloud server , the cloud side learns and updates the location fingerprint database. Further, in the follow-up, the mobile phone can download the latest location fingerprint database from the cloud side, and regularly obtain the wifi/cell/light intensity/satellite information of the user's location to match the fingerprint database. If the matching is successful, it can be recognized as the user at the subway gate. Nearby, so that the mobile phone can automatically pop up the subway boarding code for the user to quickly swipe the code to pass the gate.
  • a machine learning model can be used to calculate whether the current location is close to the subway gate.
  • the method flow is shown in FIG. 5 , and the method includes steps 501 to 505 .
  • Step 501 The mobile phone is at the first subway station, and obtains the wifi/cell/light intensity/satellite information of the first subway station.
  • Step 502 Calculate the distance between the mobile phone and the subway gate in the first subway station based on the preset machine learning model.
  • the mobile phone uses the wifi/cell/light intensity/satellite information collected in real time and the wifi/cell/light intensity/satellite information corresponding to the preset first subway station as the input of the machine learning model, and obtains the output of the machine learning model. result.
  • the output result is used to indicate the distance between the current location of the mobile phone and the subway gate.
  • Step 503 Determine whether the distance value is greater than the preset distance value. If yes, go to step 504; otherwise, go to step 505.
  • Step 504 It is determined that the mobile phone is near the subway gate of the first subway station, and the first action is performed.
  • Step 505 No response.
  • the electronic device is a mobile phone as an example to describe the method provided by the embodiment of the present application.
  • the electronic device is another device, the above method may also be used. It will not be repeated here.
  • the electronic device provided by the embodiments of the present application includes corresponding hardware structures and/or software modules for executing each function.
  • the embodiments of the present application can be implemented in hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Experts may use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of the embodiments of the present application.
  • the electronic device may be divided into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • the chip system includes at least one processor 601 and at least one interface circuit 602 .
  • the processor 601 and the interface circuit 602 may be interconnected by wires.
  • the interface circuit 602 may be used to receive signals from other devices, such as the memory of an electronic device.
  • the interface circuit 602 may be used to send signals to other devices (eg, the processor 601).
  • the interface circuit 602 may read the instructions stored in the memory and send the instructions to the processor 601 .
  • the electronic device can be caused to perform the various steps in the above embodiments.
  • the chip system may also include other discrete devices, which are not specifically limited in this embodiment of the present application.
  • Embodiments of the present application further provide a computer storage medium, where the computer storage medium includes computer instructions, when the computer instructions are executed on the above-mentioned electronic device, the electronic device is made to perform various functions or steps performed by the mobile phone in the above-mentioned method embodiments .
  • Embodiments of the present application further provide a computer program product, which, when the computer program product runs on a computer, enables the computer to perform various functions or steps performed by the mobile phone in the above method embodiments.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Abstract

Embodiments of the present application provide a scenario recognition method and an electronic device, the method comprising: when detected that an electronic device is located in a first position, a position label corresponding to the first position is acquired, the position label representing environmental information acquired by the electronic device in a current place; and the electronic device compares the position label with preset position information of the first position to acquire a comparison result. If the comparison result indicates that the position label conforms to the preset position information, the electronic device may be triggered to automatically execute a first action corresponding to the first position while not receiving any user operations, the first action comprising the electronic device running a first application and displaying a first interface, and the first interface may comprise a two-dimensional code. Said method may simplify the operation of an electronic device, so as to improve user experience.

Description

一种场景识别方法及电子设备A scene recognition method and electronic device
本申请要求于2021年04月23日提交国家知识产权局、申请号为202110444566.3、发明名称为“一种多层围栏构建方法、云服务器及第一终端设备”的中国专利申请的优先权,以及于2021年08月04日提交国家知识产权局、申请号为202110892061.3、发明名称为“一种场景识别方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on April 23, 2021, with the application number 202110444566.3 and the invention titled "A method for constructing a multi-layer fence, cloud server and first terminal device", and The priority of the Chinese patent application with the application number 202110892061.3 and the invention title "A Scene Recognition Method and Electronic Device" submitted to the State Intellectual Property Office on August 4, 2021, the entire contents of which are incorporated in this application by reference.
技术领域technical field
本申请实施例涉及电子通信技术领域,尤其涉及一种场景识别方法及电子设备。The embodiments of the present application relate to the technical field of electronic communication, and in particular, to a scene recognition method and an electronic device.
背景技术Background technique
随着电子技术的发展,电子产品越来越智能,生活的方方面面都可以使用到电子设备。以手机为例,人们出门搭乘公共交通,如,地铁、公交等,可以使用手机支付交通费用;人们还可以在商店中办理各种电子会员卡,将会员卡设置在手机中。对于具备近场通信(Near Field Communication,NFC)功能的手机,手机中还可以设置电子门禁卡,以便人们可以方便的出入某些区域。例如,手机上可以设置小区的电子门禁卡,可以方便人们进出小区门禁。With the development of electronic technology, electronic products are becoming more and more intelligent, and electronic devices can be used in all aspects of life. Taking mobile phones as an example, when people go out to take public transportation, such as subways, buses, etc., they can use their mobile phones to pay for transportation expenses; people can also apply for various electronic membership cards in stores and set the membership cards on their mobile phones. For mobile phones with Near Field Communication (NFC) functions, an electronic access card can also be set in the mobile phone, so that people can easily enter and exit certain areas. For example, the electronic access control card of the community can be set on the mobile phone, which can facilitate people to enter and leave the community access control.
其中,以使用手机支付地铁费用为例。乘客进地铁站乘坐地铁时,需要经过地铁闸机才能乘坐地铁,且进出地铁站都需要刷手机上的乘车码。以手机刷支付宝
Figure PCTCN2022075559-appb-000001
乘车码为例,手机运行支付宝
Figure PCTCN2022075559-appb-000002
应用,用户点击支付宝
Figure PCTCN2022075559-appb-000003
界面中的“出行”,并进一步点击“地铁”,手机显示地铁乘车码。这样,用户就可以通过刷手机上显示的地铁乘车码通过地铁闸机。
Among them, take the use of mobile phones to pay for subway fares as an example. When passengers enter the subway station to take the subway, they need to go through the subway gates to take the subway, and they need to swipe the boarding code on their mobile phones when entering and leaving the subway station. Use mobile phone to swipe Alipay
Figure PCTCN2022075559-appb-000001
Take the bus code as an example, the mobile phone runs Alipay
Figure PCTCN2022075559-appb-000002
application, the user clicks Alipay
Figure PCTCN2022075559-appb-000003
Click "Travel" in the interface, and further click "Subway", the mobile phone will display the subway boarding code. In this way, the user can pass the subway gate by swiping the subway boarding code displayed on the mobile phone.
以手机刷微信
Figure PCTCN2022075559-appb-000004
乘车码为例,手机运行微信
Figure PCTCN2022075559-appb-000005
应用,用户点击微信
Figure PCTCN2022075559-appb-000006
界面上的“我”,并进一步点击“卡包”,在手机显示的“卡包”对应界面中点击“交通卡”,并点击“乘车码”。经过这一些列的操作之后,手机显示地铁乘车码。
Use mobile phone to swipe WeChat
Figure PCTCN2022075559-appb-000004
Take the bus code as an example, the mobile phone runs WeChat
Figure PCTCN2022075559-appb-000005
application, the user clicks on WeChat
Figure PCTCN2022075559-appb-000006
Click "Me" on the interface, and then click "Card Packet", click "Transportation Card" in the corresponding interface of "Card Packet" displayed on the mobile phone, and click "Passenger Code". After these series of operations, the mobile phone displays the subway boarding code.
在上述示例中,手机需要经过多步骤操作之后,手机才能够显示出用户需要的界面(即地铁乘车码)。也就是说,这种方式操作相对繁琐。In the above example, the mobile phone needs to go through a multi-step operation before the mobile phone can display the interface required by the user (ie, the subway boarding code). That is to say, this method is relatively cumbersome to operate.
发明内容SUMMARY OF THE INVENTION
本申请提供一种场景识别方法及电子设备,以便简化电子设备的操作,以提升用户体验。The present application provides a scene recognition method and an electronic device, so as to simplify the operation of the electronic device and improve user experience.
为实现上述技术目的,本申请采用如下技术方案:In order to realize the above-mentioned technical purpose, the application adopts the following technical solutions:
第一方面,本申请提供了一种场景识别方法,该方法可以包括:检测到电子设备进入第一区域,在检测到电子设备进入第一区域之后,检测电子设备在第一区域内位于第一位置时第一位置对应的位置标签,位置标签表征电子设备在当前场所中获取到的环境信息,第一位置在第一区域内。电子设备将位置标签与预设位置对应的位置信息进行对比,获取对比结果。需要说明的,预设的位置信息表征电子设备在第一位置的预设场景下的环境信息,预设位置在第一区域内。也就是说,在电子设备获取到位置标签之前,电子设备已经获取到预设的位置信息,且电子设备将第一位置的位置标 签与预设位置对应的位置信息进行对比,可以判断出电子设备当前的第一位置是否为预设位置。In a first aspect, the present application provides a scene recognition method, the method may include: detecting that the electronic device enters the first area, and after detecting that the electronic device enters the first area, detecting that the electronic device is located in the first area in the first area When the location is a location label corresponding to the first location, the location label represents the environmental information acquired by the electronic device in the current location, and the first location is in the first area. The electronic device compares the location label with the location information corresponding to the preset location to obtain a comparison result. It should be noted that the preset position information represents the environmental information of the electronic device in the preset scene of the first position, and the preset position is within the first area. That is to say, before the electronic device obtains the position label, the electronic device has obtained the preset position information, and the electronic device compares the position label of the first position with the position information corresponding to the preset position, and can determine that the electronic device Whether the current first position is the preset position.
如果对比结果表示位置标签与预设位置对应的位置信息相符合,即电子设备当前的第一位置就是预设位置。在没有接收到任何用户操作的情况下,可以触发电子设备自动执行第一位置对应的第一动作,第一动作包括电子设备运行第一应用,并显示第一界面,第一界面中可以包括二维码。其中,第一应用可以实现多个功能,当电子设备运行第一应用,第一应用实现对应的功能,则显示对应的显示界面。如,第一应用可以是电子支付类应用,以第一应用是支付宝
Figure PCTCN2022075559-appb-000007
为例,支付宝
Figure PCTCN2022075559-appb-000008
具有电子支付、电子收款等功能,当电子设备运行支付宝
Figure PCTCN2022075559-appb-000009
应用,实现电子支付和电子收款时,电子设备显示界面是不同的。也就是说,电子设备运行第一应用后,电子设备可能会显示不同功能的界面,此处的第一界面对应第一应用响应第一动作的显示界面。
If the comparison result indicates that the position label matches the position information corresponding to the preset position, that is, the current first position of the electronic device is the preset position. If no user operation is received, the electronic device can be triggered to automatically perform the first action corresponding to the first position. The first action includes the electronic device running the first application and displaying the first interface. The first interface may include two dimensional code. The first application may implement multiple functions, and when the electronic device runs the first application and the first application implements a corresponding function, a corresponding display interface is displayed. For example, the first application may be an electronic payment application, and the first application is Alipay
Figure PCTCN2022075559-appb-000007
For example, Alipay
Figure PCTCN2022075559-appb-000008
With electronic payment, electronic payment and other functions, when the electronic device runs Alipay
Figure PCTCN2022075559-appb-000009
Application, when realizing electronic payment and electronic payment, the display interface of electronic equipment is different. That is, after the electronic device runs the first application, the electronic device may display interfaces with different functions, and the first interface here corresponds to the display interface of the first application responding to the first action.
另外一方面,如果对比结果表示位置标签与预设位置对应的位置信息不相符,则说明电子设备当前的第一位置不是预设位置,电子设备可以不执行第一动作,即电子设备不做出任何响应。On the other hand, if the comparison result indicates that the position label does not match the position information corresponding to the preset position, it means that the current first position of the electronic device is not the preset position, and the electronic device may not perform the first action, that is, the electronic device does not perform the first action. any response.
其中,第一动作与第一位置存在预设逻辑关系。也就是说,电子设备在第一位置下的位置标签与预设的位置信息相符合,电子设备可以自动执行第一动作。预设逻辑关系可以是第一位置与第一动作的强关联规则预设在电子设备中,这样,电子设备在第一位置可以自动执行第一动作。There is a preset logical relationship between the first action and the first position. That is to say, the position label of the electronic device at the first position is consistent with the preset position information, and the electronic device can automatically perform the first action. The preset logical relationship may be that a strong association rule between the first position and the first action is preset in the electronic device, so that the electronic device can automatically execute the first action at the first position.
可以理解的,电子设备处于第一位置,则获取当前位置下的环境信息,以生成位置标签。如果该位置标签与预设的位置信息相符合,说明当前的场景与预设的场景相符合。由于电子设备包括第一位置与第一动作的预设逻辑关系,且当前的场景与预设的场景相符合,则电子设备可以在没有接收到任何用户操作的情况下,执行第一动作。以便简化电子设备的操作,从而提升用户体验。It can be understood that, if the electronic device is in the first position, the environment information in the current position is acquired to generate the position label. If the position label matches the preset position information, it means that the current scene matches the preset scene. Since the electronic device includes a preset logical relationship between the first position and the first action, and the current scene matches the preset scene, the electronic device can execute the first action without receiving any user operation. In order to simplify the operation of the electronic device, thereby improving the user experience.
其中,上述位置标签包括:电子设备采集的全部的第一站点地址、以及每个第一站点地址的信号强度,电子设备获取到第一小区标识、以及每个第一小区标识的信号强度,电子设备获取到的第一卫星信号,和电子设备采集到的第一光照强度中的至少一个。上述预设的位置信息包括:电子设备采集到的全部的第二站点地址、以及每个第二站点地址的信号强度,电子设备获取到的第二小区标识、以及每个第二小区标识的信号强度,电子设备获取到的第二卫星信号,和电子设备采集到的第二光照强度中的至少一个。Wherein, the location label includes: all the first site addresses collected by the electronic device and the signal strength of each first site address, the electronic device obtains the first cell identifier and the signal strength of each first cell identifier, and the electronic device obtains the first cell identifier and the signal strength of each first cell identifier. At least one of the first satellite signal obtained by the device and the first light intensity collected by the electronic device. The above-mentioned preset location information includes: all the second site addresses collected by the electronic device and the signal strength of each second site address, the second cell identifier acquired by the electronic device, and the signal of each second cell identifier Intensity, at least one of the second satellite signal obtained by the electronic device and the second light intensity collected by the electronic device.
第一方面的一种可能的设计方式中,该方法还可以包括:在检测到电子设备进入第一区域之后,检测电子设备在第一区域内位于第一位置时第一位置对应的位置标签之前,电子设备还可以执行的操作包括:检测到电子设备进入第一区域之后,确定电子设备处于第一区域内的预设位置。获取电子设备执行第一事件的置信度,置信度表征用户操作触发执行第一事件的执行程度,其中,第一事件与第一位置存在预设逻辑关系,第一事件与第一动作有关系,电子设备执行第一事件时运行第一应用。In a possible design of the first aspect, the method may further include: after detecting that the electronic device enters the first area, detecting that the electronic device is located at the first position in the first area before the position label corresponding to the first position , the electronic device may further perform operations including: after detecting that the electronic device enters the first area, determining that the electronic device is in a preset position in the first area. Obtaining the confidence level of the electronic device executing the first event, the confidence level representing the execution degree of the user operation triggering the execution of the first event, wherein the first event and the first position have a preset logical relationship, and the first event has a relationship with the first action, The electronic device executes the first application when the first event is executed.
进一步的,当置信度表征第一事件执行结束,电子设备可以获取第一事件的执行结果,并对执行结果进行校验,以得到校验结果。如果校验结果表征第一事件执行成功,获取电子设备所在预设位置对应的位置标签,并向云端服务器传输位置标签,使 得云端服务器可以根据位置标签生成预设位置对应的位置信息。其中,位置标签表征电子设备在当前场所中获取到的环境信息。Further, when the confidence level indicates that the execution of the first event is completed, the electronic device may obtain the execution result of the first event, and verify the execution result to obtain the verification result. If the verification result indicates that the first event is successfully executed, the position label corresponding to the preset position of the electronic device is obtained, and the position label is transmitted to the cloud server, so that the cloud server can generate the position information corresponding to the preset position according to the position label. The location tag represents the environmental information acquired by the electronic device in the current location.
需要说明的,第一事件是响应于用户操作,电子设备运行第一应用,以实现对应的功能。第一动作是电子设备确定位置标签与预设的位置信息相符合,自动执行的动作。其中,第一动作是电子设备自动执行的,第一事件是响应于用户操作,电子设备执行的动作。如,第一动作是电子设备实现显示乘车码的功能,电子设备确定位置标签与预设的位置信息相符合,自动运行第一应用,显示第一界面,即电子设备显示包括乘车码二维码的界面。当电子设备处于第一位置,电子设备接收到用户操作,响应于用户操作电子设备运行第一应用,显示第一界面。另外,第一事件的置信度是表征第一事件的执行程度,即电子设备开始运行第一应用,显示第一界面,则第一事件的置信度表示第一事件开始执行;当电子设备在用户的操作下靠近地铁闸机的扫码口,使得用户通过地铁闸机,则第一事件的置信度表示第一事件执行完成。It should be noted that the first event is that in response to a user operation, the electronic device runs the first application to implement the corresponding function. The first action is an action performed automatically by the electronic device after determining that the location tag matches the preset location information. The first action is automatically performed by the electronic device, and the first event is an action performed by the electronic device in response to a user operation. For example, the first action is that the electronic device realizes the function of displaying the boarding code, the electronic device determines that the location label matches the preset location information, automatically runs the first application, and displays the first interface, that is, the electronic device displays the boarding code 2 QR code interface. When the electronic device is in the first position, the electronic device receives a user operation, runs the first application in response to the user operating the electronic device, and displays the first interface. In addition, the confidence level of the first event represents the execution degree of the first event, that is, the electronic device starts to run the first application and displays the first interface, then the confidence level of the first event indicates that the execution of the first event starts; Under the operation of , it is close to the scanning port of the subway gate, so that the user passes through the subway gate, and the confidence level of the first event indicates that the execution of the first event is completed.
第一方面另一种可能的设计方式中,该方法还可以包括:在检测到电子设备进入第一区域之后,检测电子设备在第一区域内位于第一位置时第一位置对应的位置标签之前,电子设备还可以执行的操作包括:检测到电子设备进入第一区域之后,确定电子设备处于第一区域内的预设位置。获取电子设备执行第一事件的置信度,置信度表征用户操作触发执行第一事件的执行程度,其中,第一事件与第一位置存在预设逻辑关系,第一事件与第一动作有关系,电子设备执行第一事件时运行第一应用。In another possible design manner of the first aspect, the method may further include: after detecting that the electronic device enters the first area, detecting that the electronic device is located at the first position in the first area before the position label corresponding to the first position , the electronic device may further perform operations including: after detecting that the electronic device enters the first area, determining that the electronic device is in a preset position in the first area. Obtaining the confidence level of the electronic device executing the first event, the confidence level representing the execution degree of the user operation triggering the execution of the first event, wherein the first event and the first position have a preset logical relationship, and the first event has a relationship with the first action, The electronic device executes the first application when the first event is executed.
进一步的,当置信度表征第一事件执行结束,电子设备可以获取第一事件的执行结果,并对执行结果进行校验,以得到校验结果。如果校验结果表征第一事件执行成功,获取电子设备在预设位置对应的位置标签,电子设备可以根据位置标签生成预设位置对应的位置信息。其中,位置标签表征电子设备在当前场所中获取到的环境信息。Further, when the confidence level indicates that the execution of the first event is completed, the electronic device may obtain the execution result of the first event, and verify the execution result to obtain the verification result. If the verification result indicates that the first event is successfully executed, a position label corresponding to the preset position of the electronic device is obtained, and the electronic device can generate position information corresponding to the preset position according to the position label. The location tag represents the environmental information acquired by the electronic device in the current location.
可以理解的,电子设备根据第一事件采集得到,电子设备在用户操作下执行第一事件的当前场所的环境信息。一方面,电子设备可以向云端服务器传输得到的环境信息,以使得云端服务器生成预设的环境信息。另一方面,电子设备可以自行根据该环境信息生成预设的环境信息。It can be understood that the electronic device collects and obtains the environmental information of the current place where the electronic device executes the first event under the operation of the user according to the first event. On the one hand, the electronic device can transmit the obtained environmental information to the cloud server, so that the cloud server generates preset environmental information. On the other hand, the electronic device can generate preset environmental information according to the environmental information by itself.
第一方面另一种可能的设计方式中,上述在将位置标签与预设位置对应的位置信息进行对比,获取对比结果之前,电子设备还可以获取电子设备在预设位置对应的位置信息。In another possible design method of the first aspect, the electronic device may also obtain the position information corresponding to the preset position of the electronic device before comparing the position label with the position information corresponding to the preset position and obtaining the comparison result.
其中,电子设备在处于预设位置时,就可以先获取位置信息。这样,电子设备就可以根据当前获取到的位置标签,以对比位置标签与预设的位置信息是否相符,以确定电子设备是否位于第一区域中的预设位置,从而决定是否自动执行第一动作。Wherein, when the electronic device is in a preset position, the position information can be obtained first. In this way, the electronic device can compare whether the position label is consistent with the preset position information according to the currently obtained position label, so as to determine whether the electronic device is located at the preset position in the first area, so as to decide whether to automatically execute the first action. .
第一方面另一种可能的设计方式中,上述当置信度表征第一事件执行结束,具体包括:在电子设备获取到置信度之后,如果确定置信度大于第一预设阈值,且小于或等于第二预设阈值,则可以确定电子设备开始执行第一事件;如果置信度大于第二预设阈值,确定电子设备执行完成第一事件。其中,所述第一预设阈值小于所述第二预设阈值。In another possible design manner of the first aspect, the above-mentioned when the confidence level indicates that the execution of the first event ends, specifically includes: after the electronic device obtains the confidence level, if the confidence level is determined to be greater than the first preset threshold and less than or equal to With the second preset threshold, it can be determined that the electronic device starts to execute the first event; if the confidence level is greater than the second preset threshold, it is determined that the electronic device has completed executing the first event. Wherein, the first preset threshold is smaller than the second preset threshold.
可以理解的,电子设备在响应于用户操作,执行第一事件的情况下,电子设备可以实时获取第一事件的置信度,以使得电子设备根据置信度确定第一事件的执行状态。 其中,置信度可以表征第一事件开始执行,执行完成,或者执行失败等。It can be understood that when the electronic device executes the first event in response to the user operation, the electronic device can acquire the confidence level of the first event in real time, so that the electronic device can determine the execution state of the first event according to the confidence level. The confidence level may represent that the first event starts to be executed, the execution is completed, or the execution fails.
第一方面另一种可能的设计方式中,上述执行结果包括电子设备当前的显示界面。In another possible design manner of the first aspect, the above execution result includes the current display interface of the electronic device.
可以理解的,电子设备执行第一事件,可以基于用户操作显示对应的界面。因此,电子设备可以通过获取当前的显示界面判断第一事件的执行结果。或者说,电子设备可以通过实时获取当前的显示界面,电子设备可以根据该显示界面确定第一事件的置信度。It can be understood that when the electronic device executes the first event, a corresponding interface can be displayed based on the user operation. Therefore, the electronic device can determine the execution result of the first event by acquiring the current display interface. In other words, the electronic device may acquire the current display interface in real time, and the electronic device may determine the confidence level of the first event according to the display interface.
第一方面另一种可能的设计方式中,如果上述位置标签包括:电子设备采集的全部的第一站点地址、以及每个第一站点地址的信号强度,和电子设备获取到的第一小区标识、以及第一小区标识的信号强度。In another possible design manner of the first aspect, if the location label includes: all the first site addresses collected by the electronic device, the signal strength of each first site address, and the first cell identifier obtained by the electronic device. , and the signal strength of the first cell identifier.
那么电子设备将位置标签与第一位置预设的位置信息进行对比,获取对比结果,具体包括:基于位置标签生成包括第一站点和第一小区标识的第一项集;基于预设的位置信息生成第二站点和第二小区标识的第二项集;根据第一项集和第二项集,计算得到位置标签与预设的位置信息的对比结果。Then the electronic device compares the location label with the preset location information of the first location, and obtains the comparison result, which specifically includes: generating a first item set including the identifier of the first site and the first cell based on the location label; based on the preset location information A second item set of the identifiers of the second site and the second cell is generated; according to the first item set and the second item set, a comparison result between the position label and the preset position information is obtained by calculation.
其中,电子设备可以根据预设的运算关系计算得到位置标签与预设的位置信息的对比结果。Wherein, the electronic device can calculate and obtain the comparison result of the position label and the preset position information according to the preset operation relationship.
第一方面另一种可能的设计方式中,如果第一动作是涉及扫电子设备显示的二维码通过地铁闸机乘坐地铁的场景,则二维码为地铁乘车码或健康状况相关的二维码(如表示是否有打过疫苗的二维码或表示健康检测结果的二维码)。如果第一动作是涉及扫电子设备显示的二维码乘坐公交车辆,则二维码可以是公交乘车码。In another possible design method of the first aspect, if the first action involves scanning the QR code displayed by the electronic device to take the subway through the subway gate, the QR code is the subway boarding code or a health-related 2-dimensional code. QR code (such as a QR code indicating whether you have been vaccinated or a QR code indicating health test results). If the first action involves scanning a two-dimensional code displayed by the electronic device to take a bus, the two-dimensional code may be a bus ride code.
第一方面另一种可能的设计方式中,上述获取电子设备执行第一事件的置信度之前,该方法还可以包括:电子设备响应于用户操作,开始执行第一事件。In another possible design manner of the first aspect, before obtaining the confidence of the electronic device executing the first event, the method may further include: the electronic device starts executing the first event in response to a user operation.
第一方面另一种可能的设计方式中,当电子设备响应于用户操作执行第一事件,具体包括:电子设备接收到用户输入的第一操作,第一操作用于指示电子设备运行第一应用。响应于第一操作,电子设备运行第一应用,并显示第一界面,其中,第一界面包括二维码,该二维码为地铁乘车码。电子设备接收到用户的握翻操作,响应于该握翻操作,使得电子设备的显示屏正对地铁闸机的刷码口。In another possible design manner of the first aspect, when the electronic device executes the first event in response to the user operation, it specifically includes: the electronic device receives a first operation input by the user, and the first operation is used to instruct the electronic device to run the first application . In response to the first operation, the electronic device runs the first application and displays a first interface, wherein the first interface includes a two-dimensional code, and the two-dimensional code is a subway boarding code. The electronic device receives the user's flipping operation, and in response to the flipping operation, the display screen of the electronic device faces the code swiping port of the subway gate.
其中,上述以第一事件是地铁站刷码为例,具体说明第一事件。Among them, the above-mentioned first event is taken as an example of swiping code at a subway station, and the first event is described in detail.
第一方面另一种可能的设计方式中,上述获取电子设备执行第一事件的置信度,具体包括:响应于第一操作,电子设备运行第一应用,并显示第一界面之后,电子设备获取第一界面。进一步的,电子设备识别第一界面,得到第一识别结果,电子设备可以根据第一识别结果确定第一事件的置信度。并且,电子设备可以继续在每间隔第一预设时长之后,就获取一次电子设备当前的显示界面,并根据当前的显示界面确定第一事件的置信度。In another possible design manner of the first aspect, obtaining the confidence of the electronic device executing the first event specifically includes: in response to the first operation, the electronic device runs the first application and displays the first interface, and then the electronic device obtains first interface. Further, the electronic device recognizes the first interface to obtain a first recognition result, and the electronic device can determine the confidence level of the first event according to the first recognition result. Moreover, the electronic device may continue to acquire the current display interface of the electronic device once every first preset time period, and determine the confidence level of the first event according to the current display interface.
第一方面另一种可能的设计方式中,上述获取电子设备执行第一事件的置信度,具体包括:电子设备接收到用户的握翻操作之后,经过第二预设时长,电子设备获取当前的显示界面。并且识别当前的显示界面,得到第二识别结果,电子设备根据第二识别结果确定第一世家的置信度。In another possible design method of the first aspect, the above-mentioned obtaining the confidence level of the electronic device executing the first event specifically includes: after the electronic device receives the user's grip and flip operation, after a second preset time period, the electronic device obtains the current UI. And the current display interface is identified to obtain a second identification result, and the electronic device determines the confidence level of the first family according to the second identification result.
第二方面,本申请还提供一种电子设备,包括:检测模块、对比模块和执行模块。In a second aspect, the present application further provides an electronic device, including: a detection module, a comparison module and an execution module.
检测模块用于,检测到电子设备进入第一区域,在检测到电子设备进入第一区域 之后,检测电子设备在第一区域内位于第一位置时第一位置对应的位置标签,位置标签表征电子设备在当前场所中获取到的环境信息,第一位置在第一区域内。对比模块用于,将位置标签与预设位置对应的位置信息进行对比,获取对比结果。需要说明的,预设的位置信息表征电子设备在第一位置的预设场景下的环境信息,预设位置在第一区域内。需要说明的,预设的位置信息表征电子设备在第一位置的预设场景下的环境信息。执行模块用于,如果对比结果表示位置标签与预设的位置信息相符合,在没有接收到任何用户操作的情况下,可以触发电子设备自动执行第一位置对应的第一动作,第一动作包括电子设备运行第一应用,并显示第一界面,第一界面中可以包括二维码。The detection module is used to detect that the electronic device enters the first area, and after detecting that the electronic device enters the first area, to detect the position label corresponding to the first position when the electronic device is located at the first position in the first area, and the position label represents the electronic device. The environmental information obtained by the device in the current location, and the first location is within the first area. The comparison module is used to compare the position label with the position information corresponding to the preset position to obtain a comparison result. It should be noted that the preset position information represents the environmental information of the electronic device in the preset scene of the first position, and the preset position is within the first area. It should be noted that the preset location information represents the environmental information of the electronic device in the preset scene of the first location. The execution module is used to trigger the electronic device to automatically execute the first action corresponding to the first position without receiving any user operation if the comparison result indicates that the position label is consistent with the preset position information, and the first action includes The electronic device runs the first application and displays a first interface, where the first interface may include a two-dimensional code.
第二方面的一种可能的设计方式中,电子设备还可以包括:确定模块和响应模块。In a possible design manner of the second aspect, the electronic device may further include: a determination module and a response module.
确定模块用于,检测到电子设备进入第一区域之后,确定电子设备处于第一区域内的预设位置。响应模块用于,获取电子设备执行第一事件的置信度,置信度表征用户操作触发执行第一事件的执行程度,其中,第一事件与第一位置存在预设逻辑关系,第一事件与第一动作有关系,电子设备执行第一事件时运行第一应用。The determining module is configured to, after detecting that the electronic device enters the first area, determine that the electronic device is in a preset position in the first area. The response module is used to obtain the confidence level of the electronic device executing the first event, and the confidence level represents the execution level of the user operation triggering the execution of the first event, wherein the first event and the first position have a preset logical relationship, and the first event and the first event have a preset logical relationship. An action is related, and the electronic device runs the first application when the first event is executed.
其中,置信度表征用户操作触发执行第一事件的执行程度,其中,第一事件与第一位置存在预设逻辑关系,第一事件与第一动作有关系,电子设备执行第一事件时运行第一应用。当电子设备根据第一事件的置信度确定开始执行第一事件,电子设备可以获取第一事件的执行结果,并对执行结果进行校验,以得到校验结果。如果校验结果表征第一事件执行成功,获取第一位置对应的位置标签,并向云端服务器传输位置标签,使得云端服务器可以根据位置标签生成预设的位置信息。其中,位置标签表征电子设备在当前场所中获取到的环境信息。The confidence level represents the execution degree of the user operation triggering the execution of the first event, wherein the first event has a preset logical relationship with the first position, the first event has a relationship with the first action, and the electronic device executes the first event when the electronic device executes the first event. an application. When the electronic device determines to start executing the first event according to the confidence of the first event, the electronic device can obtain the execution result of the first event, and verify the execution result to obtain the verification result. If the verification result indicates that the first event is successfully executed, a location label corresponding to the first location is obtained, and the location label is transmitted to the cloud server, so that the cloud server can generate preset location information according to the location label. The location tag represents the environmental information acquired by the electronic device in the current location.
第二方面另一种可能的设计方式中,电子设备还可以包括:确定模块和响应模块。In another possible design manner of the second aspect, the electronic device may further include: a determination module and a response module.
确定模块用于,检测到电子设备进入第一区域之后,确定电子设备处于第一区域内的预设位置。响应模块用于,获取电子设备执行第一事件的置信度,置信度表征用户操作触发执行第一事件的执行程度,其中,第一事件与第一位置存在预设逻辑关系,第一事件与第一动作有关系,电子设备执行第一事件时运行第一应用。当电子设备根据第一事件的置信度确定开始执行第一事件,电子设备可以获取第一事件的执行结果,并对执行结果进行校验,以得到校验结果。如果校验结果表征第一事件执行成功,获取第一位置对应的位置标签,电子设备可以根据位置标签生成预设的位置信息。其中,位置标签表征电子设备在当前场所中获取到的环境信息。The determining module is configured to, after detecting that the electronic device enters the first area, determine that the electronic device is in a preset position in the first area. The response module is used to obtain the confidence level of the electronic device executing the first event, and the confidence level represents the execution level of the user operation triggering the execution of the first event, wherein the first event and the first position have a preset logical relationship, and the first event and the first event have a preset logical relationship. An action is related, and the electronic device runs the first application when the first event is executed. When the electronic device determines to start executing the first event according to the confidence of the first event, the electronic device can obtain the execution result of the first event, and verify the execution result to obtain the verification result. If the verification result indicates that the first event is successfully executed, a location label corresponding to the first location is obtained, and the electronic device can generate preset location information according to the location label. The location tag represents the environmental information acquired by the electronic device in the current location.
第二方面另一种可能的设计方式中,电子设备位于第一位置,获取第一位置对应的位置标签,位置标签表征电子设备在当前场所中获取到的环境信息之前,电子设备还可以获取电子设备在第一位置预设的位置信息。In another possible design method of the second aspect, the electronic device is located at the first position, and the position label corresponding to the first position is obtained. The position label represents the environmental information obtained by the electronic device in the current place, and the electronic device can also obtain electronic equipment. The preset location information of the device at the first location.
第二方面另一种可能的设计方式中,在电子设备获取到置信度之后,如果确定置信度大于第一预设阈值,且小于或等于第二预设阈值,则可以确定电子设备开始执行第一事件;如果置信度大于第二预设阈值,确定电子设备执行完成第一事件。其中,所述第一预设阈值小于所述第二预设阈值。In another possible design manner of the second aspect, after the electronic device obtains the confidence level, if it is determined that the confidence level is greater than the first preset threshold and less than or equal to the second preset threshold, it may be determined that the electronic device starts to execute the first an event; if the confidence level is greater than the second preset threshold, it is determined that the electronic device has completed the execution of the first event. Wherein, the first preset threshold is smaller than the second preset threshold.
第二方面另一种可能的设计方式中,上述执行结果包括电子设备当前的显示界面。In another possible design manner of the second aspect, the above execution result includes the current display interface of the electronic device.
第二方面另一种可能的设计方式中,如果上述位置标签包括:电子设备采集的全部的第一站点地址、以及每个第一站点地址的信号强度,和电子设备获取到的第一小 区标识、以及第一小区标识的信号强度。In another possible design manner of the second aspect, if the location label includes: all the first site addresses collected by the electronic device, the signal strength of each first site address, and the first cell identifier obtained by the electronic device , and the signal strength of the first cell identifier.
那么电子设备将位置标签与第一位置预设的位置信息进行对比,获取对比结果,具体包括:基于位置标签生成包括第一站点和第一小区标识的第一项集;基于预设的位置信息生成第二站点和第二小区标识的第二项集;根据第一项集和第二项集,计算得到位置标签与预设的位置信息的对比结果。Then the electronic device compares the location label with the preset location information of the first location, and obtains the comparison result, which specifically includes: generating a first item set including the identifier of the first site and the first cell based on the location label; based on the preset location information A second item set of the identifiers of the second site and the second cell is generated; according to the first item set and the second item set, a comparison result between the position label and the preset position information is obtained by calculation.
第二方面另一种可能的设计方式中,如果第一动作是电子设备具有通过地铁闸机,则二维码为地铁乘车码。如果第一动作是电子设备具有通过公交车辆,则二维码可以是公交乘车码。In another possible design manner of the second aspect, if the first action is that the electronic device has a subway gate, the two-dimensional code is the subway boarding code. If the first action is that the electronic device has a passing bus vehicle, the two-dimensional code may be a bus ride code.
第二方面另一种可能的设计方式中,上述获取电子设备执行第一事件的置信度之前,该方法还可以包括:电子设备响应于用户操作,开始执行第一事件。In another possible design manner of the second aspect, before obtaining the confidence of the electronic device executing the first event, the method may further include: the electronic device starts executing the first event in response to a user operation.
第二方面另一种可能的设计方式中,电子设备具体用于:电子设备接收到用户输入的第一操作,第一操作用于指示电子设备运行第一应用。响应于第一操作,电子设备运行第一应用,并显示第一界面,其中,第一界面包括二维码,该二维码为地铁乘车码。电子设备接收到用户的握翻操作,响应于该握翻操作,使得电子设备的显示屏正对地铁闸机的刷码口。In another possible design manner of the second aspect, the electronic device is specifically configured to: the electronic device receives a first operation input by a user, and the first operation is used to instruct the electronic device to run the first application. In response to the first operation, the electronic device runs the first application and displays a first interface, wherein the first interface includes a two-dimensional code, and the two-dimensional code is a subway boarding code. The electronic device receives the user's flipping operation, and in response to the flipping operation, the display screen of the electronic device faces the code swiping port of the subway gate.
其中,上述以第一事件是地铁站刷码为例,具体说明第一事件。Among them, the above-mentioned first event is taken as an example of swiping code at a subway station, and the first event is described in detail.
第二方面另一种可能的设计方式中,电子设备具体用于:响应于第一操作,电子设备运行第一应用,并显示第一界面之后,电子设备获取第一界面。进一步的,电子设备识别第一界面,得到第一识别结果,电子设备可以根据第一识别结果确定第一事件的置信度。并且,电子设备可以继续在每间隔第一预设时长之后,就获取一次电子设备当前的显示界面,并根据当前的显示界面确定第一事件的置信度。In another possible design manner of the second aspect, the electronic device is specifically configured to: in response to the first operation, the electronic device runs the first application, and after displaying the first interface, the electronic device acquires the first interface. Further, the electronic device recognizes the first interface to obtain a first recognition result, and the electronic device can determine the confidence level of the first event according to the first recognition result. Moreover, the electronic device may continue to acquire the current display interface of the electronic device once every first preset time period, and determine the confidence level of the first event according to the current display interface.
第二方面另一种可能的设计方式中,电子设备具体用于:电子设备接收到用户的握翻操作之后,经过第二预设时长,电子设备获取当前的显示界面。并且识别当前的显示界面,得到第二识别结果,电子设备根据第二识别结果确定第一事件的置信度。In another possible design manner of the second aspect, the electronic device is specifically configured to: after the electronic device receives the user's grip and flip operation, the electronic device obtains the current display interface after a second preset time period. And the current display interface is identified to obtain a second identification result, and the electronic device determines the confidence level of the first event according to the second identification result.
第三方面,本申请还提供一种电子设备,包括:一个或多个处理器;存储器;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被电子设备执行时,使得电子设备执行上述第一方面及其任一种可能的设计方式中的方法。In a third aspect, the present application also provides an electronic device, comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs The program includes instructions that, when executed by the electronic device, cause the electronic device to execute the method in the first aspect and any possible design manners thereof.
第四方面,本申请还提供一种计算机可读存储介质,其特征在于,包括计算机指令,当计算机指令在计算机上运行时,使得计算机执行第一方面及其任一种可能的设计方式中的方法。In a fourth aspect, the present application also provides a computer-readable storage medium, which is characterized by comprising computer instructions, when the computer instructions are run on a computer, the computer is made to execute the first aspect and any possible design methods thereof. method.
第五方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述第一方面及其任一种可能的设计中电子设备执行的方法。In a fifth aspect, an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, enables the computer to execute the method for executing the electronic device in the first aspect and any possible design thereof.
第六方面,本申请实施例提供了一种芯片系统,该芯片系统应用于电子设备。该芯片系统包括一个或多个接口电路和一个或多个处理器;接口电路和处理器通过线路互联;接口电路用于从电子设备的存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令;当处理器执行计算机指令时,使得电子设备执行上述第一方面及其任一种可能的设计中的方法。In a sixth aspect, an embodiment of the present application provides a chip system, and the chip system is applied to an electronic device. The chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the interface circuit is used for receiving signals from the memory of the electronic device and sending signals to the processor, and the signals are included in the memory Stored computer instructions; when the processor executes the computer instructions, it causes the electronic device to perform the method in the first aspect and any possible designs thereof.
可以理解的是,上述本申请提供的第二方面的电子设备,第三方面的电子设备,第四方面的计算机可读存储介质,第五方面的计算机程序产品和第六方面的芯片系统所能达到的有益效果,可参考如第一方面及其任一种可能的设计方式中的有益效果,此处不再赘述。It can be understood that the electronic device of the second aspect, the electronic device of the third aspect, the computer-readable storage medium of the fourth aspect, the computer program product of the fifth aspect, and the chip system of the sixth aspect can be For the beneficial effects achieved, reference may be made to the beneficial effects in the first aspect and any possible design manners thereof, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的一种电子设备的硬件结构示意图;1 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application;
图2为本申请实施例提供的一种场景识别方法的流程图;2 is a flowchart of a scene recognition method provided by an embodiment of the present application;
图3A为本申请实施例提供的一种云端服务器数据挖掘流程示意图;3A is a schematic flowchart of a cloud server data mining process provided by an embodiment of the present application;
图3B为本申请实施例提供的一种云端服务器删除指纹特征的流程示意图;3B is a schematic flowchart of a cloud server deleting a fingerprint feature according to an embodiment of the present application;
图4为本申请实施例提供的另一场景识别方法的流程图;4 is a flowchart of another scene recognition method provided by an embodiment of the present application;
图5为本申请实施例提供的另一场景识别方法的流程图;5 is a flowchart of another scene recognition method provided by an embodiment of the present application;
图6为本申请实施例提供的一种场景识别方法的应用场景示意图;6 is a schematic diagram of an application scenario of a scene recognition method provided by an embodiment of the present application;
图7为本申请实施例提供的一种芯片系统的结构示意图。FIG. 7 is a schematic structural diagram of a chip system according to an embodiment of the present application.
具体实施方式Detailed ways
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may expressly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
对于具有NFC功能的手机而言,手机可以生成数字门禁卡。而且,手机中可以保存多个数字门禁卡,如,公司门禁卡、小区门禁卡等。这样,当用户需要使用到手机NFC功能时,用户需要在手机上选择正确的门禁卡。手机显示公司门禁卡的数字门禁卡时,使得用户可以通过公司的门禁;手机显示小区门禁卡的数字门禁时,使得用户可以通过小区的门禁。For NFC-enabled phones, the phone can generate digital access cards. Moreover, multiple digital access cards can be stored in the mobile phone, such as company access cards, community access cards, etc. In this way, when the user needs to use the NFC function of the mobile phone, the user needs to select the correct access control card on the mobile phone. When the mobile phone displays the digital access control card of the company access control card, the user can pass the company's access control; when the mobile phone displays the digital access control card of the community access control card, the user can pass the residential access control.
具体地说,手机中存储有“家的门禁卡”和“公司的门禁卡”两个NFC卡片。当用户位于公司门口,需要通过公司门禁时,用户使用手机的NFC功能,用户选择手机上“公司的门禁卡”,则手机就可以被当做门禁卡使用。用户将将手机靠近门禁机,门禁机被触发,使得用户可以通过公司门禁。Specifically, the mobile phone stores two NFC cards, "home access control card" and "company access control card". When the user is at the door of the company and needs to pass the company's access control, the user uses the NFC function of the mobile phone, and the user selects the "company access control card" on the mobile phone, and the mobile phone can be used as an access control card. The user will bring the mobile phone close to the access control machine, and the access control machine is triggered, allowing the user to pass the company's access control.
上述操作较为繁琐,为了简化操作,提升用户体验。在一种可能的实现中,手机可以采用地理围栏,建立NFC卡片与地理位置的对应关系。如,采集用户使用“家的门禁卡”时的位置信息(如,第一地点),并建立对应关系。当手机检测到用户再次到达第一地点,检测到用户触发NFC功能,则手机显示“家的门禁卡”这一NFC卡片。The above operations are relatively cumbersome, in order to simplify the operations and improve the user experience. In a possible implementation, the mobile phone may use a geo-fence to establish a corresponding relationship between the NFC card and the geographic location. For example, the location information (eg, the first location) when the user uses the "home access control card" is collected, and a corresponding relationship is established. When the mobile phone detects that the user has reached the first place again, and detects that the user triggers the NFC function, the mobile phone displays the NFC card of "home access control card".
可以理解的,这种方式可以在简化用户选择NFC卡片的步骤,但是,在公司或家以外的其他地址,则无法适应性切换NFC卡片。It can be understood that this method can simplify the steps for the user to select the NFC card, but at other addresses than the company or home, the NFC card cannot be switched adaptively.
在另一种可能的实现中,手机可以获取用户的位置信息,如果手机检测到用户位于地铁站,手机可以显示地铁乘车码。以便用户使用乘车码通过地铁闸机,以简化用户操作。可以理解的,这种方式是依据手机当前的位置信息,为用户提供与该位置信息相关的服务(显示乘车码)。但是,地铁站是一个较为广泛的地点,用户位于地铁站时,用户可能并没有靠近地铁闸机;或者,用户在地铁站附近,并未进入地铁站内;也就是说,这种方式不能准确识别到地铁闸机位置,也无法确定用户是否需要手机提 供显示乘车码的服务。如果用户并没有靠近地铁闸机,且并未想要通过地铁闸机,手机就显示地铁乘车码,这种方式虽然简化了操作步骤,却并未提供给用户良好体验感。In another possible implementation, the mobile phone can acquire the user's location information, and if the mobile phone detects that the user is located at a subway station, the mobile phone can display the subway boarding code. So that users can use the bus code to pass through the subway gates to simplify user operations. It can be understood that this method is based on the current location information of the mobile phone to provide the user with a service related to the location information (display the bus code). However, the subway station is a relatively extensive location. When the user is located in the subway station, the user may not be close to the subway gate; or, the user is near the subway station and has not entered the subway station; that is, this method cannot accurately identify At the location of the subway gate, it is impossible to determine whether the user needs the mobile phone to provide the service of displaying the bus code. If the user is not close to the subway gate and does not want to pass the subway gate, the mobile phone will display the subway boarding code. Although this method simplifies the operation steps, it does not provide the user with a good experience.
本申请实施例提供一种场景识别方法及电子设备,以手机实施场景识别方法为例,手机可以识别当前的场景,以便手机根据当前的场景为用户提供对应的服务。例如,手机确定当前位置信息为地铁站,且靠近地铁闸机,则手机显示地铁乘车码。又如,手机检测到当前位置信息为小区门口,且手机靠近小区门禁机,则手机显示“家的门禁”这一NFC卡片。Embodiments of the present application provide a scene recognition method and electronic device. Taking the implementation of the scene recognition method on a mobile phone as an example, the mobile phone can identify the current scene, so that the mobile phone can provide the user with corresponding services according to the current scene. For example, if the mobile phone determines that the current location information is a subway station and it is close to the subway gate, the mobile phone displays the subway boarding code. For another example, if the mobile phone detects that the current location information is the door of the community, and the mobile phone is close to the access control machine of the community, the mobile phone displays the NFC card of "Access Control of Home".
具体地说,手机可以通过多个传感器等,识别到当前的场景信息,并检测到当前的场景信息与手机提供的服务的相关性。这样,当手机再次检测到处于当前的场景,则手机显示该服务。Specifically, the mobile phone can identify the current scene information through multiple sensors, etc., and detect the correlation between the current scene information and the service provided by the mobile phone. In this way, when the mobile phone detects the current scene again, the mobile phone displays the service.
如,手机在采集信息时,多次采集到的场景信息:手机处于地铁站,且靠近地铁闸机时;此时,手机基于用户操作,显示地铁二维码。手机生成场景信息与该操作的关系,当手机在下一次处于当前的场景(即处于地铁站,且靠近地铁闸机),手机显示地铁二维码。For example, when the mobile phone collects information, the scene information collected many times: when the mobile phone is in the subway station and close to the subway gate; at this time, the mobile phone displays the subway QR code based on the user operation. The relationship between the scene information generated by the mobile phone and the operation, when the mobile phone is in the current scene next time (that is, in the subway station and close to the subway gate), the mobile phone displays the subway QR code.
又如,手机在采集信息时,多次采集到的场景信息为:手机位于咖啡店,且手机靠近收银台位置;此时,手机基于用户操作,显示咖啡店会员卡。那么,手机生成场景信息与该操作的关系,当手机再次处于当前的场景(即位于咖啡店,且手机靠近收银台位置),手机显示咖啡店会员卡。For another example, when the mobile phone collects information, the scene information collected many times is: the mobile phone is located in a coffee shop, and the mobile phone is close to the cashier position; at this time, the mobile phone displays the coffee shop membership card based on user operations. Then, the mobile phone generates the relationship between the scene information and the operation. When the mobile phone is in the current scene again (that is, in the coffee shop, and the mobile phone is close to the cashier position), the mobile phone displays the coffee shop membership card.
下面将结合附图对本申请实施例的实施方式进行详细描述。The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
请参考图1,为本申请实施例提供的一种电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,NFC芯片模块170,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Please refer to FIG. 1 , which is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, NFC chip module 170, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and user identification module (subscriber identification module, SIM) card interface 195 et al. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
电子设备100可以通过NFC芯片模块170,以及应用处理器实现NFC功能。其中,NFC芯片模块170的工作模式包括:The electronic device 100 can implement the NFC function through the NFC chip module 170 and the application processor. The working modes of the NFC chip module 170 include:
点对点模式:可在两个具备NFC功能的设备上进行数据交换,如交换音乐、传送文件等。使用此模式需要两台设备均具备NFC功能,NFC文件传输基本属于被遗弃的传输方式,因为NFC传输速度非常慢,通常只用来在手机间传递单个联系人,网址等信息量很小的数据,所以日常中使用场景较少。Peer-to-peer mode: Data exchange can be performed between two NFC-enabled devices, such as exchanging music, transferring files, etc. Using this mode requires both devices to have the NFC function. NFC file transfer is basically an abandoned transmission method, because the NFC transmission speed is very slow, and it is usually only used to transfer data with a small amount of information such as a single contact and website between mobile phones. , so there are fewer scenes used in daily life.
读卡器模式:可作为非接触读卡器使用。能够从电子标签上读取或写入信息,但 由于市场上NFC电子标签未能大面积使用,所以消费者更多是通过此模式给实体公交卡进行充值,但是随着虚拟公交卡功能的逐步实现,人们对实体公交卡的依赖会越来越弱,集成到手机里的虚拟公交卡服务会更加方便。Card Reader Mode: Can be used as a contactless card reader. Can read or write information from electronic tags, but because NFC electronic tags on the market are not widely used, consumers mostly recharge physical bus cards through this mode, but with the gradual development of virtual bus card functions Realization, people's reliance on the physical bus card will become weaker and weaker, and the virtual bus card service integrated into the mobile phone will be more convenient.
卡模拟模式:其实就是相当于一张配备了NFC功能的手机替代大量的实体IC卡(公交卡、信用卡等)使用场景,实现移动支付功能。Card simulation mode: In fact, it is equivalent to a mobile phone equipped with NFC function to replace a large number of physical IC cards (bus cards, credit cards, etc.) usage scenarios to realize mobile payment function.
需要说明的,本申请实施例中的电子设备可以是具备NFC功能的手机、智能手表、智能手环、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等包括触摸屏的设备,以及该电子设备可以对设备进行控制,本申请实施例对该电子设备的具体形态不作特殊限制。It should be noted that the electronic devices in the embodiments of the present application may be mobile phones, smart watches, smart bracelets, tablet computers, desktops, laptops, handheld computers, notebook computers, and ultra-mobile personal computers (ultra-mobile personal computers) with NFC functions. mobile personal computer, UMPC), netbooks, and devices including touch screens, such as cellular phones, personal digital assistants (PDAs), augmented reality (AR)\virtual reality (VR) devices, and the The electronic device can control the device, and the specific form of the electronic device is not particularly limited in this embodiment of the present application.
本申请实施例以电子设备是手机,在手机上实施场景识别方法为例,对该方法进行阐述。The embodiments of the present application illustrate the method by taking the electronic device as a mobile phone and implementing the scene recognition method on the mobile phone as an example.
具体地说,手机可以识别当前场景,并根据当前场景执行对应的动作。例如,当手机处于地铁站,手机可以识别到当前场景,基于当前场景手机显示包括“地铁乘车码”的界面。在此之前,手机需要确定该动作对应的当前场景,以便后续识别出当前场景后执行对应的动作。Specifically, the mobile phone can identify the current scene and perform corresponding actions according to the current scene. For example, when the mobile phone is in a subway station, the mobile phone can recognize the current scene, and based on the current scene, the mobile phone displays an interface including "subway boarding code". Before this, the mobile phone needs to determine the current scene corresponding to the action, so as to perform the corresponding action after identifying the current scene subsequently.
示例性的,手机在预设位置时执行对应的动作。手机可以统计执行动作时的场景信息,并记录这些场景信息。基于多次的场景信息的统计,手机可以确定场景信息与动作的对应关系。这样一来,当手机处于预设位置,并再次检测到场景信息,则手机执行与场景信息对应的动作。Exemplarily, when the mobile phone is in a preset position, a corresponding action is performed. The mobile phone can count the scene information when the action is performed, and record the scene information. Based on the statistics of the scene information multiple times, the mobile phone can determine the corresponding relationship between the scene information and the action. In this way, when the mobile phone is in the preset position and the scene information is detected again, the mobile phone performs an action corresponding to the scene information.
又示例性的,手机可以与云端服务器(或称为远程服务器)交互,获取云端服务器的指纹库,指纹库中包括多个指纹信息。每个指纹信息对应一个场景(如,第一场景),该指纹信息可以包括WIFI、Cell、GNSS和光强信息等。这样一来,当手机检测到当前环境与指纹库中的一种指纹信息相符合,那么,手机可以根据与当前环境符合的指纹信息,确定与当前场景强相关的动作,并执行该动作。In another example, the mobile phone may interact with a cloud server (or referred to as a remote server) to obtain a fingerprint database of the cloud server, where the fingerprint database includes multiple fingerprint information. Each fingerprint information corresponds to a scene (eg, the first scene), and the fingerprint information may include WIFI, Cell, GNSS, and light intensity information, and the like. In this way, when the mobile phone detects that the current environment matches a type of fingerprint information in the fingerprint database, the mobile phone can determine an action strongly related to the current scene according to the fingerprint information that matches the current environment, and execute the action.
另外,当手机作为采集指纹信息的设备,手机具有上报云端服务器的采集信息用户授权,手机可以将采集到的位置信息与相关服务的动作上传至云端服务器。云端服务器在获取到多个设备上传的采集信息之后,云端服务器可以根据预设算法,根据手机上传的采集信息生成指纹信息,多个指纹信息形成指纹库。In addition, when the mobile phone is used as a device for collecting fingerprint information, the mobile phone has the user authorization to report the collected information to the cloud server, and the mobile phone can upload the collected location information and related service actions to the cloud server. After the cloud server obtains the collection information uploaded by multiple devices, the cloud server can generate fingerprint information according to the collection information uploaded by the mobile phone according to a preset algorithm, and the multiple fingerprint information forms a fingerprint database.
首先,将说明以手机作为一种采集信息的终端,采集信息,向云端服务器传输采集得到的信息的过程。请参考图2,为手机向云端服务器传输采集信息的流程图。其中,该过程还可以称为场景识别方法的训练阶段。First, the process of using a mobile phone as a terminal for collecting information, collecting information, and transmitting the collected information to a cloud server will be described. Please refer to FIG. 2 , which is a flow chart of the mobile phone transmitting the collected information to the cloud server. Among them, this process can also be referred to as the training phase of the scene recognition method.
如图2所示,训练阶段包括步骤201-步骤206。As shown in FIG. 2 , the training phase includes steps 201 to 206 .
步骤201:当手机位于第一位置,获取第一事件的置信度,第一事件与第一位置存在预设逻辑关系。Step 201 : when the mobile phone is located at the first position, obtain the confidence level of the first event, and the first event and the first position have a preset logical relationship.
其中,第一事件的置信度用于表征第一事件的执行程度。Wherein, the confidence level of the first event is used to characterize the execution degree of the first event.
需要说明的,第一事件可以是手机在用户的操作下运行第一应用,或者,第一事件可以是手机接收到预设的用户操作,显示预设界面。具体来说,手机执行第一事件 之后,手机可以显示至少一个预设界面。例如,第一位置是第一地铁站,手机执行第一事件是手机运行第一应用,并显示包括“地铁乘车码”的界面。或者,第一位置是第一地铁站,手机执行第一事件是手机运行第二应用,手机显示包括“健康码”的界面,并且,在手机显示包括“健康码”的界面之后,手机运行第一应用,手机显示包括“地铁乘车码”的界面。示例性的,第一应用可以是具有电子支付功能的应用,如,支付宝
Figure PCTCN2022075559-appb-000010
、微信
Figure PCTCN2022075559-appb-000011
等。
It should be noted that the first event may be that the mobile phone runs the first application under the operation of the user, or the first event may be that the mobile phone receives a preset user operation and displays a preset interface. Specifically, after the mobile phone executes the first event, the mobile phone may display at least one preset interface. For example, the first location is the first subway station, and the execution of the first event by the mobile phone is that the mobile phone runs the first application, and displays an interface including "subway boarding code". Or, the first location is the first subway station, the mobile phone executing the first event is the mobile phone running the second application, the mobile phone displays an interface including the "health code", and, after the mobile phone displays the interface including the "health code", the mobile phone runs the second application. An application, the mobile phone displays an interface including the "subway code". Exemplarily, the first application may be an application with an electronic payment function, such as Alipay
Figure PCTCN2022075559-appb-000010
,WeChat
Figure PCTCN2022075559-appb-000011
Wait.
在一些实现中,预设逻辑关系可以是手机根据第一位置与第一事件的相关性确定的。例如,第一位置是第一地铁站,第一事件是手机显示包括“地铁乘车码”的界面。通过预设逻辑关系判断,手机确定处于第一地铁站时,执行第一事件可以使得用户通过地铁闸机,则用户才能乘坐地铁。手机在第一地铁站时用户有乘坐地铁的需求是预设的逻辑,因此,手机可以确定当前处于第一地铁站,需要检测是否执行第一事件。In some implementations, the preset logical relationship may be determined by the mobile phone according to the correlation between the first location and the first event. For example, the first location is the first subway station, and the first event is that the mobile phone displays an interface including "subway boarding code". Judging by the preset logical relationship, when the mobile phone is determined to be at the first subway station, executing the first event can make the user pass through the subway gate, and then the user can take the subway. When the mobile phone is in the first subway station, the user needs to take the subway is a preset logic. Therefore, the mobile phone can determine that it is currently in the first subway station and needs to detect whether to execute the first event.
另一些实现中,手机与云端服务器交互,并根据云端服务器反馈的信息确定,当前手机处于第一地铁站,需要检测手机是否执行第一事件。基于此,手机可以确定数据训练阶段,可以采集手机执行第一动作时的数据。In other implementations, the mobile phone interacts with the cloud server, and determines according to the information fed back by the cloud server that the mobile phone is currently in the first subway station, and it is necessary to detect whether the mobile phone executes the first event. Based on this, the mobile phone can determine the data training stage, and can collect data when the mobile phone performs the first action.
值得一提的,第一事件与手机当前的位置存在预设逻辑关系,也可以理解为,当前的位置(即第一位置)是手机执行第一事件的预置条件。对于训练阶段而言,这种预设逻辑关系可以作为一种强关联规则(或称为强规则)预先设置在手机中。It is worth mentioning that there is a preset logical relationship between the first event and the current position of the mobile phone. It can also be understood that the current position (ie, the first position) is a preset condition for the mobile phone to execute the first event. For the training phase, this preset logical relationship can be preset in the mobile phone as a strong association rule (or called a strong rule).
第一位置是一个区域,当手机处于第一位置,手机在用户的控制下可以执行多个动作。例如,手机在用户的控制下可以运行视频应用,并播放视频;或者,手机在用户的控制下运行第一应用,使手机完成付款动作等。也就是说,当手机处于第一位置时,不能确定手机是否执行第一事件,以及手机在何时执行第一事件。因此,需要设置置信度。置信度用于表征第一事件的执行程度,如,手机是否执行第一事件,第一事件是否执行完成等。从另一个方面来说,设置置信度是用于手机识别第一事件的可信程度。具体来说,在训练阶段,手机处于第一位置,且手机执行第一事件,并且第一事件执行完成(即手机执行第一事件是可信的),下一步,手机可以采用相关信息等。如果手机没有执行第一事件或者,第一事件执行失败(即手机执行第一事件是不可信的),则手机没有必要响应下一步的动作,这样,就不是一个完整的训练过程。The first position is an area, and when the phone is in the first position, the phone can perform multiple actions under the control of the user. For example, the mobile phone can run a video application under the control of the user, and play the video; or, the mobile phone can run the first application under the control of the user, so that the mobile phone can complete the payment action. That is, when the mobile phone is in the first position, it cannot be determined whether the mobile phone executes the first event, and when the mobile phone executes the first event. Therefore, a confidence level needs to be set. The confidence level is used to represent the execution degree of the first event, for example, whether the mobile phone executes the first event, whether the execution of the first event is completed, and the like. On the other hand, setting the confidence level is the confidence level for the mobile phone to recognize the first event. Specifically, in the training phase, the mobile phone is in the first position, and the mobile phone executes the first event, and the execution of the first event is completed (that is, the execution of the first event by the mobile phone is credible). In the next step, the mobile phone can use relevant information. If the mobile phone does not execute the first event or fails to execute the first event (that is, the execution of the first event by the mobile phone is untrustworthy), the mobile phone does not need to respond to the next action, and thus, it is not a complete training process.
具体地说,手机可以根据多个传感器等采集的数据,识别第一事件的置信度。例如,继续以第一位置是第一地铁站,第一事件是手机显示包括“地铁乘车码”的界面为例。当确定手机正在运行第一应用后,手机可以获取当前显示屏的显示界面。如果手机的显示界面为包括“地铁乘车码”的界面,则手机可以确认第一事件开始执行。此时,第一事件的置信度可以是1,表示手机正在执行第一事件,即手机执行第一事件是可信的。可以理解的,当手机处于第一地铁站,运行第一应用,手机获取当前显示屏的显示界面。如果手机的显示界面不是包括“地铁乘车码”的界面,则可以确认第一事件的置信度为0,即手机执行第一事件是不可信的。Specifically, the mobile phone can identify the confidence level of the first event according to data collected by multiple sensors and the like. For example, continue to take the example that the first location is the first subway station and the first event is that the mobile phone displays an interface including "subway boarding code". After determining that the mobile phone is running the first application, the mobile phone can obtain the display interface of the current display screen. If the display interface of the mobile phone is an interface including "subway boarding code", the mobile phone can confirm that the first event starts to be executed. At this time, the confidence level of the first event may be 1, indicating that the mobile phone is executing the first event, that is, the mobile phone is credible to execute the first event. It can be understood that when the mobile phone is at the first subway station and the first application is run, the mobile phone obtains the display interface of the current display screen. If the display interface of the mobile phone does not include the "subway code", it can be confirmed that the confidence level of the first event is 0, that is, it is untrustworthy that the mobile phone executes the first event.
可以理解的,当手机显示包括“地铁乘车码”的界面之后,如果用户将手机靠近地铁闸机扫码的区域,使得手机完成扫码动作,则获取到的显示界面可能为包括“已进站”、“已出站”、“更新二维码”或“扫码失败”提示信息的界面。也就是说,当手机获取到显示屏的显示界面为包括:“已进站”、“已出站”、“更新二维码”或“扫码失败”提示信息的 界面,也可以表明,第一事件的置信度可以是1,表示手机正在执行第一事件,即手机执行第一事件是可信的。It is understandable that after the mobile phone displays the interface including the "subway boarding code", if the user moves the mobile phone close to the area where the subway gate is scanned for the code, so that the mobile phone completes the code scanning action, the obtained display interface may include "has entered. The interface that prompts messages such as "stop", "outbound", "update QR code" or "scan code failed". That is to say, when the mobile phone obtains the display interface of the display screen as an interface including: "inbound", "outbound", "update QR code" or "scan code failed" prompt information, it can also indicate that the first The confidence level of an event may be 1, indicating that the mobile phone is executing the first event, that is, it is credible that the mobile phone executes the first event.
需要明白的是,手机可以实时获取显示屏的显示界面,以便手机可以确定第一事件的置信度。具体地说,手机可以依据当前运行的应用,以判断是否需要获取显示屏的显示界面。当手机确定当前第一应用正在运行,则手机可以实时(或间隔预设时间)获取显示屏的显示界面。It should be understood that the mobile phone can acquire the display interface of the display screen in real time, so that the mobile phone can determine the confidence level of the first event. Specifically, the mobile phone can determine whether the display interface of the display screen needs to be acquired according to the currently running application. When the mobile phone determines that the current first application is running, the mobile phone can acquire the display interface of the display screen in real time (or at a preset time interval).
步骤202:判断置信度是否大于第一预设阈值。如果置信度大于第一预设阈值,执行步骤203;如果置信度小于等于第一预设阈值,执行步骤206。Step 202: Determine whether the confidence level is greater than a first preset threshold. If the confidence level is greater than the first preset threshold, go to step 203; if the confidence level is less than or equal to the first preset threshold, go to step 206.
其中,第一预设阈值可以作为第一事件是否执行的判断依据,第一事件的置信度大于第一预设阈值,说明手机处于第一位置时,手机正在执行第一事件,或者,手机执行完成了第一事件。The first preset threshold may be used as a basis for judging whether the first event is executed, and the confidence level of the first event is greater than the first preset threshold, indicating that when the mobile phone is in the first position, the mobile phone is executing the first event, or the mobile phone is executing the first event. Completed the first event.
另一些实施中,还可以设置置信度大于等于第一预设阈值,执行步骤203;执行度小于第一预设阈值,执行步骤206。In other implementations, the confidence degree may be set to be greater than or equal to the first preset threshold, and step 203 is performed; the degree of execution is less than the first preset threshold, and step 206 is performed.
步骤203:确定第一事件的执行结果,并对执行结果进行校验,获取校验结果。Step 203: Determine the execution result of the first event, verify the execution result, and obtain the verification result.
具体来说,执行结果包括第一事件执行成功(或理解为第一事件执行完成),以及第一事件执行失败。其中,确定第一事件的执行结果可以根据手机中传感器采集的数据,判断第一事件的执行结果,或者,可以获取手机当前的显示界面的信息判断第一事件的执行结果。Specifically, the execution result includes successful execution of the first event (or understood as completion of execution of the first event) and failure of execution of the first event. The execution result of the first event may be determined according to data collected by sensors in the mobile phone, or the execution result of the first event may be determined by acquiring information on the current display interface of the mobile phone.
示例性的,继续以第一事件是手机显示包括“地铁乘车码”的界面为例。当手机显示包括“地铁乘车码”的界面,此时,第一事件的置信度表示第一事件可信。用户将手机的显示界面对准地铁闸机的扫码口,使得手机完成第一事件。在手机完成第一事件之后,手机的显示界面会发生改变。在手机的显示界面发生改变之后,手机获取第一事件的执行结果,即手机显示屏当前的显示界面。Exemplarily, continue to take as an example that the first event is that the mobile phone displays an interface including "subway boarding code". When the mobile phone displays an interface including "subway boarding code", at this time, the confidence level of the first event indicates that the first event is credible. The user aligns the display interface of the mobile phone with the code scanning port of the subway gate, so that the mobile phone completes the first event. After the mobile phone completes the first event, the display interface of the mobile phone will change. After the display interface of the mobile phone is changed, the mobile phone obtains the execution result of the first event, that is, the current display interface of the display screen of the mobile phone.
其中,手机获取第一事件的执行结果,通过识别手机显示屏当前的显示界面,以确定第一事件的校验结果。校验结果指示第一事件成功执行,或者,校验结果指示第一事件没有成功执行。The mobile phone obtains the execution result of the first event, and determines the verification result of the first event by identifying the current display interface of the display screen of the mobile phone. The verification result indicates that the first event is successfully executed, or the verification result indicates that the first event is not successfully executed.
需要说明的,上述确定第一事件的执行结果,是根据手机显示屏当前的显示界面确定的。在一些实现中,当确定手机的显示屏包括“地铁乘车码”的界面,每经过预设时间间隔,手机就获取一次显示屏当前的显示界面,以便根据该显示界面确定第一事件的校验结果。另一些实现中,当确定手机的显示屏包括“地铁乘车码”的界面,确定手机当前的显示界面发生改变,则手机获取显示屏当前的显示界面,以便根据该显示界面确定第一事件的校验结果。It should be noted that the above-mentioned determination of the execution result of the first event is determined according to the current display interface of the display screen of the mobile phone. In some implementations, when it is determined that the display screen of the mobile phone includes an interface of "subway code", the mobile phone obtains the current display interface of the display screen once every preset time interval, so as to determine the school of the first event according to the display interface. test results. In other implementations, when it is determined that the display screen of the mobile phone includes an interface of "subway boarding code", and it is determined that the current display interface of the mobile phone has changed, the mobile phone obtains the current display interface of the display screen, so as to determine the status of the first event according to the display interface. Check the result.
步骤204:根据校验结果,判断第一事件是否执行成功。如果第一事件执行成功,执行步骤205;如果第一事件执行失败,执行步骤206。Step 204: According to the verification result, determine whether the first event is successfully executed. If the execution of the first event is successful, go to step 205; if the execution of the first event fails, go to step 206.
具体来说,当手机识别显示屏当前的显示界面后,如果该显示界面上包括“已进站”或“已出站”的提示信息,可以确定校验结果指示第一事件成功执行,执行步骤205。如果该显示界面上没有包括“已进站”或“已出站”的提示信息,如,显示界面上包括“扫码失败”或“更新二维码”的提示信息等,可以确定校验结果指示第一事件没有执行成功(第一事件执行失败),执行步骤206。Specifically, after the mobile phone recognizes the current display interface of the display screen, if the display interface includes the prompt information of "inbound" or "outbound", it can be determined that the verification result indicates that the first event was successfully executed, and the execution steps 205. If the display interface does not include "inbound" or "outbound" prompt information, for example, the display interface includes "scan code failure" or "update QR code" prompt information, etc., the verification result can be determined. Indicate that the first event is not successfully executed (the first event fails to execute), and step 206 is executed.
步骤205:获取手机中第一位置对应的位置标签,并向云端服务器上传第一位置对应的位置标签。Step 205: Acquire the location label corresponding to the first location in the mobile phone, and upload the location label corresponding to the first location to the cloud server.
其中,位置标签可以包括:WIFI、Cell、GNSS和光强信息中的至少一个。如果手机获取到用户授予的权限,可以在第一事件完成之后将采集到WIFI、Cell、GNSS和光强信息作为第一位置的位置标签,并将该位置标签上传至云端服务器。The location tag may include at least one of WIFI, Cell, GNSS and light intensity information. If the mobile phone obtains the permission granted by the user, after the completion of the first event, the collected WIFI, Cell, GNSS and light intensity information can be used as the location label of the first location, and the location label can be uploaded to the cloud server.
示例性的,WIFI是指手机在执行第一事件的过程中,手机WIFI搜索到的全部的站点地址(Basic Service Set Identifier,BSSID),以及每个BSSID对应的信号强度。Cell是指手机在执行第一事件过程,手机获取到的小区标识以及该小区标识的信号强度。GNSS是指手机在执行第一事件的过程中,手机获取到的卫星信号。光强信号是指手机在执行第一事件过程中,传感器(如,环境光传感器)确定的手机所在环境的光照强度。Exemplarily, WIFI refers to all the site addresses (Basic Service Set Identifier, BSSID) searched by the WIFI of the mobile phone in the process of executing the first event, and the signal strength corresponding to each BSSID. Cell refers to the cell identity obtained by the mobile phone and the signal strength of the cell identity during the execution of the first event process by the mobile phone. GNSS refers to the satellite signal obtained by the mobile phone in the process of executing the first event. The light intensity signal refers to the light intensity of the environment in which the mobile phone is located as determined by a sensor (eg, an ambient light sensor) during the execution of the first event by the mobile phone.
以第一事件是手机显示包括“地铁乘车码”的界面为例。位置标签表示,当手机位于第一地铁站中的地铁闸机附近时(如,地铁闸机扫码位置或刚通过地铁闸机的位置),手机成功执行第一事件之后,手机将采集到的位置标签上传至云端服务器。Take for example that the first event is that the mobile phone displays an interface including "subway boarding code". The location tag indicates that when the mobile phone is located near the subway gate in the first subway station (for example, the position where the subway gate scans the code or just passed the subway gate), after the mobile phone successfully executes the first event, the mobile phone will collect the data. The location label is uploaded to the cloud server.
步骤206:不响应。Step 206: No response.
其中,此处的不响应是指手机不作出响应。Among them, the non-response here means that the mobile phone does not respond.
具体地说,手机确定置信度小于等于第一预设阈值,说明第一位置与第一事件的相关程度并不高,则手机不需要执行后续步骤。以及,当手机确定第一事件的校验结果指示第一事件执行失败,则当前暂时不需要向云端服务器上报第一位置和第一事件,也就不需要采集第一位置对应的位置标签。此时,手机也是不响应。Specifically, the mobile phone determines that the confidence level is less than or equal to the first preset threshold, indicating that the degree of correlation between the first position and the first event is not high, and the mobile phone does not need to perform subsequent steps. And, when the mobile phone determines that the verification result of the first event indicates that the execution of the first event fails, it is not necessary to report the first location and the first event to the cloud server for the time being, and also does not need to collect the location label corresponding to the first location. At this point, the phone does not respond.
值得一提的,多个手机作为终端都可以向云端服务器上传第一位置对应的位置标签以及、第一事件。以第一位置是第一地铁站为例,第一手机可以向云端服务器上传第一地铁站的位置标签,以及第一事件;第二手机也可以像云端服务器上传第一地铁站的位置标签,以及第一事件。It is worth mentioning that, as terminals, multiple mobile phones can upload the location tag corresponding to the first location and the first event to the cloud server. Taking the first location as the first subway station as an example, the first mobile phone can upload the location label of the first subway station and the first event to the cloud server; the second mobile phone can also upload the location label of the first subway station like the cloud server, and the first event.
其中,云端服务器可以根据第一位置对应的位置标签,生成第一位置的指纹标签(即针对第一位置的唯一对应信息)。Wherein, the cloud server may generate a fingerprint tag of the first position (that is, unique corresponding information for the first position) according to the position tag corresponding to the first position.
需要明白的,GNSS的信号以及光强信号,可以用于判断当前手机是处于室内还是室外,Cell信息和WIFI信息可以用于确定手机所在第一位置的区域。It should be understood that the GNSS signal and light intensity signal can be used to determine whether the current mobile phone is indoors or outdoors, and the Cell information and WIFI information can be used to determine the area of the first location where the mobile phone is located.
在一种可能的实施方式中,云端服务器可以采用数据挖掘的方式处于多个终端上传的信息。示例性的,可以采用关联规则算法(Apriori算法)对第一位置对应的cell、WIFI信息进行数据挖掘,如,可以对cell、WIFI信息进行频繁项集挖掘。也就是在,运行Apriori算法时,在频繁模式下,得到频繁项集。频繁模式是指数据集中频繁出现的项集、序列或子结构。项集就是若干个项的集合。在第一位置对应的位置标签中,一个终端上传的WIFI信息(即无线网络名称列表)为一个项集。频繁项集是指某个项集在所有项中出现的频率,大于预设频率的集合(最小支持度阈值)。In a possible implementation manner, the cloud server may store information uploaded by multiple terminals by means of data mining. Exemplarily, an association rule algorithm (Apriori algorithm) can be used to perform data mining on the cell and WIFI information corresponding to the first position, for example, frequent itemset mining can be performed on the cell and WIFI information. That is, when running the Apriori algorithm, in the frequent mode, the frequent itemsets are obtained. Frequent patterns are itemsets, sequences, or substructures that occur frequently in a dataset. An itemset is a collection of several items. In the location tag corresponding to the first location, the WIFI information (ie, the wireless network name list) uploaded by a terminal is an item set. Frequent itemsets refer to the frequency of an itemset appearing in all items, which is greater than the set of preset frequencies (minimum support threshold).
总而言之,基于多个终端上传的第一位置标签,采用上述Apriori算法可以确定出现频率最高的项集。以对cell、WIFI信息进行频繁项集挖掘为例,通过最小支持度阈值挖掘出满足条件的项集,即支持度大于最小支持度阈值的项集。具体来说,通过数据挖掘确定每个项集的支持度,并判断该项集是否满足第一位置的指纹要求,如果该 项集的支持度大于最小支持度阈值,则表示该项集可以作为第一位置的指纹特征。All in all, based on the first location tags uploaded by multiple terminals, the above-mentioned Apriori algorithm can be used to determine the item set with the highest occurrence frequency. Taking the frequent itemset mining of cell and WIFI information as an example, the itemsets that meet the conditions are mined through the minimum support threshold, that is, the itemsets whose support is greater than the minimum support threshold. Specifically, the support degree of each item set is determined through data mining, and it is judged whether the item set meets the fingerprint requirements of the first position. If the support degree of the item set is greater than the minimum support degree threshold, it means that the item set can be used as a Fingerprint feature of the first location.
例如,每个项集支持度的计算方式可以参考如下公式1:For example, the calculation method of the support of each itemset can refer to the following formula 1:
Figure PCTCN2022075559-appb-000012
Figure PCTCN2022075559-appb-000012
其中,X表示cell信号得到的基站的ID,即CELL ID;Y表示WIFI信号得到的无线网络信号地址,是指WIFI列表包括的站点地址(Basic Service Set Identifier,BSSID),即WIFI BSSID;support(X→Y)表示从基站到具体区域的项集的支持度,N表示项集的总数量,count(X,Y)表示项集<cell,wifi>。Among them, X represents the ID of the base station obtained by the cell signal, that is, the CELL ID; Y represents the wireless network signal address obtained by the WIFI signal, which refers to the site address (Basic Service Set Identifier, BSSID) included in the WIFI list, that is, the WIFI BSSID; support( X→Y) represents the support degree of the itemsets from the base station to the specific area, N represents the total number of itemsets, and count(X, Y) represents the itemsets <cell, wifi>.
另一些方面,如果在数据挖掘阶段,没有挖掘到包括<cell,wifi>的项集,即终端上报的位置标签中没有WIFI信息。在这种情况下,如果想要计算终端的位置,可以根据终端上报的CELL ID对终端进行小区定位。需要明白的,CELL ID匹配时定位精度较低。因为一个基站的通信范围是较大的,这就使得不能准确定位出终端所在的具体区域。In other respects, if in the data mining stage, no item set including <cell, wifi> is mined, that is, there is no WIFI information in the location tag reported by the terminal. In this case, if you want to calculate the location of the terminal, you can perform cell positioning on the terminal according to the CELL ID reported by the terminal. It should be understood that the positioning accuracy is lower when the CELL ID is matched. Because the communication range of a base station is relatively large, this makes it impossible to accurately locate the specific area where the terminal is located.
在一些实施例中,上述云端服务器数据挖掘的过程可以采用如图3A所示的流程图示意。如图3A所示,云端服务器数据挖掘过程包括:In some embodiments, the above-mentioned process of data mining of the cloud server may be illustrated by the flowchart shown in FIG. 3A . As shown in Figure 3A, the cloud server data mining process includes:
步骤301:云端服务器采用预设数据处理算法,根据终端上传的位置标签计算第一位置的指纹特征。Step 301: The cloud server uses a preset data processing algorithm to calculate the fingerprint feature of the first location according to the location tag uploaded by the terminal.
示例性的,云端服务器接收到终端上传的位置标签之后,可以采用上述方式计算得到该位置标签的指纹特征。Exemplarily, after receiving the location tag uploaded by the terminal, the cloud server may calculate the fingerprint feature of the location tag in the above manner.
步骤302:判断该指纹特征是否已经存在第一位置的指纹库中;如果该指纹特征已经存在第一位置的指纹库,则执行步骤303;否则,执行步骤304。Step 302 : determine whether the fingerprint feature already exists in the fingerprint database of the first position; if the fingerprint feature already exists in the fingerprint database of the first position, execute step 303 ; otherwise, execute step 304 .
第一位置的指纹库包括多个指纹特征,这些指纹特征使得云端服务器可以唯一确定第一位置的特征。并且,指纹库中的指纹特征是根据来自多个终端的位置标签生成的,当前计算得到的指纹特征可能已经存储在指纹库中,为了避免指纹特征重复,影响第一位置的匹配,每增加一个指纹特征,都需要进行对比。The fingerprint database of the first location includes a plurality of fingerprint features, and these fingerprint features enable the cloud server to uniquely determine the features of the first location. In addition, the fingerprint features in the fingerprint database are generated according to the location tags from multiple terminals. The currently calculated fingerprint features may have been stored in the fingerprint database. In order to avoid the repetition of fingerprint features and affect the matching of the first position, each additional Fingerprint features need to be compared.
步骤303:不增加指纹库信息。Step 303: Do not add fingerprint database information.
指纹库中存在与当前指纹特征相同的指纹特征,则不需要在指纹库中增加该指纹特征。If the fingerprint database has the same fingerprint feature as the current fingerprint feature, it is not necessary to add the fingerprint feature to the fingerprint database.
在另一种实施中,如果数据挖掘得到指纹库中已有的指纹特征,则可以对指纹库中已有的指纹特征进行标记,增加该指纹特征与第一位置的关联性。In another implementation, if the existing fingerprint features in the fingerprint database are obtained by data mining, the existing fingerprint features in the fingerprint database can be marked to increase the correlation between the fingerprint features and the first position.
步骤304:将数据挖掘得到的项集保存至第一位置的指纹库。Step 304: Save the itemsets obtained by data mining to the fingerprint database in the first location.
需要明白的,当手机可以与云端服务器交互,手机可以根据第一位置的指纹库信息确定第一位置对应的第一动作。另外,云端服务器又可以接收多个终端传输的第一位置的位置标签,那么,云端服务器可以根据位置标签更新指纹库中的指纹特征,使得云端服务器为手机提供的指纹库可以准确为手机提供与第一位置相关的第一动作。It should be understood that when the mobile phone can interact with the cloud server, the mobile phone can determine the first action corresponding to the first position according to the fingerprint database information of the first position. In addition, the cloud server can receive the location labels of the first location transmitted by multiple terminals, then the cloud server can update the fingerprint features in the fingerprint database according to the location labels, so that the fingerprint database provided by the cloud server for the mobile phone can accurately provide the mobile phone with The first action associated with the first position.
在一些实现中,云端服务器在实时更新指纹库时,还包括将删除“衰老”的指纹信息。其中“衰老”的指纹信息表示在预设时长内,没有被调用的指纹信息。例如,当根据指纹库中的指纹信息匹配手机当前所在的位置时,如果在45天之内,该指纹信息均未被使用,则该指纹信息就被称为“衰老”的指纹信息,云端服务器可以删除该“衰老” 的指纹信息。In some implementations, when the cloud server updates the fingerprint database in real time, it also includes the "aging" fingerprint information that will be deleted. The "aging" fingerprint information indicates that the fingerprint information has not been called within a preset time period. For example, when matching the current location of the mobile phone according to the fingerprint information in the fingerprint database, if the fingerprint information has not been used within 45 days, the fingerprint information is called "aging" fingerprint information. The cloud server The "aging" fingerprint information can be deleted.
具体地说,该删除指纹信息的流程如图3B所示,该方法包括步骤3-1至步骤3-4。其中,该流程图以删除一个指纹特征为例,云端服务器可以针对指纹库中的每个指纹特征进行上述流程处理。Specifically, the process of deleting fingerprint information is shown in FIG. 3B , and the method includes steps 3-1 to 3-4. Wherein, the flowchart takes deleting a fingerprint feature as an example, and the cloud server may perform the above process for each fingerprint feature in the fingerprint database.
步骤3-1:云端服务器生成指纹特征的时间戳,以确定该指纹特征未被使用的时间间隔。Step 3-1: The cloud server generates a timestamp of the fingerprint feature to determine the time interval during which the fingerprint feature is not used.
需要说明的,生成指纹特征的时间戳越早,说明该指纹特征“衰老”的概率就越高。例如,云端服务器可以从生成时间戳越早的指纹特征处理,确定指纹特征的判断顺序。It should be noted that the earlier the timestamp of the fingerprint feature is generated, the higher the probability that the fingerprint feature is "aging". For example, the cloud server can process the fingerprint features with an earlier generation time stamp to determine the judgment order of the fingerprint features.
步骤3-2:判断该时间间隔是否超过预设时间间隔。若为是,执行步骤3-3;否则,执行步骤3-4。Step 3-2: Determine whether the time interval exceeds the preset time interval. If yes, go to step 3-3; otherwise, go to step 3-4.
步骤3-3:删除该指纹特征。Step 3-3: Delete the fingerprint feature.
步骤3-4:不处理该指纹特征。Step 3-4: Do not process the fingerprint feature.
其次,本申请实施例以手机作为计算终端,计算当前所在第一位置的区域,并为用户提供第一动作的过程为例,说明本申请提供的场景识别方法。如图4所示,该手机实施该方法的流程图,其中,该过程还可以被称为场景识别方法的计算阶段。Secondly, the embodiment of the present application uses a mobile phone as a computing terminal to calculate the area of the current first location and provide the user with a first action as an example to illustrate the scene recognition method provided by the present application. As shown in FIG. 4 , the mobile phone implements the flow chart of the method, wherein the process can also be referred to as the calculation phase of the scene recognition method.
如图4所示,计算阶段包括步骤401-步骤406。As shown in FIG. 4 , the calculation phase includes steps 401 to 406 .
步骤401:手机确定当前所处的第一位置时,接收来自云端服务器的第一位置的指纹库,指纹库包括第一位置的多个指纹特征。Step 401: When the mobile phone determines the current first position, the mobile phone receives a fingerprint database of the first position from the cloud server, and the fingerprint database includes a plurality of fingerprint features of the first position.
可以明白的,第一位置是一个区域,当手机处于第一位置中一个预设区域(如,第一地铁站中靠近地铁闸机的位置)时,手机才有必要执行第一动作。It can be understood that the first position is an area. When the mobile phone is in a preset area of the first position (eg, a position close to the subway gate in the first subway station), the mobile phone only needs to perform the first action.
示例性的,如图6所示,为第一地铁站的示意图。如图6所示,当用户携带手机进入第一地铁站,手机检测到当前位置在第一区域50,确定手机处于第一地铁站的进站口地铁闸机附近。此时,手机可以显示包括“地铁乘车码”的界面,即手机执行第一动作。如,当手机处于第一位置10或处于第二位置20,手机都不必显示包括“地铁乘车码”的界面。其中,当手机检测到位于第一地铁站时,可以进行计算,具体需要与第一地铁站的指纹库进行匹配计算,以判断手机当前是否处于第一区域50。Exemplarily, as shown in FIG. 6 , it is a schematic diagram of the first subway station. As shown in FIG. 6 , when the user enters the first subway station with the mobile phone, the mobile phone detects that the current position is in the first area 50 and determines that the mobile phone is near the subway gate at the entrance of the first subway station. At this time, the mobile phone may display an interface including the "subway boarding code", that is, the mobile phone performs the first action. For example, when the mobile phone is in the first position 10 or in the second position 20, the mobile phone does not have to display an interface including "subway boarding code". Wherein, when the mobile phone detects that it is located in the first subway station, the calculation can be performed. Specifically, it needs to perform matching calculation with the fingerprint database of the first subway station to determine whether the mobile phone is currently in the first area 50 .
步骤402:手机获取第一位置的位置标签。Step 402: The mobile phone obtains the location label of the first location.
其中,位置标签包括:WIFI、Cell、GNSS和光强信息中的至少一个。Wherein, the location label includes: at least one of WIFI, Cell, GNSS and light intensity information.
具体地说,依据手机获取到的权限确定对应的位置标签。例如,手机获取到采集WIFI、Cell、GNSS和光强信息的权限,当手机位于第一位置时,可以实时获取WIFI、Cell、GNSS和光强信息。Specifically, the corresponding location tag is determined according to the authority obtained by the mobile phone. For example, the mobile phone has the permission to collect WIFI, Cell, GNSS and light intensity information. When the mobile phone is in the first position, it can obtain the WIFI, Cell, GNSS and light intensity information in real time.
在一些实现中,当手机位于第一位置时,手机采集位置标签,其中,位置标签包括WIFI、Cell、GNSS和光强信息。当手机检测到位置标签中任一维度的信息发生改变,则更新第一位置的位置标签。例如,当手机检测到当前位于第一位置,手机采集到的光强信息为第一光照强度,第一位置的位置标签中光照强度为第一光照强度。经过预设时间,手机依然位于第一位置,此时,手机检测到光强信息变化为第二光照强度,则手机更新位置标签中的光强信息为第二光照强度。In some implementations, when the mobile phone is at the first location, the mobile phone collects a location tag, wherein the location tag includes WIFI, Cell, GNSS, and light intensity information. When the mobile phone detects that the information of any dimension in the location label has changed, the location label of the first location is updated. For example, when the mobile phone detects that it is currently located at the first position, the light intensity information collected by the mobile phone is the first light intensity, and the light intensity in the location tag of the first position is the first light intensity. After a preset time, the mobile phone is still in the first position. At this time, the mobile phone detects that the light intensity information has changed to the second light intensity, and the light intensity information in the updated location tag of the mobile phone is the second light intensity.
步骤403:手机将位置标签与指纹库中的指纹特征进行匹配,得到匹配度,匹配度用于表征位置标签与指纹特征的匹配程度。Step 403 : The mobile phone matches the location label with the fingerprint features in the fingerprint database to obtain a matching degree, and the matching degree is used to represent the matching degree between the location label and the fingerprint feature.
在一些实现中,如果位置标签中包括<cell,wifi>这一项集,则可以采用如下公式2计算位置标签与指纹库特征的匹配程度(也就是匹配度)。In some implementations, if the location label includes the item set <cell, wifi>, the following formula 2 can be used to calculate the matching degree (ie, matching degree) between the location label and the fingerprint database feature.
Figure PCTCN2022075559-appb-000013
Figure PCTCN2022075559-appb-000013
其中,score表示匹配度,A表示用户手机获取到的项集<cell,wifi>,B表示指纹特征中的项集<cell,wifi>。COUNT(A U B)表示A对应的项集<cell,wifi>和B对应的项集<cell,wifi>中相同的项数个数;COUNT(B)表示B对应的项集<cell,wifi>中项数的个数。Among them, score represents the matching degree, A represents the itemset <cell, wifi> obtained by the user's mobile phone, and B represents the itemset <cell, wifi> in the fingerprint feature. COUNT(A U B) represents the same number of items in the itemset <cell, wifi> corresponding to A and the itemset <cell, wifi> corresponding to B; COUNT(B) represents the itemset <cell, wifi> corresponding to B > The number of items in the middle.
可以理解的,如果手机采集的位置标签中不包括<cell,wifi>这一项集,则可以采用CELL ID匹配的方式对手机在第一位置的具体位置进行定位。需要明白的,由于没有WIFI信号增强定位,此时的定位精度较低。It is understandable that if the location tag collected by the mobile phone does not include the item set <cell, wifi>, the specific location of the mobile phone at the first location can be located by means of CELL ID matching. It should be understood that since there is no WIFI signal to enhance the positioning, the positioning accuracy at this time is low.
示例性的,以第一位置是第一地铁站为例,当手机在完成第一动作之后,手机中采集到的位置标签,并向云端服务器上传位置标签。云端服务器根据多个手机上传的位置标签,第一地铁站的指纹库中可以存在多个<cell,wifi>指纹。如,该位置标签为cell采集到的信息表示手机所在的小区与cell_a,cell_a的信号强度为E1,WIFI信息采集到的WiFi信号名称包括:wifi_1、wifi_2和wifi_3。云端服务器基于位置标签可以生成第一地铁站的三条指纹特征:<cell_a,wifi_1>、<cell_a,wifi_2>和<cell_a,wifi_3>。Exemplarily, taking the first location as the first subway station as an example, after the mobile phone completes the first action, the mobile phone collects the location tag and uploads the location tag to the cloud server. According to the location tags uploaded by multiple mobile phones, the cloud server may have multiple <cell, wifi> fingerprints in the fingerprint database of the first subway station. For example, the information collected by the location tag as cell indicates the cell where the mobile phone is located and cell_a, the signal strength of cell_a is E1, and the names of the WiFi signals collected by the WIFI information include: wifi_1, wifi_2, and wifi_3. The cloud server can generate three fingerprint features of the first subway station based on the location tag: <cell_a, wifi_1>, <cell_a, wifi_2> and <cell_a, wifi_3>.
当手机获取到第一地铁站的指纹特征之后,手机可将全部的指纹特征与手机当前采集的位置标签进行匹配。存在两条指纹特征与当前采集的位置标签相符合,或者,存在三条指纹特征与当前采集的位置标签相符合,均可以表示手机当前处于地铁闸机附近,手机可以执行第一动作,即显示包括“地铁乘车码”的显示界面。After the mobile phone acquires the fingerprint features of the first subway station, the mobile phone can match all the fingerprint features with the location tags currently collected by the mobile phone. There are two fingerprint features that match the currently collected location tag, or three fingerprint features that match the currently collected location tag, all of which can indicate that the mobile phone is currently near the subway gate, and the mobile phone can perform the first action, that is, the display includes The display interface of "Subway Ride Code".
步骤404:判断匹配度是否大于预设匹配阈值。如果匹配度大于预设匹配阈值,执行步骤405;如果匹配度小于等于预设匹配阈值,执行步骤406。Step 404: Determine whether the matching degree is greater than a preset matching threshold. If the matching degree is greater than the preset matching threshold, step 405 is performed; if the matching degree is less than or equal to the preset matching threshold, step 406 is performed.
其中,匹配度大于预设匹配阈值,说明手机在第一位置中的具体位置是指纹库所指示的预设区域。Wherein, the matching degree is greater than the preset matching threshold, indicating that the specific position of the mobile phone in the first position is the preset area indicated by the fingerprint database.
如果匹配度小于等于预设匹配阈值,说明手机当前的具体位置与指纹库所指示的预设区域并不相符。用户携带手机在第一位置中移动,则手机在第一位置中的具体位置发生改变,使得手机采集的位置标签发生改变。此时,手机还可以实时获取位置标签,如果位置标签中的信息发生更新,则更新位置标签。可以理解的,当手机位置标签发生更新,则手机可以再次执行步骤403。If the matching degree is less than or equal to the preset matching threshold, it means that the current specific location of the mobile phone does not match the preset area indicated by the fingerprint database. When the user moves the mobile phone in the first position, the specific position of the mobile phone in the first position changes, so that the position label collected by the mobile phone changes. At this time, the mobile phone can also obtain the location label in real time, and if the information in the location label is updated, the location label is updated. It can be understood that when the location tag of the mobile phone is updated, the mobile phone can perform step 403 again.
值得一提的,在一种可能的实施中,手机也可以在匹配度大于等于预设匹配阈值时,执行步骤405,并在匹配度小于预设匹配阈值时,执行步骤406。It is worth mentioning that, in a possible implementation, the mobile phone may also perform step 405 when the matching degree is greater than or equal to the preset matching threshold, and perform step 406 when the matching degree is less than the preset matching threshold.
步骤405:确定手机处于第一位置中的预设区域,手机执行第一动作。Step 405: It is determined that the mobile phone is in a preset area in the first position, and the mobile phone performs the first action.
可以理解的,当确定手机处于第一位置中的预设区域,手机在第一位置的预设区域时执行第一动作的概率较高,则手机执行第一动作。以便为用户提供良好的使用体验。It can be understood that when it is determined that the mobile phone is in the preset area of the first position, and the mobile phone has a high probability of performing the first action when the mobile phone is in the preset area of the first position, the mobile phone performs the first action. In order to provide users with a good experience.
步骤406:不响应。Step 406: No response.
其中,手机确定处于第一位置中,但是,手机并不在预设区域。手机没有必要执行第一动作,在这种情况下,手机不必依据当前的位置发出响应(如,执行第一动作), 则手机不响应。The mobile phone is determined to be in the first position, but the mobile phone is not in the preset area. The mobile phone does not need to perform the first action. In this case, the mobile phone does not need to send a response according to the current position (eg, perform the first action), and the mobile phone does not respond.
以图6所示的场景为例,当手机确定处于第一地铁站,且手机处于第一区域50,识别到用户的操作后手机显示包括“地铁乘车码”的界面。基于手机识别到“地铁乘车码”扫码成功,指示用户携带手机通过了地铁闸机。此时,手机将当前采集的位置标签,以及手机执行第一动作(即显示包括“地铁乘车码”的界面)的行为上报给云端服务器。云端服务器可以根据手机上报的数据,生成第一位置的指纹库。该指纹库中包括指纹特征,指纹特征是根据第一位置的位置标签生成的。Taking the scenario shown in FIG. 6 as an example, when the mobile phone is determined to be in the first subway station and the mobile phone is in the first area 50, after recognizing the user's operation, the mobile phone displays an interface including "subway boarding code". Based on the recognition of the mobile phone and the successful scanning of the "subway bus code", the user is instructed to carry the mobile phone through the subway gate. At this time, the mobile phone reports the currently collected location tag and the behavior of the mobile phone performing the first action (ie, displaying the interface including the "subway boarding code") to the cloud server. The cloud server can generate the fingerprint database of the first location according to the data reported by the mobile phone. The fingerprint database includes fingerprint features, and the fingerprint features are generated according to the position label of the first position.
另外,当手机处于第一位置时,手机可以从云端服务器获取第一位置的指纹库。同时,手机获取当前的位置标签,将位置标签与指纹库中的指纹特征进行匹配,以确定手机当前的第一位置的区域,进而执行第一动作。例如,当手机处于第一位置10(或第二位置20),手机获取到的位置标签与指纹库中的指纹特征匹配度较低,说明位置标签与指纹库不符,手机不响应。当手机处于第一区域50中的区域,手机更新位置标签,并在此与指纹库中指纹特征进行匹配,位置标签与指纹库中指纹特征的匹配度高于预设匹配阈值,说明位置标签与指纹库相符,手机执行第一动作。In addition, when the mobile phone is in the first position, the mobile phone can obtain the fingerprint database of the first position from the cloud server. At the same time, the mobile phone obtains the current location label, matches the location label with the fingerprint features in the fingerprint database, and determines the area of the current first location of the mobile phone, and then executes the first action. For example, when the mobile phone is in the first position 10 (or the second position 20 ), the location label obtained by the mobile phone has a low degree of matching with the fingerprint features in the fingerprint database, indicating that the location label does not match the fingerprint database and the mobile phone does not respond. When the mobile phone is in the area of the first area 50, the mobile phone updates the location label, and matches the fingerprint feature in the fingerprint database here. The matching degree between the location label and the fingerprint feature in the fingerprint database is higher than the preset matching threshold, indicating that the location label and If the fingerprint database matches, the mobile phone performs the first action.
需要明白的,当手机处于第一位置时,手机可以在第一区域50检测位置标签,并向云端服务器上报数据;手机还可以在第二区域51检测位置标签,并向云端服务器上报数据。It should be understood that when the mobile phone is in the first position, the mobile phone can detect the location tag in the first area 50 and report the data to the cloud server; the mobile phone can also detect the location tag in the second area 51 and report the data to the cloud server.
其中,第一位置还可以是饮品店(如,咖啡馆)、公交站、餐厅、居住小区和办公场所等。需要说明的,上述场景中以第一位置是第一地铁站为例,第一地铁站是属于公共场所,当用户处于第一地铁站靠近地铁闸机的位置时,大概率是用户想要进站或出站。手机确定当前处于第一地铁站靠近闸机的位置,则执行第一动作,能够为简化用户操作,为用户提供便利。针对特定的公共场所,如,饮品店、餐厅、居住小区和办公场所,这些场所中手机存储有其特定的会员卡或门禁卡,手机才有这些场所对应的第一动作。如,第一位置是饮品店,当手机靠近饮品店的收银台,手机确定用户有消费的需求,则第一动作是手机显示饮品店电子会员卡;手机有居住小区或办公场所的电子门禁卡,第一位置是居住小区或办公场所,当手机靠近居住小区或办公场所的门禁机,手机确定用户有通过居住小区门禁或办公场所门禁的需求,则第一动作是手机显示居住小区或办公场所的电子门禁卡。Wherein, the first location may also be a beverage store (eg, a coffee shop), a bus station, a restaurant, a residential area, an office space, and the like. It should be noted that in the above scenario, the first location is the first subway station as an example. The first subway station is a public place. When the user is at the first subway station close to the subway gate, there is a high probability that the user wants to enter. station or exit. When the mobile phone determines that it is currently at the position of the first subway station close to the gate, the first action is performed, which can simplify the user's operation and provide convenience for the user. For specific public places, such as beverage shops, restaurants, residential quarters and office places, the mobile phone stores its specific membership card or access control card in these places, and the mobile phone only has the first action corresponding to these places. For example, the first location is a beverage shop. When the mobile phone is close to the cashier of the beverage shop, and the mobile phone determines that the user has consumption needs, the first action is to display the electronic membership card of the beverage shop on the mobile phone; the mobile phone has the electronic access card of the residential area or office. , the first location is the residential area or office. When the mobile phone is close to the access control machine in the residential area or office, and the mobile phone determines that the user needs to pass the residential area or office access control, the first action is to display the residential area or office. electronic access card.
可以理解的,但手机中不存在这些场所的会员卡或电子门禁卡等,则手机没有必要确定第一位置与第一动作的对应关系,即手机在这些场所,不会执行第一动作。It is understandable, but there is no membership card or electronic access card in these places in the mobile phone, so the mobile phone does not need to determine the corresponding relationship between the first position and the first action, that is, the mobile phone will not perform the first action in these places.
例如,具有NFC功能的手机中,预先存储有公司的门禁卡、小区门禁卡和公交乘车卡。当手机位于公司,手机获取公司位置对应的位置标签,并从云端服务器获取到公司这一位置对应的指纹库。手机检测到当前的位置标签与指纹库匹配,并确定手机当前处于公司的刷卡机附近的位置,则手机显示公司的门禁卡(电子NFC卡)。For example, in a mobile phone with NFC function, the company's access control card, community access control card and bus card are pre-stored. When the mobile phone is located in the company, the mobile phone obtains the location label corresponding to the company's location, and obtains the fingerprint database corresponding to the company's location from the cloud server. When the mobile phone detects that the current location tag matches the fingerprint database, and determines that the mobile phone is currently near the company's credit card machine, the mobile phone displays the company's access control card (electronic NFC card).
又如,当手机位于第一公交,手机获取第一公交对应的位置标签,同时,从云端服务器获取第一公交站对应的指纹库。手机检测到位置标签与指纹库匹配,当第一路公交车达到第一车站时,手机更新位置标签。此时,手机确定位置标签与指纹库相匹配,则手机显示公交乘车卡(电子NFC卡)。For another example, when the mobile phone is located on the first bus, the mobile phone obtains the location tag corresponding to the first bus, and at the same time, obtains the fingerprint database corresponding to the first bus stop from the cloud server. The mobile phone detects that the location tag matches the fingerprint database, and when the first bus reaches the first stop, the mobile phone updates the location tag. At this time, the mobile phone determines that the location tag matches the fingerprint database, and the mobile phone displays the bus card (electronic NFC card).
需要明白的,如果公交车上包括WiFi信号,则第一路公交车达到第一公交站时, 手机中的WIFI信号发生变化更新位置标签,以便手机将位置标签与指纹库进行匹配,使得手机识别到第一路公交是平常乘坐的公交车。则手机显示公交乘车卡,以使得用户可以乘坐第一路公交。也就是说,手机在上报数据时,可以针对该手机用户创建对应的指纹库,在手机处于第一公交站时识别到公交扫码的动作。以便在手机处于第一公交站时进行匹配计算,进而确定用户即将乘坐的公交车。It should be understood that if the bus includes a WiFi signal, when the first bus reaches the first bus stop, the WiFi signal in the mobile phone changes and the location tag is updated, so that the mobile phone can match the location tag with the fingerprint database, so that the mobile phone can identify The first bus is the usual bus. Then the mobile phone displays the bus card, so that the user can take the first bus. That is to say, when the mobile phone reports data, it can create a corresponding fingerprint database for the mobile phone user, and recognize the action of scanning the bus code when the mobile phone is at the first bus stop. In order to perform matching calculation when the mobile phone is at the first bus stop, and then determine the bus that the user is about to take.
另一些实现中,如,第一位置是饮品店(或其他消费场所),手机在确定处于第一位置时手机执行的第一动作是显示饮品店会员卡。这样,当手机检测到处于第一位置(即饮品店)时,手机可以显示该饮品店的优惠信息。In other implementations, for example, the first location is a beverage store (or other consumption place), and the first action performed by the mobile phone when it is determined to be in the first location is to display the beverage store membership card. In this way, when the mobile phone detects that it is in the first position (ie, the beverage shop), the mobile phone can display the preferential information of the beverage shop.
可以理解的,在本申请提供的方法中,电子设备无需增加额外的辅助设备,电子设备可以向云端服务器上报数据,使得云端服务器根据数据构建出针对第一位置的指纹库。其他终端可以获取云端服务器的指纹库,这样,终端在接收到指纹库,可以通过匹配的方式确定其他终端在第一位置的预设区域,以便手机执行第一动作。It can be understood that in the method provided by the present application, the electronic device does not need to add additional auxiliary equipment, and the electronic device can report data to the cloud server, so that the cloud server builds a fingerprint database for the first position according to the data. Other terminals can obtain the fingerprint database of the cloud server, so that when the terminal receives the fingerprint database, it can determine the preset area of other terminals in the first position by matching, so that the mobile phone can perform the first action.
值得一提的,上述在电子设备上报数据时,电子设备根据传感器、显示屏等就可以确定该第一位置与第一动作的置信度。电子设备可以将第一位置和第一动作相关联,并向云端服务器上报这种关联性。其次,云端服务器在生成第一位置的指纹库时,需要根据多个终端上传的数据,采用数据挖掘的方式,对大量的数据进行数据挖掘处理,以降低带噪数据对指纹特征的影响,得到第一位置的指纹特征。It is worth mentioning that, when the electronic device reports data, the electronic device can determine the confidence level of the first position and the first action according to the sensor, the display screen, and the like. The electronic device may associate the first position with the first action, and report the association to the cloud server. Secondly, when the cloud server generates the fingerprint database of the first location, it needs to perform data mining processing on a large amount of data according to the data uploaded by multiple terminals, so as to reduce the influence of noisy data on fingerprint characteristics, and obtain Fingerprint feature of the first location.
在一种实现方式中,通过手机感知到用户扫描地铁乘车码过地铁闸机的行为,手机可以自动采集所在位置的wifi/cell/光强/卫星信息并打上真值标签后上传云侧服务器,云侧进行位置指纹库的学习和更新。进一步地,后续,手机可以从云侧下载最新位置指纹库,并定时获取用户所在位置wifi/cell/光强/卫星信息与指纹库进行匹配,若匹配成功,则可以识别为用户在地铁闸机附近,从而手机可以自动弹出地铁乘车码供用户方便快速刷码过闸机。In one implementation, the mobile phone can sense the user's behavior of scanning the subway boarding code to pass through the subway gate, and the mobile phone can automatically collect the wifi/cell/light intensity/satellite information of the location and tag it with the truth value and upload it to the cloud server , the cloud side learns and updates the location fingerprint database. Further, in the follow-up, the mobile phone can download the latest location fingerprint database from the cloud side, and regularly obtain the wifi/cell/light intensity/satellite information of the user's location to match the fingerprint database. If the matching is successful, it can be recognized as the user at the subway gate. Nearby, so that the mobile phone can automatically pop up the subway boarding code for the user to quickly swipe the code to pass the gate.
示例性的,手机在确定当前位置的wifi/cell/光强/卫星信息,可以采用机器学习模型计算当前位置是否为靠近地铁闸机口的位置。该方法流程如图5所示,该方法包括步骤501-步骤505。Exemplarily, when the mobile phone determines the wifi/cell/light intensity/satellite information of the current location, a machine learning model can be used to calculate whether the current location is close to the subway gate. The method flow is shown in FIG. 5 , and the method includes steps 501 to 505 .
步骤501:手机处于第一地铁站,获取第一地铁站的wifi/cell/光强/卫星信息。Step 501: The mobile phone is at the first subway station, and obtains the wifi/cell/light intensity/satellite information of the first subway station.
步骤502:基于预设机器学习模型计算手机与第一地铁站中地铁闸机的距离。Step 502: Calculate the distance between the mobile phone and the subway gate in the first subway station based on the preset machine learning model.
其中,手机将实时采集得到的wifi/cell/光强/卫星信息、与预设的第一地铁站对应的wifi/cell/光强/卫星信息作为机器学习模型的输入,得到机器学习模型的输出结果。该输出结果用于指示手机当前位置与地铁闸机的距离值。Among them, the mobile phone uses the wifi/cell/light intensity/satellite information collected in real time and the wifi/cell/light intensity/satellite information corresponding to the preset first subway station as the input of the machine learning model, and obtains the output of the machine learning model. result. The output result is used to indicate the distance between the current location of the mobile phone and the subway gate.
步骤503:判断该距离值是否大于预设距离值。若为是,执行步骤504;否则,执行步骤505。Step 503: Determine whether the distance value is greater than the preset distance value. If yes, go to step 504; otherwise, go to step 505.
步骤504:确定手机处于第一地铁站的地铁闸机附近,执行第一动作。Step 504: It is determined that the mobile phone is near the subway gate of the first subway station, and the first action is performed.
步骤505:不响应。Step 505: No response.
以上是以电子设备是手机为例说明本申请实施例提供的方法,当电子设备为其他设备时,也可以采用上述的方法。此处不予赘述。In the above, the electronic device is a mobile phone as an example to describe the method provided by the embodiment of the present application. When the electronic device is another device, the above method may also be used. It will not be repeated here.
可以理解的是,本申请实施例提供的电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本 文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。It can be understood that, in order to realize the above-mentioned functions, the electronic device provided by the embodiments of the present application includes corresponding hardware structures and/or software modules for executing each function. Those skilled in the art should be easily aware that, in conjunction with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Experts may use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of the embodiments of the present application.
本申请实施例可以根据上述方法示例对上述电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the electronic device may be divided into functional modules according to the foregoing method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
本申请实施例还提供一种芯片系统,如图7所示,该芯片系统包括至少一个处理器601和至少一个接口电路602。处理器601和接口电路602可通过线路互联。例如,接口电路602可用于从其它装置(例如电子设备的存储器)接收信号。又例如,接口电路602可用于向其它装置(例如处理器601)发送信号。示例性的,接口电路602可读取存储器中存储的指令,并将该指令发送给处理器601。当所述指令被处理器601执行时,可使得电子设备执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。An embodiment of the present application further provides a chip system. As shown in FIG. 7 , the chip system includes at least one processor 601 and at least one interface circuit 602 . The processor 601 and the interface circuit 602 may be interconnected by wires. For example, the interface circuit 602 may be used to receive signals from other devices, such as the memory of an electronic device. As another example, the interface circuit 602 may be used to send signals to other devices (eg, the processor 601). Exemplarily, the interface circuit 602 may read the instructions stored in the memory and send the instructions to the processor 601 . When the instructions are executed by the processor 601, the electronic device can be caused to perform the various steps in the above embodiments. Certainly, the chip system may also include other discrete devices, which are not specifically limited in this embodiment of the present application.
本申请实施例还提供一种计算机存储介质,该计算机存储介质包括计算机指令,当所述计算机指令在上述电子设备上运行时,使得该电子设备执行上述方法实施例中手机执行的各个功能或者步骤。Embodiments of the present application further provide a computer storage medium, where the computer storage medium includes computer instructions, when the computer instructions are executed on the above-mentioned electronic device, the electronic device is made to perform various functions or steps performed by the mobile phone in the above-mentioned method embodiments .
本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述方法实施例中手机执行的各个功能或者步骤。Embodiments of the present application further provide a computer program product, which, when the computer program product runs on a computer, enables the computer to perform various functions or steps performed by the mobile phone in the above method embodiments.
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated by Different functional modules are completed, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, which are stored in a storage medium , including several instructions to make a device (may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above contents are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should 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 (13)

  1. 一种场景识别方法,其特征在于,包括:A scene recognition method, comprising:
    检测到电子设备进入第一区域;It is detected that the electronic device enters the first area;
    在检测到电子设备进入第一区域后,检测电子设备在第一区域内位于第一位置时所述第一位置对应的位置标签,所述位置标签表征所述电子设备在当前场所中获取到的环境信息,所述第一位置在所述第一区域内;After it is detected that the electronic device enters the first area, a location label corresponding to the first location when the electronic device is located at the first location in the first area is detected, and the location label represents the location label obtained by the electronic device in the current location environmental information, the first location is within the first area;
    将所述位置标签与预设位置对应的位置信息进行对比,获取对比结果,其中,所述预设的位置信息表征电子设备在所述第一位置的预设场景下的环境信息,所述预设位置在所述第一区域内;Compare the position label with the position information corresponding to the preset position, and obtain a comparison result, wherein the preset position information represents the environmental information of the electronic device in the preset scene of the first position, and the preset position information Set the location within the first area;
    若所述对比结果表示所述位置标签与所述预设位置对应的位置信息相符合,触发所述电子设备自动执行所述第一位置对应的第一动作,所述第一动作包括所述电子设备运行第一应用,并显示第一界面,其中,所述第一界面包括二维码;If the comparison result indicates that the location label matches the location information corresponding to the preset location, triggering the electronic device to automatically execute a first action corresponding to the first location, where the first action includes the electronic device The device runs the first application and displays a first interface, wherein the first interface includes a two-dimensional code;
    其中,所述第一动作与所述第一位置存在预设逻辑关系;Wherein, there is a preset logical relationship between the first action and the first position;
    所述位置标签包括:所述电子设备采集的全部的第一WIFI站点的地址、以及每个所述第一WIFI站点的信号强度,所述电子设备获取到的第一小区标识、以及每个所述第一小区标识的信号强度,和所述电子设备采集到的第一光照强度中的至少一个;The location label includes: addresses of all the first WIFI sites collected by the electronic device, and the signal strength of each of the first WIFI sites, the first cell identifier obtained by the electronic device, and each of the first WIFI sites. at least one of the signal intensity of the first cell identifier and the first light intensity collected by the electronic device;
    所述预设的位置信息包括:所述电子设备采集到的全部的第二WIFI站点的地址、以及每个所述第二WIFI站点的信号强度,所述电子设备获取到的第二小区标识、以及每个所述第二小区标识的信号强度,和所述电子设备采集到的第二光照强度中的至少一个;The preset location information includes: addresses of all second WIFI sites collected by the electronic device, and signal strength of each of the second WIFI sites, the second cell identifier obtained by the electronic device, and at least one of the signal intensity of each of the second cell identifiers, and the second light intensity collected by the electronic device;
    所述预设位置对应的位置信息是根据当所述电子设备进入所述第一区域后所述电子设备响应于用户操作执行第一事件的情况下采集的位置标签来生成的;The location information corresponding to the preset location is generated according to a location tag collected when the electronic device executes a first event in response to a user operation after the electronic device enters the first area;
    所述电子设备响应于用户操作执行第一事件,包括:The electronic device performs a first event in response to a user operation, including:
    所述电子设备接收到用户输入的第一操作,所述第一操作用于指示所述电子设备运行所述第一应用;The electronic device receives a first operation input by a user, where the first operation is used to instruct the electronic device to run the first application;
    响应于所述第一操作,所述电子设备运行所述第一应用,并显示所述第一界面,其中,所述第一界面包括二维码。In response to the first operation, the electronic device runs the first application and displays the first interface, wherein the first interface includes a two-dimensional code.
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备响应于用户操作执行所述第一事件,还包括:The method according to claim 1, wherein the electronic device performs the first event in response to a user operation, further comprising:
    所述电子设备在显示所述第一界面后接收到用户的握翻操作,所述握翻操作使得所述电子设备的显示屏转向对着刷码口;或,After the electronic device displays the first interface, the user's grip and flip operation is received, and the grip and flip operation causes the display screen of the electronic device to turn to face the code swiping port; or,
    所述电子设备在显示所述第一界面后还显示第二界面,所述第二界面指示扫码成功。The electronic device further displays a second interface after displaying the first interface, and the second interface indicates that the scan code is successful.
  3. 根据权利要求1或2所述的方法,其特征在于,所述预设位置对应的位置信息是根据当所述电子设备进入所述第一区域后所述电子设备响应于用户操作执行第一事件的情况下采集的位置标签来生成的,包括:The method according to claim 1 or 2, wherein the location information corresponding to the preset location is based on the electronic device executing a first event in response to a user operation after the electronic device enters the first area The collected location labels are generated, including:
    当电子设备进入第一区域后,获取所述电子设备执行第一事件的置信度,所述置信度表征用户操作触发执行所述第一事件的执行程度,其中,所述第一事件与所述第一动作有关联,所述电子设备执行所述第一事件时运行所述第一应用;After the electronic device enters the first area, the confidence level of the electronic device executing the first event is obtained, where the confidence level represents the execution degree of the user operation triggering the execution of the first event, wherein the first event is related to the The first action is associated, and the electronic device runs the first application when the electronic device executes the first event;
    当所述置信度表征所述第一事件被执行或被执行成功,获取所述电子设备当前采集的位置标签,所述位置标签表征所述电子设备在当前场所中获取到的环境信息;When the confidence level indicates that the first event is executed or successfully executed, a location tag currently collected by the electronic device is acquired, and the location tag represents the environmental information acquired by the electronic device in the current place;
    所述电子设备根据所述位置标签生成所述预设位置对应的位置信息,或所述电子设备向云端服务器传输所述位置标签,使得所述云端服务器根据所述位置标签生成所述预设位置对应的位置信息。The electronic device generates the position information corresponding to the preset position according to the position tag, or the electronic device transmits the position tag to the cloud server, so that the cloud server generates the preset position according to the position tag corresponding location information.
  4. 根据权利要求1或2所述的方法,其特征在于,所述预设位置对应的位置信息是根据当所述电子设备进入所述第一区域后所述电子设备响应于用户操作执行第一事件的情况下采集的位置标签来生成的,包括:The method according to claim 1 or 2, wherein the location information corresponding to the preset location is based on the electronic device executing a first event in response to a user operation after the electronic device enters the first area The collected location labels are generated, including:
    检测到电子设备进入第一区域后,获取所述电子设备执行第一事件的置信度,所述置信度表征用户操作触发执行所述第一事件的执行程度,其中,所述第一事件与所述第一动作有关联,所述电子设备执行所述第一事件时运行所述第一应用;After it is detected that the electronic device enters the first area, the confidence level of the electronic device executing the first event is obtained, and the confidence level represents the execution degree of the user operation triggering the execution of the first event, wherein the first event is related to the execution of the first event. The first action is associated, and the electronic device runs the first application when the electronic device executes the first event;
    当所述置信度表征所述第一事件执行结束,获取所述第一事件的执行结果,并对所述执行结果进行校验,得到校验结果;When the confidence level indicates that the execution of the first event is completed, the execution result of the first event is obtained, and the execution result is checked to obtain a check result;
    若所述校验结果表征所述第一事件执行成功,获取所述电子设备当前采集的的位置标签,所述位置标签表征所述电子设备在当前场所中获取到的环境信息;If the verification result indicates that the first event is successfully executed, obtain a location label currently collected by the electronic device, where the location label represents the environmental information obtained by the electronic device in the current location;
    所述电子设备根据所述位置标签生成所述预设位置对应的位置信息,或所述电子设备向云端服务器传输所述位置标签,使得所述云端服务器根据所述位置标签生成所述预设位置对应的位置信息。The electronic device generates the position information corresponding to the preset position according to the position tag, or the electronic device transmits the position tag to the cloud server, so that the cloud server generates the preset position according to the position tag corresponding location information.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述将所述位置标签与预设位置对应的位置信息进行对比,获取对比结果之前,所述方法还包括:The method according to any one of claims 1-4, characterized in that, before the comparing the location label with the location information corresponding to the preset location and obtaining the comparison result, the method further comprises:
    所述电子设备获取所述电子设备在所述预设位置对应的位置信息。The electronic device acquires position information corresponding to the electronic device at the preset position.
  6. 根据权利要求3或4所述的方法,其特征在于,所述当所述置信度表征所述第一事件执行结束,包括:The method according to claim 3 or 4, wherein, when the confidence level indicates that the execution of the first event ends, comprising:
    若确定所述置信度大于第一预设阈值,且小于或等于第二预设阈值,确定所述电子设备开始执行所述第一事件;若确定所述置信度大于所述第二预设阈值,确定所述电子设备执行完成所述第一事件,其中,所述第一预设阈值小于所述第二预设阈值。If it is determined that the confidence level is greater than a first preset threshold and less than or equal to a second preset threshold, it is determined that the electronic device starts to execute the first event; if it is determined that the confidence level is greater than the second preset threshold , determining that the electronic device completes the execution of the first event, wherein the first preset threshold is smaller than the second preset threshold.
  7. 根据权利要求4所述的方法,其特征在于,所述执行结果包括所述电子设备当前的显示界面。The method according to claim 4, wherein the execution result includes a current display interface of the electronic device.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,若所述位置标签包括:所述电子设备采集的全部的第一WIFI站点的地址、以及每个所述第一WIFI站点的信号强度,和所述电子设备获取到的第一小区标识、以及所述第一小区标识的信号强度;The method according to any one of claims 1-7, wherein if the location tag includes: addresses of all the first WIFI sites collected by the electronic device, and addresses of each of the first WIFI sites the signal strength, the first cell identifier obtained by the electronic device, and the signal strength of the first cell identifier;
    所述将所述位置标签与所述预设位置对应的位置信息进行对比,获取对比结果,包括:Comparing the location label with the location information corresponding to the preset location to obtain a comparison result, including:
    基于所述位置标签生成包括所述第一WIFI站点和所述第一小区标识的第一项集;generating a first item set including the first WIFI station and the first cell identifier based on the location tag;
    基于所述预设位置对应的位置信息生成包括所述第二WIFI站点和所述第二小区标识的第二项集;generating a second item set including the second WIFI station and the second cell identifier based on the location information corresponding to the preset location;
    根据所述第一项集和所述第二项集,计算得到所述位置标签和所述预设位置对应的位置信息的对比结果。According to the first item set and the second item set, a comparison result of the position label and the position information corresponding to the preset position is calculated and obtained.
  9. 根据权利要求1-7任一项所述的方法,其特征在于,若所述位置标签包括:所述 电子设备获取到的第一小区标识、以及所述第一小区标识的信号强度;The method according to any one of claims 1-7, wherein, if the location label includes: a first cell identifier obtained by the electronic device, and a signal strength of the first cell identifier;
    所述将所述位置标签与所述预设位置对应的位置信息进行对比,获取对比结果,包括:Comparing the location label with the location information corresponding to the preset location to obtain a comparison result, including:
    将所述第一小区标识与所述第二小区标识进行对比,获取对比结果;其中,若所述第一小区标识与所述第二小区标识相同,则所述对比结果表示所述位置标签与所述预设的位置信息相符合;若所述第一小区标识与所述第二小区标识不同,则所述对比结果表示所述位置标签与所述预设的位置信息不相符合。Compare the first cell identification with the second cell identification, and obtain a comparison result; wherein, if the first cell identification and the second cell identification are the same, the comparison result indicates that the location label is the same as the second cell identification. The preset location information is consistent; if the first cell identifier is different from the second cell identifier, the comparison result indicates that the location label does not correspond to the preset location information.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述二维码为地铁乘车码或健康状况相关的二维码或会员卡相关的二维码或优惠券相关的二维码。The method according to any one of claims 1-9, wherein the two-dimensional code is a subway ride code or a two-dimensional code related to a health condition, a two-dimensional code related to a membership card, or a two-dimensional code related to a coupon. dimensional code.
  11. 根据权利要求3-10任一所述的方法,其特征在于,所述获取所述电子设备执行第一事件的置信度,包括:The method according to any one of claims 3-10, wherein the acquiring a confidence level of the electronic device executing the first event comprises:
    所述响应于所述第一操作,所述电子设备运行第一应用,并显示所述第一界面之后,所述电子设备获取所述第一界面;After the electronic device runs a first application in response to the first operation and displays the first interface, the electronic device acquires the first interface;
    所述电子设备识别所述第一界面,得到第一识别结果;The electronic device identifies the first interface, and obtains a first identification result;
    所述电子设备根据所述第一识别结果确定所述第一事件的置信度;The electronic device determines the confidence level of the first event according to the first recognition result;
    每间隔第一预设时长,所述电子设备获取当前的显示界面,并根据所述当前的显示界面确定所述第一事件的置信度。The electronic device acquires the current display interface every first preset time period, and determines the confidence level of the first event according to the current display interface.
  12. 根据权利要求3-10任一所述的方法,其特征在于,所述获取所述电子设备执行第一事件的置信度,包括:The method according to any one of claims 3-10, wherein the acquiring a confidence level of the electronic device executing the first event comprises:
    所述电子设备接收到用户的握翻操作之后,经过第二预设时长,所述电子设备获取当前的显示界面;After the electronic device receives the user's grip and flip operation, after a second preset time period, the electronic device acquires the current display interface;
    所述电子设备识别所述当前的显示界面,得到第二识别结果;The electronic device identifies the current display interface, and obtains a second identification result;
    所述电子设备根据所述第二识别结果确定所述第一事件的置信度。The electronic device determines a confidence level of the first event according to the second recognition result.
  13. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    一个或多个处理器;存储器,所述存储器中存储有代码;触摸屏,用于检测触摸操作以及显示界面;one or more processors; a memory in which code is stored; a touch screen for detecting touch operations and displaying an interface;
    当所述代码被所述一个或多个处理器执行时,使得所述电子设备执行如权利要求1-12任一项所述的场景识别方法。When executed by the one or more processors, the code causes the electronic device to perform the scene recognition method of any one of claims 1-12.
PCT/CN2022/075559 2021-04-23 2022-02-08 Scenario recognition method and electronic device WO2022222576A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202280004912.9A CN115668989B (en) 2021-04-23 2022-02-08 Scene recognition method and electronic equipment

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202110444566.3A CN113115211A (en) 2021-04-23 2021-04-23 Multilayer fence construction method, cloud server and first terminal device
CN202110444566.3 2021-04-23
CN202110892061.3 2021-08-04
CN202110892061 2021-08-04

Publications (1)

Publication Number Publication Date
WO2022222576A1 true WO2022222576A1 (en) 2022-10-27

Family

ID=83723569

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/075559 WO2022222576A1 (en) 2021-04-23 2022-02-08 Scenario recognition method and electronic device

Country Status (2)

Country Link
CN (1) CN115668989B (en)
WO (1) WO2022222576A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115859158A (en) * 2023-02-16 2023-03-28 荣耀终端有限公司 Scene recognition method and system and terminal equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7556193B1 (en) * 2008-06-30 2009-07-07 International Business Machines Corporation Method and apparatus for affinity card consolidation
KR20130070116A (en) * 2011-12-19 2013-06-27 엘지전자 주식회사 Mobile terminal and method for controlling thereof
CN103365543A (en) * 2013-07-08 2013-10-23 宇龙计算机通信科技(深圳)有限公司 Terminal and two-dimensional code display method
CN109214810A (en) * 2018-07-25 2019-01-15 努比亚技术有限公司 A kind of two-dimensional code display method, mobile terminal and computer readable storage medium
CN109711226A (en) * 2018-12-25 2019-05-03 努比亚技术有限公司 Two-dimensional code identification method, device, mobile terminal and readable storage medium storing program for executing
WO2020148658A2 (en) * 2019-01-18 2020-07-23 Rathod Yogesh Methods and systems for displaying on map current or nearest and nearby or searched and selected location(s), geo-fence(s), place(s) and user(s) and identifying associated payments and account information for enabling to make and receive payments
CN113115211A (en) * 2021-04-23 2021-07-13 荣耀终端有限公司 Multilayer fence construction method, cloud server and first terminal device
CN114153343A (en) * 2021-10-22 2022-03-08 荣耀终端有限公司 Health code display method and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200396325A1 (en) * 2018-02-08 2020-12-17 Huawei Technologies Co., Ltd. Application switching method and terminal
CN110278230A (en) * 2018-03-16 2019-09-24 阿里巴巴集团控股有限公司 Data processing method, client, server and storage medium
CN108985195A (en) * 2018-06-29 2018-12-11 平安科技(深圳)有限公司 Activity recognition method, apparatus, computer equipment and storage medium
CN109167752B (en) * 2018-07-13 2021-04-23 奇酷互联网络科技(深圳)有限公司 Mobile terminal and method and device for automatically logging in application platform
CN109309911A (en) * 2018-11-23 2019-02-05 深圳市万通顺达科技股份有限公司 Two dimensional code call-out method based on bluetooth, device, payment system
CN114223222A (en) * 2019-10-18 2022-03-22 深圳市欢太科技有限公司 Terminal payment method and device, terminal equipment and computer readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7556193B1 (en) * 2008-06-30 2009-07-07 International Business Machines Corporation Method and apparatus for affinity card consolidation
KR20130070116A (en) * 2011-12-19 2013-06-27 엘지전자 주식회사 Mobile terminal and method for controlling thereof
CN103365543A (en) * 2013-07-08 2013-10-23 宇龙计算机通信科技(深圳)有限公司 Terminal and two-dimensional code display method
CN109214810A (en) * 2018-07-25 2019-01-15 努比亚技术有限公司 A kind of two-dimensional code display method, mobile terminal and computer readable storage medium
CN109711226A (en) * 2018-12-25 2019-05-03 努比亚技术有限公司 Two-dimensional code identification method, device, mobile terminal and readable storage medium storing program for executing
WO2020148658A2 (en) * 2019-01-18 2020-07-23 Rathod Yogesh Methods and systems for displaying on map current or nearest and nearby or searched and selected location(s), geo-fence(s), place(s) and user(s) and identifying associated payments and account information for enabling to make and receive payments
CN113115211A (en) * 2021-04-23 2021-07-13 荣耀终端有限公司 Multilayer fence construction method, cloud server and first terminal device
CN114153343A (en) * 2021-10-22 2022-03-08 荣耀终端有限公司 Health code display method and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115859158A (en) * 2023-02-16 2023-03-28 荣耀终端有限公司 Scene recognition method and system and terminal equipment
CN115859158B (en) * 2023-02-16 2023-07-07 荣耀终端有限公司 Scene recognition method, system and terminal equipment

Also Published As

Publication number Publication date
CN115668989B (en) 2024-04-02
CN115668989A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
US11227271B2 (en) Identity authentication method, device, and system
US11908239B2 (en) Image recognition network model training method, image recognition method and apparatus
US10248948B2 (en) Apparatus and method for providing interaction information by using image on device display
JP5457434B2 (en) Data access based on image content recorded by mobile devices
CN104636715A (en) Dynamic handwriting verification and handwriting-based user authentication
US20140302819A1 (en) Techniques for selecting a proximity card of a mobile device for access
US10972861B2 (en) Electronic device and system for providing point of interest information
US20230098616A1 (en) Method for Invoking NFC Application, Electronic Device, and NFC Apparatus
WO2016062173A1 (en) User attribute value transfer method and terminal
CN104580325A (en) User pairing method and device, as well as data exchange method, device and system
US20220164423A1 (en) Method and apparatus for user recognition
WO2019178817A1 (en) Product sales volume extraction and reporting method, payment method, and terminal apparatus
WO2022222576A1 (en) Scenario recognition method and electronic device
US20160110372A1 (en) Method and apparatus for providing location-based social search service
CN102857624B (en) Notification method, notification device and source electronic equipment
EP3992886A1 (en) Method and system for contactless transaction attempt detection
US20150212783A1 (en) Method of controlling permission and touch link electronic device utilizing the same
US20170139847A1 (en) Apparatus and method for providing handoff thereof
WO2023173666A1 (en) Facial recognition payment method and apparatus, electronic device, storage medium, program and product
US20170206658A1 (en) Image detection of mapped features and identification of uniquely identifiable objects for position estimation
US9160422B2 (en) Data capturing method of NFC protocol and NFC electronic device using the same
JP5929573B2 (en) Evaluation system, program
TWM579779U (en) Self-service merchandise pick-up system
US20220345566A1 (en) Prediction-based control method using usage pattern and device thereof
KR102550261B1 (en) Mobile terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22790686

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE