Path planning method, device and equipment for log stacking code spraying and medium
By constructing a dynamic hierarchical network model of log stacks and optimizing the inkjet printing path through collision detection, automated inkjet printing was achieved, solving the problem of low efficiency of manual inkjet printing and improving the efficiency of log operations at the port.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ZHIDAHONGCHUANG TECH CO LTD
- Filing Date
- 2025-06-26
- Publication Date
- 2026-05-01
AI Technical Summary
In the current technology, log measurement and coding in the port log industry still rely on manual operation, which results in a large workload, long time consumption, and seriously limits the efficiency of operation.
By collecting the location and diameter information of each log in the log stack, a dynamic hierarchical network model is constructed to plan the inkjet printing path. Combined with collision detection, the inkjet printing path is optimized to generate the optimal inkjet printing sequence and control the inkjet printing equipment to automatically print.
It reduces the time complexity of finding the optimal path, improves coding efficiency, reduces manual intervention, and enhances operational efficiency.
Smart Images

Figure CN120806307B_ABST
Abstract
Description
Path planning methods, devices, equipment, and media for inkjet coding of log stacks Technical Field
[0001] This invention relates to the field of inkjet printing path planning technology, and specifically to a path planning method, apparatus, equipment and medium for inkjet printing on log stacks. Background Technology
[0002] Currently, artificial intelligence and industrial automation are developing rapidly, and various industries are using them to improve production and operational efficiency. However, the port log industry, as a labor-intensive sector, still relies on manual methods for log measurement and marking. This method suffers from problems such as high workload and long processing time, significantly limiting the efficiency of port log operations. Summary of the Invention
[0003] In view of this, the present invention provides a path planning method, apparatus, equipment and medium for inkjet coding of log stacks, so as to solve the problem of low operation efficiency caused by manual inkjet coding in the prior art.
[0004] In a first aspect, the present invention provides a path planning method for inkjet printing on log stacks, the method comprising:
[0005] Collect the position information and corresponding diameter information of the end face of each log in the stack of logs to be inkjet printed;
[0006] Based on location and diameter information, the log stack to be inkjet printed is modeled into a dynamic, layered network model.
[0007] The log nodes in the dynamic hierarchical network model are traversed to generate the inkjet printing path;
[0008] Collision detection is performed on the inkjet printing path, and the inkjet printing path is optimized based on the collision detection results;
[0009] Input the optimized coding path and the corresponding log coding sequence list into the coding device, and control the coding device to perform coding according to the log coding sequence.
[0010] This invention uses the position and diameter information of each log end face in a log stack, combined with the physical constraints of the log stack, to convert the log stack into a hierarchical network model. This model enables log node traversal, coding path planning, and collision detection logic to dynamically optimize the coding path. This allows the coding equipment to perform automatic coding instead of manual coding, reducing the time complexity of finding the optimal path and improving coding efficiency.
[0011] In one optional implementation, the log stack to be inkjet-coded is modeled into a dynamically layered network model based on location information and diameter information, including:
[0012] Calculate the average spacing between the centers of the log end faces based on the location and diameter information;
[0013] Based on the average spacing between the centers of the log end faces, the stack of logs to be coded is dynamically modeled into a layered network.
[0014] This invention reflects the distribution of logs in a stack by calculating the average spacing between the centers of the log end faces. Based on the average spacing between the centers of the log end faces, the log stack is dynamically modeled into a hierarchical network to facilitate path planning in the hierarchical network model.
[0015] In one optional implementation, the average spacing between the centers of the log end faces is calculated based on location information and diameter information, including:
[0016] The boundary calculation function is used to calculate the upper and lower vertical boundaries of the log stack, as well as the left and right horizontal boundaries.
[0017] The average spacing between the center-to-center distance of the log end faces is determined by dividing the sum of the diameters of all logs in the log stack by the number of logs.
[0018] This invention precisely locates the space occupied by the log stack by defining its upper and lower vertical boundaries and its left and right horizontal boundaries. The average spacing between the center of the log end faces is determined by dividing the sum of the diameters of all logs in the stack by the number of logs, thus reflecting the density of the log distribution in the stack.
[0019] In one optional implementation, the stack of logs to be inkjet-printed is dynamically modeled into a layered network based on the average spacing between the centers of the log end faces, including:
[0020] The number of rows in a log stack is dynamically determined by the average spacing between the upper and lower boundaries of the log stack in the vertical direction and the center of the log end face.
[0021] The number of columns in the log stack is dynamically determined by the average spacing between the left and right boundaries of the log stack in the horizontal direction and the center of the log end face.
[0022] Use row indexing and column indexing functions to calculate the row number and column number of each log, respectively;
[0023] Based on the row and column numbers of each log, and combined with the position information of the log end face, a hierarchical network model is dynamically constructed for the stack of logs to be inkjet printed.
[0024] This invention dynamically divides the number of rows and columns of log stacks and uses index functions to calculate the row and column numbers of each log, ensuring that each log is mapped to a valid row and a valid column, thus transforming the log stack into a hierarchical network model and providing a foundation for path planning.
[0025] In one alternative implementation, the log nodes of the dynamic hierarchical network model are traversed to generate a coding path, including:
[0026] The log nodes in the dynamic hierarchical network model are traversed in a spiral progressive manner to obtain the log node traversal results.
[0027] A path planning algorithm is used to generate a coding sequence list based on the log node traversal results, and the coding sequence list is then converted into a coding path.
[0028] This invention employs a spiral progressive traversal of log nodes to ensure path continuity, reduce invalid node traversal, and combine the log node traversal results with a path planning algorithm to generate the optimal inkjet printing path, thereby improving path planning efficiency.
[0029] In one optional implementation, collision detection is performed on the inkjet printing path, and the inkjet printing path is optimized based on the collision detection results, including:
[0030] Collect log outlines to form a log outline set;
[0031] Collision detection algorithms are used to perform collision detection on the inkjet path and the log outline set to determine whether the logs in the inkjet path intersect with other adjacent logs.
[0032] If the logs in the inkjet printing path intersect with other adjacent logs, the inkjet printing path will be optimized.
[0033] This invention uses a collision detection algorithm to perform collision detection on the inkjet printing path and the log outline set, avoiding obstacles and collisions during path planning to prevent inkjet printing failures caused by inkjet printing path deviations.
[0034] In one alternative implementation, collecting the log outline includes:
[0035] Based on the coding positions of two adjacent logs in the coding path, the position information of the log end face, and the diameter information, the log contour is collected using a contour collection function.
[0036] This invention obtains the log outline by collecting the inkjet printing positions of two adjacent logs in the inkjet printing path, the position information of the log end face, and the diameter information, so as to fit the actual outline of the log stack.
[0037] Secondly, the present invention provides a path planning device for inkjet printing on log stacks, the device comprising:
[0038] The data acquisition module is used to collect the position information and corresponding diameter information of the end face of each log in the stack of logs to be inkjet printed;
[0039] The modeling module is used to model the log stacks to be inkjet-printed into a dynamic, layered network model based on location and diameter information.
[0040] The traversal module is used to traverse the log nodes in the dynamic hierarchical network model and generate the inkjet printing path.
[0041] The path optimization module is used to perform collision detection on the inkjet printing path and optimize the inkjet printing path based on the collision detection results.
[0042] The inkjet printing module is used to input the list of log inkjet printing sequence corresponding to the optimized inkjet printing path into the inkjet printing device, and control the inkjet printing device to print the logs according to the inkjet printing sequence.
[0043] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the path planning method for log stacking inkjet printing described in the first aspect or any corresponding embodiment thereof.
[0044] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the path planning method for log stacking inkjet printing as described in the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0045] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0046] Figure 1 is a flowchart illustrating a path planning method for log stacking inkjet printing according to an embodiment of the present invention;
[0047] Figure 2 is a schematic diagram of the log inkjet printing sequence according to an embodiment of the present invention;
[0048] Figure 3 is a structural block diagram of a path planning device for log stacking inkjet printing according to an embodiment of the present invention;
[0049] Figure 4 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] Currently, log measurement systems rely on a coding subsystem to mark logs. This subsystem needs to plan the coding path to achieve the shortest time and shortest path. Log coding path planning falls under the Traveling Salesman Problem (TSP). Traditional methods for solving the TSP include ant colony optimization, dynamic programming, nearest neighbor algorithm, and machine learning. However, none of these methods can simultaneously achieve high computational speed and optimal path without training data. This invention provides a path planning method for log stacking coding. By collecting the position and diameter information of the log end faces and combining it with the physical constraints of the log stack, the method optimizes the TSP of log stacking coding, remodels the log coding path planning problem, improves computational speed, generates the optimal path, improves operational efficiency, and reduces the difficulty of log warehouse management.
[0052] According to an embodiment of the present invention, a path planning method for log stacking inkjet printing is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0053] This embodiment provides a path planning method for log stacking inkjet printing, which can be used on a mobile terminal. Figure 1 is a flowchart of the path planning method for log stacking inkjet printing according to an embodiment of the present invention. As shown in Figure 1, the process includes the following steps:
[0054] Step S101: Collect the position information and corresponding diameter information of the end face of each log in the stack of logs to be inkjet printed.
[0055] In this embodiment of the invention, the measuring system provides the position information and corresponding diameter information of the end face of each log in the log stack. Specifically, the log stack to be inkjet-printed is scanned and imaged, and the position information P of the end face of each log in the log stack is analyzed. w and the corresponding diameter order information D w .
[0056] Specifically, the location and diameter information of the log end face are obtained using a path coding planning algorithm, as shown in equation (1) below:
[0057] Path = path_planning(P w D w (1)
[0058] Among them, P w ∈N×3,D w ∈N×1, where N is the number of logs.
[0059] Step S102: Based on the location information and diameter information, the log stack to be inkjet printed is modeled into a dynamic layered network model.
[0060] In this embodiment of the invention, the log end face position information and corresponding diameter information are combined to perform vertical layering and horizontal segmentation, dividing the stack into several layers from bottom to top according to the stacking height. Each layer corresponds to a horizontal network layer. Within each layer, several grid cells are divided horizontally, and each grid cell corresponds to a node, storing the log information at that location. Within the same layer, adjacent nodes are connected intra-layerly, reflecting the horizontal adjacency relationship of the logs. Between different layers, nodes of upper and lower layers are connected inter-layerly, reflecting the support structure of the stack. In this way, each log is mapped to a node, constructing a layered network model. When a log is added to or removed from the stack, the node state is updated, dynamically adjusting the network model.
[0061] Step S103: Traverse the log nodes in the dynamic hierarchical network model to generate the inkjet printing path.
[0062] In this embodiment of the invention, a node traversal method is pre-set. This traversal method includes, but is not limited to, a top-down or bottom-up traversal order for vertical layering, and a horizontal traversal path within a single layer. Examples include grid row priority (serpentine traversal), nearest neighbor priority (greedy algorithm), region grouping traversal, etc. These are merely examples and not intended to be limiting. Based on the traversed log nodes, a coding path is generated and converted into instructions executable by the coding device to perform coding according to the coding path.
[0063] Step S104: Perform collision detection on the inkjet printing path and optimize the inkjet printing path based on the collision detection results.
[0064] In this embodiment of the invention, in order to avoid obstacles in the inkjet printing path, collision detection is performed on the generated inkjet printing path. The probability of the path between the inkjet printing positions of every two logs on the inkjet printing path intersecting with the outlines of the two logs and adjacent logs is calculated in turn to optimize the inkjet printing path and avoid obstacles.
[0065] Step S105: Input the list of log coding sequence corresponding to the optimized coding path into the coding device, and control the coding device to perform coding according to the log coding sequence.
[0066] In this embodiment of the invention, a communication connection with the inkjet printer is established, the optimized inkjet path is converted into instructions that the inkjet printer can execute, the corresponding log inkjet printing sequence is input into the inkjet printer, and the inkjet printer prints the code in the sequence to reduce the idle travel time of the inkjet printer and improve the inkjet printing efficiency.
[0067] The path planning method for inkjet coding of log stacks provided in this embodiment uses the position and diameter information of the end face of each log in the log stack, combined with the physical constraints of the log stack, to convert the log stack into a hierarchical network model. This allows for log node traversal and inkjet coding path planning within the hierarchical network model. Collision detection logic is embedded to dynamically optimize the inkjet coding path, thereby controlling the inkjet coding equipment to perform automatic inkjet coding instead of manual inkjet coding. This reduces the time complexity of finding the optimal path and improves inkjet coding efficiency.
[0068] This embodiment provides a path planning method for inkjet printing on log stacks, the process of which includes the following steps:
[0069] Step S201: Collect the position information and corresponding diameter information of the end face of each log in the stack of logs to be inkjet printed.
[0070] For details, please refer to step S101 of the embodiment shown in Figure 1, which will not be repeated here.
[0071] Step S202: Based on the location information and diameter information, the log stack to be inkjet printed is modeled into a dynamic layered network model.
[0072] Specifically, step S202 includes:
[0073] Step S2021: Calculate the average spacing between the centers of the log end faces based on the location information and diameter information.
[0074] Step S2022: Based on the average spacing between the centers of the log end faces, perform dynamic layered network modeling on the log stack to be inkjet printed.
[0075] In this embodiment of the invention, based on the diameter information and number of logs, the average spacing diff between the center of the log end faces is calculated, and the stack of logs to be inkjet-printed is dynamically modeled using a hierarchical network. Specifically, the sort_wood(*) function is used to dynamically plan the inkjet-printing order of each log, and then DLNWood is used to establish a log index storage container after the dynamic hierarchical network modeling, which is used to store the data.
[0076] By calculating the average spacing between the centers of the log end faces, the distribution of logs in the stack is reflected. Based on the average spacing between the centers of the log end faces, a dynamic hierarchical network model of the log stack is created to facilitate path planning in the hierarchical network model.
[0077] Specifically, step S2021 above includes:
[0078] Step S20211: Use the boundary calculation function to calculate the upper and lower boundaries of the log stack in the vertical direction, and the left and right boundaries in the horizontal direction.
[0079] Step S20212: The average spacing between the center of the end face of the logs is determined by dividing the sum of the diameters of all logs in the log stack by the number of logs.
[0080] In this embodiment of the invention, the cal_bound(*) function is used to calculate the upper boundary B of the log stack in the vertical direction. ru Lower boundary B rd And the left boundary B in the horizontal direction cu Right boundary B cd The specific formula is as follows:
[0081] B ru B rd B cu B cd =cal_bound(P w D w (2)
[0082] The sum of the diameters of all logs in the stack is D. sum Dividing by the number of logs N, we obtain the center-to-center distance between the log ends, diff, as shown in the following formula:
[0083] diff = D sum / N(3)
[0084] By defining the upper and lower vertical boundaries and the left and right horizontal boundaries of the log stack, the space occupied by the log stack is accurately located. The average spacing between the center of the log end face is determined by dividing the sum of the diameters of all logs in the stack by the number of logs, so as to reflect the density of the log distribution in the log stack.
[0085] Specifically, step S2022 above includes:
[0086] Step S20221: Dynamically divide the number of rows of log stacks by using the upper and lower boundaries of the log stack in the vertical direction and the average spacing between the center of the log end face.
[0087] Step S20222: Dynamically divide the number of columns of the log stack by using the left and right boundaries of the log stack in the horizontal direction and the average spacing between the center of the log end face.
[0088] Step S20223: Calculate the row number and column number of each log using the row index function and column index function, respectively.
[0089] Step S20224: Based on the row and column numbers of each log and the position information of the log end face, dynamically construct a layered network model of the log stack to be inkjet printed.
[0090] In this embodiment of the invention, based on the upper boundary B of the log stack in the vertical direction... ru and lower boundary B rd And the average center-to-center spacing diff of the log end faces, dynamically dividing the number of rows N of the log stack. r The specific formula is as follows:
[0091]
[0092] Using log stacking on the left horizontal boundary B cu and right boundary B cd And the average center-to-center spacing diff of the log end faces, and the number N of columns for dynamically dividing the log stack. c The specific formula is as follows:
[0093]
[0094] The row number (NO) of each log is calculated using the row_index function. row The specific formula is as follows:
[0095] NO row =row_index(P w N r (6)
[0096] The column index function col_index is used to calculate the column number (NO) of each log. col The specific formula is as follows:
[0097] NO col =col_index(P w N c (7)
[0098] According to the row number NO of each log row Column number NO col Combined with the position information P of the log end face wThe `sort_wood` function is used to dynamically plan the coding order of each log. DLNWood is the log index storage container after dynamic hierarchical network modeling, as shown in the following formula:
[0099] DLNWood = sort_wood(P w NO row NO col (8)
[0100] By dynamically dividing the number of rows and columns of the log stack and using an index function to calculate the row and column number of each log, the log stack is transformed into a hierarchical network model to ensure that each log is mapped to a valid row and a valid column, thus providing a foundation for path planning.
[0101] Step S203: Traverse the log nodes in the dynamic hierarchical network model to generate the inkjet printing path.
[0102] Specifically, step S203 includes:
[0103] Step S2031: Traverse the log nodes in the dynamic hierarchical network model in a spiral progressive manner to obtain the log node traversal result.
[0104] Step S2032: Use a path planning algorithm to generate a coding sequence list based on the log node traversal results, and convert the coding sequence list into a coding path.
[0105] In this embodiment of the invention, the spiral progressive traversal refers to starting from a certain position in the log stack and expanding outward layer by layer along a spiral path, ensuring that each log node is traversed while maintaining the continuity of the inkjet printing path.
[0106] For symmetrical log stacks, the geometric center of the stack can be used as the starting point for traversal; for asymmetrical log stacks, the node near the stack entrance can be used as the starting point. The traversal expands outwards or inwards in a spiral pattern, traversing each log node in turn to ensure that every log node is covered.
[0107] Based on the log node traversal results, a coding sequence list is generated, as shown in Figure 2. That is, the coding sequence of the log is represented by numbers, and then the coding sequence list is converted into coding path instructions that can be executed by the coding device.
[0108] A spiral progressive approach is used to traverse the log nodes to ensure path continuity and reduce invalid node traversal. The log node traversal results are combined with a path planning algorithm to generate the optimal inkjet printing path, thereby improving path planning efficiency.
[0109] Step S204: Perform collision detection on the inkjet printing path and optimize the inkjet printing path based on the collision detection results.
[0110] Specifically, step S204 includes:
[0111] Step S2041: Collect log outlines to form a log outline set.
[0112] Step S2042: Use a collision detection algorithm to perform collision detection on the inkjet path and the log outline set to determine whether the logs in the inkjet path intersect with other adjacent logs.
[0113] Step S2043: If the logs in the inkjet printing path intersect with other adjacent logs, then the inkjet printing path is optimized.
[0114] In this embodiment of the invention, the outlines of logs and adjacent logs are collected to form a log outline set. The collision detection algorithm takes the coding positions of two adjacent logs in the coding path and the log outline set as input, and the collision detection result as output, to avoid obstacles in the coding path. Specifically, the path between the coding positions of every two logs in the coding path is calculated sequentially, and the probability of the path intersecting with these two logs and adjacent logs is determined. If a log in the coding path does not intersect with other adjacent logs, no collision will occur, and no optimization of the coding path is needed. If a log in the coding path intersects with other adjacent logs, a collision will occur, and a new path is planned to avoid the collision.
[0115] Specifically, the distance between the path segment and the log axis is calculated, a safety threshold range is set, and it is determined whether the calculated distance between the path segment and the log axis is within the safety threshold range. If it exceeds the safety threshold range, an intersection is determined to have occurred.
[0116] Specifically, step S2041 includes:
[0117] Step S20411: Based on the coding positions of two adjacent logs in the coding path, the position information of the log end face, and the diameter information, the log contour is collected using a contour collection function.
[0118] In this embodiment of the invention, the log outlines are collected using the Collect(*) function to form an outline set. Specifically, the coding positions of two adjacent logs in the coding path are determined, based on the coding positions P1 and P2 of the two adjacent logs in the coding path and the position information P of the end face of each log. w and the corresponding diameter order information D w This forms the contour set Conts, as shown in the following formula:
[0119] Conts = Collect(P1, P2, P...) w D w (10)
[0120] By using collision detection algorithms to avoid obstacles, new paths can be generated in an optimized manner. * The specific formula is as follows:
[0121] Path * =CA(P1, P2, Conts) (11)
[0122] The log outline is obtained by collecting the coding positions of two adjacent logs in the coding path, the position information of the log end face, and the diameter information, so as to match the actual outline of the log stack.
[0123] Step S205: Input the list of log coding sequence corresponding to the optimized coding path into the coding device, and control the coding device to perform coding according to the log coding sequence.
[0124] For details, please refer to step S105 of the embodiment shown in Figure 1, which will not be repeated here.
[0125] The path planning method for inkjet printing of log stacks provided in this embodiment uses a collision detection algorithm to perform collision detection on the inkjet printing path and the log outline set. During the path planning process, obstacles are avoided and collisions are prevented, thereby avoiding inkjet printing failures caused by inkjet printing path deviations.
[0126] This invention combines the physical constraints of log stacking to optimize the Traveling Salesman Problem (TSP) for log inkjet printing. Compared to traditional TSP methods such as brute-force enumeration, dynamic programming, branch and bound, and greedy algorithms, its time complexity is O((n-1)!) and O(n...)! respectively. 2 2 n O(n!), O(n) 2 The path planning method for log stacking inkjet coding provided in this embodiment has a solution time complexity of O(nlog(n)), which is much lower than that of traditional methods. It significantly reduces the computation time and the time to find the optimal path, thereby improving the inkjet coding efficiency of the log measuring system.
[0127] This embodiment also provides a path planning device for inkjet coding of log stacks. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0128] This embodiment provides a path planning device for inkjet coding of log stacks, as shown in Figure 3, including:
[0129] The acquisition module 301 is used to acquire the position information and corresponding diameter information of the end face of each log in the stack of logs to be inkjet printed.
[0130] Modeling module 302 is used to model the log stack to be inkjet printed into a dynamic, layered network model based on location information and diameter information.
[0131] Traversal module 303 is used to traverse the log nodes in the dynamic hierarchical network model and generate the inkjet printing path.
[0132] The path optimization module 304 is used to perform collision detection on the inkjet printing path and optimize the inkjet printing path based on the collision detection results.
[0133] The inkjet printing module 305 is used to input the list of log inkjet printing sequence corresponding to the optimized inkjet printing path into the inkjet printing device, and control the inkjet printing device to print according to the log inkjet printing sequence.
[0134] In some alternative implementations, the modeling module 302 includes:
[0135] The calculation unit is used to calculate the average spacing between the centers of the log end faces based on the location information and diameter information.
[0136] The modeling unit is used to dynamically create a layered network model of the log stack to be inkjet printed based on the average spacing between the centers of the log end faces.
[0137] In some alternative implementations, the computing unit includes:
[0138] The first calculation subunit is used to calculate the upper and lower boundaries of the log stack in the vertical direction and the left and right boundaries in the horizontal direction using the boundary calculation function.
[0139] A sub-unit is defined to determine the average center-to-center spacing of the log end faces by dividing the sum of the diameter grades of all logs in the log stack by the number of logs.
[0140] In some alternative implementations, the modeling unit includes:
[0141] The first dividing subunit is used to dynamically divide the number of rows of log stacks by utilizing the upper and lower boundaries of the log stack in the vertical direction and the average spacing between the center of the log end face.
[0142] The second sub-unit is used to dynamically divide the number of columns of the log stack by utilizing the left and right boundaries of the log stack in the horizontal direction and the average spacing between the center of the log end face.
[0143] The second calculation subunit is used to calculate the row number and column number of each log using the row index function and column index function, respectively.
[0144] The modeling sub-unit is used to dynamically construct a hierarchical network model of the stack of logs to be inkjet printed based on the row and column numbers of each log and the position information of the log end face.
[0145] In some alternative implementations, the traversal module 303 includes:
[0146] The traversal unit is used to traverse the log nodes in the dynamic hierarchical network model in a spiral progressive manner to obtain the log node traversal result.
[0147] The sequence list generation unit is used to generate a coding sequence list based on the log node traversal results using a path planning algorithm, and then converts the coding sequence list into a coding path.
[0148] In some alternative implementations, the path optimization module 304 includes:
[0149] The outline collection unit is used to collect log outlines and form a log outline set.
[0150] The judgment unit is used to perform collision detection on the inkjet path and the log outline set using a collision detection algorithm, and to determine whether the logs in the inkjet path intersect with other adjacent logs.
[0151] The optimization unit is used to optimize the coding path if the logs in the coding path intersect with other adjacent logs.
[0152] In some alternative implementations, the contour collection unit includes:
[0153] The contour collection subunit is used to collect the log contours based on the coding positions of two adjacent logs in the coding path, the position information of the log end face, and the diameter information, using the contour collection function.
[0154] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0155] In this embodiment, the path planning device for log stacking inkjet printing is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0156] This invention also provides a computer device having the path planning device for log stacking coding shown in FIG3 above.
[0157] Please refer to Figure 4, which is a schematic diagram of a computer device provided in an optional embodiment of the present invention. As shown in Figure 4, the computer device includes one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 4 uses one processor 10 as an example.
[0158] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.
[0159] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0160] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 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 alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device 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.
[0161] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0162] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means; Figure 4 shows an example of a connection via a bus.
[0163] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touch screen. Output device 40 may include a display device, etc.
[0164] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0165] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0166] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and all such modifications and variations fall within the scope of this application.
Claims
1. A path planning method for inkjet printing on stacked logs, characterized in that, The method includes: collecting the position information and corresponding diameter information of the end face of each log in the log stack to be inkjet-printed; modeling the log stack to be inkjet-printed into a dynamic layered network model based on the position information and the diameter information; traversing the log nodes in the dynamic layered network model to generate an inkjet-printing path; performing collision detection on the inkjet-printing path and optimizing the inkjet-printing path based on the collision detection results; inputting the log inkjet-printing sequence list corresponding to the optimized inkjet-printing path into the inkjet-printing device, and controlling the inkjet-printing device to print according to the log inkjet-printing sequence; the step of modeling the log stack to be inkjet-printed into a dynamic layered network model based on the position information and the diameter information includes: calculating the average spacing between the centers of the log end faces based on the position information and the diameter information; performing dynamic layered network modeling on the log stack to be inkjet-printed based on the average spacing between the centers of the log end faces; the step of modeling the log stack to be inkjet-printed into a dynamic layered network model based on the position information and the diameter information includes: calculating the average spacing between the centers of the log end faces based on the position information and the diameter information ... The process involves calculating the average spacing between the center points of the log end faces, including: using boundary calculation functions to calculate the upper and lower vertical boundaries of the log stack and the left and right horizontal boundaries; determining the average spacing between the center points of the log end faces by dividing the sum of the diameters of all logs in the stack by the number of logs; and then, based on the average spacing between the center points of the log end faces, dynamically modeling the log stack to be coded using a hierarchical network, including: dynamically dividing the log stack into rows using the upper and lower vertical boundaries and the average spacing between the center points of the log end faces; dynamically dividing the log stack into columns using the left and right horizontal boundaries and the average spacing between the center points of the log end faces; calculating the row and column numbers of each log using row and column index functions; and dynamically constructing a hierarchical network model of the log stack to be coded based on the row and column numbers of each log and the position information of the log end faces.
2. The method according to claim 1, characterized in that, The step of traversing the log nodes of the dynamic hierarchical network model to generate the inkjet printing path includes: traversing the log nodes in the dynamic hierarchical network model in a spiral progressive manner to obtain the log node traversal result; using a path planning algorithm to generate an inkjet printing sequence list based on the log node traversal result; and converting the inkjet printing sequence list into an inkjet printing path.
3. The method according to claim 1, characterized in that, The process of performing collision detection on the coding path and optimizing the coding path based on the collision detection results includes: collecting log outlines to form a log outline set; using a collision detection algorithm to perform collision detection on the coding path and the log outline set to determine whether the logs in the coding path intersect with other adjacent logs; if the logs in the coding path intersect with other adjacent logs, then the coding path is optimized.
4. The method according to claim 3, characterized in that, The process of collecting log outlines includes: collecting log outlines using a outline collection function based on the coding positions of two adjacent logs in the coding path, the position information of the log end face, and the diameter information.
5. A path planning device for inkjet printing on stacked logs, characterized in that, The device includes: a data acquisition module for acquiring the position information and corresponding diameter information of the end face of each log in the log stack to be inkjet-printed; a modeling module for modeling the log stack into a dynamic hierarchical network model based on the position information and the diameter information; a traversal module for traversing the log nodes in the dynamic hierarchical network model to generate an inkjet-printing path; a path optimization module for performing collision detection on the inkjet-printing path and optimizing the inkjet-printing path based on the collision detection results; and an inkjet-printing module for inputting the log inkjet-printing sequence list corresponding to the optimized inkjet-printing path into the inkjet-printing device and controlling the inkjet-printing device to print according to the log inkjet-printing sequence. The modeling module includes: a calculation unit for calculating the average spacing between the centers of the log end faces based on the position information and the diameter information; and a modeling unit for calculating the average spacing between the centers of the log end faces. The log stack to be inkjet-printed is dynamically modeled using a layered network. The calculation unit includes: a first calculation subunit, used to calculate the upper and lower boundaries of the log stack in the vertical direction and the left and right boundaries in the horizontal direction using boundary calculation functions; a determination subunit, used to determine the average spacing between the center of the log end face by dividing the sum of the diameters of all logs in the log stack by the number of logs; the modeling unit includes: a first partitioning subunit, used to dynamically partition the number of rows of the log stack using the upper and lower boundaries of the log stack in the vertical direction and the average spacing between the center of the log end face; a second partitioning subunit, used to dynamically partition the number of columns of the log stack using the left and right boundaries of the log stack in the horizontal direction and the average spacing between the center of the log end face; and a second calculation subunit, used to calculate the row number and column number of each log using row indexing functions and column indexing functions, respectively.
6. A computer device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the path planning method for log stacking inkjet printing as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the path planning method for log stacking inkjet printing as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Robot trajectory optimization method and device for wood spray coating industry
CN108161941A
Method and device for planning target area operation, storage medium and processor
CN108846325A