Data processing method based on electronic fence, electronic device and storage medium
By employing data processing methods on electronic devices and servers, the problem of frequent card display in subway fences has been solved, reducing user disturbance and improving fence accuracy and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-01-10
- Publication Date
- 2026-04-21
AI Technical Summary
During the use of subway fences, the frequent display of electronic fence cards caused by users passing through multiple subway stations can be disruptive and negatively impact the user experience.
When the electronic device detects that it is currently within the first electronic fence, it displays the first card and displays a payment voucher in response to the operation; when multiple base stations are connected on the set line, it displays the second card; when it leaves the fence or does not receive an operation, it closes the card; it collects base station data to update the fence; the server updates the electronic fence based on the base station data to improve accuracy.
This reduces the disturbance caused by the frequent display of cards by the electronic fence during the user's movement, improves the user experience, and enhances the accuracy of the fence through data collection and updates.
Smart Images

Figure CN120343492B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a data processing method, electronic device and storage medium based on electronic fence. Background Technology
[0002] A geofence (also known as an "electronic fence") is a virtual geographical boundary. When a terminal device enters or leaves this area, or moves within it, a notification can be automatically triggered. Currently, the industry mostly utilizes the Global Positioning System (GPS) and various sensors such as Wireless-Fidelity (Wi-Fi) and Beacons to fulfill related positioning or geofence triggering requirements.
[0003] A metro fence is a type of geofencing primarily used to identify when a terminal device enters or leaves a metro station area, or moves within that area, and to provide corresponding services to the user based on the identification results. The generation of a metro fence is mainly determined by the base station (cell) to which the terminal device is connected within the metro station.
[0004] When using subway fences, if a terminal device enters the coverage area of a subway fence base station, a card corresponding to the subway fence will be displayed on the terminal device so that the user can find the payment voucher for the subway. However, when the user is on the subway, because they have to pass through multiple subway stations, each station corresponds to a subway fence, which will cause the card corresponding to different subway fences to be displayed frequently, causing disturbance to the user and thus affecting the user experience. Summary of the Invention
[0005] This application provides a data processing method, electronic device, and storage medium based on electronic fences, which can reduce the disturbance to users during the use of electronic fences.
[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0007] Firstly, a data processing method based on an electronic fence is provided, the method being applied to an electronic device, and the method includes:
[0008] When the electronic device detects that it is currently within a first electronic fence, it displays a first card corresponding to the first electronic fence, wherein the first card is different for different electronic fences; in response to the operation applied to the first card, the electronic device displays a payment voucher; when multiple designated base stations on a designated line are sequentially connected to the electronic device, the electronic device displays a second card, and when it detects that it is currently within a second electronic fence, it no longer displays the first card, the second card is used to indicate that it is currently within a designated line, wherein the first electronic fence and the second electronic fence are different electronic fences; in response to the operation applied to the second card, the electronic device displays a payment voucher.
[0009] Based on the technical solution provided in this application, when an electronic device detects that it is currently within a first electronic fence, it can display a first card to respond to operations applied to the first card, and the electronic device displays a payment voucher. If multiple base stations on a set line are sequentially connected to the electronic device, the electronic device displays a second card, and if it detects that it is currently within a second electronic fence different from the first electronic fence, it no longer displays the first card. This reduces the situation where the electronic device displays the first card every time it passes through an electronic fence, reducing disturbance to the user and improving the user experience.
[0010] In one possible implementation of the first aspect, after displaying the first card, the method further includes:
[0011] If the electronic device is within the first electronic fence and does not receive an operation applied to the first card, the electronic device will close the first card within a first set time period after leaving the first electronic fence.
[0012] Based on the above implementation, after displaying the first card, if the electronic device detects that it has left the electronic fence and confirms that it did not receive any operation on the first card before leaving the electronic fence, it will turn off the first card within a first set time period, reducing the disturbance to the user caused by continuously displaying the first card and improving the user experience.
[0013] In one possible implementation of the first aspect, the electronic device displays the first card corresponding to the current electronic fence, including: the electronic device displays the first card corresponding to the current electronic fence on the main screen and the negative one screen of the electronic device. The data processing method based on the electronic fence provided in the first aspect further includes: the electronic device acquiring the user's click records on the first card after it is displayed; if the click records of the first card show that the user has not clicked the first card in the most recent N times, the electronic device displays the first card on the negative one screen and does not display the first card on the main screen the next time the first card is displayed, where N is a set integer.
[0014] Based on the above implementation, if the user has not clicked the first card in the most recent N click records, the electronic device will only display the first card on the negative one screen the next time it displays the first card, instead of displaying the first card on both the main screen and the negative one screen. This can reduce the disturbance to the user caused by displaying the first card on the main screen, and the user can still find the first card on the negative one screen when they want to use it, thus satisfying the user's need to use the first card and improving the user experience.
[0015] In one possible implementation of the first aspect, the data processing method based on the electronic fence further includes: the electronic device determining that it is currently within the electronic fence; the electronic device detecting the presence of an entry payment event; the electronic device collecting base station-related data, including base station-related data of the base stations within the electronic fence to which the electronic device is connected; and the electronic device sending the base station-related data to a server so that the server updates the electronic fence based on the base station-related data.
[0016] Based on the above implementation method, when the electronic device detects that it is within the electronic fence and detects an entry payment event, it collects relevant data from the base station and sends the relevant data to the server so that the server can update the electronic fence according to the relevant data from the base station. This allows the electronic fence to be updated in a timely manner, thereby improving the accuracy of the electronic fence in use.
[0017] In one possible implementation of the first aspect, the inbound payment event includes: payment voucher display and wrist flip event, and near-field communication (NFC) card swipe event.
[0018] Based on the above implementation, electronic devices will trigger the collection of base station-related data in cases of payment credential display, wrist-flipping events, and Near Field Communication (NFC) card swiping events. This collected base station-related data will then be reported to the server, allowing the server to update the electronic fence based on this data. In this way, data is collected for all instances of users using payment credentials or NFC card swiping to enter the station, resulting in more comprehensive data and thus higher accuracy in updating the electronic fence based on this data.
[0019] In one possible implementation of the first aspect, after the electronic device initiates the collection of base station-related data, the data processing method based on the electronic fence further includes:
[0020] The electronic device determines to leave the electronic fence within a second set time period, discards the collected base station-related data, and stops collecting base station-related data.
[0021] Based on the above implementation method, if an electronic device leaves the electronic fence within the second set time period, the user may have just passed through the electronic fence and was not going to take the subway. In this case, the collected base station-related data is discarded to reduce invalid data, avoid the server side from processing too much data, and also allow the server side to update the electronic fence based on data that better represents the user's subway riding behavior.
[0022] In one possible implementation of the first aspect, the data processing method based on the electronic fence further includes: when the electronic device determines that a payment voucher display and wrist-flipping event have occurred, it collects base station-related data of the currently connected base station; when the electronic device determines that an NFC card swiping event has occurred, it collects base station-related data of the currently connected base station; the electronic device sends the base station-related data of the currently connected base station to the server, so that the server generates an electronic fence based on the base station-related data of the currently connected base station.
[0023] Based on the above implementation, when it is determined that there is a payment voucher display and wrist-flipping event, and when it is determined that there is an NFC card swipe event, the electronic device collects the base station-related data of the currently connected base station and sends the base station-related data of the currently connected base station to the server. The server can generate an electronic fence based on the base station-related data of the currently connected base station reported by the electronic device. Since the electronic device collects and reports data in both the case of payment voucher display and wrist-flipping event and the case of NFC card swipe event, the situation of data collection omission caused by different payment methods for subway rides is reduced.
[0024] Secondly, a data processing method based on an electronic fence is provided, applied to a server. The method includes: the server receiving base station-related data collected by an electronic device, the base station-related data including base station-related data of base stations within the electronic fence to which the electronic device is connected; the server determining the number of valid data points of the target base station and the total number of valid data points of all base stations within the electronic fence based on the base station-related data; the server generating a confidence level of the target base station based on the number of valid data points and the total number of valid data points; and the server updating the electronic fence based on the confidence level and sending the updated electronic fence to the electronic device.
[0025] Based on the technical solution provided in this application, when the coverage area of the base station within the electronic fence changes or when a new base station is added, the number of valid data points of the target base station and the total number of valid data points of all base stations within the electronic fence can be determined by collecting base station-related data from the base station connected to the electronic device within the electronic fence through the electronic device. Then, the confidence level of the target base station can be determined based on the number of valid data points of the target base station and the total number of valid data points of all base stations within the electronic fence. The electronic fence can be updated based on the confidence level of the target base station, thereby improving the accuracy of the electronic fence and enhancing the user experience.
[0026] In one possible implementation of the second aspect, the server determines the number of valid data for the target base station and the total number of valid data for all base stations within the electronic fence based on base station-related data, including: the server cleaning the base station-related data to generate first data; the server clustering the first data to generate second data; the server determining the data related to the target base station in the second data as the number of valid data for the target base station; and the server determining the second data as the total number of valid data for all base stations within the electronic fence.
[0027] Based on the above implementation method, by using data cleaning and clustering to determine the number of valid data for the target base station and the total number of valid data for all base stations within the electronic fence, the interference of invalid data can be reduced, the quality of valid data can be improved, and thus the accuracy of the confidence level of the target base station generated based on the number of valid data for the target base station and the total number of valid data for all base stations within the electronic fence can be guaranteed.
[0028] In one possible implementation of the second aspect, the server generates the confidence level of the target base station based on the number of valid data and the total amount of valid data, including: the server determines the confidence level of the target base station as the ratio of the number of valid data to the total amount of valid data.
[0029] Based on the above implementation method, by determining the confidence level of the target base station as the ratio of the number of valid data of the target base station to the total amount of valid data, it is possible to determine whether the target base station should be included in the electronic fence based on the proportion of the valid data of the target base station in the total amount of valid data.
[0030] In one possible implementation of the second aspect, the server updates the electronic fence based on confidence levels, including: the server determining the average of multiple confidence levels of the target base station generated based on base station-related data at different times; and the server deleting the target base station from the electronic fence if the average value is less than a set threshold.
[0031] Based on the above implementation method, the server generates multiple confidence levels of the target base station by using base station-related data from different times, then determines the average value of the multiple confidence levels, and removes the target base station from the electronic fence if the average value is less than a set threshold. This can remove the impact of base stations that are far from the subway station and infrequently used base stations on the accuracy of the electronic fence, thereby improving the accuracy of the electronic fence.
[0032] Thirdly, a server is provided, comprising: a memory and one or more processors; wherein the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the server to perform the data processing method based on an electronic fence provided in the second aspect of the present application.
[0033] Fourthly, an electronic device is provided, comprising: a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the data processing method based on an electronic fence provided in the first aspect of the present application.
[0034] Fifthly, a computer-readable storage medium is provided, including computer instructions that, when executed on a server, cause the server to perform the data processing method based on an electronic fence provided in the embodiments of this application.
[0035] Sixthly, this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform a data processing method based on an electronic fence as provided in the first aspect and any possible design thereof.
[0036] Understandably, the beneficial effects that the technical solutions provided in the third to sixth aspects above can achieve can be referenced from the beneficial effects in the first to second aspects and any of their possible design methods, which will not be repeated here. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the structure for connecting an electronic device to a base station, provided in an embodiment of this application.
[0038] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0039] Figure 3 A schematic diagram of the layered architecture of the software system of the electronic device provided in the embodiments of this application;
[0040] Figure 4 A flowchart illustrating a subway fence construction method provided in this application embodiment;
[0041] Figure 5 A flowchart illustrating a subway fence updating method provided in this application embodiment;
[0042] Figure 6 A flowchart of a data processing method based on a subway fence is provided for an embodiment of this application;
[0043] Figure 7 A schematic diagram of a first card provided for an embodiment of this application;
[0044] Figure 8 A schematic diagram illustrating a base station connection detection method provided in an embodiment of this application;
[0045] Figure 9 A schematic diagram of a second card provided for an embodiment of this application;
[0046] Figure 10 A schematic diagram of a main screen provided in an embodiment of this application;
[0047] Figure 11 A schematic diagram of a negative one screen provided in an embodiment of this application;
[0048] Figure 12 A flowchart illustrating another data processing method based on an electronic fence, as provided in this application embodiment;
[0049] Figure 13 A flowchart illustrating another data processing method based on an electronic fence, as provided in this application embodiment;
[0050] Figure 14 This is a schematic diagram of the structure of a multi-device collaborative device provided in an embodiment of this application. Detailed Implementation
[0051] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that “ / ” means “or,” for example, A / B can mean A or B; “and / or” in the text is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can mean: A alone, A and B simultaneously, and B alone.
[0052] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0053] The terms "first" and "second" in the following embodiments of this application are for descriptive purposes only and should not be construed as implying relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0054] To facilitate the explanation of the technical solution of this application, some concepts involved in this application will be explained first below.
[0055] Electronic fence: An electronic fence is a virtual geographical boundary. Notifications are automatically triggered when a terminal device enters, leaves, or moves within this area. When using electronic fence technology, the presence of an electronic device within the electronic fence area can be determined based on the base station and Wi-Fi connection it is connected to.
[0056] Subway Fence: A subway fence is an electronic fence generated based on base station and Wi-Fi data near subway stations. Each subway station has its own corresponding subway fence. Subway fences are used to detect electronic devices entering the subway station area. When an electronic device connects to a base station within the subway fence, it is determined that the device has entered the subway fence and is considered to have entered the subway station. When an electronic device connects to a base station outside the subway fence, it is determined that the device has left the subway fence and is considered to have left the subway station.
[0057] First Card: The first card is the card displayed by the electronic device as it passes through each subway station. In response to an action on the first card, the electronic device will display a payment code for the subway ride.
[0058] Second card: The second card is the card displayed by the electronic device when it determines that the user is on the subway line. In response to the operation of the second card, the electronic device will display the payment code for taking the subway.
[0059] When the second card is displayed, the electronic device will no longer display the first card as it passes each subway station.
[0060] Base station: A base station is a facility in a communication network that provides radio signal coverage; it is an important component of a wireless communication system. A base station generally consists of an antenna, wireless transceiver equipment, transmission equipment, and a power supply, and is used to send and receive wireless signals to electronic devices (such as mobile phones, tablets, and laptops).
[0061] Base stations are typically installed in locations such as high-rise buildings, mountaintops, and equipment rooms. They broadcast signals via radio waves to cover specific areas. When mobile devices enter the service range of a base station, they can establish a connection with the base station to communicate and transmit data.
[0062] The technical solutions provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0063] like Figure 1 As shown, electronic devices pass through the coverage areas of different base stations during their movement. These devices connect to different base stations. When an electronic device enters the coverage area of a base station near a subway station, it also connects to that base station. Therefore, by combining the connection data from base stations near subway stations, a subway fence can be generated. However, due to the potential variation in base station coverage, in cases with a large coverage area, activities of the electronic device that are not located near a subway station may be included within the subway station's activity area. This results in insufficient accuracy for subway fences during use. Furthermore, during the use of subway fences, if a terminal device enters the coverage area of a base station within a subway fence, a card corresponding to the subway fence will be displayed on the terminal device so that the user can find their subway payment voucher. However, when a user is on the subway, because they will pass through multiple subway stations, each corresponding to a subway fence, this would require frequent display of different subway fence cards, causing disturbance to the user and affecting their experience.
[0064] To improve the accuracy of subway fences, this application provides a data processing method based on subway fences.
[0065] The technical solutions provided in this application can be applied to electronic devices with image display capabilities. In some embodiments, the electronic device may be a mobile phone, tablet computer, handheld computer, personal computer (PC), ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device, and / or smart city device, etc. The embodiments of this application do not impose any special limitations on the specific type of the electronic device.
[0066] For example, taking a mobile phone as an electronic device, Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown.
[0067] Reference Figure 2 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a display screen 193, a subscriber identification module (SIM) card interface 194, and a camera 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0068] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0069] A controller can be the nerve center and command center of an electronic device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.
[0070] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0071] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0072] The charging management module 140 is used to receive charging input from a power supply device (such as a charger, laptop power supply, etc.). The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device.
[0073] While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141. Specifically, the battery 142 can be composed of multiple batteries connected in series. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110.
[0074] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 193, camera 195, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery voltage, current, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110.
[0075] The external memory interface 120 can be used to connect to external non-volatile memory, thereby expanding the storage capacity of the electronic device. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to perform data storage functions. For example, music, video, and other files can be stored in the external non-volatile memory.
[0076] The internal memory 121 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 110 and can be used to store executable programs (e.g., machine instructions) of the operating system or other running programs, as well as user and application data. The NVM can also store executable programs and user and application data, and can be pre-loaded into the RAM for direct read and write by the processor 110. In this embodiment, the internal memory 121 may store a diffusion model. The internal memory 121 may also store a related model capable of converting an image into a noisy image and text labels, or it may store multiple images corresponding to noisy images and text labels.
[0077] A touch sensor, also known as a "touch device," can be located on the display screen 193. The touch sensor and the display screen 193 together form a touchscreen, also called a "touchscreen." The touch sensor detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 193. In other embodiments, the touch sensor may also be located on the surface of the electronic device, in a different position than the display screen 193.
[0078] A pressure sensor is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 193. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. When a touch operation is applied to the display screen 193, the electronic device monitors the intensity of the touch operation based on the pressure sensor. The electronic device can also calculate the touch location based on the monitoring signal from the pressure sensor. In some embodiments, touch operations applied to the same touch location but with different intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS message is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS message is executed.
[0079] In some embodiments, an electronic device may include one or N cameras 195, where N is a positive integer greater than 1. In this application embodiment, the type of camera 195 can be distinguished based on hardware configuration and physical location. For example, a camera located on the side of the electronic device's display screen 193 can be called a front-facing camera, and a camera located on the side of the electronic device's back cover can be called a rear-facing camera; another example is that a camera with a short focal length and a wide field of view can be called a wide-angle camera, while a camera with a long focal length and a narrow field of view can be called a regular camera. Here, focal length and field of view are relative concepts and are not specifically limited by parameters. Therefore, wide-angle cameras and regular cameras are also relative concepts, and can be specifically distinguished based on physical parameters such as focal length and field of view.
[0080] The electronic device implements display functions through a GPU, a display screen 193, and an application processor. The GPU is a microprocessor for image editing, connected to the display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0081] Electronic devices can achieve shooting functions through ISP, camera 195, video codec, GPU, display 193, and application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information. In this embodiment, the GPU's functions are used during the frame rendering process of each image frame to achieve better display effects and performance in the final displayed image.
[0082] The Information Service Provider (ISP) is used to process data fed back from the camera 195. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise and brightness. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be integrated into the camera 195. The camera 195 is used to capture still images or videos.
[0083] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when an electronic device is selecting a frequency, a DSP can perform a Fourier transform on the frequency energy.
[0084] Display screen 193 is used to display images, videos, etc. Display screen 193 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a minimized, microled, micro-oled, or quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N displays 193, where N is a positive integer greater than 1.
[0085] In this embodiment of the application, the display screen 193 can be used to display the interface of an electronic device (e.g., desktop, lock screen, etc.), and display images stored in the electronic device (e.g., wallpaper, photos, etc.), or images captured by one or more cameras 195.
[0086] The wireless communication function of electronic devices can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem, and baseband processor.
[0087] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0088] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use in electronic devices. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 can be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be housed in the same device.
[0089] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 193. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0090] The wireless communication module 160 can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0091] The SIM card interface 194 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 194 to make contact with and detach from the electronic device. The electronic device can support one or more SIM card interfaces. The SIM card interface 194 supports Nano SIM cards, Micro SIM cards, and other SIM cards. Multiple cards can be inserted into the same SIM card interface 194 simultaneously. The SIM card interface 194 is also compatible with external memory cards. The electronic device interacts with the network through the SIM card to achieve functions such as calls and data communication. One SIM card corresponds to one user number.
[0092] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0093] Of course, it is understandable that the above... Figure 2 The illustration shown is merely an example when the electronic device is in the form of a mobile phone. If the electronic device is in the form of a tablet, handheld computer, PC, PDA, wearable device (such as a smartwatch, smart bracelet), or other similar device, the structure of the electronic device may include more advanced features. Figure 1 The fewer structures shown can also include more than Figure 1 The structures shown are not limited here.
[0094] It is understandable that, generally speaking, the implementation of electronic device functions requires not only hardware support but also software cooperation. The software system of electronic devices can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application's embodiment uses a layered architecture... Taking the system as an example, the software structure of the electronic device is illustrated.
[0095] Figure 3 This is a schematic diagram of the layered architecture of the software system of the electronic device provided in the embodiments of this application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces (e.g., APIs).
[0096] In some examples, refer to Figure 3As shown in this embodiment, the software of the electronic device is divided into five layers, from top to bottom: the application layer, the framework layer (or application framework layer), the system library and Android runtime, the HAL layer (hardware abstraction layer), and the driver layer (or kernel layer). The system library and Android runtime can also be referred to as the native framework layer or the native layer.
[0097] The application layer can include a series of applications. For example... Figure 3 As shown, the application layer can include applications (APPs) such as camera, gallery, calendar, map, WLAN, Bluetooth, music, video, SMS, call, navigation, instant messaging, and smart services.
[0098] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes predefined functions or services. For example, the application framework layer may include an activity manager, window manager, content provider, audio service, view system, phone manager, resource manager, notification manager, package manager, etc., but this embodiment does not impose any limitations on these.
[0099] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0100] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, etc.
[0101] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0102] A phone manager is used to provide communication functionality for electronic devices. For example, a phone manager can manage the call status of a calling application (including initiation, connection, and termination).
[0103] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0104] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0105] Package manager in The package manager is used to manage application packages. It allows applications to obtain detailed information about installed applications and their services, permissions, etc. The package manager is also used to manage events such as application installation, uninstallation, and upgrades.
[0106] System libraries can include multiple functional modules. Examples include: Surface Manager, Media Libraries, OpenGL ES, and SGL. The Surface Manager manages the display subsystem and provides 2D and 3D layer blending for multiple applications. Media Libraries support playback and recording of various common audio and video formats, as well as still image files. Media Libraries support various audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. OpenGL ES is used for 3D graphics drawing, image rendering, compositing, and layer processing. SGL is a 2D graphics engine. The Android runtime includes the core libraries and the ART virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: functions that Java needs to call, and the core Android libraries. The application layer and application framework layer run in the ART virtual machine. The ART virtual machine executes the Java files of the application layer and application framework layer as binary files. The ART virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0107] The Hardware Abstraction Layer (HAL) is the interface layer between the operating system kernel and the hardware circuitry, designed to abstract the hardware. It hides the platform-specific hardware interface details, providing the operating system with a virtual hardware platform that is hardware-independent and portable across multiple platforms. The HAL provides a standard interface that exposes device hardware functionality to the higher-level Java API framework (i.e., the framework layer). The HAL contains multiple library modules, each implementing an interface for a specific type of hardware component, such as: audio HAL, Bluetooth HAL, camera HAL (also known as camera HAL or camera hardware abstraction module), and sensors HAL (or i-sensor service).
[0108] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, sensor drivers, battery drivers, etc., but this application does not limit this. Specifically, the sensor driver can include the driver for each sensor included in the electronic device, such as an ambient light sensor driver. For example, the ambient light sensor driver can, in response to an indication or instruction from the sensor module to acquire detection data, promptly send the detection data from the ambient light sensor to the sensing module.
[0109] Sensor drivers and sensor modules acquire location and movement information from the electronic device and send it to application-layer applications, such as smart service applications, to enable them to perform operations based on the electronic device's location and movement information. In some implementations, the smart service application may be a YoYo suggestion application.
[0110] The technical solutions provided in the embodiments of this application can all be implemented in electronic devices with the above-described hardware or software architecture.
[0111] The electronic fence in this application embodiment can be a subway fence or a bus fence. This application uses a subway fence as an example for illustration.
[0112] The embodiments of this application mainly address the problem of how to improve the accuracy of subway fences.
[0113] I. Constructing subway fencing
[0114] like Figure 4 As shown in the figure, this application embodiment provides a method for generating a subway fence, including:
[0115] S401 The electronic device senses the user's wrist movement and detects the user's action of opening the subway payment voucher, and will collect base station-related data from the currently connected base station.
[0116] In electronic devices, the sensing of a user's wrist flicking motion is achieved using a gyroscope sensor within the device. This sensing is based on the working principle of the gyroscope sensor. A gyroscope sensor measures angular velocity and can detect the rotation of an object in space. In electronic devices, gyroscope sensors are typically tiny sensors integrated into a chip.
[0117] When a user performs a wrist flick, the wrist rotates, generating angular velocity. A gyroscope detects this wrist flick by measuring changes in angular velocity. Specifically, the gyroscope determines the change in angular velocity by detecting rotation around three axes (X, Y, and Z).
[0118] By combining gyroscope sensors with other sensors, such as accelerometers, electronic devices can more accurately detect a user's wrist movements. For example, an accelerometer can detect the device's linear acceleration, and combined with data from a gyroscope sensor, it can better determine changes in the device's posture.
[0119] In summary, electronic devices use gyroscopes to sense a user's wrist movement based on the principle of measuring angular velocity. By detecting the rotation of the wrist, they determine the user's action and trigger the corresponding operation or function.
[0120] Subway payment vouchers can be subway ride codes, such as QR codes or barcodes. Subway payment vouchers can also be other forms of proof used to pay subway fares or to enter and exit subway turnstiles.
[0121] Electronic devices typically detect whether a user has activated their subway transit QR code in the following ways:
[0122] Sensors: Electronic devices can be equipped with various sensors, such as light sensors, proximity sensors, or accelerometers. These sensors can detect changes in the environment or user actions. When a user activates the ride-hailing code, it may trigger a signal from a sensor, thus informing the electronic device of the user's action.
[0123] Touchscreen: If the electronic device is a touchscreen device, when the user touches or swipes on the screen to open the ride code, the electronic device can detect the user's operation through the input signal of the touchscreen.
[0124] Network connectivity: Some electronic devices can communicate with other devices or servers via a network connection. When a user opens the ride code in the application, the electronic device can confirm the user's action through communication with the server.
[0125] It's important to note that the specific implementation may vary depending on the device type, operating system, and application. Different electronic devices and applications may employ different technologies and methods to detect whether a user has activated their ride code.
[0126] The base station-related data may include: electronic device ID, base station ID, mobile network code, location area code, site name, latitude and longitude, city, displayed card type, connected Wi-Fi information, connected satellite information, etc.
[0127] For example, base station-related data may include:
[0128] {"uuid":"AAASASDDASD","cellid":"1000","lac":"000","mnc":"01","metroName":"Tianlongsi Station","location":{"lat":"112212","lgt":"2323211"},"city":"Nanjing","star":"9","wifi"wifi1""},"Cardstatus":"pop"}
[0129] Among them, uuid is the electronic device ID, cellid is the base station ID, lac is the mobile network code, mnc is the location area code, metroName is the station name, location is the latitude and longitude, where lat represents longitude, lgt represents latitude, city is the city, star is the connected satellite information, wifi is the connected Wi-Fi information, and Cardstatus is the displayed card type.
[0130] The card types in cardStatus are divided into pop and common, with pop being the first type of card and common being the second type.
[0131] For example, another type of base station-related data could be:
[0132] {"cellid":"111","lac":"01","mnc":"22","wifi":['wifi1','wifi2'],"location":{"lat"112213"","lgt"2323212""},"city":"Nanjing","metroName":"Tianlongsi Station"}
[0133] Those skilled in the art can set the format of base station-related data as needed, and this application is not limited thereto.
[0134] S402. When an electronic device detects an NFC card swipe event, it will collect base station-related data from the currently connected base station.
[0135] NFC is a short-range wireless communication technology that allows two devices to transfer data without contact. NFC technology is widely used in mobile payments, identity verification, and access control.
[0136] NFC card swipe events typically refer to transactions such as payments, access control, or identity verification using NFC-enabled electronic devices. By bringing an NFC-enabled electronic device close to a terminal device with an NFC reader, fast and convenient data transfer and interaction can be achieved. For example, in some stores, customers can use a mobile payment application on their phone to complete the payment by simply bringing their phone close to an NFC reader provided by the merchant. This method is more convenient and faster than traditional card swiping or inserting.
[0137] When electronic devices use NFC technology to scan subway QR codes, the smart module of the device receives a feedback message. This allows the device to detect the NFC card-swiping event.
[0138] The base station-related data may also include information indicating whether an NFC card swipe event has occurred, such as "nfcEvent":"true".
[0139] S403. The electronic device transmits the collected base station-related data to the cloud server.
[0140] S404, The cloud-based server performs data cleaning on the base station-related data reported by electronic devices.
[0141] Data cleaning is an important task in data processing, aiming to ensure the accuracy, integrity, and consistency of data. Below are some common data cleaning steps:
[0142] Handling missing values: Identify missing values in the data and handle them appropriately. This may include deleting rows or columns containing missing values, filling missing values using interpolation methods, or inferring and filling based on patterns in other data.
[0143] Handling outliers: Detecting and processing outliers in the data, which may be caused by errors, measurement mistakes, or other anomalies. Statistical methods (e.g., the range of the mean plus or minus two standard deviations) can be used to identify outliers and determine whether to delete, replace, or retain them.
[0144] Data format conversion: Converting data into a suitable format to facilitate subsequent analysis and processing. For example, converting date and time fields to standard date and time formats, and converting text fields to appropriate encoding methods.
[0145] Handling duplicate values: Detecting and removing duplicate records in the data to ensure that each record is unique. Duplicate values can be identified by comparing key fields, allowing you to choose to keep one or delete all duplicate records.
[0146] Exception handling: Handling exceptions in the data, such as inconsistent naming, spelling errors, logical errors, etc. Depending on the specific situation, corrections can be made manually or automated methods can be used for error correction.
[0147] Data standardization: Standardizing data to ensure consistency and comparability. This may involve unit conversion, unified naming conventions, and standardizing data scope.
[0148] Data filtering: Filtering and selecting data based on specific conditions or needs. This helps extract subsets of data from specific time periods, regions, product categories, etc.
[0149] Data integration: Integrating data from multiple data sources, eliminating duplicates, and ensuring consistency and correlation between data.
[0150] The above are some common data cleaning steps. In practice, these steps may be adjusted based on the data type and specific needs. The purpose of data cleaning is to improve data quality and provide a reliable foundation for subsequent analysis and applications.
[0151] In this application's implementation, data cleaning can be performed as follows: Data with card types "pop" and "common" are filtered based on their UUIDs. Data containing only "pop" or only "common" cards is discarded. In some implementations, the server can determine whether to discard data based on whether pairs of "pop" and "common" cards can be found in the day's data. If only "pop" card type data is found in the day's data, it is discarded; or if only "common" card type data is found within the day, it is discarded.
[0152] S405, the cloud server performs data clustering on the cleaned base station-related data.
[0153] Because the base station information sent by electronic devices to the cloud server contains many entries with the same cellid but different associated Wi-Fi, latitude and longitude coordinates, and star ratings, this information needs to be integrated. For example, clustering algorithms can be used to determine the center latitude and longitude of the base station. In some implementations, the dbscan clustering algorithm can be used to generate a data sequence at the cellid dimension based on the base station information sent by the electronic device to the cloud server. Using this data sequence, the electronic device is determined to have entered the subway fence if the base station and Wi-Fi it connects to meet the data sequence requirements. For example, the top M Wi-Fi information is selected based on frequency of occurrence, where M is a positive integer. In some implementations, M can be 8 to 10, and in others, M is 10. When an electronic device connects to a base station within the subway fence, if the connected Wi-Fi belongs to one of the top M Wi-Fi networks, the electronic device is determined to have entered the subway fence. If the connected Wi-Fi does not belong to one of the top M Wi-Fi networks, the electronic device is determined not to have entered the subway fence.
[0154] S406. The cloud server merges the clustered data based on the subway station name dimension.
[0155] The data from different base stations in the same subway station generated by clustering will be combined into a union.
[0156] S407, The cloud-based server generates subway fences based on the merged data.
[0157] S408, the cloud-based server sends the subway fence to electronic devices.
[0158] S409. When the electronic device determines the subway station entrance based on the subway fence, it displays the first card.
[0159] II. Subway Fence Update:
[0160] like Figure 5 As shown in the figure, this application embodiment provides a method for updating a subway fence, including:
[0161] S501. The electronic device has determined that it is currently within the subway fence.
[0162] In some implementations, the electronic device can determine whether it is currently within a metro fence based on the currently connected base station, whether the Wi-Fi belongs to a base station within the metro fence, and the requirements of the Wi-Fi corresponding to the base station.
[0163] S502. When the electronic device determines that there is a user's wrist-flipping action and detects that the user opens the subway payment voucher, or when the electronic device determines that there is a subway NFC card swiping event, the electronic device starts to collect base station-related data.
[0164] S503: If the electronic device detects that the user has left the subway fence within the second set time period, it discards the collected base station-related data and stops collecting base station-related data.
[0165] For example, the second set duration can be 5-10 minutes (min), and in some embodiments, the second set duration can be 5 minutes.
[0166] In this way, when users are not taking the subway, the collection of irrelevant data can be reduced, thereby reducing the data collection burden on electronic devices.
[0167] S504. The electronic device transmits the collected base station-related data to the cloud server.
[0168] The S505 cloud server cleans the base station-related data reported by electronic devices.
[0169] Step S505 can be performed with reference to step S404.
[0170] In some implementations, S505 further includes clearing data with abnormal base station identifiers from the reported data, such as a cellid of -1. In some implementations, a cellid of -1 will appear if a Subscriber Identity Module (SIM) card is not inserted into the electronic device. A SIM card is a smart card that stores personal identification information and provides mobile communication services.
[0171] S506, the cloud server performs data clustering on the cleaned base station-related data.
[0172] Step S506 can be performed with reference to step S405.
[0173] S507: The cloud server determines the total amount of valid data for all base stations within the subway fence and the amount of valid data for the target base station based on the base station-related data after data clustering.
[0174] The target base station here can be any base station within the metro fence, or a specific base station within the metro fence, such as a newly added base station.
[0175] S508, the cloud server determines the confidence level of the target base station based on the total amount of valid data from all base stations within the subway fence and the amount of valid data from the target base station.
[0176] The confidence level of the target base station can be determined in the following way:
[0177] The number of valid data points at the target base station is divided by the total number of valid data points at all base stations within the subway fence.
[0178] For example, suppose the total amount of valid data from subway station m on that day is A, and the number of valid data from base station id 12321 is B. Then the confidence level of base station id 12321 is the value of A divided by B.
[0179] S509, the cloud server updates the subway fence based on the confidence level of the target base station.
[0180] In some implementations, multiple confidence levels of the target base station can be generated based on base station-related data from different times, and then the average of these multiple confidence levels can be determined. The different times can be any day within the most recent Z days, where Z is a positive integer and can range from 7 to 10; in some implementations, Z can be 7.
[0181] The cloud-based server removes the target base station from the subway fence when the average value is below a set threshold.
[0182] The threshold can be set from 20% to 50%, and in some implementations, the threshold can be set to 30%.
[0183] The S510 and cloud-based servers send the updated subway fence to electronic devices.
[0184] S511. When the electronic device determines the entrance to the subway station based on the updated subway fence, it displays the first card.
[0185] This application also provides a data processing method based on subway fences, applicable to electronic devices, such as... Figure 6 As shown. In some embodiments, Figure 6 The methods described can be implemented through YoYo suggestions.
[0186] S601. When the electronic device determines the subway station to enter based on the first subway fence, it displays the first card.
[0187] The first card corresponds to a subway station, and different subway stations correspond to different first cards because subway fences also correspond to subway stations. Different subway fences also correspond to different first cards. The first subway fence can be any one of the subway fences.
[0188] like Figure 7 An example of a first card 700 is shown. The first card 700 includes a first label 701, a second label 702, a third label 703, a first image 704, and a first control 705. The first label 701 may include the text "Metro Ride Code," the second label 702 may include the text "Current Station," and the third label 703 is used to identify the station name; for example, the third label 703 may include the text "Nanjing Automated Station." The first image 704 includes an image of the metro, and the first control 705 includes the text "View Ride Code." Responding to an operation on the first control 705, such as clicking the first control 705, will display the metro payment voucher.
[0189] S602, In response to the operation applied to the first card, the electronic device displays the payment voucher.
[0190] The operation applied to the first card could be, for example, clicking the first card. In some implementations, for example... Figure 7 The operation performed on the first card 700 shown can be clicking the first control 705 on the first card 700.
[0191] S603. The electronic device determines that it has left the subway station based on the first subway fence.
[0192] S604. After the electronic device displays the first card, it determines whether it has received an operation applied to the first card.
[0193] If the electronic device confirms that it has received an operation applied to the first card, step S605 is executed; if the electronic device confirms that it has not received an operation applied to the first card, step S608 is executed. In some embodiments, S604 can be executed after the electronic device leaves the first fence.
[0194] S605. The electronic device continues to display the first card and checks whether multiple designated base stations on the subway line are connected to the electronic device in sequence.
[0195] The multiple base stations on the subway line can refer to multiple base stations along the subway line after leaving the subway station. In some implementations, the multiple base stations can be 4-6 base stations. In some implementations, the multiple base stations can be 4 base stations.
[0196] like Figure 8 As shown, cell1, cell2, cell3, and cell4 are four base stations on the subway line after leaving subway station 1. After the electronic device determines that it has left subway station 1 based on the subway fence of subway station 1, it detects whether cell1, cell2, cell3, and cell4 are connected in sequence.
[0197] In some implementations, the electronic device can detect whether cell1, cell2, cell3, and cell4 are connected sequentially within a third set time period, wherein the third set time period can be 10 minutes to 15 minutes.
[0198] If the electronic device is connected to multiple designated base stations on the subway line in sequence, step S606 is executed; if the electronic device is not connected to multiple designated base stations on the subway line in sequence, step S607 is executed.
[0199] S606. The electronic device displays the second card. Furthermore, if it detects that the device is currently within the second subway fence, the first card is no longer displayed.
[0200] The second card is used to indicate that the user is currently on the subway line; in response to an action on the second card, the electronic device displays a payment voucher.
[0201] The second subway fence is a different subway fence from the first subway fence. The second subway fence corresponds to a different subway station than the first subway fence.
[0202] The electronic device will not display the first card again until it leaves the subway line. In other words, the electronic device will not display the first card until the user ends their journey.
[0203] By displaying a second card instead of the first, the electronic device will not display the first card again until it leaves the subway line. This reduces the inconvenience to users caused by displaying a different first card at each subway station. By continuously displaying the second card, the payment receipt trigger page is provided to the user, making it more convenient to use.
[0204] like Figure 9 An example of a second card 900 is shown. The second card 900 includes a fourth label 901, a fifth label 902, a sixth label 903, a second image 904, and a second control 905. The fourth label 901 may include the text "Metro Ride Code," the fifth label 902 may include the text "Green Travel, Building a Beautiful China," and the sixth label 903, used to represent the city where the metro line is located, may include the text "Nanjing Metro Ride Code." The second image 904 includes an image of the metro, and the second control 905 includes the text "View Ride Code." Responding to an operation on the second control 905, such as clicking the second control 905, will display the metro payment voucher.
[0205] S607. The electronic device closes the first card, and the process ends.
[0206] In some implementations, the electronic device can turn off the first card within a first set time period, which may be, for example, 20s to 40s, or in some implementations, 30s.
[0207] S608. The electronic device closes the first card within a first set time period. It also checks whether multiple designated base stations on the subway line are sequentially connected to the electronic device.
[0208] If multiple designated base stations on the subway line connect to the electronic device sequentially, step S609 is executed; if the multiple designated base stations on the subway line do not connect to the electronic device sequentially, the process ends.
[0209] S609. The electronic device displays the second card. Furthermore, if it detects that the device is currently within the second subway fence, the first card is no longer displayed.
[0210] In one possible implementation, the electronic device displays the first card corresponding to the first subway fence on both the main screen and the negative one screen of the electronic device. In some embodiments, the electronic device can obtain the user's click history on the first card after it has been displayed. If the click history of the first card shows that the user has not clicked the first card in the most recent N clicks, the electronic device will only display the first card on the negative one screen the next time it displays the first card, and will not display the first card on the main screen, where N is a set integer. Figure 10 As shown, the electronic device displays the first card 700 on the main screen 1000, such as... Figure 11 As shown, the electronic device displays the first card 700 on the negative one screen 1100.
[0211] Based on the above implementation, if the user has not clicked the first card in the most recent N click records, the electronic device will only display the first card on the negative one screen the next time it displays the first card, instead of displaying the first card on both the main screen and the negative one screen. This can reduce the disturbance to the user caused by displaying the first card on the main screen, and the user can also find the first card on the negative one screen when they want to use it, thus satisfying the user's need to use the first card and improving the user experience.
[0212] In some implementations, N can be 5-7, and in some implementations, N can be 7.
[0213] like Figure 12 As shown in the figure, this application provides a data processing method based on an electronic fence, applied to a server, the method including:
[0214] S1201. The server receives base station-related data collected by the electronic device. The base station-related data includes base station-related data of the base stations within the electronic fence to which the electronic device is connected.
[0215] Step S1201 can be performed by referring to step S504.
[0216] S1202. Based on base station-related data, the server determines the number of valid data points for the target base station and the total number of valid data points for all base stations within the electronic fence.
[0217] Step S1202 can be performed by referring to steps S505 to S507.
[0218] S1203. The server generates the confidence level of the target base station based on the number of valid data and the total amount of valid data.
[0219] Step S1203 can be performed with reference to step S508.
[0220] S1204. The server updates the electronic fence based on the confidence level and sends the updated electronic fence to the electronic device.
[0221] Step S1204 can be performed by referring to steps S509 to S510.
[0222] Based on the technical solution provided in this application, when the coverage area of the base station within the electronic fence changes or when a new base station is added, the number of valid data points of the target base station and the total number of valid data points of all base stations within the electronic fence can be determined by collecting base station-related data from the base station connected to the electronic device within the electronic fence through the electronic device. Then, the confidence level of the target base station can be determined based on the number of valid data points of the target base station and the total number of valid data points of all base stations within the electronic fence. The electronic fence can be updated based on the confidence level of the target base station, thereby improving the accuracy of the electronic fence and enhancing the user experience.
[0223] In one possible implementation, the server determines the number of valid data for the target base station and the total number of valid data for all base stations within the electronic fence based on base station-related data. This includes: the server cleaning the base station-related data to generate first data; the server clustering the first data to generate second data; the server determining the data related to the target base station in the second data as the number of valid data for the target base station; and the server determining the second data as the total number of valid data for all base stations within the electronic fence.
[0224] Based on the above implementation method, data cleaning and clustering are used to determine the number of valid data points for the target base station and the total number of valid data points for all base stations within the electronic fence. This reduces interference from invalid data, improves the quality of valid data, and thus ensures the accuracy of the confidence level of the target base station generated based on the number of valid data points for the target base station and the total number of valid data points for all base stations within the electronic fence.
[0225] In one possible implementation, the server generates the confidence level of the target base station based on the number of valid data and the total amount of valid data, including: the server determines the confidence level of the target base station as the ratio of the number of valid data to the total amount of valid data.
[0226] Based on the above implementation method, by determining the confidence level of the target base station as the ratio of the number of valid data of the target base station to the total amount of valid data, it is possible to determine whether the target base station should be included in the electronic fence based on the proportion of the valid data of the target base station in the total amount of valid data.
[0227] In one possible implementation, the server updates the electronic fence based on confidence levels, including: the server determining the average of multiple confidence levels of the target base station generated based on base station-related data at different times; and the server deleting the target base station from the electronic fence if the average value is less than a set threshold.
[0228] Based on the above implementation method, the server generates multiple confidence levels of the target base station by using base station-related data from different times, then determines the average value of the multiple confidence levels, and removes the target base station from the electronic fence if the average value is less than a set threshold. This can remove the impact of base stations that are far from the subway station and infrequently used base stations on the accuracy of the electronic fence, thereby improving the accuracy of the electronic fence.
[0229] like Figure 13 As shown, this application provides a data processing method based on an electronic fence, which is applied to an electronic device and includes:
[0230] S1301. When the electronic device detects that it is currently within the first electronic fence, it pops up the first card corresponding to the current electronic fence.
[0231] The first card is different for each electronic fence.
[0232] S1301 can be performed by referring to step S601.
[0233] S1302, In response to the operation applied to the first card, the electronic device displays the payment voucher.
[0234] S1302 can be performed by referring to step S602.
[0235] S1303. When multiple designated base stations on a designated line are sequentially connected to the electronic device, the second card is displayed, and if it is detected that the device is currently within a second electronic fence, the first card is no longer displayed. The second electronic fence is different from the first electronic fence.
[0236] The second card is used to indicate that the device is currently within the designated line.
[0237] The designated route can be a subway line, or in some implementations, a bus line.
[0238] S1303 can be performed by referring to steps S603 to S609.
[0239] S1304. In response to the operation applied to the second card, the electronic device displays the payment voucher.
[0240] Based on the technical solution provided in this application, when an electronic device detects that it is currently within an electronic fence, it can display a first card to respond to operations applied to the first card, and the electronic device displays a payment voucher. If multiple designated base stations on the designated line are sequentially connected to the electronic device, the electronic device displays a second card, and if it detects that it is currently within another electronic fence, it no longer displays the first card. This reduces the situation where the electronic device displays the first card every time it passes through an electronic fence, reducing disturbance to the user and improving the user experience.
[0241] In one possible implementation, after displaying the first card, the method further includes:
[0242] If the electronic device is within the first electronic fence and does not receive an operation applied to the first card, the electronic device will close the first card within a first set time period after leaving the first electronic fence.
[0243] Based on the above implementation, after displaying the first card, if the electronic device detects that it has left the first electronic fence and confirms that it did not receive any operation applied to the first card before leaving the first electronic fence, it will turn off the first card within a first set time period, reducing the disturbance to the user caused by continuously displaying the first card and improving the user experience.
[0244] In one possible implementation, the data processing method based on the electronic fence further includes: the electronic device determining that it is currently within the electronic fence; the electronic device detecting the presence of an entry payment event; the electronic device collecting base station-related data, including base station-related data of the base stations within the electronic fence to which the electronic device is connected; and the electronic device sending the base station-related data to the server so that the server updates the electronic fence based on the base station-related data.
[0245] Based on the above implementation method, when the electronic device detects that it is within the electronic fence and detects an entry payment event, it collects relevant data from the base station and sends the relevant data to the server so that the server can update the electronic fence according to the relevant data from the base station. This allows the electronic fence to be updated in a timely manner, thereby improving the accuracy of the electronic fence in use.
[0246] In one possible implementation, the in-station payment events include: payment credential display and wrist flip events, and near-field communication (NFC) card swipe events.
[0247] Based on the above implementation, electronic devices will trigger the collection of base station-related data in cases of payment credential display, wrist-flipping events, and Near Field Communication (NFC) card swiping events. This collected base station-related data will then be reported to the server, allowing the server to update the electronic fence based on this data. In this way, data is collected for all instances of users using payment credentials or NFC card swiping to enter the station, resulting in more comprehensive data and thus higher accuracy in updating the electronic fence based on this data.
[0248] In one possible implementation, after the electronic device initiates the collection of base station-related data, the data processing method based on the electronic fence also includes:
[0249] The electronic device determines to leave the electronic fence within a second set time period, discards the collected base station-related data, and stops collecting base station-related data.
[0250] Based on the above implementation method, if an electronic device leaves the electronic fence within the second set time period, the user may have just passed through the electronic fence and was not going to take the subway. In this case, the collected base station-related data is discarded to reduce invalid data, avoid the server side from processing too much data, and also allow the server side to update the electronic fence based on data that better represents the user's subway riding behavior.
[0251] In one possible implementation, the data processing method based on the electronic fence further includes: when the electronic device determines that a payment credential display and wrist-flipping event have occurred, it collects base station-related data of the currently connected base station; when the electronic device determines that an NFC card swipe event has occurred, it collects base station-related data of the currently connected base station; the electronic device sends the base station-related data of the currently connected base station to the server, so that the server generates an electronic fence based on the base station-related data of the currently connected base station.
[0252] Based on the above implementation, when it is determined that there is a payment voucher display and wrist-flipping event, and when it is determined that there is an NFC card swipe event, the electronic device collects the base station-related data of the currently connected base station and sends the base station-related data of the currently connected base station to the server. The server can generate an electronic fence based on the base station-related data of the currently connected base station reported by the electronic device. Since the electronic device collects and reports data in both the case of payment voucher display and wrist-flipping event and the case of NFC card swipe event, the situation of data collection omission caused by different payment methods for subway rides is reduced.
[0253] Thirdly, a server is provided, comprising: a memory and one or more processors; wherein the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the server to perform the data processing method based on an electronic fence provided in the embodiments of this application.
[0254] Fourthly, an electronic device is provided, comprising: a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the data processing method based on an electronic fence provided in the embodiments of this application.
[0255] It is understood that, in order to achieve the aforementioned functions, the electronic device includes corresponding hardware structures and / or software modules for performing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware-driven or software-driven manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of this application.
[0256] Figure 14 This is a schematic diagram of a multi-device collaborative device provided in an embodiment of this application. In one embodiment, electronic devices and servers can... Figure 14 The hardware device shown implements the corresponding function. For example... Figure 14 As shown, the multi-device collaborative device may include: a display screen 1001, a memory 1002, a processor 1003, and a communication module 1004. These devices can be connected via one or more communication buses 1005.
[0257] In one embodiment, the display screen 1001 may include a display panel 10011 and a touch sensor 10012. The display panel 10011 is used to display images, and the touch sensor 10012 can transmit detected touch operations to the application processor 1003 to determine the type of touch event and provide visual output related to the touch operation through the display panel 10011. The processor 1003 may include one or more processing units, such as an application processor, a modem processor, a graphics processor, an image signal processor, a controller, a video codec, a digital signal processor, a baseband processor, and / or a neural network processor. Different processing units may be independent devices or integrated into one or more processors. A memory 1002 is coupled to the processor 1003 and is used to store various software programs and / or multiple sets of instructions. The memory 1002 may include volatile memory and / or non-volatile memory.
[0258] When the software program and / or multiple sets of instructions in the memory 1002 are executed by the processor 1003, the method steps in the embodiments of this application are performed.
[0259] This application also provides an electronic device, which includes a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, which includes computer instructions, and when the computer instructions are executed by the processor, the electronic device performs the data processing method based on a subway fence as provided in the first aspect and any possible design of the present invention.
[0260] This application also provides a server, which includes a memory and one or more processors; a display screen, the memory and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the data processing method based on the subway fence as provided in the first aspect and any possible design of the present invention.
[0261] This application also provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the data processing method based on a subway fence as provided in the foregoing embodiments.
[0262] This application also provides a computer program product containing executable instructions that, when run on an electronic device, cause the electronic device to perform the data processing method based on subway fences as provided in the foregoing embodiments.
[0263] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0264] In the several embodiments provided in this application, it should be understood that the disclosed apparatus / device and method can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0265] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0266] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0267] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0268] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data processing method based on electronic fences, characterized in that, The method is applied to an electronic device, and the method includes: When the electronic device detects that it is currently within a first electronic fence, it displays a first card corresponding to the first electronic fence, wherein the first card is different for different electronic fences; In response to an operation performed on the first card, the electronic device displays a payment voucher; When multiple designated base stations on a designated line are sequentially connected to the electronic device, the electronic device displays a second card. If it is detected that the device is currently within a second electronic fence, the first card is no longer displayed. The second card is used to indicate that the electronic device is currently within the designated line. The first electronic fence and the second electronic fence are different electronic fences. The designated line includes a preset fixed line. In response to an operation performed on the second card, the electronic device displays the payment voucher.
2. The data processing method according to claim 1, characterized in that, After displaying the first card, the method further includes: If the electronic device is within the first electronic fence and does not receive an operation applied to the first card, the electronic device will close the first card within a first set time period after leaving the first electronic fence.
3. The data processing method according to claim 1, characterized in that, The electronic device displays the first card corresponding to the first electronic fence, including: The electronic device displays the first card corresponding to the first electronic fence on the main screen and the negative one screen of the electronic device; The method further includes: The electronic device acquires the user's click records on the first card after the first card is displayed; If, in the click record, the electronic device has N recent instances where the user has not clicked the first card, then when the first card is displayed again, the first card will be displayed on the negative one screen and not on the main screen, where N is a set integer.
4. The data processing method according to claim 1, characterized in that, Also includes: The electronic device determines that it is currently within an electronic fence; The electronic device detected an in-station payment event; The electronic device collects base station-related data, which includes base station-related data of the base stations within the electronic fence to which the electronic device is connected; The electronic device sends the base station-related data to the server, so that the server updates the electronic fence based on the base station-related data.
5. The data processing method according to claim 4, characterized in that, The inbound payment event includes: The payment voucher display and wrist-flipping event, and the NFC card swiping event.
6. The data processing method according to claim 4, characterized in that, After the electronic device starts collecting base station-related data, it also includes: The electronic device determines to leave the electronic fence within a second set time period, discards the collected base station-related data, and stops collecting the base station-related data.
7. The data processing method according to claim 1, characterized in that, Also includes: When the electronic device determines that the payment voucher is displayed and the wrist-flipping event occurs, it collects base station-related data from the currently connected base station. The electronic device determines that an NFC card swipe event has occurred and collects base station-related data from the currently connected base station; The electronic device sends base station-related data of the currently connected base station to the server, so that the server can generate an electronic fence based on the base station-related data of the currently connected base station.
8. A data processing method based on electronic fences, characterized in that, The method is applied to a server, the server being used to interact with an electronic device, the electronic device being configured to perform the method as described in any one of claims 1-7, the method performed by the server comprising: The server receives base station-related data collected by the electronic device, including base station-related data of the base stations within the electronic fence to which the electronic device is connected; Based on the base station-related data, the server determines the number of valid data points for the target base station and the total number of valid data points for all base stations within the electronic fence. The server generates the confidence level of the target base station based on the number of valid data and the total amount of valid data. The server updates the electronic fence based on the confidence level and sends the updated electronic fence to the electronic device.
9. The data processing method according to claim 8, characterized in that, Based on the base station-related data, the server determines the number of valid data points for the target base station and the total number of valid data points for all base stations within the electronic fence, including: The server performs data cleaning on the base station-related data to generate first data; The server performs data clustering on the first data to generate the second data; The server determines the number of valid data for the target base station from the second data; The server determines the second data as the total effective data of all base stations within the electronic fence.
10. The data processing method according to claim 8, characterized in that, The server generates the confidence level of the target base station based on the number of valid data points and the total amount of valid data, including: The server determines the confidence level of the target base station as the ratio of the number of valid data points of the target base station to the total amount of valid data.
11. The data processing method according to claim 8, characterized in that, The server updates the electronic fence based on the confidence level, including: The server determines the average of multiple confidence levels of the target base station generated based on base station-related data at different times; If the average value is less than a set threshold, the server will remove the target base station from the electronic fence.
12. An electronic device, characterized in that, include: The device includes a display screen, a memory, and one or more processors; the display screen, the memory, and the processors are coupled; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the data processing method based on an electronic fence as described in any one of claims 1-7.
13. A server, characterized in that, include: A memory and one or more processors; wherein the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the server to perform the electronic fence-based data processing method as described in any one of claims 8-11.
14. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on a server, cause the server to perform the data processing method based on an electronic fence as described in any one of claims 8-11.
15. A computer-readable storage medium, characterized in that, It includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the data processing method based on an electronic fence as described in any one of claims 1-7.
Citation Information
Patent Citations
Subway travel detection method and electronic equipment
CN115022461A
Card display method and electronic equipment
CN116033343A