Pattern code recognition method and device

CN116029316BActive Publication Date: 2026-10-27VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211651716.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2026-10-27
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

[0004]本申请实施例的目的是提供一种图形码识别方法、装置、电子设备及介质,能够解决导致使用电子设备识别图形码的便捷性较差的问题

Benefits of technology

[0011]在本申请实施例中,电子设备在与其他电子设备进行视频通话的情况下,接收用户的第一输入,并响应于第一输入,获取电子设备的负载信息,从而采用与负载信息对应的目标模式对图形码进行识别,其中,第一输入用于触发电子设备进行扫码识别。由于电子设备正处于视频通话的过程中,因此至少一个摄像头被占用,若需要识别图形码,则可以根据电子设备的负载信息对应的模式对图形码进行识别,具体模式指的是单摄模式或双摄模式。这样电子设备并不需要中断视频通话,也可以对图形码进行识别,如此,简化了用户的操作步骤,从而提升电子设备识别图形码的便捷性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116029316B_ABST
    Figure CN116029316B_ABST
Patent Text Reader

Abstract

The application discloses a kind of graphic code identification method and device, belong to electronic technical field.The graphic code identification method includes: in the case where electronic device and other electronic device carry out video call, receive the first input of user, first input is used to trigger electronic device to carry out code scanning identification;In response to first input, the load information of electronic device is acquired;Target mode corresponding to load information is used to identify graphic code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic technology, specifically relating to a graphic code recognition method and apparatus. Background Technology

[0002] Typically, during a video call using an electronic device, if the device needs to recognize a graphic code, the video call will be interrupted first, and the user will then turn on the camera to recognize the graphic code. After recognition is complete, the other electronic device corresponding to the video call will be reconnected to continue the video call.

[0003] However, since multiple people may be involved in a video call simultaneously, interrupting the call to recognize the graphic code could result in missing important information, leading to a poor user experience when using electronic devices to recognize graphic codes. Therefore, the convenience of using electronic devices to recognize graphic codes is relatively low. Summary of the Invention

[0004] The purpose of this application is to provide a graphic code recognition method, device, electronic device, and medium that can solve the problem of poor convenience in recognizing graphic codes using electronic devices.

[0005] In a first aspect, embodiments of this application provide a graphic code recognition method, the method comprising: receiving a first input from a user when an electronic device is making a video call with another electronic device, the first input being used to trigger the electronic device to scan and recognize the code; in response to the first input, acquiring load information of the electronic device; and recognizing the graphic code using a target pattern corresponding to the load information.

[0006] Secondly, embodiments of this application provide a graphic code recognition device, which includes: a receiving module, an acquiring module, and a recognition module, wherein: the receiving module is used to receive a first input from a user when the electronic device is making a video call with another electronic device, the first input being used to trigger the electronic device to perform code scanning and recognition; the acquiring module is used to acquire the load information of the electronic device in response to the first input received by the receiving module; and the recognition module is used to recognize the graphic code using a target pattern corresponding to the load information acquired by the acquiring module.

[0007] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions implementing the steps of the method as described in the first aspect when executed by the processor.

[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, and when the program or instructions are executed by a processor, they implement the steps of the method as described in the first aspect.

[0009] Fifthly, embodiments of this application provide a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method as described in the first aspect.

[0010] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method as described in the first aspect.

[0011] In this embodiment, when an electronic device is engaged in a video call with another electronic device, it receives a first input from the user and, in response to the first input, obtains the load information of the electronic device. Then, it uses a target mode corresponding to the load information to recognize the graphic code. The first input triggers the electronic device to scan and recognize the code. Since the electronic device is in the midst of a video call, at least one camera is occupied. If graphic code recognition is required, it can be performed according to the mode corresponding to the load information of the electronic device, specifically a single-camera mode or a dual-camera mode. This allows the electronic device to recognize the graphic code without interrupting the video call, thus simplifying the user's operation and improving the convenience of graphic code recognition. Attached Figure Description

[0012] Figure 1 This is one of the flowcharts illustrating a graphic code recognition method provided in an embodiment of this application;

[0013] Figure 2 This is a schematic diagram of the structure of the graphic code recognition device provided in the embodiments of this application;

[0014] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0015] Figure 4 This is a hardware schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0016] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0017] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0018] The graphic code recognition method, device, electronic device, and medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.

