Weight-based Cigarette Case Recognition Method

By obtaining the weight and weight distribution sequence of the items to be identified, calculating the correlation coefficient and recognition probability relationship, the problem of destroying the authenticity of the item in the prior art is solved, and the effect of destructively identifying the authenticity of the item is achieved.

CN114764862BActive Publication Date: 2025-07-11GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011608495.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-30
Publication Date
2025-07-11
Estimated Expiration
2040-12-30

AI Technical Summary

Technical Problem

The prior art requires destroying the packaging and integrity of the items to be identified when identifying the authenticity of the items, resulting in the inability to perform subsequent applications.

Method used

By obtaining the target weight and weight distribution sequence of the item to be identified, calculate its correlation coefficient with the preset calibration distribution sequence, determine the correspondence between the weight of the item and the recognition probability under the correlation, and then identify the authenticity without destroying the item.

Benefits of technology

It realizes accurate identification of the authenticity of the item without destroying it, and is suitable for the identification of tobacco, medicines, alcohol and other items, avoiding damage to the item.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114764862B_ABST
    Figure CN114764862B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a weight-based cigarette case recognition method, which relates to the technical field of information processing. The method includes: obtaining the target weight and the weight distribution sequence of the item to be recognized; the weight distribution sequence is a sequence including the weights of each weight sampling point of the item to be recognized; calculating the correlation coefficient between the weight distribution sequence of the item to be recognized and the calibration distribution sequence; wherein, the calibration distribution sequence is determined based on the weight distribution sequences of multiple sample items belonging to the first type of recognition result; determining the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient; wherein, the recognition probability is the probability that the recognition result of the item is the first type of recognition result; determining the target recognition result of the item to be recognized based on the corresponding relationship and the target weight. Compared with the prior art, by applying the solution provided by the embodiment of the present invention, it is possible to recognize the authenticity of the item to be recognized without damaging the item to be recognized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information processing, and in particular to a method for identifying an item based on weight, where the item includes a cigarette case. Background Art

[0002] Currently, in many cases, users need to identify the authenticity of items. For example, identify the authenticity of medicines, identify the authenticity of alcoholic beverages, identify the authenticity of tobacco, etc.

[0003] In the related art, the method usually adopted for identifying the authenticity of an item is: obtaining a composition table of a genuine item, which includes the composition of the genuine item and the proportion of each component; then, analyzing the components of the item to be identified by using methods such as chemical analysis, and comparing the analysis results with the composition table of the genuine item to identify the authenticity of the item to be identified.

[0004] However, in the above-mentioned related art, when chemically analyzing the item to be identified, the packaging and the integrity of the item to be identified itself will be damaged. As a result, even if the item to be identified is identified as a genuine item, the item to be identified cannot be further applied subsequently.

[0005] Based on this, there is an urgent need for a method for identifying an item based on weight, which can identify the authenticity of the item to be identified without damaging the item to be identified. Summary of the Invention

[0006] The purpose of the embodiments of the present invention is to provide a method, device and electronic device for identifying an item based on weight, so as to be able to identify the authenticity of the item to be identified without damaging the item to be identified. The specific technical solutions are as follows:

[0007] In a first aspect, the embodiments of the present invention provide a method for identifying an item based on weight, and the method includes:

[0008] Obtaining a target weight and a weight distribution sequence of the item to be identified; wherein, the weight distribution sequence is a sequence including the weights of each weight sampling point of the item to be identified;

[0009] Calculating a correlation coefficient between the weight distribution sequence of the item to be identified and a preset calibration distribution sequence; wherein, the calibration distribution sequence is determined based on the weight distribution sequences of multiple sample items belonging to a first type of recognition result;

[0010] Determining a correspondence relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient; wherein, the recognition probability is the probability that the recognition result of the item is the first type of recognition result;

[0011] Determine the target recognition result of the item to be recognized based on the corresponding relationship and the target weight.

[0012] Optionally, in a specific implementation, the step of determining the corresponding relationship between the weight of an item and the recognition probability under the correlation characterized by the correlation coefficient includes:

[0013] Based on a preset calibration distance and a preset calibration weight, determine the weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient; wherein, the calibration weight is: the average value of the weights of the multiple sample items, and the calibration distance is: the maximum value among the absolute values of the differences between the weights of the multiple sample items and the calibration weight;

[0014] Determine the corresponding relationship between the weight range and the recognition probability as the corresponding relationship between the weight of an item and the recognition probability.

[0015] Optionally, in a specific implementation, the step of determining the weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient based on a preset calibration distance and a preset calibration weight includes:

[0016] Based on a preset calibration distance and a preset calibration weight, determine the first weight range in which the recognition result is determined to be the first type of recognition result, and the second weight range and the third weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient; wherein, the weight in the second weight range is not greater than the weight in the first weight range, and the weight in the third weight range is not less than the weight in the first weight range;

[0017] The step of determining the corresponding relationship between the weight range and the recognition probability to obtain the corresponding relationship between the weight of an item and the recognition probability includes:

[0018] Respectively determine the corresponding relationships between the first weight range, the second weight range, and the third weight range and the recognition probability to obtain the corresponding relationship between the weight of an item and the recognition probability.

[0019] Optionally, in a specific implementation, the step of respectively determining the corresponding relationships between the first weight range, the second weight range, and the third weight range and the recognition probability to obtain the corresponding relationship between the weight of an item and the recognition probability includes:

[0020] Correspond each weight in the first weight range to the first recognition probability to obtain the first sub-corresponding relationship between the first weight range and the recognition probability; wherein, the first recognition probability is 1;

[0021] Determine a second sub - correspondence relationship between the second weight range and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value; wherein, the first weight is the minimum weight and the second recognition probability is 0;

[0022] Determine a third sub - correspondence relationship between the third weight range and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value; wherein, the second weight is the maximum weight and the third recognition probability is 0;

[0023] Form a correspondence relationship between the item weight and the recognition probability with the first sub - correspondence relationship, the second sub - correspondence relationship, and the third sub - correspondence relationship.

[0024] Optionally, in a specific implementation manner, the step of determining the second sub - correspondence relationship between the second weight range and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value, includes:

[0025] Determine a first linear relationship between the item weight and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value, and use it as the second sub - correspondence relationship between the second weight range and the recognition probability;

[0026] The step of determining the third sub - correspondence relationship between the third weight range and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value, includes:

[0027] Determine a second linear relationship between the item weight and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value, and use it as the third sub - correspondence relationship between the third weight range and the recognition probability.

[0028] Optionally, in a specific implementation, the step of determining, based on a preset calibration distance and a preset calibration weight, the first weight range in which the recognition result is determined to be the first type of recognition result, and the second weight range and the third weight range in which there is a possibility that the recognition result is the first type of recognition result, includes:

[0029] Determine a calibration coefficient according to the magnitude relationship between the correlation coefficient and a preset coefficient threshold;

[0030] Use the calibration coefficient and the calibration distance to calculate a first amplitude value and a second amplitude value; wherein, the first amplitude value is: the maximum change amplitude of the weight of an item whose recognition result is determined to be the first type of recognition result relative to the preset calibration weight, and the second amplitude value is: the maximum change amplitude of the weight of an item in which there is a possibility that the recognition result is the first type of recognition result relative to the calibration weight, and the first amplitude value is less than the second amplitude value;

[0031] Determine the weight range between the first sum value and the first difference value as the first weight range in which the recognition result is determined to be the first type of recognition result; wherein, the first sum value is: the sum value of the calibration weight and the first amplitude value, and the first difference value is: the difference value between the calibration weight and the first amplitude value;

[0032] Determine the weight range between the second difference value and the first difference value, and the weight range between the first sum value and the second sum value as the second weight range and the third weight range in which there is a possibility that the recognition result is the first type of recognition result respectively; wherein, the second difference value is: the difference value between the calibration weight and the second amplitude value, and the second sum value is: the sum value of the calibration weight and the second amplitude value.

[0033] Optionally, in a specific implementation, the step of determining a calibration coefficient according to the magnitude relationship between the correlation coefficient and a preset coefficient threshold includes:

[0034] If the correlation coefficient is less than the preset coefficient threshold, then determine the coefficient threshold as the calibration coefficient;

[0035] If the correlation coefficient is not less than the coefficient threshold, then determine the correlation coefficient as the calibration coefficient.

[0036] Optionally, in a specific implementation, the step of using the calibration coefficient and the calibration distance to calculate a first amplitude value and a second amplitude value includes:

[0037] Use a first formula and a second formula to calculate the first amplitude value and the second amplitude value;

[0038] Wherein, the first formula is:

[0039] r = nR*cor - R

[0040] The second formula is as follows:

[0041] d = mR*cor - R

[0042] Wherein, r is the first amplitude value, d is the second amplitude value, cor is the calibration coefficient, R is the calibration distance, m and n are respectively predetermined adjustment coefficients, and m > n.

[0043] Optionally, in a specific implementation manner, the step of determining the target recognition result of the item to be recognized based on the corresponding relationship and the target weight includes:

[0044] Determine the target recognition probability corresponding to the target weight from the corresponding relationship;

[0045] If the target recognition probability is greater than a preset recognition threshold, determine that the recognition result of the item to be recognized is the first type of recognition result.

