WO2019233144A1 - 一种图形码的解码方法及客户端 - Google Patents

一种图形码的解码方法及客户端 Download PDF

Info

Publication number
WO2019233144A1
WO2019233144A1 PCT/CN2019/077134 CN2019077134W WO2019233144A1 WO 2019233144 A1 WO2019233144 A1 WO 2019233144A1 CN 2019077134 W CN2019077134 W CN 2019077134W WO 2019233144 A1 WO2019233144 A1 WO 2019233144A1
Authority
WO
WIPO (PCT)
Prior art keywords
decoding
current frame
frame image
information
interval
Prior art date
Application number
PCT/CN2019/077134
Other languages
English (en)
French (fr)
Inventor
邹启晨
屠寅海
方刚
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019233144A1 publication Critical patent/WO2019233144A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a decoding method of a graphic code and a client.
  • the graphic code may include, for example, a bar code, a one-dimensional code, a two-dimensional code, and the like.
  • the user can decode the graphic code through a terminal device or software with a code scanning function, thereby identifying the information contained in the graphic code.
  • the purpose of the embodiments of the present application is to provide a decoding method of a graphics code, which can improve the decoding speed of the graphics code.
  • an embodiment of the present application provides a method for decoding a graphic code, which is provided with decoding information.
  • the decoding information includes a decoding method and interval information associated with the decoding method.
  • the interval information is used to limit the associated information.
  • the frequency used in the decoding process during decoding; the method includes: acquiring a current frame image and determining current frame information corresponding to the current frame image; and based on the interval information and the current frame information, the decoding information Determining a target decoding mode for the current frame image adaptation in the decoding mode; and decoding the graphic code contained in the current frame image according to the target decoding mode.
  • an embodiment of the present application further provides a client.
  • the client includes a storage unit configured to store decoding information, where the decoding information includes a decoding mode and interval information associated with the decoding mode.
  • the interval information is used to limit the frequency used by the associated decoding method in the decoding process;
  • the current frame information determination unit is used to obtain the current frame image and determine the current frame information of the current frame image;
  • the target decoding mode determination unit is used to Based on the interval information and the current frame information, determining a target decoding mode of the current frame image adaptation in the decoding mode of the decoding information;
  • a decoding unit configured to perform a The graphic code contained in the frame image is decoded.
  • an embodiment of the present application further provides a client.
  • the client includes a processor and a memory.
  • the memory is used to store a computer program.
  • the computer program is executed by the processor, the foregoing implementation is implemented. method.
  • the interval information may be, for example, the number of interval frames or the interval time.
  • the interval frame number can be used to limit a certain decoding method to only attempt to decode one frame image among consecutive multi-frame images.
  • Interval time can be used to limit a certain decoding method to only one time node to try to decode in a period of time. In this way, after the current frame image is acquired, the current frame information corresponding to the image can be determined.
  • the current frame information may be the current frame number of the current frame image, or a current time node when the current frame image is obtained.
  • one or more target decoding modes suitable for the current frame image are determined. Then, it can try to decode the current frame image through the determined target decoding mode.
  • various decoding methods are not tried for each frame of image, but a part of the decoding methods are selectively selected according to the interval information to try to decode. Time, thereby increasing the speed of code scanning.
  • FIG. 1 is a flowchart of a method for decoding a graphic code according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of an interval frame number according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a functional module of a client in an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a client according to an embodiment of the present application.
  • the terminal device may be an electronic device such as a smart phone, a tablet computer, a personal digital assistant, or a smart wearable device.
  • decoding information may be set in advance for a code scanning process, and the decoding information may include a decoding manner and interval information associated with the decoding manner.
  • the decoding method may correspond to a coding method of a graphics code.
  • the commonly used coding methods of the graphic code are PDF417, QR Code, Code 49, Code 16K, and Data Matrix.
  • the decoding methods corresponding to the coding methods exemplified above may be the decoding methods included in the decoding information.
  • the interval information associated with each decoding method can be set for the frequency of the decoding method in actual application.
  • the interval information associated with the decoding method can be used to limit the frequency with which the decoding method is used in the decoding process.
  • the interval information may be an interval frame number or an interval time. Among them, the interval frame number can be used to limit the decoding mode to only attempt to decode one frame image among consecutive multi-frame images.
  • Interval time can be used to limit the decoding mode to only one time node trying to decode in a period of time. For example, if the interval frame number is 5, it means that the decoding method associated with the interval frame number will attempt to decode for one frame image in every 5 frame image. For another example, if the interval time is 25 milliseconds, it means that the decoding method associated with the interval time will try to decode every 25 milliseconds during the scanning process. It can be seen that if the value represented by the interval information is larger, it means that the associated decoding method is used less frequently; conversely, if the value represented by the interval information is smaller, it means that the associated decoding method is used The higher the frequency.
  • decoding information required during decoding can be generated.
  • the decoded information may be stored in a server.
  • the server may be a business server corresponding to software providing code scanning services.
  • the terminal device can obtain the decoding information from the server, and can subsequently decode according to the decoding mode and interval information set in the decoding information.
  • the decoded information can also be directly integrated into software that provides code scanning services.
  • the decoded information can be compressed as a part of the software in the software installation package. When the terminal device installs the software, it can extract the decoded information from the installation package. In this way, the terminal device can store the decoding information in the path specified by the installation package, and can subsequently perform decoding according to the decoding mode and interval information set in the decoding information.
  • the method for decoding a graphic code may include the following steps.
  • S1 Acquire a current frame image, and determine current frame information corresponding to the current frame image.
  • a camera on the terminal device may be turned on, and then an image including a graphic code is captured through the camera.
  • each frame of image can be continuously collected at a fixed time interval. For example, a camera can capture 25 frames per second.
  • a graphic code contained therein can be identified, and information carried by the graphic code can be decoded. Specifically, after acquiring the current frame image, the current frame information corresponding to the current frame image may be determined.
  • the type of the current frame information may be consistent with the type of the interval information in the decoded information.
  • the interval information in the decoded information is the number of interval frames. Then, when determining the current frame information corresponding to the current frame image, the current frame number of the current frame image may be recorded, and the recorded current frame number is used as the current frame information. The current frame number may be counted for the current scanning process. In this scan, the number of frames of the first frame image collected by the camera may be 1, and the number of frames of subsequent images may be increased one by one.
  • the interval information in the decoding information is an interval time
  • the current time node when the current frame image is obtained may be recorded, and the current time node is used as The current frame information.
  • the current time node may be recorded according to the time of the current code scanning. Specifically, at the beginning of the code scanning, the time can be counted from 0, and as the code scanning process continues to progress, the statistical time can also be gradually accumulated. For example, if the current frame image is acquired at the 50th millisecond of the code scanning process, the current time node may be 50 milliseconds. In addition, the current time node may also be recorded according to the actual system time of the terminal device.
  • the system time of the terminal device is 17:25:20, then the current time node may be 17:25:20.
  • the accuracy of the system time can be accurate to the millisecond level, so that the time nodes of adjacent multi-frame images can be distinguished.
  • S3 Determine, according to the interval information and the current frame information, a target decoding mode of the current frame image adaptation in a decoding mode of the decoding information.
  • the current frame information and the interval information may be matched to determine which decoding methods should be used to attempt to decode the current frame image.
  • the interval information is an interval frame number
  • a frame number sequence corresponding to the interval frame number may be determined, and the frame number sequence includes at least one frame number.
  • the number of frames included in the frame number sequence may be a multiple of the interval frame number. For example, if the interval frame number is 5, the number of frames included in the frame number sequence may be 5, 10, 15, and so on.
  • the terminal device when it obtains an image that matches the number of frames included in the frame number sequence, it can call a decoding method associated with the interval frame number to try to decode the acquired image. Then, after determining the frame number sequence based on the interval frame number, it can be determined whether the current frame number exists in the frame number sequence. If it exists, the decoding mode associated with the interval frame number can be determined as The target decoding mode of the current frame image adaptation. This target decoding mode can be used later to try to decode the current frame image.
  • the corresponding interval frames can be associated.
  • FIG. 2 in an application example, it is assumed that there are currently three decoding modes, and the number of interval frames associated with these three decoding modes is 1, 2, and 4, respectively.
  • the rectangular frame in FIG. 2 is each frame of the image, and the rectangular frame filled with shadows can represent the image that needs to be called to try to decode the corresponding decoding method. As shown in FIG.
  • each frame of the image needs to call the decoding method to try to decode; for the second decoding method, one frame of the image needs to call the decoding method to try to decode every 2 frames of the image; For the third decoding method, every 4 frames of image needs one frame of image to call the decoding method to try to decode.
  • some images may need to be decoded by using multiple decoding methods, and some images may only be decoded by using one decoding method.
  • a time sequence corresponding to the interval time may also be determined, and the time sequence includes at least one time node. For example, if the interval is 25 milliseconds, the time node in the time series may be 25 milliseconds, 50 milliseconds, 75 milliseconds, and so on.
  • the decoding method associated with the interval time may be called to try to decode the acquired image. In this way, after determining the time series corresponding to the interval time, it can be determined whether the current time node exists in the time series. If it exists, the decoding method associated with the interval time can be determined as the current frame.
  • Target decoding mode for image adaptation is the decoding method associated with the interval time.
  • an attempt can be made to decode the graphic code contained in the current frame image according to the target decoding mode. If the decoding is successful, the information contained in the graphic code can be obtained, so that the current code scanning process can be ended. If the decoding fails, the decoding of the graphic code contained in the current frame image may be stopped, and the next frame image may be acquired. For the next frame image, the decoding method adapted to the next frame image can also be determined according to the description in steps S1 and S3, so as to try to decode the next frame image using the adapted decoding method. If the decoding of the next frame image still fails, subsequent images may continue to be acquired until the decoding succeeds or the decoding times out.
  • the current frame image may be adapted to at least two target decoding modes.
  • the second frame image is adapted to the first decoding method and the second decoding method
  • the fourth frame image is adapted to all three decoding methods.
  • the current target decoding mode may be determined among the at least two target decoding modes.
  • the current target decoding method may be randomly determined among the at least two target decoding methods, or the target decoding method with the highest frequency used defined by the interval information may be used as the current target decoding method.
  • the graphic code contained in the current frame image may be decoded according to the current target decoding mode.
  • the decoding is successful, the information contained in the graphic code can be obtained, so that the decoding process can be stopped directly.
  • a target decoding mode different from the current target decoding mode may be determined among the at least two target decoding modes, and the current frame is determined according to the determined target decoding mode.
  • the graphics code contained in the image is decoded.
  • Target decoding method in order not to repeatedly use the same decoding method to try to decode the current frame multiple times, after the current target decoding method fails to decode, in the subsequent selection of a new target decoding method, it is no longer necessary to select the already decoded failure.
  • the multiple target decoding methods can be used to try decoding one by one. Once the decoding is successful, the decoding process can be stopped. If the current target decoding method fails, Then you can try another decoding method. If the decoding of the multiple target decoding methods that have been adapted fails, the process of decoding the current frame image can be abandoned, and then the next frame image can be obtained, and the next frame image can be decoded again using the methods described in steps S1 to S5.
  • each decoding method applied in the code scanning process may have a preset priority.
  • the priority can be set according to the usage rate of the decoding mode. The higher the usage rate, the higher the priority of the decoding method. Specifically, the number of occurrences of each decoding method in the specified number of graphic codes may be counted, and then the priority of each decoding method is set according to the counted number of times.
  • the priority of the decoding method can be set according to the set interval information. The smaller the value defined by the interval information, the higher the corresponding priority can be.
  • the at least two target decoding modes may be sorted according to a preset priority.
  • multiple target decoding modes can be sorted in order of priority from high to low.
  • the graphic code contained in the current frame image may be decoded in order according to the sorting result.
  • the target decoding mode with a higher priority can be preferentially used to attempt decoding. If the decoding is successful, the information contained in the graphic code can be obtained, and the decoding process can be stopped. If the currently selected target decoding method fails to decode, a lower priority target decoding method may be selected to try to decode. If the decoding fails according to the sorting results, the decoding process for the current frame image can be stopped, and then the next frame image can be obtained, and the next frame image can be decoded again in the manner described in steps S1 to S5.
  • this processing is that if the current frame image does not contain a graphic code, or due to shooting angle problems, all decoding methods cannot be successfully decoded, then the target frame decoding method of the current frame image may have only one or a small number of decoding methods. If this is the case, the decoding process for the current frame image will soon stop, and the decoding process for the next frame image can be entered, thereby avoiding wasting more time in one frame image, thereby increasing the speed of the entire scanning process.
  • this application further provides a client, and the client includes:
  • a storage unit configured to store decoding information, where the decoding information includes a decoding mode and interval information associated with the decoding mode, and the interval information is used to limit a frequency used in the decoding process by the associated decoding mode;
  • a current frame information determining unit configured to obtain a current frame image and determine current frame information of the current frame image
  • a target decoding mode determining unit configured to determine, based on the interval information and the current frame information, a target decoding mode of the current frame image adaptation in a decoding mode of the decoding information
  • a decoding unit configured to decode a graphics code included in the current frame image according to the target decoding mode.
  • the interval information includes the number of interval frames; accordingly, the current frame information determination unit includes:
  • the frame number recording module is configured to record the current frame number of the current frame image, and use the recorded current frame number as the current frame information.
  • the target decoding mode determination unit includes:
  • a frame number sequence determining module configured to determine a frame number sequence corresponding to the interval frame number, where the frame number sequence includes at least one frame number;
  • the frame number matching module is configured to determine whether the current frame number exists in the frame number sequence, and if so, determine a decoding mode associated with the interval frame number as a target decoding mode for the current frame image adaptation.
  • the interval information includes an interval time; accordingly, the current frame information determining unit includes:
  • the time node recording module is configured to record a current time node when acquiring the current frame image, and use the current time node as the current frame information.
  • the target decoding mode determination unit includes:
  • a time series determining module configured to determine a time series corresponding to the interval time, where the time series includes at least one time node
  • a time node matching module is configured to determine whether the current time node exists in the time series, and if it exists, determine a decoding method associated with the interval time as a target decoding method for the current frame image adaptation.
  • the current frame image is adapted to at least two target decoding modes, and the target decoding modes have a preset priority; accordingly, the decoding unit includes:
  • a sorting module configured to sort the at least two target decoding modes according to a preset priority, and sequentially decode the graphics code included in the current frame image according to the sorting result;
  • the decoding determination module is configured to stop the current decoding process if the decoding is successful; and to stop the decoding process for the current frame image when decoding fails according to the sorted results, and obtain the next frame image.
  • the present application further provides a client.
  • the client includes a processor and a memory.
  • the memory is used to store a computer program.
  • the computer program is executed by the processor, the foregoing graphics can be implemented. Code decoding method.
  • the memory may include a physical device for storing information, and generally the information is digitized and then stored by using a medium such as electricity, magnetism, or optics.
  • the memory according to this embodiment may further include: a device that stores information by using electric energy, such as RAM, ROM, etc .; a device that stores information by using magnetic energy, such as hard disk, floppy disk, magnetic tape, magnetic core memory, magnetic bubble memory, U disk ; Devices that store information optically, such as CDs or DVDs.
  • a device that stores information by using electric energy such as RAM, ROM, etc .
  • magnetic energy such as hard disk, floppy disk, magnetic tape, magnetic core memory, magnetic bubble memory, U disk
  • Devices that store information optically such as CDs or DVDs.
  • quantum memory graphene memory, and so on.
  • the processor may be implemented in any suitable manner.
  • the processor may take, for example, a microprocessor or processor and a computer-readable medium, logic gate, switch, dedicated integration storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor.
  • Circuit Application Specific Integrated Circuit, ASIC
  • programmable logic controller and embedded microcontroller form, etc.
  • the interval information may be, for example, the number of interval frames or the interval time.
  • the interval frame number can be used to limit a certain decoding method to only attempt to decode one frame image among consecutive multi-frame images.
  • Interval time can be used to limit a certain decoding method to only one time node to try to decode in a period of time. In this way, after the current frame image is acquired, the current frame information corresponding to the image can be determined.
  • the current frame information may be the current frame number of the current frame image, or a current time node when the current frame image is obtained.
  • one or more target decoding modes suitable for the current frame image are determined. Then, it can try to decode the current frame image through the determined target decoding mode. It can be seen from the above that in the technical solution provided by this application, various decoding methods are not tried for each frame of image, but a part of the decoding methods are selectively selected according to the interval information to try to decode, thereby reducing the number of decoding attempts Time, thereby increasing the speed of code scanning.
  • a programmable logic device Programmable Logic Device (PLD)
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog2 Verilog2.
  • a client in addition to implementing the client in pure computer-readable program code, it is entirely possible to make the client use logic gates, switches, application specific integrated circuits, programmable logic controllers, and Microcontrollers and the like to achieve the same function. Therefore, such a client can be regarded as a hardware component, and a device included in the client for implementing various functions can also be regarded as a structure within the hardware component. Or even, the means for implementing various functions may be regarded as a structure that can be both a software module implementing the method and a hardware component.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • the present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network.
  • program modules may be located in local and remote computer storage media, including storage devices.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种图形码的解码方法及客户端,其中,所述方法提供有解码信息,所述解码信息中包括解码方式以及所述解码方式关联的间隔信息,所述间隔信息用于限定关联的解码方式在解码过程中使用的频率;所述方法包括:获取当前帧图像,并确定所述当前帧图像对应的当前帧信息(S1);根据所述间隔信息和所述当前帧信息,在所述解码信息的解码方式中确定所述当前帧图像适配的目标解码方式(S3);按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码(S5)。所述方法能够提高图形码的解码速度。

