Sample identification generation method and device based on double two-dimensional code, equipment and medium

By setting dual QR codes on the surface of concrete samples and constructing random triangles and marker line segments, the problem of easy counterfeiting of static marking information is solved, thus improving the reliability of concrete sample submission for testing.

CN121659971BActive Publication Date: 2026-05-01ZHUHAI XINHUATONG SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHUHAI XINHUATONG SOFTWARE CO LTD
Filing Date
2026-02-06
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, the QR code identification information of concrete samples is easily counterfeited, which makes it impossible to guarantee the reliability of the submitted samples.

Method used

A sample identification generation method based on dual QR codes is adopted. By setting two QR codes on the surface of concrete samples, the identification information is dynamically generated using image processing technology to construct random triangles and identification line segments, thereby improving the reliability of sampling identification.

Benefits of technology

It effectively improves the reliability of submitted samples. By dynamically constructing identification information, it enhances the sensitivity to identify subtle differences in location and prevents samples from being switched.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121659971B_ABST
    Figure CN121659971B_ABST
Patent Text Reader

Abstract

The application provides a sample identification generation method and device based on double two-dimensional codes, equipment and a medium. The method comprises the following steps: obtaining a target image shot by a sampling terminal based on a target concrete sample, determining a first positioning area and a second positioning area corresponding to a positioning mark in the target image; randomly determining a first reference point in each first positioning area to construct a first triangle, and randomly determining a second reference point in each second positioning area to construct a second triangle; constructing a plurality of identification line segments based on the first triangle and the second triangle, and determining sampling identification information of the target concrete sample based on the identification line segments. The identification line segments can be constructed by randomly selecting reference points on the three sides of the triangle. In the case that there is a slight difference in the positions of the reference points, the graphical difference caused by the position difference is amplified through multiple graphical constructions, so that the reliability of the sampling identification information is effectively improved, and the method can be used for the construction of a new generation of mobile communication core network and access network.
Need to check novelty before this filing date? Find Prior Art

Description

Sample label generation method, apparatus, equipment, and medium based on dual QR codes Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device, and medium for generating sample labels based on dual QR codes. Background Technology

[0002] Concrete is an important building material. After concrete is delivered to the construction site, in order to verify whether its quality meets the building requirements, the person submitting the sample must fill several sampling boxes with concrete and send them for testing in the presence of a witness. To prevent the samples from being switched, some markers are added to the samples during the sampling process. The person submitting the sample takes a photo in the presence of a witness and uploads it. The system generates identification information based on the markers in the image. When verifying the sample, the testing personnel take another photo and compare the identification information of the two images to determine whether they match the submitted sample.

[0003] In related technologies, QR code labels or objects with special shapes are typically placed on the surface of concrete samples before they solidify, using the positional information of the QR code or multiple objects as identification information. However, this identification information relies on static image features of the objects, making them easily counterfeited by similar items. For example, the same QR code can be inserted into a tampered sample, or a counterfeit can be created based on the top view of an object with a special shape, and then a counterfeit with a similar top view can be inserted into a tampered sample. Therefore, static image features cannot be effectively used to distinguish between samples during verification, and the reliability of the submitted samples cannot be guaranteed. Summary of the Invention

[0004] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, this invention proposes a sample identification generation method, apparatus, device, and medium based on dual QR codes, which can dynamically generate identification information during sample collection by taking photos, thereby improving the reliability of submitted samples.

[0005] In a first aspect, embodiments of the present invention provide a sample identification generation method based on dual QR codes, applied to a server, wherein the server is communicatively connected to a sampling terminal, and the method includes:

[0006] The sampling terminal acquires a target image based on a target concrete sample, wherein the target image includes a first QR code and a second QR code, and the first QR code and the second QR code are set in different areas on the upper surface of the concrete sample.

[0007] Three first positioning regions and three second positioning regions are determined in the target image, wherein the first positioning regions correspond to the positioning marks of the first QR code, and the second positioning regions correspond to the positioning marks of the second QR code.

