Graphic identification code identification method, identification device, equipment and readable storage medium
By dynamically adjusting the graphic identification code detection frequency according to the working time of the smart terminal, the problem of increased power consumption and reduced user experience caused by the scanning and recognition function of the smart terminal in camera applications is solved, and the effect of improving the scanning efficiency and equipment performance is achieved.
Patent Information
- Application Number
- CN202311378680.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-04-25
AI Technical Summary
Smart terminals add scanning and recognition functions to camera applications, resulting in increased power consumption, reduced battery life and improved heating, and the setting of fixed intervals affects detection efficiency and user experience.
According to the current working time after the image acquisition device is started, the target graphic identification code detection frequency is dynamically adjusted, and the graphic identification code is detected according to this frequency.
Meet users' needs for quick scanning codes, improve scanning efficiency, avoid increasing unnecessary power consumption, and improve equipment performance.
Smart Images

Figure CN119886181A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to a method, a device, a equipment and a readable storage medium for recognizing a graphic identification code. Background Art
[0002] Smart terminals such as smartphones have become indispensable items in people's daily lives in modern society, and the camera function is one of the most important usage scenarios of smart terminals. In addition, due to the popularity of smart terminals, the use of graphic identification codes has become increasingly common in modern society. In order to optimize the scanning experience during use, the design of integrating the scanning function into the camera application of smart terminals has evolved. However, as more and more functions are integrated into the camera application of smart terminals, the performance of smart terminals is poor, for example, causing the smart terminal to heat up and freeze.
[0003] The battery life and heat generation of smart terminals have always been two indicators that users pay special attention to during use. Adding scanning and recognition functions to camera applications will bring power consumption overhead, and the power consumption overhead is affected by the pre-set fixed interval. For example, the smaller the fixed interval, the more frequent the detection operation of the QR code, the higher the detection efficiency, but the power consumption of the smart terminal increases, the battery life of the smart terminal is reduced, and the heating phenomenon of the smart terminal is more serious. The larger the fixed interval, although the impact on the power consumption and heat generation of the smart terminal is smaller, the detection efficiency of the QR code is lower, and the user's scanning experience is poor. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method, a recognition device, a device and a readable storage medium for recognizing a graphic identification code.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for identifying a graphic identification code is provided, comprising:
[0006] When the image acquisition device is in a preview state, determining the current working time of the image acquisition device after being started this time;
[0007] According to the current working time, determining a target graphic identification code detection frequency corresponding to the current working time;
[0008] According to the target graphic identification code detection frequency, performing graphic identification code detection on the preview image of the image acquisition device to determine whether there is a graphic identification code in the preview image;
[0009] When it is determined that the graphic identification code exists, the graphic identification code is identified and the identification result is displayed.
[0010] Optionally, determining the target graphic identification code detection frequency corresponding to the current working time according to the current working time includes:
[0011] According to the corresponding relationship between the current working time and the preset working time and the detection frequency, the target graphic identification code detection frequency corresponding to the current working time is determined.
[0012] Optionally, determining the target graphic identification code detection frequency corresponding to the current working time according to the correspondence between the current working time and the preset working time and the detection frequency includes:
[0013] If the current working time is less than or equal to the first working time, determining the target graphic identification code detection frequency corresponding to the current working time as the first detection frequency;
[0014] If the current working duration is greater than the first working duration and less than or equal to the second working duration, the target graphic identification code detection frequency corresponding to the current working duration is determined to be the second detection frequency, and the first detection frequency is greater than the second detection frequency.
[0015] Optionally, the second detection frequency is determined by:
[0016] If the current working time is the second working time, obtaining performance-related parameters of the device where the image acquisition device is located;
[0017] The second detection frequency is determined according to performance-related parameters of the device.
[0018] Optionally, the determining, according to the current working time, a target graphic identification code detection frequency corresponding to the current working time further includes:
[0019] If the current working time is longer than the second working time, prohibiting the graphic identification code detection of the preview image of the image acquisition device;
[0020] Determining whether the image scene corresponding to the preview image changes;
[0021] If the image scene changes, it is determined that the target graphic identification code detection frequency corresponding to the current working duration is a third detection frequency, and the third detection frequency is less than the second detection frequency.
[0022] Optionally, performing graphic identification code detection on the preview image of the image acquisition device according to the target graphic identification code detection frequency includes:
[0023] Performing graphic identification code detection on the preview image of the image acquisition device according to the third detection frequency;
[0024] If some features of the graphic identification code are detected within a preset time period, increasing the third detection frequency to obtain a fourth detection frequency;
[0025] According to the fourth detection frequency, the preview image of the image acquisition device is subjected to graphic identification code detection.
[0026] Optionally, determining whether the image scene corresponding to the preview image has changed includes:
[0027] If the image scene corresponding to the preview image changes from a preset target scene image to a non-target scene, it is determined that the image scene has changed; or
[0028] If the image scene corresponding to the preview image changes from a first scene to a second scene, it is determined that the image scene changes, and the first scene is different from the second scene.
[0029] According to a second aspect of an embodiment of the present disclosure, a device for identifying a graphic identification code is provided, the device comprising:
[0030] A first determining module is configured to determine the current working time of the image acquisition device after it is started this time when the image acquisition device is in a preview state;
[0031] A second determination module is configured to determine, according to the current working time, a target graphic identification code detection frequency corresponding to the current working time;
[0032] A first detection module is configured to perform a graphic identification code detection on the preview image of the image acquisition device according to the target graphic identification code detection frequency to determine whether there is a graphic identification code in the preview image;
[0033] The recognition module is configured to recognize the graphic identification code and display the recognition result when it is determined that the graphic identification code exists.
[0034] According to a third aspect of an embodiment of the present disclosure, a device is provided, including:
[0035] An image acquisition device capable of scanning a graphic identification code;
[0036] processor;
[0037] a memory for storing processor-executable instructions;
[0038] Wherein, the processor is configured to:
[0039] When the image acquisition device is in a preview state, determining the current working time of the image acquisition device after being started this time;
[0040] According to the current working time, determining a target graphic identification code detection frequency corresponding to the current working time;
[0041] According to the target graphic identification code detection frequency, performing graphic identification code detection on the preview image of the image acquisition device to determine whether there is a graphic identification code in the preview image;
[0042] When it is determined that the graphic identification code exists, the graphic identification code is identified and the identification result is displayed.
[0043] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for recognizing a graphic identification code provided in the first aspect of the present disclosure are implemented.
[0044] By adopting the above technical solution, according to the current working time of the image acquisition device after this startup, the target graphic identification code detection frequency corresponding to the current working time is determined, and the graphic identification code is detected according to the detection frequency. In this way, compared with the solution of detecting the graphic identification code with a fixed detection frequency in the related art, the target graphic identification code detection frequency is dynamically adjusted according to the working time of the image acquisition device, which can not only meet the user's demand for fast code scanning and improve the code scanning efficiency, but also avoid unnecessary power consumption and improve the performance of the device.
[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0047] Figure 1 The figure is a flow chart of a method for identifying a graphic identification code according to an exemplary embodiment.
[0048] Figure 2 The figure is a schematic diagram of a method for identifying a graphic identification code according to an exemplary embodiment.
[0049] Figure 3 The figure is a block diagram of a device for recognizing a graphic identification code according to an exemplary embodiment.
[0050] Figure 4 It is a block diagram of a device according to an exemplary embodiment.
[0051] Figure 5It is a block diagram of a device according to an exemplary embodiment. DETAILED DESCRIPTION
[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0053] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0054] At present, some smart phones have integrated the scanning function in the camera application, and users only need to run the camera application to realize the scanning function. In the related technology, during the camera preview process, a frame of preview image is selected at a fixed interval, and it is detected whether there is a QR code in the preview image. When it is determined that there is a QR code, the QR code is identified and the corresponding content is displayed. Among them, the setting of fixed intervals is often set when the device leaves the factory based on the performance, functions and other indicators that the device, such as a smart phone, can tolerate. For example, even a QR code detection will be performed on each frame of the preview image, which will bring great heat risks and reduce the user experience.
[0055] For example, in the related art, first, the camera is started to put the camera in a preview state, then, if the number of frames of the preview image can be divided by the preset fixed interval N, the QR code is detected for the frame preview image, and finally, if there is a QR code, the QR code is identified and the identification result is displayed. The identification result can be the content corresponding to the QR code. For example, if N is 1, the QR code is detected for each frame of the preview image. If N is 5, the QR code is detected once for every 5 frames of the preview image. Among them, the fixed interval N is usually set when the device leaves the factory, which will cause the following problems: First, when the user expects to start the camera application to detect the QR code immediately, if the fixed interval N is set to a large value, it will affect the efficiency of the QR code detection and affect the user experience; second, if there is no QR code in the user's photo scene, that is, when the user starts the camera application with the intention of taking a photo, the user does not want the camera application to detect the QR code. At this time, if the preview image is still detected at every fixed interval N, it will lead to a waste of device resources, affect the speed of other algorithm processing, increase unnecessary power consumption, and reduce the endurance and performance of the device.
[0056] In view of this, the present disclosure provides a method, device, equipment and readable storage medium for identifying a graphic identification code, so as to determine a target graphic identification code detection frequency corresponding to the current working time according to the current working time of the image acquisition device after this startup, and detect the graphic identification code according to the detection frequency. In this way, compared with the scheme of detecting the graphic identification code with a fixed detection frequency in the related art, the target graphic identification code detection frequency is dynamically adjusted according to the working time of the image acquisition device, which can not only meet the user's needs for fast code scanning and improve the scanning efficiency, but also avoid unnecessary power consumption and improve device performance.
[0057] Figure 1 FIG. 1 is a flow chart of a method for identifying a graphic identification code according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.
[0058] In step S11, when the image acquisition device is in a preview state, the current working time of the image acquisition device after being started this time is determined.
[0059] In the present disclosure, the image acquisition device may be any device having an image acquisition function and an image preview interface, for example, the image acquisition device may be a camera on a smart phone. In addition, the starting time of the current working time of the image acquisition device after this startup is the time when the image acquisition device is started this time.
[0060] In step S12, according to the current working time, the target graphic identification code detection frequency corresponding to the current working time is determined.
[0061] By way of example, the graphic identification code may include a barcode and / or a QR code.
[0062] Considering that scanning the image identification code is an obviously expected user behavior, that is, the image acquisition device is usually started to perform the scanning operation only when the user confirms that there is a graphic identification code and needs to scan the graphic identification code. Therefore, in one embodiment, the working time and the target graphic identification code detection frequency have an inversely proportional relationship, that is, the shorter the working time, the higher the corresponding detection frequency, so as to meet the user's needs for fast code scanning, and the longer the working time, the lower the corresponding detection frequency, so as to reduce power consumption and improve device performance.
[0063] In step S13, according to the target graphic identification code detection frequency, the preview image of the image acquisition device is subjected to graphic identification code detection to determine whether there is a graphic identification code in the preview image.
[0064] For example, the preview image of the image acquisition device can be detected by calling a preset detection algorithm. For example, the detection method of the graphic identification code positioning point can be used to detect whether the graphic identification code exists in the preview image. Among them, the specific detection method of the graphic identification code belongs to a relatively conventional technology, and this disclosure will not be described in detail.
[0065] It should be understood that when the image acquisition device is in the preview state, the preview image is refreshed in real time. For example, if the target graphic identification code detection frequency is determined to be once every 10 frames of images, and the current preview image is taken as the first frame of image, the graphic identification code is detected for the tenth preview frame, the twentieth preview frame, etc.
[0066] In step S14, when it is determined that the graphic identification code exists, the graphic identification code is identified and the identification result is displayed.
[0067] For example, when it is determined that there is a graphic identification code, a recognition algorithm library of the graphic identification code is called to recognize the graphic identification code, and a recognition result is displayed, wherein the recognition result may be the content corresponding to the graphic identification code.
[0068] By adopting the above technical solution, according to the current working time of the image acquisition device after this startup, the target graphic identification code detection frequency corresponding to the current working time is determined, and the graphic identification code is detected according to the detection frequency. In this way, compared with the solution of detecting the graphic identification code with a fixed detection frequency in the related art, the target graphic identification code detection frequency is dynamically adjusted according to the working time of the image acquisition device, which can not only meet the user's demand for fast code scanning and improve the code scanning efficiency, but also avoid unnecessary power consumption and improve the performance of the device.
[0069] In one embodiment, after the current working time is determined, the target graphic identification code detection frequency corresponding to the current working time is randomly determined, wherein the current working time and the target graphic identification code detection frequency have an inversely proportional relationship.
[0070] In another embodiment, the correspondence between the working time and the detection frequency can be preset, and accordingly, step S12 determines the target graphic identification code detection frequency corresponding to the current working time according to the current working time, including: determining the target graphic identification code detection frequency corresponding to the current working time according to the correspondence between the current working time and the preset working time and detection frequency. In this way, the reliability of the determined target graphic identification code detection frequency is improved.
[0071] In this corresponding relationship, the target graphic identification code detection frequency corresponding to the first working duration is the first detection frequency, and the target graphic identification code detection frequency corresponding to the second working duration is the second detection frequency, wherein the second working duration is greater than the first working duration, and the first detection frequency is greater than the second detection frequency. For example, the first detection frequency and the second detection frequency may be fixed values set when the device where the image acquisition device is located leaves the factory. For example, the first detection frequency indicates that each frame is detected, and the second detection frequency indicates that it is detected once every 5 frames.
[0072] As another example, the first working time can be recorded as time T1, the second working time can be recorded as time T2, and the starting time of the first working time and the second working time are both the time when the image acquisition device is started this time. Assume that the time when the image acquisition device is started this time is t0, the time T1 is the time from time t0 to time t1, the time T2 is the time from time t0 to time t2, and time t2 is later than time t1. Considering that during the time from time t0 to time t1, if there is a graphic identification code, the user's intention to start the image acquisition device is usually to scan the code. Therefore, in order to meet the user's demand for fast code scanning, the first detection frequency is usually higher, that is, the first detection frequency can be a fixed frequency value used to characterize the detection of each frame, and during the time from time t1 to time t2, since the graphic identification code is not detected during the time from time t0 to time t1, at this time, the user's intention to scan the code is low. In order to reduce power consumption to a certain extent, the second detection frequency can be calculated based on the performance-related parameters of the device.
[0073] For example, the second detection frequency may be determined in the following manner: if the current working duration is the second working duration, obtaining performance-related parameters of the device where the image acquisition apparatus is located; and determining the second detection frequency according to the performance-related parameters of the device.
[0074] In the present disclosure, a calculation model for calculating the second detection frequency can be preset, and when the performance-related parameters of the device are obtained, the second detection frequency is calculated according to the calculation model. In addition, the performance-related parameters of the device may be the performance-related parameters at the current moment. However, considering that the working time of the image acquisition device after each startup is usually short, the current performance-related parameters of the device are closer to the performance-related parameters when the image sampling device is started. In order to facilitate the calculation of the second detection frequency in advance, in the present disclosure, the performance-related parameters of the device may be the performance-related parameters of the device when the image acquisition device is started. Among them, the performance-related parameters may include but are not limited to the remaining power of the device, temperature, remaining memory size, operating speed, etc.
[0075] In one embodiment, based on the correspondence between the current working time and the preset working time and the detection frequency, the specific implementation method of determining the target graphic identification code detection frequency corresponding to the current working time can be: if the current working time is less than or equal to the first working time, then the target graphic identification code detection frequency corresponding to the current working time is determined to be the first detection frequency; if the current working time is greater than the first working time and less than or equal to the second working time, then the target graphic identification code detection frequency corresponding to the current working time is determined to be the second detection frequency, and the first detection frequency is greater than the second detection frequency.
[0076] Figure 2 FIG. 1 is a schematic diagram showing a method for identifying a graphic identification code according to an exemplary embodiment. Figure 2 As shown, it is assumed that the image acquisition device is a camera. First, the camera is started at time t0 to put the camera in a preview state. Then, during the period from time t0 to time t1, the preview image is subjected to a graphic identification code detection at a first detection frequency to determine whether a graphic identification code exists. If not, the preview image is subjected to a graphic identification code detection at the first detection frequency. If it exists, the graphic identification code is identified and the identification result is displayed. For example, the first detection frequency indicates that each frame is detected.
[0077] During the period from time t1 to time t2, the preview image is subjected to a graphic identification code detection at the second detection frequency to determine whether a graphic identification code exists. If not, the preview image is subjected to a graphic identification code detection at the second detection frequency. If present, the graphic identification code is identified and the identification result is displayed. For example, the second detection frequency indicates that a detection is performed every N frames, where N is an integer greater than 1.
[0078] It should be understood that in the present disclosure, if a graphic identification code is scanned and displayed during the period from time t0 to time t1, the user will usually turn off the image acquisition device. If no graphic identification code is scanned during the period from time t0 to time t1, the user's intention of starting the image acquisition device may be to take a photo rather than scan the code. However, in order to ensure that a scanning response can be performed quickly when the user intends to scan the code, in the present disclosure, detection can be performed at a second detection frequency during the period from time t1 to time t2.
[0079] In the present disclosure, considering that scanning a code is a user behavior with obvious expectations, the user often starts the image acquisition device to scan the code only when it is determined that there is a graphic identification code. Therefore, during the period from time t0 to time t1 after the image acquisition device is started, a higher detection frequency is used to detect the graphic identification code of the preview image, so that the code can be scanned quickly, the scanning efficiency is improved, and the user experience is improved. During the period from time t1 to time t2, since it has been determined that the user's intention to scan the code is small, a lower detection frequency can be used for detection. In this way, power consumption can be reduced, and when the user has the intention to scan the code, a quick scanning response can be made, which improves the scanning efficiency to a certain extent.
[0080] In addition, in the present disclosure, according to the current working time, determining the target graphic identification code detection frequency corresponding to the current working time also includes:
[0081] If the current working time is longer than the second working time, prohibiting the graphic identification code detection of the preview image of the image acquisition device;
[0082] Determine whether the image scene corresponding to the preview image has changed;
[0083] If the image scene changes, it is determined that the target graphic identification code detection frequency corresponding to the current working duration is the third detection frequency, and the third detection frequency is less than the second detection frequency.
[0084] In the present disclosure, in order to further reduce power consumption, if the current working duration is greater than the second working duration, that is, after time t2, it is prohibited to perform graphic identification code detection on the preview image of the image acquisition device, that is, the resources occupied by the detection process are released, and the performance of other algorithms of the device is improved. In this way, power consumption is further reduced and device performance is improved.
[0085] In addition, it should be understood that when the camera is in the preview state, the scene recognition algorithm of the back end is always in operation to recognize the image scene corresponding to the preview image. Among them, the specific implementation method of recognizing the image scene belongs to a relatively conventional technology, and the present disclosure does not limit this.
[0086] In a possible implementation, determining whether the image scene corresponding to the preview image has changed may include: if the image scene corresponding to the preview image changes from a preset target scene image to a non-target scene, then determining that the image scene has changed; or, if the image scene corresponding to the preview image changes from a first scene to a second scene, then determining that the image scene has changed, and the first scene is different from the second scene. The target scene image may be an image that does not usually include a graphic identification code, for example, the target scene image may be a landscape scene image, an animal or person scene image, etc.
[0087] In the present disclosure, when the image scene changes, it indicates that the user may have the need to scan the code. Therefore, when it is determined that the image scene has changed, the target graphic identification code detection frequency corresponding to the current working time is determined to be the third detection frequency. In addition, since the probability of the existence of the graphic identification code is low at this time, the third detection frequency is usually lower than the second detection frequency.
[0088] In one method, a graphic identification code is detected on a preview image of an image acquisition device according to a target graphic identification code detection frequency, including: performing graphic identification code detection on the preview image of the image acquisition device according to a third detection frequency; if the graphic identification code is detected within a preset time period, the graphic identification code is identified and the identification result is displayed; if the graphic identification code is not detected within the preset time period, graphic identification code detection on the preview image of the image acquisition device is prohibited until a scene change is detected again, and then graphic identification code detection is performed on the preview image of the image acquisition device at the third detection frequency.
[0089] In another manner, the preview image of the image acquisition device is subjected to the graphic identification code detection according to the target graphic identification code detection frequency, including: the preview image of the image acquisition device is subjected to the graphic identification code detection according to the third detection frequency; if some features of the graphic identification code are detected within the preset time, the third detection frequency is increased to obtain a fourth detection frequency; the preview image of the image acquisition device is subjected to the graphic identification code detection according to the fourth detection frequency. For example, the fourth detection frequency may be the same as the first detection frequency.
[0090] In this manner, when a suspected graphic identification code is detected in the preview image at the third detection frequency, in order to achieve the purpose of fast code scanning, the third detection frequency can be increased to obtain a fourth detection frequency, and detection is performed at the fourth detection frequency. Part of the features of the graphic identification code may include but are not limited to at least one positioning point in the graphic identification code.
[0091] For example, Figure 2 As shown, after time t2, first, detection is prohibited, that is, graphic identification code detection is prohibited for the preview image of the image acquisition device, and it is determined whether the image scene has changed. Then, when it is determined that a change has occurred, graphic identification code detection is performed on the preview image at a third detection frequency within a preset time length tc to determine whether there are partial features of the graphic identification code. If so, the detection frequency is increased, that is, detection is performed at a fourth detection frequency. If there are no partial features of the graphic identification code, the step of determining whether the image scene has changed is re-executed. Afterwards, if it is determined that a complete graphic identification code exists, the recognition result is identified and displayed.
[0092] In addition, after the graphic identification code is detected at the fourth detection frequency, the detection frequency may be adjusted to the second detection frequency, and then the graphic identification code detection for the preview image continues at the second detection frequency, which is not specifically limited in the present disclosure.
[0093] Based on the same inventive concept, the present disclosure also provides a device for identifying a graphic identification code. Figure 3 FIG. 1 is a block diagram of a device for identifying a graphic identification code according to an exemplary embodiment. Figure 3 , the graphic identification code recognition device 300 includes:
[0094] The first determining module 301 is configured to determine the current working time of the image acquisition device after the image acquisition device is started this time when the image acquisition device is in a preview state;
[0095] The second determination module 302 is configured to determine, according to the current working time, a target graphic identification code detection frequency corresponding to the current working time;
[0096] The first detection module 303 is configured to perform a graphic identification code detection on the preview image of the image acquisition device according to the target graphic identification code detection frequency to determine whether there is a graphic identification code in the preview image;
[0097] The identification module 304 is configured to identify the graphic identification code and display the identification result when it is determined that the graphic identification code exists.
[0098] Optionally, the second determining module 302 includes:
[0099] The first determination submodule is configured to determine the target graphic identification code detection frequency corresponding to the current working time according to the corresponding relationship between the current working time and the preset working time and the detection frequency.
[0100] Optionally, the first determining submodule includes:
[0101] A second determination submodule is configured to determine that the target graphic identification code detection frequency corresponding to the current working duration is the first detection frequency if the current working duration is less than or equal to the first working duration;
[0102] The third determination submodule is configured to determine that the target graphic identification code detection frequency corresponding to the current working duration is the second detection frequency if the current working duration is greater than the first working duration and less than or equal to the second working duration, and the first detection frequency is greater than the second detection frequency.
[0103] Optionally, the second detection frequency is determined by:
[0104] If the current working time is the second working time, obtaining performance-related parameters of the device where the image acquisition device is located;
[0105] The second detection frequency is determined according to performance-related parameters of the device.
[0106] Optionally, the second determining module 302 includes:
[0107] a prohibition submodule, configured to prohibit the detection of a graphic identification code on the preview image of the image acquisition device if the current working time is longer than the second working time;
[0108] A fourth determining submodule is configured to determine whether the image scene corresponding to the preview image changes;
[0109] The fifth determination submodule is configured to determine that the target graphic identification code detection frequency corresponding to the current working duration is a third detection frequency if the image scene changes, and the third detection frequency is less than the second detection frequency.
[0110] Optionally, the first detection module 303 is configured to:
[0111] Performing graphic identification code detection on the preview image of the image acquisition device according to the third detection frequency;
[0112] If some features of the graphic identification code are detected within a preset time period, increasing the third detection frequency to obtain a fourth detection frequency;
[0113] According to the fourth detection frequency, the preview image of the image acquisition device is subjected to graphic identification code detection.
[0114] Optionally, the fourth determining submodule is configured to: if the image scene corresponding to the preview image changes from a preset target scene image to a non-target scene, determine that the image scene has changed; or
[0115] If the image scene corresponding to the preview image changes from a first scene to a second scene, it is determined that the image scene changes, and the first scene is different from the second scene.
[0116] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0117] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for recognizing a graphic identification code provided by the present disclosure are implemented.
[0118] Figure 4 800 is a block diagram of a device according to an exemplary embodiment. For example, the device 800 may be a smart phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0119] Reference Figure 4 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .
[0120] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the method for recognizing a graphical identification code. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0121] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0122] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0123] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0124] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0125] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0126] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0127] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0128] In an exemplary embodiment, the device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform a method for recognizing a graphic identification code.
[0129] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the above instructions can be executed by the processor 820 of the device 800 to complete the method for recognizing a graphic identification code. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0130] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned method for recognizing a graphic identification code when executed by the programmable device.
[0131] Figure 5 1 is a block diagram of a device according to an exemplary embodiment. For example, device 1900 may be provided as a server. Figure 5 , the device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above-mentioned method for recognizing a graphic identification code.
[0132] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958. The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or similar.
[0133] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0134] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for identifying a graphic identification code, characterized in that: The method comprises: When the image acquisition device is in a preview state, determining the current working time of the image acquisition device after being started this time; According to the current working time, determining a target graphic identification code detection frequency corresponding to the current working time; According to the target graphic identification code detection frequency, performing graphic identification code detection on the preview image of the image acquisition device to determine whether there is a graphic identification code in the preview image; When it is determined that the graphic identification code exists, the graphic identification code is identified and the identification result is displayed.
2. The method according to claim 1, characterized in that: The step of determining the target graphic identification code detection frequency corresponding to the current working time according to the current working time includes: According to the corresponding relationship between the current working time and the preset working time and the detection frequency, the target graphic identification code detection frequency corresponding to the current working time is determined.
3. The method according to claim 2, characterized in that The determining, according to the correspondence between the current working time and the preset working time and the detection frequency, the target graphic identification code detection frequency corresponding to the current working time includes: If the current working time is less than or equal to the first working time, determining the target graphic identification code detection frequency corresponding to the current working time as the first detection frequency; If the current working duration is greater than the first working duration and less than or equal to the second working duration, the target graphic identification code detection frequency corresponding to the current working duration is determined to be the second detection frequency, and the first detection frequency is greater than the second detection frequency.
4. The method according to claim 2, characterized in that: The second detection frequency is determined by: If the current working time is the second working time, obtaining performance-related parameters of the device where the image acquisition device is located; The second detection frequency is determined according to performance-related parameters of the device.
5. The method according to claim 3, characterized in that: The step of determining the target graphic identification code detection frequency corresponding to the current working time according to the current working time also includes: If the current working time is longer than the second working time, prohibiting the graphic identification code detection of the preview image of the image acquisition device; Determining whether the image scene corresponding to the preview image changes; If the image scene changes, it is determined that the target graphic identification code detection frequency corresponding to the current working duration is a third detection frequency, and the third detection frequency is less than the second detection frequency.
6. The method according to claim 5, characterized in that The step of performing graphic identification code detection on the preview image of the image acquisition device according to the target graphic identification code detection frequency includes: Performing graphic identification code detection on the preview image of the image acquisition device according to the third detection frequency; If some features of the graphic identification code are detected within a preset time period, increasing the third detection frequency to obtain a fourth detection frequency; According to the fourth detection frequency, the preview image of the image acquisition device is subjected to graphic identification code detection.
7. The method according to claim 5, characterized in that The determining whether the image scene corresponding to the preview image has changed includes: If the image scene corresponding to the preview image changes from a preset target scene image to a non-target scene, it is determined that the image scene has changed; or If the image scene corresponding to the preview image changes from a first scene to a second scene, it is determined that the image scene changes, and the first scene is different from the second scene.
8. A device for identifying a graphic identification code, characterized in that: The device comprises: A first determining module is configured to determine the current working time of the image acquisition device after it is started this time when the image acquisition device is in a preview state; A second determination module is configured to determine, according to the current working time, a target graphic identification code detection frequency corresponding to the current working time; A first detection module is configured to perform a graphic identification code detection on the preview image of the image acquisition device according to the target graphic identification code detection frequency to determine whether there is a graphic identification code in the preview image; The recognition module is configured to recognize the graphic identification code and display the recognition result when it is determined that the graphic identification code exists.
9. A device, characterized in that: include: An image acquisition device capable of scanning a graphic identification code; processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: When the image acquisition device is in a preview state, determining the current working time of the image acquisition device after being started this time; According to the current working time, determining a target graphic identification code detection frequency corresponding to the current working time; According to the target graphic identification code detection frequency, performing graphic identification code detection on the preview image of the image acquisition device to determine whether there is a graphic identification code in the preview image; When it is determined that the graphic identification code exists, the graphic identification code is identified and the identification result is displayed.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.