[0019] The graphic code recognition method provided in this application is applied to scenarios where electronic devices are making video calls. The specific application scenarios can be determined according to usage requirements, and this application does not limit them.

[0020] Typically, during a video call using an electronic device, if the device needs to recognize a graphic barcode, the video call is interrupted first. Then, the user re-enables the camera to recognize the barcode. After recognition, the device reconnects to the other electronic device to continue the video call. However, since multiple people may be in a video call simultaneously, interrupting the call to recognize the barcode could lead to missing important information, resulting in a poor user experience. Therefore, using electronic devices to recognize graphic barcodes is not very convenient.

[0021] In this embodiment, when an electronic device is engaged in a video call with another electronic device, it receives a first input from the user and, in response to the first input, obtains the load information of the electronic device. Then, it scans and recognizes a graphic code using a target mode corresponding to the load information. The first input triggers the electronic device to scan and recognize the graphic code. Since the electronic device is in the midst of a video call, at least one camera is occupied. If graphic code recognition is required, it can be performed according to the mode corresponding to the load information of the electronic device, specifically a single-camera mode or a dual-camera mode. This way, the electronic device can recognize the graphic code without interrupting the video call, thus simplifying the user's operation and improving the convenience of graphic code recognition.

[0022] This application provides a graphic code recognition method, such as... Figure 1As shown, the graphic code recognition method may include the following steps 201 to 203:

[0023] Step 201: When an electronic device is making a video call with another electronic device, the electronic device receives the user's first input.

[0024] In this embodiment of the application, the first input is used to trigger the electronic device to perform barcode scanning and recognition.

[0025] Optionally, in this embodiment of the application, when the electronic device displays the application interface of the target application, the electronic device can display the chat interface corresponding to the first identifier based on the user's click input in the application interface. The user can then click the video call control in the chat interface to enable the electronic device to make a video call with the electronic device of the contact corresponding to the first identifier (i.e., other electronic devices), and thus the user can make the first input.

[0026] For example, the target application mentioned above may include any of the following: instant messaging applications, short video interactive applications, entertainment applications, etc.

[0027] For example, the first identifier mentioned above can be any of the following: the identifier of a contact or the identifier of a group.

[0028] In the case where the first identifier is the identifier of a contact, the electronic device can display the chat interface of that contact based on the user's click input of the contact's identifier. The user can then click on the video call control in the chat interface to enable the electronic device to conduct a video call with that contact's electronic device.

[0029] When the first identifier is a group identifier, the electronic device can display the chat interface of the group based on the user's click input of the group identifier. The user can then click the video call control in the chat interface to enable the electronic device to conduct a video call with the electronic device of at least one contact in the group.

[0030] For example, the first input described above may include one input or multiple sub-inputs.

[0031] Specifically, one of the above inputs can be: the user's click input on the scanning control in the chat interface corresponding to the first identifier.

[0032] Specifically, the aforementioned sub-inputs can be: the user first returns to the target application's interface, and then clicks on the scanning control in the application interface to input data.

[0033] For example, the first input mentioned above can be any of the following: single-click input, double-click input, swipe input, drag input, press input, voice input, gesture input, etc.

[0034] For example, the above-mentioned "scanning and recognition" can be understood as scanning and recognizing graphic codes. These graphic codes can be any of the following: QR codes, one-dimensional barcodes, etc.

[0035] Step 202: The electronic device responds to the first input and obtains the load information of the electronic device.

[0036] Optionally, in the embodiments of this application, the above-mentioned load information may include at least one of the following: the utilization rate of the central processing unit (CPU), the utilization rate of memory, etc.

[0037] Specifically, a lower CPU utilization rate indicates stronger CPU processing power under current usage; conversely, a higher CPU utilization rate indicates weaker CPU processing power under current usage. Similarly, a lower memory utilization rate indicates more available memory; conversely, a higher memory utilization rate indicates less available memory.

[0038] It should be noted that during a video call between electronic devices, the current CPU or memory usage of the electronic device can be obtained based on the first input used by the user to trigger the scanning and recognition of the electronic device.

[0039] For example, after receiving the first input from the user to trigger the electronic device to scan and recognize the graphic code, the electronic device can use the Top command to view the running processes and system load information. The load information may specifically include CPU load, memory usage, system resources occupied by each process, etc. The Top command can update this load information at a certain frequency.