[0008] In each of the first positioning areas, a first reference point is randomly determined to construct a first triangle, and in each of the second positioning areas, a second reference point is randomly determined to construct a second triangle.

[0009] Multiple marker line segments are constructed based on the first triangle and the second triangle. Based on any one of the marker line segments, a first endpoint located in the first triangle and a second endpoint located in the second triangle are determined. At least one target point is randomly selected from the marker line segments, and the position of the target point is adjusted to be outside the corresponding marker line segment. Target marker lines are constructed based on the first endpoint, the second endpoint, and the adjusted target point. All the target marker lines are determined as sampling marker information, wherein the two ends of each marker line segment are located in the first triangle and the second triangle, respectively.

[0010] According to some embodiments of the present invention, before determining three first positioning regions and three second positioning regions in the target image, the method further includes:

[0011] Determine the first image region of the first QR code and the second image region of the second QR code from the target image;

[0012] A target strategy is randomly selected from a plurality of preset strategies, wherein different preset strategies are used to indicate different numbers and / or types of image transformation operations;

[0013] Image transformation operations are performed on the first image region and the second image region based on the target strategy.

[0014] According to some embodiments of the present invention, multiple identifying line segments are constructed based on the first triangle and the second triangle, including:

[0015] At least one point is randomly selected from each side of the first triangle to obtain a first set of points, and at least one point is randomly selected from each side of the second triangle to obtain a second set of points;

[0016] Choose any point in the first point set and the second point set to construct a marker line segment, until the first point set or the second point set has been traversed.

[0017] According to some embodiments of the present invention, before acquiring the target image captured by the sampling terminal based on the target concrete sample, the method further includes:

[0018] When an identification request is received from the sampling terminal, distinct first pose information and second pose information are generated.

[0019] The first pose information and the second pose information are sent to the sampling terminal, wherein the first pose information is used to prompt the placement pose of the first QR code on the sampling terminal, and the second pose information is used to prompt the placement pose of the second QR code on the sampling terminal.

[0020] According to some embodiments of the present invention, generating distinct first pose information and second pose information includes:

[0021] Acquire a reference image sent by the sampling terminal, wherein the reference image is used to characterize the surface of the target concrete sample;

[0022] Candidate boxes are generated in the reference image based on a preset size, wherein the preset size is used to indicate the size of the QR code label;

[0023] Based on the candidate box, multiple candidate placement regions are determined in the reference image, and the surface flatness of each candidate placement region is determined, wherein at least two candidate placement regions partially overlap.

[0024] Based on the surface flatness, a first placement region and a second placement region are determined from a plurality of candidate placement regions. The first pose information is generated based on the first placement region, and the second pose information is generated based on the second placement region.

[0025] According to some embodiments of the present invention, before constructing multiple identifying line segments based on the first triangle and the second triangle, the method further includes:

[0026] The number of features is determined based on the target image, wherein the number of features is used to indicate the number of irregular objects on the surface of the target concrete sample;

[0027] The number of line segments is determined based on the number of features and a preset mapping rule, wherein the preset mapping rule is used to indicate the numerical mapping relationship between the number of features and the number of line segments;

[0028] The number of line segments is determined as the number of the identified line segments.

[0029] Secondly, embodiments of the present invention provide a sample identification generation device based on dual QR codes, including at least one control processor and a memory for communicatively connecting with the at least one control processor; the memory stores instructions executable by the at least one control processor, the instructions being executed by the at least one control processor to enable the at least one control processor to perform the sample identification generation method based on dual QR codes as described in the first aspect above.

[0030] Thirdly, embodiments of the present invention provide an electronic device including a sample identification generation device based on dual QR codes as described in the second aspect above.

[0031] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions for performing the sample identification generation method based on dual QR codes as described in the first aspect above.