[0046] Optionally, in a specific implementation manner, before the step of determining the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient, the method further includes:

[0047] Determine the magnitude relationship between the correlation coefficient and a preset coefficient threshold;

[0048] If the correlation coefficient is less than the coefficient threshold, determine that the recognition result of the item to be recognized is the second type of recognition result;

[0049] If the correlation coefficient is not less than the coefficient threshold, execute the step of determining the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient.

[0050] In a second aspect, an embodiment of the present invention provides an item recognition device based on weight, and the device includes:

[0051] A weight acquisition module, configured to acquire the target weight and the weight distribution sequence of the item to be recognized; wherein, the weight distribution sequence is a sequence including the weights of the respective weight sampling points of the item to be recognized; a coefficient calculation module, configured to calculate the correlation coefficient between the weight distribution sequence of the item to be recognized and a preset calibration distribution sequence; wherein, the calibration distribution sequence is determined based on the weight distribution sequences of multiple sample items belonging to the first type of recognition result; a relationship determination module, configured to determine the correspondence between the item weight and the recognition probability under the correlation characterized by the correlation coefficient; wherein, the recognition probability is the probability that the recognition result of the item is the first type of recognition result; a result recognition module, configured to determine the target recognition result of the item to be recognized based on the correspondence and the target weight.

[0052] Optionally, in a specific implementation manner, the relationship determination module includes: a range determination sub-module, configured to determine, based on a preset calibration distance and a preset calibration weight, the weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient; wherein, the calibration weight is the average value of the weights of the multiple sample items, and the calibration distance is the maximum value among the absolute values of the differences between the weights of the multiple sample items and the calibration weight; a relationship determination sub-module, configured to determine the correspondence between the weight range and the recognition probability as the correspondence between the item weight and the recognition probability.

[0053] Optionally, in a specific implementation manner, the range determination sub-module includes: a range determination unit, configured to determine, based on a preset calibration distance and a preset calibration weight, the first weight range in which the recognition result is determined to be the first type of recognition result, and the second weight range and the third weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient; wherein, the weights in the second weight range are not greater than the weights in the first weight range, and the weights in the third weight range are not less than the weights in the first weight range; the relationship determination sub-module includes: a relationship determination unit, configured to respectively determine the correspondence between the first weight range, the second weight range, and the third weight range and the recognition probability, and obtain the correspondence between the item weight and the recognition probability.

[0054] Optionally, in a specific implementation, the relationship determination unit includes: a first relationship determination subunit, configured to correspond each weight within a first weight range to a first recognition probability, to obtain a first sub-correspondence relationship between the first weight range and the recognition probability; wherein, the first recognition probability is 1; a second relationship determination subunit, configured to determine a second sub-correspondence relationship between the second weight range and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, and the minimum value within the first weight range and the first recognition probability corresponding to the minimum value; wherein, the first weight is the minimum weight, and the second recognition probability is 0; a third relationship determination subunit, configured to determine a third sub-correspondence relationship between the third weight range and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, and the maximum value within the first weight range and the first recognition probability corresponding to the maximum value; wherein, the second weight is the maximum weight, and the third recognition probability is 0; a fourth relationship determination subunit, configured to form a correspondence relationship between the item weight and the recognition probability from the first sub-correspondence relationship, the second sub-correspondence relationship, and the third sub-correspondence relationship.

[0055] Optionally, in a specific implementation, the second relationship determination subunit is specifically configured to: determine a first linear relationship between the item weight and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, and the minimum value within the first weight range and the first recognition probability corresponding to the minimum value, as the second sub-correspondence relationship between the second weight range and the recognition probability; the third relationship determination subunit is specifically configured to: determine a second linear relationship between the item weight and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, and the maximum value within the first weight range and the first recognition probability corresponding to the maximum value, as the third sub-correspondence relationship between the third weight range and the recognition probability.

[0056] Optionally, in a specific implementation, the range determination unit includes: a coefficient determination subunit, configured to determine a calibration coefficient according to a magnitude relationship between the correlation coefficient and a preset coefficient threshold; an amplitude value calculation subunit, configured to calculate a first amplitude value and a second amplitude value by using the calibration coefficient and the calibration distance; wherein, the first amplitude value is: the maximum change amplitude of the weight of an item whose recognition result is determined to be the first type of recognition result with respect to a preset calibration weight, and the second amplitude value is: the maximum change amplitude of the weight of an item with a possibility that the recognition result is the first type of recognition result with respect to the calibration weight, and the first amplitude value is less than the second amplitude value; a first range determination subunit, configured to determine the weight range between a first sum value and a first difference value as a first weight range for which the recognition result is determined to be the first type of recognition result; wherein, the first sum value is: the sum value of the calibration weight and the first amplitude value, and the first difference value is: the difference value between the calibration weight and the first amplitude value; a second range determination subunit, configured to determine the weight range between a second difference value and the first difference value, and the weight range between the first sum value and a second sum value as a second weight range and a third weight range respectively for which there is a possibility that the recognition result is the first type of recognition result; wherein, the second difference value is: the difference value between the calibration weight and the second amplitude value, and the second sum value is: the sum value of the calibration weight and the second amplitude value.

[0057] Optionally, in a specific implementation, the range determination unit is specifically configured to: if the correlation coefficient is less than a preset coefficient threshold, determine the coefficient threshold as the calibration coefficient; if the correlation coefficient is not less than the coefficient threshold, determine the correlation coefficient as the calibration coefficient.

[0058] Optionally, in a specific implementation, the amplitude value calculation subunit is specifically configured to: calculate a first amplitude value and a second amplitude value by using a first formula and a second formula; wherein, the first formula is:

[0059] r = nR*cor - R

[0060] The second formula is:

[0061] d = mR*cor - R

[0062] wherein, r is the first amplitude value, d is the second amplitude value, cor is the calibration coefficient, R is the calibration distance, m and n are respectively predetermined adjustment coefficients, and m > n.

[0063] Optionally, in a specific implementation, the result recognition module is specifically configured to: determine the target recognition probability corresponding to the target weight from the corresponding relationship; if the target recognition probability is greater than a preset recognition threshold, determine that the recognition result of the item to be recognized is the first type of recognition result.

[0064] Optionally, in a specific implementation, the device further includes: a size determination module, configured to determine the magnitude relationship between the correlation coefficient and a preset coefficient threshold before determining the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient; if the correlation coefficient is less than the coefficient threshold, determine that the recognition result of the item to be recognized is the second type of recognition result; if the correlation coefficient is not less than the coefficient threshold, trigger the relationship determination module.

[0065] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus; the memory is used to store a computer program; when the processor executes the program stored on the memory, it implements the steps of any of the weight-based item recognition methods provided in the first aspect above.

[0066] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of any of the weight-based item recognition methods provided in the first aspect above.

[0067] In a fifth aspect, an embodiment of the present invention provides a computer program product containing instructions, which when running on a computer, causes the computer to execute the steps of any of the weight-based item recognition methods provided in the first aspect above.

[0068] Beneficial effects of the embodiments of the present invention:

[0069] As can be seen above, when applying the solution provided by the embodiments of the present invention to recognize an item to be recognized, the target weight and the weight distribution sequence of the item to be recognized can be first obtained; furthermore, the correlation coefficient between the weight distribution sequence and a preset calibration distribution sequence can be calculated, and thus, the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient can be determined. In this way, the target recognition result of the item to be recognized can be determined based on the obtained corresponding relationship and the target weight of the item to be recognized.

[0070] Based on this, by applying the solution provided in the embodiments of the present invention, the target recognition result of the item to be recognized can be determined using the target weight and the weight distribution sequence of the item to be recognized. Thus, when determining the authenticity of the item to be recognized, true and / or false can be used as the possible recognition results of the item to be recognized. Therefore, the authenticity of the item to be recognized can be identified using the target weight and the weight distribution sequence of the item to be recognized. Since the target weight and the weight distribution sequence of the item to be recognized can be obtained without damaging the item to be recognized, the authenticity of the item to be recognized can be identified without damaging the item to be recognized. The authenticity of the item can be identified, for example, identifying the authenticity of drugs, identifying the authenticity of alcoholic beverages, identifying the authenticity of tobacco, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0072] Figure 1 Schematic flowchart of a weight-based item recognition method provided by an embodiment of the present invention;

[0073] Figure 2 Schematic distribution diagram of multiple weight sampling points set on an item provided by an embodiment of the present invention;

[0074] Figure 3 Schematic diagram of the corresponding relationship between item weight and recognition probability under the correlation characterized by a correlation coefficient provided by an embodiment of the present invention;

[0075] Figure 4 Schematic flowchart of another weight-based item recognition method provided by an embodiment of the present invention;

[0076] Figure 5 Schematic structural diagram of a weight-based item recognition device provided by an embodiment of the present invention;

[0077] Figure 6 Schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0078] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0079] In related technologies, the methods usually adopted for identifying the authenticity of an item are as follows: obtaining the ingredient list of the genuine item, which includes the ingredient composition of the genuine item and the proportion of each ingredient; furthermore, analyzing the ingredients of the item to be identified by using methods such as chemical analysis, and comparing the analysis result with the ingredient list of the genuine item to identify the authenticity of the item to be identified. However, in the above related technologies, when chemically analyzing the item to be identified, the packaging of the item to be identified and the integrity of the item itself will be damaged. As a result, even if the item to be identified is identified as genuine, the item to be identified cannot be further applied subsequently. Based on this, there is an urgent need for an item identification method based on weight that can identify the authenticity of the item to be identified without damaging the item to be identified.