[0040] Step 203: The electronic device uses the target mode corresponding to the load information to recognize the graphic code.

[0041] Optionally, in this embodiment of the application, the target mode can be any of the following: dual-camera mode, single-camera mode, etc.

[0042] The dual-camera mode indicates that both cameras are activated, with one camera capturing video and the other scanning and recognizing the graphic code. The single-camera mode indicates that only one camera is activated.

[0043] A mode that uses a camera to scan and recognize graphic codes.

[0044] Understandably, working with two cameras will inevitably place a greater demand on the system. Therefore, when the load is relatively small, the target mode corresponds to dual-camera mode, while when the load is relatively large, the target mode corresponds to single-camera mode.

[0045] For example, the aforementioned graphic code can specifically be a QR code or a one-dimensional barcode, etc.

[0046] It should be noted that during video calls between electronic devices and other electronic devices, the graphic code can be scanned and recognized using either dual-camera or single-camera mode.

[0047] For example, taking the dual-camera mode as the target mode, while an electronic device is making a video call with another electronic device using one camera, it also uses the other camera to recognize a graphic code. This causes the electronic device to adjust the video call preview to its minimum size and display it floating above the graphic code recognition preview. Thus, the user can see the video call preview while recognizing the graphic code. After the electronic device completes the graphic code recognition, it closes the graphic code preview and restores the video call preview from its minimum size to its original size.

[0048] It should be noted that when an electronic device is making a video call with another electronic device, if it receives the first input from the user to trigger the electronic device to scan a code, the electronic device will obtain its load information and, without interrupting the video call, recognize the graphic code according to the pattern corresponding to the load information.

[0049] In this embodiment, since the electronic device is in the midst of a video call, at least one camera is occupied. If image code recognition is required, it can be performed according to the mode corresponding to the electronic device's load information. Specifically, a dual-camera mode is used when the current load is low, and a single-camera mode is used when the current load is high. This way, the electronic device can recognize the image code without interrupting the video call, thus simplifying the user's operation and improving the convenience of image code recognition.

[0050] Optionally, in this embodiment, the target mode includes a dual-camera mode. Step 203 may include step 203a:

[0051] Step 203a: When the load information is less than a preset threshold, the electronic device sends the video image captured by the first camera of the electronic device to other electronic devices, and identifies the graphic code through the second camera of the electronic device.

[0052] The first camera is the front-facing camera of the electronic device, and the second camera is the rear-facing camera of the electronic device.

[0053] For example, the aforementioned preset threshold can be pre-stored by the electronic device or set by the user according to their needs. Specifically, the aforementioned preset threshold can be any of the following: 70%, 50%, 40%, etc., which can be set according to the user's needs.

[0054] It should be noted that during a video call between two electronic devices, if the load information is less than a preset threshold, the electronic device sends the video footage captured by its front-facing camera to the other electronic device and scans the graphic code using its rear-facing camera. The video footage referred to here is the video footage corresponding to the aforementioned video call.

[0055] For example, if the load information of the electronic device is less than a preset threshold, it can be assumed that the CPU and memory of the electronic device still have enough usable space, and two cameras can be turned on at the same time without causing the electronic device to lag or overheat. Therefore, the electronic device will use the dual-camera mode to recognize the graphic code.

[0056] Thus, when the load information of the electronic device is less than the preset threshold, the first camera captures the video image and the second camera recognizes the graphic code. Therefore, it can avoid the situation where important information is missed due to the interruption of video call, which would result in a poor user experience when using the electronic device to recognize the graphic code.

[0057] Optionally, in this embodiment of the application, before "sending the video image captured by the first camera of the electronic device to other electronic devices and recognizing the graphic code through the second camera of the electronic device" in step 203a above, the graphic code recognition method provided in this embodiment of the application may further include the following steps 301 or 401:

[0058] Step 301: When the load information is less than a preset threshold, and when the electronic device is making a video call with other electronic devices through the first camera, the electronic device turns on the second camera so that the first camera and the second camera are turned on simultaneously.

[0059] Specifically, the first camera is a front-facing camera, and the second camera is a rear-facing camera.

