Code scanning method, mobile terminal, computer program product and readable storage medium
By automatically recognizing and storing the order QR code as a structured card in the mobile terminal, the problem of low ordering efficiency in the existing technology is solved, realizing convenient ordering operation and intelligent store information management, and improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2026-01-04
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, when a mobile terminal visits the same restaurant multiple times, it needs to repeatedly capture the QR code image for ordering through the camera, resulting in low ordering efficiency. Furthermore, the ordering image cannot be associated with the store information, making retrieval and operation cumbersome.
After scanning the QR code for ordering, the mobile terminal automatically recognizes and stores it as a structured card containing the QR code and store information. It provides a scanning control, allowing users to directly trigger the ordering interface, reducing operation steps, and supports intelligent collection and editing functions.
It improved ordering efficiency, avoided QR code recognition failures, simplified store information retrieval and operation processes, and enhanced user experience.
Smart Images

Figure CN122065859A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a scanning method, a mobile terminal, a computer program product, and a readable storage medium. Background Technology
[0002] Currently, an increasing number of restaurants are using QR code scanning to provide ordering services. Generally, mobile devices can scan and recognize the QR codes posted in restaurants, allowing customers to place orders on the ordering interface.
[0003] However, in scenarios where users repeatedly dine at the same restaurant, the aforementioned QR code ordering method becomes inconvenient. Even if the restaurant's ordering QR code has been scanned and recognized multiple times, the mobile device still needs to capture an image containing the QR code via its camera before it can access the restaurant's ordering interface. In other words, this scanning method results in low ordering efficiency. Summary of the Invention
[0004] This application provides a scanning method, a mobile terminal, a computer program product, and a readable storage medium, which can improve the efficiency of ordering food by scanning codes in stores.
[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions: Firstly, a scanning method is provided for use on a mobile terminal. The method includes: the mobile terminal, in response to a scanning operation, scanning and recognizing a first QR code; recognizing that the first QR code is a store's ordering QR code, obtaining the store information of the first store corresponding to the first QR code; storing a first card associated with the first QR code and the store information of the first store in the mobile terminal's QR code collection library; the QR code collection library is an album in the mobile terminal's photo album application, and the QR code collection library stores at least one card; the mobile terminal, in response to a trigger operation on a second card in the QR code collection library, recognizing a second QR code in the second card, and displaying the ordering interface of the second store; wherein the second card includes the second QR code and the store information of the second store.
[0006] In implementing this embodiment, after scanning the store's ordering QR code, the mobile terminal automatically identifies and stores the ordering QR code and its associated store information as cards in the QR code collection library of the photo application. Through this automated collection mechanism, in scenarios where users visit the same store multiple times, there is no need for the mobile terminal's camera to repeatedly capture images containing the ordering QR code. Users can directly retrieve the collected cards from the QR code collection library and access the ordering interface by triggering an action, thereby improving ordering efficiency.
[0007] Compared to existing technologies where users manually save the order image as a regular image to their photo album before scanning it again, this application's embodiment has the following technical advantages: First, the mobile terminal completes the recognition and verification of the order QR code during the initial scan. The mobile terminal only stores the order QR code in the card after confirming that it can be successfully parsed. This ensures that subsequent order QR codes retrieved from the mobile terminal's QR code library are all verified and valid, avoiding scanning failures due to poor image quality. When the mobile terminal needs to use the order QR code later, it can directly retrieve it from the card without requiring the camera to perform secondary recognition of the order image displayed on the screen, thus eliminating the QR code recognition processing step, accelerating processing speed, and improving response efficiency.
[0008] Secondly, when storing order QR codes, mobile devices also associate and bind store information such as store name and address with the QR code, forming a structured card containing multiple data fields, rather than simply saving the order image. This structured data storage method allows the mobile device to clearly identify the store associated with each card, avoiding the inefficient operation of manually browsing and recognizing order images in the photo album. When the mobile device's photo album stores order images from multiple stores, users do not need to browse each image one by one and manually recognize the target store's order QR code. Instead, they can quickly locate the target store through the store information, significantly improving retrieval efficiency.
[0009] Furthermore, when storing a card, the mobile terminal can associate a QR code scanning control that directly triggers the ordering process with that card. When the mobile terminal retrieves the card from its QR code library and displays it, the screen can show the QR code scanning control. After detecting a trigger operation on the QR code scanning control, the mobile terminal can directly read and recognize the ordering QR code on the card to jump to the ordering interface, reducing the number of steps required for ordering. Compared to the cumbersome steps in existing technologies, such as opening a photo album, searching for an image, and calling the QR code recognition function, this embodiment can complete the loading of the ordering interface with a single click, significantly improving ordering efficiency.
[0010] In one possible implementation of the first aspect, the second card further includes a scanning control, and the triggering operation for the second card is a click operation on the scanning control.
[0011] This implementation method involves a dedicated scanning control on the card, directly linked to the QR code within the card. When a user views the card's details from their QR code library, the scanning control is displayed. Clicking the control retrieves and recognizes the stored ordering QR code on the card, then redirects to the ordering interface. By using this scanning control, users can seamlessly navigate from the card to the ordering interface without manually activating the QR code recognition function or performing intermediate steps like image selection and scan confirmation. This direct interaction reduces user steps and avoids the complex process of displaying the ordering image, long-pressing the image to activate the QR code recognition function, and finally verifying the recognition result—a smoother and more convenient ordering experience that significantly improves efficiency.
[0012] In another possible implementation of the first aspect, storing the first card associated with the first QR code and the first store information into the QR code collection library of the mobile terminal includes: displaying a first collection control for collecting the first QR code in the QR code collection library; and, in response to a click operation on the first collection control, storing the first card associated with the first QR code and the first store information into the QR code collection library of the mobile terminal.
[0013] This implementation provides a manual save function after the mobile terminal recognizes the order QR code, allowing users to actively trigger the save action. The mobile terminal displays a first save control as the save entry point, and users can choose whether to save the order QR code according to their needs. This approach solves the problem of existing technologies that rely entirely on users manually taking and saving order images, while also giving users the power to decide whether to save. Compared to fully automated save methods, users can choose to save only frequently visited stores, avoiding the redundancy of QR code save library content and storage space consumption issues that automatic save may lead to. In addition, by clearly displaying the first save control on the interface, the discoverability of the save function is improved, allowing users to clearly understand and use the function, thus enhancing the user experience.
[0014] In another possible implementation of the first aspect, displaying the first favorite control includes: displaying the ordering interface of the first store, the ordering interface including the first favorite control; wherein the ordering interface further includes a second favorite control, the second favorite control being used to favorite the first store in the ordering platform or ordering program; or, displaying a favorite prompt interface, the favorite prompt interface including the first favorite control.
[0015] This implementation provides multiple ways to display the first collection control on the mobile terminal, enhancing the flexibility and ease of use of the collection function. In the first method, the mobile terminal simultaneously provides a first collection control and a second collection control on the ordering interface. The former is used to save the QR code to the QR code collection library, while the latter is used to save the store on the ordering platform. By displaying the two collection options side by side on the same interface, users can choose the appropriate collection method according to their usage habits and needs. They can use the QR code collection function provided in this application for quick ordering, or use the collection function built into the ordering platform for store management. This design takes into account the usage preferences of different users and improves the applicability of the collection function.
[0016] In the second approach, the mobile terminal displays the first favorite control through a separate favorites prompt interface (such as a floating notification). This interface can appear as a floating window above the ordering interface or pop up immediately after scanning the code. This prominent prompt method increases the visibility of the favorites function, effectively guiding users to complete the first favorites operation and reducing the learning cost of the favorites function.
[0017] In another possible implementation of the first aspect, identifying that the first QR code is a store's ordering QR code and obtaining the store information of the first store corresponding to the first QR code includes: identifying that the first QR code is a store's ordering QR code and that the card corresponding to the first QR code is not stored in the QR code collection library, obtaining the QR code scanning frequency of the first store corresponding to the first QR code; the QR code scanning frequency is the number of times the ordering QR code of the first store is scanned within a preset time period; if the QR code scanning frequency is greater than a preset frequency threshold, obtaining the store information of the first store corresponding to the first QR code.
[0018] Using this implementation, the mobile terminal intelligently decides whether to save a store's ordering QR code based on the user's frequency of visits. The mobile terminal counts the number of times the user scans the store's ordering QR code within a preset time period (e.g., the past month). When the number of scans exceeds a preset frequency threshold (e.g., 3 times), the mobile terminal determines that the store is frequently visited by the user, and only then does it trigger the save process, retrieving store information and generating a card. Through this intelligent filtering mechanism based on access frequency, the mobile terminal can automatically identify stores that users need to visit frequently, avoiding saving QR codes of stores that are only visited once or rarely.
[0019] Compared to completely manual collection, this method achieves automated intelligent collection, eliminating the need for users to actively judge or operate. Compared to indiscriminate fully automatic collection, this method filters by access frequency, avoiding the storage of a large number of cards in the QR code collection library, effectively saving storage space and improving the collection quality of the QR code collection library.
[0020] In another possible implementation of the first aspect, obtaining the store information of the first store corresponding to the first QR code includes: obtaining the store name of the first store based on the recognition result of the first QR code; obtaining the store address and store thumbnail of the first store from the map database through the store name; wherein the store information of the first store includes the store name, store address and store thumbnail.
[0021] Using this implementation, the mobile terminal automatically constructs complete and accurate store information through a multi-layered information acquisition mechanism. First, the mobile terminal obtains the store name based on the recognition result of the first QR code. This store name can be extracted from the URL corresponding to the QR code or parsed from the source code of the ordering interface redirected by the QR code. After obtaining the store name, the mobile terminal further queries a map database using this store name. The map database stores a large amount of standardized information about stores, including geographical coordinates and store images. Through linkage with the map database, the mobile terminal can obtain the store address and store thumbnail.
[0022] This implementation addresses the problem of insufficient store information association when users manually capture images for ordering food in existing technologies. In existing technologies, user-saved order images only contain the QR code itself; mobile terminals cannot identify the store corresponding to the image, requiring users to rely on memory or reviewing images one by one to determine the target store. However, this application's embodiment automatically acquires and associates store names, addresses, and thumbnails, ensuring each card contains rich store identification information. When users view their QR code collection, they can quickly identify stores by name, visually confirm via thumbnails (such as store signs or logos), and understand the store's location via address. This comprehensive store information display significantly reduces the difficulty for users to search for target stores, avoids the tedious operation of manually recognizing order images, and improves search efficiency and user experience.
[0023] In another possible implementation of the first aspect, storing a first card associated with the first QR code and the store information of the first store in the QR code collection library of the mobile terminal includes: generating a first card containing multiple data fields, including a QR code field, a store name field, a store address field, and a thumbnail field; wherein the QR code field stores the first QR code, the store name field stores the store name of the first store, the store address field stores the store address of the first store, and the thumbnail field is used to store a store thumbnail of the first store; and storing the first card in the QR code collection library of the mobile terminal.
[0024] Using this implementation, the mobile terminal employs a structured data storage method, organizing the order QR code and its associated information into cards containing multiple data fields. Each data field stores a specific type of information: the QR code field stores verified QR code data, the store name field stores the store name in text format, the store address field stores geographical location information, and the thumbnail field stores an image of the store or the order interface. Through this field-based data organization, the mobile terminal can manage every piece of information in the card and support data operations based on different fields, such as searching by store name, calculating distance by store address, and visually displaying information based on thumbnails.
[0025] In existing technologies, users save order images as ordinary image data in their photo albums. Mobile terminals cannot recognize the association between the order image and the store, nor can they extract and utilize the store information contained in the image. The order image is merely an image file to the mobile terminal, lacking structured data features. However, this application's embodiments generate structured cards containing multiple data fields, enabling the mobile terminal to identify the store represented by each card and perform intelligent management and operation of the cards. For example, the mobile terminal can quickly search based on the store name field; when it detects keywords related to the store name entered by the user, it can immediately locate the corresponding card. The mobile terminal can also sort or filter based on the store address field, prioritizing displaying cards of nearby stores when the user is in a specific location. These intelligent functions are impossible to achieve with existing ordinary image storage methods. The structured card design improves the efficiency and flexibility of data management, laying the foundation for subsequent functional expansion.
[0026] In another possible implementation of the first aspect, in response to a trigger operation on a second card in the QR code collection library, identifying a second QR code in the second card and displaying the ordering interface of the second store includes: in response to a trigger operation on a second card in the QR code collection library, displaying a details interface corresponding to the second card, the details interface including the second QR code, the store information of the second store, and a scanning control for the second QR code; and in response to a click operation on the scanning control, identifying the second QR code and displaying the ordering interface of the second store.
[0027] Using this implementation, when a user clicks on a card in their QR code collection, the mobile device doesn't immediately perform QR code recognition and redirect to a new interface. Instead, it first displays the card's details page. This details page shows complete store information, including the QR code image, store name, address, and thumbnail. A scanning control is also provided for the QR code image. Users can fully view the store information on the details page before clicking the scanning control. Only then does the mobile device read and recognize the QR code data on the card, subsequently redirecting to the ordering interface.
[0028] On the one hand, by setting up a dedicated QR code scanning control, users can directly trigger the ordering process by clicking the control, without having to go through intermediate steps such as opening the camera app and activating the QR code recognition function. Compared to the complex process of opening the album, selecting an image, and calling the recognition function in existing technologies, this implementation significantly reduces the number of operation steps and improves ordering efficiency. On the other hand, by displaying the details interface before performing the QR code scanning operation, the process avoids users being immediately redirected to the wrong store's ordering interface after accidentally clicking a card. Users can check the store information to determine if it is the target store. If they find that they have selected the wrong card, they can exit the details interface and select again without causing unnecessary page jumps and loading. This design ensures both the convenience and accuracy of operation.
[0029] In another possible implementation of the first aspect, the details interface also includes a button to modify partial store information, which includes the store name and store address; the method further includes: in response to a click on the modification button, displaying a modification interface corresponding to the store information; obtaining the modified store information in the modification interface, and updating the second card in the QR code collection library based on the modified store information.
[0030] Using this implementation, the mobile terminal provides an editing function for store information in the details interface, allowing users to modify and improve the store information on the card. The mobile terminal places edit buttons next to the store information displayed in the details interface; for example, an edit button next to the store name and a location button next to the store address. When the user clicks the edit button, the mobile terminal displays the store name editing interface, where the user can enter the corrected store name in the text input box. When the user clicks the location button, the mobile terminal calls the map application to display the map interface, where the user can drag and select the correct store location. After the user completes the modifications and confirms them, the mobile terminal updates the modified store information to the corresponding data fields of the card, and the corrected information will be displayed when the user views the card subsequently.
[0031] This implementation addresses the potential accuracy issues associated with automatically acquiring store information. In the automatic bookmarking process, mobile devices automatically obtain store information by parsing QR codes, accessing the ordering interface, and querying map databases. However, this automatically acquired information may have the following problems: First, the store name may be inaccurate or inconsistent with the name the user is familiar with. For example, the official name in the map database might be "Third Branch of [Company Name] Catering Co., Ltd.", while users are accustomed to calling it "[Store Name]," making the automatically acquired complex name difficult for users to recognize. Second, the store address may be inaccurate; for example, the location coordinates in the map database may not be precise enough, or the store may have relocated but the map database has not been updated. By providing editing functions, users can correct and personalize this information according to actual circumstances and personal habits, ensuring the accuracy of the card content.
[0032] In another possible implementation of the first aspect, the method further includes: obtaining the current geographical location of the mobile terminal according to a preset period; calculating the distance between the current geographical location and the store address of the third store; the third store refers to the store corresponding to one or more cards in the QR code collection library; and displaying a push notification for the store corresponding to the third store when the distance is less than a distance threshold.
[0033] This implementation method enables mobile terminals to achieve location-based intelligent push notifications, further simplifying the user's ordering process. The mobile terminal automatically obtains the user's current location coordinates through a positioning system at preset intervals. After obtaining the location information, the mobile terminal iterates through all cards in the QR code collection, extracting the location coordinates of the stores from the store address field of each card, and calculating the distance between the user's current location and each collected store. When it finds that the distance between a store and the user's current location is less than a preset distance threshold, the mobile terminal determines that the user is close to that store, and displays a push notification for that store on the mobile terminal's screen. This notification can be displayed in a floating window format, including the store name, store thumbnail, distance information, and ordering guidance information.
[0034] Through a proactive push mechanism, mobile devices can automatically remind users when they approach a store, eliminating the need for users to manually open photo albums, access QR code collections, browse card lists, and perform other similar actions. This reduces the number of steps required and enhances the level of intelligence.
[0035] In another possible implementation of the first aspect, identifying that the first QR code is a store's ordering QR code includes: identifying the Uniform Resource Locator URL corresponding to the first QR code; and determining that the first QR code is a store's ordering QR code if the URL contains a preset platform domain name.
[0036] Using this implementation, the mobile terminal determines whether a QR code is for ordering food by analyzing the URL characteristics corresponding to the QR code. After recognizing the first QR code, the mobile terminal decodes it to obtain the corresponding URL. Then, the mobile terminal checks whether the URL contains a preset platform domain name. These platform domain names correspond to mainstream food ordering platforms, such as some food delivery platforms or ordering systems built by catering companies. The mobile terminal pre-stores a list of these platform domain names. When the recognized URL contains any domain name in the list, the mobile terminal can determine that the QR code is for ordering food, thereby triggering the subsequent processes of obtaining store information and generating a card.
[0037] This implementation method uses URL feature recognition to determine the QR code type, improving the accuracy of the determination. In practical applications, mobile terminals scan various types of QR codes, such as payment QR codes, web link QR codes, business card QR codes, and in-store ordering QR codes. If the mobile terminal performs a save process for all scanned QR codes, the QR code save library would contain a large number of cards that are not ordering QR codes, reducing the value of the save library.
[0038] In another possible implementation of the first aspect, the mobile terminal includes a scanning application and a terminal assistant application; the scanning application is used to scan and recognize the first QR code to obtain the QR code information of the first QR code; the terminal assistant application is used to obtain the store information of the first store corresponding to the first QR code and store the first card associated with the first QR code and the store information of the first store into the QR code collection library of the mobile terminal based on the QR code information of the first QR code.
[0039] This implementation method uses a modular software architecture to implement the QR code scanning method on the mobile terminal, assigning different functional responsibilities to different application modules. The scanning application focuses on the scanning and recognition of QR codes, responsible for using the camera to capture images, processing the images, recognizing the QR codes in the images, and decoding them to obtain the QR code information. The scanning application can be the mobile terminal's built-in camera application or a third-party developed scanning tool application. The terminal assistant application is responsible for higher-level intelligent processing functions, including determining the QR code type, obtaining store information, generating and storing cards, and managing the QR code collection library. The terminal assistant application can be a system-level application on the mobile terminal, such as an AI assistant application, possessing comprehensive management capabilities for user data.
[0040] The two application modules communicate via a data interface. After recognizing the first QR code, the scanning application transmits the QR code information (such as URL, text content, etc.) to the terminal assistant application. Upon receiving the QR code information, the terminal assistant application performs subsequent acquisition and storage operations.
[0041] Through the collaborative efforts of multiple applications, cross-application function calls can be supported. Even if the mobile terminal uses a third-party scanning application to scan the code, as long as the application can pass the QR code information to the terminal assistant application, the automatic collection function provided in this application can be realized, which improves the compatibility and applicability of the scanning method.
[0042] Secondly, a mobile terminal is provided, which is equipped with the function of implementing the QR code scanning method of the first aspect described above. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above function.
[0043] Thirdly, a computer-readable storage medium is provided that stores instructions which, when executed on a computer, enable the computer to perform any of the scanning methods described in the first aspect above.
[0044] Fourthly, a computer program product containing instructions is provided, which, when run on a computer, enables the computer to execute any of the scanning methods described in the first aspect above.
[0045] The technical effects of any of the design methods in the second to fourth aspects can be found in the technical effects of different design methods in the first aspect, and will not be repeated here. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a mobile terminal provided in an embodiment of this application; Figure 3 A software structure block diagram of a mobile terminal provided in an embodiment of this application; Figure 4 A flowchart illustrating a scanning method provided in an embodiment of this application; Figure 5A A schematic diagram of the interface of a mobile terminal provided in an embodiment of this application; Figure 5B A schematic diagram of the interface of another mobile terminal provided in an embodiment of this application; Figure 6A A schematic diagram of a photo album application interface provided in an embodiment of this application; Figure 6B A schematic diagram of another photo album application interface provided in an embodiment of this application; Figure 6C A schematic diagram of a card details interface provided in an embodiment of this application; Figure 7A flowchart illustrating another scanning method provided in this application embodiment; Figure 8A A schematic diagram of a store push notification interface provided in an embodiment of this application; Figure 8B A schematic diagram of another store push notification interface provided in an embodiment of this application; Figure 9A A software structure block diagram of a mobile terminal provided in an embodiment of this application; Figure 9B A software structure block diagram of another mobile terminal provided in an embodiment of this application; Figure 9C A software structure block diagram of another mobile terminal provided in an embodiment of this application; Figure 9D This is a software structure block diagram of another mobile terminal provided in an embodiment of this application. Detailed Implementation
[0047] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0048] With the rapid development of mobile internet and QR code technology, more and more restaurants are adopting QR code scanning to provide ordering services. The existing QR code ordering process typically includes the following steps: the mobile terminal's camera captures an image containing the ordering QR code; the terminal parses the ordering QR code in the image and performs a page redirection operation to display the ordering interface; the terminal receives operation instructions for the ordering interface to complete the food selection and payment process.
[0049] For example, please refer to Figure 1 The illustration shows an application scenario provided by an embodiment of this application. In this scenario, mobile phone 101 can scan QR code 102 to order food. This ordering method improves ordering efficiency and also facilitates order management for stores.
[0050] For ease of explanation, the image containing the ordering QR code in this application embodiment is referred to as an ordering image.
[0051] However, the existing QR code ordering method has the following technical problems: Although existing technologies offer the ability to save the ordering interface, without manually saving it, mobile devices cannot easily access previously loaded ordering interfaces each time they order food. The ordering image must be scanned again to display the interface. This repetitive operation results in low ordering efficiency.
[0052] Besides the need for manual saving of the ordering interface, mobile devices typically don't save the order QR code. Each time an order is placed, the mobile device must use its camera to re-capture an image of the restaurant. Even if the mobile device has scanned an image of a restaurant multiple times, it usually cannot easily obtain the restaurant's order QR code through other means. This prevents users from completing the ordering process—loading the interface and selecting dishes—before arriving at the restaurant, leading to reduced ordering efficiency.
[0053] Existing technologies also include solutions where users manually save images of their orders. In this method, a mobile device can capture an image of the order using its camera and store it in a photo album application. When ordering again, the mobile device can retrieve the image from its album and then scan the QR code displayed on the screen using its QR code recognition function.
[0054] However, this approach also has some problems. First, saving and scanning the order images requires relatively cumbersome manual operations, including opening the camera app, taking the order image, opening the album app, searching for the order image, and calling the QR code recognition function, so the ordering efficiency still cannot be improved.
[0055] Secondly, mobile devices store order images as ordinary image data in their photo albums, and the processor cannot associate these images with store information. When multiple store images are stored in the mobile device's photo album, the device cannot determine the store associated with each image. The device needs to receive user commands to browse the images one by one in the album and manually identify the target store's QR code, a manual retrieval method that is inefficient.
[0056] Secondly, since the order image is captured using the mobile device's camera, it's uncertain whether it can be successfully scanned. Verification from the user is required; that is, after capturing the order image, the system detects the user's call to the QR code recognition function to verify its scan capability. Failure to verify the order image may result in failed orders on subsequent visits.
[0057] Finally, after the mobile terminal stores the order image as a regular image, it cannot directly access the ordering interface from that image. When the mobile terminal detects a selection operation on the order image, it only performs the image display operation. The mobile terminal also needs to detect the user's call to the QR code recognition function before it can scan the order image and trigger the redirection to the ordering page. The ordering process remains relatively cumbersome, resulting in low ordering efficiency.
[0058] To address the aforementioned technical issues, this application provides a QR code scanning method. In this method, after scanning a store's ordering QR code, the mobile terminal recognizes that the QR code is indeed a store's ordering QR code, obtains the store information corresponding to the QR code, and stores the card associated with the QR code and store information in the mobile terminal's QR code collection library. This QR code collection library is an album within the mobile terminal's photo app, used to store at least one card. When a user needs to revisit the store, they can directly access the card from the QR code collection library. The mobile terminal recognizes the QR code in the card and displays the store's ordering interface, without requiring the camera to re-capture the ordering image.
[0059] Through the above technical solutions, the embodiments of this application achieve the following technical effects: After scanning the order QR code, the mobile terminal automatically recognizes and stores the order QR code and its associated store information in the QR code collection library of the photo application in the form of a card. In scenarios where the same store is visited multiple times, the mobile terminal's camera does not need to repeatedly capture images containing the order QR code, thus improving ordering efficiency.
[0060] Compared to the previous method where users manually saved the order image as a regular image to their photo album and then scanned it again, in this embodiment, the mobile terminal recognizes the order QR code upon the first scan and stores it directly in the card. When the mobile terminal needs to use the order QR code later, it can directly retrieve it from the card without requiring the camera to perform secondary recognition of the order image displayed on the screen. This eliminates the QR code recognition processing step and speeds up the process.
[0061] When storing order QR codes, mobile devices can also associate and bind store information such as store name and address with the QR code, forming a structured card containing multiple data fields, instead of simply saving the order image. This structured data storage method allows mobile devices to clearly identify the store associated with each card, avoiding the inefficient operation of manually browsing and recognizing order images in the photo album.
[0062] When the mobile device scans the order QR code for the first time, it has already recognized and verified the validity of the QR code using its QR code recognition function. The mobile device only stores the QR code in its card after confirming that it can be successfully parsed. This ensures that subsequent order QR codes retrieved from the mobile device's QR code library are all verified and valid, avoiding scanning failures caused by poor image quality.
[0063] When a mobile terminal stores a card, it can associate a QR code scanning control that directly triggers the ordering process with that card. When the mobile terminal retrieves the card from its QR code library and displays it, the screen can show the QR code scanning control. After detecting a trigger on the QR code scanning control, the mobile terminal can directly read and recognize the ordering QR code on the card to jump to the ordering interface, reducing the number of steps required for ordering and improving efficiency.
[0064] For example, the mobile terminal in this application embodiment may be a portable computer (such as a mobile phone), tablet computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, augmented reality (AR) or virtual reality (VR) device, etc., that supports camera function. This application embodiment does not impose any special restrictions on the specific form of the terminal device.
[0065] Before detailing the scanning method provided in the embodiments of this application, the structure of the mobile terminal will be introduced first to explain how the mobile terminal implements the above-mentioned scanning function.
[0066] Please refer to Figure 2 This illustrates a structural diagram of a mobile terminal provided in an embodiment of this application. Figure 2 As shown, the mobile terminal 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery chip 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, a sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a SIM card interface 295, etc.
[0067] The structure illustrated in this embodiment of the invention does not constitute a limitation on the mobile terminal 200. It may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of both.
[0068] Processor 210 may include one or more processing units. For example, processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0069] The aforementioned controller can act as a decision-maker, directing the various components of the mobile terminal 200 to coordinate their operations according to instructions. It serves as the nerve center and command center of the mobile terminal 200. 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 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory, which can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0071] The wireless communication function of the mobile terminal 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem, and baseband processor. In some embodiments of this application, the mobile terminal 200 can send signals to launch a target application, invoke camera drivers, etc., through the aforementioned wireless communication module 260. The mobile terminal 200 can also, after recognizing a QR code for ordering food, perform corresponding operations based on the recognized QR code through the aforementioned mobile communication module 250 or wireless communication module 260, such as opening a webpage.
[0072] The mobile terminal 200 implements display functions through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0073] Display screen 294 is used to display images, videos, etc. Display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Minied LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.
[0074] The mobile terminal 200 can perform shooting functions through an ISP, camera 293, video codec, GPU, display screen 294, and application processor.
[0075] The ISP (Image Signal Processor) is used to process data fed back from the camera 293. 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, converting it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 293.
[0076] Camera 293 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the mobile terminal 200 may include one or N cameras 293, where N is a positive integer greater than 1.
[0077] In this embodiment, the mobile terminal 200 can acquire an image containing a QR code through the camera 293. The mobile terminal 200 identifies the image captured by the camera 293, determines the QR code information corresponding to the QR code, and then performs corresponding operations based on the QR code information.
[0078] Figure 3 This application provides a software architecture block diagram for a mobile terminal. The software system of the mobile terminal can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses a layered architecture as an example to illustrate the software structure of the mobile terminal 200.
[0079] like Figure 3 As shown, a layered architecture divides software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer (referred to as the application layer) 310, the application framework layer (referred to as the framework layer) 320, the hardware abstract layer (HAL) layer 330, and the kernel layer (also known as the driver layer).
[0080] The application layer 310 may include a series of application packages. In this embodiment, the application layer 310 may include a camera application 311. The operation of the camera application 311, such as taking photos and recording videos, requires the use of a camera. In addition, in this embodiment, the application layer 310 may also include other applications (also known as third-party applications) 312 that require the use of a camera. The camera application 311 and the third-party application 312 can be used to display preview images on the QR code scanning interface and can be used to capture QR code images.
[0081] In this embodiment, the application layer 310 can activate the camera according to the user's operation instruction to the HAL layer 330. The application layer 310 can also perform a magnification operation on the image captured by the camera according to the user's operation instruction to the HAL layer 330, or instruct the HAL layer 330 to turn the flashlight function on / off.
[0082] The framework layer 320 provides the application programming interface (API) and programming framework for the application layer 310. The framework layer 320 includes some predefined functions. For example... Figure 3 As shown, the framework layer 320 can provide camera APIs, such as Camera API 321 and Camera Service 322.
[0083] In this embodiment, Camera API 321 serves as the interface for interaction between the lower layer (such as HAL layer 330) and the application layer 310. Specifically, Camera API 321 can receive requests from the upper layer (such as application layer 310) to activate a specified camera and process these requests through camera service 921. In this embodiment, camera service 322 then activates the corresponding camera through HAL layer 330 and obtains preview images, QR code images, etc., captured by the camera through HAL layer 330.
[0084] HAL layer 330 is used to connect frame layer 320 and kernel layer. For example, HAL layer 330 can perform data transmission between frame layer 320 and kernel layer. Of course, HAL layer 330 can also process data from the lower layer (i.e., kernel layer) before transmitting it to frame layer 320. In this embodiment, HAL layer 330 can process image data captured by camera in kernel layer and return preview image and barcode image to camera service 322.
[0085] like Figure 3 As shown, the HAL layer 330 may include a HAL interface definition language (HIDL) interface 331, a camera hardware abstraction layer (Camera Provider) 332, and HAL interfaces. The camera HAL 931 provides a standard HIDL interface for calls to upper layers (such as camera service 322), maintaining normal communication with the upper layers. Furthermore, the camera HAL 331 uses a standard HAL interface, such as HAL3.0 (333 in the diagram), to control the camera in the kernel layer and acquire image data captured by the camera.
[0086] The scanning method provided in this application is described in detail below with reference to specific embodiments.
[0087] Please refer to Figure 4 The diagram illustrates a flowchart of a barcode scanning method provided in an embodiment of this application. Figure 4 As shown, the method may include the following steps: S401, the mobile terminal responds to the user's scanning operation, starts the scanning function of the scanning application, and displays the scanning interface.
[0088] In the embodiments of this application, the mobile terminal can trigger the scanning function in various ways. For example, clicking the scanning application icon on the phone's desktop, or starting the "Start Scan" function within the scanning application. Another example is starting the scanning function entry point in payment or social applications.
[0089] When the mobile terminal detects the user's scanning operation, the scanning application in the application layer 310 sends a request to the camera service 322 in the framework layer 320 to start the camera. After receiving the request, the camera service 322 starts the camera through the camera HAL 332 in the HAL layer 330. After the camera starts, it begins to acquire image data and transmits the acquired image data to the HAL layer 330 for processing.
[0090] HAL layer 330 processes the image data captured by the camera to generate a preview image. This preview image is displayed in real-time on the barcode scanning interface, allowing the user to see the current view captured by the camera. HAL layer 330 transmits the preview image to frame layer 320, which then transmits it to application layer 310. Upon receiving the preview image, application layer 310 displays the barcode scanning interface on display screen 294, where the preview image is shown in real-time.
[0091] In some embodiments, the scanning interface may include a scanning frame. The scanning frame is a rectangular area that may be located in the center of the scanning interface. The scanning frame is used to guide the user to place the QR code within this area for scanning.
[0092] S402, the mobile terminal captures an image containing the first QR code through the camera, recognizes the image, and obtains the QR code information of the first QR code.
[0093] In this embodiment, when a user places a QR code within the scanning frame, the camera continuously captures an image containing the first QR code. The HAL layer 330 receives the image captured by the camera and transmits it to the scanning application in the application layer 310.
[0094] After receiving the image, the application layer 310 can call a QR code recognition algorithm to analyze the image. This QR code recognition algorithm can be used to identify QR codes contained within the image.
[0095] The following is an example of a QR code recognition algorithm. The mobile terminal can preprocess the image, including operations such as grayscale conversion, binarization, and edge detection. Through these preprocessing operations, the QR code in the image can be separated from the background. Then, the mobile terminal locates the separated QR code, determining its position and orientation within the image. After determining the QR code's position and orientation, the mobile terminal decodes the QR code according to its encoding rules to obtain the corresponding information data. In this embodiment, this information data is referred to as QR code information.
[0096] In this embodiment, the QR code information may include various types of data. For example, the QR code information may be a Uniform Resource Locator (URL) that points to a web address. Another example is that the QR code information may be a piece of text containing content such as a store name or an ordering link. Yet another example is that the QR code information may be a string of numbers or characters used to identify a specific object or service.
[0097] S403, the mobile terminal recognizes that the first QR code is a store's ordering QR code and obtains the store information of the first store corresponding to the first QR code.
[0098] In this embodiment of the application, after obtaining the QR code information, the mobile terminal needs to determine whether the first QR code is a store's ordering QR code. The mobile terminal can make this determination in various ways.
[0099] In some embodiments, the mobile terminal can determine the type of QR code based on the URL in the QR code information. If the URL in the QR code information contains a specific domain name or path, the first QR code can be identified as a store's ordering QR code. For example, the URL of an ordering QR code provided by a certain catering platform usually contains the catering platform's domain name. The mobile terminal can pre-store a list of these catering platform domain names, and when the URL in the identified QR code information contains a domain name from the list, it can be determined that the first QR code is a store's ordering QR code.
[0100] In some embodiments, the mobile terminal can determine whether a QR code is a store's ordering QR code by querying the network. The mobile terminal sends the QR code information to the server, which queries its database to determine whether the QR code is indeed a store's ordering QR code. The server returns the query results to the mobile terminal, which then makes its own determination based on the results.
[0101] In some embodiments, the mobile terminal can also make a determination based on the user's current geographical location. The mobile terminal obtains the user's current geographical coordinates through its location function. Then, the mobile terminal queries nearby stores based on the geographical coordinates. These nearby stores can be stores whose distance from the geographical coordinates is less than a distance threshold. If the identified QR code information matches the ordering QR code of a nearby store, then the first QR code can be determined to be the store's ordering QR code.
[0102] Once the mobile terminal recognizes that the first QR code is a store's ordering QR code, the mobile terminal obtains the store information of the first store corresponding to the first QR code.
[0103] During the collection process, the mobile device needs to obtain the store information of the first store corresponding to the first QR code. Store information may include store name, store address, store thumbnail, etc. The mobile device can obtain store information in various ways.
[0104] In some embodiments, a mobile terminal can directly extract store information from QR code information. When generating an ordering QR code, some stores encode information such as the store name and address into the QR code. After decoding the QR code, the mobile terminal can extract the store name, address, and other store information from the decoded information.
[0105] In some embodiments, the mobile terminal can also obtain store information from the ordering interface corresponding to the first QR code. The ordering interface corresponding to the first QR code refers to the interface that the mobile terminal is redirected to after scanning the first QR code. This ordering interface typically includes information such as the store name, store address, and logo. It's important to understand that the mobile terminal can obtain the source code of this ordering interface, such as HTML code, before it is displayed. The mobile terminal can then parse the source code of this ordering interface to obtain the store information.
[0106] In some embodiments, the mobile terminal can obtain store information through an online query. After obtaining the store name through the QR code information or the source code of the ordering interface, the mobile terminal can send the store name to the server. The server then queries its database based on the store name to retrieve the store information corresponding to the first QR code. The server returns the store information to the mobile terminal. For example, a map database can store store information for multiple stores.
[0107] In some embodiments, the store thumbnail can be a landmark image of the store, such as a photo of the store's signboard or logo. The mobile device can obtain the landmark image of the store from the aforementioned ordering interface or through online querying, and use it as the store thumbnail. If a landmark image of the store cannot be obtained, the mobile device can also use the aforementioned ordering interface as the store thumbnail.
[0108] S404, the mobile terminal stores the first card associated with the first QR code and the store information of the first store into the mobile terminal's QR code collection library; the QR code collection library is an album in the mobile terminal's album application, and the QR code collection library stores at least one card.
[0109] In this embodiment, after the mobile terminal obtains the first QR code and the store information of the first store, it associates this information to form a first card and stores the first card in the mobile terminal's memory. Specifically, the mobile terminal creates an album in the photo album application, which is called the QR code collection library. The QR code collection library is used to store all the cards corresponding to the stores collected by the user. A card can be a data object in the QR code collection library. It should be understood that the above photo album application is only an example and does not mean that the QR code collection library must be created in the photo album application. For example, the QR code collection library can also be created in the file management application. There is no limitation on this, but for the sake of explanation, this embodiment uses the photo album application as an example.
[0110] When storing the first card, the mobile terminal can save the first QR code as a QR code image. The QR code image is an image file generated based on the first QR code, and the image file uses a common image format, such as JPEG or PNG format.
[0111] Store information can include store name, store address, store thumbnail, etc.
[0112] It is important to understand that image data for a single image can originally include multiple fields, such as time, location, date, ID, and thumbnail. In this embodiment, these fields can be reused in the card's data structure. For example, the thumbnail field, originally used to store image thumbnails, can be used to store store thumbnails in this embodiment. Similarly, the location field, originally used to store the location where the image was taken, can be used to store the store address in this embodiment.
[0113] Furthermore, embodiments of this application may add other fields to the card's data structure, such as a store name field and a QR code field. Thus, the store name field can be used to store the store name, and the QR code field can be used to store the QR code image corresponding to that store.
[0114] In some embodiments, after recognizing that the first QR code is a store's ordering QR code, the mobile terminal can first determine whether the card corresponding to the first QR code is already stored in the QR code collection library. If the card corresponding to the first QR code is already stored in the QR code collection library, the mobile terminal will not store it again. If the card corresponding to the first QR code is not stored in the QR code collection library, the mobile terminal will store the first card in the QR code collection library.
[0115] In some embodiments, the mobile terminal can decide whether to store the first card in the QR code collection library based on the user's frequency of visits to the first store. Specifically, the mobile terminal can obtain the number of times the ordering QR code of the first store is scanned within a preset time period, which is called the QR code scanning frequency. If the QR code scanning frequency is greater than a preset frequency threshold, the mobile terminal determines that the user frequently visits the first store and stores the first card in the QR code collection library. If the QR code scanning frequency is less than or equal to the preset frequency threshold, the mobile terminal does not store the first card.
[0116] Through steps S401 to S404 above, the mobile terminal implements the function of automatically saving the store's ordering QR code. After the user scans the store's QR code, the mobile terminal automatically recognizes it and saves the QR code to the QR code collection library for easy access next time.
[0117] In some embodiments of this application, the mobile terminal may also provide a manual collection function, allowing users to actively trigger the collection operation.
[0118] Please refer to Figure 5A , Figure 5A This illustration shows a schematic diagram of a mobile terminal interface provided in an embodiment of this application. After the mobile terminal recognizes that the first QR code is a store's ordering QR code, a first collection control 501 can be displayed on the scanning interface or the ordering interface. The first collection control 501 is used to collect the first QR code in the QR code collection library.
[0119] In some embodiments, when the mobile terminal displays the ordering interface of the first store, it can also display a first favorites control 501 on the ordering interface. The ordering interface may further include a second favorites control ( Figure 5A (Not shown in the image), the second favorites control is used to favorite the first store on the ordering platform or in the ordering program. This allows users to choose to favorite the first store on the ordering platform or add the first QR code to their QR code favorites library.
[0120] In some embodiments, the mobile terminal may also display a favorites prompt interface, which includes a first favorites control 501. For example, the favorites prompt interface may be a floating window notification containing prompts such as whether a store ordering QR code has been detected and whether to favorite the item, as well as the first favorites control 501.
[0121] In response to a click on the first collection control 501, the mobile terminal stores the first card associated with the first QR code and the store information of the first store into the mobile terminal's QR code collection library.
[0122] After successfully adding an item to your favorites on your mobile device, a message indicating successful addition will be displayed. Please refer to [link / reference]. Figure 5B , Figure 5B This is a schematic diagram of another mobile terminal interface provided in an embodiment of this application. In the mobile terminal's ordering interface 502, a floating notification 503 is displayed, indicating that the QR code has been saved.
[0123] In some embodiments of this application, the mobile terminal may also provide a QR code collection library management function, allowing users to view, edit, and delete collected QR codes. Here, we will continue to describe the QR code collection library as an album within a photo album application.
[0124] Please refer to Figure 6A The illustration shows a schematic diagram of a photo album application interface provided in an embodiment of this application. The photo album application interface includes multiple albums, with the QR code collection library 601 being one of them. Other albums include a camera album, a screenshot album, and a custom album. A mobile terminal can access the photo album interface of the QR code collection library 601 by clicking on it.
[0125] Please refer to Figure 6B This illustrates a schematic diagram of another photo album application interface provided in an embodiment of this application. Figure 6B As shown, the album interface of the QR code collection library 601 can include multiple cards 602. The album interface of the QR code collection library 601 displays all the cards 602 corresponding to the collected stores in the form of icons. Figure 6B For example, the six cards 602 correspond to six icons, each containing the name of the saved store (e.g., store 1) and a QR code image.
[0126] The multiple cards 602 can be arranged in a certain preset order. This preset order can be chronological, based on the number of store visits, etc., and there are no restrictions on it.
[0127] In some embodiments, the icon corresponding to card 602 may also include other information such as a store thumbnail, the time of collection, and operation buttons. For example, a QR code image and a store thumbnail are displayed together in the icon. Another example is that the time of collection can be displayed below the store name, indicating when the user collected the store. Yet another example is that operation buttons can be displayed on the right side of the icon, and the mobile terminal can edit or delete the card 602 in response to the user clicking the operation button.
[0128] S405, the mobile terminal responds to the trigger operation of the second card in the QR code collection library, identifies the second QR code in the second card, and displays the ordering interface of the second store; wherein, the second card includes the second QR code and the store information of the second store.
[0129] In this embodiment of the application, when a user needs to order food again at a target store, the order can be completed through the following operations. These operations can be, in sequence, opening the photo album application, entering the QR code collection library, viewing the card corresponding to the target store, and triggering the second card corresponding to the target store.
[0130] In some embodiments, the second card further includes a scanning control, and the triggering operation for the second card is a click operation on the scanning control.
[0131] Please refer to Figure 6C The diagram illustrates a card details interface provided in an embodiment of this application. The mobile terminal detects a user's click on one of the cards 602 and enters the details interface corresponding to that card 602. The details interface can display complete information about the store, including a QR code image 603, a store information area 604, etc. Furthermore, the details interface can also include a store thumbnail, i.e., the ordering interface 605 in the diagram.
[0132] like Figure 6C As shown, the details interface corresponding to the card may include a QR code image 603, a store information area 604, and a scanning control 6031. The QR code image 603 is the image of the store's ordering QR code, and the scanning control 6031 is correspondingly set on this QR code image 603.
[0133] The mobile terminal can respond to a click on the scanning control 6031, recognize the second QR code in the QR code image 603, and obtain the QR code information corresponding to the second QR code. Based on the QR code information, the mobile terminal determines the web address corresponding to the ordering interface, accesses that web address, and obtains the interface data of the ordering interface. After receiving the ordering interface data, the mobile terminal displays the ordering interface of the second store. In this way, users can directly access the ordering interface without re-scanning the QR code.
[0134] In some embodiments, the mobile terminal may also respond to a click operation on the QR code image 603, recognize the second QR code in the second card, and display the ordering interface of the second store.
[0135] The store information section 604 includes information such as store name, store address, and the time the item was saved. It's important to understand that the store name and address determined during the saving process may be inaccurate. Therefore, mobile devices can provide editing functions to allow users to edit the store name and address.
[0136] In some embodiments, the details interface also includes a button to modify certain store information, which includes the store name and store address. The modification button varies depending on the specific store information.
[0137] In this section, the store name in the store information area 604 can be assigned an edit button 6041, and the store address in the store information area 604 can be assigned a location button 6042. Both the edit button 6041 and the location button 6042 can be the aforementioned modification buttons.
[0138] The mobile terminal can respond to a click on the edit button 6041, displaying the modification interface corresponding to the store name. Users can modify the store name in this interface. The mobile terminal retrieves the modified store information from the modification interface and updates the second card in the QR code collection library based on this information. After detecting the user's confirmation of the modified store name, the mobile terminal updates and stores the modified store name in the QR code collection library.
[0139] The mobile terminal can respond to a click on the location button 6042 by calling a map application to display a map interface. The user can then reselect the store's geographical location on the map. After detecting the new location selected by the user on the map, the mobile terminal uses this new location as the modified store address and updates the second card in the QR code collection based on this modified store address.
[0140] Through the above embodiments, the mobile terminal realizes the functions of collecting, managing, and retrieving store ordering QR codes. After a user scans a store's QR code for the first time, the mobile terminal can collect the QR code into its QR code collection library. When the user needs to order food at the same store again, they can directly retrieve the QR code from the collection library without having to go to the store to scan it again, thereby improving ordering efficiency and enhancing the user experience.
[0141] In some embodiments of this application, the mobile terminal can also provide a location-based ordering push function. When a user is near a saved store, the mobile terminal can proactively push the store's ordering QR code information, further simplifying the user's ordering process.
[0142] Please refer to Figure 7 This illustrates a flowchart of another barcode scanning method provided in an embodiment of this application. Figure 7 As shown, the method may include the following steps: S701, the mobile terminal obtains the current geographical location of the mobile terminal according to a preset period.
[0143] In the embodiments of this application, the mobile terminal can obtain the user's current geographical location in various ways. For example, the mobile terminal can obtain the user's geographical coordinates through a positioning system, such as the BeiDou Navigation Satellite System or the Global Positioning System (GPS). Alternatively, the mobile terminal can determine the user's geographical location through network positioning based on information from base stations or wireless network access points.
[0144] In some embodiments, the mobile terminal can periodically obtain the user's current geographical location. For example, the mobile terminal can obtain the user's geographical coordinates every preset time interval (such as 1 minute, 5 minutes, etc.). This allows for real-time monitoring of the user's location changes and timely detection of whether the user is nearing a saved store.
[0145] In some embodiments, to reduce power consumption, the mobile terminal may activate the geolocation acquisition function only under specific conditions. For example, the mobile terminal may activate the geolocation acquisition function during specific time periods (such as lunchtime from 11:00 AM to 1:00 PM and dinnertime from 5:00 PM to 7:00 PM) based on the user's historical ordering times. Alternatively, the mobile terminal may activate the geolocation acquisition function when it detects user movement.
[0146] S702, the mobile terminal calculates the distance between the current geographical location and the store address of the third store; the third store refers to one or more stores in the QR code collection library.
[0147] In this embodiment, the mobile terminal stores multiple cards in a QR code collection library, each card including a store address. The store address can be the geographical coordinates of the store, such as longitude and latitude information.
[0148] The mobile terminal iterates through all the cards in the QR code collection library and extracts the store address information from each card. This store address information is used for subsequent comparison with the user's current geographical location.
[0149] The mobile terminal calculates the distance between the user's current geographic location and the store address. The distance can be calculated using various methods, such as the Euclidean algorithm, and there are no restrictions on the method used.
[0150] In some embodiments, the mobile terminal can simultaneously calculate the distance between the user's current geographical location and multiple saved stores.
[0151] S703: When the mobile terminal is within a distance threshold, it displays a push notification for the third store.
[0152] In this embodiment, the distance threshold is a preset value used to determine whether a user is close to the store. For example, the distance threshold can be set to 50 meters, 100 meters, 200 meters, etc. The specific value of the distance threshold can be configured according to the actual application scenario and user needs.
[0153] When a mobile device determines that the distance between a user's current location and the address of a saved store is less than a distance threshold, it assumes the user is near the store and generates and displays a push notification. If the distance is greater than or equal to the distance threshold, it assumes the user is not yet near the store and no push notification is triggered.
[0154] In some embodiments, if the user's current geographic location is less than the distance threshold to multiple stores, the mobile terminal determines that the user is near multiple saved stores. The mobile terminal can record information about all stores whose distance is less than the distance threshold.
[0155] Please refer to Figure 8A This illustration shows a schematic diagram of a store push notification interface provided in an embodiment of this application. Figure 8A As shown, the store push notification 801 can also be a floating notification. The store push notification 801 can include a store thumbnail 802 and a prompt message 803. The prompt message 803 includes the name of the saved store, for example, "Frequently visited store nearby - xx coffee shop". The prompt message 803 can also include the distance between the user's current location and the address of the saved store, for example, "50m", indicating that the distance between the user's current location and the address of the saved store is 50 meters. In addition, the prompt message 803 can also include ordering guidance information, such as "Frequently visited store detected nearby, go to order," which can guide the user to click on the store push notification 801 to order food.
[0156] In some embodiments, if the user's current geographic location is less than a distance threshold from multiple saved stores, the mobile device can display push notifications for each of the saved stores. Please refer to [link / reference]. Figure 8B This illustrates a different interface diagram for store push notifications provided in an embodiment of this application. For example... Figure 8BAs shown, multiple store push notifications 801 can be displayed side by side, and each store push notification 801 can be a floating window notification. Each store push notification 801 corresponds to a different store that has been saved.
[0157] Alternatively, the mobile device could not display individual push notifications for each of the saved stores. Instead, it could display a single notification related to the number of saved stores, indicating that multiple saved stores are nearby. For example, if the device detects that the user's current location is within a distance threshold of three saved stores, the notification could read, "Three frequently visited stores detected nearby; go order." Then, after detecting a user's click on this notification, the mobile device could then display individual push notifications for each of the saved stores.
[0158] S704, the mobile terminal responds to the triggered operation of the store push notification and displays the details interface of the third card corresponding to the third store.
[0159] In this embodiment, after seeing a store push notification, a user can trigger the notification by clicking on it, thus initiating a subsequent ordering process. Once the mobile terminal detects the user's click on the store push notification, it displays the details of the card for the selected store, based on the user's selected click. Specifically, this details interface can be found in [reference needed]. Figure 6C The interface shown includes a QR code image, store information, and scanning controls.
[0160] Users can click the QR code control on the details page. The mobile terminal responds to the click operation of the QR code control, recognizes the QR code in the card, and displays the store's ordering interface.
[0161] Through steps S701 to S704 above, the mobile terminal implements a location-based intelligent push function. When a user approaches a saved store, the mobile terminal can proactively push store information to remind the user to place an order. This eliminates the need for users to actively open their photo album to search for a QR code, further simplifying the ordering process and improving the user experience.
[0162] In some embodiments of this application, the mobile terminal can also combine time fences and geofences to achieve a more intelligent push function.
[0163] Specifically, the mobile device can determine whether to display push notifications for saved stores based on the user's historical ordering time and geographical location. The mobile device records the QR code scanning time for each store and determines the user's dining time at that store based on the scanning time. For example, the time period could be "11:30 AM to 1:00 PM on weekdays".
[0164] Prior to S703, the mobile terminal could obtain the current time and determine whether the current time fell within the aforementioned time period information. Then, if the current time fell within the aforementioned time period information and the distance between the user's current geographical location and the store address was less than a distance threshold, the mobile terminal could display a push notification for the store corresponding to the saved store.
[0165] This push notification method, based on time and geofencing, can more accurately identify users' ordering needs and improve the intelligence of the push information.
[0166] In some embodiments of this application, the mobile terminal can also provide an automatic card cleanup function. The mobile terminal can automatically delete cards that have not been accessed for a long time based on card access history, thereby freeing up storage space and improving the management efficiency of the QR code collection library.
[0167] The mobile terminal can detect the most recent access time of each card in the QR code collection library. In this embodiment, the mobile terminal can record the user's access operations on each card in the QR code collection library. Access operations may include the user clicking on a card to view its details, or the user ordering food through the QR code on the card. When the mobile terminal detects that a user has performed an access operation on a card, it can record the time of the access operation and update that time to the most recent access time of that card.
[0168] In some embodiments, the mobile terminal can detect the last access time of each card in the QR code collection library according to a preset detection period. The preset detection period can be one day, one week, one month, etc., and this application embodiment does not limit this. For example, the mobile terminal can perform a detection once a week, traversing all cards in the QR code collection library and obtaining the last access time of each card.
[0169] After obtaining the card's most recent access time, the mobile terminal calculates the time interval between that last access time and the current time. A preset time threshold is a pre-defined value used to determine whether the card has not been accessed for an extended period. For example, the preset time threshold can be set to 30 days, 60 days, 90 days, etc.
[0170] When a mobile terminal determines that the time interval between the most recent access time of a card and the current time is greater than a preset time threshold, it considers the card to have not been accessed for a long time. When the time interval is less than or equal to the preset time threshold, it considers the card to still be used by the user and retains the card.
[0171] Once a mobile device determines that a card has not been accessed for an extended period, it can delete the card from its QR code collection. The deletion operation includes removing all related data, such as the card's QR code and store information.
[0172] Through the above embodiments, the mobile terminal realizes the automatic card cleaning function, which can automatically delete cards that have not been accessed for a long time, free up storage space, and improve the management efficiency of the QR code collection library.
[0173] The above embodiments describe the scanning method provided by the embodiments of this application. Next, the interaction relationship between the various modules in the scanning method will be described in detail in conjunction with the various modules included in the mobile terminal.
[0174] Please refer to Figure 9A This illustrates a software structure block diagram of a mobile terminal provided in an embodiment of this application. Figure 3 Similarly, mobile terminal software systems adopt a layered architecture, dividing the software into several layers, each with a clear role and division of labor.
[0175] like Figure 9A As shown, the layered architecture, from top to bottom, consists of the application layer 910, the application framework layer 920, the hardware abstraction layer 930, and the kernel layer.
[0176] The application layer 910 may include a camera application 911 and a device assistant application 912. The camera application 911 can be used to display a preview image on the scanning interface and to capture the image for scanning. The device assistant application 912 can be used to obtain store information based on the QR code information; for example, the device assistant application 912 can be an artificial intelligence application on the mobile phone.
[0177] The application framework layer 920 may include camera service 921, QR code recognition service 922, network service 923, map service 924, and storage service 925.
[0178] Camera service 921 receives requests from the application layer to start the camera and controls camera startup and image acquisition via HAL layer 930. QR code recognition service 922 recognizes scanned images and extracts QR code information. Network service 923 handles network requests, such as querying store information or accessing the ordering interface. Map service 924 obtains the user's geographic location information. Storage service 925 manages the storage operations of the QR code collection library.
[0179] The hardware abstraction layer 930 may include a camera hardware abstraction layer (camera HAL) 931, a network hardware abstraction layer (network HAL) 932, and a storage hardware abstraction layer (storage HAL) 933.
[0180] The camera HAL 931 controls the camera in the kernel layer through the standard HAL interface and acquires image data captured by the camera. The network HAL 932 is responsible for interacting with the network communication module to send and receive network data. The storage HAL 933 is responsible for interacting with the storage device to perform data read and write operations.
[0181] The following is combined Figure 9A A detailed description of the interaction process of each module in the collection process can be included, including steps S9001-S9014.
[0182] S9001, the camera application 911 detects a QR code scanning operation and sends a request to the camera service 921 of the application framework layer 920 to start the camera.
[0183] Figure 9A Taking camera applications as an example, it's understandable that third-party applications can also send requests to activate the camera.
[0184] After receiving the request to start the camera, the camera service 921 sends a start command to the camera driver in the kernel layer through the camera HAL 931.
[0185] After receiving the startup command, the camera driver can control the camera hardware to start working, capturing a preview image and a scanned image containing a QR code, and then transmitting the captured preview and scanned images to the HAL 931 camera. The processing of the preview image can be referred to the above. Figure 3 The description in the text focuses on the processing of QR code images, and the processing of preview images will not be covered in the following content.
[0186] S9003, camera HAL 931 transmits the scanned image to camera service 921, and camera service 921 then transmits the scanned image to camera application 911.
[0187] Before transmitting the scanned image to the camera service 921, the camera HAL 931 preprocesses the scanned image, including grayscale conversion and binarization, and then transmits the processed scanned image to the camera service 921. The camera service 921 then transmits the processed scanned image to the camera application 911. Alternatively, the camera service 921 preprocesses the scanned image and then transmits the processed scanned image to the camera application 911.
[0188] S9004, the camera application 911 transmits the scanned image to the QR code recognition service 922 of the application framework layer 920.
[0189] The QR code recognition service 922 identifies the scanned image, extracts the QR code from the scanned image, and decodes the QR code to obtain the QR code information.
[0190] S9005, QR code recognition service 922 sends QR code information to device assistant application 912.
[0191] The device assistant application 912 receives the QR code information and can determine whether it is a store QR code used for ordering food. This determination can be performed locally or by sending a query request to the server via network service 923.
[0192] S9006, Device Assistant Application 912 sends the query request 1 corresponding to the QR code information to Network Service 923.
[0193] When network service 923 receives the QR code information, it can generate query request 1, which is used to query the server whether the QR code information is valid for the store QR code used for ordering food.
[0194] S9007, Network Service 923 sends Query Request 1 to Network HAL 932.
[0195] Network HAL 932 can receive the query request and send the query request 1 to server 1, which stores the store information. Based on the query request 1, server 1 can return query result 1 to network HAL 932, which indicates whether the QR code is a store QR code used for ordering food.
[0196] S9008, network HAL 932 transmits query result 1 to network service 923, and network service 923 then transmits query result 1 to device assistant application 912.
[0197] After the device assistant application 912 determines that the QR code is a store QR code used for ordering food based on the QR code information or query results, it displays a "favorite" option on the scanning interface. In response to the user's click on the "favorite" option, the device assistant application 912 begins to obtain store information. Store information can be extracted directly from the QR code information, from the ordering interface, or obtained through online queries. For details, please refer to the above embodiments; further elaboration is unnecessary here.
[0198] In one example, the device assistant application 912 can obtain the name of the saved store from the ordering interface and send it to the map service 924. The map service 924 can then retrieve the store thumbnail and address based on the store name. It is understood that existing map servers typically store images and addresses of various stores.
[0199] S9009, Device Assistant application 912 sends a query request 2 for store name to map service 924.
[0200] Network service 923 receives the store name and can generate query request 2, which is used to query the store thumbnail and store address from server 2, which stores map information.
[0201] S9010, Map Service 924 sends Query Request 2 to Network HAL 932.
[0202] Network service 923 receives query request 2 and sends it to server 2 which stores map information. Server 2 can return query result 2 to network HAL 932 based on query request 2. Query result 2 may include store address and store thumbnail.
[0203] S9011, network HAL 932 transmits query result 2 to map service 924, and map service 924 then transmits query result 2 to device assistant application 912.
[0204] In this way, the device assistant application 912 can obtain the store information of the saved store; the specific process will not be described in detail here.
[0205] S9012, the device assistant application 912 transmits store information to the storage service 925.
[0206] Furthermore, the camera application 911 sends the image information of the QR code and the scanned image to the storage service 925, and this sending process occurs within... Figure 9A Not shown in the image. Thus, storage service 925 can retrieve one collection record.
[0207] S9013, Storage Service 925 sends the QR code, the image information of the scanned image, and the store information as a collection record to Storage HAL 933.
[0208] The HAL 933 receives the collection record and stores it in the QR code collection library in the storage device.
[0209] S9014, Storage HAL 933 sends a message of successful storage to Storage Service 925, and Storage Service 925 sends a message of successful storage to Device Assistant Application 912.
[0210] The camera app 311 or third-party app 312 can jump to the ordering interface based on the QR code information. The device assistant app 912 can display a message indicating that the food has been successfully saved on the ordering interface.
[0211] In some embodiments, the electronic device may not include the device assistant application 912, but may complete the above steps directly through the camera application 911 or a third-party application. This application embodiment does not limit this.
[0212] The above steps complete the interaction between the various modules in the bookmarking process. Data is transmitted between these modules through clearly defined interfaces, enabling the bookmarking function for in-store ordering QR codes.
[0213] Please refer to Figure 9B This illustrates a software structure block diagram of another electronic device provided in an embodiment of this application. Figure 9B Software architecture and Figure 9A Similarly, it also adopts a layered architecture, from top to bottom: application layer 910, application framework layer 920, hardware abstraction layer 930, and kernel layer. Figure 9A The difference is, Figure 9B It also includes the photo album application 913 in the application layer 910. The photo album application 913 can be used to manage and display the collection records in the QR code collection library.
[0214] The following is combined Figure 9B A detailed description of the interaction process of each module in the ordering process can be provided, including steps S9101-S9107.
[0215] S9101, after the photo album application 913 detects the user's click operation on the favorite record 602, it sends a data read request to the storage service 925.
[0216] This data read request is used to request the retrieval of data corresponding to the user-clicked favorite record 602. The data read request may include the identification information of the favorite record 602, such as image identification information.
[0217] S9102, the storage service 925 sends a data read command to the storage HAL 933.
[0218] Upon receiving the data read instruction, the storage HAL 933 sends the instruction to the storage device. After receiving the instruction, the storage device locates and reads the data from the corresponding collection record 602 based on its identifier, and then sends this data back to the storage HAL 933. This collection record data may include QR codes, image information from scanned QR codes, and store information.
[0219] S9103, the storage HAL 933 transmits the data of the collection records to the storage service 925, and the storage service 925 then transmits the data to the photo album application 913.
[0220] The photo album app 913 generates and displays a favorites details interface based on the received data. This interface includes a QR code image, a store information area, and an order button. Users can view detailed information about the store in the favorites details interface or click the order button to place an order.
[0221] S9104, the photo album application 913 detects a click operation on the order button and transmits the QR code image to the QR code recognition service 922.
[0222] The QR code recognition service 922 recognizes the QR code image, obtains the QR code information, and determines the webpage address corresponding to the ordering interface.
[0223] S9105, the QR code recognition service 922 returns the parsed web address to the photo album application 913.
[0224] S9106, the photo album application 913 sends the web address to the network service 923, and the network service 923 sends the web address to the network HAL 932.
[0225] The network HAL 932 can access this web address and obtain the interface data of the ordering interface.
[0226] S9107, network HAL 932 returns the interface data of the ordering interface to network service 923, and network service 923 returns the interface data of the ordering interface to photo album application 913.
[0227] After receiving the data from the ordering interface, the photo album application 913 can display the ordering interface.
[0228] Through steps S9101 to S9107 above, the interaction between each module in the ordering process is completed. Users can directly retrieve saved QR codes from the QR code collection to order food without having to rescan the QR codes, thus improving ordering efficiency.
[0229] Please refer to Figure 9CThis illustrates a software structure block diagram of another electronic device provided in an embodiment of this application. Figure 9C Software architecture and Figure 9A as well as Figure 9B Similarly, it also adopts a layered architecture, from top to bottom: application layer 910, application framework layer 920, hardware abstraction layer 930, and kernel layer. Figure 9C It also includes a map application 914 in the application layer 910. The map application 914 is used to indicate the location of saved stores on the map and to provide users with the ability to locate themselves on the map.
[0230] The following is combined Figure 9C A detailed description of the interaction process of each module in the editing workflow may include steps S9201-S9208.
[0231] S9201, the photo album application 913 detects the user's click on the edit button, obtains the modified store name, and sends a data update request 1 to the storage service 925.
[0232] In response to a user clicking the edit button on a favorite record, the photo album application 913 can display a store name editing interface. This interface includes a text input box where the user can enter the modified store name. After detecting the user's confirmation of the modified store name, the photo album application 913 retrieves it. Then, based on this modified store name, the application generates a data update request 1, which includes the favorite record's identifier and the modified store name. Finally, the application sends this data update request 1 to the storage service 925.
[0233] S9202, the storage service 925 sends a data update instruction 1 to the storage HAL 933.
[0234] After receiving data update command 1, the storage HAL 933 sends data update command 1 to the storage device. Upon receiving data update command 1, the storage device searches for the corresponding collection record in the QR code collection library based on the identification information of the collection record, and updates the store name in the collection record with the modified store name.
[0235] S9203, the storage HAL 933 returns a message of successful update to the storage service 925, and the storage service 925 then returns the message to the photo album application 913.
[0236] After receiving a message that the photo album application 913 has successfully updated, it can display a success message in the collection details interface and refresh the store information area of the collection record to display the modified store name.
[0237] As another editing method, users can also click the location button of a favorite record in the favorite details interface to modify the store address.
[0238] S9204, the photo album application 913 detects the user's click on the location button and sends a location request to the map service 924.
[0239] Map service 924 receives the location request, which may include the store address of the saved store. Map service 924 can determine the location of the saved store on the map based on the store address.
[0240] S9205, Map service 924 sends the location of saved stores on the map to map application 914.
[0241] Map application 914 receives the locations of saved stores on the map and displays them. Users can drag the map to select new store addresses. Understandably, during this dragging process, map service 924 and map application 914 continuously exchange data to ensure the selected location is displayed on the map.
[0242] S9206, After the map application 914 detects the user's confirmation of the new store address, it can send a data update request 2 to the storage service 925.
[0243] After detecting the user's confirmation of the modified store address, map application 914 obtains the new store address. Then, based on this new store location, map application 914 can generate a data update request 2, which may include the identifier information of the saved record and the new store address. Finally, map application 914 can send data update request 2 to storage service 925.
[0244] S9207, the storage service 925 sends a data update command 2 to the storage HAL 933.
[0245] After receiving data update command 2, the storage HAL 933 sends data update command 2 to the storage device. Upon receiving data update command 2, the storage device searches for the corresponding collection record in the QR code collection library based on the identification information of the collection record, and updates the store address in the collection record to the new store address.
[0246] S9208, the storage HAL 933 returns a message of successful update to the storage service 925, and the storage service 925 then transmits the message to the photo album application 913.
[0247] Storage HAL 933 sends a message to storage service 925 indicating a successful update. Storage service 925 then transmits this message to photo album application 913. Upon receiving the successful update message, photo album application 913 can display a success message in the collection details interface and refresh store information area 604 to display the modified store address.
[0248] Through steps S9201 to S9208 described above, the interaction between the various modules in the editing process is completed. Users can edit the store name and address in the collection details interface, and the electronic device can update and store the modified information in the QR code collection library.
[0249] In some embodiments of this application, the electronic device can also provide location-based intelligent push functionality. The following describes... Figure 9D This document provides a detailed introduction to the interaction process of each module in the intelligent push notification workflow.
[0250] Please refer to Figure 9D This illustrates a software structure block diagram of another electronic device provided in an embodiment of this application. Figure 9D Software architecture and Figure 9A , Figure 9B as well as Figure 9C Similarly, it also adopts a layered architecture, from top to bottom: application layer 910, application framework layer 920, hardware abstraction layer 930, and kernel layer. Figure 9D It also includes a photo album service 926 in the application framework layer 920 and a location HAL 934 in the hardware abstraction layer 930. The photo album service 926 is used to provide photo album-related functions, such as displaying store details. The location HAL 934 is used to interact with hardware devices that implement location functions in electronic devices (such as GPS chips, Beidou chips, etc.).
[0251] In the intelligent push process, electronic devices need to periodically obtain the user's geographical location and determine whether the user is near a store that has been saved. This process may include steps S9301-S9308.
[0252] S9301, Device Assistant Application 912 sends a location request to Map Service 924 according to a preset cycle.
[0253] In this embodiment, the electronic device can run a device assistant application 912 in the background. The device assistant application 912 can send location requests to the map service 924 at preset time intervals to obtain the user's current geographical location. The preset time interval can be 1 minute, 5 minutes, etc., and this embodiment does not limit it.
[0254] S9302, Map Service 924 sends a positioning command to Positioning HAL 934.
[0255] After receiving a location request, the map service 924 converts the request into a location command and sends the command to the positioning HAL 934. The location command instructs the positioning HAL 934 to activate the location function and obtain the user's geographic coordinates.
[0256] S9303, the location HAL 934 returns the obtained user's geographic location coordinates to the map service 924, and the map service 924 returns the geographic location coordinates to the device assistant application 912.
[0257] After receiving the positioning command, the HAL 934 calls the kernel-level positioning driver to start the positioning hardware device. This hardware device can be a GPS module, a BeiDou module, etc. The positioning hardware device obtains the user's geographic coordinates and transmits them to the HAL 934. The HAL 934 then returns the geographic coordinates to the map service 924.
[0258] After receiving the geographic coordinates, the map service 924 transmits them to the device assistant application 912. Upon receiving these coordinates, the device assistant application 912 can determine the user's current geographic location.
[0259] S9304, Device Assistant application 912 sends a query request to storage service 925.
[0260] After obtaining the user's current location, the device assistant application 912 needs to query the saved records in the QR code favorites library to determine if the user is near any of the saved stores. The device assistant application 912 sends a query request to the storage service 925, which requests the store address information for all saved records in the QR code favorites library.
[0261] S9305, the storage service 925 sends a data query command to the storage HAL 933.
[0262] After receiving a query request, the storage service 925 converts the query request into a data query instruction and sends the data query instruction to the storage HAL 933. The data query instruction instructs the storage HAL 933 to read the store address information of all favorite records in the QR code favorites library from the storage device.
[0263] S9306, storage HAL 933 returns the store address information to storage service 925, and storage service 925 returns the store address information to device assistant application 912.
[0264] After receiving a data query command, storage HAL 933 sends the command to the storage device. Based on the query command, the storage device reads the store address information of all saved records from the QR code collection library. The storage device then transmits the retrieved store address information back to storage HAL 933, which in turn returns the store address information to storage service 925.
[0265] After receiving the store address information, the storage service 925 transmits it to the device assistant application 912. Upon receiving the store address information, the device assistant application 912 can retrieve the store addresses of all stores saved in the QR code collection library.
[0266] Device Assistant App 912 calculates the distance between the user's current geographic coordinates and the geographic coordinates of each store. Device Assistant App 912 can use the Euclidean distance calculation method to calculate the straight-line distance between two geographic coordinates.
[0267] The device assistant application 912 compares the calculated distance with a preset distance threshold. If the distance to a store is less than the distance threshold, the device assistant application 912 determines that the user is close to that store. The distance threshold can be 50 meters, 100 meters, 200 meters, etc., and this embodiment does not limit it.
[0268] In some embodiments, if the user's current geographic location is less than the distance threshold between multiple stores, the device assistant application 912 can determine that the user is near multiple saved stores. The device assistant application 912 can record information about all stores whose distance is less than the distance threshold.
[0269] The device assistant application 912 generates store push notifications based on store information within a distance threshold. These notifications can be floating windows containing a store thumbnail, store name, distance information, and ordering guidance.
[0270] After the device assistant application 912 generates a store push notification, it is displayed on the display screen 294. The store push notification can be displayed at the top or bottom of the current display interface of the electronic device, presented as a floating window.
[0271] S9307, Device Assistant application 912 detects the user's click operation on the store push notification and sends a display request to the photo album service 926.
[0272] After seeing a store's push notification, users can click on it to view detailed information about the store or place an order. The device assistant app 912 detects this click and determines the selected store.
[0273] After detecting a user's click on a store push notification, Device Assistant application 912 determines the identifier information of the favorite record corresponding to the selected store. Device Assistant application 912 then sends a display request to Photo service 926, which includes the identifier information of that favorite record.
[0274] S9308, the photo service 926 sends a display request to the photo application 913.
[0275] After receiving a display request, the photo album app 913 retrieves the data of the saved record from its QR code collection based on the record's identifier. Using this data, the app generates and displays a save details interface. This interface includes a QR code image, a store information area, and an order button. Users can then click the order button to place an order.
[0276] Through steps S9301 to S9308 above, the interaction between various modules in the intelligent push process is completed. The electronic device can proactively push information about nearby stores that the user has saved, guiding the user to place an order and improving the user's ordering efficiency based on the user's geographical location.
[0277] In practical applications of this application, some abnormal situations may be encountered. For example, the scanned QR code may be a table number QR code for a store, rather than a general ordering QR code; or the scanned QR code may be a temporarily valid QR code that cannot be reused later. To address these abnormal situations, embodiments of this application provide corresponding processing methods.
[0278] Let me first explain the situation where the QR code is the table number QR code for the store.
[0279] In some dining scenarios, the QR codes provided by the restaurant may be associated with specific table or seat numbers. For example, after a user scans the QR code on a table, the QR code will automatically redirect to the ordering interface corresponding to that table. This type of QR code usually contains table number information, and the user needs to place their order based on their specific seat each time.
[0280] When an electronic device recognizes a scanned QR code associated with a store table number, it can process and save the QR code information. Specifically, the electronic device can extract other information from the QR code besides the table number, including the store name, store address, and ordering link. The electronic device then saves the extracted, generic QR code information that does not include the table number.
[0281] For example, the QR code for table number 8 in a hot pot restaurant includes both the restaurant's logo and the table number 8 logo. After recognizing the QR code, an electronic device can extract the portion excluding the table number 8 logo and save it as the restaurant's QR code information. However, the electronic device does not save the table number itself.
[0282] When a user retrieves the store's saved order history via the QR code library to order food again, the electronic device can skip scanning the QR code and instead redirect to the store's ordering interface based on the saved QR code information. This ordering interface can be the store's general ordering interface and is not bound to a specific table number.
[0283] By using the above processing method, electronic devices can retain the store's general ordering information for quick retrieval next time when saving the QR code of the associated table number, while avoiding errors caused by saving fixed table numbers when users order food at different seats.
[0284] Let me first explain the situation where the QR code is a temporary QR code.
[0285] In some application scenarios, the QR codes provided by stores may be temporarily valid. Temporary QR codes are those that are valid for a certain period of time and will expire after that period.
[0286] Once an electronic device recognizes a QR code, it can determine whether the QR code is temporary in several ways. In some embodiments, the electronic device can determine this based on specific fields in the QR code information. Some temporary QR codes include an expiration date field or a one-time use identifier field when they are generated. After parsing the QR code information, the electronic device can check whether the QR code information contains these specific fields. If the QR code information contains an expiration date field, the electronic device can determine whether the current time is within the expiration period; if the current time has exceeded the expiration date, the QR code is determined to be invalid. If the QR code information contains a one-time use identifier field, the QR code is determined to be a one-time use QR code.
[0287] Once the electronic device determines that the scanned QR code is temporary, it will not perform a save operation. Specifically, the electronic device will not display a save option on the scanning interface, or even if it does display the save option, the electronic device will not save the QR code to its QR code save library when the user clicks on the save option. Furthermore, the electronic device may display a prompt message on the scanning or ordering interface to inform the user that the QR code is temporary.
[0288] By using the above processing method, electronic devices can identify and avoid saving temporary QR codes, preventing users from encountering problems due to QR code expiration when calling them later.
[0289] Based on the above embodiments, this application also provides a barcode scanning device, which includes a processor for executing the barcode scanning method provided in the above embodiments.
[0290] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the barcode scanning method provided in the above embodiments.
[0291] This application also provides a computer program product containing instructions that, when run on a computer, enable the computer to execute the barcode scanning method provided in the above embodiments.
[0292] The specific implementation methods and technical effects of the electronic devices, barcode scanners, computer-readable storage media, and computer program products containing instructions provided in this application can be found in the specific implementation process and technical effects of the barcode scanning methods provided in the foregoing embodiments, which will not be repeated here.
[0293] In some embodiments, as described above, those skilled in the art will clearly understand that, for the sake of convenience and brevity, the division of the functional modules described above is merely an example. In practical applications, the functions described above 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. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0294] In the embodiments of this application, the functional units 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.
[0295] 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 computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or 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 computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, 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 flash memory, portable hard disk, read-only memory, random access memory, magnetic disk, or optical disk.
[0296] The above description is merely a specific implementation of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of this application should be covered within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application should be determined by the protection scope of the claims.
Claims
1. A scanning method, characterized in that, Applied to a mobile terminal, the method includes: In response to the scanning operation, scan and recognize the first QR code; The system identifies the first QR code as a store ordering QR code and obtains the store information of the first store corresponding to the first QR code. The first card, which is associated with the first QR code and the store information of the first store, is stored in the QR code collection library of the mobile terminal; the QR code collection library is an album in the album application of the mobile terminal, and at least one card is stored in the QR code collection library. In response to a trigger operation on a second card in the QR code collection library, the second QR code in the second card is identified, and the ordering interface of the second store is displayed; wherein, the second card includes the second QR code and the store information of the second store.
2. The method according to claim 1, characterized in that, The second card also includes a scanning control, and the triggering operation for the second card is a click operation on the scanning control.
3. The method according to claim 1 or 2, characterized in that, The step of storing the first card associated with the first QR code and the first store information into the QR code collection library of the mobile terminal includes: Display a first collection control, which is used to collect the first QR code in the QR code collection library; In response to a click on the first collection control, the first card associated with the first QR code and the first store information is stored in the QR code collection library of the mobile terminal.
4. The method according to claim 3, characterized in that, The control for displaying the first collection includes: The ordering interface of the first store is displayed, and the ordering interface of the first store includes the first favorites control; wherein, the ordering interface of the first store also includes a second favorites control, the second favorites control being used to favorite the first store in the ordering platform or ordering program; or, The collection prompt interface is displayed, and the collection prompt interface includes the first collection control.
5. The method according to any one of claims 1-4, characterized in that, The step of identifying the first QR code as a store's ordering QR code and obtaining the store information of the first store corresponding to the first QR code includes: If the first QR code is identified as a store's ordering QR code and the QR code collection library does not store the card corresponding to the first QR code, the scanning frequency of the first store corresponding to the first QR code is obtained; the QR code scanning frequency is the number of times the ordering QR code of the first store is scanned within a preset time period. If the QR code scanning frequency is greater than a preset frequency threshold, obtain the store information of the first store corresponding to the first QR code.
6. The method according to any one of claims 1-5, characterized in that, The step of obtaining the store information of the first store corresponding to the first QR code includes: Based on the recognition result of the first QR code, obtain the store name of the first store; The store address and thumbnail of the first store are obtained from the map database using the store name. The store information of the first store includes the store name, store address, and store thumbnail.
7. The method according to claim 6, characterized in that, The step of storing the first card, which is associated with the first QR code and the store information of the first store, into the QR code collection library of the mobile terminal includes: A first card containing multiple data fields is generated, including a QR code field, a store name field, a store address field, and a thumbnail field; wherein, the QR code field stores the first QR code, the store name field stores the store name of the first store, the store address field stores the store address of the first store, and the thumbnail field is used to store a thumbnail of the first store. The first card is stored in the QR code collection library of the mobile terminal.
8. The method according to any one of claims 6-7, characterized in that, The step of responding to a trigger operation on a second card in the QR code collection library, identifying the second QR code in the second card, and displaying the ordering interface of the second store includes: In response to a trigger operation on the second card in the QR code collection library, a details interface corresponding to the second card is displayed. The details interface includes the second QR code, the store information of the second store, and a scanning control for the second QR code. In response to a click on the scanning control, the second QR code is recognized, and the ordering interface of the second store is displayed.
9. The method according to claim 8, characterized in that, The details interface also includes a button for modifying certain store information, including store name and store address; the method further includes: In response to a click on the edit button, the edit interface corresponding to the store information is displayed; The modified store information is obtained from the modification interface, and the second card in the QR code collection library is updated based on the modified store information.
10. The method according to any one of claims 1-9, characterized in that, The method further includes: The current geographical location of the mobile terminal is obtained according to a preset period; Calculate the distance between the current geographical location and the address of the third store; the third store refers to the store corresponding to one or more cards in the QR code collection library; If the distance is less than the distance threshold, a push notification for the third store will be displayed.
11. The method according to any one of claims 1-11, characterized in that, The step of identifying the first QR code as a store's ordering QR code includes: The URL corresponding to the first QR code was identified; If the URL contains the preset platform domain name, the first QR code is determined to be the store's ordering QR code.
12. The method according to any one of claims 1-11, characterized in that, The mobile terminal includes a QR code scanning application and a terminal assistant application; The scanning application is used to scan and recognize the first QR code to obtain the QR code information of the second QR code; The terminal assistant application is used to obtain the store information of the first store corresponding to the first QR code based on the QR code information of the second QR code, and to store the first card associated with the first QR code and the store information of the first store in the QR code collection library of the mobile terminal.
13. A mobile terminal, characterized in that, include: The system comprises a display screen, a memory, and a processor, wherein the display screen, the memory, and the processor are all coupled together. The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the mobile terminal to perform the scanning method as described in any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the scanning method as described in any one of claims 1 to 12.
15. A computer program product, characterized in that, It includes a computer program, which, when executed by a processor, implements the barcode scanning method as described in any one of claims 1 to 12.