Graphic identification code correction method and device, medium and program product
By automatically correcting the graphic identification code and rematching after the scanning failure, the product entry or sales problems caused by the graphic identification code matching failure are solved, which improves processing efficiency and saves manual processing time.
Patent Information
- Application Number
- CN202411595490.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-04-04
AI Technical Summary
When scanning the graphic identification code, the product object and its information are often unable to be matched, resulting in the product being unable to be entered or sold, and employees need to solve it manually, affecting the processing efficiency.
A method for correcting a graphic identification code is provided, including receiving a scanned graphic identification code, correcting the graphic identification code according to the correction rules after the matching fails, obtaining the modified code, and matching again to obtain product information.
By automatically correcting the graphic identification code, it is possible to quickly match the target product object without manual input by users, improve processing efficiency and save manual processing time.
Smart Images

Figure CN119761391A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method for correcting a graphic identification code, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] When selling merchandise in offline stores such as shopping malls and supermarkets, merchandise is usually identified by scanning a barcode or other graphic identification code of the merchandise, and then entered and sold.
[0003] However, sometimes when scanning a graphic identification code, the product object and its product information cannot be matched, resulting in the inability to enter or sell the product object. In this case, employees are generally required to solve the problem manually. Taking the barcode as an example, if the product object cannot be matched, the employee is required to manually enter the barcode code, which affects processing efficiency. Summary of the invention
[0004] The embodiment of the present application provides a method for correcting a graphic identification code to improve processing efficiency.
[0005] Correspondingly, an embodiment of the present application also provides an electronic device, a computer-readable storage medium and a computer program product to ensure the implementation and application of the above system.
[0006] In order to solve the above problem, the embodiment of the present application discloses a method for correcting a graphic identification code, wherein the method comprises:
[0007] receiving a scanned first graphic identification code;
[0008] Using the first graphic identification code to match the target commodity object;
[0009] In the case where the first graphic identification code fails to match the target commodity object, the first graphic identification code is corrected according to the correction rule to obtain a corrected second graphic identification code;
[0010] Using the second graphic identification code to match the target commodity object, and obtaining commodity information of the target commodity object;
[0011] A scanning result is generated based on the commodity information of the target commodity object, and the scanning result is fed back.
[0012] Optionally, the graphic identification code includes a barcode, and the step of correcting the first graphic identification code according to a correction rule to obtain a corrected second graphic identification code includes:
[0013] Using the first barcode to match the commodity barcode of the commodity object;
[0014] When the commodity barcode of the designated commodity object is a substring of the first barcode, redundant codewords at the end of the barcode are deleted according to the commodity barcode of the designated commodity object to obtain the second barcode.
[0015] Optionally, the graphic identification code includes a barcode, and the step of correcting the first graphic identification code according to a correction rule to obtain a corrected second graphic identification code includes:
[0016] Determining a correction rule corresponding to the first barcode, the correction rule comprising: a deletion rule and an expansion rule;
[0017] Expanding the first barcode according to the expansion rule to determine a third barcode;
[0018] Deleting redundant codewords at the end of the barcode according to the deletion rule to determine a fourth barcode;
[0019] The third barcode and the fourth barcode are used to respectively identify the second barcode of the commodity object, and a matching second barcode is determined.
[0020] Optionally, it also includes: when more than one second barcode is matched, filtering the more than one second barcode according to a filtering condition, wherein the filtering condition includes at least one of the following: a codeword length filtering condition, a hit number filtering condition and a rule time filtering condition.
[0021] Optionally, also include:
[0022] The association relationship between the first graphic identification code and the second graphic identification code is recorded in a scanning failure record table, so as to update the correction rule based on the scanning failure record table.
[0023] Optionally, also include:
[0024] Acquire an association relationship from the scanning failure record table according to the second graphic identification code;
[0025] Analyze according to the deep learning algorithm to determine the difference characteristics between the second graphic identification code and the first graphic identification code;
[0026] A correction rule is generated based on the difference characteristics.
[0027] Optionally, the step of correcting the first graphic identification code according to a correction rule to obtain a corrected second graphic identification code includes:
[0028] Analyzing the first graphic identification code using the correction rule to determine a corresponding difference category;
[0029] The first graphic identification code is modified according to the difference category to obtain a modified second graphic identification code.
[0030] Optionally, the graphic identification code includes a two-dimensional code, and the step of correcting the first graphic identification code according to a correction rule to obtain a corrected second graphic identification code includes:
[0031] Input the scanned QR code image into the correction model and output the corrected QR code image;
[0032] The modified two-dimensional code image is identified to obtain a modified second graphic identification code.
[0033] The embodiment of the present application also discloses an electronic device, which includes: a processor, and a memory communicatively connected to the processor;
[0034] The memory stores computer-executable instructions;
[0035] The processor executes the computer-executable instructions stored in the memory to implement the method described in the embodiment of the present application.
[0036] The embodiment of the present application further discloses a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the embodiment of the present application.
[0037] The embodiment of the present application further discloses a computer program product, including a computer program / computer executable instructions, wherein the computer program / computer executable instructions, when executed by a processor in an electronic device, implement the method described in the embodiment of the present application.
[0038] Compared with the prior art, the embodiments of the present application have the following advantages:
[0039] In an embodiment of the present application, a scanned first graphic identification code is received, and the first graphic identification code is used to match the product information. If the first graphic identification code fails to match the product information, the first graphic identification code is corrected according to a correction rule to obtain a corrected second graphic identification code, so that the graphic identification code can be automatically corrected according to the correction rule, and then the second graphic identification code is used to match the product information to obtain the product information of the target product object, without the need for manual input by the user, thereby improving processing efficiency and saving manual processing time. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flowchart of a method for correcting a graphic identification code according to an embodiment of the present application;
[0041] Figure 2It is a flowchart of the steps of an embodiment of a method for generating a correction rule of the present application;
[0042] Figure 3 is a flowchart of another embodiment of a method for correcting a graphic identification code of the present application;
[0043] Figure 4 is a flowchart of a barcode correction method embodiment of the present application;
[0044] Figure 5 is a flowchart of another barcode correction method embodiment of the present application;
[0045] Figure 6 It is a flowchart of a step of an embodiment of a method for correcting a two-dimensional code of the present application;
[0046] Figure 7 It is a schematic diagram of the structure of an exemplary device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0048] The embodiments of the present application can be applied to various scenarios such as scanning, entering, and selling commodity objects. In offline stores such as shopping malls and supermarkets, when entering or purchasing commodity objects, the target commodity object is determined by scanning the graphic identification code of the commodity object. If the scanned first graphic identification code fails to match the commodity information, the first graphic identification code is corrected according to the correction rule to obtain a corrected second graphic identification code, which is then matched with the commodity information of the target commodity object to improve processing efficiency.
[0049] Taking offline sales of goods as an example, currently in shopping malls, supermarkets and other stores, customers (called first users) are provided with self-service checkout equipment, which can reduce labor costs while reducing the first user's queues, thereby improving processing efficiency. If the first user cannot match the target product object when scanning the graphic identification code using the self-service checkout device, it is necessary to find a store staff member (called the second user), and the second user activates the authority to manually input the information. This process will result in a long checkout time and cause problems such as user dissatisfaction. Through the method for correcting the graphic identification code of the embodiment of the present application, if the first graphic identification code fails to match the target product object, the first graphic identification code can be automatically corrected according to the correction rules to obtain a corrected second graphic identification code, so that the target product object can be quickly matched without the first user noticing, and the user's checkout process can be completed, thereby improving processing efficiency.
[0050] Reference Figure 1, shows a step flow chart of an embodiment of a method for correcting a graphic identification code of the present application.
[0051] Step 102: Receive a scanned first graphic identification code.
[0052] In the embodiment of the present application, the graphic identification code refers to an identification code that represents information through graphic information, such as a barcode, a QR code, etc.
[0053] When a commodity object is recorded or sold, the first graphic identification code on the commodity object may be scanned by a scanning device, such as a barcode or a QR code on the commodity object, to receive the scanned first graphic identification code.
[0054] Take barcode as an example, a barcode is a one-dimensional code, which arranges multiple black bars and spaces of different widths according to certain coding rules. By scanning the barcode, the corresponding identification code can be obtained, and the identification code obtained by scanning the barcode is usually composed of numbers, letters or a combination thereof.
[0055] Take the QR code as an example. The QR code uses a certain geometric figure to record data symbol information in black and white distributed in a plane (two-dimensional direction) according to a certain rule. By scanning the QR code, you can get its corresponding identification code. The identification code obtained by scanning the QR code is usually composed of letters, numbers, Chinese characters, characters, katakana or a combination of one or more of them.
[0056] Step 104: Use the first graphic identification code to match the target product object.
[0057] On the basis of scanning the first graphic identification code, the scanned first graphic identification code is used to match the product database to determine the matched target product object. If the product object is matched, it is used as the target product object, and the product information of the target product object is further obtained. If the product object is not matched, it is determined that the matching fails.
[0058] Step 106: When the first graphic identification code fails to match the target product object, the first graphic identification code is corrected according to a correction rule to obtain a corrected second graphic identification code.
[0059] If the first graphic identification code fails to match the target product object, that is, the product object is not matched, there is a problem with the scanned first graphic identification code. A correction rule can be obtained and the first graphic identification code can be corrected according to the correction rule to obtain a corrected second graphic identification code.
[0060] In the embodiment of the present application, the correction rule is a rule for correcting an erroneous graphic identification code, and the correction rule can be obtained by summarizing the causes of the errors in the graphic identification code and analyzing the correction method. In an optional embodiment, the correction rule generation method is obtained by the following steps: Figure 2 As shown:
[0061] Step 202: Acquire an association relationship from the scan failure record table according to the second graphic identification code.
[0062] In an embodiment of the present application, a scanning failure record table can be constructed. Each time the first graphic identification code obtained by scanning fails to match the target product object and the corresponding second graphic identification code is obtained, the association between the first graphic identification code and the second graphic identification code is recorded in the scanning failure record table, so that each record in the scanning failure record table records a first graphic identification code and a second graphic identification code, and the second graphic identification code is a graphic identification code that can be successfully matched to the product object.
[0063] In some embodiments, if the scanned first graphic identification code fails to match the target product object, the graphic identification code on the target product object can be manually input as the second graphic identification code. For example, some newly entered product objects have not yet formed correction rules, and their automatic matching with the second graphic identification code fails; for example, the correction rule is automatically recorded in the system before it is generated. An association relationship between the first graphic identification code and the second graphic identification code can be established and added to a scanning failure record table. Among them, an association can be established based on the time between the two behaviors of scanning failure and successful entry. After a failed scanning behavior, the graphic identification code corresponding to the successful behavior that is successfully entered for the first time within the time interval is used as the second graphic identification code, and the graphic identification code corresponding to the failed behavior is used as the first graphic identification code, and an association relationship between the first graphic identification code and the second graphic identification code is established.
[0064] In some other embodiments, if the scanned first graphic identification code fails to match the target product object, the second graphic identification code is automatically corrected based on the correction rule, and an association relationship between the first graphic identification code and the second graphic identification code is established and added to the scanning failure record table.
[0065] A correction rule is generated for each commodity object based on the scanning failure record table, the graphic identification code of the commodity object is used as the second graphic identification code, and the record in the scanning failure record table is queried to obtain the association relationship including the second graphic identification code.
[0066] Step 204: Analyze according to the deep learning algorithm to determine the difference characteristics between the second graphic identification code and the first graphic identification code.
[0067] A first graphic identification code and a second graphic identification code are obtained from the association relationship, the first graphic identification code and the second graphic identification code are input into a deep learning algorithm, and the difference characteristics of the two graphic identification codes are analyzed by the deep learning algorithm as output results.
[0068] The deep learning algorithm can be trained by using a machine learning algorithm, a neural network algorithm, a deep neural network algorithm, etc. The deep learning algorithm can extract the features of the first graphic identification code and the second graphic identification code respectively, and then analyze the difference between the two features based on the extracted features.
[0069] Step 206: Generate correction rules based on the difference features.
[0070] The difference features are analyzed to generate corresponding correction rules. In the embodiment of the present application, the difference features can be classified, and corresponding correction rules can be generated based on the classification results of each difference category.
[0071] For example, the difference categories include character quantity categories, such as a multi-character class and a small-character class. For the multi-character class, the correction rule may be a deletion rule for deleting redundant characters. For the small-character class, the correction rule may be an expansion rule for filling in missing characters, etc.
[0072] For example, some QR codes may be distorted due to problems such as light, resulting in problems with the first graphic identification code. In this case, the QR code can be corrected by regressing to the QR code. Therefore, for the QR code, the first graphic identification code includes the identification code and / or the QR code obtained through QR code recognition. The corresponding difference categories include image feature differences, such as distortion and deformation obtained by image recognition, and the corresponding correction rules generated include rules for correcting the image.
[0073] After the correction rule is generated in the above manner, if the scanned first graphic identification code fails to match the target product object, the first graphic identification code can be corrected according to the correction rule to obtain a corrected second graphic identification code. The first graphic identification code is analyzed according to the modification rule to determine the corresponding difference category; the first graphic identification code is corrected according to the difference category to obtain a corrected second graphic identification code.
[0074] The first graphic identification code is analyzed according to multiple modification rules. For example, if the first graphic identification code identified by the detection is a substring of the graphic identification code of a certain commodity object, the first barcode is expanded according to the expansion rule to determine the third barcode; if the first graphic identification code identified by the detection is a mother string of the graphic identification code of a certain commodity object, the redundant codewords at the end of the barcode are deleted according to the deletion rule to determine the fourth barcode. Wherein, if a string A is a part of another string B, then the string B is the mother string of the string A, and the string A is the substring of the string B. By matching the first graphic identification code with the barcode of a known commodity object, after matching the corresponding substring or mother string, the first graphic identification code is adjusted based on the deletion rule or the expansion rule to obtain a matched graphic identification code. In the case of matching more than one graphic identification code, the more than one graphic identification code is filtered according to the filtering condition, wherein the filtering condition includes at least one of the following: codeword length filtering condition, hit number filtering condition and rule time filtering condition.
[0075] Among them, the codeword length filtering condition refers to the condition for filtering according to the length of the matched second graphic identification code. For example, the longer the graphic identification code, the higher the priority. According to the codeword length filtering condition, the graphic identification code with the longest length is selected as the second graphic identification code of the target product object.
[0076] The hit count screening condition refers to a condition for screening according to the number of times a graphic identification code is selected, and the number of times selected refers to the number of times the second graphic identification code is selected as the target commodity object. For example, the greater the number of times a graphic identification code is selected, the higher the priority of the graphic identification code is, and the graphic identification code with the largest number of times selected is screened according to the hit count screening condition as the second graphic identification code of the target commodity object.
[0077] The rule time screening condition refers to the condition for screening according to the generation time of the corresponding correction rule. For example, the later the generation time of the correction rule is, the higher the priority of the graphic identification code obtained by the correction is. Then, according to the rule time screening condition, the graphic identification code corresponding to the correction rule with the latest generation time is screened as the second graphic identification code of the target commodity object.
[0078] In some other embodiments, the deletion rule may also be referred to as a substring correction rule, where the scanned barcode is the parent string of a certain product barcode, and the product barcode of a certain product is the substring of the scanned barcode, such as the scanned barcode is 11122233, and the product barcode is 111222. The substring correction rule is to modify the parent string to be the same as the substring, that is, to delete the redundant codewords at the end of the barcode according to the product barcode of the designated product object, and to use the scanned barcode as the second barcode, and to delete the last two characters, that is, to correct the product barcode to 111222.
[0079] Taking the QR code as an example, if the identification code matched by the QR code is wrong or does not match the identification code due to reasons such as light, the QR code is corrected according to the correction rules. For example, a correction model is trained based on the erroneous QR code and the correct QR code, so that the QR code can be automatically corrected by inputting it into the correction model, and then recognition is performed based on the corrected QR code to obtain a second graphic identification code.
[0080] The scanned graphic identification code can be corrected in the above manner to obtain a corrected second graphic identification code, and the commodity object can be matched again.
[0081] Step 108: Use the second graphic identification code to match the target product object and obtain product information of the target product object.
[0082] The modified second graphic identification code is used to match the commodity object database, determine the matching target commodity object, and obtain commodity information of the target commodity object, such as the category, brand, name, price, material and other information of the commodity object.
[0083] Step 110: Generate a scan result based on the product information of the target product object, and feed back the scan result.
[0084] The scanning result is generated based on the commodity information of the target commodity object. For example, in a checkout scenario, the name and price of the commodity object can be used as the scanning result. In another example, in a commodity object entry scenario, the name and quantity of the commodity object can be used as the scanning result.
[0085] Then the scanning result is fed back, such as to a corresponding terminal device, display device, etc.
[0086] In summary, a scanned first graphic identification code is received, and the first graphic identification code is used to match the product information. If the first graphic identification code fails to match the product information, the first graphic identification code is corrected according to a correction rule to obtain a corrected second graphic identification code, so that the graphic identification code can be automatically corrected according to the correction rule, and then the second graphic identification code is used to match the product information to obtain the product information of the target product object, without the need for manual input by the user, thereby improving processing efficiency and saving manual processing time.
[0087] Based on the above embodiments, the present application embodiment provides a method for correcting a graphic identification code, such as Figure 3 As shown:
[0088] Step 302: Receive a scanned first graphic identification code.
[0089] Step 304: Use the first graphic identification code to match the target product object to determine whether the match is successful.
[0090] If yes, then step 312 is executed, if no, then step 306 is executed.
[0091] Step 306: Analyze the first graphic identification code using the correction rule to determine the corresponding difference category.
[0092] Step 308: modify the first graphic identification code according to the difference category to obtain a modified second graphic identification code.
[0093] Step 310: Use the second graphic identification code to match the target product object.
[0094] Step 312: Acquire product information of the target product object.
[0095] Step 314: Generate a scan result based on the product information of the target product object.
[0096] Step 316: Feedback the scanning result.
[0097] Therefore, when the scanned first graphic identification code fails to match the target product object, the correction rule can be used to analyze the first graphic identification code, determine the corresponding difference category, correct the first graphic identification code according to the difference category, and obtain the corrected second graphic identification code. The graphic identification code is automatically corrected without manual intervention, thereby improving processing efficiency. Then, the second graphic identification code is used to match the target product object, obtain product information and generate a scanning result, which is not noticeable to the first user, thereby reducing the time wasted when the user checks out due to the inability to match the product object.
[0098] Based on the above embodiments, taking the barcode scanning checkout as an example, the scene where the shopping guide (i.e., the second user) scans the barcode of the product to check out can be regarded as a continuous, single-line behavior. If the shopping guide cannot correctly match the product object after scanning the barcode, in the absence of automatic correction by the correction rule, the second user needs to manually enter the correct barcode to check out, that is, after the failed behavior, there will be a correct behavior. The first graphic identification code of the failed behavior and the second graphic identification code of the correct behavior are associated and recorded in the scanning failure record table.
[0099] Then, we can use deep learning algorithms to analyze the difference between failed behaviors and correct behaviors, and generate a correction rule that can correct failed behaviors to correct behaviors. Next time we encounter similar failed behaviors, we can try to apply these correction rules and output the corrected results.
[0100] like Figure 4 A schematic diagram of an example of barcode correction is shown.
[0101] Step 402: Receive a scanned first barcode.
[0102] Step 404: Match the target product object based on the first barcode to determine whether the match is successful.
[0103] Obtain correction rules, for barcodes, the correction rules include codeword quantity matching rules, so as to determine the correction method for the barcode based on the comparison of codeword quantity. This embodiment is only an example, and other correction rules may be used in actual processing, and the embodiment of the present application does not limit this.
[0104] If yes, execute step 414 , if no, execute step 406 .
[0105] Step 406: Determine a correction rule corresponding to the first barcode.
[0106] In the case that the first barcode fails to match the target commodity object, a correction rule corresponding to the first barcode is determined, and the correction rule includes: a deletion rule and / or an expansion rule.
[0107] Step 408: Expand the first barcode according to the expansion rule to determine a third barcode.
[0108] Step 410: Deleting redundant codewords at the end of the barcode according to the deletion rule to determine a fourth barcode.
[0109] Step 412: Use the third barcode and / or the fourth barcode to respectively identify the second barcode of the commodity object and determine a matching second barcode.
[0110] Wherein, when more than one second barcode is matched, the more than one second barcode is screened according to a screening condition, wherein the screening condition includes at least one of the following: a codeword length screening condition, a hit count screening condition, and a rule time screening condition.
[0111] Step 414: Use the second barcode to match the target product object and obtain product information of the target product object.
[0112] Step 416: Generate a scan result based on the product information of the target product object.
[0113] Step 418: Feedback the scanning result.
[0114] Therefore, if the product object corresponding to the barcode is not recognized, the barcode can be automatically corrected, and the product information can be obtained based on the corrected barcode to facilitate settlement. For example, when self-checkout is performed on a self-service checkout terminal or other device, the barcode can be automatically corrected to match the product result and settle the bill, which provides convenience to users and saves settlement time.
[0115] In the application scenarios of offline stores, in the scenarios of goods entering the warehouse and sales settlement, the barcode on the label of the goods object can be scanned by a scanning terminal such as a scanner (or a gun), a sales terminal (Point of sales, POS), etc., to obtain the information of the goods object. For example, in the scenario of goods entering the warehouse, based on the matched goods object identifier, the corresponding quantity is added to the inventory of the target goods object. In another example, in the scenario of sales settlement of goods objects, based on the matched goods object identifier, the price of the goods object is obtained and settlement is processed.
[0116] Taking a settlement scenario as an example, a user (first user or second user) uses a scanning terminal to scan a commodity object for the first time and obtains a first barcode of 11122233. The server fails to match the target commodity object and commodity information based on the first barcode. The second user manually enters the barcode of the commodity object as 111222, which is recorded as the second barcode. "11122233->111222" is recorded in the scanning failure record table. Among them, an association can be established based on the time between the two behaviors of scanning failure and successful entry. After a failed scanning behavior, the barcode corresponding to the successful behavior of the first successful entry within the time interval is used as the second barcode, and the barcode corresponding to the failed behavior is used as the first barcode, and an association relationship between the first barcode and the second barcode is established.
[0117] The user (first user or second user) uses the scanning terminal to scan the commodity object for the first time and obtains the first barcode 111222666. The server fails to match the target commodity object and commodity information based on the first barcode. The second user manually enters the barcode of the commodity object as 111222, which is recorded as the second barcode. "111222666->111222" is recorded in the scanning failure record table.
[0118] The server analyzes the scan failure record table. For the product object with the barcode 111222, based on the difference characteristics of the record analysis, it is determined that the barcode of the product object is a substring of the first barcode scanned, and the corresponding substring correction rule is generated. For example, the substring correction rules include: Rule 1: 8-bit length truncates the last 2 digits, Rule 2: 9-bit length truncates the last 3 digits. Subsequently, the barcode with scan error is corrected based on the substring correction rule.
[0119] Reference Figure 5 Example shown.
[0120] Step 502: Scan the barcode on the label of the commodity object by using a scanning terminal to obtain a first barcode.
[0121] Step 504: The scanning terminal sends the first barcode to the server.
[0122] For example, the first barcode is 11122234.
[0123] Step 506: the base server matches the target product object with the first barcode.
[0124] Obtain correction rules, for barcodes, the correction rules include codeword quantity matching rules, so as to determine the correction method for the barcode based on the comparison of codeword quantity. This embodiment is only an example, and other correction rules may be used in actual processing, and the embodiment of the present application does not limit this.
[0125] For example, based on the first bar 11122234, no target product object is matched.
[0126] Step 508: If the first barcode fails to match the target product object, the server uses the first barcode to match the product barcode of the product object.
[0127] Based on the first barcode 11122234, the product object with the barcode 111222 is matched.
[0128] Step 510: When the product barcode of the designated product object is a substring of the first barcode, the server deletes redundant codewords at the end of the barcode according to the product barcode of the designated product object to obtain the second barcode.
[0129] According to rule 1, delete the last two digits of the first barcode 11122234 and correct it to the second barcode 111222.
[0130] Step 512: The server uses the second barcode to match the target product object and obtains product information of the target product object.
[0131] Step 514: The server generates a scan result based on the product information of the target product object.
[0132] Step 516: The server feeds back the scanning result to the scanning terminal.
[0133] Step 518: The scanning terminal displays the scanning result.
[0134] Such as displaying the price, name, etc. of a product object.
[0135] This makes it convenient to automatically match the correction rules when scanning a product object. When the product barcode of a specified product object is a substring of the first barcode, the redundant codewords at the end of the barcode are deleted to complete the correction of the barcode. The correct scanning result can be fed back, making it convenient for users to check out, put the product into storage, and other processes.
[0136] Based on the above embodiment, taking the two-dimensional code as the graphic identification code as an example, the two-dimensional code can be automatically corrected, such as Figure 6 shown.
[0137] Step 602: Receive a scanned first graphic identification code, where the first graphic identification code includes a two-dimensional code image.
[0138] By scanning the QR code with a scanning terminal, the QR code image of the QR code can be used as the first graphic identification code, or when the QR code data is recognized based on the QR code image, the recognized QR code data can be added to the first graphic identification code.
[0139] Step 604: Use the first graphic identification code to match the target product object.
[0140] If the two-dimensional code recognition fails, that is, the two-dimensional code data is not obtained, or the commodity object is not matched based on the recognized two-dimensional code data, it is determined that the first graphic identification code fails to match the target commodity object.
[0141] Step 606: When the first graphic identification code fails to match the target product object, the scanned two-dimensional code image is input into the correction model, and a corrected two-dimensional code image is output.
[0142] In the case of QR code scanning and recognition, usually there are some problems with the image due to light and other reasons. Based on the trained correction model, the QR code image can be input into the correction model to output the corrected QR code image.
[0143] Step 608: Recognize the modified two-dimensional code image to obtain a modified second graphic identification code.
[0144] Step 610: Use the second graphic identification code to match the target product object and obtain product information of the target product object.
[0145] Step 612: Generate a scan result based on the product information of the target product object.
[0146] Step 614: Feedback the scanning result.
[0147] In the embodiment of the present application, the user is not aware of the failure of the first graphic identification code to match the target product object, and the user obtains the scanning result after normal scanning. In the background, the matching failure can be automatically corrected without manual processing.
[0148] In the embodiment of the present application, correction rules are automatically generated based on historical matching failure problems, and the correction rules are generated more flexibly and can be reused. Furthermore, the required correction rules can be automatically matched, thereby improving processing efficiency.
[0149] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).
[0150] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0151] Based on the above embodiment, this embodiment further provides a method for correcting a graphic identification code, wherein the method includes:
[0152] A scanning receiving module, used for receiving a scanned first graphic identification code;
[0153] A commodity matching module, used for matching a target commodity object with the first graphic identification code;
[0154] A correction module, configured to correct the first graphic identification code according to a correction rule to obtain a corrected second graphic identification code when the first graphic identification code fails to match the target commodity object;
[0155] A commodity information acquisition module, configured to use the second graphic identification code to match a target commodity object and acquire commodity information of the target commodity object;
[0156] A result feedback module is used to generate a scanning result based on the commodity information of the target commodity object and to feed back the scanning result.
[0157] In summary, a scanned first graphic identification code is received, and the first graphic identification code is used to match the product information. If the first graphic identification code fails to match the product information, the first graphic identification code is corrected according to a correction rule to obtain a corrected second graphic identification code, so that the graphic identification code can be automatically corrected according to the correction rule, and then the second graphic identification code is used to match the product information to obtain the product information of the target product object, without the need for manual input by the user, thereby improving processing efficiency and saving manual processing time.
[0158] The graphic identification code includes a barcode, and the correction module is used to use the first barcode to match the product barcode of the product object; when the product barcode of the designated product object is a substring of the first barcode, the redundant codewords at the end of the barcode are deleted according to the product barcode of the designated product object to obtain the second barcode.
[0159] Wherein, the graphic identification code includes a barcode, and the correction module is used to adopt the number of code words corresponding to the first barcode; if the number of code words is less than the number of product code words, the first barcode is expanded according to the correction rule to determine the second barcode; if the number of code words is greater than the number of product code words, the redundant code words at the end of the barcode are deleted according to the correction rule to determine the second barcode.
[0160] Also includes:
[0161] The recording module is used to record the association relationship between the first graphic identification code and the second graphic identification code in a scanning failure record table, so as to update the correction rule based on the scanning failure record table.
[0162] A rule generation module is used to obtain an association relationship from the scan failure record table according to the second graphic identification code; analyze according to a deep learning algorithm to determine the difference characteristics between the second graphic identification code and the first graphic identification code; and generate a correction rule based on the difference characteristics.
[0163] The correction module is used to analyze the first graphic identification code using the correction rule to determine the corresponding difference category; and to correct the first graphic identification code according to the difference category to obtain a corrected second graphic identification code.
[0164] The graphic identification code includes a two-dimensional code, and the correction module is used to input the scanned two-dimensional code image into the correction model and output the corrected two-dimensional code image; identify the corrected two-dimensional code image to obtain a corrected second graphic identification code.
[0165] When the scanned first graphic identification code fails to match the target product object, the correction rule can be used to analyze the first graphic identification code, determine the corresponding difference category, correct the first graphic identification code according to the difference category, and obtain the corrected second graphic identification code. The graphic identification code is automatically corrected without manual intervention, thereby improving processing efficiency. Then, the second graphic identification code is used to match the target product object, obtain product information and generate a scanning result, which is not noticeable to the first user, thereby reducing the time wasted when the user checks out due to failure to match the product object.
[0166] In the embodiment of the present application, the user is not aware of the failure of the first graphic identification code to match the target product object, and the user obtains the scanning result after normal scanning. In the background, the matching failure can be automatically corrected without manual processing.
[0167] In the embodiment of the present application, correction rules are automatically generated based on historical matching failure problems, and the correction rules are generated more flexibly and can be reused. Furthermore, the required correction rules can be automatically matched, thereby improving processing efficiency.
[0168] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.
[0169] The embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method described in the embodiment of the present application.
[0170] The embodiment of the present application also provides an electronic device, comprising: a processor, and a memory connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described in the embodiment of the present application. In the embodiment of the present application, the electronic device includes a server, a terminal device, and other devices.
[0171] The embodiment of the present application further discloses a computer program product, including a computer program / computer executable instructions, wherein the computer program / computer executable instructions, when executed by a processor in an electronic device, implement the method described in the embodiment of the present application.
[0172] The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include electronic devices such as a server (cluster), a terminal, etc. Figure 7 An exemplary apparatus 700 that can be used to implement various embodiments described in this application is schematically illustrated.
[0173] For one embodiment, Figure 7 An exemplary apparatus 700 is shown having one or more processors 702, a control module (chip set) 704 coupled to at least one of the processor(s) 702, a memory 706 coupled to the control module 704, a non-volatile memory (NVM) / storage device 708 coupled to the control module 704, one or more input / output devices 710 coupled to the control module 704, and a network interface 712 coupled to the control module 704.
[0174] The processor 702 may include one or more single-core or multi-core processors, and the processor 702 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 700 can be used as a server, terminal, or other device described in the embodiments of the present application.
[0175] In some embodiments, the apparatus 700 may include one or more computer-readable media (e.g., memory 706 or NVM / storage device 708) having instructions 714 and one or more processors 702 combined with the one or more computer-readable media and configured to execute the instructions 714 to implement a module to perform the actions described in the present disclosure.
[0176] For one embodiment, the control module 704 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 702 and / or any suitable device or component in communication with the control module 704 .
[0177] The control module 704 may include a memory controller module to provide an interface to the memory 706. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0178] The memory 706 may be used, for example, to load and store data and / or instructions 714 for the device 700. For one embodiment, the memory 706 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 706 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0179] For one embodiment, control module 704 may include one or more input / output controllers to provide an interface to NVM / storage device 708 and input / output device(s) 710 .
[0180] For example, NVM / storage 708 may be used to store data and / or instructions 714. NVM / storage 708 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0181] NVM / storage device 708 may include storage resources that are part of the device on which apparatus 700 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 708 may be accessed via (one or more) input / output devices 710 over a network.
[0182] (One or more) input / output devices 710 may provide an interface for the apparatus 700 to communicate with any other appropriate device, and the input / output device 710 may include a communication component, an audio component, a sensor component, etc. The network interface 712 may provide an interface for the apparatus 700 to communicate through one or more networks, and the apparatus 700 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as Bluetooth, WiFi, 2G, 3G, 4G, 5G, 6G, etc., or a combination thereof for wireless communication.
[0183] For one embodiment, at least one of the processor(s) 702 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 704. For one embodiment, at least one of the processor(s) 702 may be packaged together with the logic of one or more controllers of the control module 704 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 702 may be integrated on the same die with the logic of one or more controllers of the control module 704. For one embodiment, at least one of the processor(s) 702 may be integrated on the same die with the logic of one or more controllers of the control module 704 to form a system-on-chip (SoC).
[0184] In various embodiments, the apparatus 700 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the apparatus 700 may have more or fewer components and / or a different architecture. For example, in some embodiments, the apparatus 700 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0185] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.
[0186] The embodiment of the present application also provides an electronic device, including: a processor; and a memory, on which executable code is stored, and when the executable code is executed, the processor executes one or more methods as described in the embodiment of the present application. In the embodiment of the present application, the memory can store various data, such as target files, file and application association data, and user behavior data, so as to provide a data basis for various processing.
[0187] The embodiments of the present application also provide one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes one or more methods described in the embodiments of the present application.
[0188] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0189] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0190] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0191] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0193] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0194] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0195] The above is a detailed introduction to a method for correcting a graphic identification code, an electronic device, a computer-readable storage medium and a computer program product provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for a person skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and scope of application. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for correcting a graphic identification code, wherein: The method comprises: receiving a scanned first graphic identification code; Using the first graphic identification code to match the target commodity object; In the case where the first graphic identification code fails to match the target commodity object, the first graphic identification code is corrected according to the correction rule to obtain a corrected second graphic identification code; Using the second graphic identification code to match the target commodity object, and obtaining commodity information of the target commodity object; A scanning result is generated based on the commodity information of the target commodity object, and the scanning result is fed back.
2. The method according to claim 1, wherein: The graphic identification code includes a barcode, and the first graphic identification code is corrected according to the correction rule to obtain a corrected second graphic identification code, including: Using the first barcode to match the commodity barcode of the commodity object; When the commodity barcode of the designated commodity object is a substring of the first barcode, redundant codewords at the end of the barcode are deleted according to the commodity barcode of the designated commodity object to obtain the second barcode.
3. The method according to claim 1, wherein: The graphic identification code includes a barcode, and the first graphic identification code is corrected according to the correction rule to obtain a corrected second graphic identification code, including: Determining a correction rule corresponding to the first barcode, the correction rule comprising: a deletion rule and / or an expansion rule; Expanding the first barcode according to the expansion rule to determine a third barcode, and / or deleting redundant codewords at the end of the barcode according to the deletion rule to determine a fourth barcode; The third barcode and / or the fourth barcode are used to respectively identify the second barcode of the commodity object and determine the matching second barcode.
4. The method according to claim 3, wherein: Also includes: In the case that more than one second barcode is matched, the more than one second barcode is screened according to a screening condition, wherein the screening condition includes at least one of the following: a codeword length screening condition, a hit number screening condition, and a rule time screening condition.
5. The method according to claim 1, wherein: Also includes: The association relationship between the first graphic identification code and the second graphic identification code is recorded in a scanning failure record table, so as to update the correction rule based on the scanning failure record table.
6. The method according to claim 1, wherein: Also includes: Acquire an association relationship from the scanning failure record table according to the second graphic identification code; Analyze according to the deep learning algorithm to determine the difference characteristics between the second graphic identification code and the first graphic identification code; A correction rule is generated based on the difference characteristics.
7. The method according to claim 6, wherein: The step of correcting the first graphic identification code according to the correction rule to obtain a corrected second graphic identification code includes: Analyzing the first graphic identification code using the correction rule to determine a corresponding difference category; The first graphic identification code is modified according to the difference category to obtain a modified second graphic identification code.
8. The method according to claim 1, wherein: The graphic identification code includes a two-dimensional code, and the first graphic identification code is corrected according to the correction rule to obtain a corrected second graphic identification code, including: Input the scanned QR code image into the correction model and output the corrected QR code image; The modified two-dimensional code image is identified to obtain a modified second graphic identification code.
9. An electronic device, wherein: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
11. A computer program product comprising a computer program / computer executable instructions, wherein: When the computer program / computer executable instructions are executed by a processor in an electronic device, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Two-dimensional code error correction decoding method and device
CN107577980A
Graph code processing method and device, electronic equipment and readable storage medium
CN112163654A
System and method for recovering bar code errors
US6540143B1