[0060] For example, when the aforementioned electronic device makes a video call with other electronic devices via its front-facing camera, it can be understood that the electronic device turns on its front-facing camera to capture images and then sends those images to the other electronic devices. The images captured by the front-facing camera can be facial images of the user of the electronic device.

[0061] It should be noted that if the load information is less than the preset threshold, and the electronic device is making a video call with other electronic devices through the front camera, the electronic device can directly turn on the rear camera to recognize the graphic code, so that the front camera and the rear camera can be turned on at the same time.

[0062] Step 401: When the load information is less than a preset threshold, and when the electronic device is making a video call with other electronic devices through the second camera, switch the camera used for the video call with other electronic devices to the first camera, and keep the second camera on, so that the first camera and the second camera are turned on at the same time.

[0063] Specifically, the first camera is a front-facing camera, and the second camera is a rear-facing camera.

[0064] It should be noted that if the load information is less than the preset threshold, and the electronic device is making a video call with other electronic devices through the rear camera, the electronic device can switch the rear camera to the front camera and keep the rear camera on, so that the front camera and the rear camera are turned on at the same time.

[0065] Therefore, since electronic devices will recognize the graphic code through a second camera regardless of which camera is used for the current video call, using a fixed camera allows users to accurately align the device with the graphic code during the scanning process, thus improving the convenience of scanning graphic codes with electronic devices.

[0066] Optionally, in this embodiment, the target mode includes a single-camera mode. Step 203 may further include step 203b or step 203c:

[0067] Step 203b: When the load information is greater than or equal to a preset threshold, if the electronic device makes a video call with other electronic devices through the first camera, it sends the target video image to the other electronic devices and scans and identifies the graphic code through the second camera of the electronic device.

[0068] In this embodiment of the application, the target video frame is a frame of video during a video call between an electronic device and another electronic device; the first camera is a front-facing camera, and the second camera is a rear-facing camera.

[0069] For example, the target video frame can be a preset frame video frame stored in the electronic device, or it can be the last frame video frame captured by the first camera.

[0070] It should be noted that the electronic device can continuously send the video frame to other electronic devices so that the target video image is continuously displayed on the other electronic devices.

[0071] It should be noted that when the load information is greater than or equal to a preset threshold, a frame of video from the video call is sent to other electronic devices, and the first camera stops working, so that the graphic code can only be scanned and recognized by the second camera.

[0072] Understandably, if the load information of an electronic device is greater than or equal to a preset threshold, it can be assumed that the CPU and memory of the electronic device are insufficient. Only one camera can be turned on to prevent the electronic device from lagging and overheating. Therefore, the electronic device will use a single-camera mode to scan and recognize the graphic code.

[0073] Step 203c: When the load information is greater than or equal to a preset threshold, if the electronic device makes a video call with other electronic devices through the second camera, it sends the first video image to the other electronic devices and scans and identifies the graphic code through the second camera of the electronic device.

[0074] In this embodiment of the application, the first video frame is a frame of video captured by the second camera during a video call between the electronic device and other electronic devices; the first camera is a front-facing camera and the second camera is a rear-facing camera.

[0075] For example, the first video frame can be a preset frame video frame stored in the electronic device, or it can be the last frame video frame captured by the second camera.

[0076] It should be noted that when the load information is greater than or equal to a preset threshold, any frame of video from the video call is sent to other electronic devices, so that the graphic code is scanned and recognized only by the second camera.

[0077] Thus, it can be seen that when the load information of the electronic device is greater than or equal to the preset threshold, the single-camera mode is used to scan and recognize the graphic code, that is, only one camera can be turned on. This can ensure that the electronic device will not lag or overheat, and will not interrupt the video call.

[0078] Optionally, in this embodiment, the target mode includes a single-camera mode. Step 203 above may include step 203d:

[0079] Step 203d: When the load information is greater than or equal to a preset threshold, the electronic device switches the communication mode between the electronic device and other electronic devices to voice communication mode, and scans and recognizes the graphic code through the second camera of the electronic device.

[0080] Understandably, since we've switched to voice call mode, there's no longer a need for the camera to capture images and send them to the other party.

[0081] It should be noted that when the load information is greater than or equal to a preset threshold, the electronic device can switch the video call to an audio call, thereby scanning and recognizing the graphic code through the second camera.

