A method and system for checking goods storage data
By scanning and hashing the outer packaging of the pledged goods to verify the location of the label attachment area, the problem of the lack of supervision and verification mechanism before the pledged goods are put into storage is solved, and the authenticity verification and safety guarantee of the goods are achieved. .
Patent Information
- Application Number
- CN202410822216.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-06-25
AI Technical Summary
The lack of an independent supervision and verification mechanism before the pledged goods are put into storage leads to potential fraud or illegal behavior and increases the risk of loan defaults and bank losses.
By scanning the outer packaging of the pledged goods to be put into storage, obtain its flat model, detect the printing area, calculate the hash value, divide the sub-areas, determine the label attachment area, and compare the location difference between the label attachment area and the actual attachment area. , verify the authenticity of the goods and ensure that only legally pledged goods are approved for storage.
It effectively reduces erroneous warehousing and fraud, enhances the credibility and safety of pledged goods, and ensures identity verification and regulatory transparency of pledged goods.
Smart Images

Figure CN118379133B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pledged goods verification, and more specifically, to a method and system for verifying goods warehousing data. Background Art
[0002] After the cargo owner pledges the goods to the bank and obtains a loan, the cargo owner entrusts the transporter to transport the pledged goods and store them in the warehouse of the warehousing party.
[0003] In the related technology, for example, the patent application document with the authorization announcement number CN111539803A discloses a pledge financing monitoring method, system and computer-readable storage medium, including: obtaining financing party data and warehouse operator data, verifying the authenticity of the warehouse operator data and / or the financing party data, receiving a pledge financing request, the pledge financing request includes at least pledge data determined based on the warehouse operator data that has been verified for authenticity, determining a first pledge value of at least part of the pledge based on the pledge data, determining a second pledge value of at least part of the pledge based on data obtained by actual inventory of at least part of the pledge, and if the first pledge value and the second pledge value do not match, generating a pledge abnormality result representing the abnormality of the pledge; the problem of pledge fraud can be effectively prevented.
[0004] The relevant technology only supervises and verifies the pledged goods stored in the warehouse. However, since the pledged goods are usually high-value goods, if there is no independent supervision and verification mechanism before the pledged goods are put into storage, the cargo party or the transport party may replace the high-value pledged goods with low-value non-pledged goods, resulting in potential fraud or illegal activities, which in turn challenges the authenticity of the pledged goods and increases the risk of loan defaults and bank losses.
[0005] Therefore, there is an urgent need for a goods warehousing data verification method to supervise and verify the pledged goods to be stored before they are stored. Summary of the invention
[0006] In order to solve the technical problem that there is a lack of independent supervision and verification mechanism before the pledged goods are put into storage, which leads to potential fraud or illegal behavior, and then the authenticity of the pledged goods is challenged, increasing the risk of loan default and bank loss, the present invention provides solutions in the following aspects.
[0007] In a first aspect, the present invention provides a method for verifying goods warehousing data, comprising: scanning the outer packaging of pledged goods to be stored, obtaining a first plane model of the outer packaging of the pledged goods to be stored, the first plane model comprising a label attachment area and a printing area; performing character detection on the printing area to obtain first goods information of the pledged goods to be stored; obtaining a first attachment area of the label on the outer packaging of the pledged goods to be stored according to the first goods information and the supervision information of the supervisor; verifying whether the pledged goods to be stored are real pledged goods by comparing the position difference between the label attachment area and the first attachment area, so as to facilitate the entry of real pledged goods into the warehouse. library; the method for obtaining the first attachment area is: according to the hash value of the first cargo information, multiple sample points are determined in the first plane model; the first plane model is divided into multiple sub-areas according to the sample points; according to the shape and area relationship between the blank area that does not belong to the printed area in the sub-area and the label, multiple target sub-areas are obtained, and the probability of the target sub-area being the first attachment area of the label is calculated; the hash value of the supervision information is converted into a decimal and used as the result of arithmetic coding; according to the probability of all target sub-areas being the first attachment area of the label, the result of arithmetic coding is decoded, and the last target sub-area in the decoded result is used as the first attachment area.
[0008] By comparing the position difference between the label attachment area and the first attachment area, the authenticity of the pledged goods can be verified, which effectively reduces the occurrence of incorrect warehousing and fraud, enhances the credibility of the pledged goods entering the warehouse, and ensures the identity verification and security of the pledged goods through accurate identification and comparison of the label attachment area, which helps prevent illegal pledged goods or unauthorized pledged goods from entering the warehouse.
[0009] By conducting independent supervision and verification before the pledged goods are put into storage, we can avoid the situation where the cargo owner or the transporter replaces the high-value pledged goods with low-value non-pledged goods, and ensure that only legal pledged goods are approved for storage, effectively improving the transparency and security of the pledged goods supervision.
[0010] In one embodiment, it also includes: scanning the outer packaging of the unlabeled pledged goods to obtain a second plane model of the outer packaging of the unlabeled pledged goods, the second plane model including a printing area; performing character detection on the printing area of the second plane model to obtain second goods information of the unlabeled pledged goods; obtaining a second attachment area of the label on the outer packaging of the unlabeled pledged goods based on the second goods information and the supervision information of the supervisor; pasting the label on the blank space of the second attachment area on the outer packaging of the unlabeled pledged goods to obtain labeled pledged goods, the blank space of the second attachment area refers to the part that does not belong to the printing area, and the pledged goods to be stored are all labeled pledged goods.
[0011] When labeling the unlabeled pledged goods, the second cargo information of the unlabeled pledged goods and the supervisory information of the supervisor are combined to obtain the second attachment area of the label on the outer packaging of the unlabeled pledged goods, and the label is affixed in the second attachment area. By setting the label affixing position, it helps to ensure the accuracy and integrity of the label, and ensure that the label is not easily maliciously changed or removed, thereby reducing the counterfeiting of pledged goods and protecting the safety of the pledged goods.
[0012] In one embodiment, verifying whether the pledged goods to be stored in the warehouse are real pledged goods by comparing the position difference between the label attachment area and the first attachment area includes: calculating the Euclidean distance between the center of the label attachment area and the center of the first attachment area; in response to the Euclidean distance being greater than a preset threshold, indicating that the pledged goods to be stored in the warehouse are counterfeit pledged goods; in response to the Euclidean distance being not greater than the preset threshold, indicating that the pledged goods to be stored in the warehouse are real pledged goods.
[0013] In one embodiment, the method of determining multiple sample points in the first plane model based on the hash value of the first cargo information includes: dividing the hash value of the first cargo information into multiple subsequences, requiring that the division be performed in order from left to right, and the division be performed after the last 0 of multiple consecutive 0s, wherein if the subsequence contains only 0, the maximum length of the subsequence is equal to 1, otherwise, the maximum length of the subsequence is equal to L, where L represents a preset length; converting all subsequences into decimal data, and in order from left to right, forming a coordinate with every two decimal data to obtain the sample points corresponding to the coordinates in the first plane model of the outer packaging of the pledged cargo to be stored.
[0014] The hash value of the first cargo information obtained by the hash function enables different pledged cargoes to have different sample points determined in the first plane model according to the hash value of the first cargo information, to divide different first plane models into different sub-areas according to different sample points, and to subsequently select different first attachment areas from the sub-areas, thereby enhancing the anti-counterfeiting capability of the label on the pledged cargo.
[0015] In one embodiment, dividing the first plane model into multiple sub-areas according to the sample points includes: dividing the first plane model into multiple polygons according to the sample points by the Thiessen polygon method, and each obtained polygon contains and only contains one sample point; and using the obtained polygons as sub-areas.
[0016] In one embodiment, the method obtains multiple target sub-regions based on the shape and area size relationship between the blank area in the sub-region that does not belong to the printed area and the label, including: obtaining the blank area in each sub-region that does not belong to the printed area; for any sub-region, obtaining the maximum inscribed rectangle of the blank area in the sub-region, and in response to the length of the long side of the maximum inscribed rectangle of the blank area being not less than the length of the long side of the label, and the long side of the short side of the maximum inscribed rectangle of the blank area being not less than the long side of the short side of the label, the sub-region is taken as the target sub-region.
[0017] For the selected target sub-region, the shape and area of its largest inscribed rectangle are required to completely contain the shape and area of the label, so as to ensure that the label subsequently pasted in the first attachment area of the label selected from the target sub-region will not cover the printed first cargo information, thereby ensuring the integrity of the first cargo information.
[0018] In one embodiment, the calculation of the probability of the target sub-region being the first attachment region of the label includes: summing the initial probabilities of all target sub-regions being the first attachment region of the label, recording it as a first sum value; recording the ratio of the initial probability of each target sub-region being the first attachment region of the label to the first sum value as the probability of each target sub-region being the first attachment region of the label; wherein the initial probability of the target sub-region being the first attachment region of the label ; In the formula, represents the hyperbolic tangent function, S1 and S2 represent the blank area and the area of the label of the target sub-region, L and C represent the length of the long side and the length of the short side of the label, respectively. The angle is The length of the first straight line, The angle is The length of the second straight line corresponding to the first straight line.
[0019] In one embodiment, a method for obtaining the length of the first straight line and the length of the second straight line includes: calculating the center of gravity of the blank area of the target sub-area, and drawing two perpendicular straight lines along the center of gravity, which are respectively recorded as the first straight line and the second straight line, wherein the angle of the first straight line ranges from [0,90], and the angle refers to the angle with the horizontal direction; recording the second straight line perpendicular to the first straight line as the second straight line corresponding to the first straight line; recording the distance between the two intersection points of the first straight line and the blank area as the length of the first straight line, and recording the distance between the two intersection points of the second straight line and the blank area as the length of the second straight line.
[0020] In one embodiment, the decoding of the result of arithmetic coding according to the probability of all target sub-regions being the first attachment area of the label includes: dividing the target interval obtained in the previous iteration into intervals according to the probability of each target sub-region being the first attachment area of the label to obtain intervals corresponding to each target sub-region, using the interval containing the result of arithmetic coding as the target interval obtained in the current iteration, and using the target sub-region corresponding to the target interval obtained in the current iteration as the decoding result obtained in the current iteration; performing multiple iterations according to the above method until the number of iterations reaches K, and then stopping the iteration, where K represents a preset number of times.
[0021] The result of arithmetic coding is obtained based on the regulatory information of the regulator, and the probability of the target sub-area being the first attachment area of the label is obtained based on the first cargo information and the first plane model of the pledged goods to be stored. Therefore, the decoding result of the obtained arithmetic coding result integrates the regulatory information of the regulator, the first cargo information and the first plane model of the pledged goods to be stored, which can more comprehensively ensure the safety of the pledged goods and help prevent illegal pledged goods or unauthorized pledged goods from entering the warehouse.
[0022] In a second aspect, the present invention provides a goods warehousing data verification system, which adopts the following technical solution:
[0023] A goods entry data verification system includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned goods entry data verification method is implemented.
[0024] By adopting the above technical solution, the above-mentioned method for checking the data of goods entering the warehouse is generated into a computer program and stored in the memory so as to be loaded and executed by the processor, thereby making a terminal device based on the memory and the processor for easy use.
[0025] The beneficial effects of the present invention are:
[0026] By comparing the position difference between the label attachment area and the first attachment area, the authenticity of the pledged goods can be verified, which effectively reduces the occurrence of erroneous warehousing and fraudulent behavior, enhances the credibility of the pledged goods entering the warehouse, and ensures the identity verification and security of the pledged goods through accurate identification and comparison of the label attachment area, which helps prevent illegal pledged goods or unauthorized pledged goods from entering the warehouse;
[0027] Furthermore, by conducting independent supervision and verification before the pledged goods are put into storage, it is possible to avoid the situation where the cargo owner or the transporter replaces the high-value pledged goods with low-value non-pledged goods, ensuring that only legal pledged goods are approved for storage, thereby effectively improving the transparency and security of the pledged goods supervision. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below through the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0029] Figure 1 is a flow chart schematically illustrating a method for checking goods warehousing data in the present invention;
[0030] Figure 2 is a flow chart schematically illustrating step S2 in the present invention;
[0031] Figure 3 This is a schematic diagram of the division results of the first plane model. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0033] It should be noted that after the cargo owner pledges the goods to the bank and obtains a loan, the cargo owner entrusts the transporter to transport the pledged goods and store them in the warehouse of the warehousing party, which is designated by the bank; since the goods used for pledge are usually high-value goods, before the pledged goods are put into storage, if there is no independent supervision and verification mechanism, the cargo owner or the transporter may replace the high-value pledged goods with low-value non-pledged goods, resulting in potential fraud or illegal behavior, which in turn challenges the authenticity of the pledged goods and increases the risk of loan default and bank losses.
[0034] Therefore, this embodiment proposes a method for verifying the data of goods entering the warehouse, which is used to supervise and verify the pledged goods to be entered into the warehouse before the pledged goods are entered into the warehouse, specifically including: after accepting the entrustment of the goods party and the bank, the supervisor supervises and verifies the pledged goods; wherein, the supervision process refers to: the supervisor inspects the pledged goods provided by the goods party, and when the inspection is correct, affixes a label at a specific position of the outer packaging of the pledged goods, and hands over the pledged goods with the label to the transport party for transportation; the verification process refers to: after the transport party transports the pledged goods with labels to the warehousing party, these pledged goods with labels are all pledged goods to be entered into the warehouse, and the supervisor verifies the pasting position of the label pasted on the outer packaging of the pledged goods to be entered into the warehouse, and verifies whether the pledged goods to be entered into the warehouse are real pledged goods, so as to facilitate the warehousing of the real pledged goods.
[0035] The tag is an RFID (Radio Frequency Identification) tag, which is a technology used to identify and track objects and is widely used in logistics, warehousing, supply chain supervision and other fields.
[0036] Wherein, the step of attaching a label to a specific position of the outer packaging of the pledged goods includes:
[0037] 1. Scan the outer packaging of the unlabeled pledged goods to obtain a second plane model of the outer packaging of the unlabeled pledged goods, where the second plane model includes a printing area; perform character detection on the printing area of the second plane model to obtain second goods information of the unlabeled pledged goods.
[0038] 2. According to the second cargo information and the supervisory information of the supervisor, obtain the second attachment area of the label on the outer packaging of the unlabeled pledged cargo.
[0039] 3. Paste the label on the blank area of the second attachment area on the outer packaging of the pledged goods without labels to obtain pledged goods with labels, wherein the blank area of the second attachment area refers to the part that does not belong to the printing area.
[0040] It should be noted that when labeling the unlabeled pledged goods, the second cargo information of the unlabeled pledged goods and the supervisory information of the supervisor are combined to obtain the second attachment area of the label on the outer packaging of the unlabeled pledged goods, and the label is affixed in the second attachment area. By setting the label's affixing position, it helps to ensure the accuracy and integrity of the label, and ensure that the label is not easily maliciously changed or removed, thereby reducing the counterfeiting of pledged goods and protecting the safety of the pledged goods.
[0041] The checking of the pasting position of the label pasted on the outer packaging of the pledged goods to be stored includes:
[0042] 1. Scan the outer packaging of the pledged goods to be stored to obtain a first plane model of the outer packaging of the pledged goods to be stored, wherein the first plane model includes a label attachment area and a printing area; perform character detection on the printing area to obtain first goods information of the pledged goods to be stored.
[0043] 2. According to the first cargo information and the supervisory information of the supervisor, obtain the first attachment area of the label on the outer packaging of the pledged cargo to be stored.
[0044] 3. By comparing the position difference between the label attachment area and the first attachment area, verify whether the pledged goods to be put into storage are real pledged goods, so as to facilitate the storage of real pledged goods.
[0045] It should be noted that this embodiment verifies the authenticity of the pledged goods by comparing the position difference between the label attachment area and the first attachment area, effectively reduces the occurrence of erroneous warehousing and fraud, enhances the credibility of the pledged goods entering the warehouse, ensures the identity verification and security of the pledged goods by accurately identifying and comparing the label attachment area, and helps prevent illegal pledged goods or unauthorized pledged goods from entering the warehouse.
[0046] It should be further explained that this embodiment prevents the cargo party or the transport party from replacing high-value pledged goods with low-value non-pledged goods by conducting independent supervision and verification before the pledged goods are put into storage, thereby ensuring that only legal pledged goods are approved for storage, thereby effectively improving the transparency and security of pledged goods supervision.
[0047] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0048] The embodiment of the present invention discloses a method for checking the data of goods entering the warehouse, referring to Figure 1 , comprising steps S1 to S3:
[0049] S1. Scanning the outer packaging of the pledged goods to be stored, obtaining a first plane model of the outer packaging of the pledged goods to be stored, performing character detection on the printed area of the first plane model, and obtaining first goods information of the pledged goods to be stored.
[0050] It should be noted that the pledged goods to be stored are usually packaged in corrugated boxes, the outer packaging of the pledged goods to be stored is a cube, and the cargo information of the pledged goods to be stored is printed on one side of the outer packaging of the pledged goods to be stored.
[0051] Specifically, the outer packaging of the pledged goods to be stored is scanned by a handheld scanner to obtain a first plane model of the outer packaging of the pledged goods to be stored, wherein the first plane model reflects the surface shape and size of the outer packaging of the pledged goods to be stored, and the first plane model is divided into a label attachment area, a printing area and a blank area.
[0052] Among them, this embodiment scans the outer packaging of the pledged goods to be stored, mainly to obtain the printed area on the outer packaging of the pledged goods to be stored. Therefore, this embodiment does not scan all sides of the outer packaging of the pledged goods to be stored, but scans the sides with the goods information printed on all sides of the outer packaging of the pledged goods to be stored.
[0053] Furthermore, the handheld scanner stores an electronic document of the label. When scanning the outer packaging of the pledged goods to be stored, the label is first compared with the surface of the outer packaging of the pledged goods to be stored to determine the label attachment area, and then character detection is performed in other areas except the label attachment area. The area where the characters exist is used as the printing area, and the remaining area is used as the blank area.
[0054] The first plane model is a two-dimensional model, and therefore, the first plane model includes a horizontal coordinate and a vertical coordinate; wherein the unit length of the horizontal coordinate is , the unit length of the ordinate is , L represents the preset length, B1 represents the length of the side of the first plane model parallel to the horizontal direction, and B2 represents the length of the side of the first plane model parallel to the vertical direction; in the first plane model, the range of the horizontal and vertical coordinates is [1, ].
[0055] Among them, the specific value of the preset length can be set according to the actual application scenario and requirements, and the preset length is an integer not less than 4. The present invention sets the preset number to 7.
[0056] Furthermore, when performing character detection, the OCR (Optical Character Recognition) text recognition function of the handheld scanner is used to perform character recognition on the printed area on the outer packaging of the pledged goods to be stored, and the result of the character recognition is used as the first goods information of the pledged goods to be stored.
[0057] The cargo information includes but is not limited to production date, specification parameters, shelf life, ingredients, storage conditions, approval number, manufacturer, product name, and product batch number.
[0058] It should be noted that, in the process of sticking labels on specific positions of the outer packaging of the pledged goods, "scanning the outer packaging of the unlabeled pledged goods to obtain a second plane model of the outer packaging of the unlabeled pledged goods, the second plane model including a printing area; performing character detection on the printing area of the second plane model to obtain the second goods information of the unlabeled pledged goods" is the same as the above-mentioned step of "scanning the outer packaging of the pledged goods to be stored in the warehouse to obtain a first plane model of the outer packaging of the pledged goods to be stored in the warehouse, performing character detection on the printing area of the first plane model to obtain the first goods information of the pledged goods to be stored in the warehouse", and will not be repeated here.
[0059] S2. According to the first cargo information and the supervisory information of the supervisor, a first attachment area of the label on the outer packaging of the pledged cargo to be stored is obtained.
[0060] The flowchart of step S2 is shown in FIG. Figure 2 , including steps S201 to S204:
[0061] S201. Determine a plurality of sample points in a first plane model according to a hash value of the first cargo information.
[0062] It should be noted that, for the same batch of pledged goods, the printing area is the same, and most of the contents in the first goods information in the printing area are also the same, such as: specification parameters, shelf life, ingredients, storage conditions, approval number, manufacturer, product name, and only a small part of the contents are different, such as: production date, serial number, batch number; in order to ensure that the first attachment area of the label can ensure the identity of the pledged goods and prevent illegal pledged goods or unauthorized pledged goods from entering the warehouse, it is required that according to the first goods information of different pledged goods and the supervision information of the supervisor, the first attachment area of the label on the outer packaging of the pledged goods to be entered into the warehouse is different. Therefore, in this embodiment, for the first goods information with smaller differences, the first goods information is converted into a hash value with larger differences through a hash function, so that for different pledged goods, the sample points determined in the first plane model according to the hash value of the first goods information are different, the different first plane models are divided into multiple sub-areas according to different sample points, and the first attachment areas subsequently selected from the sub-areas are different.
[0063] Specifically, a hash value of the first cargo information is obtained through a hash function, where the hash value is a binary sequence, and the binary sequence refers to a sequence consisting of 0s and 1s.
[0064] The hash function includes but is not limited to the MD4 algorithm, the MD5 algorithm, and the SHA-1 algorithm; wherein the hash values output by the MD4 algorithm and the MD5 algorithm are both 128-bit binary sequences, and the hash value output by the SHA-1 algorithm is a 160-bit binary sequence.
[0065] Furthermore, the hash value is a binary sequence composed of 0 and 1, and the hash value of the first cargo information is divided into multiple subsequences. It is required that the division is performed in order from left to right, and the division is performed after the last 0 of multiple consecutive 0s. If the subsequence only contains 0, the maximum length of the subsequence is equal to 1, otherwise, the maximum length of the subsequence is equal to L, where L represents a preset length.
[0066] Among them, the specific value of the preset length can be set according to the actual application scenario and requirements, and the preset length is an integer not less than 4. The present invention sets the preset length to 7.
[0067] Exemplarily, when the hash value of the first cargo information is “{0,1,0,0,1,0,1,0,0,0,0,0,0,0,1,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,0,0,1,0,1,1,1,0,1,…,1,0,0,1}”, the hash value of the first cargo information is divided into multiple subsequences, and the obtained subsequences are: {0}, {1,0,0}, {1,0}, {1,0}, {1,0,0,0,0}, {0}, {1,0}, {1,1,1,0,0,0}, {1,1,1,1,1,1}, {1,1,0,0}, {1,0}, {1,1,1,0},…, {1}.
[0068] Furthermore, the subsequence belongs to a binary sequence, and all subsequences are converted into decimal data. In order from left to right, every two decimal data are combined into a coordinate to obtain the sample point corresponding to the coordinate in the first plane model of the outer packaging of the pledged goods to be stored; it should be noted that when the number of divided subsequences is an odd number, after every two decimal data are combined into a coordinate, the last decimal data will be left, and the last decimal data and 0 will be combined into a coordinate.
[0069] Exemplarily, for the obtained subsequences {0}, {1,0,0}, {1,0}, {1,1,0,0,0,0,0}, {0}, {0}, {1,0}, {1,1,1,0,0,0}, {1,1,1,1,1,1,1}, {1,1,0,0}, {1,0}, {1,1,1,0}, …, {1}, these subsequences are converted into decimal data: 0, 4, 2, 96, 0, 0, 2, 56, 127, 12, 2, 14, …, 1; every two decimal data form a coordinate, and all the obtained coordinates are (0, 4), (2, 96, (0, 0), (2, 56), (127, 12), (2, 14), …, (1, 0).
[0070] It should be noted that the hash value of the first cargo information obtained by the hash function makes it possible for different pledged cargoes to have different sample points determined in the first plane model according to the hash value of the first cargo information, and for different first plane models to be divided into different sub-areas according to different sample points, and for different first attachment areas to be subsequently selected from the sub-areas, thereby enhancing the anti-counterfeiting capability of the label on the pledged cargo.
[0071] S202. Divide the first plane model into a plurality of sub-areas according to the sample points.
[0072] Specifically, the first plane model is divided into a plurality of polygons according to the sample points by using the Thiessen polygon method, and each obtained polygon contains and only contains one sample point; and the obtained polygons are used as sub-regions.
[0073] Among them, the Thiessen Polygon method is also called the Voronoi diagram. By connecting the perpendicular bisectors of the straight line between every two sample points, a continuous polygon is obtained. The Thiessen Polygon method is a well-known technology and will not be described here.
[0074] For example, in Figure 3 In the schematic diagram of the division result of the first plane model shown, the black points are sample points, and the black lines are segmentation lines. The segmentation lines divide the first plane model into multiple sub-areas, and each sub-area contains and only contains one sample point.
[0075] S203. According to the shape and area relationship between the blank area in the sub-area that does not belong to the printed area and the label, obtain and calculate the probability that the target sub-area is used as the first attachment area of the label.
[0076] Specifically, the blank areas in each sub-area that do not belong to the printed area are obtained; for any sub-area, the maximum inscribed rectangle of the blank area in the sub-area is obtained, and in response to the length of the long side of the maximum inscribed rectangle of the blank area being not less than the length of the long side of the label, and the long side of the short side of the maximum inscribed rectangle of the blank area being not less than the long side of the short side of the label, the sub-area is taken as the target sub-area.
[0077] It should be noted that, for the selected target sub-region, the shape and area of its largest inscribed rectangle are required to completely contain the shape and area of the label, so as to ensure that the label subsequently pasted in the first attachment area of the label selected from the target sub-region will not cover the printed first cargo information, thereby ensuring the integrity of the first cargo information.
[0078] Further, according to the relationship between the shape and area of the blank area in the sub-area and the label, the probability of the target sub-area being the first attachment area of the label is calculated, including: calculating the center of gravity of the blank area of the target sub-area, and drawing two mutually perpendicular straight lines along the center of gravity, which are respectively recorded as the first straight line and the second straight line, wherein the value range of the angle of the first straight line is [0,90], and the angle refers to the angle with the horizontal direction, and the second straight line perpendicular to the first straight line is recorded as the second straight line corresponding to the first straight line; the distance between the two intersection points of the first straight line and the blank area is recorded as the length of the first straight line, and the distance between the two intersection points of the second straight line and the blank area is recorded as the length of the second straight line.
[0079] Then the initial probability of the target sub-region being the first attachment region of the label satisfies the expression:
[0080] ;
[0081] Where P represents the initial probability of the target sub-region being the first attached region of the label, represents the hyperbolic tangent function, S1 represents the area of the blank area of the target sub-region, S2 represents the area of the label, L and C represent the length of the long side and the length of the short side of the label respectively. The angle is The length of the first straight line, The angle is The length of the second straight line corresponding to the first straight line, represents the maximum value function, Represents the minimum value function.
[0082] It should be noted that the ratio of the blank area of the target sub-region to the area of the label is The larger the value is, the more positions can be selected when pasting the label in the target sub-area, and the more likely it is that the target sub-area will be used as the first attachment area of the label, and the greater the initial probability of the target sub-area being used as the first attachment area of the label; if the shape of the blank area can completely contain the label, then using the target sub-area as the first attachment area of the label can ensure that the first cargo information printed on the label that is subsequently pasted in the first attachment area will not be covered, thereby ensuring the integrity of the first cargo information; therefore, the ratio of the length of the first straight line and the second straight line in the blank area to the length of the long side and the short side of the label The larger it is, the more the shape of the blank area can completely contain the label, and the greater the initial probability that the target sub-area is the first attachment area of the label.
[0083] Furthermore, the sum of the initial probabilities of all target sub-regions being the first attachment region of the label is recorded as the first sum value; the ratio of the initial probability of each target sub-region being the first attachment region of the label to the first sum value is recorded as the probability of each target sub-region being the first attachment region of the label, thereby achieving the normalization operation of the initial probability of each target sub-region being the first attachment region of the label.
[0084] Exemplarily, there are 5 target sub-regions obtained, namely Q1, Q2, Q3, Q4 and Q5. The calculated initial probabilities of each target sub-region as the first attachment region of the label are 0.81, 0.93, 0.27, 0.45 and 0.54, respectively. The first sum is 0.81+0.93+0.27+0.45+0.54=3, and the probability of each target sub-region being the first attachment region of the label is 0.81÷3=0.27, 0.93÷3=0.31, 0.27÷3=0.09, 0.45÷3=0.15, and 0.54÷3=0.18, respectively.
[0085] S204. Convert the hash value of the supervision information into a decimal and use it as the result of arithmetic coding. Decode the result of arithmetic coding according to probability to obtain the first attachment area.
[0086] Specifically, the hash value of the regulatory information is converted into a decimal and used as the result of arithmetic coding; the result of arithmetic coding is decoded according to the probability that all target sub-regions are the first attached region of the label, and the last target sub-region in the decoded result is used as the first attached region.
[0087] The process of decoding the result of arithmetic coding includes multiple iterations, specifically: according to the probability of each target sub-region being the first attachment area of the label, the target interval obtained in the previous iteration is divided into intervals to obtain the intervals corresponding to each target sub-region, and the interval containing the result of arithmetic coding is used as the target interval obtained in the current iteration, and the target sub-region corresponding to the target interval obtained in the current iteration is used as the decoding result obtained in the current iteration; multiple iterations are performed according to the above method until the number of iterations reaches K, and the iteration is stopped, where K represents a preset number; it should be specially noted that in the first iteration, there is no previous iteration for the first iteration, and therefore, according to the probability of each target sub-region being the first attachment area of the label, the initial range [0,1] is divided into intervals.
[0088] The specific value of the preset number of times can be set according to the actual application scenario and requirements, and the preset number of times is an integer between [30, 200]. The present invention sets the preset number of times to 100.
[0089] It should be noted that the result of arithmetic coding is obtained based on the regulatory information of the regulator, and the probability of the target sub-area being the first attachment area of the label is obtained based on the first cargo information and the first plane model of the pledged goods to be stored. Therefore, the decoding result of the obtained arithmetic coding result integrates the regulatory information of the regulator, the first cargo information and the first plane model of the pledged goods to be stored, which can more comprehensively ensure the safety of the pledged goods and help prevent illegal pledged goods or unauthorized pledged goods from entering the warehouse.
[0090] Exemplarily, when the probabilities of the five target sub-areas Q1, Q2, Q3, Q4 and Q5 being the first attachment area of the label are 0.27, 0.31, 0.09, 0.15 and 0.18 respectively, and the hash value of the regulatory information is 10110001111100010000010111001010, the hash value of the regulatory information is converted into a decimal, and the corresponding decimal is 0.2985362890. The decimal is used as the result of arithmetic coding, and the result of arithmetic coding is 0.2985362890. The result of arithmetic coding is decoded, and the decoding process is:
[0091] (1) According to the probability of the target sub-regions Q1, Q2, Q3, Q4 and Q5 being the first attachment region of the label, the initial range [0,1] is divided into 5 intervals, namely [0,0.27), [0.27,0.58), [0.58,0.67), [0.67,0.82), and [0.82,0.1]. At this time, the arithmetic coding result 0.2985362890 is in the second interval [0.27,0.58). The second interval is taken as the target interval obtained in the first iteration, and the target sub-region Q2 corresponding to the target interval is taken as the decoding result obtained in the first iteration;
[0092] (2) According to the probability of the target sub-regions Q1, Q2, Q3, Q4 and Q5 being the first attachment region of the label, the target interval [0.27, 0.58) obtained in the first iteration is divided into 5 intervals, namely [0.27, 0.3537), [0.3537, 0.4498), [0.4498, 0.4777), [0.4777, 0.5242), and [0.5242, 0.58). At this time, the arithmetic coding result 0.2985362890 is within the first interval [0.27, 0.3537). The first interval is taken as the target interval obtained in the second iteration, and the target sub-region Q1 corresponding to the target interval is taken as the decoding result obtained in the second iteration.
[0093] (3) According to the probability of the target sub-regions Q1, Q2, Q3, Q4 and Q5 being the first attachment region of the label, the target interval [0.27, 0.3537) obtained in the second iteration is divided into 5 intervals, namely [0.27, 0.292599), [0.292599, 0.318546), [0.318546, 0.326079), [0.326079, 0.338634), and [0.338634, 0.3537). At this time, the arithmetic coding result 0.2985362890 is within the second interval [0.292599, 0.318546). The second interval is taken as the target interval obtained in the third iteration, and the target sub-region Q2 corresponding to the target interval is taken as the decoding result obtained in the third iteration.
[0094] (4) This process is repeated in the same way until the Kth iteration, when the target interval obtained in the Kth iteration is obtained, and the target sub-region corresponding to the target interval, i.e., the target sub-region Q4, is used as the decoding result obtained in the Kth iteration;
[0095] (5) The last target sub-region in the decoding result, namely, the target sub-region Q4, is used as the first attachment region.
[0096] It should be noted that, in the process of sticking labels on specific positions of the outer packaging of the pledged goods, the step of "obtaining a second attachment area of the label on the outer packaging of the unlabeled pledged goods based on the second goods information and the supervisory information of the supervisor" is the same as the above-mentioned step of "obtaining the first attachment area of the label on the outer packaging of the pledged goods to be stored based on the first goods information and the supervisory information of the supervisor", and will not be repeated here.
[0097] S3. By comparing the position difference between the label attachment area and the first attachment area, verify whether the pledged goods to be stored are real pledged goods, so as to facilitate the storage of the real pledged goods.
[0098] It should be noted that, in the process of transporting pledged goods, there may be a situation where the cargo party or the transport party replaces high-value pledged goods with low-value non-pledged goods. For example, the label is torn off the outer packaging of the pledged goods to be stored, and then pasted on the outer packaging of other non-pledged goods to counterfeit the pledged goods; or the label is counterfeited and pasted on the outer packaging of other non-pledged goods to counterfeit the pledged goods, resulting in the authenticity of the pledged goods being challenged and the interests of all parties being damaged. In order to identify counterfeit pledged goods, this embodiment verifies whether the pledged goods to be stored are real pledged goods by comparing the position difference between the label attachment area and the first attachment area, so as to facilitate the storage of the real pledged goods.
[0099] Specifically, the Euclidean distance between the center of the label attachment area and the center of the first attachment area is calculated; in response to the Euclidean distance being greater than a preset threshold, it is indicated that the pledged goods to be stored are counterfeit pledged goods, and the counterfeit pledged goods are refused to be stored; in response to the Euclidean distance being not greater than the preset threshold, it is indicated that the pledged goods to be stored are real pledged goods, and the real pledged goods are stored.
[0100] The specific value of the preset threshold can be set according to the actual application scenario and requirements, and the value range of the preset threshold is , the present invention sets the preset threshold value to , L and C represent the length of the long side and the length of the short side of the label respectively.
[0101] An embodiment of the present invention further discloses a goods entry data verification system, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a goods entry data verification method according to the present invention is implemented.
[0102] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.
[0103] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0104] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A method for checking goods warehousing data, characterized in that: include: Scanning the outer packaging of the pledged goods to be stored to obtain a first plane model of the outer packaging of the pledged goods to be stored, wherein the first plane model includes a label attachment area and a printing area; Perform character detection on the printed area to obtain the first cargo information of the pledged cargo to be put into storage; According to the first cargo information and the supervisory information of the supervisor, a first attachment area of the label on the outer packaging of the pledged cargo to be put into storage is obtained; by comparing the position difference between the label attachment area and the first attachment area, whether the pledged cargo to be put into storage is the real pledged cargo is verified, so as to facilitate the storage of the real pledged cargo; The method for obtaining the first attachment area is as follows: according to the hash value of the first cargo information, multiple sample points are determined in the first plane model; according to the sample points, the first plane model is divided into multiple sub-areas; according to the shape and area size relationship between the blank area in the sub-area that does not belong to the printed area and the label, multiple target sub-areas are obtained, and the probability of the target sub-area being the first attachment area of the label is calculated; the hash value of the supervision information is converted into a decimal and used as the result of arithmetic coding; according to the probability of all target sub-areas being the first attachment area of the label, the result of the arithmetic coding is decoded, and the last target sub-area in the decoded result is used as the first attachment area.
2. A method for checking goods warehousing data according to claim 1, characterized in that: Also includes: Scanning the outer packaging of the unlabeled pledged goods to obtain a second plane model of the outer packaging of the unlabeled pledged goods, wherein the second plane model includes a printing area; Performing character detection on the printed area of the second plane model to obtain second cargo information of the unlabeled pledged cargo; According to the second cargo information and the supervisory information of the supervisor, a second attachment area of the label on the outer packaging of the unlabeled pledged cargo is obtained; The label is pasted on the blank space of the second attachment area on the outer packaging of the unlabeled pledged goods to obtain the pledged goods with a label. The blank space of the second attachment area refers to the part that does not belong to the printing area. The pledged goods to be stored are all pledged goods with a label.
3. A method for checking goods warehousing data according to claim 1, characterized in that: The step of verifying whether the pledged goods to be stored are genuine pledged goods by comparing the position difference between the label attachment area and the first attachment area includes: calculating the Euclidean distance between the center position of the label attachment area and the center position of the first attachment area; In response to the Euclidean distance being greater than a preset threshold, it indicates that the pledged goods to be stored are counterfeit pledged goods; in response to the Euclidean distance being not greater than the preset threshold, it indicates that the pledged goods to be stored are real pledged goods.
4. A method for checking goods warehousing data according to claim 1, characterized in that: The step of determining a plurality of sample points in the first plane model according to the hash value of the first cargo information includes: Divide the hash value of the first cargo information into multiple subsequences, and require that the division be performed in order from left to right, and the division be performed after the last 0 of multiple consecutive 0s, wherein if the subsequence contains only 0, the maximum length of the subsequence is equal to 1, otherwise, the maximum length of the subsequence is equal to L, where L represents a preset length; Convert all subsequences into decimal data, and in order from left to right, combine every two decimal data into a coordinate to obtain the sample points corresponding to the coordinates in the first plane model of the outer packaging of the pledged goods to be stored.
5. A method for checking goods warehousing data according to claim 4, characterized in that: The step of dividing the first plane model into a plurality of sub-areas according to the sample points comprises: The first plane model is divided into a plurality of polygons according to the sample points by using the Thiessen polygon method, and each obtained polygon contains and only contains one sample point; the obtained polygons are used as sub-regions.
6. A method for checking goods warehousing data according to claim 5, characterized in that: The method of obtaining a plurality of target sub-regions according to the shape and area relationship between the blank region that does not belong to the printed region and the label includes: Obtain blank areas in each sub-area that do not belong to the printing area; for any sub-area, obtain the maximum inscribed rectangle of the blank area in the sub-area, and in response to the length of the long side of the maximum inscribed rectangle of the blank area being not less than the length of the long side of the label, and the length of the short side of the maximum inscribed rectangle of the blank area being not less than the length of the short side of the label, the sub-area is taken as the target sub-area.
7. A method for checking goods warehousing data according to claim 6, characterized in that: The calculating the probability of the target sub-region being the first attachment region of the label includes: The sum of the initial probabilities of all target sub-regions being the first attachment region of the label is recorded as the first sum value; the ratio of the initial probability of each target sub-region being the first attachment region of the label to the first sum value is recorded as the probability of each target sub-region being the first attachment region of the label; Among them, the initial probability of the target sub-region being the first attached region of the label is ; In the formula, represents the hyperbolic tangent function, S1 and S2 represent the blank area and the area of the label of the target sub-region, L and C represent the length of the long side and the length of the short side of the label, respectively. The angle is The length of the first straight line, The angle is The length of the second straight line corresponding to the first straight line; The method for obtaining the length of the first straight line and the length of the second straight line includes: Calculate the centroid of the blank area of the target sub-area, and draw two perpendicular straight lines along the centroid, which are respectively recorded as the first straight line and the second straight line. The angle of the first straight line ranges from [0,90], and the angle It refers to the angle between the first straight line and the horizontal direction; The second straight line perpendicular to the first straight line is recorded as the second straight line corresponding to the first straight line; the distance between the two intersection points of the first straight line and the blank area is recorded as the length of the first straight line, and the distance between the two intersection points of the second straight line and the blank area is recorded as the length of the second straight line.
8. A method for checking goods warehousing data according to claim 6 or 7, characterized in that: The decoding of the result of arithmetic coding according to the probability of all target sub-regions being the first attachment region of the label comprises: According to the probability that each target sub-region is used as the first attachment region of the label, the target interval obtained in the previous iteration is divided into intervals to obtain intervals corresponding to each target sub-region, and the interval containing the result of arithmetic coding is used as the target interval obtained in the current iteration, and the target sub-region corresponding to the target interval obtained in the current iteration is used as the decoding result obtained in the current iteration; The above method is used to perform multiple iterations until the number of iterations reaches K, and then the iterations are stopped, where K represents the preset number of iterations.
9. A goods warehousing data verification system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a method for verifying goods warehousing data according to any one of claims 1 to 8 is implemented.