[0080] To solve the above technical problems, an embodiment of the present invention provides an item identification method based on weight.

[0081] Among them, this method can be applicable to various identification scenarios such as identifying the authenticity and quality of the item to be identified; and, this method can be applicable to various electronic devices such as laptops, mobile phones, and desktop computers. In contrast, the embodiment of the present invention does not limit the application scenario and the execution entity of this method.

[0082] As described above, an item identification method based on weight provided by an embodiment of the present invention may include the following steps:

[0083] Obtain the target weight and weight distribution sequence of the item to be identified; wherein, the weight distribution sequence is: a sequence including the weights of each weight sampling point of the item to be identified;

[0084] Calculate the correlation coefficient between the weight distribution sequence of the item to be identified and a preset calibration distribution sequence; wherein, the calibration distribution sequence is determined based on the weight distribution sequences of multiple sample items belonging to the first type of identification result;

[0085] Determine the corresponding relationship between the item weight and the identification probability under the correlation characterized by the correlation coefficient; wherein, the identification probability is: the probability that the identification result of the item is the first type of identification result;

[0086] Based on the corresponding relationship and the target weight, determine the target identification result of the item to be identified.

[0087] Among them, a weight-based item recognition method provided by the embodiments of the present invention can be used to recognize any item that can be recognized by weight, such as tobacco, medicine, cosmetics, liquor, etc. In this way, when applying the weight-based item recognition method provided by the embodiments of the present invention, the recognized items can include: cigarette cases, medicine boxes, cosmetic packaging boxes, liquor packaging, etc., any item that can be recognized by weight. In this regard, the embodiments of the present invention do not make specific limitations.

[0088] As can be seen above, when applying the solution provided by the embodiments of the present invention to recognize an item to be recognized, the target weight and weight distribution sequence of the item to be recognized can be obtained first; furthermore, the correlation coefficient between the weight distribution sequence and the preset calibration distribution sequence can be calculated, so as to determine the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient. In this way, based on the obtained corresponding relationship and the target weight of the item to be recognized, the target recognition result of the item to be recognized can be determined.

[0089] Based on this, by applying the solution provided by the embodiments of the present invention, the target recognition result of the item to be recognized can be determined using the target weight and weight distribution sequence of the item to be recognized. Thus, when judging the authenticity of the item to be recognized, true and / or false can be used as the possible recognition results of the item to be recognized. Therefore, the authenticity of the item to be recognized can be recognized using the target weight and weight distribution sequence of the item to be recognized. Since the target weight and weight distribution sequence of the item to be recognized can be obtained without damaging the item to be recognized, the authenticity of the item to be recognized can be recognized without damaging the item to be recognized.

[0090] Next, with reference to the accompanying drawings, a weight-based item recognition method provided by the embodiments of the present invention will be specifically described.

[0091] Figure 1 It is a flowchart of a weight-based item recognition method provided by the embodiments of the present invention. As Figure 1 shown, the method may include the following steps S101-S104.

[0092] S101: Obtain the target weight and weight distribution sequence of the item to be recognized;

[0093] Among them, the weight distribution sequence is: a sequence including the weights of each weight sampling point of the item to be recognized;

[0094] When recognizing the item to be recognized, the electronic device can first obtain the target weight and weight distribution sequence of the item to be recognized.

[0095] Among them, multiple weight sampling points can be selected on the item to be recognized, so as to obtain the weights of each weight sampling point, and sort the obtained weights of each weight sampling point to obtain the weight distribution sequence of the item to be recognized.

[0096] Optionally, labels can be set for the weight sampling points, so as to arrange the weights of each weight sampling point in descending order or ascending order according to the labels of each weight sampling point, and obtain the weight distribution sequence of the item to be recognized. Of course, the weights of each weight sampling point can also be arranged in other ways to obtain the weight distribution sequence of the item to be recognized, which are all reasonable.

[0097] Among them, optionally, when obtaining the weights of each weight sampling point of the item to be recognized, multiple weighing devices with the same quantity as that of each weight sampling point can be used to measure the weights of each weight sampling point of the item to be recognized.

[0098] Among them, the item to be recognized is placed on the above-mentioned multiple weighing devices, and each weight sampling point is located within the weighable range of the weighing device of a weighing device, so that the weight output by the weighing device is the weight of the weight sampling point.

[0099] For example, as Figure 2 shown, the cigarette case is the item to be recognized. The cigarette case is a well-packaged cigarette case filled with cigarettes, and the numbers 1-4 on the cigarette case are the labels of four weight sampling points. Therefore, the cigarette case is placed on four weighing devices, and each weight sampling point is located within the weighable range of the weighing device of a weighing device. Thus, the weight displayed by each weighing device is the weight of a weight sampling point of the cigarette case.

[0100] In addition, optionally, the item to be recognized can be directly placed on a weighing device, and the weight output by the weighing device is obtained as the target weight of the item to be recognized;

[0101] Optionally, the sum of the weights of each weight sampling point of the item to be recognized can be calculated to obtain the target weight of the item to be recognized.

[0102] For example, as Figure 2 shown, the cigarette case is the item to be recognized. The cigarette case is a well-packaged cigarette case filled with cigarettes, and the numbers 1-4 on the cigarette case are the labels of four weight sampling points. Then, the sum of the weights of the weight sampling points 1-4 can be calculated as the target weight of the cigarette case.

[0103] S102: Calculate the correlation coefficient between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence;

[0104] Among them, the calibration distribution sequence is determined based on the weight distribution sequences of multiple sample items belonging to the first type of recognition result;

[0105] After obtaining the target weight and the weight distribution sequence of the item to be recognized, the correlation coefficient between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence can be calculated.

[0106] Among them, in order to calculate the correlation coefficient between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence, the distributions of the key sampling points in the item to be recognized and each sample item belonging to the first type of recognition result are the same, and in the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence, the arrangement order of each weight sampling point is the same.

[0107] Furthermore, since the weight distribution sequence of the item to be recognized is obtained by sorting the weights of each weight sampling point of the item to be recognized, and the calibration distribution sequence is determined based on the weight distribution sequences of multiple sample items belonging to the first type of recognition result, and the weight distribution sequence of each sample item is obtained by sorting the weights of each weight sampling point of the sample item, therefore, the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence can be regarded as two vectors, and thus, by calculating the correlation coefficient between the two vectors, the correlation coefficient between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence can be obtained.

[0108] Among them, the obtained correlation coefficient can characterize the linear relationship between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence, and the range of this correlation coefficient is [-1, 1]. Among them, the larger the value of the correlation coefficient, the higher the correlation between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence. And when the correlation coefficient is 1, it can be said that the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence are positively correlated; when the correlation coefficient is -1, it can be said that the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence are negatively correlated; when the correlation coefficient is 0, it can be said that the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence are not correlated.

[0109] Optionally, the correlation coefficient between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence can be calculated through the following coefficient calculation formula:

[0110]

[0111] Among them, Cor(T, G) is the correlation coefficient between the target weight and the weight distribution sequence of the item to be recognized, T j is the weight distribution sequence of the item to be recognized, is the average value from T1 to T m G j is the preset calibration distribution sequence, is the average value from G1 to G mThe average value, where m is the number of weight sampling points.

[0112] Among them, the calibration distribution sequence is pre-determined based on the weight distribution sequences of multiple sample items belonging to the first type of recognition result. Specifically:

[0113] Pre-determine multiple sample items belonging to the first type of recognition result, and obtain the weight distribution sequence of each sample item; thus, for each weight sampling point, calculate the average value of the weight of each sample item at this weight sampling point; then sort the obtained average values to obtain the calibration distribution sequence.

[0114] Optionally, the preset calibration distribution sequence can be calculated by the following formula:

[0115]

[0116] Among them, G j is the average value of the weight of the weight sampling point j of the n sample items belonging to the first type of recognition result, and G ij is the weight of the weight sampling point j of the i-th sample item belonging to the first type of recognition result, j = 1, 2,..., m. In addition, optionally, G j can also be used to represent the preset calibration distribution sequence.

[0117] For example, as Figure 2 shown, the cigarette case is the item to be recognized. The cigarette case is a well-packaged cigarette case full of cigarettes, and 1-4 on the cigarette case are the labels of four weight sampling points. The purpose is to determine whether the cigarettes in the cigarette case are genuine. Then, n well-packaged cigarette cases full of genuine cigarettes can be pre-obtained as n sample items belonging to the first type of recognition result, and the weights of each weight sampling point 1-4 on the n cigarette cases can be obtained. Thus, calculate the average value of the weights of the same weight sampling point of the n cigarette cases to obtain the preset calibration distribution sequence. At this time, m = 4. Furthermore, the average value of the weights of the same weight sampling point of the n cigarette cases is:

[0118]

[0119] Among them, G j is the average value of the weight of the weight sampling point j of the n cigarette cases, and G ij is the weight of the weight sampling point j of the i-th cigarette case, j = 1, 2, 3, 4.