[0032] The sample identification generation method based on dual QR codes according to embodiments of the present invention has at least the following beneficial effects: acquiring a target image captured by the sampling terminal based on a target concrete sample, wherein the target image includes a first QR code and a second QR code, the first QR code and the second QR code being disposed in different areas on the upper surface of the concrete sample; determining three first positioning areas and three second positioning areas in the target image, wherein the first positioning areas correspond to the positioning marks of the first QR code, and the second positioning areas correspond to the positioning marks of the second QR code; randomly determining a first reference point in each first positioning area to construct a first triangle, and randomly determining a second reference point in each second positioning area to construct a second triangle; constructing multiple identification line segments based on the first triangle and the second triangle; determining a first endpoint located in the first triangle and a second endpoint located in the second triangle based on any one of the identification line segments; randomly selecting at least one target point in the identification line segments, adjusting the position of the target point to outside the corresponding identification line segment; constructing a target identification line based on the first endpoint, the second endpoint, and the adjusted target point; and determining all the target identification lines as sampling identification information, wherein the two ends of each identification line segment are located in the first triangle and the second triangle, respectively. According to the technical solution of the present invention, random triangles can be constructed using the positioning marks of two QR codes respectively. Reference points are randomly selected on the three sides of the triangles to construct the identification line segments. Based on the static markers, sampling identification information is dynamically constructed. In the case of slight differences in the position of the reference points, the graphic differences caused by the position differences are magnified by multiple graphic constructions, which effectively improves the reliability of the sampling identification information. Attached Figure Description

[0033] Figure 1 is a schematic diagram illustrating the principle of sample identification generation based on dual QR codes according to an embodiment of the present invention;

[0034] Figure 2 is a flowchart of a sample identification generation method based on dual QR codes provided in another embodiment of the present invention;

[0035] Figure 3 is a schematic diagram of constructing a target identification line based on identification line segments according to another embodiment of the present invention;

[0036] Figure 4 is a schematic diagram of the operation interface of a sampling terminal provided in another embodiment of the present invention;

[0037] Figure 5 is a structural diagram of a sample identification generation device based on dual QR codes provided in another embodiment of the present invention. Detailed Implementation

[0038] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0039] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.

[0040] In the description of this invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.

[0041] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0042] This invention provides a method, apparatus, device, and medium for generating sample identification based on dual QR codes. The method includes: acquiring a target image captured by a sampling terminal based on a target concrete sample, wherein the target image includes a first QR code and a second QR code, the first and second QR codes being disposed in different areas on the upper surface of the concrete sample; determining three first positioning areas and three second positioning areas in the target image, wherein the first positioning areas correspond to positioning marks of the first QR code, and the second positioning areas correspond to positioning marks of the second QR code; randomly determining a first reference point in each first positioning area to construct a first triangle, and randomly determining a second reference point in each second positioning area to construct a second triangle; constructing multiple identification line segments based on the first and second triangles, and determining sampling identification information of the target concrete sample based on the identification line segments, wherein the two ends of each identification line segment are located at the first triangle and the second triangle, respectively. According to the technical solution of the present invention, random triangles can be constructed using the positioning marks of two QR codes respectively. Reference points are randomly selected on the three sides of the triangles to construct the identification line segments. Based on the static markers, sampling identification information is dynamically constructed. In the case of slight differences in the position of the reference points, the graphic differences caused by the position differences are magnified by multiple graphic constructions, which effectively improves the reliability of the sampling identification information.

[0043] The technical solutions of the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0044] Referring to Figure 2, which is a flowchart of a sample identification generation method based on dual QR codes provided by an embodiment of the present invention, the sample identification generation method based on dual QR codes includes, but is not limited to, the following steps:

[0045] S10, acquire a target image captured by the sampling terminal based on the target concrete sample, wherein the target image includes a first QR code and a second QR code, and the first QR code and the second QR code are set in different areas on the upper surface of the concrete sample.

