Scene recognition method, device, terminal and storage medium
By communicating with the NFC card reader at the entrance of the target site and the terminal NFC chip, characteristic information is obtained and matched, the problem of WiFi recognition lag is solved, and high-reliability scene recognition is achieved.
Patent Information
- Application Number
- CN202210491858.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-07
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-05-07
AI Technical Summary
In the prior art, when scene recognition is performed based on WiFi, there is recognition lag, resulting in low reliability of scene recognition.
By installing an NFC card reader at the entrance of the target site, the terminal uses its own NFC chip to communicate with the card reader, obtains the card reader's feature information, and matches the stored feature information to accurately capture the user's action of entering the target site.
It improves the reliability of scene recognition, ensures that the terminal can identify users entering the target place in a timely and accurate manner, and reduces the identification cost.
Smart Images

Figure CN114928828B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of short-range communication technology, and in particular to a scene recognition method, device, terminal, and storage medium. Background Art
[0002] At present, the application of scene recognition is becoming more and more extensive; for example, with the popularization of smart home devices, when the terminal recognizes a smart home scene, the terminal can control the smart home device to perform corresponding operations; for example, the terminal can control the smart lamps to turn on the lights, control the smart curtains to close the curtains, etc.
[0003] In the related art, scene recognition is performed through Wireless Fidelity (WiFi); for example, when the terminal is connected to the home WiFi network, it is determined that a smart home scene is recognized and the smart home devices are controlled to perform corresponding operations.
[0004] Because the terminal searches for Wi-Fi networks at a preset interval, if the terminal fails to find a Wi-Fi network in the previous interval but finds one in the next, the user may already be home. This indicates that Wi-Fi-based scene recognition can experience lags, leading to low scene recognition reliability. Summary of the Invention
[0005] The embodiments of the present application provide a scene recognition method, device, terminal, and storage medium, which can improve the reliability of scene recognition. The technical solution is as follows:
[0006] In one aspect, a scene recognition method is provided, the method comprising:
[0007] When the terminal enters a recognition range of a near field communication (NFC) reader, obtaining first feature information of the NFC reader, wherein the NFC reader is installed at an entrance of a target location and is used to control the opening and closing of a barrier at the entrance, and the terminal is used to communicate with the NFC reader via an NFC chip included in the terminal to request the NFC reader to open the barrier at the entrance, allowing the target object to enter the target location;
[0008] Matching the first feature information with a plurality of stored feature information, where the plurality of feature information is feature information of a set scene;
[0009] In a case where the plurality of stored feature information includes target feature information matching the first feature information, a target scene corresponding to the target feature information is entered, and the target scene is associated with the target location.
[0010] In another aspect, a scene recognition device is provided, the device comprising:
[0011] an acquisition module, configured to acquire first feature information of a near-field communication (NFC) reader when the terminal enters a recognition range of the NFC reader, wherein the NFC reader is installed at an entrance to a target location and is configured to control the opening and closing of a barrier at the entrance, and the terminal is configured to communicate with the NFC reader via its own NFC chip to request the NFC reader to open the barrier at the entrance, thereby allowing a target object to enter the target location;
[0012] a matching module, configured to match the first feature information with a plurality of stored feature information, wherein the plurality of feature information is feature information of a set scene;
[0013] An entry module is used to enter a target scene corresponding to the target feature information when the stored multiple feature information include target feature information matching the first feature information, and the target scene is associated with the target place.
[0014] On the other hand, a terminal is provided, comprising a processor and a memory; the memory stores at least one program code, and the at least one program code is configured to be executed by the processor to implement the scene recognition method as described in the above aspect.
[0015] On the other hand, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one program code, and the at least one program code is configured to be executed by a processor to implement the scene recognition method as described in the above aspect.
[0016] On the other hand, a computer program product is provided. The computer program product stores at least one program code, and the at least one program code is used to be executed by a processor to implement the scene recognition method as described in the above aspect.
[0017] In the embodiment of the present application, since the NFC reader is installed at the entrance of the target place, and the terminal enters the recognition range of the NFC reader, it means that the terminal is trying to swipe the card at this moment, which directly represents the user's action of entering the target place. Therefore, scene recognition is performed based on the first feature information of the NFC reader, which can accurately capture the user's action of entering the target place, thereby improving the reliability of scene recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram showing an implementation environment of a scene recognition method according to an exemplary embodiment of the present application is shown;
[0019] Figure 2A flow chart of a scene recognition method according to an exemplary embodiment of the present application is shown;
[0020] Figure 3 A flow chart of a scene recognition method according to an exemplary embodiment of the present application is shown;
[0021] Figure 4 A flow chart of a scene recognition method according to an exemplary embodiment of the present application is shown;
[0022] Figure 5 A flow chart of a scene recognition method according to an exemplary embodiment of the present application is shown;
[0023] Figure 6 A structural block diagram of a scene recognition device according to an exemplary embodiment of the present application is shown;
[0024] Figure 7 The figure shows a structural block diagram of a terminal according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0026] The term "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship. Furthermore, the relevant data involved in this application may be authorized by the user or fully authorized by all parties.
[0027] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the feature information, services, scenarios, historical movement trajectories and itinerary information involved in this application are all obtained with full authorization.
[0028] Please refer to Figure 1, which shows a schematic diagram of an implementation environment of a scene recognition method according to an exemplary embodiment of the present application; the implementation environment includes: a terminal 101 and a near field communication (NFC) reader 102. The NFC reader 102 is installed at the entrance of a target location and is used to control the opening and closing of a checkpoint at the entrance of the target location. The terminal 101 can communicate with the NFC reader 102 via its NFC chip to request the NFC reader 102 to open the checkpoint at the entrance, thereby allowing a target object to enter the target location. The target object can be a user, a robot, or the like.
[0029] The target location can be any location; for example, the target location can be a residence, a parking lot, a transportation station, or a vehicle. The transportation station can be a passenger station, a train station, a high-speed rail station, or an airport. For example, if the target location is a residence, the NFC card reader 102 can be installed at the door of a home, the door of an apartment building, or the door of a residential complex. If the target location is a parking lot, the NFC card reader 102 can be installed at the gate entrance of the parking lot. If the target location is a transportation station, the NFC card reader 102 can be installed at the gate entrance of the transportation station. If the target location is a vehicle, the NFC card reader 102 can be installed on the door handle of the vehicle. The terminal 101101 is at least one of a mobile phone, a tablet computer, a watch, or a wristband.
[0030] Please refer to Figure 2 , which shows a flow chart of a scene recognition method according to an exemplary embodiment of the present application. The method includes:
[0031] Step S201: When the terminal enters the recognition range of the NFC card reader, the terminal obtains first feature information of the NFC card reader.
[0032] The NFC reader is installed at the entrance of the target place and is used to control the opening and closing of the gate at the entrance. The terminal is used to communicate with the NFC reader through the NFC chip it includes to request the NFC reader to open the gate at the entrance, allowing the target object to enter the target place.
[0033] When a terminal enters the recognition range of an NFC reader, the terminal activates the NFC Smart Terminal Recognition (STR) function and uses the NFC STR function to identify the first characteristic information of the NFC reader. The first characteristic information can be any information used to represent the characteristics of the NFC reader; for example, the first characteristic information can be a polling characteristic.
[0034] It should be noted that the communication reliability of the NFC STR function is relatively high. In addition, NFC is near-field communication, and there is no instability problem caused by electromagnetic wave radiation in the air. Therefore, scene recognition through the NFC STR function can improve reliability.
[0035] Step S202: The terminal matches the first feature information with a plurality of stored feature information, where the plurality of feature information is feature information of a set scene.
[0036] The terminal determines the matching degree between the first feature information and the multiple stored feature information to obtain multiple matching degrees; if there is a target matching degree among the multiple matching degrees, it is determined that the multiple stored feature information includes target feature information that matches the first feature information, the target matching degree is a matching degree that exceeds the preset matching degree, and the target feature information is feature information corresponding to the target matching degree, and step S203 is executed; if there is no target matching degree among the multiple matching degrees, it is determined that the multiple stored feature information does not include the target feature information, and the process ends.
[0037] Another point that needs to be explained is that when there is no target match among multiple matches, the terminal ends the scene recognition process and enters the unlocking process, that is, the terminal communicates with the NFC reader based on the NFC chip to request the NFC reader to open the checkpoint at the entrance of the target place, allowing the target object to enter the target place.
[0038] Step S203: When the stored feature information includes target feature information matching the first feature information, the terminal enters a target scene corresponding to the target feature information, and the target scene is associated with the target location.
[0039] The terminal sets the correspondence between feature information and scenes in advance; accordingly, after determining the target feature information, the terminal determines the target scene corresponding to the target feature information from the correspondence between the feature information and scenes based on the target feature information, and then enters the target scene.
[0040] One thing that needs to be explained is that since most terminals have NFC chips, obtaining the first feature information of the NFC card reader through the NFC chip and performing scene recognition based on the first feature information does not require updating the terminal, thereby reducing the cost of scene recognition.
[0041] In the embodiment of the present application, since the NFC reader is installed at the entrance of the target place, and the terminal enters the recognition range of the NFC reader, it means that the terminal is trying to swipe the card at this moment, which directly represents the user's action of entering the target place. Therefore, scene recognition is performed based on the first feature information of the NFC reader, which can accurately capture the user's action of entering the target place, thereby improving the reliability of scene recognition.
[0042] Please refer to Figure 3 , which shows a flow chart of a scene recognition method according to an exemplary embodiment of the present application. The method includes:
[0043] Step S301: When a terminal enters a recognition range of a near field communication (NFC) card reader, the terminal obtains first feature information of the NFC card reader.
[0044] An NFC reader is installed at the entrance of a target location to control the opening and closing of the entrance barrier. The terminal communicates with the NFC reader via its own NFC chip, requesting the NFC reader to open the entrance barrier, allowing the target person to enter the target location. The target location can be a residence, parking lot, transportation station, or vehicle. Transportation stations can be bus stations, train stations, high-speed rail stations, or airports.
[0045] When the terminal enters the recognition range of the NFC reader, the terminal activates the NFC STR function and uses the NFC STR function to identify the first characteristic information of the NFC reader. The first characteristic information can be any information used to represent the characteristics of the NFC reader; for example, the first characteristic information can be a polling characteristic.
[0046] It should be noted that the communication reliability of the NFC STR function is relatively high. In addition, NFC is near-field communication, and there is no instability problem caused by electromagnetic wave radiation in the air. Therefore, scene recognition through the NFC STR function can improve reliability.
[0047] In one possible implementation, the NFC chip of the terminal is in an on state, and whether the terminal enters the recognition range of the NFC card reader is determined based on the NFC chip, thereby improving the timeliness of recognition. In another possible implementation, the NFC chip of the terminal is first in an off state, and when the terminal approaches the entrance of the target place, the terminal switches the NFC from an off state to an on state, thereby saving the power consumption of the terminal. In another possible implementation, the NFC chip of the terminal is first in an off state, and when the terminal detects a gesture operation for turning on the NFC chip (for example, a gesture operation of raising the terminal), the terminal switches the NFC from an off state to an on state, thereby saving the power consumption of the terminal.
[0048] Among them, the terminal determines whether the terminal is close to the entrance of the target place based on the positioning method of the Global Positioning System (GPS). The process is: the terminal locates the position of the terminal based on the GPS, and determines the distance between the terminal and the entrance of the target place based on the position of the terminal and the position of the entrance of the target place; if the distance is less than a first preset distance, it is determined that the terminal is close to the entrance of the target place; if the distance is not less than the first preset distance, it is determined that the terminal is not close to the entrance of the target place.
[0049] It should be noted that if the target location is a residence, parking lot, transportation station, or vehicle, the user generally enters the target location after get off work hours. If the target location is a transportation station, the user generally enters the target location at the corresponding time only after purchasing a ticket in advance. Accordingly, the terminal can control the activation of the NFC chip based on time information or boarding information. This process may include at least one of the following implementation methods:
[0050] The terminal determines a first time range based on the historical movement trajectory of the target object, where the first time range is the time range in which the target object may enter the target location; if the current moment is within the first time range, the terminal switches NFC from an off state to an on state.
[0051] The terminal determines a second time range based on the travel information of the target object, where the second time range is the time range in which the target object may enter the target location; if the current moment is within the second time range, the terminal switches NFC from an off state to an on state.
[0052] Step S302: the terminal matches the first feature information with a plurality of stored feature information, where the plurality of feature information is feature information of a set scene.
[0053] The terminal includes an application processor that stores characteristic information of a set scene. After obtaining first characteristic information, the terminal reports the first characteristic information to the application processor. The application processor matches the first characteristic information with the stored characteristic information and returns a matching result to the terminal. The matching result indicates whether the plurality of stored characteristic information includes target characteristic information that matches the first characteristic information.
[0054] In one possible implementation, the terminal directly matches the feature information to determine a matching result; in another possible implementation, the terminal may assign index information to the feature information, where the index information is used to uniquely identify the feature information. However, the index information is simpler than the feature information, so that the feature information is matched based on the simple index information, which can reduce the computational complexity of feature matching and thus improve matching efficiency. Accordingly, the step of the terminal matching the first feature information with the plurality of stored feature information can be implemented by the following steps (1) to (3), including:
[0055] (1) The terminal determines first index information corresponding to the first feature information, where the first index information is used to uniquely identify the first feature information. However, the complexity of the first index information is lower than the complexity of the first feature information.
[0056] The first index information can be a number or descriptive information of the target location corresponding to the first characteristic information. In the embodiment of the present application, the specific form of the first index information is not specifically limited. For example, if the index information is represented by a number, the first index information corresponding to the first characteristic information is shown in Table 1 below:
[0057] Table 1
[0058] Target location Place of residence PARKING LOT Transportation stations vehicle First index information corresponding to the first feature information 0 1 2 3
[0059] For another example, if the index information is represented by the description information, the first index information corresponding to the first feature information is shown in Table 2 below:
[0060] Table 2
[0061] Target location Place of residence PARKING LOT Transportation stations vehicle First index information corresponding to the first feature information Home PARKING LOT High-speed rail station vehicle
[0062] (2) The terminal matches the first index information with a plurality of stored index information, where the plurality of stored index information is index information corresponding to a plurality of feature information, and one index information corresponds to one feature information.
[0063] For example, if the index information is represented by numbers and the target location is a residence, the first index information corresponding to the first feature information is 0, and the multiple stored index information are 0, 1, 2 and 3 respectively; the terminal can directly match 0 with the stored 0, 1, 2 and 3.
[0064] For another example, if descriptive information is used to represent index information and the target place is a residence, the first index information corresponding to the first feature information is "home", and the multiple index information stored are "home", "parking lot", "high-speed rail station" and "vehicle" respectively; the terminal can directly match "home" with the stored "home", "parking lot", "high-speed rail station" and "vehicle".
[0065] (3) When the plurality of index information includes target index information matching the first index information, the terminal determines that the plurality of stored feature information includes the target feature information, and the target feature information is feature information corresponding to the target index information.
[0066] One thing that needs to be explained is that, when the stored multiple feature information includes target feature information that matches the first feature information, step S303 is executed; when the target index information is not included in the multiple index information, the terminal determines that the stored multiple feature information does not include the target feature information and ends.
[0067] In another possible implementation, the terminal selects the second feature information from the stored multiple feature information, matches the first feature information with the selected second feature information, and thereby determines whether the target feature information exists. Since the amount of second feature information is relatively small, matching the first feature information with the selected second feature information can reduce the computational complexity of feature matching, thereby improving matching efficiency. The step of the terminal selecting the second feature information from the stored multiple feature information may be:
[0068] The terminal filters out the second characteristic information from the multiple second characteristic information based on the current location of the terminal and the locations corresponding to the multiple characteristic information. The location corresponding to any characteristic information is the location of the NFC reader corresponding to the characteristic information; the distance between the location corresponding to the second characteristic information and the current location is less than the second preset distance.
[0069] Step S303: When the stored multiple feature information include target feature information matching the first feature information, the terminal communicates with the NFC reader based on the NFC chip to request the NFC reader to authenticate the NFC chip.
[0070] Based on the communication connection between the NFC chip and the NFC reader, the terminal sends the identity information of the NFC chip to the NFC reader; if the NFC reader determines that the terminal has the authority to enter the target place based on the identity information, the NFC reader sends a confirmation message to the terminal, which is used to indicate that the NFC chip identity authentication is successful; if the NFC reader determines that the terminal does not have the authority to enter the target place based on the identity information, the NFC reader sends a negative message to the terminal, which is used to indicate that the NFC chip identity authentication is unsuccessful. Accordingly, when the terminal receives the confirmation message sent by the NFC reader, the terminal determines that the NFC reader has successfully authenticated the NFC chip and executes step S304; if the terminal receives the negative message sent by the NFC chip, the terminal determines that the NFC reader has failed the NFC chip identity authentication and ends.
[0071] Step S304: When the NFC card reader passes the authentication of the NFC chip, the terminal enters the target scene corresponding to the target feature information, and the target scene is associated with the target place.
[0072] The target location is a residence, parking lot, transportation station, or vehicle, etc. The terminal has pre-set the correspondence between feature information and scenes; accordingly, after determining the target feature information, the terminal determines the target scene corresponding to the target feature information based on the correspondence between the feature information and scenes, and then enters the target scene.
[0073] In a first implementation, if the target location is a residence, the target scene is used to control smart home devices included in the residence. Accordingly, the terminal may enter the target scene corresponding to the target feature information by controlling the smart home device to perform a first target operation. For example, if the smart home device is at least one of a smart router and a smart lamp, the terminal may control the smart router to be turned on and / or control the smart lamp to turn on.
[0074] It should be noted that the terminal can not only control the smart home device to perform the first target operation, but also control itself to perform the fourth target operation; for example, the terminal turns on the WiFi module, sets it to silent mode, or cancels silent mode, etc.
[0075] The second implementation method: if the target place is a parking lot, the target scene is used to control the content displayed on the terminal; accordingly, the step of the terminal entering the target scene corresponding to the target feature information can be: the terminal displays an electronic map of the parking lot, which can be a two-dimensional (2D) map or a three-dimensional (3D) map, etc. In the embodiment of the present application, the display format of the map is not specifically limited.
[0076] A third implementation method: If the target location is a transportation station, the target scene is used to control the content displayed on the terminal. Accordingly, the step of the terminal entering the target scene corresponding to the target characteristic information may include: the terminal displays the corresponding travel information of the currently logged-in account at the transportation station, where the travel information includes at least one of train number information, time information, seat information, and platform information. The terminal may display not only the travel information but also navigation information, where the navigation information is from the terminal's current location to the platform information.
[0077] Among them, the terminal can display the boarding information in the negative first screen, or pop up a display box on the terminal to display the boarding information in the display box. In the embodiment of the present application, the specific manner in which the terminal displays the boarding information is not specifically limited.
[0078] The fourth implementation method: if the target location is a vehicle, the target scene is used to control the vehicle; accordingly, the step for the terminal to enter the target scene corresponding to the target feature information can be: the terminal establishes a short-distance communication connection with the vehicle's on-board terminal, and based on the short-distance communication connection, controls the on-board terminal to perform the second target operation.
[0079] The short-range communication connection may be a Bluetooth connection or a WiFi connection, etc.; the step of the terminal controlling the vehicle-mounted terminal to perform the second target operation includes at least one of the following implementation methods, including:
[0080] The terminal controls the vehicle terminal to open the navigation application;
[0081] The terminal controls the vehicle terminal to open the audio playback application.
[0082] It should be noted that if the target location is a vehicle, the target scene is used to control the vehicle. Accordingly, the step of the terminal entering the target scene corresponding to the target feature information may include: the terminal establishing a short-range communication connection with the vehicle's onboard terminal, and controlling the vehicle's onboard device to perform the third target operation based on this short-range communication connection. The onboard device may be a vehicle seat, and accordingly, the step of the terminal controlling the vehicle's onboard device to perform the third target operation may include: the terminal controlling the vehicle seat to heat it.
[0083] The terminal sets the correspondence between the feature information and the scene in advance; and the correspondence can be agreed upon with the user through the scene configuration interface; accordingly, the process of the terminal setting the correspondence between the feature information and the scene can be:
[0084] The terminal displays a scene configuration interface, which is used to configure the correspondence between feature information and scenes. The scene configuration interface includes the feature information of the NFC card reader historically identified by the terminal and the location information of the location where the NFC card reader is located; based on the location information, the configured scene is obtained and the correspondence between the feature information and the scene is established.
[0085] In an embodiment of the present application, the user can configure the correspondence between feature information and scenes through the scene configuration interface, thereby achieving personalized settings.
[0086] In the embodiment of the present application, since the NFC reader is installed at the entrance of the target place, and the terminal enters the recognition range of the NFC reader, it means that the terminal is trying to swipe the card at this moment, which directly represents the user's action of entering the target place. Therefore, scene recognition is performed based on the first feature information of the NFC reader, which can accurately capture the user's action of entering the target place, thereby improving the reliability of scene recognition.
[0087] Please refer to Figure 4, which shows a flow chart of a scene recognition method according to an exemplary embodiment of the present application. The method includes:
[0088] Step S401: When the terminal enters the recognition range of the NFC card reader, the terminal obtains first feature information of the NFC card reader.
[0089] Step S402: The terminal matches the first feature information with the stored feature information, where the stored feature information is the feature information of the set scene.
[0090] It should be noted that steps S401-S402 are the same as steps S301 and S302 respectively, and are not described again here.
[0091] Step S403: When the stored characteristic information includes target characteristic information matching the first characteristic information, the terminal obtains a first duration of a service corresponding to the target scenario, where the first duration is a response duration of the service.
[0092] The terminal sets the correspondence between the scene corresponding service and the first duration in advance; accordingly, the terminal obtains the first duration of the target location corresponding service from the correspondence between the service and the first duration based on the target scene corresponding service.
[0093] In the first implementation method, the target place is a residence, and the target scene is used to control the smart home devices included in the residence; the service is a service provided by the smart home devices; for example, the smart home devices are smart routers or smart lamps; since the operation of turning on the smart router or turning on the smart lamps takes a short time, the first duration of the service corresponding to the target scene can be set to a shorter duration; for example, the first duration is 2 seconds or 5 seconds, etc.
[0094] In the second implementation method, the target location is a parking lot, and the target scene is used to control the content displayed on the terminal; then the service is the service corresponding to the electronic map of the parking lot displayed on the terminal; since the time required for the terminal to display the electronic map is also relatively short, therefore, the first duration of the service corresponding to the target scene can be set to a shorter duration; for example, the first duration is 3 seconds or 4 seconds, etc.
[0095] In the third implementation method, the target location is a transportation station, and the target scene is used to control the content displayed on the terminal; then the service is the service corresponding to the terminal displaying the boarding information; since the time required for the terminal to display the boarding information is also relatively short; therefore, the first duration of the service corresponding to the target scene can be set to a shorter duration; for example, the first duration is 2 seconds or 3 seconds, etc.
[0096] The fourth implementation method is that the target location is a vehicle, and the target scene is used to control the vehicle; then the service is the service corresponding to the vehicle-mounted terminal performing the second target operation or the service corresponding to the vehicle-mounted device performing the third target operation; since the time required for the vehicle-mounted terminal to perform the second target operation is also relatively short, the first duration can be set to a shorter duration; for example, the first duration is 2 seconds or 3 seconds; and the time required for the vehicle-mounted device to perform the third target operation is longer, so the first duration can be set to a longer duration; for example, the first duration is 5 minutes or 10 minutes, etc.
[0097] Step S404: the terminal obtains a second duration, which is the time required for the target object to obtain the service from the entrance of the target place.
[0098] The terminal determines the second duration based on the distance between the entrance of the target location and the location where the service is provided, and the moving speed of the target object, wherein the terminal determines the second duration as a ratio of the distance to the moving speed.
[0099] The target object's moving speed may be determined based on the type of the target location; accordingly, the step of the terminal determining the target object's moving speed may include obtaining a moving speed that matches the type of the target location. For example, if the target location is a residence, the target object's moving speed is the user's walking speed. For another example, if the target location is a parking lot, the target object's moving speed is the vehicle's driving speed, which is no higher than the parking lot's speed limit. For another example, if the target location is a transportation station, the target object's moving speed is the user's walking speed. For another example, if the target location is a vehicle, the target object's moving speed is the user's walking speed.
[0100] Step S405: The terminal determines a timestamp based on the first duration and the second duration, where the timestamp is the start time of entering the target scene.
[0101] When the first duration is greater than the second duration, it means that the time required to respond to the service is long, and it is necessary to enter the target scene as soon as possible. The terminal determines the timestamp as the current moment. When the first duration is equal to the second duration, it means that the time required to respond to the service is the same as the time required for the target object to reach the location of the service. The terminal determines the moment of the first duration (or second duration) after the current moment as the timestamp. When the first duration is less than the second duration, it means that the time required for the target object to reach the location of the service is long, and it may take some time to enter the target location. The terminal determines the difference between the second duration and the first duration, and determines the moment of the difference after the current moment as the timestamp.
[0102] Step S406: The terminal enters the target scene at the timestamp.
[0103] In an embodiment of the present application, the start time for entering the target scene is first determined, and the target place is entered at the start time, so that the moment of entering the target place can be accurately controlled, thereby avoiding the increase in energy consumption caused by entering the target place too early, and avoiding the user from not being able to enjoy the services corresponding to the target scene in time.
[0104] Please refer to Figure 5 , which shows a flow chart of a scene recognition method according to an exemplary embodiment of the present application. The method includes:
[0105] Step S501: When the terminal enters the recognition range of the NFC card reader, the terminal communicates with the NFC card reader based on the NFC chip to request the NFC card reader to authenticate the NFC chip.
[0106] One thing that needs to be explained is that the step in which the terminal communicates with the NFC reader based on the NFC chip to request the NFC reader to authenticate the NFC chip is the same as the step in step S303 of "the terminal communicates with the NFC reader based on the NFC chip to request the NFC reader to authenticate the NFC chip", which will not be repeated here.
[0107] Step S502: When the NFC card reader passes the authentication of the NFC chip, the terminal obtains first feature information of the NFC card reader.
[0108] It should be noted that the step of the terminal obtaining the first characteristic information of the NFC card reader is the same as the step of "the terminal obtaining the first characteristic information of the NFC card reader" in step S301, and will not be repeated here.
[0109] Step S503: the terminal matches the first feature information with the stored feature information, where the stored feature information is the feature information of the set scene.
[0110] It should be noted that step S503 is the same as step S302 and will not be described again here.
[0111] Step S504: When the stored feature information includes target feature information matching the first feature information, the terminal enters a target scene corresponding to the target feature information, and the target scene is associated with the target location.
[0112] It should be noted that the step of the terminal entering the target scene corresponding to the target feature information is the same as the step of "the terminal entering the target scene corresponding to the target feature information" in step S304, and will not be repeated here.
[0113] In the embodiment of the present application, the terminal first requests the NFC card reader to authenticate the NFC chip. Only when the authentication is successful does the terminal perform scene recognition based on the first feature information of the NFC card reader. This avoids the situation where the terminal has entered the target scene, but the target object cannot obtain the service corresponding to the target scene due to the failure of the NFC chip's authentication, thereby avoiding the waste of energy. As can be seen from this, the present application can save energy.
[0114] Please refer to Figure 6 , which shows a structural block diagram of a scene recognition device shown in an exemplary embodiment of the present application. The scene recognition device can be implemented as all or part of a processor through software, hardware, or a combination of both. The device includes:
[0115] An acquisition module 601 is configured to acquire first feature information of a near field communication (NFC) reader when the terminal enters a recognition range of the NFC reader. The NFC reader is installed at the entrance of a target location and is configured to control the opening and closing of a barrier at the entrance. The terminal is configured to communicate with the NFC reader via its own NFC chip to request the NFC reader to open the barrier at the entrance, thereby allowing the target object to enter the target location.
[0116] A matching module 602 is configured to match the first feature information with a plurality of stored feature information, where the plurality of feature information is feature information of a set scene;
[0117] The entry module 603 is used to enter the target scene corresponding to the target feature information when the stored multiple feature information include target feature information matching the first feature information, and the target scene is associated with the target place.
[0118] In one possible implementation, entering module 603 includes:
[0119] A first communication unit is configured to communicate with an NFC card reader based on the NFC chip to request the NFC card reader to authenticate the NFC chip;
[0120] The first entry unit is used to enter the target scene corresponding to the target feature information when the NFC card reader passes the identity authentication of the NFC chip.
[0121] In another possible implementation, entering module 603 includes:
[0122] A first acquiring unit is configured to acquire a first duration of a service corresponding to a target scenario, where the first duration is a response duration of the service;
[0123] A second acquiring unit is configured to acquire a second duration, where the second duration is the duration required for the target object to obtain the service from the entrance of the target location;
[0124] A first determining unit, configured to determine a timestamp based on the first duration and the second duration, where the timestamp is a start time of entering a target scene;
[0125] The second entry unit is used to enter the target scene at a timestamp.
[0126] In another possible implementation, module 603 may include any of the following units:
[0127] The target location is a residence, and the target scene is used to control the smart home devices included in the residence; the first control unit is used to control the smart home devices to perform the first target operation;
[0128] The target location is a parking lot, and the target scene is used to control the content displayed on the terminal; the display unit is used to display an electronic map of the parking lot;
[0129] The target location is a transportation station. The target scene is used to control the content displayed on the terminal, and the corresponding boarding information of the current logged-in account at the transportation station is displayed;
[0130] The target location is a vehicle, and the target scene is used to control the vehicle; the second control unit is used to establish a short-distance communication connection with the on-board terminal in the vehicle, and based on the short-distance communication connection, control the vehicle terminal to perform a second target operation or control the on-board device in the vehicle to perform a third target operation.
[0131] In another possible implementation, the matching module 602 includes:
[0132] a second determining unit, configured to determine first index information corresponding to the first feature information, where the first index information is used to uniquely identify the first feature information, but the complexity of the first index information is lower than the complexity of the first feature information;
[0133] a matching unit, configured to match the first index information with a plurality of stored index information, where the plurality of stored index information is index information corresponding to a plurality of feature information, and one index information corresponds to one feature information;
[0134] The third determining unit is configured to determine, when the plurality of index information includes target index information matching the first index information, that the plurality of stored feature information includes target feature information, and the target feature information is feature information corresponding to the target index information.
[0135] In another possible implementation, the obtaining module 601 includes:
[0136] A second communication unit is configured to communicate with an NFC card reader based on the NFC chip to request the NFC card reader to authenticate the NFC chip;
[0137] The third acquiring unit is configured to acquire first feature information of the NFC card reader when the NFC card reader passes the identity authentication of the NFC chip.
[0138] It should be noted that the scene recognition method provided in the above embodiments is illustrated only by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the scene recognition device provided in the above embodiments and the scene recognition method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0139] In the embodiment of the present application, since the NFC reader is installed at the entrance of the target place, and the terminal enters the recognition range of the NFC reader, it means that the terminal is trying to swipe the card at this moment, which directly represents the user's action of entering the target place. Therefore, scene recognition is performed based on the first feature information of the NFC reader, which can accurately capture the user's action of entering the target place, thereby improving the reliability of scene recognition.
[0140] Please refer to Figure 7 , which shows a block diagram of the terminal structure shown in an exemplary embodiment of the present application. Terminal 700 can be a device such as a smartphone or tablet computer that has the function of controlling other devices. Terminal 700 in the present application may include one or more of the following components: processor 710 and memory 720.
[0141] The processor 710 may include one or more processing cores. The processor 710 uses various interfaces and lines to connect the various parts of the entire terminal 700, and executes various functions and processes data of the terminal 700 by running or executing program code, programs, code sets or program code sets stored in the memory 720, and calling data stored in the memory 720. Optionally, the processor 710 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 710 can integrate one or more combinations of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to handle wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 710, but may be implemented by a separate chip.
[0142] The memory 720 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 720 includes a non-transitory computer-readable storage medium. The memory 720 may be used to store program code, a program, a code, a code set, or a program code set. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store program code for implementing an operating system, program code for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), program code for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the terminal 700 (such as audio data, a phone book), etc.
[0143] In addition, those skilled in the art will appreciate that the structure of terminal 700 shown in the above figures does not limit terminal 700. Terminal 700 may include more or fewer components than shown, or may combine certain components, or arrange components differently. For example, terminal 700 also includes a microphone, a speaker, a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (Wi-Fi) module, a power supply, a Bluetooth module, and other components, which will not be described in detail here.
[0144] An embodiment of the present application further provides a computer-readable medium, which stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the scene recognition method shown in the above embodiments.
[0145] An embodiment of the present application further provides a computer program product, which stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the scene recognition method shown in the above embodiments.
[0146] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected through a communication network. Multiple computer devices distributed at multiple locations and interconnected through a communication network may constitute a blockchain system.
[0147] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more program codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0148] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A scene recognition method, characterized in that: The method comprises: When the terminal enters a recognition range of a near-field communication (NFC) reader, obtaining a polling feature of the NFC reader, wherein the NFC reader is installed at an entrance to a target location and is used to control the opening and closing of a barrier at the entrance, and the terminal is used to communicate with the NFC reader via an NFC chip included in the terminal to request the NFC reader to open the barrier at the entrance, allowing the target object to enter the target location; Matching the polling feature with a plurality of stored feature information, wherein the plurality of feature information is feature information of a set scene; When the stored plurality of feature information do not include target feature information matching the polling feature, communicating with the NFC card reader based on the NFC chip to request the NFC card reader to open the barrier at the entrance, so that the target object enters the target location; In a case where the stored multiple feature information include target feature information that matches the polling feature, communication is performed with the NFC reader based on the NFC chip to request the NFC reader to authenticate the NFC chip; in a case where the NFC reader successfully authenticates the NFC chip, entering a target scene corresponding to the target feature information, where the target scene is associated with the target place, and is used to control smart home devices included in the target place, or the target scene is used to control content displayed on the terminal, or the target scene is used to control a vehicle.
2. The method according to claim 1, characterized in that The step of entering a target scene corresponding to the target feature information includes: Obtaining a first duration of a service corresponding to the target scenario, where the first duration is a response duration of the service; Obtaining a second duration, where the second duration is the time required for the target object to obtain the service from the entrance of the target location; Determine a timestamp based on the first duration and the second duration, where the timestamp is the start time of entering the target scene; At the timestamp, enter the target scene.
3. The method according to claim 1, characterized in that The step of entering the target scene corresponding to the target feature information includes any of the following implementations: The target location is a residence, and the target scene is used to control smart home devices included in the residence; then the smart home devices are controlled to perform a first target operation; The target location is a parking lot, and the target scene is used to control the content displayed on the terminal; an electronic map of the parking lot is displayed; The target location is a transportation station, and the target scene is used to control the content displayed on the terminal, so the boarding information corresponding to the current login account at the transportation station is displayed; The target location is a vehicle, and the target scene is used to control the vehicle; a short-distance communication connection is established with the on-board terminal in the vehicle, and based on the short-distance communication connection, the vehicle terminal is controlled to perform a second target operation or the on-board device in the vehicle is controlled to perform a third target operation.
4. The method according to claim 1, wherein The matching of the polling feature with the stored plurality of feature information includes: Determining first index information corresponding to the polling feature, where the first index information is used to uniquely identify the polling feature, but complexity of the first index information is lower than complexity of the polling feature; Matching the first index information with a plurality of stored index information, where the plurality of stored index information are index information corresponding to the plurality of feature information, and one index information corresponds to one feature information; In a case where the plurality of index information includes target index information matching the first index information, it is determined that the plurality of stored feature information includes the target feature information, and the target feature information is feature information corresponding to the target index information.
5. The method according to claim 1, wherein The obtaining of the polling feature of the NFC card reader includes: Communicating with the NFC card reader based on the NFC chip to request the NFC card reader to authenticate the NFC chip; When the NFC chip identity authentication is passed by the NFC card reader, a polling feature of the NFC card reader is obtained.
6. A scene recognition device, characterized in that: The device comprises: an acquisition module, configured to acquire a polling feature of a near-field communication (NFC) reader when the terminal enters a recognition range of the NFC reader, wherein the NFC reader is installed at an entrance to a target location and is configured to control the opening and closing of a barrier at the entrance, and the terminal is configured to communicate with the NFC reader via its own NFC chip to request the NFC reader to open the barrier at the entrance, thereby allowing a target object to enter the target location; A matching module, configured to match the polling feature with a plurality of stored feature information, wherein the plurality of feature information is feature information of a set scene; an entry module, configured to, if the stored plurality of feature information does not include target feature information matching the polling feature, communicate with the NFC card reader based on the NFC chip to request the NFC card reader to open the barrier at the entrance, so that the target object enters the target location; The entry module is further configured to, when the stored multiple feature information includes target feature information matching the polling feature, communicate with the NFC reader based on the NFC chip to request the NFC reader to authenticate the NFC chip; and, when the NFC reader successfully authenticates the NFC chip, enter a target scene corresponding to the target feature information, where the target scene is associated with the target place, and is used to control smart home devices included in the target place, or is used to control content displayed on the terminal, or is used to control a vehicle.
7. A terminal, characterized in that: The terminal includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the scene recognition method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one program code, and the at least one program code is configured to be executed by a processor to implement the scene recognition method according to any one of claims 1 to 5.
9. A computer program product, characterized in that The computer program product stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the scene recognition method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Control method and device of smart home appliance, storage medium, and terminal
CN109412913A
Simulation card switching method and device, electronic equipment and storage medium
CN113541741A