[0120] S103: Determine the corresponding relationship between the weight of the item and the recognition probability under the correlation characterized by the correlation coefficient;

[0121] Among them, the recognition probability is: the probability that the recognition result of the item is the first type of recognition result;

[0122] After obtaining the correlation coefficient of the target weight and the weight distribution sequence of the item to be recognized, the corresponding relationship between the item weight and the recognition probability can be determined under the correlation characterized by this correlation coefficient.

[0123] That is to say, this corresponding relationship can represent: under the correlation characterized by the correlation coefficient of the target weight and the weight distribution sequence of the item to be recognized, when the item is of a certain weight, the probability that the recognition result of this item is the first type of recognition result. Thus, in this corresponding relationship, the recognition probability corresponding to the target weight of the item to be recognized is the probability that the recognition result of the item to be recognized is the first recognition result.

[0124] Among them, the higher the correlation characterized by the correlation coefficient, in the corresponding relationship between the item weight and the recognition probability obtained, the wider the weight range corresponding to the higher recognition probability; correspondingly, the lower the correlation characterized by the correlation coefficient, in the corresponding relationship between the item weight and the recognition probability obtained, the wider the weight range corresponding to the lower recognition probability. That is to say, when the correlation characterized by the correlation coefficient is higher, the weight range of the items that can be determined to have the recognition result of the first type of recognition result is wider; on the contrary, when the correlation characterized by the correlation coefficient is lower, the weight range of the items that can be determined to have the recognition result of the first type of recognition result is narrower.

[0125] Among them, optionally, if the first type of recognition result is a genuine product, then the above-mentioned various sample items are genuine products, and the purpose of the embodiment of the present invention is to determine whether the item to be recognized is a genuine product. Furthermore, the above-mentioned recognition probability is the probability that the item is a genuine product. Then, in this corresponding relationship, the recognition probability corresponding to the target weight of the item to be recognized is the probability that the item to be recognized is a genuine product.

[0126] S104: Based on the corresponding relationship and the target weight, determine the target recognition result of the item to be recognized.

[0127] After obtaining the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the above-mentioned correlation coefficient, the electronic device can determine the target recognition result of the item to be recognized based on this corresponding relationship and the target weight of the item to be recognized.

[0128] Among them, the electronic device can determine the recognition probability corresponding to the target weight of the item to be recognized from the above-mentioned corresponding relationship, and thus determine the target recognition result of the item to be recognized based on this recognition probability.

[0129] Optionally, in a specific implementation manner, the above step S104 may include the following steps 1041-1042.

[0130] Step 1041: Determine the target recognition probability corresponding to the target weight from the corresponding relationship;

[0131] Step 1042: If the target recognition probability is greater than a preset recognition threshold, determine that the recognition result of the item to be recognized is the first type of recognition result.

[0132] In this specific implementation, the electronic device can determine the target recognition probability corresponding to the target weight of the item to be recognized from the correspondence between the item weight and the recognition probability under the correlation characterized by the obtained correlation coefficient, and further judge the magnitude relationship between the target recognition probability and the preset recognition threshold. Thus, if the target recognition probability is greater than the preset recognition threshold, it can be determined that the recognition result of the item to be recognized is the first type of recognition result.

[0133] Among them, the above-mentioned preset recognition threshold can be determined according to empirical values and the recognition accuracy requirement for the recognition result of the item to be recognized being the first type of recognition result. In this regard, the embodiments of the present invention do not limit the specific value of the above-mentioned preset recognition threshold.

[0134] For example, when identifying the authenticity of drugs, the above-mentioned preset recognition threshold can be set relatively high, and when identifying the authenticity of tobacco, the above-mentioned preset recognition threshold can be set relatively low, etc.

[0135] As can be seen above, by applying the solution provided by the embodiments of the present invention, when recognizing an item to be recognized, the target weight and the weight distribution sequence of the item to be recognized can be obtained first; furthermore, the correlation coefficient between the weight distribution sequence and the preset calibration distribution sequence can be calculated, so that the correspondence between the item weight and the recognition probability under the correlation characterized by the correlation coefficient can be determined. In this way, the target recognition result of the item to be recognized can be determined based on the obtained correspondence and the target weight of the item to be recognized.

[0136] Based on this, by applying the solution provided by the embodiments of the present invention, the target recognition result of the item to be recognized can be determined using the target weight and the weight distribution sequence of the item to be recognized. Thus, when judging the authenticity of the item to be recognized, true and / or false can be used as the possible recognition results of the item to be recognized, and thus, the authenticity of the item to be recognized can be recognized using the target weight and the weight distribution sequence of the item to be recognized. Since the target weight and the weight distribution sequence of the item to be recognized can be obtained without damaging the item to be recognized, the authenticity of the item to be recognized can be recognized without damaging the item to be recognized.

[0137] Optionally, in a specific implementation, the above step S103 of determining the correspondence between the item weight and the recognition probability under the correlation characterized by the correlation coefficient may include the following steps 1031-1032:

[0138] Step 1031: Based on a preset calibration distance and a preset calibration weight, determine the weight range in which there is a possibility of the recognition result being the first type of recognition result under the correlation characterized by the correlation coefficient;

[0139] Among them, the calibration weight is: the average value of the weights of multiple sample items, and the calibration distance is: the maximum value among the absolute values of the differences between the weights of multiple sample items and the calibration weight;

[0140] In this specific implementation, the electronic device can determine, based on a preset calibration distance and a preset calibration weight, the weight range in which there is a possibility of the recognition result being the first type of recognition result under the correlation characterized by the correlation coefficient between the obtained weight distribution sequence of the item to be recognized and the preset calibration distribution sequence.

[0141] Among them, under the correlation characterized by the above-mentioned correlation coefficient, when the weight of the item is within the above weight range, the range of the probability that the recognition result of the item is the first type of recognition result is (0, 1]. That is to say, under the correlation characterized by the above-mentioned correlation coefficient, when the weight of the item is within the above weight range, it is possible for the item to be recognized as the first type of recognition result.

[0142] Moreover, if the probability that the recognition result of the item is the first type of recognition result is 1, it can be considered that the item is definitely recognized as the first type of recognition result; if the probability that the recognition result of the item is the first type of recognition result is within (0, 1), it can be considered that although the item cannot be definitely recognized as the first type of recognition result, the item has the possibility of being recognized as the first type of recognition result.

[0143] In addition, the above-mentioned preset calibration weight is: the average value of the weights of multiple sample items belonging to the first type of recognition result, and the above-mentioned preset calibration distance is: the maximum value among the absolute values of the differences between the weights of multiple sample items belonging to the first type of recognition result and the preset calibration weight.

[0144] Optionally, the preset calibration weight can be calculated by the following formula:

[0145]

[0146] Among them, is the average value of the weights of n sample items belonging to the first type of recognition result, that is is the preset calibration weight, M i is the weight of the i-th sample item belonging to the first type of recognition result, i = 1, 2,..., n.

[0147] Furthermore, optionally, the preset calibration distance can be calculated by the following formula:

[0148]

[0149] wherein, R is a preset calibration distance, and M max is the maximum value among the weights of n sample items belonging to the first type of recognition result, and M min is the minimum value among the weights of n sample items belonging to the first type of recognition result.

[0150] For example, as Figure 2 shown, the cigarette case is an item to be recognized. The cigarette case is a well-packaged cigarette case full of cigarettes, and 1-4 on the cigarette case are the labels of four weight sampling points. The purpose is to determine whether the cigarettes in the cigarette case are genuine. Then, n well-packaged cigarette cases full of genuine cigarettes can be obtained in advance as n sample items belonging to the first type of recognition result. Thus, the weight M i of the i-th cigarette case among the n cigarette cases can be obtained, where i = 1, 2,..., n. Then, the following formula can be used to calculate the average value of the weights of the n cigarette cases as the preset calibration weight:

[0151]

[0152] Correspondingly, the preset calibration distance can be obtained through the following formula:

[0153]

[0154] Step 1032: Determine the correspondence between the weight range and the recognition probability as the correspondence between the item weight and the recognition probability.

[0155] After obtaining the weight range where there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient, the correspondence between the obtained weight range and the recognition probability can be further determined, and this correspondence is used as the correspondence between the item weight and the recognition probability.

[0156] Optionally, in a specific implementation manner, in the above step 1031, based on the preset calibration distance and the preset calibration weight, to determine the weight range where there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient, the following step 1 can be included.

[0157] Step 1: Based on the preset calibration distance and the preset calibration weight, determine the first weight range where the recognition result is determined to be the first type of recognition result, and the second weight range and the third weight range where there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient;

[0158] wherein, the weight in the second weight range is not greater than the weight in the first weight range, and the weight in the third weight range is not less than the weight in the first weight range.

[0159] In this specific implementation manner, the maximum value within the second weight range is the minimum value within the first weight range, and the minimum value within the third weight range is the maximum value within the first weight range.