[0046] It should be noted that, as shown in Figure 1, the sampling terminal 40 can be a smart terminal such as a mobile phone or tablet. Under the witness of a witness, the person delivering the sample injects concrete into the sampling box, places two QR code labels on the concrete surface to obtain the target concrete sample, and then operates the sampling terminal 40 to take a picture of the surface of the target concrete sample to obtain the target image.

[0047] It should be noted that, as shown in FIG. 1, the positions of the first two-dimensional code 10 and the second two-dimensional code 20 in this embodiment are not limited, and the contents of the first two-dimensional code 10 and the second two-dimensional code 20 are different from each other. Since the two-dimensional code is obtained by setting two-dimensional code tags, it is only necessary to stagger the settings of two two-dimensional code tags on the concrete surface, so that the first two-dimensional code 10 and the second two-dimensional code 20 in the target image do not overlap each other.

[0048] S20. Determine three first positioning regions and three second positioning regions in the target image, where the first positioning region corresponds to the positioning mark of the first two-dimensional code, and the second positioning region corresponds to the positioning mark of the second two-dimensional code.

[0049] As known to those skilled in the art, "return" patterns are respectively arranged at the upper left, upper right, and lower left of the two-dimensional code as positioning marks. In this embodiment, the corresponding regions are determined as positioning regions. As shown in FIG. 1, the positioning marks at the upper left, upper right, and lower left of the first two-dimensional code 10 respectively serve as a first positioning region 11, and the positioning marks at the upper left, upper right, and lower left of the second two-dimensional code 20 respectively serve as a second positioning region 21. The first positioning region 11 and the second positioning region 21 are not distinguished by the content of the two-dimensional code. This embodiment uses this static feature as the basis for subsequent generation of identifiers.

[0050] S30. Randomly determine a first reference point in each first positioning region to construct a first triangle, and randomly determine a second reference point in each second positioning region to construct a second triangle.

[0051] It should be noted that, as shown in FIG. 1, the first positioning region 11 and the second positioning region 21 in this embodiment are static features in the target image. On this basis, this embodiment randomly selects a pixel point in each first positioning region 11 as the first reference point 12, and randomly selects a pixel point in each second positioning region 21 as the second reference point 22, and dynamically generates the first reference point 12 and the second reference point 22 based on the static features.

[0052] It is worth noting that after determining the first reference point 12 and the second reference point 22, this embodiment further constructs two triangles based on the reference points, as shown in Figure 1. The first triangle is constructed based on the three first reference points 12, and the second triangle is constructed based on the three second reference points 22. If the target concrete sample is replaced with an abnormal concrete sample, it is difficult to ensure that the placement of the QR code label on the surface of the abnormal concrete sample is consistent with that on the surface of the target concrete sample. When verifying the concrete sample, the vertex coordinates and / or side lengths of the first and second triangles can be verified first. Since the image processing is completed by the server and is not visible on the sampling terminal 40, it is impossible to adjust the QR code label in the abnormal concrete sample to obtain the same first and second triangles. As long as the positions of the QR code labels in the two concrete samples are different, the two first triangles will inevitably be different, and the two second triangles will also inevitably be different. Thus, the graphic structure dynamically generated by the static marker is used to perform preliminary verification of the sample.

[0053] It is worth noting that after determining the first and second reference points, this embodiment can record the coordinates of each first and second reference point on the server for easy comparison later. If the sample taken during verification is an abnormal concrete sample, selecting reference points with the same coordinates in the image may result in them being located outside the positioning markers, thus identifying the anomaly.

[0054] Furthermore, if only reference points are used as identification information, and the QR code label of an abnormal concrete sample is placed in a position similar to that of the target concrete sample, it is very likely that it will be misidentified as a normal sample because the server allows for a certain recognition error. This embodiment further constructs a first triangle and a second triangle, elevating the comparison of points to the comparison of triangles to amplify the information differences caused by different reference points. When the positions of the three reference points are different, the positional information of the newly constructed first triangle and the second triangle will inevitably be different. For example, the image details of the internal regions corresponding to the first triangle of the target image and the first triangle of the verification image may be inconsistent, or the shapes of the triangles may not match.

