Self-service medicine selling machine parallel sorting method and system based on multi-axis cooperation
By analyzing the spatial topology of drug order information and avoiding temporal constraints, parallel sorting with multi-axis collaboration in self-service drug vending machines was achieved, improving sorting efficiency and system stability, and solving the problems of low efficiency and interference conflicts in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-03-27
AI Technical Summary
Existing self-service medicine vending machines mostly use a single motion axis or multiple motion axes working in series, resulting in low sorting efficiency and failing to meet the needs of rapid medicine dispensing in high-concurrency scenarios. Furthermore, multi-axis systems lack effective spatial coordination mechanisms, which can easily lead to interference and conflicts, affecting the stability and security of the system.
By performing spatial topology analysis on drug order information, it is decomposed into multiple sets of sub-tasks and an execution path containing avoidance timing constraints is generated. Multiple motion axes are used to grab drugs in parallel within their respective work areas, and the drugs are merged and combined through intermediate cache locations. Finally, the drugs are delivered to the dispensing port, avoiding physical collisions and logical conflicts.
It improves the parallel processing capability and sorting efficiency of self-service medicine vending machines, ensures the security and stability of the system, solves the problem of integrity and accuracy of complex orders, and realizes the coordination of parallel sorting and sequential medicine dispensing.
Smart Images