[0160] Optionally, within the determined first weight range, the probability that the recognition result corresponding to each weight is a first type of recognition result can be 1; within the determined second weight range and third weight range, the probability that the recognition result corresponding to each weight is a first type of recognition result can be within [0, 1]. Among them, when the weight of the item is the minimum value within the second weight range or the maximum value within the third weight range, the recognition probability corresponding to the weight of the item is 0; when the weight of the item is within the second weight range and greater than the minimum value within the second weight range, or when the weight of the item is within the third weight range and less than the maximum value within the second weight range, the recognition probability corresponding to the item is within (0, 1); when the weight of the item is the maximum value within the second weight range or the minimum value within the third weight range, the recognition probability corresponding to the weight of the item is 1. Furthermore, the probability that the recognition result corresponding to each weight outside the above-mentioned first weight range, second weight range, and third weight range is a first type of recognition result can be 0.

[0161] Correspondingly, in this specific implementation manner, step 1032 above, determining the correspondence between the weight range and the recognition probability as the correspondence between the item weight and the recognition probability, may include the following step 2.

[0162] Step 2: Determine the correspondence between the first weight range, the second weight range, and the third weight range and the recognition probability respectively, to obtain the correspondence between the item weight and the recognition probability.

[0163] In this specific implementation manner, the electronic device can determine the correspondence between the first weight range, the second weight range, and the third weight range and the recognition probability respectively, so as to obtain the correspondence between the item weight and the recognition probability.

[0164] Optionally, the electronic device may determine the correspondence between each weight within the first weight range and probability 1, the correspondence between each weight within the second weight range and a certain probability within [0, 1], and the correspondence between each weight within the third weight range and a certain probability within [0, 1], so as to obtain the correspondence between the weight of the item and the recognition probability. Among them, when the weight of the item is the minimum value within the second weight range or the maximum value within the third weight range, the recognition probability corresponding to the weight of the item is 0; when the weight of the item is within the second weight range and greater than the minimum value within the second weight range, or when the weight of the item is within the third weight range and less than the maximum value within the second weight range, the recognition probability corresponding to the item is within (0, 1); when the weight of the item is the maximum value within the second weight range or the minimum value within the third weight range, the recognition probability corresponding to the weight of the item is 1.

[0165] Optionally, in a specific implementation, step 1 above, based on the preset calibration distance and the preset calibration weight, to determine the first weight range where the recognition result is determined as the first type of recognition result under the correlation characterized by the correlation coefficient, and the second weight range and the third weight range where there is a possibility that the recognition result is the first type of recognition result, may include the following steps 11-14.

[0166] Step 11: Determine the calibration coefficient according to the magnitude relationship between the correlation coefficient and the preset coefficient threshold;

[0167] In this specific manner, the electronic device may first determine the magnitude relationship between the correlation coefficient of the weight distribution sequence of the item to be recognized obtained and the preset calibration distribution sequence and the preset coefficient threshold, so as to determine the calibration coefficient.

[0168] Among them, the preset coefficient threshold may be any value within [0, 1], and the specific value of the preset coefficient threshold may be determined according to empirical values and the recognition accuracy requirement for the recognition result of the item to be recognized as the first type of recognition result. In this regard, the embodiments of the present invention do not limit the specific value of the above preset coefficient threshold. For example, the preset coefficient threshold may be 0.5, 0.6, or 0.8, etc.

[0169] Among them, the larger the value of the preset coefficient threshold, the higher the recognition accuracy requirement for the recognition result of the item to be recognized as the first type of recognition result. On the contrary, the smaller the value of the preset coefficient threshold, the lower the recognition accuracy requirement for the recognition result of the item to be recognized as the first type of recognition result. For example, when identifying the authenticity of drugs, the above preset coefficient threshold may be set relatively high, and when identifying the authenticity of tobacco, the above preset coefficient threshold may be set relatively low, etc.

[0170] Optionally, in a specific implementation, step 11 above may include the following steps 111-112.

[0171] Step 111: If the correlation coefficient is less than a preset coefficient threshold, then determine the coefficient threshold as the calibration coefficient;

[0172] Step 112: If the correlation coefficient is not less than the coefficient threshold, then determine the correlation coefficient as the calibration coefficient.

[0173] In this specific implementation, when it is determined that the above-mentioned correlation coefficient is less than the preset coefficient threshold, the coefficient threshold can be determined as the calibration coefficient; correspondingly, when it is determined that the above-mentioned correlation coefficient is not less than the coefficient threshold, the above-mentioned correlation coefficient can be determined as the calibration coefficient.

[0174] Optionally, steps 111-112 above can be expressed by the following formula:

[0175] cor = MIN(MAX(Cor(T, G), t), 1)

[0176] where cor is the calibration coefficient and t is the preset coefficient threshold.

[0177] Step 12: Calculate a first amplitude value and a second amplitude value using the calibration coefficient and the calibration distance;

[0178] where the first amplitude value is the maximum change amplitude of the weight of an item whose recognition result is determined to be a first type of recognition result relative to a preset calibration weight, and the second amplitude value is the maximum change amplitude of the weight of an item with a possibility of having a recognition result of a first type of recognition result relative to the calibration weight, and the first amplitude value is less than the second amplitude value;

[0179] After determining the above-mentioned calibration coefficient, the electronic device can calculate the first amplitude value and the second amplitude value using the above-mentioned calibration coefficient and the preset calibration distance.

[0180] The first amplitude value is the maximum change amplitude of the weight of an item whose recognition result is determined to be a first type of recognition result relative to a preset calibration weight. That is to say, when the change amplitude of the weight of the item relative to the preset calibration weight is not greater than the first amplitude value, it can be determined that the recognition result of the item is a first type of recognition result. Optionally, when the change amplitude of the weight of the item relative to the preset calibration weight is not greater than the first amplitude value, the probability that the item is recognized as a first type of recognition result can be 1.

[0181] The second amplitude value is the maximum change amplitude of the weight of an item with a recognition result of the first type of recognition result relative to the calibrated weight. That is to say, when the change amplitude of the weight of the item relative to the preset calibrated weight is not greater than the second amplitude value, it can be determined that the recognition result of the item may be the first type of recognition result. Optionally, when the change amplitude of the weight of the item relative to the preset calibrated weight is not greater than the second amplitude value, the probability that the item is recognized as the first type of recognition result is in the range of [0, 1]. Among them, when the change amplitude of the weight of the item relative to the preset calibrated weight is equal to the second amplitude value, the probability that the item is recognized as the first type of recognition result is 0. When the change amplitude of the weight of the item relative to the preset calibrated weight is less than the second amplitude value, the probability that the item is recognized as the first type of recognition result is in the range of (0, 1].

[0182] In addition, since the first amplitude value is less than the second amplitude value, when the change amplitude of the weight of the item relative to the preset calibrated weight is greater than the first amplitude value and not greater than the second amplitude value, although the recognition result of the item cannot be determined as the first type of recognition result, it can be determined that the recognition result of the item may be the first type of recognition result. Optionally, when the change amplitude of the weight of the item relative to the preset calibrated weight is greater than the first amplitude value and less than the second amplitude value, the probability that the item is recognized as the first type of recognition result can be in the range of (0, 1).

[0183] Optionally, in a specific implementation manner, step 12 above may include the following step 121:

[0184] Step 121: Calculate the first amplitude value and the second amplitude value using the first formula and the second formula;

[0185] Among them, the first formula is:

[0186] r = nR*cor - R

[0187] The second formula is:

[0188] d = mR*cor - R

[0189] Among them, r is the first amplitude value, d is the second amplitude value, cor is the calibration coefficient, R is the calibration distance, m and n are respectively predetermined adjustment coefficients, and m > n.

[0190] In this specific implementation manner, the predetermined adjustment coefficients m and n can be determined according to empirical values and the recognition accuracy requirement for the recognition result of the item to be recognized as the first type of recognition result. In this regard, the embodiments of the present invention do not limit the specific values of m and n. For example, in one embodiment, m = 5 and n = 3. Of course, in the above example, m = 5 and n = 3 are only used to illustrate the predetermined adjustment coefficients in the above first formula and second formula, rather than a limitation.

[0191] Step 13: Determine the weight range between the first sum value and the first difference value as the first weight range for which the recognition result is determined as the first type of recognition result;

[0192] Wherein, the first sum value is the sum value of the calibrated weight and the first amplitude value, and the first difference value is the difference value between the calibrated weight and the first amplitude value;

[0193] Step 14: Determine the weight range between the second difference value and the first difference value, and the weight range between the first sum value and the second sum value respectively as the second weight range and the third weight range for which there is a possibility that the recognition result is the first type of recognition result;

[0194] Wherein, the second difference value is the difference value between the calibrated weight and the second amplitude value, and the second sum value is the sum value of the calibrated weight and the second amplitude value.

[0195] After calculating the above-mentioned first amplitude value and second amplitude value, the sum value of the preset calibrated weight and the first amplitude value can be calculated as the first sum value, and the difference value between the preset calibrated weight and the first amplitude value can be calculated as the first difference value. Furthermore, the difference value between the preset calibrated weight and the second amplitude value can be calculated as the second difference value, and the sum value of the preset calibrated weight and the second amplitude value can be calculated as the second sum value.

[0196] In this way, the weight range between the first sum value and the first difference value can be determined as the first weight range for which the recognition result is determined as the first type of recognition result, the weight range between the second difference value and the first difference value can be determined as the second weight range for which there is a possibility that the recognition result is the first type of recognition result, and the weight range between the first sum value and the second sum value can be determined as the third weight range for which there is a possibility that the recognition result is the first type of recognition result.