[0055] S40, construct multiple marker line segments based on the first triangle and the second triangle. Based on any marker line segment, determine the first endpoint located in the first triangle and the second endpoint located in the second triangle. Select at least one target point in the marker line segments and adjust the position of the target point to outside the corresponding marker line segment. Construct target marker lines based on the first endpoint, the second endpoint, and the adjusted target point. Determine all target marker lines as sampling marker information. The two ends of each marker line segment are located in the first triangle and the second triangle, respectively.

[0056] It should be noted that after obtaining the first and second triangles, marker line segments are generated by randomly selecting points based on the first and second triangles, and sampling marker information is generated based on the marker line segments. Building upon the increased recognition sensitivity brought about by the difference in reference point positions amplified by the triangles, marker line segments are further generated based on the triangles. These marker line segments further amplify positional differences, which can further improve the recognition sensitivity for subtle positional deviations and ensure the reliability of the sampling marker information.

[0057] For example, taking the target image shown in Figure 1 as an example, the marker line segment 30 is between two vertices of the first triangle and the second triangle. This embodiment does not limit the order of vertex selection between the two triangles. Multiple marker line segments 30 can be made to intersect by selecting vertices, thereby further amplifying subtle positional differences and improving the recognition effect.

[0058] For example, taking the target image 2 shown in Figure 1 as an example, the marker line segment 30 is a line segment formed by randomly selecting a point as the endpoint of any two sides of the first triangle and the second triangle. The number of marker line segments 30 can be arbitrary. For example, selecting an endpoint of each side will result in three marker line segments 30, or selecting multiple endpoints will result in more than three marker line segments 30, thereby further amplifying subtle positional differences and improving the recognition effect.

[0059] It should be noted that in this embodiment, the first endpoint and the second endpoint of the marker line segment are first determined, and then a target point is randomly selected in the marker line segment. The position of the target point is randomly adjusted so that it is located outside the marker line segment, so that the constructed target marker line is no longer a straight line segment. This further increases the intermediate processing of the sampled marker information, thereby enhancing the reliability of recognition.

[0060] It is worth noting that the operation in this embodiment can be performed independently for each marker line segment, or only for a number of marker line segments; no further limitations are made here.

[0061] It should be noted that, as shown in Figure 3, after adjusting the target point, the target image includes three points, namely the first endpoint, the second endpoint, and the adjusted target point. The target marking line 31 can be a curve formed by connecting the three points, or it can be a straight line segment connected in sequence. This embodiment does not impose many restrictions on the form of the target marking line 31.

[0062] The technical solution of this application can also be used for sample identification during the construction of next-generation mobile communication core networks and access networks.

[0063] In another embodiment, before performing step S20, the following steps are included, but are not limited to:

[0064] S21, determine the first image region of the first QR code and the second image region of the second QR code from the target image;

[0065] S22, randomly select a target strategy from multiple preset strategies, wherein different preset strategies are used to indicate different numbers and / or operation types of image transformation operations;

[0066] S23, perform image transformation operations on the first image region and the second image region based on the target strategy.

[0067] It should be noted that after acquiring the target image, the QR code area can be determined through simple image recognition, thereby obtaining the first image area and the second image area. According to the description of the above embodiment, based on static features, each image processing based on static features can amplify the recognition accuracy when the position of static features deviates. In this embodiment, multiple preset strategies are set on the server to perform image transformation operations on the first image area and the second image area. The image transformation operations can be scaling, rotation, tilting, etc. (as shown in Figure 3, the QR code is rotated clockwise), so that the first QR code and the second QR code change, thereby enhancing the recognition accuracy.

[0068] It is worth noting that in this embodiment, a target strategy is selected each time. Each preset strategy includes a combination of different image transformation operations. For example, strategy 1 includes image scaling and image rotation, strategy 2 includes image scaling and image tilting, and strategy 3 includes image scaling and image tilting. However, strategy 3 and strategy 2 have different ratios in image scaling and different angles in image tilting. This ensures that each prediction strategy has different numbers, types, or parameters of image transformation operations.