[0082] For example, during a video call between an electronic device and another electronic device, if the load information is greater than or equal to a preset threshold, and if the device receives the first input from the user to trigger the electronic device to scan and recognize the graphic code, the electronic device will switch the current video call mode to the voice call mode and display the corresponding avatar of the other electronic device on the preview interface of the voice call mode.

[0083] Understandably, if the load information of an electronic device is greater than or equal to a preset threshold, it can be assumed that the CPU and memory of the electronic device are insufficient and can only run one camera to prevent the electronic device from lagging and overheating. Therefore, the electronic device will use a single-camera mode to scan and recognize the graphic code.

[0084] Thus, it can be seen that when the load information of the electronic device is greater than or equal to the preset threshold, the single-camera mode is used to scan and recognize the graphic code. This ensures that the call between the two parties is not interrupted and the graphic code can be scanned and recognized without causing the electronic device to lag or overheat.

[0085] Optionally, in this embodiment of the application, after step 203d above, the graphic code recognition method provided in this embodiment of the application may further include the following step 203e:

[0086] Step 203e: After the electronic device completes the recognition of the graphic code, the electronic device switches the communication mode between the electronic device and other electronic devices to video call mode.

[0087] For example, after receiving input from the user to exit the QR code scanning interface, the electronic device switches the voice call mode to the video call mode and displays a full-screen preview interface of the video call.

[0088] Therefore, it can be seen that after an electronic device completes the scanning and recognition of the graphic code, it can switch from voice call mode to video call mode, and after completing the scanning and recognition of the graphic code, it can switch back to video call mode without affecting the quality of the video call.

[0089] The graphic code recognition method provided in this application can be executed by a graphic code recognition device. This application uses a graphic code recognition device executing the graphic code recognition method as an example to illustrate the graphic code recognition device provided in this application.

[0090] This application provides a graphic code recognition device, such as... Figure 2 As shown, the graphic code recognition device 400 includes: a receiving module 401, an acquisition module 402, and a recognition module 403, wherein: the receiving module is used to receive a first input from a user when the electronic device is making a video call with another electronic device, the first input being used to trigger the electronic device to perform code scanning and recognition; the acquisition module is used to acquire the load information of the electronic device in response to the first input received by the receiving module; and the recognition module is used to recognize the graphic code using a target pattern corresponding to the load information acquired by the acquisition module.

[0091] Optionally, in this embodiment of the application, the above-mentioned processing module is used to send the video image captured by the first camera of the electronic device to other electronic devices when the load information is less than a preset threshold, and to identify the graphic code through the second camera of the electronic device; wherein, the first camera is the front camera of the electronic device, and the second camera is the rear camera of the electronic device.

[0092] Optionally, in this embodiment of the application, the above-mentioned processing module is further configured to, before sending the video image captured by the first camera of the electronic device to other electronic devices and recognizing the graphic code through the second camera of the electronic device, turn on the second camera when the electronic device is making a video call with other electronic devices through the first camera, so that the first camera and the second camera are turned on simultaneously; or, when the electronic device is making a video call with other electronic devices through the second camera, switch the camera used for video calls with other electronic devices to the first camera, and keep the second camera on, so that the first camera and the second camera are turned on simultaneously.

[0093] Optionally, in this embodiment, the target mode includes a single-camera mode; the processing module is specifically used to send a target video frame to other electronic devices when the load information is greater than or equal to a preset threshold, if the electronic device is making a video call with other electronic devices through the first camera, and to scan and recognize the graphic code through the second camera of the electronic device; wherein, the target video frame is: a frame of video during the video call between the electronic device and other electronic devices; the first camera is a front camera, and the second camera is a rear camera.

[0094] Optionally, in this embodiment of the application, the target mode includes a single-camera mode; the processing module is specifically used to switch the communication mode between the electronic device and other electronic devices to a voice communication mode when the load information is greater than or equal to a preset threshold, and to scan and recognize the graphic code through the second camera of the electronic device.

[0095] Optionally, in this embodiment of the application, the above-mentioned processing module is further configured to switch the call mode between the electronic device and other electronic devices to video call mode after the second camera of the electronic device scans and recognizes the graphic code, and after the electronic device has completed the recognition of the graphic code.