[0197] Wherein, the weight within the second weight range is less than the weight within the first weight range, and the weight within the third weight range is greater than the weight within the first weight range.

[0198] For example, if the preset calibrated weight is represented by a, the first amplitude value is represented by r, and the second amplitude value is represented by d, then the first sum value is: a + r, the first difference value is: a - r, the second sum value is: a + d, and the second difference value is a - d; furthermore, the first weight range is: [a - r, a + r], the second weight range is [a - d, a - r], and the third weight range is [a + r, a + d]. Obviously, since r < d, the weight within the above-mentioned second weight range is not greater than the weight within the first weight range, and the weight within the third weight range is not less than the weight within the first weight range.

[0199] Optionally, in a specific implementation, in step 2, the corresponding relationships between the first weight range, the second weight range, and the third weight range and the recognition probability are respectively determined to obtain the corresponding relationship between the item weight and the recognition probability, which may include the following steps 21-24:

[0200] Step 21: Corresponding each weight within the first weight range to the first recognition probability to obtain the first sub-corresponding relationship between the first weight range and the recognition probability;

[0201] Among them, the first recognition probability is 1;

[0202] In this specific implementation, the first recognition probability can be set to 1. Thus, the corresponding relationship between each weight within the first weight range and the recognition probability 1 can be established to obtain the first sub-corresponding relationship between the first weight range and the recognition probability.

[0203] Step 22: Based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value, determine the second sub-corresponding relationship between the second weight range and the recognition probability;

[0204] Among them, the first weight is the minimum weight, and the second recognition probability is 0;

[0205] Furthermore, the second recognition probability can be set to 0. That is to say, the recognition probability corresponding to the minimum weight within the second weight range is 0, and the recognition probability corresponding to the minimum value within the first weight range is 1. Thus, based on the corresponding relationship between the minimum weight within the second weight range and the recognition probability 0, and the corresponding relationship between the minimum value within the first weight range and the recognition probability 1, the corresponding relationship between each weight within the second weight range and any recognition probability in [0,1] can be established to obtain the second sub-corresponding relationship between the second weight range and the recognition probability.

[0206] Among them, optionally, in a specific implementation, the above step 22 may include the following step 221:

[0207] Step 221: Based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value, determine the first linear relationship between the item weight and the recognition probability as the second sub-corresponding relationship between the second weight range and the recognition probability;

[0208] In this specific implementation manner, based on the correspondence between the minimum weight within the second weight range and the recognition probability of 0, and the correspondence between the minimum value within the first weight range and the recognition probability of 1, a linear relationship between each weight within the second weight range and any recognition probability in [0, 1] can be established. Thus, a first linear relationship between the weight of the item and the recognition probability is obtained, which serves as a second sub-correspondence between the second weight range and the recognition probability.

[0209] That is to say, if a two-dimensional coordinate system is established with the horizontal axis as the x-axis for representing the weight and the vertical axis as the y-axis for representing the probability, the correspondence between the minimum weight within the second weight range and the recognition probability of 0 can be expressed as: in this two-dimensional coordinate system, the coordinate point where the abscissa x is the minimum weight within the second weight range and the ordinate y is 0; the correspondence between the minimum value within the first weight range and the recognition probability of 1 can be expressed as: in this two-dimensional coordinate system, the coordinate point where the abscissa x is the minimum value within the first weight range and the ordinate y is 1. Thus, according to the determination method of the straight-line equation in the two-dimensional coordinate system, the function representing the straight line formed by these two coordinate points can be determined through the above two coordinate points. Among them, in this function, x represents the abscissa as the independent variable, and y represents the ordinate as the dependent variable. In this way, the part where the independent variable x belongs to the second weight range in the calculated function can be used as the first linear relationship between the weight of the item and the recognition probability, that is, as the second sub-correspondence between the second weight range and the recognition probability.

[0210] Step 23: Based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value, determine a third sub-correspondence between the third weight range and the recognition probability;

[0211] Among them, the second weight is the maximum weight, and the third recognition probability is 0;

[0212] Furthermore, the third recognition probability can be set to 0. That is to say, the recognition probability corresponding to the maximum weight within the third weight range is 0, and the recognition probability corresponding to the maximum value within the first weight range is 1. Thus, based on the correspondence between the maximum weight within the third weight range and the recognition probability of 0, and the correspondence between the maximum value within the first weight range and the recognition probability of 1, a correspondence between each weight within the third weight range and any recognition probability in [0, 1] can be established, and a third sub-correspondence between the third weight range and the recognition probability is obtained.

[0213] Among them, optionally, in a specific implementation manner, the above step 23 may include the following step 231:

[0214] Step 231: Determine a second linear relationship between the weight of the item and the recognition probability, as a third sub-correspondence between the third weight range and the recognition probability, based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value.

[0215] In this specific implementation, a linear relationship between each weight within the third weight range and any recognition probability in [0, 1] can be established according to the correspondence between the maximum weight within the third weight range and the recognition probability of 0, and the correspondence between the maximum value within the first weight range and the recognition probability of 1. Thus, a second linear relationship between the weight of the item and the recognition probability is obtained, as the third sub-correspondence between the third weight range and the recognition probability.

[0216] That is to say, if a two-dimensional coordinate system is established with the x-axis as the horizontal axis representing weight and the y-axis as the vertical axis representing probability, the correspondence between the maximum weight within the third weight range and the recognition probability of 0 can be expressed as: in this two-dimensional coordinate system, the coordinate point where the abscissa x is the maximum weight within the third weight range and the ordinate y is 0; the correspondence between the maximum value within the first weight range and the recognition probability of 1 can be expressed as: in this two-dimensional coordinate system, the coordinate point where the abscissa x is the maximum value within the first weight range and the ordinate y is 1. Thus, according to the determination method of the straight-line equation in the two-dimensional coordinate system, the function representing the straight line formed by the above two coordinate points can be determined. Among them, in this function, x represents the abscissa as the independent variable, and y represents the ordinate as the dependent variable. In this way, the part where the independent variable x belongs to the third weight range in the calculated function can be used as the second linear relationship between the weight of the item and the recognition probability, that is, as the third sub-correspondence between the third weight range and the recognition probability.

[0217] Step 24: Combine the first sub-correspondence, the second sub-correspondence, and the third sub-correspondence to form a correspondence between the weight of the item and the recognition probability.

[0218] In this way, after obtaining the above first sub-correspondence between the first weight range and the recognition probability, the second sub-correspondence between the second weight range and the recognition probability, and the third sub-correspondence between the third weight range and the recognition probability, the obtained first sub-correspondence, second sub-correspondence, and third sub-correspondence can be combined to form a correspondence between the weight of the item and the recognition probability.

[0219] For example, let the preset calibrated weight be represented by a, the first amplitude value be represented by r, and the second amplitude value be represented by d. Then the first sum value is: a + r, the first difference value is: a - r, the second sum value is: a + d, and the second difference value is a - d; furthermore, the first weight range is: [a - r, a + r], the second weight range is [a - d, a - r], and the third weight range is [a + r, a + d]. And, the recognition probability corresponding to each weight within the first weight range [a - r, a + r] is 1, the recognition probability corresponding to the minimum value within the second weight range is 0, and the recognition probability corresponding to the maximum value within the third weight range is 0.

[0220] Then, as Figure 3 shown, in a two-dimensional coordinate system where the horizontal axis represents weight and the vertical axis represents probability, in the first function of the oblique line connecting the coordinate points (a - d, 0) and (a - r, 1), the part where the abscissa belongs to [a - d, a - r] is the first linear relationship established regarding the weight of the item and the recognition probability, that is, the second sub - correspondence relationship regarding the second weight range and the recognition probability; in the second function of the oblique line connecting the coordinate points (a + r, 1) and (a + d, 0), the part where the abscissa belongs to [a + r, a + d] is the second linear relationship established regarding the weight of the item and the recognition probability, that is, the third sub - correspondence relationship regarding the third weight range and the recognition probability; in the third function of the horizontal line connecting the coordinate points (a - r, 1) and (a + r, 1), the part where the abscissa belongs to [a - r, a + r] is the first sub - correspondence relationship established regarding the first weight range and the recognition probability.

[0221] Thus, the part where the abscissa belongs to [a - d, a - r] in the above - mentioned first function, the part where the abscissa belongs to [a + r, a + d] in the second function, and the part where the abscissa belongs to [a - r, a + r] in the third function can constitute: the correspondence relationship regarding the weight of the item and the recognition probability.

[0222] That is to say, in Figure 3 , the broken line formed by the oblique line connecting the coordinate points (a - d, 0) and (a - r, 1), the oblique line connecting the coordinate points (a + r, 1) and (a + d, 0), and the horizontal line connecting the coordinate points (a - r, 1) and (a + r, 1) can be used to represent the correspondence relationship regarding the weight of the item and the recognition probability. Obviously, when the weight of the item is less than a - d, or when the weight of the item is greater than a + d, the corresponding recognition probability is 0.

[0223] Furthermore, as Figure 3 shown, the preset recognition threshold can be represented by thr, then according to Figure 3Regarding the corresponding relationship between the weight of an item and the recognition probability shown, when the recognition probability corresponding to the target weight of the item to be recognized is greater than thr, it can be determined that the recognition result of the item to be recognized is the first type of recognition result.