[0069] In another embodiment, in step S40, multiple identifying line segments are constructed based on the first triangle and the second triangle, specifically including but not limited to the following steps:

[0070] S411, select at least one point on each side of the first triangle to obtain the first point set, and select at least one point on each side of the second triangle to obtain the second point set;

[0071] S412: Select any point in the first point set and the second point set to construct an identifier line segment, until the first point set or the second point set has been traversed.

[0072] It should be noted that, according to the description of the above embodiments, the more randomization processes are performed in the process of generating the marker line segment, the more the positional deviation of the static feature is amplified. In this embodiment, when constructing the marker line segment, multiple points are randomly selected on each side of the first triangle to obtain the first point set. The first point set includes each point determined in the first triangle, and each point in the first point set is the endpoint of the marker line segment. The second point set is similar.

[0073] It should be noted that after obtaining the first and second point sets, this embodiment randomly selects one point from each set to obtain the marker line segment, and each point is used only once. It is worth noting that when randomly selecting points, this embodiment does not limit the number of points in the first and second point sets to be equal; it only requires that the construction of the marker line segment stops once all points in either set have been used.

[0074] In another embodiment, before performing step S10, the following steps are included, but are not limited to:

[0075] S11, when an identification request is received from the sampling terminal, generate distinct first pose information and second pose information;

[0076] S12, the first pose information and the second pose information are sent to the sampling terminal, wherein the first pose information is used to prompt the placement pose of the first QR code in the sampling terminal, and the second pose information is used to prompt the placement pose of the second QR code in the sampling terminal.

[0077] It should be noted that, as shown in Figures 1 and 4, the operation interface of the sampling terminal 40 includes a sampling window 41. When the sampler starts sampling, the sampling terminal 40 sends an identification request to the server. The server obtains the surface area of ​​the target concrete sample currently captured by the sampling window 41 in real time, and randomly generates first pose information and second pose information. The first pose information indicates the position of the first QR code, and the second pose information indicates the position of the second QR code, so that the QR code label can be randomly placed under the instruction of the server.

[0078] Of course, the first pose information can be pushed first. After the sampler inserts a QR code label into the target concrete sample, the second pose information can be pushed after it is determined that the QR code label is inserted in the correct pose, thereby improving the guidance effect of the pose information.

[0079] In another embodiment, in step S11, generating distinct first pose information and second pose information specifically includes, but is not limited to, the following steps:

[0080] S111, acquire a reference image sent by the sampling terminal, wherein the reference image is used to characterize the surface of the target concrete sample;

[0081] S112, Generate candidate boxes in the reference image based on preset dimensions, wherein the preset dimensions are used to indicate the size of the QR code label;

[0082] S113, Based on the candidate boxes, determine multiple candidate placement regions in the reference image, and determine the surface flatness of each candidate placement region, wherein at least two candidate placement regions locally overlap.

[0083] S114, determine a first placement region and a second placement region from multiple candidate placement regions based on surface flatness, generate a first pose information based on the first placement region, and generate a second pose information based on the second placement region.

[0084] It should be noted that, as shown in Figure 4, after the sampler aligns the sampling terminal 40 with the surface of the target concrete sample, the image displayed in the sampling window 41 of the sampling terminal 40 is a reference image. Since the QR code label is a standard component, the preset size is known. In this embodiment, a candidate box is first generated in the reference image based on the preset size. The candidate box is used to represent the size of the QR code in the reference image.

[0085] It should be noted that in this embodiment, after determining the candidate bounding box, the candidate bounding box can be randomly moved multiple times. The area corresponding to each move is determined as the candidate placement area. The candidate placement area is a virtual area. The server performs simple image recognition based on the candidate placement area to determine the surface flatness. The surface flatness characterizes the surface unevenness of the target concrete sample. For example, some candidate placement areas may have certain unevenness due to the unevenness of the concrete, or they may have protrusions after placing some stones or other markers. In this embodiment, multiple candidate placement areas can overlap. For example, a candidate placement area can be translated a certain distance, and the translation distance is less than the size of the candidate placement area, so that the new candidate placement area partially overlaps with the previous candidate placement area.