Description

一种图形码的解码方法及客户端 技术领域
本申请涉及互联网技术领域,特别涉及一种图形码的解码方法及客户端。
背景技术
随着编码技术的不断发展,目前已经能够将丰富的信息转换为图形码。该图形码例如可以包括条形码、一维码、二维码等。用户通过具备扫码功能的终端设备或者软件,可以对图形码进行解码,从而识别出图形码中包含的信息。
图形码的编码方式多种多样。以二维码为例,可以具备PDF417、QR Code、Code 49、Code 16K、Data Matrix等多种编码方式。那么在对图形码进行解码时,也需要使用对应的解码方式才能成功解析出图形码中的信息。目前,在对图形码解码的过程中,通常会预先确定多个可能会使用到的解码方式,然后针对同一帧图像,会依次使用这些解码方式尝试解码,一旦解码成功,便可以得到解码信息。然而,如果当前帧图像中不存在图形码,或者图形码不够清晰,会在当前帧图像中耗费较多的时间去逐一尝试各种解码方式,从而导致扫码过程比较缓慢。
发明内容
本申请实施方式的目的是提供一种图形码的解码方式,能够提高图形码的解码速度。
为实现上述目的,本申请实施方式提供一种图形码的解码方法,提供有解码信息,所述解码信息中包括解码方式以及所述解码方式关联的间隔信息,所述间隔信息用于限定关联的解码方式在解码过程中使用的频率;所述方法包括:获取当前帧图像,并确定所述当前帧图像对应的当前帧信息;根据所述间隔信息和所述当前帧信息,在所述解码信息的解码方式中确定所述当前帧图像适配的目标解码方式;按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码。
为实现上述目的,本申请实施方式还提供一种客户端,所述客户端包括:存储单元,用于存储解码信息,所述解码信息中包括解码方式以及所述解码方式关联的间隔信息,所述间隔信息用于限定关联的解码方式在解码过程中使用的频率;当前帧信息确定单元,用于获取当前帧图像,并确定所述当前帧图像的当前帧信息;目标解码方式确定单元, 用于根据所述间隔信息和所述当前帧信息,在所述解码信息的解码方式中确定所述当前帧图像适配的目标解码方式;解码单元,用于按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码。
为实现上述目的,本申请实施方式还提供一种客户端,所述客户端包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的方法。
由上可见,本申请提供的技术方案,可以预先在解码信息中为各个解码方式设置关联的间隔信息。该间隔信息例如可以是间隔帧数或者间隔时间。其中,间隔帧数可以用于限定某个解码方式仅针对连续的多帧图像中的一帧图像尝试解码。间隔时间可以用于限定某个解码方式仅在一段时间内的一个时间节点尝试解码。这样,当获取到当前帧图像之后,可以确定该图像对应的当前帧信息。该当前帧信息可以是当前帧图像的当前帧数,或者是获取该当前帧图像时的当前时间节点。这样,通过比对当前帧信息表征的帧数/时间节点和解码信息中的间隔信息表征的间隔帧数/间隔时间节点,从而确定适配于当前帧图像的一个或者多个目标解码方式。然后,可以通过确定的目标解码方式尝试对当前帧图像进行解码。由上可见,在本申请提供的技术方案中,并不会针对每一帧图像均尝试各种解码方式,而是按照间隔信息,有选择地选用一部分解码方式尝试解码,从而可以减少尝试解码的时间,进而提高扫码的速度。
附图说明
为了更清楚地说明本申请实施方式或现有技术中的技术方案,下面将对实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施方式中图形码的解码方法流程图;
图2为本申请实施方式中间隔帧数的示意图;
图3为本申请实施方式中客户端的功能模块示意图;
图4为本申请实施方式中客户端的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施方式中的附图,对本申请实施方式中的技术方案进行清楚、完整地描述,显然,所描述的实施方式仅仅是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都应当属于本申请保护的范围。
本申请提供一种图形码的解码方法,所述方法可以应用于具备扫码功能的终端设备或者软件中。上述的终端设备例如可以是智能手机、平板电脑、个人数字助手、智能可穿戴设备等电子设备。
在本实施方式中,可以针对扫码过程预先设置解码信息,所述解码信息中可以包括解码方式以及所述解码方式关联的间隔信息。其中,所述解码方式可以与图形码的编码方式相对应。例如,常用的图形码的编码方式为PDF417、QR Code、Code 49、Code 16K以及Data Matrix,那么上述例举的各个编码方式对应的解码方式便可以是解码信息中包含的解码方式。
由于在实际应用时,不同的解码方式使用的频率往往不同。例如,对于二维码而言,应用比较广泛的解码方式可以为QR Code对应的解码方式,而Data Matrix对应的解码方式应用的范围可能较小。鉴于此,在本实施方式中,可以针对解码方式在实际应用中出现的频率,来设置各个解码方式关联的间隔信息。与解码方式关联的间隔信息,可以用于限定该解码方式在解码过程中被使用的频率。在实际应用中,该间隔信息可以是间隔帧数或者间隔时间。其中,间隔帧数可以用于限定解码方式仅针对连续的多帧图像中的一帧图像尝试解码。间隔时间可以用于限定解码方式仅在一段时间内的一个时间节点尝试解码。举例来说,若所述间隔帧数为5,则表示与该间隔帧数关联的解码方式会针对每5帧图像中的一帧图像尝试解码。又例如,若所述间隔时间为25毫秒,则表示与该间隔时间关联的解码方式在扫码过程中每隔25毫秒会尝试一次解码。由此可见,若所述间隔信息表征的数值越大,则表示关联的解码方式被使用的频率越低;反之,若所述间隔信息表征的数值越小,则表示关联的解码方式被使用的频率越高。
在本实施方式中,当设置了解码方式以及关联的间隔信息之后,从而可以生成解码过程中所需的解码信息。该解码信息可以存储于服务器中。该服务器可以是提供扫码服务的软件对应的业务服务器。这样,终端设备可以从服务器中获取该解码信息,后续可 以按照该解码信息中设置的解码方式以及间隔信息进行解码。此外,该解码信息还可以直接集成于提供扫码服务的软件中。例如,该解码信息可以作为软件的一部分,压缩于软件的安装包中。当终端设备安装该软件时,便可以从安装包中解压出解码信息。这样,终端设备便可以将解码信息存储于安装包指定的路径下,后续可以按照该解码信息中设置的解码方式以及间隔信息进行解码。
请参阅图1,所述图形码的解码方法可以包括以下步骤。
S1:获取当前帧图像,并确定所述当前帧图像对应的当前帧信息。
在本实施方式中,当需要进行扫码操作时,可以开启终端设备上的摄像头,然后通过该摄像头拍摄包含图形码的图像。在实际应用中,摄像头在开启过程中,可以按照固定的时间间隔,持续采集各帧图像。例如,摄像头可以每秒钟采集25帧图像。
在本实施方式中,针对摄像头采集的当前帧图像,可以识别其中包含的图形码,并将图形码携带的信息解码出来。具体地,在获取到当前帧图像之后,可以确定该当前帧图像对应的当前帧信息。
在实际应用中,该当前帧信息的类型可以与解码信息中间隔信息的类型保持一致。例如,解码信息中的间隔信息为间隔帧数。那么,在确定所述当前帧图像对应的当前帧信息时,可以记录所述当前帧图像的当前帧数,并将记录的所述当前帧数作为所述当前帧信息。其中,所述当前帧数可以是针对本次扫码过程统计的。在本次扫码中,摄像头采集到的第一帧图像的帧数可以为1,后续图像的帧数可以逐个递加。此外,如果解码信息中的间隔信息为间隔时间,那么在确定所述当前帧图像对应的当前帧信息时,可以记录获取所述当前帧图像时的当前时间节点,并将所述当前时间节点作为所述当前帧信息。其中,所述当前时间节点可以是按照本次扫码的时间来记录。具体地,本次扫码刚开始时,时间可以从0开始统计,随着扫码过程的不断推进,统计的时间也可以逐渐累加。例如,所述当前帧图像是在本次扫码过程的第50毫秒获取的,那么所述当前时间节点便可以是50毫秒。此外,所述当前时间节点还可以按照终端设备实际的系统时间来记录。例如,获取所述当前帧图像时,终端设备的系统时间为17点25分20秒,那么所述当前时间节点便可以是17点25分20秒。当然,在实际应用中,系统时间的精度可以精确到毫秒级别,从而可以区分相邻的多帧图像的时间节点。
S3:根据所述间隔信息和所述当前帧信息,在所述解码信息的解码方式中确定所述当前帧图像适配的目标解码方式。
在本实施方式中,在获取到所述当前帧信息之后,可以将所述当前帧信息与所述间隔信息进行匹配,以确定目前应该采用哪些解码方式对当前帧图像尝试解码。具体地,若所述间隔信息为间隔帧数,那么可以确定所述间隔帧数对应的帧数序列,所述帧数序列中包括至少一个帧数。该帧数序列中包含的帧数,可以是所述间隔帧数的倍数。例如,所述间隔帧数为5,那么帧数序列中包含的帧数可以是5、10、15等等。当然,在实际应用中,由间隔帧数确定帧数序列可以有多种方式,而且帧数序列中的帧数也可以不是所述间隔帧数的倍数。例如,可以是所述间隔帧数的倍数加上一个固定数值。本申请对基于间隔帧数构建帧数序列的方式并不做限定。
在本实施方式中,当终端设备获取到与所述帧数序列中包含的帧数相符的图像时,便可以调用与该间隔帧数关联的解码方式对获取的图像尝试解码。那么,在基于所述间隔帧数确定出帧数序列之后,可以判断所述当前帧数是否存在于所述帧数序列中,若存在,则可以将所述间隔帧数关联的解码方式确定为所述当前帧图像适配的目标解码方式。后续可以利用该目标解码方式尝试对当前帧图像进行解码。
在实际应用中,针对不同的解码方式,均可以关联对应的间隔帧数。请参阅图2,在一个应用示例中,假设当前有三种解码方式,这三种解码方式关联的间隔帧数分别为1、2以及4。图2中的矩形框为各帧图像,填充阴影的矩形框则可以表示需要调用对应的解码方式尝试解码的图像。如图2所示,针对第一种解码方式,每一帧图像均需要调用该解码方式尝试解码;针对第二种解码方式,每2帧图像中,需要有一帧图像调用该解码方式尝试解码;针对第三种解码方式,每4帧图像中,需要有一帧图像调用该解码方式尝试解码。这样,在获取的各帧图像中,有些图像可能需要利用多种解码方式尝试解码,而有些图像则可能只需要采用一种解码方式尝试解码。
在本实施方式中,若所述间隔信息为间隔时间,那么也可以确定所述间隔时间对应的时间序列,所述时间序列中包括至少一个时间节点。例如,所述间隔时间为25毫秒,那么所述时间序列中的时间节点可以是25毫秒、50毫秒、75毫秒等等。其中,若在所述时间序列中的时间节点处获取了图像,则可以调用所述间隔时间关联的解码方式对获取的图像尝试解码。这样,在确定所述间隔时间对应的时间序列后,可以判断所述当前时间节点是否存在于所述时间序列中,若存在,则可以将所述间隔时间关联的解码方式确定为所述当前帧图像适配的目标解码方式。
S5:按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码。
在本实施方式中,当确定出所述当前帧图像适配的目标解码方式后,便可以按照所 述目标解码方式尝试对当前帧图像中包含的图形码进行解码。若解码成功,则可以得到图形码中包含的信息,从而可以结束本次的扫码过程。若解码失败,则可以停止对所述当前帧图像中包含的图形码进行解码,并获取下一帧图像。针对下一帧图像,同样可以按照步骤S1和S3中的描述,确定与该下一帧图像适配的解码方式,从而利用适配的解码方式尝试对下一帧图像进行解码。如果针对下一帧图像依然解码失败,则可以继续获取后续的图像,直至解码成功或者解码超时为止。
在一个实施方式中,所述当前帧图像可能会与至少两个目标解码方式相适配。例如,在图2中,第2帧图像与第一种解码方式以及第二种解码方式相适配,第4帧图像则与三种解码方式均适配。在这种情况下,在按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码时,可以在所述至少两个目标解码方式中确定当前的目标解码方式。具体地,可以随机在所述至少两个目标解码方式中确定当前的目标解码方式,也可以将间隔信息限定的被使用频率最高的目标解码方式作为当前的目标解码方式。然后,可以按照所述当前的目标解码方式对所述当前帧图像中包含的图形码进行解码。若解码成功,则可以得到图形码中包含的信息,从而可以直接停止本次的解码过程。如果当前的目标解码方式解码失败,则可以在所述至少两个目标解码方式中确定与所述当前的目标解码方式不同的目标解码方式,并按照确定的所述目标解码方式对所述当前帧图像中包含的图形码进行解码。当然,在实际应用中,为了不重复使用同一种解码方式对当前帧多次尝试解码,在当前的目标解码方式解码失败后,在后续选择新的目标解码方式时,可以不再选取已经解码失败的目标解码方式。由此可见,当存在多个适配的目标解码方式时,可以利用这多个目标解码方式依次尝试解码,一旦解码成功,便可以停止本次的解码过程;若当前的目标解码方式解码失败,则可以换另一个目标解码方式尝试解码。若适配的多个目标解码方式均解码失败,则可以放弃对当前帧图像进行解码的过程,进而获取下一帧图像,并针对下一帧图像利用步骤S1至S5中描述的方式重新解码。
在一个实施方式中,应用于扫码过程中的各个解码方式可以预先设定优先级。其中,该优先级可以按照解码方式的使用率来设定。使用率越高,解码方式的优先级便可以越高。具体地,可以统计指定数量的图形码中,各个解码方式出现的次数,然后按照统计的次数来设置各个解码方式的优先级。此外,还可以根据设定的间隔信息来设定解码方式的优先级。间隔信息限定的数值越小,对应的优先级可以越高。
在本实施方式中,当所述当前帧图像与至少两个目标解码方式相适配时,可以按照预设优先级对所述至少两个目标解码方式排序。在实际应用中,为了尽快完成解码过程, 可以按照优先级从高到低的顺序对多个目标解码方式进行排序。然后,可以按照排序结果依次对所述当前帧图像中包含的图形码进行解码。具体地,可以优先采用优先级较高的目标解码方式尝试解码。若解码成功,则可以得到图形码中包含的信息,便可以停止本次的解码过程。若当前选用的目标解码方式解码失败,则可以选用优先级低一些的目标解码方式尝试解码。若按照排序结果均解码失败,则可以停止针对所述当前帧图像的解码过程,进而获取下一帧图像,并针对下一帧图像利用步骤S1至S5中描述的方式重新解码。
由上可见,按照本申请提供的技术方案,并非针对每一帧图像都需要利用全部的解码方式尝试解码,而是根据解码方式的使用率,为解码方式设定间隔信息。其中,使用率越高的解码方式,间隔信息限定的数值可以越小。例如,针对QR Code的解码方式,可以在每一帧图像中均尝试解码。而针对Data Matrix的解码方式,可以在每10帧图像中的一帧图像上尝试解码。这样处理的目的在于,如果当前帧图像中不包含图形码,或者由于拍摄角度问题,所有的解码方式都不能成功解码,那么由于当前帧图像适配的目标解码方式可能只有一种或者少量的几种,那么会很快停止针对当前帧图像的解码过程,并且可以进入下一帧图像的解码过程,从而可以避免在一帧图像中浪费较多时间,进而提高了整个扫码过程的速度。
请参阅图3,本申请还提供一种客户端,所述客户端包括:
存储单元,用于存储解码信息,所述解码信息中包括解码方式以及所述解码方式关联的间隔信息,所述间隔信息用于限定关联的解码方式在解码过程中使用的频率;
当前帧信息确定单元,用于获取当前帧图像,并确定所述当前帧图像的当前帧信息;
目标解码方式确定单元,用于根据所述间隔信息和所述当前帧信息,在所述解码信息的解码方式中确定所述当前帧图像适配的目标解码方式;
解码单元,用于按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码。
在一个实施方式中,所述间隔信息包含间隔帧数;相应地,所述当前帧信息确定单元包括:
帧数记录模块,用于记录所述当前帧图像的当前帧数,并将记录的所述当前帧数作为所述当前帧信息。
在一个实施方式中,所述目标解码方式确定单元包括:
帧数序列确定模块,用于确定所述间隔帧数对应的帧数序列,所述帧数序列中包括至少一个帧数;
帧数匹配模块,用于判断所述当前帧数是否存在于所述帧数序列中,若存在,将所述间隔帧数关联的解码方式确定为所述当前帧图像适配的目标解码方式。
在一个实施方式中,所述间隔信息包含间隔时间;相应地,所述当前帧信息确定单元包括:
时间节点记录模块,用于记录获取所述当前帧图像时的当前时间节点,并将所述当前时间节点作为所述当前帧信息。
在一个实施方式中,所述目标解码方式确定单元包括:
时间序列确定模块,用于确定所述间隔时间对应的时间序列,所述时间序列中包括至少一个时间节点;
时间节点匹配模块,用于判断所述当前时间节点是否存在于所述时间序列中,若存在,将所述间隔时间关联的解码方式确定为所述当前帧图像适配的目标解码方式。
在一个实施方式中,所述当前帧图像与至少两个目标解码方式相适配,并且所述目标解码方式具备预设优先级;相应地,所述解码单元包括:
排序模块,用于按照预设优先级对所述至少两个目标解码方式排序,并按照排序结果依次对所述当前帧图像中包含的图形码进行解码;
解码判定模块,用于在解码成功的情况下,停止本次的解码过程;在按照排序结果均解码失败的情况下,停止针对所述当前帧图像的解码过程,并获取下一帧图像。
请参阅图4,本申请还提供一种客户端,所述客户端包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,可以实现上述的图形码的解码方法。
在本实施方式中,所述存储器可以包括用于存储信息的物理装置,通常是将信息数字化后再以利用电、磁或者光学等方法的媒体加以存储。本实施方式所述的存储器又可以包括:利用电能方式存储信息的装置,如RAM、ROM等;利用磁能方式存储信息的装置,如硬盘、软盘、磁带、磁芯存储器、磁泡存储器、U盘;利用光学方式存储信息的装置,如CD或DVD。当然,还有其他方式的存储器,例如量子存储器、石墨烯存储器等等。
在本实施方式中,所述处理器可以按任何适当的方式实现。例如,所述处理器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式等等。
本说明书实施方式提供的客户端,其存储器和处理器实现的具体功能,可以与本说明书中的前述实施方式相对照解释,并能够达到前述实施方式的技术效果,这里便不再赘述。
由上可见,本申请提供的技术方案,可以预先在解码信息中为各个解码方式设置关联的间隔信息。该间隔信息例如可以是间隔帧数或者间隔时间。其中,间隔帧数可以用于限定某个解码方式仅针对连续的多帧图像中的一帧图像尝试解码。间隔时间可以用于限定某个解码方式仅在一段时间内的一个时间节点尝试解码。这样,当获取到当前帧图像之后,可以确定该图像对应的当前帧信息。该当前帧信息可以是当前帧图像的当前帧数,或者是获取该当前帧图像时的当前时间节点。这样,通过比对当前帧信息表征的帧数/时间节点和解码信息中的间隔信息表征的间隔帧数/间隔时间节点,从而确定适配于当前帧图像的一个或者多个目标解码方式。然后,可以通过确定的目标解码方式尝试对当前帧图像进行解码。由上可见,在本申请提供的技术方案中,并不会针对每一帧图像均尝试各种解码方式,而是按照间隔信息,有选择地选用一部分解码方式尝试解码,从而可以减少尝试解码的时间,进而提高扫码的速度。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也 并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog2。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
本领域技术人员也知道,除了以纯计算机可读程序代码方式实现客户端以外,完全可以通过将方法步骤进行逻辑编程来使得客户端以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种客户端可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施方式或者实施方式的某些部分所述的方法。
本说明书中的各个实施方式均采用递进的方式描述,各个实施方式之间相同相似的部分互相参见即可,每个实施方式重点说明的都是与其他实施方式的不同之处。尤其,针对客户端的实施方式来说,均可以参照前述方法的实施方式的介绍对照解释。
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
虽然通过实施方式描绘了本申请,本领域普通技术人员知道,本申请有许多变形和变化而不脱离本申请的精神,希望所附的权利要求包括这些变形和变化而不脱离本申请的精神。