Figure CN121747239A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of control, and in particular to a self-service medicine selling machine parallel sorting method and system based on multi-axis cooperation. BACKGROUND
[0002] With the intelligent development of medical and health services, self-service medicine selling machines, as a new type of medicine retail terminal, are gradually popularizing in hospitals, pharmacies and communities and other public places. Through an automatic sorting system, a self-service medicine selling machine can quickly and accurately sort out the required medicine according to the user's demand, improve the medicine sales efficiency, reduce the labor burden, and meet people's demand for convenient medicine purchasing service. At present, the self-service medicine selling machines on the market mainly adopt single-axis or simple multi-axis serial sorting methods, and through mechanical arms or conveyors and other devices, the medicine is taken out one by one according to the preset path and transmitted to the medicine outlet.
[0003] There are several technical problems in the medicine sorting process of the traditional self-service medicine selling machine. First, the existing self-service medicine selling machines mostly adopt single motion axis or multiple motion axis serial working mode for medicine sorting. When an order contains multiple medicines, the medicines need to be taken out one by one in a preset order, which leads to low sorting efficiency and is difficult to meet the demand for quick medicine taking in high concurrency scenarios. Secondly, in the multi-axis system, there is a lack of effective space cooperation mechanism between the motion axes, which cannot fully utilize the multi-dimensional space resources, and interference and conflict between the motion axes are likely to occur, affecting the stability and safety of the system SUMMARY
[0004] The embodiment of the present application provides a self-service medicine selling machine parallel sorting method and system based on multi-axis cooperation, which can solve the problems in the prior art.
[0005] In a first aspect, the embodiment of the present application provides a self-service medicine selling machine parallel sorting method based on multi-axis cooperation, which comprises: Obtaining medicine order information to be sorted, the medicine order information containing medicine identification and medicine taking position identification; performing spatial topology analysis on the medicine order information, and decomposing the medicine order information into a plurality of sub-task sets according to the spatial distribution of the storage positions corresponding to the medicine identifications in the plurality of storage areas, each sub-task set corresponding to an independent motion axis reachable range; Based on the spatial interference relationship and time sequence dependency relationship between the plurality of sub-task sets, an execution path containing avoidance time sequence constraints is generated for each motion axis, the avoidance time sequence constraints being used to limit the entering time and exiting time of different motion axes in the shared working space, so that physical collision and logical conflict are avoided when the plurality of motion axes execute the respective corresponding sub-task sets; According to the execution path, the plurality of motion axes are driven to grab medicines from the corresponding storage areas respectively, and the grabbed medicines are transmitted to an intermediate cache position; According to the medicine taking position identifier, the multiple medicines located at the intermediate cache position are merged and combined, the medicines belonging to the same medicine taking position identifier are collected from the grabbing results of different movement axes to a unified medicine outlet channel, and order level aggregation in the parallel sorting process is completed; and the medicines after the merging and combining are delivered to the medicine outlet corresponding to the medicine taking position identifier.
[0006] The medicine order information is subjected to spatial topology analysis, the medicine order information is decomposed into multiple sub-task sets according to the spatial distribution of the storage positions corresponding to the medicine identifiers in the multiple storage areas, and each sub-task set corresponds to an independent movement axis reachable range including: The three-dimensional space coordinates of the storage positions corresponding to the medicine identifiers in the medicine order information are extracted, and a storage position topology graph is constructed based on the three-dimensional space coordinates, the storage position topology graph representing the spatial adjacency relationship and distance relationship between the multiple storage positions; According to the mechanical structure constraint parameters of each movement axis, the reachable boundary of each movement axis in the three-dimensional space is determined, and the reachable boundary defines the spatial range that the end effector of the movement axis can reach; Based on the storage position topology graph and the reachable boundary of each movement axis, the reachability relationship between each storage position and each movement axis is calculated, and the reachability relationship represents whether the storage position is located within the reachable boundary of the movement axis; According to the reachability relationship, multiple medicine identifiers in the medicine order information are grouped according to the movement axis reachable boundary to which the storage positions corresponding to the medicine identifiers belong, forming multiple sub-task sets, and each sub-task set contains all medicine identifiers that can be reached by the same movement axis; For the storage positions located in the overlapping region of multiple movement axis reachable boundaries, according to the spatial adjacency relationship between the storage position and other storage positions in the storage position topology graph, the storage position is assigned to the sub-task set corresponding to the movement axis with the most number of spatially adjacent storage positions.
[0007] Based on the storage position topology graph and the reachable boundary of each movement axis, the reachability relationship between each storage position and each movement axis is calculated, including: The storage position topology graph is subjected to topology hierarchical decomposition, and the storage position topology graph is divided into multiple topology levels according to the spatial adjacency relationship between the storage positions; A boundary reachable point set of each movement axis is extracted from the reachable boundary, and the boundary reachable point set contains all boundary position points that can be reached by the movement axis in the movement limit state; Taking the boundary reachable point set as the starting point, the reachability propagation is performed layer by layer inward along the topology hierarchical structure of the storage position topology graph, and in each topology level, the storage positions determined as reachable in the previous topology level are taken as the propagation source points; For each storage location to be determined, the spatial connectivity between the storage location and its corresponding propagation source point is calculated, which is determined by detecting whether there is a spatial fault on the path from the propagation source point to the storage location that cannot be crossed by the motion axis; When there is spatial connectivity between the storage location and the propagation source point, the storage location is marked as a reachable storage location of the motion axis, and the storage location is added to the propagation source point set of the next topological level to continue to propagate reachability to deeper topological levels; After traversing all topological levels to complete the reachability propagation, the reachable storage locations marked by each motion axis in all topological levels are summarized to generate the reachability relationship between each storage location and each motion axis.
[0008] Based on the spatial interference relationship and the temporal dependency relationship between the plurality of sub-task sets, an execution path containing avoidance temporal constraints is generated for each motion axis, the avoidance temporal constraints are used to limit the entry time and exit time of different motion axes in the shared workspace, so that multiple motion axes avoid physical collision and logical conflict when executing their corresponding sub-task sets, including: According to the spatial path that each motion axis needs to pass through when executing its corresponding sub-task set, the shared workspace existing between the spatial paths of multiple motion axes is identified, the shared workspace is a region where the spatial paths of at least two motion axes exist spatial overlap; Analyzing the pre-sequenced tasks that each motion axis needs to execute to enter the shared workspace and the subsequent tasks that need to be executed after exiting the shared workspace, a temporal dependency relationship between multiple motion axes is established; Based on the temporal dependency relationship, a time window sequence is assigned to each shared workspace, the time window sequence divides the use time of the shared workspace into a plurality of non-overlapping time windows, each time window is exclusively assigned to a motion axis, ensuring that only one motion axis occupies the shared workspace in the same time window; According to the time window sequence, avoidance temporal constraints containing entry time and exit time are generated for each motion axis, the entry time corresponds to the start time of the time window assigned to the motion axis, and the exit time corresponds to the end time of the time window assigned to the motion axis; According to the avoidance temporal constraints, the execution order and execution speed of each task in the sub-task set of each motion axis are adjusted, so that the actual time of each motion axis reaching the shared workspace is consistent with the entry time, and the occupation of the shared workspace is completed before the exit time, generating the execution path of each motion axis.
[0009] According to the avoidance timing constraint, the execution order and execution speed of each task in the sub-task set of each motion axis are adjusted, so that the actual time when each motion axis reaches the shared workspace is consistent with the entry time, and the occupation of the shared workspace is completed before the exit time, which includes: For each motion axis, the expected arrival time of the motion axis from the starting position of each task in the sub-task set to the shared workspace entry is calculated according to the spatial distance between the starting position of each task and the shared workspace entry; The expected arrival time is compared with the entry time in the avoidance timing constraint to calculate the time deviation; based on the time deviation, the tasks with expected arrival time earlier than the entry time are adjusted to the rear position of the execution order, and the tasks with expected arrival time later than the entry time are adjusted to the front position of the execution order, to generate the task execution sequence after adjustment; The modified arrival time of the motion axis reaching the shared workspace entry after executing all tasks according to the task execution sequence after adjustment is recalculated; When the modified arrival time still has a time deviation from the entry time, the target execution speed of the motion axis during the execution of the task execution sequence after adjustment is calculated, which adjusts the motion speed of the motion axis to make the modified arrival time consistent with the entry time; According to the task execution sequence after adjustment and the target execution speed, the motion axis executes each task in the sub-task set, so that the actual time when the motion axis reaches the shared workspace is consistent with the entry time, and the occupation of the shared workspace is completed before the exit time.
[0010] According to the execution path, multiple motion axes respectively grab medicines from corresponding storage areas, and transmit the grabbed medicines to an intermediate cache position; according to the medicine taking position identifier, multiple medicines located in the intermediate cache position are merged and combined, and medicines belonging to the same medicine taking position identifier are collected from the grabbing results of different motion axes to a unified medicine outlet channel, which includes: According to the execution path, multiple motion axes respectively grab medicines from corresponding storage areas, and generate transmission identification information for each grabbed medicine during the grabbing process, the transmission identification information includes the medicine identifier, the medicine taking position identifier and the motion axis identifier of the execution grabbing; According to the medicine taking position identifier in the transmission identification information, each medicine is allocated a target cache slot in the intermediate cache position, and the allocation rule of the target cache slot is to allocate medicines with the same medicine taking position identifier to a group of spatially adjacent cache slots in the intermediate cache position, so that medicines belonging to the same medicine taking position identifier form a spatially concentrated area in the intermediate cache position; According to the position information of the target buffer slot, the plurality of motion shafts are controlled to respectively transmit the grabbed medicine to the corresponding target buffer slot, so as to complete the temporary storage of the medicine in the intermediate buffer position. The arrival state of the medicine in each spatial aggregation area in the intermediate buffer position is monitored, and when it is detected that all the target buffer slots in a spatial aggregation area corresponding to a medicine taking position identifier have received the medicine, the medicine in all the target buffer slots in the spatial aggregation area is extracted, and the extracted medicine is collected to a unified medicine outlet channel according to the medicine taking position identifier in the transmission identifier information.
[0011] In a second aspect of the embodiment of the present application, a self-service medicine selling machine parallel sorting system based on multi-axis cooperation is provided, which comprises: A first unit is configured to obtain medicine order information to be sorted, wherein the medicine order information comprises a medicine identifier and a medicine taking position identifier; the medicine order information is subjected to spatial topology analysis, and according to the spatial distribution of the storage position corresponding to the medicine identifier in the plurality of storage areas, the medicine order information is decomposed into a plurality of sub-task sets, each sub-task set corresponding to an independent motion shaft reachable range; A second unit is configured to generate an execution path containing avoidance timing constraints for each motion shaft based on the spatial interference relationship and timing dependency relationship between the plurality of sub-task sets, wherein the avoidance timing constraints are used to limit the entering time and exiting time of different motion shafts in the shared working space, so that the plurality of motion shafts avoid physical collision and logical conflict when executing the corresponding sub-task sets; A third unit is configured to drive the plurality of motion shafts to grab medicine from the corresponding storage area according to the execution path, and transmit the grabbed medicine to an intermediate buffer position; A fourth unit is configured to merge and combine a plurality of medicines located in the intermediate buffer position according to the medicine taking position identifier, collect the medicines belonging to the same medicine taking position identifier from the grabbing results of different motion shafts to a unified medicine outlet channel, complete order-level aggregation in the parallel sorting process, and deliver the medicines after the merging and combining to the medicine outlet corresponding to the medicine taking position identifier.
[0012] In a third aspect of the embodiment of the present application, An electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the method described above.
[0013] In a fourth aspect of the embodiment of the present application, A computer readable storage medium is provided, and computer program instructions are stored on the computer readable storage medium, and the computer program instructions are executed by a processor to implement the method.
[0014] The beneficial effects of the present application are as follows: By performing spatial topology analysis on the medicine order information and decomposing it into a plurality of sub-task sets, the plurality of movement axes can simultaneously perform medicine grabbing operations in their respective working areas, improving the parallel processing capability and sorting efficiency of the system.
[0015] Based on the spatial interference relationship and time sequence dependency relationship between the sub-task sets, an execution path containing avoidance time sequence constraints is generated, effectively avoiding physical collision and logical conflict during multi-axis collaborative work, and improving the safety and stability of system operation.
[0016] An intermediate cache location is introduced as a temporary storage area for multi-axis sorting results, combined with an order-level aggregation mechanism, to solve the contradiction between parallel sorting and sequential medicine dispensing, ensuring the integrity and accuracy of complex orders. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 A flowchart of the self-service medicine dispensing machine parallel sorting method based on multi-axis collaboration of the present application embodiment is shown. Figure 2 A flowchart for generating an execution path containing avoidance time sequence constraints for each movement axis is shown. DETAILED DESCRIPTION
[0018] To make the purpose, technical scheme and advantages of the present application embodiment clearer, the technical scheme of the present application embodiment will be described clearly and completely below in combination with the drawings of the present application embodiment. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0019] The technical scheme of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0020] Reference Figure 1 and Figure 2 The self-service medicine dispensing machine parallel sorting method based on multi-axis collaboration of the present application embodiment includes: Obtaining medicine order information to be sorted, the medicine order information including medicine identifiers and taking position identifiers; performing spatial topology analysis on the medicine order information, and decomposing the medicine order information into a plurality of sub-task sets according to the spatial distribution of the storage positions corresponding to the medicine identifiers in the plurality of storage areas, each sub-task set corresponding to an independent reachable range of a motion axis; Based on the spatial interference relationship and the time sequence dependency relationship between the plurality of sub-task sets, an execution path including avoidance time sequence constraints is generated for each motion axis, the avoidance time sequence constraints being used to limit the entering time and the exiting time of different motion axes in a shared workspace, so that the plurality of motion axes avoid physical collision and logical conflict when executing the respective corresponding sub-task sets; According to the execution path, the plurality of motion axes are driven to grab medicines from the corresponding storage areas, and the grabbed medicines are transmitted to an intermediate cache position; According to the taking position identifiers, a plurality of medicines located at the intermediate cache position are merged and combined, the medicines belonging to the same taking position identifier are collected from the grabbing results of different motion axes to a unified medicine outlet channel, and order-level aggregation in the parallel sorting process is completed; and the medicines after the merging and combining are delivered to the medicine outlet corresponding to the taking position identifier.
[0021] In an optional implementation, the spatial topology analysis on the medicine order information, and the decomposition of the medicine order information into a plurality of sub-task sets according to the spatial distribution of the storage positions corresponding to the medicine identifiers in the plurality of storage areas, each sub-task set corresponding to an independent reachable range of a motion axis include: Extracting three-dimensional space coordinates of the storage positions corresponding to each medicine identifier in the medicine order information, and constructing a storage position topology graph based on the three-dimensional space coordinates, the storage position topology graph representing the spatial adjacency relationship and distance relationship between the plurality of storage positions; According to the mechanical structure constraint parameters of each motion axis, determining the reachable boundary of each motion axis in the three-dimensional space, the reachable boundary defining the spatial range that the end effector of the motion axis can reach; Based on the storage position topology graph and the reachable boundary of each motion axis, calculating the reachability relationship between each storage position and each motion axis, the reachability relationship representing whether the storage position is located within the reachable boundary of the motion axis; According to the reachability relationship, grouping a plurality of medicine identifiers in the medicine order information according to the motion axis reachable boundary to which the storage positions corresponding to the medicine identifiers belong, to form a plurality of sub-task sets, each sub-task set including all medicine identifiers that can be reached by the same motion axis; For the storage location simultaneously located in the overlapping region of the reachable boundaries of multiple motion axes, according to the spatial adjacency relationship of the storage location and other storage locations in the storage location topology graph, the storage location is assigned to the sub-task set corresponding to the motion axis with the largest number of spatially adjacent storage locations.
[0022] In the automatic medicine dispensing system, the spatial topology analysis of medicine order information is a key link to improve the dispensing efficiency. In order to effectively handle complex orders and realize reasonable allocation of resources, the spatial topology of the medicine order information is analyzed, and the three-dimensional spatial coordinates of the storage location corresponding to each medicine are extracted. Assuming that a medicine order contains multiple medicines, each medicine has a unique identification code and a corresponding storage location. Taking a certain dispensing system as an example, the medicine storage rack is divided into several regions, each region is identified by three coordinates of row, column and layer. Through database query, the storage location coordinates (x, y, z) corresponding to the medicine identification are obtained, where x represents the column number of the storage rack, y represents the row number, and z represents the layer height.
[0023] After obtaining all the spatial coordinates of the medicines, a storage location topology graph is constructed. The topology graph adopts a weighted undirected graph structure, each node represents a medicine storage location, and the edges between the nodes represent the spatial adjacency relationship between the two storage locations, and the weight of the edge represents the Euclidean distance between the two locations. For any two storage locations p1(x1, y1, z1) and p2(x2, y2, z2), calculate the distance d between them, if d is less than a preset threshold (for example, 1.5 times the distance of adjacent grid positions), it is considered that the two positions are spatially adjacent, and a edge is added in the topology graph. At the same time, record the weight of each edge as the actual distance between the two points.
[0024] Next, the reachable boundary of each motion axis is determined. In a multi-axis dispensing system, each motion axis has its mechanical structure constraints, such as mechanical arm length, joint angle limit, etc. According to the mechanical parameters, the activity space of the end effector of each motion axis can be calculated. Taking a three-axis mechanical arm as an example, assuming that the first axis covers the left side region of the storage rack, its reachable boundary is {0≤x≤5, 0≤y≤10, 0≤z≤8}; the second axis covers the middle region, the reachable boundary is {4≤x≤9, 0≤y≤10, 0≤z≤8}; the third axis covers the right side region, the reachable boundary is {8≤x≤12, 0≤y≤10, 0≤z≤8}. Note that there is an overlapping region of the reachable boundaries between adjacent motion axes, which provides flexibility for subsequent task optimization allocation.
[0025] Based on the storage location topology graph and the reachable boundary of each motion axis, the reachability relationship between each storage location and each motion axis is calculated. For each medicine in the order, check whether the coordinates of its storage location are within the reachable boundary of each motion axis. Establish a reachability matrix M, where M[i][j] represents whether the i-th storage location is within the reachable boundary of the j-th motion axis, 1 represents reachable, and 0 represents unreachable.
[0026] According to the reachability relationship, the medicines in the medicine order are grouped according to the motion axis reachable boundary to which the storage location belongs. For storage locations that are only reachable by one motion axis, the corresponding medicines are directly assigned to the sub-task set of that motion axis. For example, if the storage location of medicine A is only within the first axis reachable boundary, medicine A is assigned to the first axis sub-task set.
[0027] For storage locations that are simultaneously within the overlapping regions of multiple motion axis reachable boundaries, further optimization of assignment is required. At this time, the previously constructed storage location topology graph is used to calculate the spatial adjacency relationship between the storage location and the already assigned locations in each motion axis sub-task set. Specifically, for a location p, the number of adjacent nodes of the location p in the topology graph with each motion axis assigned location set is counted, and p is assigned to the sub-task set corresponding to the motion axis with the most adjacent nodes.
[0028] For example, assuming that the storage location p of medicine B is simultaneously within the reachable boundaries of the first axis and the second axis, through topology graph analysis, p has 3 adjacent nodes with the first axis assigned location set and 1 adjacent node with the second axis assigned location set, then medicine B is assigned to the first axis sub-task set. This assignment strategy based on spatial adjacency relationship can make the medicines processed by the same motion axis as concentrated as possible in space, reduce the motion distance of the motion axis, and improve the dispensing efficiency.
[0029] Finally, the decomposition of the medicine order information is completed, forming multiple sub-task sets, each of which contains all the medicine identifiers that can be efficiently processed by the same motion axis. Each sub-task set can be independently assigned to the corresponding motion axis for execution, realizing parallel dispensing and improving the overall processing capacity of the system.
[0030] In practical applications, the threshold and weight calculation method of spatial topology analysis can be adjusted according to the specific storage rack layout and robot parameters to adapt to different sizes of pharmacy automation systems and realize the optimized decomposition of order processing.
[0031] In an optional implementation, based on the storage location topology graph and the reachable boundary of each motion axis, the reachability relationship between each storage location and each motion axis is calculated, including: The storage location topology graph is topologically decomposed, and the storage location topology graph is divided into multiple topological levels according to the spatial adjacency relationship between the storage locations. extracting a boundary reachable point set of each movement axis from the reachable boundary, the boundary reachable point set containing all boundary position points that the movement axis can reach in its movement limit state; starting from the boundary reachable point set, performing reachability propagation layer by layer inwards along the topology hierarchy of the storage location topology graph, in each topology layer, taking the storage locations determined as reachable in the previous topology layer as the propagation source points; for each storage location to be determined, calculating the spatial connectivity between the storage location and its corresponding propagation source point, the spatial connectivity being determined by detecting whether there is a spatial fault that the movement axis cannot cross on the path from the propagation source point to the storage location; when there is spatial connectivity between the storage location and the propagation source point, marking the storage location as a reachable storage location of the movement axis, and adding the storage location to the propagation source point set of the next topology layer, and continuing to propagate reachability to deeper topology layers; after completing the reachability propagation through all topology layers, collecting the reachable storage locations marked by each movement axis in all topology layers, to generate the reachability relationship between each storage location and each movement axis.
[0032] In the specific implementation of calculating the reachability relationship between each storage location and each movement axis based on the storage location topology graph and the reachable boundary of each movement axis, the complete storage location topology graph and the reachable boundary information of each movement axis need to be obtained first, and then systematic calculation and analysis are performed.
[0033] When performing topology layer decomposition on the storage location topology graph, spatial adjacency relationship is used as the basis for division. In specific implementation, the outermost storage locations in the topology graph are selected as the first topology layer, which are usually in direct contact with the external environment. Then, the storage locations that are directly adjacent to the first layer storage locations and have not been assigned a layer are divided into the second topology layer. In this way, the process is gradually pushed inwards until all storage locations are assigned to the corresponding topology layer. For example, in a shelf storage system, the outermost shelf locations are marked as the first layer, the next outermost as the second layer, and so on.
[0034] When extracting the boundary reachable point set of each movement axis from the reachable boundary, the movement characteristics and physical limitations of the movement axis need to be considered. For each movement axis, analyze the boundary conditions of its movement range, and determine its movement limit value in each dimension. On this basis, all boundary position points reachable by the movement axis are mapped to form the boundary reachable point set. For example, for a horizontal movement axis in a three-dimensional space, its boundary reachable point set is all points on a rectangular boundary formed in the horizontal plane.
[0035] In the process of reachability propagation, the set of boundary reachable points is taken as the initial propagation source points, and the first round of reachability determination is started. For each storage location to be determined, it is checked whether there is spatial connectivity between it and the propagation source points. The spatial connectivity determination is achieved by detecting whether there is a spatial fault that cannot be crossed by the motion axis on the path from the propagation source point to the storage location.
[0036] The spatial connectivity determination can use a path planning algorithm such as Dijkstra's algorithm. In the determination process, factors such as the motion limit of the motion axis, obstacles in the storage environment, etc. are considered. If there is an unobstructed path connecting the propagation source point and the storage location to be determined, it is considered that there is spatial connectivity between the two.
[0037] When it is determined that there is spatial connectivity between the storage location and the propagation source point, the storage location is marked as the reachable storage location of the current motion axis, and it is added to the propagation source point set of the next topological level. In this way, the reachability information is propagated from the outer layer to the inner layer. For example, in the first round of propagation, it is determined whether the storage locations in the first topological level are reachable; in the second round of propagation, the reachable storage locations determined in the first round are taken as new propagation source points, and it is determined whether the storage locations in the second topological level are reachable.
[0038] In the process of reachability propagation in each topological level, the cooperation relationship between the motion axes also needs to be considered. Some storage locations may need multiple motion axes to work together to reach. In this case, the reachable boundaries of each motion axis need to be considered comprehensively to determine the joint reachable region.
[0039] After completing the reachability propagation of all topological levels, the reachable storage locations marked by each motion axis in all levels are summarized to generate a reachability relationship matrix or mapping table between each storage location and each motion axis. This relationship shows which storage locations can be accessed by which motion axes, providing a basis for subsequent path planning and task allocation.
[0040] This method can also dynamically adapt to changes in the storage environment. When the storage location topological structure changes or the performance parameters of the motion axis are adjusted, the reachability relationship can be quickly recalculated to ensure that the system always makes decisions based on the latest environmental information. For example, when some storage areas are temporarily closed or the motion range of the motion axis is limited due to maintenance, the reachability relationship can be updated in time to re-plan the workflow.
[0041] Through this systematic reachability analysis method, intelligent decision-making of the automated storage system can be effectively supported, the optimization configuration of access operations can be realized, and the system response speed and resource utilization rate can be improved.
[0042] In an alternative embodiment, based on the spatial interference relationship and the time sequence dependency relationship between the plurality of sub-task sets, an execution path containing avoidance time sequence constraints is generated for each motion axis, the avoidance time sequence constraints being used to define the entering time and the exiting time of different motion axes in the shared workspace, so that the plurality of motion axes avoid physical collision and logical conflict when executing the respective corresponding sub-task sets, comprising: According to the spatial path that each motion axis needs to pass through when executing its corresponding sub-task set, a shared workspace existing between the spatial paths of the plurality of motion axes is identified, the shared workspace being a region in which the spatial paths of at least two motion axes have spatial overlap; The pre-sequencing tasks that each motion axis needs to execute when entering the shared workspace and the subsequent tasks that each motion axis needs to execute after exiting the shared workspace are analyzed, and a time sequence dependency relationship between the plurality of motion axes is established; Based on the time sequence dependency relationship, a time window sequence is assigned to each shared workspace, the time window sequence dividing the use time of the shared workspace into a plurality of non-overlapping time windows, each time window being exclusively assigned to a motion axis, so as to ensure that only one motion axis occupies the shared workspace in the same time window; According to the time window sequence, avoidance time sequence constraints containing the entering time and the exiting time are generated for each motion axis, the entering time corresponding to the starting time of the time window to which the motion axis is assigned, and the exiting time corresponding to the ending time of the time window to which the motion axis is assigned; According to the avoidance time sequence constraints, the execution order and the execution speed of each task in the sub-task set of each motion axis are adjusted, so that the actual time at which each motion axis reaches the shared workspace is consistent with the entering time, and the occupation of the shared workspace by each motion axis is completed before the exiting time, thereby generating an execution path for each motion axis.
[0043] Exemplarily, in the multi-axis cooperative operation scenario of the self-service medicine selling machine, the joint angle change sequence of each motion axis when executing its assigned task is converted into a three-dimensional spatial position sequence of the end effector through kinematic forward calculation, and a spatial path envelope of the motion axis is constructed.
[0044] The spatial path envelope is represented by a discrete set of spatial points, and the entire movement process of the motion axis from the starting position to the target position is discretized into a plurality of spatial sampling points, each sampling point recording the three-dimensional spatial coordinate range occupied by the motion axis at that position. For a robotic arm type motion axis, the spatial path envelope not only contains the position points of the end effector, but also contains the spatial volume swept by each link of the robotic arm during movement.
[0045] The geometric intersection calculation is performed on the space path envelopes of all motion axes. By traversing the sampling points in the space path envelopes of any two motion axes, it is determined whether there is a case where the Euclidean distance between the sampling points is less than the safety interval threshold. When such a case exists, the space region around these close sampling points is marked as the shared workspace of the two motion axes. The shared workspace is described using a bounding box. The six faces of the bounding box are parallel to the coordinate planes of the three-dimensional coordinate system. The size of the bounding box is determined by calculating the coordinate extreme values of all sampling points in the shared region.
[0046] For each identified shared workspace, all motion axes involved in the shared workspace are extracted, and a pre-task chain that each motion axis needs to complete before reaching the shared workspace is analyzed. The pre-task chain is constructed by backtracking the task execution sequence of the motion axis. Starting from the current position of the motion axis, it is traced back to the last executed task node before the motion axis enters the shared workspace. All tasks between the node and the shared workspace entrance form the pre-task chain.
[0047] For the analysis of subsequent tasks, it starts from the position where the motion axis leaves the shared workspace and traces forward to the next task node that needs to be executed immediately after the motion axis completes the shared workspace related operation. By comparing the pre-task chain and the subsequent task chain of different motion axes, the dependency relationship between tasks is identified. When the pre-task chain of motion axis A contains a condition that must wait for motion axis B to complete a certain task, a time sequence dependency edge from B to A is established between motion axis A and motion axis B, forming a time sequence dependency graph atlas with a directed acyclic graph structure.
[0048] Based on the time sequence dependency graph atlas, the motion axes are topologically sorted to obtain the priority sequence of the motion axes accessing the shared workspace. Topological sorting starts from the motion axis node with an in-degree of zero in the graph atlas, adds the node to the priority sequence, and deletes the node and all time sequence dependency edges from the node from the graph atlas. Repeat this process until all motion axis nodes are added to the priority sequence.
[0049] According to the priority sequence, time windows are assigned to the shared workspace. From the initial time when the task starts to execute, time windows are assigned to the motion axes in the priority sequence in turn. For the first motion axis in the priority sequence, the start time of the time window is set as the initial time, and the length of the time window is set as the estimated time required for the motion axis to move from the entrance of the shared workspace to the exit and completely leave the shared workspace. The estimated time is obtained by dividing the path length that the motion axis needs to move in the shared workspace by the standard moving speed of the motion axis. The path length is the spatial distance between the entrance point and the exit point of the shared workspace. For subsequent motion axes in the priority sequence, the start time of the time window is set as the end time of the time window of the previous motion axis, and the length of the time window is also determined according to the estimated time of the motion axis passing through the shared workspace.
[0050] The time window assigned to each motion axis is converted into an avoidance time sequence constraint, which includes two time parameters, an entry time and an exit time. The entry time directly uses the start time of the time window, and the exit time directly uses the end time of the time window. In an instance of a medicine dispensing machine with three mechanical arms, the time window assigned to the first mechanical arm is from 0 seconds to 7 seconds, the time window assigned to the second mechanical arm is from 7 seconds to 13 seconds, and the time window assigned to the third mechanical arm is from 13 seconds to 20 seconds. The avoidance time sequence constraint of the first mechanical arm is an entry time of 0 seconds and an exit time of 7 seconds, the avoidance time sequence constraint of the second mechanical arm is an entry time of 7 seconds and an exit time of 13 seconds, and the avoidance time sequence constraint of the third mechanical arm is an entry time of 13 seconds and an exit time of 20 seconds.
[0051] According to the avoidance time sequence constraint, the task execution order of the motion axis is adjusted. When the task set of the motion axis includes multiple independent tasks, all possible task permutation combinations are enumerated, and for each permutation, the expected time when the motion axis reaches the entrance of the shared workspace is calculated according to the execution order of the tasks in the permutation. The expected time is calculated by accumulating the time required for the motion axis to execute each previous task in turn from the initial position. The execution time of each task includes the moving time of the motion axis to the target position and the operation time of the operation at the target position.
[0052] The moving time is obtained by dividing the moving distance by the standard moving speed, and the operation time is determined according to the preset length of the operation type, such as 2 seconds for a grasping operation and 1 second for a placing operation. By comparing the expected time corresponding to all permutation combinations with the entry time in the avoidance time sequence constraint, the permutation combination with the smallest difference between the expected time and the entry time is selected as the adjusted task execution order.
[0053] After the execution sequence of the tasks is determined, the movement speed of the movement axis in executing the tasks is further adjusted to eliminate the residual deviation between the predicted time and the entering time. When the predicted time is earlier than the entering time, a time advance amount is calculated, and the time advance amount is evenly distributed to each moving link of the movement axis in executing the previous task, so as to prolong the time consumption of each moving link by reducing the moving speed, and the total time consumption increase is equal to the time advance amount. The reduced moving speed is the original standard moving speed multiplied by a speed adjustment coefficient, and the speed adjustment coefficient is less than 1 and greater than the ratio of the minimum speed allowed by the movement axis to the standard speed.
[0054] When the predicted time is later than the entering time, a time lag amount is calculated, and the time consumption of the moving link is shortened by increasing the moving speed. The increased moving speed is the original standard moving speed multiplied by a speed adjustment coefficient greater than 1, and the coefficient does not exceed the ratio of the maximum speed allowed by the movement axis to the standard speed.
[0055] For the movement of the movement axis inside the shared workspace, the movement time consumption of the movement axis from the entrance to the exit of the shared workspace is calculated, and it is ensured that the time consumption does not exceed the time difference between the exiting time and the entering time. If the movement time consumption at the standard speed exceeds the allowed time difference, the moving speed of the movement axis inside the shared workspace is increased, and the increased speed is the path length inside the shared workspace divided by the allowed time difference. Meanwhile, it is verified whether the speed exceeds the maximum speed limit of the movement axis, and if so, a link feedback is allocated to the time window, and the length of the time window of the movement axis needs to be prolonged.
[0056] After the task sequence adjustment and speed adjustment, the adjusted task execution sequence, the moving speed corresponding to each task, the entering time and the exiting time in the shared workspace are integrated into the execution path of the movement axis. In the execution path, the spatial position where the movement axis should be located at each time point and the movement speed that should be adopted are clearly marked, so as to ensure that the movement axis enters and exits the shared workspace strictly according to the avoidance time sequence constraint, and to realize the conflict-free collaborative use of the shared space resource by multiple movement axes.
[0057] In an optional implementation, according to the avoidance time sequence constraint, the execution sequence and the execution speed of each task in the task set of each movement axis are adjusted, so that the actual time of each movement axis reaching the shared workspace is consistent with the entering time, and the occupation of the shared workspace is completed before the exiting time, including: For each movement axis, the predicted arrival time of the movement axis from the starting position of each task to the entrance of the shared workspace is calculated according to the spatial distance between the starting position of each task and the entrance of the shared workspace. The predicted arrival time is compared with the entering time in the avoidance timing constraint, and a time deviation is calculated; based on the time deviation, tasks with predicted arrival time earlier than the entering time are adjusted to a later position in the execution sequence, and tasks with predicted arrival time later than the entering time are adjusted to an earlier position in the execution sequence, to generate a task execution sequence after adjustment; The modified arrival time of the motion axis at the entrance of the shared workspace after executing all tasks in the task execution sequence after adjustment is recalculated; When the modified arrival time still has a time deviation from the entering time, a target execution speed of the motion axis during execution of the task execution sequence after adjustment is calculated, which is obtained by adjusting the motion speed of the motion axis to make the modified arrival time consistent with the entering time; According to the task execution sequence after adjustment and the target execution speed, each task in the task set of the motion axis is executed, so that the actual time of the motion axis at the entrance of the shared workspace is consistent with the entering time, and the occupation of the shared workspace is completed before the exiting time.
[0058] In a multi-axis collaborative robot system, when multiple motion axes need to share a workspace, to avoid collision and improve system efficiency, for each motion axis, the predicted arrival time of the motion axis from the start position of each task in its task set to the entrance of the shared workspace is calculated according to the spatial distance between the start position of each task and the entrance of the shared workspace. Specifically, assuming that the task set of motion axis A includes tasks A1, A2 and A3, the current position of motion axis A is P0, the start position of task A1 is P1, the start position of task A2 is P2, the start position of task A3 is P3, and the entrance position of the shared workspace is S. The distance from P0 to P1 is d01, the distance from P1 after completing task A1 to P2 is d12, the distance from P2 after completing task A2 to P3 is d23, and the distance from P3 after completing task A3 to the entrance S of the shared workspace is d3S. Assuming that the default motion speed of motion axis A is v, when the task sequence is A1→A2→A3, the predicted arrival time of motion axis A at the entrance S of the shared workspace is: t = (d01 + t1 + d12 + t2 + d23 + t3 + d3S) / v, where t1, t2, t3 are the times required to execute tasks A1, A2 and A3, respectively.
[0059] Next, the predicted arrival time is compared with the entering time in the avoidance timing constraint, and a time deviation is calculated. For example, if the avoidance timing constraint specifies the entering time of motion axis A as T, then the time deviation Δt = t - T. If Δt > 0, it means that the predicted arrival time is later than the specified entering time; if Δt < 0, it means that the predicted arrival time is earlier than the specified entering time.
[0060] Based on the time deviation, the task execution order is adjusted. When Δt > 0, the task whose estimated arrival time is later than the entry time needs to be adjusted to the front of the execution order. Specifically, a heuristic algorithm can be used, such as executing the task farther away from the shared workspace earlier. For example, if the original task execution order is A1→A2→A3, and the execution position of task A3 is farther away from the shared workspace, it can be adjusted to A3→A1→A2. When Δt < 0, the task whose estimated arrival time is earlier than the entry time is adjusted to the back of the execution order. For example, if the execution position of task A1 is closer to the shared workspace, it can be adjusted to A2→A3→A1.
[0061] Through the above adjustment, the task execution sequence after adjustment is generated. Taking the adjusted sequence A3→A1→A2 as an example, the modified arrival time t' of motion axis A arriving at the shared workspace entrance after executing all tasks according to the adjusted task execution sequence is recalculated. At this time, the distance d03 from P0 to P3, the distance d31 from P3 completing task A3 to P1, the distance d12 from P1 completing task A1 to P2, and the distance d2S from P2 completing task A2 to the shared workspace entrance S. The modified arrival time t' = (d03 + t3 + d31 + t1 + d12 + t2 + d2S) / v.
[0062] When the modified arrival time t' still has a time deviation Δt' = t' - T from the entry time T, the target execution speed v' that motion axis A needs to adopt during the execution of the adjusted task execution sequence needs to be calculated, so that the modified arrival time is consistent with the entry time. The target execution speed v' = (d03 + t3 + d31 + t1 + d12 + t2 + d2S) / T.
[0063] Finally, according to the adjusted task execution sequence and the target execution speed, the motion axis executes each task in its task set. For example, control the motion axis A to execute tasks in the order of A3→A1→A2 at a speed of v', ensuring that the actual time when the motion axis A arrives at the shared workspace is consistent with the entry time T. At the same time, it also needs to ensure that the motion axis A completes the occupation of the shared workspace before the exit time T_out. To this end, the stay time t_stay of the motion axis A in the shared workspace is calculated to ensure that t_stay ≤ T_out - T. If the estimated stay time exceeds the maximum allowed stay time, the stay time can be shortened by increasing the motion speed of the motion axis in the shared workspace.
[0064] In an alternative embodiment, a plurality of motion axes are driven according to the execution path to respectively pick up medicines from corresponding storage areas, and the picked-up medicines are transmitted to an intermediate cache location; according to the medicine pickup location identifier, the medicines located at the intermediate cache location are merged and combined, and the medicines belonging to the same medicine pickup location identifier are collected from the picking results of different motion axes to a unified medicine outlet channel, including: According to the execution path, a plurality of motion axes are driven to respectively pick up medicines from corresponding storage areas, and transmission identifier information is generated for each picked-up medicine during the picking process, the transmission identifier information including the medicine identifier of the medicine, the medicine pickup location identifier, and the motion axis identifier for picking up the medicine; According to the medicine pickup location identifier in the transmission identifier information, each medicine is assigned a target cache slot in the intermediate cache location, and the assignment rule of the target cache slot is to assign medicines with the same medicine pickup location identifier to a group of spatially adjacent cache slots in the intermediate cache location, so that medicines belonging to the same medicine pickup location identifier form a spatially aggregated region in the intermediate cache location; According to the position information of the target cache slot, a plurality of motion axes are controlled to respectively transmit the picked-up medicines to the respective corresponding target cache slots, completing the temporary storage of the medicines in the intermediate cache location; The arrival state of the medicines in each spatially aggregated region in the intermediate cache location is monitored, and when it is detected that all target cache slots in a spatially aggregated region corresponding to a medicine pickup location identifier have received medicines, the medicines in all target cache slots in the spatially aggregated region are extracted, and the extracted medicines are collected to a unified medicine outlet channel according to the medicine pickup location identifier in the transmission identifier information.
[0065] In the automatic medicine dispensing system, the process of driving a plurality of motion axes to pick up medicines from corresponding storage areas according to the execution path is as follows: First, the medicine dispensing task containing the medicine identifier and the medicine pickup location identifier is obtained, and the medicine dispensing task is converted into the execution path of the motion axis by the task analysis module. Each motion axis is responsible for the medicine picking operation of a specific storage area, and the execution path includes the three-dimensional coordinate sequence of the motion axis and the picking action instruction.
[0066] After obtaining the execution path, the control module sends a driving signal to each motion axis, so that each motion axis moves to the target medicine location according to the preset trajectory. The motion axis is equipped with a visual recognition device, which can accurately locate the medicine location and pick up the target medicine through an end effector (such as a mechanical claw or a suction cup).
[0067] In the process of grabbing, transmission identification information is generated for each grabbed medicine, which contains three key elements: medicine identification (such as medicine number, specification), medicine taking position identification (such as window number, medicine taking area number), and motion axis identification (such as axis number) for executing grabbing. These information is stored in data structure form, facilitating fast retrieval during subsequent medicine merging. Transmission identification information can be attached to temporary medicine carrying containers through RFID tags or two-dimensional codes, or stored in the memory database of the central control system.
[0068] According to the medicine taking position identification in the transmission identification information, each medicine is assigned a target cache slot in the intermediate cache position. The assignment follows specific rules: medicines with the same medicine taking position identification are assigned to a group of spatially adjacent cache slots in the intermediate cache position. In specific implementation, the intermediate cache position can be designed as a matrix structure, for example, a 6x8 matrix, with a total of 48 cache slots. The system pre-divides the area, such as assigning slots 1-8 to medicine taking position A, slots 9-16 to medicine taking position B, and so on.
[0069] When a medicine taking position (such as position A) needs to distribute multiple medicines, these medicines are assigned to consecutive slots in the corresponding area, forming a spatially aggregated area. This allocation method facilitates subsequent batch extraction and transmission operations.
[0070] According to the position information of the target cache slot, multiple motion axes are controlled to transmit the grabbed medicines to the corresponding target cache slots. During transmission, the motion axes plan the optimal path according to the three-dimensional coordinate information of the cache slot to ensure efficient transmission. When the motion axis reaches above the target cache slot, it performs precise positioning and releases the medicine, completing the temporary storage of the medicine in the cache position. After placing the medicine each time, the system updates the state flag of the cache slot to "occupied".
[0071] To ensure accurate placement of medicines into cache slots, the intermediate cache position is equipped with photoelectric sensors or pressure sensors to detect whether the medicine has arrived at the target slot correctly. If the placement fails, the system immediately issues an alarm and records error logs, waiting for manual intervention or triggering an automatic error correction mechanism.
[0072] The system continuously monitors the arrival status of medicines in each spatially aggregated area in the intermediate cache position. The monitoring module checks the state of all target cache slots in the spatially aggregated area corresponding to each medicine taking position identification through timed queries or event triggering. When it is detected that all target cache slots in the spatially aggregated area corresponding to a certain medicine taking position identification (such as position A) have received medicines, the system starts the merging and combining process.
[0073] When merging and combining, the system control special extraction mechanism extracts all target cache slots in the space gathering area. The extraction mechanism can adopt a push plate type, adsorption type or clamping type structure, and can extract all medicines in the entire area at one time. After extraction, according to the medicine taking position identification in the transmission identification information, the extracted medicines are collected to a unified medicine outlet channel through a conveyor belt or a slide. The medicine outlet channel is divided into multiple sub-channels according to the medicine taking position identification, so as to ensure that the medicines of different medicine taking positions are not confused.
[0074] When the medicine reaches the terminal of the medicine outlet channel, the final verification is performed to confirm that the number and type of the medicine are consistent with the requirements of the dispensing task. After the verification is passed, the medicine is loaded into a packaging container (such as a medicine bag or a medicine box), and a label containing patient information and medication instructions is attached, and finally delivered to the corresponding medicine taking position, completing the entire medicine dispensing process.
[0075] The whole process realizes the efficient flow of medicines from the storage area to the medicine taking position, and through the spatial gathering design of the intermediate cache position and the intelligent merging mechanism, the accuracy and efficiency of the medicine dispensing under the cooperation of multiple motion axes are ensured. This method is especially suitable for scenarios such as hospital pharmacies and large pharmacies that need to handle multiple dispensing tasks at the same time.
[0076] The embodiment of the application is based on a self-service medicine selling machine parallel sorting system based on multi-axis cooperation, which comprises: A first unit is used to obtain medicine order information to be sorted, and the medicine order information includes medicine identification and medicine taking position identification. The spatial topology of the medicine order information is analyzed, and the medicine order information is decomposed into multiple task set according to the spatial distribution of the storage position corresponding to the medicine identification in multiple storage areas, and each task set corresponds to an independent motion axis reachable range; A second unit is used to generate an execution path containing avoidance time constraints for each motion axis based on the spatial interference relationship and time sequence dependence relationship between the multiple task sets, and the avoidance time constraints are used to limit the entering time and exiting time of different motion axes in the shared working space, so that multiple motion axes avoid physical collision and logical conflict when executing the corresponding task set; A third unit is used to drive multiple motion axes to grab medicines from corresponding storage areas according to the execution path, and transmit the grabbed medicines to an intermediate cache position; A fourth unit is used to merge and combine multiple medicines located in the intermediate cache position according to the medicine taking position identification, collect the medicines belonging to the same medicine taking position identification from the grabbing results of different motion axes to a unified medicine outlet channel, complete the order level aggregation in the parallel sorting process, and deliver the medicines completed by merging and combining to the medicine outlet corresponding to the medicine taking position identification.
[0077] In a third aspect, the present application provides an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the method described above.
[0078] In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method described above.
[0079] The present application can be a method, apparatus, system, and / or computer program product. Computer program products can include computer-readable storage media having computer-readable program instructions loaded thereon for performing various aspects of the present application.
[0080] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A parallel sorting method for self-service medicine vending machines based on multi-axis collaboration, characterized in that, include: Obtain the order information of medicines to be sorted, which includes medicine identifiers and medicine pickup location identifiers; perform spatial topology parsing on the order information, and decompose the order information into multiple sub-task sets according to the spatial distribution of the storage location corresponding to the medicine identifier in multiple storage areas, with each sub-task set corresponding to an independent reachable range of a motion axis; Based on the spatial interference and temporal dependencies among the multiple sub-task sets, an execution path containing avoidance timing constraints is generated for each motion axis. The avoidance timing constraints are used to limit the entry and exit times of different motion axes in the shared workspace, so that multiple motion axes avoid physical collisions and logical conflicts when executing their respective sub-task sets. According to the execution path, multiple motion axes are driven to grab medicines from their respective storage areas and transfer the grabbed medicines to an intermediate cache location; Based on the drug retrieval location identifier, multiple drugs located at the intermediate buffer location are merged and combined. Drugs belonging to the same drug retrieval location identifier are gathered from the grasping results of different motion axes into a unified drug dispensing channel, completing order-level aggregation in the parallel sorting process. The merged and combined drugs are then transported to the dispensing port corresponding to the drug retrieval location identifier.
2. The method according to claim 1, characterized in that, Spatial topology parsing is performed on the drug order information. Based on the spatial distribution of the storage location corresponding to the drug identifier in multiple storage areas, the drug order information is decomposed into multiple sub-task sets. Each sub-task set corresponds to an independent motion axis reachable range including: Extract the three-dimensional spatial coordinates of the storage location corresponding to each drug identifier in the drug order information, and construct a storage location topology map based on the three-dimensional spatial coordinates. The storage location topology map represents the spatial adjacency and distance relationships between multiple storage locations. Based on the mechanical structural constraint parameters of each motion axis, the reachable boundary of each motion axis in three-dimensional space is determined, and the reachable boundary defines the spatial range that the end effector of the motion axis can reach; Based on the storage location topology and the reachability boundaries of each motion axis, the reachability relationship between each storage location and each motion axis is calculated. The reachability relationship characterizes whether the storage location is located within the reachability boundary of the motion axis. Based on the reachability relationship, multiple drug identifiers in the drug order information are grouped according to the reachability boundary of the motion axis to which their corresponding storage location belongs, forming multiple sub-task sets. Each sub-task set contains all drug identifiers that can be reached by the same motion axis. For a storage location that is simultaneously located within the overlapping area of the reachable boundaries of multiple motion axes, based on the spatial adjacency relationship between the storage location and other storage locations in the storage location topology map, the storage location is assigned to the set of subtasks corresponding to the motion axis with the largest number of spatially adjacent storage locations.
3. The method according to claim 2, characterized in that, Based on the storage location topology and the reachability boundaries of each motion axis, the reachability relationship between each storage location and each motion axis is calculated, including: The storage location topology graph is decomposed into multiple topology levels based on the spatial adjacency relationships between storage locations. Extract the set of boundary reachable points for each motion axis from the reachable boundaries. The set of boundary reachable points contains all boundary position points that the motion axis can reach under its motion limit state. Starting from the set of reachable points at the boundary, accessibility propagation is carried out layer by layer inward along the topological hierarchy of the storage location topology graph. In each topological hierarchy, the storage location that has been determined to be reachable in the previous topological hierarchy is used as the propagation source point. For each storage location to be determined, the spatial connectivity between the storage location and its corresponding propagation source point is calculated. The spatial connectivity is determined by detecting whether there are spatial faults on the path from the propagation source point to the storage location that the motion axis cannot cross. When there is spatial connectivity between the storage location and the propagation source point, the storage location is marked as a reachable storage location of the motion axis, and the storage location is added to the propagation source point set of the next topological level, continuing to propagate reachability to deeper topological levels; After traversing all topology levels to complete reachability propagation, the reachable storage locations marked for each motion axis in all topology levels are summarized, and the reachability relationship between each storage location and each motion axis is generated.
4. The method according to claim 1, characterized in that, Based on the spatial interference and temporal dependencies among the multiple sub-task sets, an execution path containing avoidance timing constraints is generated for each motion axis. These avoidance timing constraints limit the entry and exit times of different motion axes within the shared workspace, ensuring that multiple motion axes avoid physical collisions and logical conflicts when executing their respective sub-task sets. Based on the spatial path that each motion axis needs to traverse when executing its corresponding set of subtasks, identify the shared workspace that exists between the spatial paths of multiple motion axes. The shared workspace is the region where the spatial paths of at least two motion axes overlap. Analyze the preceding tasks required for each motion axis to enter the shared workspace and the subsequent tasks required to exit the shared workspace, and establish the temporal dependencies between multiple motion axes; Based on the aforementioned temporal dependencies, a time window sequence is allocated to each shared workspace. The time window sequence divides the usage time of the shared workspace into multiple non-overlapping time windows. Each time window is exclusively allocated to a motion axis, ensuring that only one motion axis occupies the shared workspace within the same time window. Based on the time window sequence, an avoidance timing constraint including an entry time and an exit time is generated for each motion axis. The entry time corresponds to the start time of the time window assigned to the motion axis, and the exit time corresponds to the end time of the time window assigned to the motion axis. Based on the avoidance timing constraints, the execution order and speed of each task in its subtask set are adjusted so that the actual time when each motion axis arrives at the shared workspace is consistent with the entry time, and the occupation of the shared workspace is completed before the exit time, thereby generating the execution path of each motion axis.
5. The method according to claim 4, characterized in that, Based on the avoidance timing constraints, the execution order and speed of each task in its subtask set are adjusted so that the actual time each motion axis arrives at the shared workspace is consistent with the entry time, and the occupation of the shared workspace is completed before the exit time, including: For each motion axis, based on the spatial distance between the starting position of each task in its subtask set and the entrance to the shared workspace, calculate the estimated arrival time required for the motion axis to move from the starting position of each task to the entrance to the shared workspace. The estimated arrival time is compared with the entry time in the avoidance timing constraint to calculate the time deviation; based on the time deviation, tasks with estimated arrival times earlier than the entry time are adjusted to the later positions in the execution order, and tasks with estimated arrival times later than the entry time are adjusted to the earlier positions in the execution order, generating a reordered task execution sequence; Recalculate the corrected arrival time of the motion axis after it has completed all tasks according to the reordered task execution sequence and is now at the shared workspace entrance. When the corrected arrival time still deviates from the entry time, the target execution speed required by the motion axis during the execution of the reordered task sequence is calculated. The target execution speed is adjusted by changing the motion rate of the motion axis to make the corrected arrival time consistent with the entry time. Based on the reordered task execution sequence and the target execution speed, the motion axis is controlled to execute each task in its sub-task set, so that the actual time when the motion axis arrives at the shared workspace is consistent with the entry time, and the occupation of the shared workspace is completed before the exit time.
6. The method according to claim 1, characterized in that, According to the execution path, multiple motion axes are driven to retrieve medicines from their corresponding storage areas and transmit the retrieved medicines to an intermediate buffer location. Based on the medicine retrieval location identifier, multiple medicines located in the intermediate buffer location are merged and combined, and medicines belonging to the same medicine retrieval location identifier are aggregated from the retrieval results of different motion axes into a unified dispensing channel, including: Based on the execution path, multiple motion axes are driven to grab medicines from their corresponding storage areas. During the grabbing process, transmission identification information is generated for each grabbed medicine. The transmission identification information includes the medicine's identifier, the medicine retrieval location identifier, and the identifier of the motion axis that performed the grabbing. Based on the drug retrieval location identifier in the transmission identification information, a target cache slot in the intermediate cache position is allocated to each drug. The allocation rule for the target cache slot is to allocate drugs with the same drug retrieval location identifier to a group of spatially adjacent cache slots in the intermediate cache position, so that drugs belonging to the same drug retrieval location identifier form a spatial cluster area in the intermediate cache position. Based on the position information of the target cache slot, multiple motion axes are controlled to transport the grasped medicine to their respective target cache slots, completing the temporary storage of the medicine at the intermediate cache position; The arrival status of medicines in each spatial cluster area in the intermediate buffer location is monitored. When it is detected that all target buffer slots in the spatial cluster area corresponding to a certain medicine retrieval location have received medicines, the medicines in all target buffer slots in the spatial cluster area are extracted, and the extracted medicines are gathered into a unified medicine dispensing channel according to the medicine retrieval location identifier in the transmission identifier information.
7. A parallel sorting system for self-service medicine vending machines based on multi-axis collaboration, used to implement the method as described in any one of claims 1-6, characterized in that, include: The first unit is used to acquire the order information of medicines to be sorted, which includes medicine identifiers and medicine pickup location identifiers; the unit performs spatial topology parsing on the order information, and decomposes the order information into multiple sub-task sets according to the spatial distribution of the storage location corresponding to the medicine identifier in multiple storage areas, with each sub-task set corresponding to an independent reachable range of a motion axis; The second unit is used to generate an execution path containing avoidance timing constraints for each motion axis based on the spatial interference relationship and temporal dependency relationship between the multiple sub-task sets. The avoidance timing constraints are used to limit the entry time and exit time of different motion axes in the shared workspace, so that multiple motion axes avoid physical collisions and logical conflicts when executing their respective sub-task sets. The third unit is used to drive multiple motion axes to grab medicines from their respective storage areas according to the execution path, and to transfer the grabbed medicines to the intermediate cache location; The fourth unit is used to merge and combine multiple drugs located at the intermediate buffer position according to the drug retrieval position identifier, and to gather drugs belonging to the same drug retrieval position identifier from the grasping results of different motion axes into a unified drug dispensing channel, thereby completing order-level aggregation in the parallel sorting process; and to transport the merged and combined drugs to the dispensing port corresponding to the drug retrieval position identifier.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.