[0086] It should be noted that, as shown in Figure 4, after determining the surface flatness of the candidate placement areas, this embodiment determines the first placement area 42 and the second placement area 43 based on the surface flatness. The specific selection strategy can be set according to actual needs. For example, two candidate placement areas with relatively flat surfaces and no overlap can be selected as the first placement area 42 and the second placement area 43, respectively, to preserve the uneven details of the target concrete sample surface as much as possible. Of course, candidate placement areas with lower surface flatness can also be selected, so that the first and second QR codes carry a partial tilt angle, effectively improving the uniqueness of the QR codes.

[0087] It should be noted that, as shown in Figure 4, after determining the first placement area 42 and the second placement area 43, corresponding first pose information and second pose information are generated. The first pose information and second pose information are pushed to the sampling terminal 40, so that the sampling terminal 40 generates a prompt box for the first placement area 42 and a prompt box for the second placement area 43 in the sampling window 41 based on the first pose information. The prompt box for the first placement area 42 can be displayed first, and the prompt box for the second placement area 43 can be displayed after the placement of the first QR code is completed.

[0088] In another embodiment, before performing step S40, the following steps are included, but are not limited to:

[0089] S401, Determine the number of features based on the target image, wherein the number of features is used to indicate the number of uneven objects on the surface of the target concrete sample;

[0090] S402, determine the number of line segments based on the number of features and a preset mapping rule, wherein the preset mapping rule is used to indicate the numerical mapping relationship between the number of features and the number of line segments;

[0091] S403, the number of line segments is determined as the number of identified line segments.

[0092] It should be noted that, in order to determine the number of line segments, this embodiment identifies the uneven objects on the surface of the target concrete sample. The surface of concrete is usually uneven after sampling and pouring, and retains corresponding characteristics after solidification. The objects on the surface can be concrete protrusions, concrete components such as sand and gravel, or some markers placed by the sample submitter. In this embodiment, after acquiring the target image, the number of features is identified, and the number of line segments is determined based on the number of features. When verifying the sample, the number of features can also be re-determined. If the sample has not changed, the number of features should be the same, which can be used as a basis for judging whether the sample has been replaced.

[0093] It should be noted that this embodiment determines the number of line segments by setting preset mapping rules. For example, multiple numerical intervals are set corresponding to the number of features, and each numerical interval corresponds to a number of line segments. The specific number of identifier line segments to be generated is determined based on the number of line segments, further increasing the randomization operation in the target sampling identifier generation process.

[0094] Figure 5 shows a structural diagram of a sample labeling generation device based on dual QR codes according to an embodiment of the present invention. The present invention also provides a sample labeling generation device based on dual QR codes, comprising:

[0095] The processor 401 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0096] The memory 402 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 402 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 402 and is called and executed by the processor 401 to execute the sample identification generation method based on dual QR codes of this application.

[0097] Input / output interface 403 is used to implement information input and output;

[0098] The communication interface 404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0099] Bus 405 transmits information between various components of the device (e.g., processor 401, memory 402, input / output interface 403, and communication interface 404);

[0100] The processor 401, memory 402, input / output interface 403 and communication interface 404 are connected to each other within the device via bus 405.

[0101] This application also provides an electronic device, including the sample identification generation device based on dual QR codes as described above.

[0102] This application embodiment also provides a storage medium, which is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the above-described sample identification generation method based on dual QR codes.