Claims (15)

  1. 一种图形码的解码方法,其特征在于,提供有解码信息,所述解码信息中包括解码方式以及所述解码方式关联的间隔信息,所述间隔信息用于限定关联的解码方式在解码过程中使用的频率;所述方法包括:
    获取当前帧图像,并确定所述当前帧图像对应的当前帧信息;
    根据所述间隔信息和所述当前帧信息,在所述解码信息的解码方式中确定所述当前帧图像适配的目标解码方式;
    按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码。
  2. 根据权利要求1所述的方法,其特征在于,所述间隔信息包含间隔帧数;相应地,确定所述当前帧图像对应的当前帧信息包括:
    记录所述当前帧图像的当前帧数,并将记录的所述当前帧数作为所述当前帧信息。
  3. 根据权利要求2所述的方法,其特征在于,在所述解码信息的解码方式中确定所述当前帧图像适配的目标解码方式包括:
    确定所述间隔帧数对应的帧数序列,所述帧数序列中包括至少一个帧数;
    判断所述当前帧数是否存在于所述帧数序列中,若存在,将所述间隔帧数关联的解码方式确定为所述当前帧图像适配的目标解码方式。
  4. 根据权利要求1所述的方法,其特征在于,所述间隔信息包含间隔时间;相应地,确定所述当前帧图像对应的当前帧信息包括:
    记录获取所述当前帧图像时的当前时间节点,并将所述当前时间节点作为所述当前帧信息。
  5. 根据权利要求4所述的方法,其特征在于,在所述解码信息的解码方式中确定所述当前帧图像适配的目标解码方式包括:
    确定所述间隔时间对应的时间序列,所述时间序列中包括至少一个时间节点;
    判断所述当前时间节点是否存在于所述时间序列中,若存在,将所述间隔时间关联的解码方式确定为所述当前帧图像适配的目标解码方式。
  6. 根据权利要求1所述的方法,其特征在于,若按照所述目标解码方式解码失败,所述方法还包括:
    停止对所述当前帧图像中包含的图形码进行解码,并获取下一帧图像。
  7. 根据权利要求1所述的方法,其特征在于,若所述当前帧图像与至少两个目标解码方式相适配,按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码包括:
    在所述至少两个目标解码方式中确定当前的目标解码方式,并按照所述当前的目标 解码方式对所述当前帧图像中包含的图形码进行解码;
    若解码成功,停止本次的解码过程;
    若解码失败,在所述至少两个目标解码方式中确定与所述当前的目标解码方式不同的目标解码方式,并按照确定的所述目标解码方式对所述当前帧图像中包含的图形码进行解码。
  8. 根据权利要求1所述的方法,其特征在于,所述当前帧图像与至少两个目标解码方式相适配,并且所述目标解码方式具备预设优先级;相应地,按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码包括:
    按照预设优先级对所述至少两个目标解码方式排序,并按照排序结果依次对所述当前帧图像中包含的图形码进行解码;
    若解码成功,停止本次的解码过程;
    若按照排序结果均解码失败,停止针对所述当前帧图像的解码过程,并获取下一帧图像。
  9. 一种客户端,其特征在于,所述客户端包括:
    存储单元,用于存储解码信息,所述解码信息中包括解码方式以及所述解码方式关联的间隔信息,所述间隔信息用于限定关联的解码方式在解码过程中使用的频率;
    当前帧信息确定单元,用于获取当前帧图像,并确定所述当前帧图像的当前帧信息;
    目标解码方式确定单元,用于根据所述间隔信息和所述当前帧信息,在所述解码信息的解码方式中确定所述当前帧图像适配的目标解码方式;
    解码单元,用于按照所述目标解码方式对所述当前帧图像中包含的图形码进行解码。
  10. 根据权利要求9所述的客户端,其特征在于,所述间隔信息包含间隔帧数;相应地,所述当前帧信息确定单元包括:
    帧数记录模块,用于记录所述当前帧图像的当前帧数,并将记录的所述当前帧数作为所述当前帧信息。
  11. 根据权利要求10所述的客户端,其特征在于,所述目标解码方式确定单元包括:
    帧数序列确定模块,用于确定所述间隔帧数对应的帧数序列,所述帧数序列中包括至少一个帧数;
    帧数匹配模块,用于判断所述当前帧数是否存在于所述帧数序列中,若存在,将所述间隔帧数关联的解码方式确定为所述当前帧图像适配的目标解码方式。
  12. 根据权利要求9所述的客户端,其特征在于,所述间隔信息包含间隔时间;相应地,所述当前帧信息确定单元包括:
    时间节点记录模块,用于记录获取所述当前帧图像时的当前时间节点,并将所述当前时间节点作为所述当前帧信息。
  13. 根据权利要求12所述的客户端,其特征在于,所述目标解码方式确定单元包括:
    时间序列确定模块,用于确定所述间隔时间对应的时间序列,所述时间序列中包括至少一个时间节点;
    时间节点匹配模块,用于判断所述当前时间节点是否存在于所述时间序列中,若存在,将所述间隔时间关联的解码方式确定为所述当前帧图像适配的目标解码方式。
  14. 根据权利要求9所述的客户端,其特征在于,所述当前帧图像与至少两个目标解码方式相适配,并且所述目标解码方式具备预设优先级;相应地,所述解码单元包括:
    排序模块,用于按照预设优先级对所述至少两个目标解码方式排序,并按照排序结果依次对所述当前帧图像中包含的图形码进行解码;
    解码判定模块,用于在解码成功的情况下,停止本次的解码过程;在按照排序结果均解码失败的情况下,停止针对所述当前帧图像的解码过程,并获取下一帧图像。
  15. 一种客户端,其特征在于,所述客户端包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至8中任一所述的方法。