[0224] That is to say, when the weight of the item to be recognized is Figure 3 above the horizontal line where thr is located in the vertical coordinate in the two-dimensional coordinate system shown, it can be determined that the recognition result of the item to be recognized is the first type of recognition result.

[0225] Optionally, in a specific manner, as Figure 4 shown, a method for item recognition based on weight provided by an embodiment of the present invention may further include the following steps S105 - S106.

[0226] S105: Determine the magnitude relationship between the correlation coefficient and a preset coefficient threshold; if the correlation coefficient is less than the coefficient threshold, execute step S106; if the correlation coefficient is not less than the coefficient threshold, execute the above step S103.

[0227] S106: Determine that the recognition result of the item to be recognized is the second type of recognition result.

[0228] Among them, since the obtained correlation coefficient can represent the linear relationship between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence, and the larger the value of the correlation coefficient, the higher the correlation between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence. Therefore, when the value of the correlation coefficient between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence is relatively high, it indicates that the possibility that the recognition result of the item to be recognized is the first type of recognition result is relatively high. On the contrary, when the value of the correlation coefficient between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence is relatively low, it indicates that the possibility that the recognition result of the item to be recognized is the first type of recognition result is relatively low.

[0229] Based on this, after calculating the correlation coefficient between the weight distribution sequence of the item to be recognized and the preset calibration distribution sequence, the magnitude relationship between the correlation coefficient and the preset coefficient threshold can be determined first.

[0230] Among them, if the correlation coefficient is less than the preset coefficient threshold, it can be explained that the possibility that the recognition result of the item to be recognized is the first type of recognition result is relatively low. Thus, it can be directly determined that the recognition result of the item to be recognized is the second type of recognition result.

[0231] Among them, it can be understood that the second type of recognition result can be a recognition result with a characterization meaning opposite to that of the first type of recognition result. For example, when the first type of recognition result is genuine, the second type of recognition result is fake; or when the first type of recognition result is fake, the second type of recognition result is genuine, etc.

[0232] If the correlation coefficient is not less than a preset coefficient threshold, the corresponding relationship between the weight of the item and the recognition probability under the correlation characterized by the correlation coefficient can be further determined, so as to use the corresponding relationship and the target weight of the item to be recognized to determine the target recognition result of the item to be recognized.

[0233] Among them, the above-mentioned preset coefficient threshold can be determined according to empirical values and the recognition accuracy requirements for the recognition result of the item to be recognized being the first type of recognition result. In this regard, the embodiments of the present invention do not limit the specific value of the above-mentioned preset coefficient threshold.

[0234] For example, when identifying the authenticity of drugs, the above-mentioned preset coefficient threshold can be set relatively high, and when identifying the authenticity of tobacco, the above-mentioned preset coefficient threshold can be set relatively low, etc.

[0235] Corresponding to the above-mentioned item recognition method based on weight provided by the embodiments of the present invention, the embodiments of the present invention also provide an item recognition device based on weight.

[0236] Figure 5 It is a schematic structural diagram of an item recognition device based on weight provided by the embodiments of the present invention. As Figure 5 shown, the device may include the following modules:

[0237] A weight acquisition module 510, configured to acquire the target weight and weight distribution sequence of the item to be recognized; wherein, the weight distribution sequence is: a sequence including the weights of each weight sampling point of the item to be recognized;

[0238] A coefficient calculation module 520, configured to calculate the correlation coefficient between the weight distribution sequence of the item to be recognized and a preset calibration distribution sequence; wherein, the calibration distribution sequence is determined based on the weight distribution sequences of multiple sample items belonging to the first type of recognition result;

[0239] A relationship determination module 530, configured to determine the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient; wherein, the recognition probability is: the probability that the recognition result of the item is the first type of recognition result;

[0240] A result recognition module 540, configured to determine the target recognition result of the item to be recognized based on the corresponding relationship and the target weight.

[0241] As can be seen above, when applying the solution provided by the embodiments of the present invention to identify an item to be identified, the target weight and the weight distribution sequence of the item to be identified can be obtained first. Furthermore, the correlation coefficient between the weight distribution sequence and the preset calibration distribution sequence can be calculated. Thus, under the correlation characterized by the correlation coefficient, the corresponding relationship between the item weight and the recognition probability can be determined. In this way, based on the obtained corresponding relationship and the target weight of the item to be identified, the target recognition result of the item to be identified can be determined.

[0242] Based on this, when applying the solution provided by the embodiments of the present invention, the target recognition result of the item to be identified can be determined by using the target weight and the weight distribution sequence of the item to be identified. Thus, when judging the authenticity of the item to be identified, true and / or false can be used as the possible recognition results of the item to be identified. Therefore, the authenticity of the item to be identified can be recognized by using the target weight and the weight distribution sequence of the item to be identified. Since the target weight and the weight distribution sequence of the item to be identified can be obtained without damaging the item to be identified, the authenticity of the item to be identified can be recognized without damaging the item to be identified.

[0243] Optionally, in a specific implementation manner, the relationship determination module 530 includes:

[0244] A range determination sub-module, configured to determine, based on a preset calibration distance and a preset calibration weight, the weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient; wherein, the calibration weight is: the average value of the weights of the multiple sample items, and the calibration distance is: the maximum value among the absolute values of the differences between the weights of the multiple sample items and the calibration weight;

[0245] A relationship determination sub-module, configured to determine the corresponding relationship between the weight range and the recognition probability as the corresponding relationship between the item weight and the recognition probability.

[0246] Optionally, in a specific implementation manner, the range determination sub-module includes:

[0247] A range determination unit, configured to determine, based on a preset calibration distance and a preset calibration weight, the first weight range in which the recognition result is determined to be the first type of recognition result, and the second weight range and the third weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient; wherein, the weight in the second weight range is not greater than the weight in the first weight range, and the weight in the third weight range is not less than the weight in the first weight range;

[0248] The relationship determination sub-module includes:

[0249] A relationship determination unit is configured to respectively determine the corresponding relationships between the first weight range, the second weight range, and the third weight range and the recognition probability, so as to obtain the corresponding relationship between the item weight and the recognition probability.

[0250] Optionally, in a specific implementation manner, the relationship determination unit includes:

[0251] A first relationship determination subunit is configured to correspond each weight within the first weight range to a first recognition probability, so as to obtain a first sub-corresponding relationship between the first weight range and the recognition probability; wherein, the first recognition probability is 1;

[0252] A second relationship determination subunit is configured to determine a second sub-corresponding relationship between the second weight range and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value; wherein, the first weight is the minimum weight, and the second recognition probability is 0;

[0253] A third relationship determination subunit is configured to determine a third sub-corresponding relationship between the third weight range and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value; wherein, the second weight is the maximum weight, and the third recognition probability is 0;

[0254] A fourth relationship determination subunit is configured to form the corresponding relationship between the item weight and the recognition probability from the first sub-corresponding relationship, the second sub-corresponding relationship, and the third sub-corresponding relationship.

[0255] Optionally, in a specific implementation manner, the second relationship determination subunit is specifically configured to:

[0256] Determine a first linear relationship between the item weight and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value, and use it as the second sub-corresponding relationship between the second weight range and the recognition probability;

[0257] The third relationship determination subunit is specifically configured to:

[0258] Determine a second linear relationship between the item weight and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value, and use it as the third sub-corresponding relationship between the third weight range and the recognition probability.

[0259] Optionally, in a specific implementation, the range determination unit includes:

[0260] A coefficient determination subunit, configured to determine a calibration coefficient according to the magnitude relationship between the correlation coefficient and a preset coefficient threshold;

[0261] An amplitude value calculation subunit, configured to calculate a first amplitude value and a second amplitude value by using the calibration coefficient and the calibration distance; wherein, the first amplitude value is: the maximum change amplitude of the weight of an item whose recognition result is determined as the first type of recognition result relative to a preset calibration weight, and the second amplitude value is: the maximum change amplitude of the weight of an item with a possibility that the recognition result is the first type of recognition result relative to the calibration weight, and the first amplitude value is less than the second amplitude value;

[0262] A first range determination subunit, configured to determine the weight range between a first sum value and a first difference value as a first weight range of an item whose recognition result is determined as the first type of recognition result; wherein, the first sum value is: the sum value of the calibration weight and the first amplitude value, and the first difference value is: the difference value between the calibration weight and the first amplitude value;

[0263] A second range determination subunit, configured to respectively determine the weight range between a second difference value and the first difference value, and the weight range between the first sum value and a second sum value as a second weight range and a third weight range of an item with a possibility that the recognition result is the first type of recognition result; wherein, the second difference value is: the difference value between the calibration weight and the second amplitude value, and the second sum value is: the sum value of the calibration weight and the second amplitude value.

[0264] Optionally, in a specific implementation, the range determination unit is specifically configured to:

[0265] If the correlation coefficient is less than the preset coefficient threshold, then determine the coefficient threshold as the calibration coefficient;

[0266] If the correlation coefficient is not less than the coefficient threshold, then determine the correlation coefficient as the calibration coefficient.

