Method, acquisition method, device, equipment and medium for carrying two-dimensional code information
By synthesizing barcodes in video files, the problem that users cannot obtain the QR code information associated with the video files when obtaining video files is solved, and the effective transmission and acquisition of information is achieved.
Patent Information
- Application Number
- CN202211634610.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-12-19
AI Technical Summary
In the prior art, it is difficult to obtain the QR code information associated with the video file while the user acquires the video file.
By obtaining the grayscale value and position information of several pixel units associated with the QR code in the video file, a barcode is generated, and the barcode is synthesized into the image frame of the video file to form a target video file containing the barcode.
It is realized that users can obtain the QR code information associated with the video file when acquiring the video file, and solves the problem of difficulty in obtaining information in the prior art.
Smart Images

Figure CN116245123B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of two-dimensional codes, and particularly to a method for carrying two-dimensional code information, a method for obtaining the same, a device, a device and a computer-readable storage medium. Background Art
[0002] A two-dimensional code refers to a graphic that uses a specific geometric figure to be distributed in a plane (two-dimensional direction) according to a certain rule, is black and white, and records information of data symbols (each data symbol is called an identification point or a code point), and is generally displayed in the form of a static picture. For the information carried by the two-dimensional code, it can usually be recognized by scanning, photographing or taking a screenshot of the two-dimensional code.
[0003] The appearance of two-dimensional codes has brought great convenience to people's lives, and it can be used for information carrying and transmission in many scenarios.
[0004] For the scenario where a user obtains a video file, for example, receiving a video file for playing, shooting / generating a video file for uploading, etc., how to add a two-dimensional code associated with the video file, such as a two-dimensional code carrying product information in the video image, a two-dimensional code carrying video original creator information, a two-dimensional code carrying information for signing the video file, etc., to the video file so that the user can obtain the two-dimensional code associated with the video file while obtaining the video file, is a technical problem that urgently needs to be solved in the prior art. Summary of the Invention
[0005] To solve the problem in the prior art of how to enable a user to obtain a two-dimensional code associated with a video file while obtaining the video file, an embodiment of this application provides a method for carrying two-dimensional code information, a method for obtaining the same, a device, a device and a computer-readable storage medium.
[0006] One embodiment of this application provides a method for carrying two-dimensional code information, including: obtaining the gray values and position information of several pixel units of a two-dimensional code associated with a video file in the two-dimensional code; the number of the several pixel units is not less than the number of pixel units included in the two-dimensional code area corresponding to the error correction rate of the two-dimensional code; generating a bar code for carrying the gray values and the position information of a specified number of pixel units among the several pixel units according to the gray values and the position information of the several pixel units; and converting the video file into a target video file including the bar code by synthesizing the bar code into an image frame included in the video file.
[0007] One embodiment of the present application provides a method for obtaining two-dimensional code information, including: obtaining a barcode synthesized in an image frame included in a target video file; the barcode carrying the grayscale value and position information of pixel units of the two-dimensional code in the two-dimensional code; respectively identifying the grayscale value and position information of the pixel units in the two-dimensional code from each of the obtained barcodes; and arranging the pixel units with corresponding grayscale values according to the position information to obtain the two-dimensional code.
[0008] One embodiment of the present application provides a device for carrying two-dimensional code information, including: a two-dimensional code information acquisition module for obtaining the grayscale value and position information of each of a plurality of pixel units of a two-dimensional code associated with a video file in the two-dimensional code; the number of the plurality of pixel units being not less than the number of pixel units included in the two-dimensional code area corresponding to the error correction rate of the two-dimensional code; a barcode generation module for generating barcodes respectively for carrying the grayscale value and position information of a specified number of pixel units among the plurality of pixel units according to the grayscale value and the position information of each of the plurality of pixel units; and a video conversion module for converting the video file into a target video file including the barcode by synthesizing the barcode into an image frame included in the video file.
[0009] One embodiment of the present application provides a device for obtaining two-dimensional code information, characterized by including: a barcode acquisition module for obtaining a barcode synthesized in an image frame included in a target video file; the barcode carrying the grayscale value and position information of pixel units of the two-dimensional code in the two-dimensional code; a barcode identification module for respectively identifying the grayscale value and position information of the pixel units in the two-dimensional code from each of the obtained barcodes; and a two-dimensional code acquisition module for arranging the pixel units with corresponding grayscale values according to the position information to obtain the two-dimensional code.
[0010] One embodiment of the present application provides an electronic device, including: a memory and a processor, wherein the memory is used for storing a computer program; the processor is coupled to the memory and is used for executing the computer program stored in the memory to execute the method for carrying two-dimensional code information or the method for obtaining two-dimensional code information.
[0011] One embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for carrying two-dimensional code information or the method for obtaining two-dimensional code information is implemented.
[0012] At least one of the above technical solutions adopted in the embodiments of the present application can at least achieve the following beneficial effects:
[0013] By adopting the gray-scale values and position information of several pixel units of the two-dimensional code associated with the video file carried by the bar code, and synthesizing the bar code into the image frame of the video file to obtain a target video file containing the bar code, the target video file contains the information of the two-dimensional code associated with the video file. And due to the number of the several pixel units being not less than the number of pixel units contained in the two-dimensional code area corresponding to the error correction rate of the two-dimensional code, the two-dimensional code can be restored according to the bar code, thus providing a feasible solution that enables a user to obtain the two-dimensional code associated with the video file while obtaining the video file, and solving the problem in the prior art of how to enable a user to obtain the two-dimensional code associated with the video file while obtaining the video file. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0015] Figure 1 is a schematic diagram of an application scenario of a two-dimensional code information carrying device and a two-dimensional code information obtaining device according to some embodiments of the present application;
[0016] Figure 2 is an exemplary flowchart of a method for carrying two-dimensional code information according to some embodiments of the present application;
[0017] Figure 3 is an exemplary schematic diagram of a picture of an image frame synthesized with a bar code according to some embodiments of the present application;
[0018] Figure 4 is an exemplary flowchart of a method for synthesizing a bar code into an image frame according to some embodiments of the present application;
[0019] Figure 5 is another exemplary flowchart of a method for synthesizing a bar code into an image frame according to some embodiments of the present application;
[0020] Figure 6 is an exemplary flowchart of a method for obtaining two-dimensional code information according to some embodiments of the present application;
[0021] Figure 7 is an operating schematic diagram of an electronic device according to some embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments of this application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts fall within the scope of protection of this application.
[0023] As known to those of ordinary skill in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0024] The terms "first", "second", etc. in the specification, claims, and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinction adopted when describing objects with the same attributes in the embodiments of this application. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product, or device including a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these process, method, product, or device.
[0025] To solve the problem in the prior art of how to enable a user to obtain a two-dimensional code associated with a video file while obtaining the video file, the embodiments of this application provide a two-dimensional code information carrying solution and an obtaining solution.
[0026] Among them, the two-dimensional code information carrying solution includes a two-dimensional code information carrying method and a carrying device; the two-dimensional code information obtaining solution includes a two-dimensional code information obtaining method and an obtaining device.
[0027] Figure 1 is a schematic diagram of an application scenario of a two-dimensional code information carrying device and a two-dimensional code information obtaining device shown according to some embodiments of this application. As Figure 1 shown, the application scenario 100 may include a video file 110, a network 120, a two-dimensional code information carrying device 130, and a two-dimensional code information obtaining device 140.
[0028] The video file 110 can be used for various operations and / or processes in the application scenario 100. For example, it is transmitted based on the network 120. Another example is that it serves as a processing object of the two-dimensional code information carrying device 130 and / or the two-dimensional code information obtaining device 140.
[0029] The network 120 can connect the components of the application scenario 100 and / or connect the application scenario 100 with the external resource part. The network 120 enables communication between the components and with other parts outside the application scenario 100, facilitating the exchange of data and / or information. The network 120 can be a local area network, a wide area network, the Internet, etc., or a combination of multiple network structures.
[0030] The carrier device 130 of the two-dimensional code information (simply referred to as the carrier device 130) and the acquisition device 140 of the two-dimensional code information (simply referred to as the acquisition device 140) can process the video file 110. Exemplary processes include parsing, playing, transmitting, etc.
[0031] In this scenario diagram, only one carrier device and one acquisition device are drawn. In the actual scenario, there can be more carrier devices and / or acquisition devices.
[0032] Different carrier devices and / or acquisition devices can be located on different hardware devices, or can be partially or entirely located on the same hardware device.
[0033] The carrier device 130 and the acquisition device 140 can be used separately or in combination under the application scenario 100. For example, use the carrier device alone, or use the acquisition device alone. Another example is to use the carrier device and the acquisition device as a combination.
[0034] The application scenario 100 can include various scenarios that require processing of video files. For example, in scenarios such as video claims settlement and video survey in the insurance business, when it is necessary to identify whether a video file has been forged or tampered with, etc., the carrier device 130 can process the video file by implementing the methods and / or processes disclosed in this application to add a barcode for subsequent judgment of whether the video file has been tampered with to the video file; the acquisition device 140 can process the video file by implementing the methods and / or processes disclosed in this application to determine whether the video file has been forged or tampered with, etc. Another example is in scenarios such as playing and decoding the video, the acquisition device 140 can play, decode, etc. the video file by implementing the methods and / or processes disclosed in this application.
[0035] In the application scenario 100, the carrier device 130 can obtain the video file 110 through various methods. Exemplarily, the carrier device 130 can take a picture through the camera of the carrier device 130 to obtain the video file 110. The carrier device 130 can also download from a database in the application scenario 100 that is not shown or in the external resource part through the network 120 to obtain the video file 110. The carrier device 130 can also read the memory of the carrier device 130 to obtain the video file 110.
[0036] The obtaining device 140 can obtain the video file 110 through various methods. Exemplarily, the obtaining device 140 can obtain the video file 110 from the carrying device 130 through the network 120. The obtaining device 140 can also capture the carrying device 130 that plays the video file 110 and / or other obtaining devices 140 in the application scenario 100 by means of the camera of the obtaining device 140 to obtain the video file 110.
[0037] In the application scenario 100, the method for the carrying device 130 to obtain the video file 110 and the method for the obtaining device 140 to obtain the video file 110 can be combined in various arbitrary ways during use. For example, neither the carrying device 130 nor the obtaining device 140 uses the network 120, that is, the carrying device 130 captures through the camera of the carrying device 130 to obtain the video file 110; the obtaining device 140 captures the carrying device 130 that plays the video file 110 by means of the camera of the obtaining device 140 to obtain the video file 110. Another example is that both the carrying device 130 and the obtaining device 140 use the network 120, that is, the carrying device 130 downloads and obtains the video file 110 through the network 120; the obtaining device 140 obtains the video file 110 from the carrying device 130 through the network 120.
[0038] It should be noted that the application scenario 100 is provided only for illustrative purposes and is not intended to limit the scope of the present application. For those of ordinary skill in the art, various modifications or changes can be made according to the description of the present application. For example, the application scenario may also include a database. Another example is that the application scenario can be implemented on other devices to achieve similar or different functions. However, the changes and modifications will not deviate from the scope of the present application.
[0039] The present application provides a carrying device for two-dimensional code information, including:
[0040] A two-dimensional code information acquisition module, which can be used to acquire the grayscale values and position information of several pixel units of the two-dimensional code associated with the video file in the two-dimensional code respectively; the number of the several pixel units is not less than the number of pixel units included in the two-dimensional code area corresponding to the error correction rate of the two-dimensional code.
[0041] A barcode generation module, which can be used to generate barcodes respectively for carrying the grayscale values and the position information of a specified number of pixel units among the several pixel units according to the grayscale values and the position information of the several pixel units respectively.
[0042] A video conversion module, which can be used to convert the video file into a target video file containing barcodes by synthesizing the barcodes into the image frames included in the video file.
[0043] For more details about the QR code information acquisition module, barcode generation module, and video conversion module, please refer to Figures 2 - 5 and its related descriptions.
[0044] In an alternative embodiment, the video conversion module may specifically be configured to:
[0045] Determine the number of times of repeated deployment for the barcode according to the error correction rate of the QR code and / or the transmission packet loss rate of the network for transmitting the target video file;
[0046] Synthesize each of the barcodes into the image frames included in the video file according to the number of times of repeated deployment;
[0047] Wherein, the number of times of synthesizing each of the barcodes into the image frames included in the video file is equal to the number of times of repeated deployment.
[0048] In an alternative embodiment, the video conversion module may specifically be configured to:
[0049] For each of the barcodes, respectively perform:
[0050] Determine the average color value and average gray value of the pixels in the target area within the corresponding image frame to be synthesized with the barcode; the target area is the area in the corresponding image frame for displaying the barcode;
[0051] Adjust the graphic background color of the barcode according to the average color value, and adjust the gray value of the pixel units included in the barcode according to the average gray value, so as to obtain the adjusted barcode;
[0052] Synthesize the adjusted barcode into the corresponding image frame.
[0053] In an alternative embodiment, the video conversion module may specifically be configured to:
[0054] Synthesize the adjusted barcodes into the image frames sequentially included in the video file in the arrangement order of the pixel units corresponding to each of the barcodes in the QR code.
[0055] In an alternative embodiment, the video conversion module may specifically be configured to:
[0056] Synthesize the adjusted barcodes into the image frames sequentially included in the video file in the arrangement order and according to the synthesis rule that each image frame can synthesize at most one adjusted barcode.
[0057] It should be noted that the above description of the system and its modules is only for convenience of description and does not limit this application to the scope of the illustrated embodiments. It can be understood that for those skilled in the art, after understanding the principle of the system, various modules may be arbitrarily combined or a subsystem may be formed and connected to other modules without departing from this principle. For example, the QR code information acquisition module, the barcode generation module, and the video conversion module can be integrated into one module. Another example is that each module can share a storage device, or each module can have its own storage device respectively. Such variations are all within the protection scope of this application.
[0058] Figure 2 FIG. 4 is an exemplary flowchart of a method for carrying QR code information according to some embodiments of this application. In some embodiments, process 200 may be executed by a carrying device 130, which may be, for example, a mobile phone for shooting videos, a wearable device, or other devices, or may be software installed on the device for video shooting and processing. The embodiments of this application do not specifically limit what device the carrying device 130 is. As Figure 2 shown, process 200 may include the following steps:
[0059] Step 210, the carrying device 130 acquires the grayscale values and position information of each pixel unit of the QR code associated with the video file in the QR code.
[0060] In some embodiments, step 210 may be executed by a QR code information acquisition module.
[0061] The video file mentioned here may be obtained by the carrying device 130 itself through shooting, or may be obtained by the carrying device 130 - for example, it may be obtained from a server or a video shooting device. The embodiments of this application do not limit how the carrying device 130 obtains the video file.
[0062] To enable readers to clearly understand the method provided by the embodiments of this application, a typical scenario for obtaining a video file is introduced in the embodiments of this application: the scenario where a "claims evidence collector" uses their mobile phone to shoot a video of the situation of farmers' disasters.
[0063] In this scenario, the mobile phone is equivalent to the carrying device 130; the video file generated by the mobile phone through shooting the situation of farmers' disasters (such as encountering mudslides, or the death of breeding sows, etc.) is the video file obtained by the carrying device 130. This video file can be used as the basis for the policyholder to obtain insurance compensation.
[0064] In this scenario, to avoid insurance fraud situations - for example, using the same video file as the basis for claiming compensation corresponding to different insurance contracts and defrauding insurance multiple times; or splicing different video files into a new video file to obtain compensation corresponding to a certain insurance contract; etc. - in the embodiments of the present application, it can be considered to add the information of the two-dimensional code as the "signature information" of the video file to the video file obtained by the carrier device 130.
[0065] This two-dimensional code is the two-dimensional code associated with the video file. In this scenario, the information of this two-dimensional code, that is, the information carried by this two-dimensional code, may include: the policy number. Further, it may also include the shooting time, shooting location of the video file, and the identification of the claims evidence-taking personnel (such as name, ID number, work number, etc.). Since the policy number is unique, it can be foreseen that if the policy number is added to the video file, the video file can also be made unique. Based on such uniqueness, if the video file is subsequently used repeatedly as the basis for claiming compensation, it can be distinguished and identified. In addition, adding the identification of the claims personnel can facilitate the positioning of which claims personnel shot the video file when manual participation is required to distinguish the uniqueness of the video file.
[0066] In an alternative implementation manner, the policy number and the identification of the claims evidence-taking personnel can be input by the claims evidence-taking personnel into the carrier device 130 (as described above, it can be a mobile phone). The shooting time and shooting location can be automatically obtained by the carrier device 130 - for example, obtaining the system time of the carrier device 130 when shooting the video file as the shooting time; obtaining the GPS coordinates obtained by the Global Positioning System (GPS) module of the carrier device 130 when shooting the video file as the shooting location.
[0067] Of course, in other scenarios, the information carried by the two-dimensional code associated with the video file may also include, for example, the name of the video file, the information of the items included in the video file, etc. The embodiments of the present application do not limit what information the two-dimensional code can specifically carry and how it is associated with the video file.
[0068] In the embodiments of the present application, after obtaining the information carried by the two-dimensional code, the two-dimensional code can be generated according to this information. The generated two-dimensional code is composed of several black and white dots (small squares). The pixel unit of the two-dimensional code described in the embodiments of the present application is this small square.
[0069] The pixel units in the two-dimensional code each have their own grayscale value, and the value range is [0, 255]. Generally, the pixel units of the two-dimensional code may only have two grayscale values: 0 or 255. Among them, for the pixel units with a grayscale value of 0, the color observed by the human eye is black; while for the pixel units with a grayscale value of 255, the color is white.
[0070] In addition to having their own grayscale values, the pixel units in the two-dimensional code also have position information. In some embodiments, the carrying device can establish an image coordinate system in the two-dimensional code and determine the coordinates of each pixel unit in the image coordinate system as the position information of the pixel unit in the two-dimensional code. In some embodiments, the carrying device can number the pixel units according to the position information of the units, so that the numbers of the respective pixel units can be used as the position information of the pixel units in the two-dimensional code. For the purpose of illustration, hereinafter, it will be described by taking the position information of the pixel units in the two-dimensional code as the number as an example.
[0071] Step 220: Generate barcodes respectively for carrying the grayscale values and position information of each pixel unit according to the grayscale values and position information of each pixel unit.
[0072] In some embodiments, step 220 can be executed by a barcode generation module.
[0073] Still taking the aforementioned case of avoiding insurance fraud as an example, in the embodiments of the present application, it is considered that:
[0074] 1. The entire two-dimensional code cannot be directly exposed to the picture of a single frame image of the video file, so as to prevent the personnel engaged in insurance fraud from easily obtaining the complete information carried by the two-dimensional code, thus facilitating their "forgery";
[0075] 2. Although the entire two-dimensional code cannot be directly exposed to the picture of a single frame image of the video file, starting from the need of the insurance company to verify the two-dimensional code as the "signature information" of the video file, some feasible ways are still needed to add the information carried by the two-dimensional code to the video file.
[0076] Due to the above considerations, in the embodiments of the present application, by executing step 220, the information carried by the two-dimensional code is dispersed in units of "pixel units". Specifically, barcodes respectively for carrying the grayscale values and position information of each pixel unit are generated according to the grayscale values and position information of each pixel unit. Furthermore, by executing the subsequent step 230, the dispersion of the information carried by the two-dimensional code is realized, but at the same time, the information of the two-dimensional code can be completely or relatively completely added to the video file.
[0077] It should be noted that when using a bar code to carry the gray value and position information of a pixel unit of a two-dimensional code, one bar code can carry the gray value and position information of one pixel unit, or one bar code can also carry, for example, the gray values and position information of two or several pixel units. Generally, however, one bar code carries the gray value and position information of less than a specified number of pixel units.
[0078] The specified number is generally not greater than the number of pixel units required to completely restore the two-dimensional code, so as to meet the requirement that "the entire two-dimensional code cannot be directly exposed to the picture of a single-frame image of a video file, so as to prevent personnel engaged in insurance fraud from easily obtaining the complete information carried by the two-dimensional code, thus facilitating their 'forgery'".
[0079] In the embodiments of the present application, the bar code may include but is not limited to at least one of a code map and other ways that can be interpreted by image recognition. Exemplary code maps may include but are not limited to Code 128 barcodes, Universal Product Code (UPC) barcodes, Quick Response (QR) codes, etc. Exemplary other ways that can be interpreted by image recognition may include but are not limited to text, numbers, custom codes, etc.
[0080] In some embodiments, the carrying device may generate two-dimensional codes respectively used to carry the gray value and position information of each pixel unit according to the gray value and position information of each pixel unit. For example, the carrying device may generate a two-dimensional code according to the gray value of a certain pixel unit being 255, the position information being 1, and the two-dimensional code generation rule, and this two-dimensional code carries the gray value and position information of this pixel unit.
[0081] Alternatively, in some embodiments, the carrying device may encode according to the gray value and position information of each pixel unit based on a preset bar code encoding rule, and generate bar codes respectively used to carry the gray value and position information of each pixel unit based on the encoding result. For example, the gray value of a certain pixel unit is 0, the position information is 22, and the preset encoding rule is to combine the gray value and position information and then encode the combined result. Then, the carrying device can combine the gray value and position information to obtain the string 022, and further encode this string into a one-dimensional code, and this one-dimensional code carries the gray value and position information of this pixel unit. Among them, the preset encoding rule can be set in advance.
[0082] In some embodiments, the specification of the bar code is smaller than that of the two-dimensional code described in step 210. For example, if the specification of the two-dimensional code is 3 cm * 3 cm, the specification of the bar code can be 2 cm * 2 cm, 1 cm * 1 cm, etc. In some embodiments, the bar code only includes a one-dimensional code. With such a setting, using a one-dimensional code to carry the gray value and position information, compared with using a two-dimensional code to carry the gray value and position information, the one-dimensional code can be read and parsed more quickly, which can improve the running speed of the system. At the same time, using a bar code with a smaller specification can reduce the area occupied by the bar code in the image frame when synthesizing the bar code into the image frame included in the video file, and avoid excessive occlusion of the video image by the bar code.
[0083] Step 230: Convert the video file into a target video file containing a bar code by synthesizing the bar code into the image frame included in the video file.
[0084] In some embodiments, step 230 can be executed by a video conversion module.
[0085] For example, for the multiple bar codes obtained in step 220, the carrying device can synthesize at least one bar code into one image frame. Generally, the image frame and the bar code can be synthesized in the way of "synthesizing one bar code into one image frame and synthesizing the bar code into the specified area of the image frame". As Figure 3 shown, it is a schematic diagram of the picture of an image frame with one bar code synthesized. It can be seen from this figure that the bar code is synthesized into the upper right corner area of the image frame.
[0086] In the embodiments of the present application, relevant mature technologies can be used to implement synthesizing the bar code into the image frame, so the synthesis process will not be elaborated here.
[0087] In the embodiments of the present application, after the bar code is synthesized into the image frame, when the target video file is played subsequently, the bar code synthesized into the image frame can be visually visible or visually invisible.
[0088] In some embodiments, the carrying device can synthesize each bar code into the video file according to a preset order and / or rule to obtain the target video file. For example, three bar codes are obtained in sequence through the above step 220. The carrying device can synthesize the first obtained bar code into the first image frame, the second obtained bar code into the second image frame, and the third obtained bar code into the third image frame. Among them, the preset order and / or rule can be set in advance.
[0089] By adopting the above solution provided by the embodiments of the present application, since several pixel units of the two-dimensional code associated with the video file are carried by the bar code, and the gray value and position information of the pixel units in the two-dimensional code are used, and the bar code is synthesized into the image frame of the video file to obtain a target video file containing the bar code, the target video file contains the information of the two-dimensional code associated with the video file. And because the number of the several pixel units is not less than the number of pixel units contained in the two-dimensional code area corresponding to the error correction rate of the two-dimensional code, the two-dimensional code can be restored according to the bar code, thus providing a feasible solution that enables users to obtain the two-dimensional code associated with the video file while obtaining the video file, and solves the problem in the prior art of how to enable users to obtain the two-dimensional code associated with the video file while obtaining the video file.
[0090] In some embodiments, the carrying device may synthesize each bar code into each image frame sequentially included in the video file according to the arrangement order of each pixel unit in the two-dimensional code, so as to obtain a target video file.
[0091] For example, taking a single bar code carrying the gray value and position information of a single pixel unit and synthesizing every 5 bar codes into one image frame as an example, if the two-dimensional code is composed of 100 pixel units, and the pixel units are arranged in the order of numbering from left to right, 10 pixel units in each row, and a total of 10 rows, with a total of 100 numbers, the carrying device may synthesize the 5 bar codes corresponding to the pixel units numbered 1 to 5 into one image frame in the order of numbers from 1 to 100, and synthesize the 5 bar codes corresponding to the pixel units numbered 6 to 10 into the next image frame, and so on. Finally, 100 bar codes are synthesized into 20 image frames of the video file to obtain the target video file.
[0092] By adopting the method of image synthesis for the bar code and the image frames sequentially included in the video file according to the arrangement order of the pixel units in the two-dimensional code, it is convenient to subsequently restore the two-dimensional code according to the bar code, and the sequentially arranged bar codes can be obtained from the image frames in sequence, and then the gray values and position information of the sequentially arranged pixel units can be parsed.
[0093] Since the sequentially parsed pixel units are already arranged in their correct arrangement order in the two-dimensional code, the pixel units can be sequentially arranged into the image of the two-dimensional code of the pixel units to be filled while obtaining the parsing results, which can ensure the processing efficiency and avoid the problem that if the bar codes are arranged in disorder, it will consume processing time and resources for bar code rearrangement and parsing, or the need to rearrange the parsed pixel units.
[0094] Of course, if the issue of ensuring processing efficiency is not considered, when synthesizing barcodes into an image frame, the barcodes can also be synthesized into the image frame in any order. Since the barcodes carry the grayscale values and position information of pixel units, the QR code can still be accurately restored based on the position information of the pixel units subsequently.
[0095] In some embodiments, the carrying device can synthesize each barcode into the image frames sequentially included in the video file according to the arrangement order and the synthesis rule that at most one barcode is synthesized into each image frame. Still taking the above example, the carrying device can synthesize 1 barcode corresponding to the pixel unit numbered 1 into one image frame, synthesize 1 barcode corresponding to the pixel unit numbered 2 into the next image frame, and synthesize 1 barcode corresponding to the pixel unit numbered 3 into the next image frame.
[0096] For more details on synthesizing each barcode into the image frames sequentially included in the video file according to the arrangement order and the synthesis rule, reference can be made to Figure 4 and its description.
[0097] It should be noted that QR codes usually have a certain error correction rate. The error correction rate of a QR code refers to the percentage of the area that can be blocked under the premise of normal recognition of the QR code in the total area of the QR code.
[0098] According to the concept of the error correction rate of the QR code, it can be known that:
[0099] 1) First, when restoring a QR code based on a barcode, the restored QR code may not be a complete QR code image, but may only include the QR code area corresponding to the error correction rate (equivalent to the QR code area of the unblocked part, hereinafter referred to as the unblocked area).
[0100] In this case, when restoring the QR code, it is not necessary to know the grayscale values and position information of all pixel units of the QR code, but only the grayscale values and position information of the corresponding number of pixel units in the unblocked area can be used to restore the QR code.
[0101] 2) Second, for a QR code with a relatively higher error correction rate, if it is dispersed into a video file in the form of a barcode as in the foregoing embodiments, then when restoring the QR code based on the barcode, the number of pixel units required is relatively less, that is, the number of barcodes required is less; conversely, for a QR code with a relatively lower error correction rate, the number of pixel units required to restore the QR code based on the barcode is relatively more, that is, the number of barcodes required is more.
[0102] In summary, in the embodiments of the present application, for the foregoing step 230, "converting the video file into a target video file containing barcodes by synthesizing barcodes into the image frames included in the video file", only the barcodes carrying the grayscale values and position information of the number of pixel units corresponding to the unobstructed area of the two-dimensional code can be synthesized into the video frames included in the video file.
[0103] For example, if the unobstructed area of the two-dimensional code is 3 / 4 of the two-dimensional code, and the two-dimensional code contains a total of 100 pixel units, and the grayscale value and position information of a single pixel unit are carried by a single barcode respectively, then when synthesizing the barcode and the video frame, only 100 * 3 / 4 = 75 barcodes can be synthesized into the video frame.
[0104] In one embodiment, if it is necessary to transmit the target video file, for example, transmit it to a device for recovering the two-dimensional code based on the target video file, then considering that the network for transmitting the target video file may have problems such as unstable network environment leading to frame loss, the method of "repeated deployment" of barcodes can be adopted to synthesize the barcodes into the video file multiple times. That is: synthesize the same barcode with different video frames in the video file, so that the same barcode appears repeatedly in the finally obtained target video file.
[0105] In this way, even if the network has a frame loss phenomenon resulting in the loss of a video frame synthesized with a barcode, then, since the barcode will also appear repeatedly in other video frames, thus, it can be ensured as much as possible that the barcode is successfully transmitted.
[0106] Taking into account that the two-dimensional code can have a certain error tolerance rate, and the situation of frame loss may occur when the network transmits the target video file, as Figure 4 shown, in some embodiments, the process 400 can be executed by the carrier device 130. As Figure 4 shown, the process 400 may include the following steps:
[0107] Step 410, determining the number of repeated deployments of the barcode according to the error tolerance rate of the two-dimensional code and / or the transmission frame loss rate of the network for transmitting the target video file.
[0108] In some embodiments, step 410 can be executed by the video conversion module.
[0109] The transmission frame loss rate of the network can be determined by a variety of feasible methods. For example, obtained based on manual input, based on test algorithms or test tools, etc.
[0110] In some embodiments, the carrying device may determine the number of repeated deployments for the barcodes through a rounding function according to the error correction rate of the QR code. For example, the calculation method of the number of repeated deployments N = ceil(1 / error correction rate) can be used to calculate the number of repeated deployments. Here, ceil represents rounding up.
[0111] According to the above calculation method of the number of repeated deployments, it can be known that: the higher the error correction rate of the QR code, the relatively fewer the number of pixel units required to restore the QR code from the barcodes, that is, the fewer the number of barcodes required, and thus the fewer the number of repeated deployments; on the contrary, the more the number of repeated deployments.
[0112] In some embodiments, the carrying device may query the pre-set corresponding relationship between the error correction rate and the number of repeated deployments according to the error correction rate of the QR code to determine the number of repeated deployments to be used. For example, if the corresponding numbers of repeated deployments for the four error correction rates L(7%), M(15%), Q(25%), H(30%) of the QR code are 8, 4, 2, 1 in sequence, the carrying device can obtain the corresponding number of repeated deployments as 2 by querying this corresponding relationship according to the error correction rate of the QR code being 25%.
[0113] Or, in some embodiments, the carrying device may determine the number of repeated deployments for the barcodes through a rounding function according to the transmission packet loss rate of the network. For example, the calculation method of the number of repeated deployments M = ceil(1 / (1 - transmission packet loss rate)) is used to calculate the number of repeated deployments.
[0114] In some embodiments, the carrying device may query the pre-set corresponding relationship between the packet loss rate and the number of repeated deployments according to the transmission packet loss rate of the network to determine the number of repeated deployments to be used. For example, if the corresponding numbers of repeated deployments for the transmission packet loss rates set for 0%-25%, 26%-50, 51%-75%, 76%-100% are 3, 6, 9, 12 in sequence, the carrying device can obtain the corresponding number of repeated deployments as 6 by querying this corresponding relationship according to the transmission packet loss rate being 29%.
[0115] In some embodiments, the carrying device may also determine the number of repeated deployments according to the error correction rate and the packet loss rate of the network.
[0116] In some embodiments, the carrying device may determine the number of repeated deployments according to the error correction rate of the QR code and the transmission packet loss rate of the network for transmitting the target video file. Specifically, the number of repeated deployments may be equal to: N + M.
[0117] In some embodiments, the carrying device may determine the larger number among N and M as the number of repeated deployments for the barcodes.
[0118] The carrying device can also determine the number of times of repeated deployment for the barcodes by other methods according to N and M. For example, calculate the weighted sum value of the two as the number of times of repeated deployment, or calculate the product of the two as the number of times of repeated deployment, etc.
[0119] Step 420: According to the number of times of repeated deployment, in the arrangement order of the pixel units of the two-dimensional code in the two-dimensional code (alternatively, it may not be in this arrangement order), and the synthesis rule that at most one barcode is synthesized in each image frame (alternatively, it may not be in this synthesis rule, for example, at least two barcodes can be synthesized in each image frame), sequentially synthesize each barcode into the image frames successively included in the video file.
[0120] In some embodiments, step 420 can be executed by the video conversion module.
[0121] In some embodiments, the number of times of sequentially synthesizing each barcode into the image frames successively included in the video file is equal to the number of times of repeated deployment.
[0122] In some embodiments, the carrying device can sequentially synthesize each barcode into the image frames successively included in the video file according to the number of times of repeated deployment, in the aforementioned arrangement order, and the aforementioned synthesis rule. For example, following the example in step 230 above, if it is assumed that the number of times of repeated deployment is 3, the carrying device can synthesize 1 barcode corresponding to the pixel unit numbered 1 into one image frame, synthesize 1 barcode corresponding to the pixel unit numbered 2 into the next image frame, until synthesizing 1 barcode corresponding to the pixel unit numbered 100 into one image frame, and repeat this process 3 times, so as to achieve repeated deployment of 100 barcodes 3 times in at least 300 image frames.
[0123] For more details about step 420, see Figure 5 and its description.
[0124] Through the methods in the above-mentioned some embodiments, it is possible to deploy barcodes to the image frames multiple times. In this way, even if frames are lost during the transmission of the target video file, it is highly probable that the device receiving the target file can subsequently obtain a sufficient number of barcodes to recover the two-dimensional code.
[0125] Figure 5 is another exemplary flowchart of the method for synthesizing barcodes into image frames according to some embodiments of the present application. In some embodiments, process 500 can be executed by the carrying device 130. In some embodiments, the carrying device can execute process 500 for each barcode. As Figure 5 shown, process 500 can include the following steps:
[0126] Step 510, determine the average color value and the average grayscale value of the pixels within the target area in the corresponding image frame to be synthesized with the barcode. In some embodiments, step 510 may be executed by a video conversion module.
[0127] The target area may refer to the area in the image frame for displaying the barcode. The carrying device may determine the target area based on a user's instruction or randomly select it.
[0128] In some embodiments, the carrying device may determine the average color value and the average grayscale value of the pixels within the target area in the corresponding image frame to be synthesized with the barcode through a color balance algorithm and an average grayscale algorithm. For example, determine the average color value of the pixels within the target area through the Gray World algorithm or an algorithm based on reference white, and determine the average grayscale value of the pixels within the target area through an average algorithm or an algorithm based on human eye perception.
[0129] In some embodiments, the carrying device may determine the average color value and the average grayscale value of the pixels within the target area in the corresponding image frame to be synthesized with the barcode by calling an API (Application Programming Interface) for calculating the average color value and the average grayscale value.
[0130] Step 520, adjust the graphic background color of the barcode according to the average color value, and adjust the grayscale value of the pixel units included in the barcode according to the average grayscale value to obtain the adjusted barcode. In some embodiments, step 520 may be executed by a video conversion module.
[0131] In some embodiments, the carrying device may adjust the graphic background color of the barcode according to the average color value, and adjust the grayscale value of the pixel units included in the barcode according to the average grayscale value to obtain the adjusted barcode. For example, the barcode is a 2 cm * 1 cm one-dimensional barcode, which includes a total of 20 * 10 pixel units. The average color value of the target area to display the barcode is 160, and the average grayscale value is 100. The carrying device may adjust the background color of the barcode to 160. For the black pixel units in the barcode, set the grayscale of the pixel unit to 120% of the average grayscale value, that is, the grayscale of the pixel unit is 120. For the white pixel units in the barcode, set the grayscale of the pixel unit to 80% of the average grayscale value, that is, the grayscale of the pixel unit is 80. After setting the 200 pixel units in this way, the adjusted barcode can be obtained. It should be noted that the percentages in the above example are only examples. As long as the range is reasonable, that is, the result calculated based on the percentage should be within 0 - 255, and the percentage that can distinguish the white and black pixel units should fall within the protection scope of this application.
[0132] Step 530: Synthesize the adjusted barcode into the corresponding image frame. In some embodiments, step 530 may be performed by a video conversion module.
[0133] In some embodiments, a carrying device may synthesize the adjusted barcode into the corresponding image frame. The synthesis method may refer to Figures 2 - 4 the relevant descriptions in
[0134] Through the methods in the above - mentioned some embodiments, the background color and grayscale value of the barcode can be adjusted according to the average color value and average grayscale value of the pixels in the target area, making the barcode closer to the color of the target area, reducing the interference to the picture of the image frame, and further optimizing the user's viewing experience.
[0135] This application also provides a device for obtaining two - dimensional code information, including: a barcode acquisition module that can be used to acquire the barcodes synthesized in the image frames included in a target video file; the barcodes carry the grayscale value and position information of the pixel units in the two - dimensional code; a barcode recognition module that can be used to respectively identify the grayscale value and position information of the pixel units in the two - dimensional code from each of the acquired barcodes; a two - dimensional code acquisition module that can be used to arrange the pixel units with the corresponding grayscale values according to the position information to obtain the two - dimensional code.
[0136] For more details about the barcode acquisition module, barcode recognition module, and two - dimensional code acquisition module, see Figure 5 and its relevant descriptions.
[0137] In an alternative embodiment, the barcode recognition module may specifically be used for:
[0138] If it is determined, according to the grayscale value and position information carried by the barcode, that the pixel units at the same position in the two - dimensional code have several different grayscale values; then,
[0139] Determine the grayscale value with the largest number among the grayscale values of the pixel units at the same position carried by the barcode as the grayscale value of the identified pixel units at the same position.
[0140] It should be noted that the above descriptions of the system and its modules are only for convenience of description and do not limit this application to the scope of the exemplified embodiments. It can be understood that for those skilled in the art, after understanding the principle of the system, they may, without departing from this principle, make any combination of the modules, or form a subsystem and connect it with other modules. For example, the barcode acquisition module, barcode recognition module, and two - dimensional code acquisition module can be integrated into one module. Also, for example, each module can share a storage device, or each module can have its own storage device respectively. Such variations are all within the protection scope of this application.
[0141] Figure 6 It is an exemplary flowchart of a method for obtaining two-dimensional code information shown in some embodiments of the present application.
[0142] In some embodiments, process 600 may be executed by obtaining device 140.
[0143] As Figure 6 shown, process 600 may include the following steps:
[0144] Step 610, obtain the barcodes synthesized in the image frames included in the target video file.
[0145] In some embodiments, step 610 may be executed by the barcode obtaining module.
[0146] The target video file may refer to a video file in which barcodes have been synthesized.
[0147] In some embodiments, the gray value and position information of the pixel units carrying the two-dimensional code in the barcodes synthesized in the image frames included in the target video file. One barcode may carry the gray value and position information of one pixel unit, or one barcode may also carry the gray values and position information of, for example, two or several pixel units. Generally, however, one barcode carries the gray values and position information of less than a specified number of pixel units. The specified number is generally not greater than the number of pixel units required to completely recover the two-dimensional code.
[0148] In some embodiments, the obtaining device may obtain the barcodes synthesized in the image frames included in the target video file by photographing the target video file played on other devices. For example, when the target video file is being played on other devices, the obtaining device may obtain at least one barcode by photographing each image frame of the target video file.
[0149] Step 620, respectively identify the gray value and position information of the pixel units in the two-dimensional code from the obtained barcodes. In some embodiments, step 620 may be executed by the barcode recognition module.
[0150] In some embodiments, the obtaining device may, by analyzing the barcodes, respectively identify the gray value and position information of the pixel units in the two-dimensional code from the obtained barcodes.
[0151] In some embodiments, the obtaining device may respectively identify the gray value and position information of the pixel units in the two-dimensional code from the obtained barcodes based on a preset decoding rule. For example, the obtaining device obtains "022" by identifying the one-dimensional code generated in step 220, and based on the preset decoding rule of "gray value position information", it is determined that the gray value of the pixel unit in the two-dimensional code is 0 and the position information is 22.
[0152] Step 630: Arrange the pixel units with corresponding gray values according to the position information to obtain a two-dimensional code. In some embodiments, step 630 may be executed by a two-dimensional code obtaining module.
[0153] In some embodiments, the obtaining device may arrange the pixel units with corresponding gray values according to the position information to obtain a two-dimensional code. For example, for the pixel unit with position information 1 and the pixel unit with position information 2, the obtaining device may place the pixel unit with position information 2 behind the pixel unit with position information 1. Another example is that for the pixel unit with position information (1, 1) and the pixel unit with position information (1, 2), the obtaining device may place the pixel unit with position information (1, 2) behind the pixel unit with position information (1, 1). By performing the above method on other pixel units, a two-dimensional code can be obtained.
[0154] Of course, if the obtaining device wants to completely recover the two-dimensional code, it needs to obtain the gray values and position information of the several pixel units. The number of the several pixel units is not less than the number of pixel units included in the two-dimensional code area corresponding to the error correction rate of the two-dimensional code to be recovered.
[0155] In some embodiments, as described above, the carrying device may synthesize each of the barcodes into the image frames included in the video file according to the number of repeated deployments. Therefore, the obtaining device may obtain multiple different gray values of the pixel units at the same position in the two-dimensional code.
[0156] Ideally, there should be only one gray value of the pixel unit at the same position in the two-dimensional code obtained by the obtaining device.
[0157] However, in an actual scenario, if the obtaining device obtains the barcode by shooting the target video file played on other devices, then due to the influence of the shooting environment light, the captured barcode may be distorted, and further, the gray values of the pixel units at the same position in the two-dimensional code obtained by parsing such a barcode may be different.
[0158] To solve the above problems, in an alternative embodiment, the acquisition device respectively identifies the grayscale value and position information of the pixel unit in the two-dimensional code from each of the acquired barcodes, including: if it is determined according to the grayscale value and position information carried by the barcode that the pixel units at the same position in the two-dimensional code have several different grayscale values in the two-dimensional code; then, the grayscale value with the largest number among the grayscale values of the pixel units at the same position carried by the barcode is determined as the grayscale value of the identified pixel unit at the same position. For example, if the pixel units at the same position in the two-dimensional code have 5 different grayscale values of 1, 0, 0, 1, 1 in the two-dimensional code, the acquisition device determines the grayscale value with the largest number, that is, 1, as the grayscale value of the pixel unit at the same position.
[0159] Through the above "minority obeys majority" method, it is possible to ensure as much as possible that the grayscale value with a higher occurrence probability is used as the grayscale value of the pixel unit, and avoid using the "noise" value with a lower occurrence probability as the grayscale value of the pixel unit, thereby ensuring the accuracy of the finally generated two-dimensional code.
[0160] Continuing with the example of the scenario where the "claims evidence collector" mentioned above uses their mobile phone to take a video of the farmer's disaster situation, if the acquisition device cannot successfully recover the two-dimensional code from the target video file, it can forward the target video file to the device of the staff for manual review of the video, so that the staff can further review the target video file to determine whether there is a possibility of insurance fraud in the target video file.
[0161] If the acquisition device can successfully recover the two-dimensional code from the target video file, then, after recovering the two-dimensional code, it can decode the two-dimensional code according to the preset two-dimensional code decoding rules to obtain the information carried by the two-dimensional code.
[0162] If it is assumed that the information parsed from the two-dimensional code contains a certain policy number, and the policy number matches the policy number of a certain policy to be compensated, it can be determined that the target video file passes the review, and then the target video file and the certain policy to be compensated are associated and stored for subsequent processes. Subsequent processes can be, for example, using an artificial intelligence algorithm to identify the scene type of the target video file and determine whether the scene type matches the insurance content of the policy, and so on.
[0163] If it is assumed that the information carried by the QR code parsed out contains a certain policy number, and this policy number does not match the policy number of the policy to be compensated; or, if the information carried by the QR code parsed out contains multiple policy numbers, then the target video file can also be forwarded to the device of the staff who conducts manual review of the video, so that the staff can further review the target video file to determine whether there is a possibility of insurance fraud in the target video file. Further, the acquisition device may also parse out from the QR code the shooting time, shooting location of the video file, and the identifier of the claims evidence-taking personnel (such as name, ID number, and job number), etc. These information can also be forwarded to the device of the staff as a reference basis for the staff to judge whether there is insurance fraud in the target video file.
[0164] By using the above method for acquiring QR code information provided by the embodiments of the present application, the QR code can be restored from the video file synthesized with the gray value and position information of the pixel unit carrying the QR code. In cooperation with the QR code carrying method introduced above, in the insurance claim settlement scenario based on the video file, it is possible to avoid directly exposing the entire QR code to the picture of a single frame image of the video file, so that it is easy for those who conduct insurance fraud to obtain the complete information carried by the QR code, facilitating their "forgery" problem.
[0165] Of course, the QR code information carrying solution and the QR code information acquisition solution provided by the embodiments of the present application are not limited to being applied to the above insurance claim settlement scenario, and can be extended to any scenario where QR code information needs to be synthesized into a video file.
[0166] The embodiments of the present application also provide an electronic device, including: a memory and a processor. Among them, the memory is used to store a computer program; the processor is coupled to the memory and is used to execute the computer program stored in the memory to execute the QR code information carrying method or the QR code information acquisition method.
[0167] To more clearly illustrate the operation of the electronic device for the method and / or process described in the present application, the following will be described in combination with Figure 7 For illustration. An exemplary insurance business scenario is as follows: The personnel of the insurance company go to the home of the claimant to take pictures and collect evidence of the materials and / or things related to the claim. Among them, the shooting device can generate a QR code based on the verification information input by the personnel of the insurance company. The shooting device can obtain a video file by shooting the materials and / or things related to the claim. The shooting device can perform Figures 2 - 5Through the processing described in [description], a target video file is obtained. The verification information may refer to the information used to verify the video file. For example, information related to the generation of the video file, such as time, date, location, etc. Another example is information related to the shooting of the video, such as the ID of the shooter, the work permit number, the ID of the shooting device, etc.
[0168] Figure 7 is a schematic diagram of the operation of an electronic device according to some embodiments of the present application. As Figure 7 shown, the figure includes a carrying device 710 and an acquisition device 720. Among them, the carrying device 710 can be equivalent to the shooting device in the above exemplary insurance business scenario. It should be noted that Figure 7 the carrying device 710 and the acquisition device 720 shown in [description] are only examples and do not constitute a limitation to the present application. The carrying device and the acquisition device can be located on the same device or on different devices; the number of the carrying device 710 and the acquisition device 720 is not limited to one. For example, Figure 7 it can include one carrying device 710 and multiple acquisition devices 720.
[0169] The carrying device 710 can acquire a video file 730 and a two-dimensional code 740. The acquisition method can refer to the relevant description above. In some embodiments, the carrying device 710 can acquire the grayscale value and position information of each pixel unit of the two-dimensional code associated with the video file in the two-dimensional code; according to the grayscale value and position information of each pixel unit, generate barcodes respectively used to carry the grayscale value and position information of each pixel unit. As Figure 7 shown, the carrying device 710 can generate a barcode 750 according to the Figures 2 - 4 relevant steps and / or processes described in [description]. Another example is as Figure 7 shown, the carrying device 710 can generate a barcode 760 according to the Figures 2 - 5 relevant steps and / or processes described in [description].
[0170] In some embodiments, the carrying device 710 can convert the video file into a target video file containing a barcode by synthesizing the barcode into the image frame included in the video file. As Figure 7 shown, the carrying device 710 can synthesize the barcode 750 or the barcode 760 into the image frame included in the video file 730 according to the Figures 2 - 5 relevant steps and / or processes described in [description] to obtain a target video file 770.
[0171] Still taking the above exemplary insurance business scenario as an example, after the personnel of the insurance company obtain the target video file through the shooting device, the insurance company needs to identify whether the target video file is forged or tampered with.
[0172] When the insurance company authenticates the target video file, the shooting device can be directly used to implement the following method. At this time, the shooting device is equivalent to both the carrying device and the acquisition device; alternatively, another device can be used to shoot the target video file played in the shooting device to implement the following method. At this time, the other device is equivalent to the acquisition device.
[0173] In some embodiments, the acquisition device 720 can acquire the barcodes synthesized in the image frames included in the target video file. As Figure 7 shown, the acquisition device 720 can obtain the barcode 780 based on the target video file 770 according to the relevant steps described in Figure 6 .
[0174] In some embodiments, the acquisition device 720 can respectively identify the gray value and position information of the pixel units in the two-dimensional code from each of the acquired barcodes; arrange the pixel units with the corresponding gray values according to the position information to obtain the two-dimensional code. As Figure 7 shown, the acquisition device 720 can obtain the two-dimensional code 790 based on the barcode 780 according to the relevant steps described in Figure 6 .
[0175] Still using the above exemplary insurance business scenario, after the acquisition device obtains the two-dimensional code 790, the insurance company can compare the two-dimensional code 740 and the two-dimensional code 790 to determine whether the information contained in the two two-dimensional codes is the same, or whether the difference in information is less than a preset threshold. Based on the judgment result being yes, the insurance company can settle the claim for the claimant; based on the judgment result being no, the insurance company can refuse to settle the claim for the claimant. Through the method in the above embodiments, phenomena such as insurance fraud can be prevented from occurring, thereby reducing the losses of the company and achieving accurate insurance claims settlement.
[0176] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it can implement the method for carrying two-dimensional code information or the method for acquiring two-dimensional code information.
[0177] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0178] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for carrying two-dimensional code information, characterized in that, Including: Obtaining the grayscale values and position information of respective pixel units of a QR code associated with a video file in the QR code; the number of the pixel units being not less than the number of pixel units included in the area of the QR code corresponding to the error correction rate of the QR code; Generating a bar code for carrying the grayscale values and the position information of a specified number of pixel units among the pixel units according to the grayscale values and the position information of the respective pixel units; the specified number being less than the number of pixel units required to completely recover the QR code; Converting the video file into a target video file including the bar code by means of synthesizing the bar code into an image frame included in the video file, so that a user can identify the grayscale values and the position information of the pixel units in the QR code while obtaining the target video file; and arranging the pixel units with corresponding grayscale values according to the position information to obtain the QR code associated with the video file; Wherein, converting the video file into a target video file including the bar code by means of synthesizing the bar code into an image frame included in the video file includes: Determining the number of times of repeated deployment of the bar code according to the error correction rate of the QR code and / or the transmission loss frame rate of a network for transmitting the target video file; Synthesizing each bar code into an image frame included in the video file according to the number of times of repeated deployment; Wherein, the number of times of synthesizing each bar code into an image frame included in the video file is equal to the number of times of repeated deployment; Wherein, synthesizing each bar code into an image frame of the video file in sequence includes: For each bar code, respectively performing: Determining the average color value and the average grayscale value of pixels in a target area in a corresponding image frame to be synthesized with the bar code; the target area being an area for displaying the bar code in the corresponding image frame; Adjusting the graphic background color of the bar code according to the average color value, and adjusting the grayscale values of pixel units included in the bar code according to the average grayscale value to obtain the adjusted bar code; Synthesizing the adjusted bar code into the corresponding image frame; Wherein, determining the number of times of repeated deployment of the bar code according to the error correction rate of the QR code and / or the transmission loss frame rate of a network for transmitting the target video file specifically includes any one of the following methods: Determining the number of times of repeated deployment of the bar code according to the error correction rate of the QR code by means of a rounding function according to the following calculation method: N = ceil(1 / error correction rate) Wherein, N represents the number of times of repeated deployment; ceil represents the rounding-up function; Determining the number of times of repeated deployment of the bar code according to the transmission loss frame rate of the network by means of a rounding function according to the following calculation method: M = ceil(1 / (1 - transmission loss frame rate)) Wherein, M represents the number of times of repeated deployment; ceil represents the rounding-up function; Determine the number of times of repeated deployment for the bar code according to the error correction rate of the two-dimensional code and the transmission packet loss rate of the network in the following calculation method: N + M where N is the number of times of repeated deployment for the bar code determined by the integer function according to the error correction rate of the two-dimensional code; M is the number of times of repeated deployment for the bar code determined by the integer function according to the transmission packet loss rate of the network.
2. The method according to claim 1, characterized in that, For each of the bar codes, perform the following respectively: synthesize the adjusted bar code into the corresponding image frame, including: Synthesize the adjusted bar codes into the image frames sequentially included in the video file in the arrangement order of the pixel units corresponding to each bar code in the two-dimensional code.
3. The method according to claim 2, characterized in that Synthesize the adjusted bar codes into the image frames sequentially included in the video file in the arrangement order of the pixel units corresponding to each bar code in the two-dimensional code, including: Synthesize the adjusted bar codes into the image frames sequentially included in the video file in the arrangement order and the synthesis rule that at most one adjusted bar code can be synthesized into each image frame.
4. A method for obtaining two-dimensional code information, characterized in that, Include: Obtain the bar codes synthesized in the image frames included in the target video file; the bar codes carry the gray values and position information of the pixel units of the two-dimensional code in the two-dimensional code; wherein, the target video file is the target video file obtained by the method for carrying two-dimensional code information according to any one of claims 1-3. Identify the gray values and position information of the pixel units of the two-dimensional code in the two-dimensional code from each of the obtained bar codes respectively. Arrange the pixel units with the corresponding gray values according to the position information to obtain the two-dimensional code.
5. The method according to claim 4, wherein Identify the gray values and position information of the pixel units of the two-dimensional code in the two-dimensional code from each of the obtained bar codes respectively, including: If it is determined according to the gray values and position information carried by the bar code that the pixel units at the same position in the two-dimensional code have several different gray values in the two-dimensional code; then, Determine the gray value with the largest number among the gray values of the pixel units at the same position carried by the bar code as the gray value of the pixel units at the identified same position.
6. A device for carrying two-dimensional code information, characterized in that, Include: A two-dimensional code information acquisition module, configured to acquire the gray values and position information of several pixel units of a two-dimensional code associated with a video file in the two-dimensional code respectively; the number of the several pixel units is not less than the number of pixel units included in the two-dimensional code area corresponding to the error correction rate of the two-dimensional code. A bar code generation module, which generates bar codes respectively used to carry the gray values and the position information of a specified number of pixel units among the several pixel units according to the gray values and the position information of the several pixel units respectively; the specified number is less than the number of pixel units required to completely restore the two-dimensional code. A video conversion module, which is used to convert the video file into a target video file containing the barcode by synthesizing the barcode into the image frames included in the video file, so that when the user obtains the target video file, the grayscale value and position information of the pixel unit in the two-dimensional code can be recognized; and arrange the pixel units with corresponding grayscale values according to the position information to obtain the two-dimensional code associated with the video file; Among them, the video conversion module specifically includes: A determination unit, which is used to determine the number of times of repeated deployment of the barcode according to the error correction rate of the two-dimensional code and / or the transmission loss frame rate of the network for transmitting the target video file; A synthesis unit, which is used to synthesize each barcode into the image frames included in the video file according to the number of times of repeated deployment; Among them, the number of times of synthesizing each barcode into the image frames included in the video file is equal to the number of times of repeated deployment; Among them, the synthesis unit specifically is used for: For each barcode, respectively execute: Determine the average color value and average grayscale value of the pixels in the target area within the corresponding image frame to be synthesized with the barcode; the target area is the area in the corresponding image frame for displaying the barcode; Adjust the graphic background color of the barcode according to the average color value, and adjust the grayscale value of the pixel units included in the barcode according to the average grayscale value to obtain the adjusted barcode; Synthesize the adjusted barcode into the corresponding image frame; Among them, the determination unit specifically is used to execute any one of the following methods: According to the error correction rate of the two-dimensional code, determine the number of times of repeated deployment of the barcode through a rounding function according to the following calculation method: N = ceil(1 / error correction rate) Among them, N represents the number of times of repeated deployment; ceil represents the rounding-up function; According to the transmission loss frame rate of the network, determine the number of times of repeated deployment of the barcode through a rounding function according to the following calculation method: M = ceil(1 / (1 - transmission loss frame rate)) Among them, M represents the number of times of repeated deployment; ceil represents the rounding-up function; According to the error correction rate of the two-dimensional code and the transmission loss frame rate of the network, determine the number of times of repeated deployment of the barcode according to the following calculation method: N + M Among them, N is the number of times of repeated deployment of the barcode determined through a rounding function according to the error correction rate of the two-dimensional code; M is the number of times of repeated deployment of the barcode determined through a rounding function according to the transmission loss frame rate of the network.
7. An apparatus for obtaining two-dimensional code information, characterized in that, It includes: A barcode acquisition module, which is used to acquire the barcodes synthesized in the image frames included in the target video file; the barcodes carry the grayscale value and position information of the pixel units in the two-dimensional code in the two-dimensional code; among them, the target video file is the target video file obtained according to the two-dimensional code information carrying device described in claim 6; A barcode recognition module, which is used to respectively recognize the grayscale value and position information of the pixel units in the two-dimensional code from each of the acquired barcodes; A QR code acquisition module, configured to arrange pixel units with corresponding grayscale values according to the position information to obtain the QR code.
8. A computing device, characterized in that, Comprising: A memory and a processor, wherein, The memory is configured to store a computer program; The processor is coupled to the memory and is configured to execute the computer program stored in the memory to perform the steps of the method according to any one of claims 1-3 or any one of claims 4-5.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1-3 or any one of claims 4-5 is implemented.
Citation Information
Patent Citations
QR code, and terminal using the same
KR1020190093183A