PCT/CN2019/077134 2018-06-07 2019-03-06 一种图形码的解码方法及客户端 WO2019233144A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810580159.3 2018-06-07
CN201810580159.3A CN108960384B (zh) 2018-06-07 2018-06-07 一种图形码的解码方法及客户端

Publications (1)

Publication Number Publication Date
WO2019233144A1 true WO2019233144A1 (zh) 2019-12-12

Family

ID=64494038

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077134 WO2019233144A1 (zh) 2018-06-07 2019-03-06 一种图形码的解码方法及客户端

Country Status (3)

Country Link
CN (1) CN108960384B (zh)
TW (1) TWI759583B (zh)
WO (1) WO2019233144A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108960384B (zh) * 2018-06-07 2020-04-28 阿里巴巴集团控股有限公司 一种图形码的解码方法及客户端
CN113935352A (zh) * 2020-06-29 2022-01-14 比亚迪股份有限公司 乘车二维码的扫描解码方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1913641A (zh) * 2005-04-15 2007-02-14 索尼株式会社 程序、解码装置、解码方法以及记录介质
CN104811722A (zh) * 2015-04-16 2015-07-29 华为技术有限公司 一种视频数据的编解码方法及装置
CN107908998A (zh) * 2017-11-28 2018-04-13 百富计算机技术(深圳)有限公司 二维码解码方法、装置、终端设备及计算机可读存储介质
CN108960384A (zh) * 2018-06-07 2018-12-07 阿里巴巴集团控股有限公司 一种图形码的解码方法及客户端

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100479331C (zh) * 2004-03-30 2009-04-15 深圳市朗科科技股份有限公司 条码的解码方法
JP2006238363A (ja) * 2005-02-28 2006-09-07 Nippon Telegr & Teleph Corp <Ntt> 無線タグシステム、無線タグ、および質問機
CN105117759B (zh) * 2015-09-08 2019-02-15 北京意锐新创科技有限公司 动态二维码生成和读取方法、装置
CN111291584B (zh) * 2016-07-22 2023-05-02 创新先进技术有限公司 识别二维码位置的方法及其系统
CN107301366B (zh) * 2017-05-12 2020-07-31 赵毅 一种嵌码视频中图形码的解码方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1913641A (zh) * 2005-04-15 2007-02-14 索尼株式会社 程序、解码装置、解码方法以及记录介质
CN104811722A (zh) * 2015-04-16 2015-07-29 华为技术有限公司 一种视频数据的编解码方法及装置
CN107908998A (zh) * 2017-11-28 2018-04-13 百富计算机技术(深圳)有限公司 二维码解码方法、装置、终端设备及计算机可读存储介质
CN108960384A (zh) * 2018-06-07 2018-12-07 阿里巴巴集团控股有限公司 一种图形码的解码方法及客户端