[0267] Optionally, in a specific implementation, the amplitude value calculation subunit is specifically configured to:

[0268] Calculate the first amplitude value and the second amplitude value by using a first formula and a second formula;

[0269] Wherein, the first formula is:

[0270] r = nR*cor - R

[0271] The second formula is:

[0272] d = mR*cor - R

[0273] Wherein, r is the first amplitude value, d is the second amplitude value, cor is the calibration coefficient, R is the calibration distance, m and n are respectively preset adjustment coefficients, and m > n.

[0274] Optionally, in a specific implementation manner, the result recognition module 540 is specifically configured to:

[0275] Determine the target recognition probability corresponding to the target weight from the corresponding relationship;

[0276] If the target recognition probability is greater than a preset recognition threshold, determine that the recognition result of the item to be recognized is the first type of recognition result.

[0277] Optionally, in a specific implementation manner, the device further includes:

[0278] A size determination module, configured to determine the magnitude relationship between the correlation coefficient and a preset coefficient threshold before determining the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient; if the correlation coefficient is less than the coefficient threshold, determine that the recognition result of the item to be recognized is the second type of recognition result; if the correlation coefficient is not less than the coefficient threshold, trigger the relationship determination module.

[0279] Corresponding to the above-mentioned item recognition method based on weight provided by an embodiment of the present invention, an embodiment of the present invention further provides an electronic device, as Figure 6 shown, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,

[0280] The memory 603 is used for storing a computer program;

[0281] The processor 601 is configured to implement the steps of any of the item recognition methods provided by the above-mentioned embodiments of the present invention when executing the program stored on the memory 603.

[0282] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0283] The communication interface is used for communication between the above electronic device and other devices.

[0284] The memory can include a Random Access Memory (RAM), and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located far from the aforementioned processor.

[0285] The above-mentioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0286] In another embodiment provided by the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the item recognition methods provided by the above embodiments of the present invention are implemented.

[0287] In another embodiment provided by the present invention, there is also provided a computer program product containing instructions, which when running on a computer, causes the computer to execute the steps of any of the item recognition methods provided by the above embodiments of the present invention.

[0288] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

[0289] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements but also other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device that includes the element.

[0290] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the apparatus embodiment, the electronic device embodiment, the computer-readable storage medium embodiment, and the computer program product embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment.

[0291] The above are only the preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are all included in the protection scope of the present invention.

Claims

1. A weight-based article recognition method, characterized in that, The method includes: Obtaining a target weight and a weight distribution sequence of an item to be recognized; wherein, the weight distribution sequence is a sequence including the weights of each weight sampling point of the item to be recognized; Calculating a correlation coefficient between the weight distribution sequence of the item to be recognized and a preset calibration distribution sequence; wherein, the calibration distribution sequence is determined based on the weight distribution sequences of multiple sample items belonging to the first type of recognition result; Determining a correspondence between the item weight and the recognition probability under the correlation characterized by the correlation coefficient; wherein, the recognition probability is the probability that the recognition result of the item is the first type of recognition result, and the item weight is the weight range in which there is a possibility that the recognition result is the first type of recognition result, and the correspondence is used to characterize the probability that the recognition result of the item is the first type of recognition result when the weight of the item is each weight in the weight range; Based on the correspondence and the target weight, determining the target recognition result of the item to be recognized.

2. The method according to claim 1, wherein The step of determining the correspondence between the item weight and the recognition probability under the correlation characterized by the correlation coefficient includes: Based on a preset calibration distance and a preset calibration weight, determining the weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient; wherein, the calibration weight is the average weight of the multiple sample items, and the calibration distance is the maximum value among the absolute values of the differences between the weights of the multiple sample items and the calibration weight; Determining the correspondence between the weight range and the recognition probability as the correspondence between the item weight and the recognition probability.

3. The method according to claim 2, wherein The step of determining the weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient based on a preset calibration distance and a preset calibration weight includes: Based on a preset calibration distance and a preset calibration weight, determining a first weight range in which the recognition result is determined to be the first type of recognition result, and a second weight range and a third weight range in which there is a possibility that the recognition result is the first type of recognition result under the correlation characterized by the correlation coefficient; wherein, the weights in the second weight range are not greater than the weights in the first weight range, and the weights in the third weight range are not less than the weights in the first weight range; The step of determining the correspondence between the weight range and the recognition probability to obtain the correspondence between the item weight and the recognition probability includes: Respectively determining the correspondences between the first weight range, the second weight range, and the third weight range and the recognition probability to obtain the correspondence between the item weight and the recognition probability.

4. The method according to claim 3, characterized in that, The step of respectively determining the correspondences between the first weight range, the second weight range, and the third weight range and the recognition probability to obtain the correspondence between the item weight and the recognition probability includes: Corresponding each weight in the first weight range to a first recognition probability to obtain a first sub-correspondence between the first weight range and the recognition probability; wherein, the first recognition probability is 1; Determine a second sub - correspondence relationship between the second weight range and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value; wherein, the first weight is the minimum weight and the second recognition probability is 0; Determine a third sub - correspondence relationship between the third weight range and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value; wherein, the second weight is the maximum weight and the third recognition probability is 0; Construct a correspondence relationship between the item weight and the recognition probability from the first sub - correspondence relationship, the second sub - correspondence relationship, and the third sub - correspondence relationship.

5. The method according to claim 4, wherein The step of determining the second sub - correspondence relationship between the second weight range and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value, includes: Determine a first linear relationship between the item weight and the recognition probability based on the first weight within the second weight range and the second recognition probability corresponding to the predetermined first weight, as well as the minimum value within the first weight range and the first recognition probability corresponding to the minimum value, and use it as the second sub - correspondence relationship between the second weight range and the recognition probability; The step of determining the third sub - correspondence relationship between the third weight range and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value, includes: Determine a second linear relationship between the item weight and the recognition probability based on the second weight within the third weight range and the third recognition probability corresponding to the predetermined second weight, as well as the maximum value within the first weight range and the first recognition probability corresponding to the maximum value, and use it as the third sub - correspondence relationship between the third weight range and the recognition probability.

6. The method according to claim 3, wherein The step of determining the first weight range for which the recognition result is determined to be the first - type recognition result, and the second weight range and the third weight range where there is a possibility of the recognition result being the first - type recognition result, under the correlation characterized by the correlation coefficient based on the preset calibration distance and the preset calibration weight, includes: Determine a calibration coefficient according to the magnitude relationship between the correlation coefficient and the preset coefficient threshold; Calculate a first amplitude value and a second amplitude value using the calibration coefficient and the calibration distance; wherein, the first amplitude value is: the maximum change amplitude of the item weight for which the recognition result is determined to be the first - type recognition result relative to the preset calibration weight, and the second amplitude value is: the maximum change amplitude of the item weight where there is a possibility of the recognition result being the first - type recognition result relative to the calibration weight, and the first amplitude value is less than the second amplitude value; Determine the weight range between the first sum value and the first difference value as the first weight range for which the recognition result is determined to be the first type of recognition result; wherein, the first sum value is: the sum value of the calibrated weight and the first amplitude value, and the first difference value is: the difference value between the calibrated weight and the first amplitude value; Determine the weight range between the second difference value and the first difference value, and the weight range between the first sum value and the second sum value as the second weight range and the third weight range where there is a possibility that the recognition result is the first type of recognition result; wherein, the second difference value is: the difference value between the calibrated weight and the second amplitude value, and the second sum value is: the sum value of the calibrated weight and the second amplitude value.

7. The method according to claim 6, wherein The step of determining the calibration coefficient according to the magnitude relationship between the correlation coefficient and the preset coefficient threshold includes: If the correlation coefficient is less than the preset coefficient threshold, then determine the coefficient threshold as the calibration coefficient; If the correlation coefficient is not less than the coefficient threshold, then determine the correlation coefficient as the calibration coefficient.

8. The method according to claim 6, characterized in that, The step of calculating the first amplitude value and the second amplitude value using the calibration coefficient and the calibration distance includes: Calculate the first amplitude value and the second amplitude value using the first formula and the second formula; Wherein, the first formula is: r = nR * cor - R The second formula is: d = mR * cor - R Wherein, r is the first amplitude value, d is the second amplitude value, cor is the calibration coefficient, R is the calibration distance, m and n are respectively predetermined adjustment coefficients, and m > n.

9. The method according to any one of claims 1-8, characterized in that The step of determining the target recognition result of the item to be recognized based on the corresponding relationship and the target weight includes: Determine the target recognition probability corresponding to the target weight from the corresponding relationship; If the target recognition probability is greater than the preset recognition threshold, then determine that the recognition result of the item to be recognized is the first type of recognition result.

10. The method according to claim 1, characterized in that Before the step of determining the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient, the method further includes: Determine the magnitude relationship between the correlation coefficient and the preset coefficient threshold; If the correlation coefficient is less than the coefficient threshold, determine that the recognition result of the item to be recognized is the second type of recognition result; If the correlation coefficient is not less than the coefficient threshold, execute the step of determining the corresponding relationship between the item weight and the recognition probability under the correlation characterized by the correlation coefficient.

Citation Information

Patent Citations

  • Product detection method and device

    CN108680240A

  • Article identification method and device, electronic equipment and readable storage medium

    CN111310618A