[0096] In the graphic code recognition device provided in this application embodiment, when conducting a video call with other graphic code recognition devices, the device receives a first input from a user and, in response to the first input, obtains the load information of the graphic code recognition device. It then uses a target mode corresponding to the load information to recognize the graphic code. The first input triggers the graphic code recognition device to perform scanning. Since the graphic code recognition device recognizes the graphic code according to the mode corresponding to its load information if it needs to recognize the graphic code during a video call, it can do so without interrupting the video call. This simplifies the user's operation and improves the convenience of graphic code recognition.

[0097] The graphic code recognition device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0098] The graphic code recognition device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0099] The graphic code recognition device provided in this application embodiment can achieve... Figure 1The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0100] Optionally, such as Figure 3 As shown, this application embodiment also provides an electronic device 600, including a processor 601 and a memory 602. The memory 602 stores a program or instructions that can run on the processor 601. When the program or instructions are executed by the processor 601, they implement the various steps of the above-described graphic code recognition method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0101] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0102] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0103] The electronic device 100 includes, but is not limited to, components such as: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, and processor 110.

[0104] Those skilled in the art will understand that the electronic device 100 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0105] The user input unit 107 is used to receive a first input from the user when the electronic device is making a video call with another electronic device. The first input is used to trigger the electronic device to scan and identify the code. The processor 110 is used to respond to the first input, obtain the load information of the electronic device, and identify the graphic code using a target mode corresponding to the load information.

[0106] Optionally, in this embodiment, the target mode includes a dual-camera mode. Specifically, the processor 110 is used to send video footage captured by the first camera of an electronic device to other electronic devices when the load information is less than a preset threshold, and to recognize the graphic code using the second camera of the electronic device; wherein the first camera is the front-facing camera of the electronic device, and the second camera is the rear-facing camera of the electronic device.

[0107] Optionally, in this embodiment of the application, when the electronic device is making a video call with other electronic devices through the first camera, the processor 110 turns on the second camera so that the first camera and the second camera are turned on simultaneously; or, when the electronic device is making a video call with other electronic devices through the second camera, the camera used for the video call with other electronic devices is switched to the first camera, while the second camera remains on, so that the first camera and the second camera are turned on simultaneously.

[0108] Optionally, in this embodiment, the target mode includes a single-camera mode. Specifically, the processor 110 is configured to, when the load information is greater than or equal to a preset threshold, if the electronic device is making a video call with other electronic devices via the first camera, send a target video frame to the other electronic device and scan and recognize the graphic code using the second camera of the electronic device; wherein, the target video frame is a single frame of video during the video call between the electronic device and other electronic devices; the first camera is a front-facing camera, and the second camera is a rear-facing camera.

[0109] Optionally, in this embodiment, the target mode includes a single-camera mode. Specifically, the processor 110 is used to switch the communication mode between the electronic device and other electronic devices to a voice call mode when the load information is greater than or equal to a preset threshold, and to scan and recognize the graphic code using the electronic device's second camera.

[0110] Optionally, in this embodiment of the application, the processor 110 is further configured to switch the communication mode between the electronic device and other electronic devices to a video call mode when the electronic device completes the recognition of the graphic code.

[0111] In the electronic device provided in this application embodiment, when the electronic device is conducting a video call with other electronic devices, it receives a first input from a user and, in response to the first input, obtains the load information of the electronic device. Then, it scans and recognizes a graphic code using a target mode corresponding to the load information. The first input triggers the electronic device to perform the scanning and recognition. Since the electronic device needs to recognize a graphic code during a video call, it recognizes the graphic code according to the mode corresponding to the load information of the electronic device. This way, the electronic device does not need to interrupt the video call to scan and recognize the graphic code, thus simplifying the user's operation steps and improving the convenience of graphic code recognition by the electronic device.

[0112] It should be understood that, in this embodiment, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.

[0113] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 109 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0114] Processor 110 may include one or more processing units; optionally, processor 110 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 110.

[0115] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described graphic code recognition method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0116] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0117] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described graphic code recognition method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0118] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0119] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described graphic code recognition method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0120] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0121] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0122] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for recognizing graphic codes, characterized in that, The method includes: When an electronic device is making a video call with another electronic device, it receives a first input from the user, which triggers the electronic device to perform a QR code scan. In response to the first input, the load information of the electronic device is obtained; The graphic code is identified using a target pattern corresponding to the load information; The step of identifying the graphic code using a target pattern corresponding to the load information includes: If the load information is greater than or equal to a preset threshold, the call mode between the electronic device and the other electronic devices is switched to voice call mode, and the graphic code is scanned and recognized by the second camera of the electronic device.