Also Published As

Publication number Publication date
CN108960384B (zh) 2020-04-28
TW202001667A (zh) 2020-01-01
TWI759583B (zh) 2022-04-01
CN108960384A (zh) 2018-12-07

Similar Documents

Publication Publication Date Title
CN111010590A (zh) 一种视频裁剪方法及装置
CN108491897B (zh) 一种信息识别方法、服务器、客户端及系统
WO2019034039A1 (zh) 一种目标图形码识别方法和装置
CN108830266B (zh) 一种图像识别的方法、装置及设备
WO2019233144A1 (zh) 一种图形码的解码方法及客户端
CN110895503B (zh) 一种应用的性能监控方法及客户端
CN111027507A (zh) 基于视频数据识别的训练数据集生成方法及装置
CN108537085A (zh) 一种扫码图像识别方法、装置以及设备
CN112347512A (zh) 图像处理方法、装置、设备及存储介质
CN106973003A (zh) 群组消息通知方法、客户端、电子设备和服务器
CN115600157A (zh) 一种数据处理的方法、装置、存储介质及电子设备
WO2020119515A1 (zh) 一种视频转码方法及装置
CN111753328B (zh) 隐私数据的泄露风险检测方法及系统
CN109144600A (zh) 一种应用程序的运行方法、设备及计算机可读介质
CN116186330B (zh) 一种基于多模态学习的视频去重方法及装置
US8538160B2 (en) Electronic device and method for sorting pictures
CN112949642B (zh) 一种文字生成方法、装置、存储介质及电子设备
CN115171735A (zh) 一种语音活动检测方法、存储介质及电子设备
CN114740975A (zh) 目标内容的获取方法及相关设备
CN109325127B (zh) 一种风险识别方法和装置
CN113347110A (zh) 一种流量控制方法、装置、存储介质及设备
CN110502551A (zh) 数据读写方法、系统及架构组件
CN115688130B (zh) 数据处理方法、装置及设备
CN111461352B (zh) 模型训练、业务节点识别方法、装置及电子设备
CN115952271B (zh) 一种生成对话信息的方法、装置、存储介质及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19815909

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19815909

Country of ref document: EP

Kind code of ref document: A1