Method and device for evaluating change degree of warehouse logistics scene, and storage medium
Calculating the warehousing logistics scene change rate through anchor box representation and matching algorithm solves the problem of inconsistent scene change rate calculation results, achieves accurate assessment of scene change rate, and provides a reliable evaluation standard for mobile robot positioning.
Patent Information
- Application Number
- CN202410730170.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-10-01
AI Technical Summary
In the existing technology, the calculation result of the warehousing and logistics scene change rate may be greater than 1, and the calculation results are inconsistent under the same change.
By obtaining the original scene and changed scene elements, using the anchor box method to represent the elements, and obtaining the optimal matching combination through the completion and matching algorithm, the scene change rate is calculated to ensure the consistency of the results.
It achieves accurate quantitative evaluation of scene change rate, solves the problem of scene change rate exceeding the actual situation and inconsistent calculation results, and provides a basis for mobile robot positioning performance evaluation and test scene design.
Smart Images

Figure CN118735408A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of logistics warehousing technology, and in particular to a method, device and storage medium for evaluating the degree of change of a warehousing logistics scenario. Background Art
[0002] The warehousing and logistics scenario is a highly dynamic scenario. The quantitative definition and quantitative evaluation of the "dynamic scenario", that is, the evaluation of the scenario change rate, is of great significance to the testing of mobile robots and the improvement of their repositioning capabilities.
[0003] In the prior art, for example, the patent number is CN114723803A, and the patent name is a method for evaluating the change rate of a dynamic scene. The concept of element occupation area is introduced, and the scene change rate is calculated by the area change of the occupied area. The quantified scene change rate is obtained, thereby realizing the quantitative definition and quantitative evaluation of the dynamic scene.
[0004] Although this method can quantify the scene change rate caused by the translation, removal, addition, rotation, and size change of the calculation elements, it also has the following defects:
[0005] According to this algorithm, the rate of change of the scene can exceed 100% numerically, which is not in line with the actual situation;
[0006] There are many elements in the scene. Before and after the scene changes, each element may undergo one or more changes such as translation, removal, addition, rotation, and size change. Since it is impossible to track the specific changes of each element, there are many possibilities for matching each element before and after the scene changes. Therefore, when calculating the scene change rate, different matching methods of this method are difficult to ensure consistent results, which leads to the problem of "same change, different change rates". Summary of the invention
[0007] In view of this, the purpose of the present invention is to provide a method, device and storage medium for evaluating the degree of change of warehousing logistics scenes, so as to solve the problems in the prior art that the calculation result of the scene change rate is greater than 1 and the problem of "same change, different change rate".
[0008] According to a first aspect of an embodiment of the present invention, a method for evaluating the degree of change of a warehousing logistics scenario is provided, the method comprising:
[0009] Obtain each element of the target space in the original scene, and obtain each element of the target space after the scene changes;
[0010] Representing the elements of the original scene and the target space after the scene change by means of anchor frames, and obtaining a first element representation set of the original scene and a second element representation set after the scene change respectively;
[0011] Filling the first element representation set or the second element representation set so that the number of elements in the first element representation set is equal to that in the second element representation set;
[0012] Matching each element in the first element representation set with each element in the second element representation set one by one, obtaining the cost of any matching combination through a preset loss function, and obtaining the optimal matching combination with the minimum sum of the costs of all matching combinations through a preset matching algorithm;
[0013] The spatial change between the two elements of the optimal matching combination is obtained, the single scene change rate of each optimal matching combination is obtained according to the spatial change of each optimal matching combination, and the scene change rate of the target space is obtained based on the single scene change rates of all the optimal matching combinations.
[0014] Preferably,
[0015] Each element of the target space is a two-dimensional element or a three-dimensional element;
[0016] The spatial variation between the two elements of the optimal matching combination includes:
[0017] If the element is a two-dimensional element, the area change between the two elements of the optimal matching combination is obtained;
[0018] If the voxel is a three-dimensional feature, the volume change between the two features of the best matching combination is obtained.
[0019] Preferably,
[0020] The step of completing the first element representation set or the second element representation set so that the number of elements in the first element representation set is equal to the number of elements in the second element representation set includes:
[0021] Obtaining the number of elements in the first element representation set and the second element representation set, and setting virtual elements for the one with fewer elements, so that the number of elements in the first element set is equal to that in the second element set;
[0022] The representation of each element in the virtual element is set to 0.
[0023] Preferably,
[0024] The preset loss function includes: IOU loss function, CIOU loss function, GIOU loss function, DIOU loss function, EIoU loss function, αIoU loss function or SIoU loss function.
[0025] Preferably,
[0026] The preset matching algorithms include: Hungarian algorithm, minimum cost maximum flow algorithm or Blossom algorithm.
[0027] Preferably,
[0028] When the preset loss function adopts the IOU loss function, the cost of obtaining any matching combination includes:
[0029] Obtaining an intersection-and-union ratio of any matching combination, and obtaining a cost of any matching combination based on the intersection-and-union ratio;
[0030] If there are virtual elements in any matching combination, or if two elements in any matching combination are not spatially touching, the intersection-union ratio is 0.
[0031] According to a second aspect of an embodiment of the present invention, there is provided a device for evaluating a degree of change in a warehousing logistics scenario, the device comprising:
[0032] Element acquisition module: used to obtain each element of the target space in the original scene, and to obtain each element of the target space after the scene changes;
[0033] An element representation module is used to represent the elements of the original scene and the target space after the scene change by means of anchor frames, and obtain a first element representation set of the original scene and a second element representation set after the scene change respectively;
[0034] An element completion module: used for completing the first element representation set or the second element representation set so that the number of elements in the first element representation set is equal to that in the second element representation set;
[0035] An optimal matching combination acquisition module: used to match each element in the first element representation set with each element in the second element representation set one by one, obtain the cost of any matching combination through a preset loss function, and obtain the optimal matching combination with the minimum sum of the costs of all matching combinations through a preset matching algorithm;
[0036] Evaluation module: used to obtain the spatial change between the two elements of the optimal matching combination, obtain the single scene change rate of each optimal matching combination according to the spatial change of each optimal matching combination, and obtain the scene change rate of the target space based on the single scene change rates of all optimal matching combinations.
[0037] According to a third aspect of an embodiment of the present invention, there is provided a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above method is implemented.
[0038] The technical solution provided by the embodiments of the present invention may have the following beneficial effects:
[0039] This application obtains various elements before and after the scene changes, represents the elements through anchor frames, and completes the elements before and after the scene changes, so as to obtain the optimal matching combination of various elements in the scene before and after the change through a matching algorithm, and obtains the scene change rate based on the optimal matching combination. The scene change rate can be used to quantitatively evaluate the degree of scene change, which provides ideas for the evaluation of the positioning performance of mobile robots in dynamic scenes, the design of test scenarios and the formulation of test standards.
[0040] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0042] Figure 1 is a flowchart of a method for evaluating the degree of change of a warehousing logistics scenario according to an exemplary embodiment;
[0043] Figure 2 is a schematic diagram of an original layout state of a warehouse according to another exemplary embodiment;
[0044] Figure 3 is a schematic diagram showing a layout state of a warehouse after a change according to another exemplary embodiment;
[0045] Figure 4 is a schematic diagram showing the principle of representing elements by means of anchor frames according to another exemplary embodiment;
[0046] Figure 5 is a schematic diagram showing the result of matching each element one by one before and after a scene change according to another exemplary embodiment;
[0047] Figure 6 is a schematic diagram of area changes of two-dimensional elements in an optimal matching combination according to another exemplary embodiment;
[0048] Figure 7 is a schematic diagram of volume changes of three-dimensional elements in an optimal matching combination according to another exemplary embodiment;
[0049] Figure 8 is a system schematic diagram of a device for evaluating the degree of change of a warehousing logistics scene according to another exemplary embodiment;
[0050] In the attached figure: 1-element acquisition module, 2-element representation module, 3-element completion module, 4-optimal matching combination acquisition module, 5-evaluation module. DETAILED DESCRIPTION
[0051] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0052] Embodiment 1
[0053] Figure 1 is a flow chart of a method for evaluating the degree of change of a warehousing logistics scenario according to an exemplary embodiment. Figure 1 As shown, the method includes:
[0054] S1, obtaining each element of the target space in the original scene, and obtaining each element of the target space after the scene changes;
[0055] S2, performing element representation on the original scene and each element of the target space after the scene change by means of anchor frames, and obtaining a first element representation set of the original scene and a second element representation set after the scene change respectively;
[0056] S3, completing the first element representation set or the second element representation set so that the number of elements in the first element representation set is equal to that in the second element representation set;
[0057] S4, matching each element in the first element representation set with each element in the second element representation set one by one, obtaining the cost of any matching combination through a preset loss function, and obtaining the optimal matching combination with the minimum sum of the costs of all matching combinations through a preset matching algorithm;
[0058] S5, obtaining the spatial change between the two elements of the optimal matching combination, obtaining the single scene change rate of each optimal matching combination according to the spatial change of each optimal matching combination, and obtaining the scene change rate of the target space based on the single scene change rates of all the optimal matching combinations;
[0059] It is understandable that this embodiment assumes that there are n elements in the original scene, and each element in the scene (shelf, goods, etc.) is represented by a code such as A1, A2, etc. Figure 2 As shown in the figure, after the layout changes, there are m elements in the scene, and each element in the scene (shelf, goods, etc.) is represented by a code such as B1, B2, etc. Figure 3As shown, it is assumed that the area of the warehouse itself remains unchanged. Only considering the scene changes caused by the changes of various elements, the anchor box method is used to represent each element before and after the scene change. Among them, the anchor box is defined as the smallest circumscribed rectangle of the shape projected by the element on the warehouse floor. As shown in the appendix Figure 4 As shown, when the element D is two-dimensional, the element D can be expressed as D(x D , y D , w D , h D , θ), where (x D , y D ) represents the position of the geometric center point O of the anchor box D in the warehouse coordinate system, w D , h D respectively represent the lengths of the element D in the x and y directions when represented by the anchor box, and θ represents the angle between the element D and the horizontal direction; after representing by the anchor box method, the element representation Ai(x i , y i , w i , h i , θ i )(i = 1, 2, 3,... n) before the scene change can be obtained, and the element representation Bj(x j , y j , w j , h j , θ j )(j = 1, 2, 3,... m) after the scene change;
[0060] If n! = m, then let k = max(n, m). If n < k or m < k, then set virtual elements Ai (i = n + 1,.., k) or Bj (j = m + 1,.., k), and represent them as (x = 0, y = 0, w = 0, h = 0, θ = 0). Simply put, it is to make the number of elements before and after the scene change equal, and add virtual elements to the smaller element set through comparison;
[0061] The optimal matching between Ai and Bj is performed using a matching algorithm. In this embodiment, the Hungarian algorithm is used as an example. Here, the matching means regarding the element Bj after the scene change as the element Ai before the change, and considering them as the same element. The specific matching process of the Hungarian algorithm is as follows:
[0062] (1) Calculate the matching cost, as shown in the appendix Figure 5As shown, match Ai (i = 1, 2,... k) with Bj (j = 1, 2,... k). Each match has a corresponding cost, denoted as Cij (i = 1, 2,... k, j = 1, 2,... k). Cij can be calculated using common loss functions in machine vision, such as IOU, CIOU, etc. If n < k or m < k, then the corresponding costs Cij (i = n + 1,.., k, or j = m + 1,.., k) are set to 0. For example, when using IOU as the loss function, refer to the appendix Figure 6 The relative positional relationship between Ai and Bj shown in the appendix, and the calculation method of the matching cost is as follows:
[0063]
[0064] In the formula, represents the intersection over union of two elements. If the two elements do not touch each other spatially before and after, the intersection over union is 0;
[0065] Thus, the cost Cij for any match between Ai and Bj can be obtained. The process of finding the optimal match is to find a combination sequence Ai - Bj such that after all elements are matched, the sum of the corresponding Cij is minimized;
[0066] (2) Consider the appendix Figure 5 as a matrix. For each row, find the minimum element in this row, and subtract this minimum element from each element in this row;
[0067] (3) Similarly, for each column, find the minimum element in this column, and subtract this minimum element from each element in this column. Note that at this time, the matrix has already been processed in the first step. If the minimum value in this column is 0, then subtract 0, rather than subtracting the minimum value of this column in the input matrix;
[0068] (4) Draw horizontal or vertical lines on the matrix to cover all 0s with the minimum number of lines. If the number of lines used is less than the width k of the matrix, then proceed to the next step (5). If the number of lines used is equal to the width k of the matrix, the optimal matching scheme has been found, and jump to step (6);
[0069] (5) Find the minimum value among the matrix elements not covered by the lines. Assume this value is min. Subtract min from all matrix elements not covered by the lines, and add min to all matrix elements covered by two lines simultaneously. Repeat step (4);
[0070] (6) Start from the rows with only one 0 and match one by one. After matching, delete the entire row and column. Thus, the optimal matching combination is obtained, denoted as Mt{Ai, Bj} (t = 1, 2,..., k);
[0071] Calculate the area change corresponding to each match Mt respectively, as shown in the appendix Figure 6 As shown:
[0072] ΔS Mt =|S Ai ∪S Bj |-|S Ai ∩S Bj |
[0073] Calculate the scene change rate caused by Mt:
[0074]
[0075] Where S is the total area of the warehouse;
[0076] Calculate the total scene change rate:
[0077]
[0078] It is worth emphasizing that the purpose of the matching algorithm is to obtain the optimal matching relationship between Ai and Bj. The Hungarian algorithm is only a relatively common matching algorithm. Other matching algorithms such as the minimum cost maximum flow (MCMF) algorithm and the Blossom algorithm can also be used for matching;
[0079] The matching cost Cij can be calculated using algorithms commonly used in the field of machine vision, such as IOU, GIOU, DIOU, CIOU, EIoU, αIoU, and SIoU. Different calculation methods may affect the matching results, and the specific results depend on factors such as the size, mutual distance, and shape similarity of each element.
[0080] Different matching algorithms and cost calculation algorithms have a certain impact on the matching results, but the overall idea is the same. You can use multiple methods to compare and calculate, and finally choose the algorithm with the lowest overall cost.
[0081] It is worth emphasizing that the above embodiments are directed to two-dimensional maps, and the method provided by the present application can also be further applied to three-dimensional maps;
[0082] When using anchor boxes to represent three-dimensional elements, such as Ai(x i ,y i , z i , l i , w i ,h i )(i=1,2,3,...n)(i=1,2,...n), Bj(x j ,y j , z j , l j , w j ,h j)(j=1, 2, 3, ...m)), where (x, y, z) represents the coordinate position of the geometric center of the element in the scene coordinate system, and (l, w, h) represents the length, width and height information of the element;
[0083] The other steps are consistent with the above two-dimensional element calculation method, except that after obtaining the optimal matching combination Mt{Ai, Bj} (t=1, 2, ..., k), the volume change corresponding to each matching Mt is calculated, as shown in the attached figure. Figure 7 As shown:
[0084] ΔV Mt =|V Ai ∪V Bj |-|V Ai ∩V Bj |
[0085] Calculate the scene change rate caused by Vt:
[0086]
[0087] Where V is the total volume of the warehouse;
[0088] Calculate the total scene change rate:
[0089]
[0090] Embodiment 2:
[0091] Figure 8 is a system schematic diagram of a device for evaluating the degree of change of a warehousing logistics scene according to another exemplary embodiment, the device comprising:
[0092] Element acquisition module 1: used to acquire each element of the target space in the original scene, and to acquire each element of the target space after the scene changes;
[0093] Element representation module 2: used to represent the elements of the original scene and the target space after the scene change by means of anchor frames, and obtain a first element representation set of the original scene and a second element representation set after the scene change respectively;
[0094] An element completion module 3 is used to complete the first element representation set or the second element representation set so that the number of elements in the first element representation set is equal to that in the second element representation set;
[0095] The optimal matching combination acquisition module 4 is used to match each element in the first element representation set with each element in the second element representation set one by one, obtain the cost of any matching combination through a preset loss function, and obtain the optimal matching combination with the minimum sum of the costs of all matching combinations through a preset matching algorithm;
[0096] Evaluation module 5: used to obtain the spatial change between the two elements of the optimal matching combination, obtain the single scene change rate of each optimal matching combination according to the spatial change of each optimal matching combination, and obtain the scene change rate of the target space based on the single scene change rates of all optimal matching combinations;
[0097] It can be understood that the element acquisition module 1 is used to obtain each element of the target space in the original scene, and to obtain each element of the target space after the scene changes; the element representation module 2 is used to represent each element of the original scene and the target space after the scene changes by means of anchor frames, and respectively obtain a first element representation set of the original scene and a second element representation set after the scene changes; the element completion module 3 is used to complete the first element representation set or the second element representation set, so that the number of each element in the first element representation set is equal to that in the second element representation set; the optimal matching combination acquisition module 4 is used to match each element in the first element representation set with each element in the second element representation set one by one, obtain the cost of any matching combination through a preset loss function, and obtain the optimal matching combination with the minimum sum of the costs of all matching combinations through a preset matching algorithm; the evaluation module 5 is used to obtain the spatial change between the two elements of the optimal matching combination, obtain the single scene change rate of each optimal matching combination according to the spatial change of each optimal matching combination, and obtain the scene change rate of the target space based on the single scene change rates of all optimal matching combinations.
[0098] Embodiment three:
[0099] This embodiment provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above method is implemented;
[0100] It is understandable that the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0101] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0102] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0103] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0104] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0105] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0106] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0107] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0108] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0109] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A method for evaluating the degree of change in warehousing logistics scenarios, characterized in that: The method comprises: Obtain each element of the target space in the original scene, and obtain each element of the target space after the scene changes; Representing the elements of the original scene and the target space after the scene change by means of anchor frames, and obtaining a first element representation set of the original scene and a second element representation set after the scene change respectively; Filling the first element representation set or the second element representation set so that the number of elements in the first element representation set is equal to that in the second element representation set; Matching each element in the first element representation set with each element in the second element representation set one by one, obtaining the cost of any matching combination through a preset loss function, and obtaining the optimal matching combination with the minimum sum of the costs of all matching combinations through a preset matching algorithm; The spatial change between the two elements of the optimal matching combination is obtained, the single scene change rate of each optimal matching combination is obtained according to the spatial change of each optimal matching combination, and the scene change rate of the target space is obtained based on the single scene change rates of all the optimal matching combinations.
2. The method according to claim 1, characterized in that Each element of the target space is a two-dimensional element or a three-dimensional element; The spatial variation between the two elements of the optimal matching combination includes: If the element is a two-dimensional element, the area change between the two elements of the optimal matching combination is obtained; If the voxel is a three-dimensional feature, the volume change between the two features of the best matching combination is obtained.
3. The method according to claim 2, characterized in that The step of completing the first element representation set or the second element representation set so that the number of elements in the first element representation set is equal to the number of elements in the second element representation set includes: Obtaining the number of elements in the first element representation set and the second element representation set, and setting virtual elements for the one with fewer elements, so that the number of elements in the first element set is equal to that in the second element set; The representation of each element in the virtual element is set to 0.
4. The method according to claim 3, characterized in that The preset loss function includes: IOU loss function, CIOU loss function, GIOU loss function, DIOU loss function, EIoU loss function, αIoU loss function or SIoU loss function.
5. The method according to claim 4, characterized in that The preset matching algorithms include: Hungarian algorithm, minimum cost maximum flow algorithm or Blossom algorithm.
6. The method according to claim 4, characterized in that When the preset loss function adopts the IOU loss function, the cost of obtaining any matching combination includes: Obtaining an intersection-and-union ratio of any matching combination, and obtaining a cost of any matching combination based on the intersection-and-union ratio; If there are virtual elements in any matching combination, or if two elements in any matching combination are not spatially touching, the intersection-union ratio is 0.
7. A device for evaluating the degree of change in a warehouse logistics scenario, characterized in that: The device comprises: Element acquisition module: used to obtain each element of the target space in the original scene, and to obtain each element of the target space after the scene changes; An element representation module is used to represent the elements of the original scene and the target space after the scene change by means of anchor frames, and obtain a first element representation set of the original scene and a second element representation set after the scene change respectively; An element completion module: used for completing the first element representation set or the second element representation set so that the number of elements in the first element representation set is equal to that in the second element representation set; An optimal matching combination acquisition module: used to match each element in the first element representation set with each element in the second element representation set one by one, obtain the cost of any matching combination through a preset loss function, and obtain the optimal matching combination with the minimum sum of the costs of all matching combinations through a preset matching algorithm; Evaluation module: used to obtain the spatial change between the two elements of the optimal matching combination, obtain the single scene change rate of each optimal matching combination according to the spatial change of each optimal matching combination, and obtain the scene change rate of the target space based on the single scene change rates of all optimal matching combinations.
8. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the main controller, the various steps in the method for evaluating the degree of change of a warehousing logistics scenario as described in any one of claims 1-6 are implemented.