[0103] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0104] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0105] The above provides a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A sample label generation method based on dual QR codes, characterized in that, The method, applied to a server and communicatively connected to a sampling terminal, includes: acquiring a target image captured by the sampling terminal based on a target concrete sample, wherein the target image includes a first QR code and a second QR code, the first QR code and the second QR code being located in different areas on the upper surface of the concrete sample; determining three first positioning areas and three second positioning areas in the target image, wherein the first positioning areas correspond to positioning marks of the first QR code, and the second positioning areas correspond to positioning marks of the second QR code; randomly determining a first reference point in each first positioning area to construct a first triangle, and randomly determining a second reference point in each second positioning area to construct a second triangle; constructing multiple marker line segments based on the first triangle and the second triangle; determining a first endpoint of the first triangle and a second endpoint of the second triangle based on any one of the marker line segments; randomly selecting at least one target point in the marker line segments and adjusting the position of the target point to outside the corresponding marker line segment; constructing target marker lines based on the first endpoint, the second endpoint, and the adjusted target point; and determining all the target marker lines as sampling marker information, wherein the two ends of each marker line segment are located on the sides of the first triangle and the second triangle, respectively.

2. The sample identification generation method based on dual QR codes according to claim 1, characterized in that, Before determining three first positioning regions and three second positioning regions in the target image, the method further includes: determining a first image region of the first QR code and a second image region of the second QR code from the target image; randomly selecting a target strategy from a plurality of preset strategies, wherein different preset strategies are used to indicate different numbers and / or operation types of image transformation operations; and performing image transformation operations on the first image region and the second image region based on the target strategy.

3. The sample identification generation method based on dual QR codes according to claim 1, characterized in that, Constructing multiple marker line segments based on the first triangle and the second triangle includes: selecting at least one point on each side of the first triangle to obtain a first set of points, selecting at least one point on each side of the second triangle to obtain a second set of points; selecting a point on each of the first set of points and the second set of points to construct a marker line segment, until the first set of points or the second set of points has been traversed.

4. The sample identification generation method based on dual QR codes according to claim 1, characterized in that, Before acquiring the target image captured by the sampling terminal based on the target concrete sample, the method further includes: when an identification request is received from the sampling terminal, generating distinct first pose information and second pose information; sending the first pose information and the second pose information to the sampling terminal, wherein the first pose information is used to indicate the placement pose of the first QR code on the sampling terminal, and the second pose information is used to indicate the placement pose of the second QR code on the sampling terminal.

5. The sample identification generation method based on dual QR codes according to claim 4, characterized in that, Generating distinct first and second pose information includes: acquiring a reference image sent by the sampling terminal, wherein the reference image is used to characterize the surface of the target concrete sample; generating candidate bounding boxes in the reference image based on a preset size, wherein the preset size is used to indicate the size of the QR code label; determining multiple candidate placement areas in the reference image based on the candidate bounding boxes, determining the surface flatness of each candidate placement area, wherein at least two candidate placement areas partially overlap; determining a first placement area and a second placement area from the multiple candidate placement areas based on the surface flatness, generating the first pose information based on the first placement area, and generating the second pose information based on the second placement area.

6. The sample identification generation method based on dual QR codes according to claim 4, characterized in that, Before constructing multiple marker line segments based on the first triangle and the second triangle, the method further includes: determining the number of features based on the target image, wherein the number of features is used to indicate the number of uneven objects on the surface of the target concrete sample; determining the number of line segments based on the number of features and a preset mapping rule, wherein the preset mapping rule is used to indicate the numerical mapping relationship between the number of features and the number of line segments; and determining the number of line segments as the number of marker line segments.

7. A sample labeling generation device based on dual QR codes, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, which, when executed by the at least one control processor, enable the at least one control processor to perform the sample identification generation method based on dual QR codes as described in any one of claims 1 to 6.

8. An electronic device, characterized in that, Includes the sample identification generation device based on dual QR codes as described in claim 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the sample identification generation method based on dual QR codes as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Nameplate anti-counterfeiting method and device for network freight platform, and freight platform

    CN114358803A

  • Concrete test block anti-counterfeiting system and anti-counterfeiting method

    CN119151564A