2. The method according to claim 1, characterized in that, The target mode includes a dual-camera mode; The step of identifying the graphic code using a target pattern corresponding to the load information includes: If the load information is less than a preset threshold, the video image captured by the first camera of the electronic device is sent to the other electronic devices, and the graphic code is identified by the second camera of the electronic device. The first camera is the front-facing camera of the electronic device, and the second camera is the rear-facing camera of the electronic device.

3. The method according to claim 2, characterized in that, Before sending the video footage captured by the first camera of the electronic device to the other electronic device and recognizing the graphic code through the second camera of the electronic device, the method further includes: When the electronic device and the other electronic device are making a video call through the first camera, the second camera is turned on so that the first camera and the second camera are turned on simultaneously. or, When the electronic device is making a video call with the other electronic device through the second camera, the camera used for the video call with the other electronic device is switched to the first camera, while the second camera remains on, so that the first camera and the second camera are both turned on simultaneously.

4. The method according to claim 1, characterized in that, The target mode includes single-camera mode; The step of identifying the graphic code using a target pattern corresponding to the load information includes: If the load information is greater than or equal to a preset threshold, and the electronic device is making a video call with the other electronic device through the first camera, then the target video image is sent to the other electronic device, and the graphic code is scanned and identified through the second camera of the electronic device. The target video frame is a frame of video during a video call between the electronic device and the other electronic device; the first camera is the front-facing camera of the electronic device, and the second camera is the rear-facing camera of the electronic device.

5. The method according to claim 1, characterized in that, After scanning and recognizing the graphic code using the second camera of the electronic device, the method further includes: Once the electronic device completes the recognition of the graphic code, the call mode between the electronic device and the other electronic devices is switched to video call mode.

6. A graphic code recognition device, characterized in that, The device includes: a receiving module, an acquiring module, and an identification module, wherein: The receiving module is used to receive a first input from a user when the electronic device is making a video call with another electronic device. The first input is used to trigger the electronic device to perform QR code scanning and identification. The acquisition module is used to acquire the load information of the electronic device in response to the first input received by the receiving module; The identification module is used to identify the graphic code using a target pattern corresponding to the load information acquired by the acquisition module; The identification module is specifically used to switch the call mode between the electronic device and the other electronic devices to a voice call mode when the load information is greater than or equal to a preset threshold, and to scan and identify the graphic code through the second camera of the electronic device.

7. The apparatus according to claim 6, characterized in that, The target mode includes a dual-camera mode, and the device further includes a processing module; The processing module is used to send the video image captured by the first camera of the electronic device to the other electronic device when the load information is less than a preset threshold, and to identify the graphic code through the second camera of the electronic device; The first camera is the front-facing camera of the electronic device, and the second camera is the rear-facing camera of the electronic device.

8. The apparatus according to claim 7, characterized in that, The processing module is further configured to, before sending the video image captured by the first camera of the electronic device to the other electronic device and recognizing the graphic code through the second camera of the electronic device, activate the second camera when the electronic device and the other electronic device are having a video call through the first camera, so that the first camera and the second camera are activated simultaneously. or, When the electronic device is making a video call with the other electronic device through the second camera, the camera used for the video call with the other electronic device is switched to the first camera, while the second camera remains on, so that the first camera and the second camera are both turned on simultaneously.

9. The apparatus according to claim 6, characterized in that, The target mode includes single-camera mode; The identification module is specifically used to send a target video image to the other electronic device when the load information is greater than or equal to a preset threshold, and to scan and identify the graphic code through the second camera of the electronic device when the electronic device is making a video call with the other electronic device through the first camera. The target video frame is a frame of video during a video call between the electronic device and the other electronic device; the first camera is the front-facing camera of the electronic device, and the second camera is the rear-facing camera of the electronic device.

10. The apparatus according to claim 6, characterized in that, The processing module is configured to switch the call mode between the electronic device and the other electronic device to a video call mode after the second camera of the electronic device scans and recognizes the graphic code, once the electronic device has completed the recognition of the graphic code.

Citation Information

Patent Citations

  • Payment method and mobile terminal

    CN107886321A