A harness three-dimensional path design method, an intelligent terminal and a storage medium

CN122595648APending Publication Date: 2026-08-18IMAGING YUJING (SHANGHAI) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611091282.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0003]为了解决上述问题,本发明的目的是提供一种应用于数字化工业设计服务技术领域的基于强化学习的线束三维路径设计方法、智能终端及存储介质,旨在解决现有的线束三维数模设计中存在的无全自动化工具、无跨领域解决方案以及智能化程度不足的问题

Benefits of technology

[0016]本申请基于强化学习的线束三维路径设计方法,依托空间环境建模、路径参数化与 B 样条曲线生成,并结合奖励函数约束评价及智能体自主规划,有效填补了线束三维数模设计全自动化工具与跨领域方案的空白,显著提升设计环节智能化水平,能够快速生成合规、合理的线束三维路径,简化设计流程、降低人工操作成本,同时保障线束路径布局的规范性与最优性,助力工业线束数字化设计高效落地。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122595648A_ABST
    Figure CN122595648A_ABST
Patent Text Reader

Abstract

The application discloses a kind of harness three-dimensional path design method, intelligent terminal and storage medium, involve, including the following steps: after the space environment modeling of harness, the parameterized design of harness path is generated B spline curve;After the sampling point of B spline curve is constrained evaluation using reward function, the three-dimensional path of harness is designed by agent.The present application solves the problems of no full automation tool, no cross-domain solution and insufficient intelligence in existing harness three-dimensional model design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital industrial design service technology, and more specifically, to a method for three-dimensional path design of wire harnesses, a smart terminal, and a storage medium. Background Technology

[0002] In the field of digital industrial design service technology, wire harness 3D model design is a crucial step in the digital R&D of equipment. Its design quality directly impacts the electrical reliability, spatial layout, lightweighting level, manufacturability, and maintainability of the equipment, and is critical to the overall performance of the machine. Current wire harness 3D model design suffers from problems such as strong platform dependence, poor cross-domain adaptability, low automation, and a lack of multi-constraint intelligent optimization capabilities. It cannot meet the engineering requirements of universal design across multiple domains, efficient modeling, standardized quality control, and multi-constraint optimization. Therefore, developing an automatic generation technology for wire harness 3D models that is cross-domain adaptable, fully automated, and capable of multi-constraint intelligent optimization is a pressing technical problem that needs to be solved in this field. Summary of the Invention

[0003] To address the aforementioned issues, the present invention aims to provide a reinforcement learning-based method for designing 3D paths of wire harnesses, an intelligent terminal, and a storage medium applicable to the field of digital industrial design service technology. This method aims to solve the problems of lack of fully automated tools, lack of cross-domain solutions, and insufficient intelligence in existing 3D digital model design of wire harnesses.

[0004] To achieve the above technical objectives, this application provides a method for designing three-dimensional paths for wire harnesses in the field of digital industrial design service technology, comprising the following steps: After modeling the spatial environment of the wire harness, the wire harness path is parametrically designed to generate B-spline curves; After constraining and evaluating the sampling points of the B-spline curve using a reward function, the three-dimensional path of the wire harness is designed by an intelligent agent.

[0005] Preferably, when performing spatial environment modeling, the three-dimensional spatial data of the equipment to be wired is acquired, and the door voxels and their component voxels are encoded as obstacles in space.

[0006] Preferably, when performing parametric design, the intermediate control points of the B-spline curve are distributed by linear interpolation between the start and end points of the wire harness.

[0007] Preferably, when generating the B-spline curve, a complete control point sequence is formed based on the start point, intermediate control points, and end point of the control bundle, and curve sampling points are generated using the B-spline degree and node vector.

[0008] Preferably, when generating B-spline curves, non-uniform node vectors and chord length parameters are used to generate B-spline curves.

[0009] Preferably, when generating B-spline curves, B-spline sampling points are generated in parallel for multiple paths.

[0010] Preferably, when using the reward function, a collision penalty is applied when a sampling point falls into an obstacle or the SDF value is less than the radius of the wire harness; the path length is calculated based on the sum of the distances between adjacent sampling points and a length penalty is applied; the curvature is calculated based on the derivative of the sampling point or the B-spline, and a curvature penalty is applied when the maximum curvature exceeds the threshold corresponding to the minimum bending radius; and a success reward is given when the path has no collisions and the curvature meets the requirements.

[0011] Preferably, when designing the three-dimensional path of the wire harness, the actor-critic framework is used to train the strategy network as the agent.

[0012] Preferably, when designing the three-dimensional path of the harness, the intermediate control point is used as the object of the intelligent agent's action.

[0013] Preferably, after designing the three-dimensional path of the wire harness, the optimized B-spline control points are obtained using the intelligent agent to generate the wire harness path curve, and the curve is converted into a three-dimensional curve in the physical coordinate system. After creating the B-spline curve edge corresponding to the three-dimensional curve, the curve file is exported using the STEP format to characterize the center path of the wire harness in three-dimensional space.

[0014] Based on the same inventive concept, this application also provides a smart terminal, including: a memory and a processor, wherein the memory stores a wire harness three-dimensional path design program, and when the wire harness three-dimensional path design program is executed by the processor, it implements the steps of the method described above.

[0015] Based on the same inventive concept, this application also provides a storage medium storing a computer program that, when executed by a processor, implements the steps of the method described above.

[0016] This application presents a reinforcement learning-based method for 3D wire harness path design. It leverages spatial environment modeling, path parameterization, and B-spline curve generation, combined with reward function constraint evaluation and agent autonomous planning. This method effectively fills the gap in fully automated tools and cross-domain solutions for 3D wire harness digital model design, significantly improving the intelligence level of the design process. It can quickly generate compliant and reasonable 3D wire harness paths, simplify the design process, reduce manual operation costs, and ensure the standardization and optimization of wire harness path layout, thus facilitating the efficient implementation of digital design for industrial wire harnesses.

[0017] This invention solves the problems of low automation and excessive manual intervention in wire harness design, and realizes full-process automation from connection definition to three-dimensional digital model.

[0018] This invention achieves a dual optimization of design efficiency and cost by significantly shortening the design cycle and reducing reliance on manpower.

[0019] This invention addresses the pain points of slow response to design changes and high global rework costs, and enables automatic iteration of the model as requirements change.

[0020] This invention has universal adaptability across multiple fields and platforms, solving the problems of poor cross-domain applicability and strong platform binding of existing tools. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of the execution flow of the method described in this invention.

[0023] Figure 2 This is a flowchart of the path generation training process described in this invention.

[0024] Figure 3 This is the flowchart of the B-spline path curve output described in this invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0026] First Embodiment like Figure 1 As shown, this invention provides a reinforcement learning-based three-dimensional path design method for wire harnesses applied in the field of digital industrial design service technology, including four stages: spatial environment modeling, reinforcement learning training, B-spline path generation, and three-dimensional digital model output.

[0027] Step S100 involves modeling the spatial environment of the wiring harness.

[0028] In step S100 of one embodiment, three-dimensional spatial data of the equipment to be wired is acquired, the door voxel and its component voxels are encoded as obstacles in space, and a data file containing SDF and gradient is loaded, wherein the SDF is used to represent the distance from the sampling point to the obstacle boundary, and the gradient is used to provide spatial orientation information near the sampling point.

[0029] For example, in step S100, it is also necessary to read or set the harness start point, harness end point, harness diameter, minimum bending radius or radius parameter, voxel size, B-spline number, number of control points, maximum number of training steps, and maximum displacement of control points.

[0030] For example, such as Figure 2 As shown, during the path generation process, the starting point coordinates, ending point coordinates, current B-spline control points, SDF values ​​of B-spline sampling points, and SDF gradients are used as the state information of the reinforcement learning environment, enabling the agent to adjust the bundle path in a three-dimensional space containing obstacle distance information.

[0031] In one implementation, without considering obstacle distance information, the agent can also adjust the harness path by combining voxel occupancy maps with point-by-point collision detection.

[0032] In one implementation, instead of using the SDF gradient input, the SDF gradient is replaced with the sampling point collision results and distance penalty as the state information of the reinforcement learning environment.

[0033] Step S200: Parametric design of the harness path.

[0034] In step S200 of one embodiment, the harness path is represented as a B-spline curve, which is defined by the harness start point, intermediate control points and harness end point.

[0035] For example, during the parameterization design of the harness path, when initializing the execution path, the intermediate control points are distributed by linear interpolation between the start and end points of the harness; during training, the displacement of the control points in the three-dimensional coordinate direction is output by the reinforcement learning agent, the displacement is applied to the intermediate control points, and the updated control points are restricted to the voxel space boundary.

[0036] Step S300 generates a B-spline curve.

[0037] B-spline (B-spline, short for Basis Spline) is a mathematical curve and surface representation method used in computer graphics, computer-aided design (CAD), numerical analysis, and other fields. It is a generalized form of Bézier curve. In step S300 of one embodiment, as... Figure 3As shown, a complete control point sequence is formed based on the start point, intermediate control points, and end point of the harness. Curve sampling points are generated using the B-spline degree and node vector.

[0038] In one implementation, B-spline curves can be generated using non-uniform node vectors and chord length parameterization.

[0039] For example, firstly, the starting point of the wire harness, the intermediate B-spline control points obtained through reinforcement learning, and the ending point of the wire harness are arranged sequentially according to the path direction to form a complete sequence of B-spline control points. This sequence of control points is used to define the overall spatial orientation of the wire harness path curve, where the starting and ending points constrain the positions of the curve's ends, and the intermediate control points describe the curve's curvature in three-dimensional space. Then, the chord length parameter is calculated based on the Euclidean distance between adjacent control points. Specifically, starting from the first control point, the distance between adjacent control points is accumulated segment by segment to obtain the cumulative chord length corresponding to each control point. Then, the cumulative chord length corresponding to the last control point is used as the total chord length, and each cumulative chord length is normalized so that the chord length parameter corresponding to each control point falls within the parameter range of 0 to 1. Through this processing, regions with larger distances between control points occupy larger parameter intervals in the parameter interval, and regions with smaller distances between control points occupy smaller parameter intervals, thus enabling the parameter distribution of the B-spline curve to reflect the actual distance relationship of the control points in space. Next, the system constructs a non-uniform node vector based on the B-spline degree and the number of control points. The node vector employs a clamping mechanism, where multiple nodes with values ​​of 0 are consecutively set at the front end and multiple nodes with values ​​of 1 are consecutively set at the back end to ensure that the generated B-spline curve is constrained by the start and end points. Internal nodes in the node vector are set based on normalized chord length parameters. In one implementation, the normalized chord length parameter of the corresponding control point can be directly used as the internal node value; in another implementation, the average of several adjacent chord length parameters can be used as the internal node value. The resulting node vector is not uniformly distributed but varies with the spatial spacing of the control points, thus constituting a non-uniform node vector. Subsequently, the system uses the non-uniform node vector, the complete control point sequence, and the B-spline degree as input to establish B-spline functions for the x, y, and z coordinate components in the three-dimensional coordinate system. The system generates parameter sampling values ​​within the parameter range of 0 to 1 according to a preset sampling number and substitutes each parameter sampling value into the x, y, and z B-spline functions to obtain the corresponding three-dimensional curve sampling points. The continuous spatial curve composed of these three-dimensional curve sampling points is the bundled B-spline path curve generated based on the control points optimized by reinforcement learning. Through the above process, the node distribution of the B-spline curve is related to the spatial distance between control points. This avoids the problem of uneven local curve changes caused by inconsistent control point spacing in uniform parameterization, making the generated bundle path curve more consistent with the spatial direction expressed by the control point sequence, and facilitating subsequent path length calculation, collision detection, and curvature constraint detection.

[0040] In one GPU-based implementation, B-spline sampling points can be generated in parallel for multiple paths.

[0041] In one implementation that utilizes OpenCASCADE, B-spline curves are generated based on control points using GeomAPI_PointsToBSpline, and the sampling points and derivatives are calculated.

[0042] For example, OpenCASCADE is an open-source 3D geometry modeling kernel (CAD engine) specifically designed to generate, calculate, and export industrial-grade 3D models.

[0043] For example, GeomAPI_PointsToBSpline is an algorithm that automatically generates B-spline curves from a set of discrete points.

[0044] For example, the present invention uses the start point and end point of the wire harness as fixed endpoints of the B-spline curve, and the intermediate control points as objects of action of the intelligent agent; the intelligent agent outputs the displacement of each intermediate control point in the three-dimensional coordinate direction at each step, and performs boundary constraints on the updated control points. Then, the start point, intermediate control points and the end point of the wire harness constitute a complete control point sequence to generate B-spline curve sampling points to form a B-spline curve.

[0045] Step S400: Evaluation of the reward function.

[0046] In step S400 of one embodiment, constraint evaluation is performed on each curve sampling point.

[0047] For example, when a sampling point falls into an obstacle or the SDF value is less than the radius of the wire harness, a collision penalty is applied; the path length is calculated based on the sum of the distances between adjacent sampling points and a length penalty is applied; the curvature is calculated based on the derivative of the sampling point or the B-spline, and a curvature penalty is applied when the maximum curvature exceeds the threshold corresponding to the minimum bending radius; when there is no collision on the path and the curvature meets the requirements, a success reward is given.

[0048] Step S500: Reinforcement learning training.

[0049] In step S500 of one embodiment, a policy network is trained as an agent using an actor-critic framework, wherein the "actor" adjusts its actions by outputting control points based on the current state, and the "critic" evaluates the value of the current state.

[0050] For example, the present invention uses the Proximal Policy Optimization (PPO) training method. The states include intermediate control points, the start point of the bundle, the end point of the bundle, the SDF value of the B-spline sampling point, and the SDF gradient. The actions include the three-dimensional displacement of each control point. After training, the policy network can automatically output the control point adjustment results that can be used to generate the bundle path when given the start point, end point, and spatial constraints.

[0051] Step S600: 3D digital model output.

[0052] In step S600 of one embodiment, a wire harness path curve is generated based on the B-spline control points optimized by reinforcement learning, and the B-spline path curve is converted into a three-dimensional curve in the physical coordinate system; the B-spline curve edge corresponding to the three-dimensional curve is created using OpenCASCADE, and the curve file is exported using the STEP format; the exported STEP curve is used to characterize the center path of the wire harness in three-dimensional space, providing a geometric path basis for the subsequent generation of the three-dimensional digital model of the wire harness.

[0053] In one embodiment, through the design of steps S400 to S600, the present invention samples the generated B-spline curve, calculates the reward based on the collision relationship between the sampling point and the obstacle or the SDF safety distance, path length, curvature and minimum bending radius constraints; when there is no collision on the path and the curvature meets the minimum bending radius requirement, a success reward is given, and the path points that meet the constraints are further fitted with B-splines, and B-spline edges are generated through OpenCASCADE and exported as STEP files.

[0054] Second Embodiment This application provides a reinforcement learning-based 3D path design method for wire harnesses applied in the field of digital industrial design service technology, comprising the following steps: After modeling the spatial environment of the wire harness, the wire harness path is parametrically designed to generate B-spline curves; After constraining and evaluating the sampling points of the B-spline curve using a reward function, the three-dimensional path of the wire harness is designed by an intelligent agent.

[0055] In this embodiment, relying on spatial environment modeling, path parameterization, and B-spline curve generation, combined with reward function constraint evaluation and intelligent agent autonomous planning, it effectively fills the gap in fully automated tools and cross-domain solutions for wire harness 3D digital model design, significantly improves the intelligence level of the design process, can quickly generate compliant and reasonable wire harness 3D paths, simplify the design process, reduce manual operation costs, and at the same time ensure the standardization and optimization of wire harness path layout, helping to efficiently implement digital design of industrial wire harnesses.

[0056] Preferably, when performing spatial environment modeling, the three-dimensional spatial data of the equipment to be wired is acquired, and the door voxels and their component voxels are encoded as obstacles in space.

[0057] In this embodiment, by collecting three-dimensional spatial data of the equipment to be wired, the door and various parts are converted into voxels and marked as spatial obstacles. This can accurately restore the real wiring conditions, define safe obstacle avoidance boundaries for subsequent wire harness path planning, and make the path design fit the physical assembly environment. This effectively avoids interference between the wire harness and the parts, and further improves the rationality and practicality of three-dimensional path planning.

[0058] Preferably, when performing parametric design, the intermediate control points of the B-spline curve are distributed by linear interpolation between the start and end points of the wire harness.

[0059] In this embodiment, the control points of the B-spline curve are linearly interpolated and distributed along the start and end points of the line bundle. This can standardize the initial shape of the curve, make the path baseline evenly and regularly arranged, simplify the difficulty of parameter adjustment, provide high-quality initial samples for reinforcement learning iterative optimization, and improve the efficiency and shaping effect of path solving.

[0060] Preferably, when generating the B-spline curve, a complete control point sequence is formed based on the start point, intermediate control points, and end point of the control bundle, and curve sampling points are generated using the B-spline degree and node vector.

[0061] In this embodiment, the starting point, intermediate control points and the ending point are integrated to form a complete control point sequence. Combined with the B-spline degree and node vectors, curve sampling points are generated, which can accurately construct the three-dimensional contour of the bundle, ensuring that the curve shape is continuous and smooth, and providing an accurate and reliable computational foundation for subsequent reward function evaluation and agent path optimization.

[0062] Preferably, when generating B-spline curves, non-uniform node vectors and chord length parameters are used to generate B-spline curves.

[0063] In this embodiment, a B-spline curve is constructed by combining non-uniform node vectors with chord length parameters, which can adapt to the complex spatial orientation of the wiring harness, making the curve shape more in line with the actual wiring requirements, improving the fitting accuracy and smoothness of the path profile, and further ensuring the accuracy of subsequent path evaluation and intelligent optimization.

[0064] Preferably, when generating B-spline curves, B-spline sampling points are generated in parallel for multiple paths.

[0065] In this embodiment, B-spline sampling points for multiple paths are generated in parallel, which can simultaneously complete multiple sets of path calculations, greatly improving the overall computational efficiency, broadening the path optimization range, and facilitating reinforcement learning to select a wiring harness layout scheme with better overall performance.

[0066] Preferably, when using the reward function, a collision penalty is applied when a sampling point falls into an obstacle or the SDF value is less than the radius of the wire harness; the path length is calculated based on the sum of the distances between adjacent sampling points and a length penalty is applied; the curvature is calculated based on the derivative of the sampling point or the B-spline, and a curvature penalty is applied when the maximum curvature exceeds the threshold corresponding to the minimum bending radius; and a success reward is given when the path has no collisions and the curvature meets the requirements.

[0067] In this embodiment, a reward function is constructed through multi-dimensional reward and punishment rules. Corresponding penalties are set for problems such as sampling point collision, excessive path length, and excessive curvature. At the same time, positive incentives are given to compliant paths. This can constrain the wiring harness path from three core dimensions: obstacle avoidance, path length, and degree of curvature, and guide the agent to iteratively optimize the optimal wiring path that is interference-free, of reasonable length, and with bends that meet process requirements.

[0068] Preferably, when designing the three-dimensional path of the wire harness, the actor-critic framework is used to train the strategy network as the agent.

[0069] In this embodiment, the actor-critic framework is used to train the strategy network as the agent, which enables collaborative operation of action decision-making and state evaluation, improves the training stability and convergence speed of the reinforcement learning model, allows the agent to explore and optimize the three-dimensional path of the harness more efficiently, and further enhances the intelligence and solution quality of path planning.

[0070] Preferably, when designing the three-dimensional path of the harness, the intermediate control point is used as the object of the intelligent agent's action.

[0071] In this embodiment, the intermediate control point is used as the action object of the agent, which can accurately control the shape of the B-spline curve, simplify the action space dimension, reduce the difficulty of model training, enable the agent to iteratively adjust the direction of the wire harness more efficiently, and improve the accuracy and efficiency of path optimization.

[0072] Preferably, after designing the three-dimensional path of the wire harness, the optimized B-spline control points are obtained using the intelligent agent to generate the wire harness path curve, and the curve is converted into a three-dimensional curve in the physical coordinate system. After creating the B-spline curve edge corresponding to the three-dimensional curve, the curve file is exported using the STEP format to characterize the center path of the wire harness in three-dimensional space.

[0073] In this embodiment, the wire harness path curve is generated based on the optimized control points output by the intelligent agent. After the coordinate system transformation is completed, the corresponding curve edge is constructed and the file is exported in STEP format. The virtual path planned by the algorithm can be transformed into standard three-dimensional model data that is universally applicable in industry. This enables seamless integration of design results with subsequent industrial software and production processes, presents the wire harness spatial center path completely and accurately, and ensures that the design results can be applied.

[0074] In existing technologies, engineers need to manually specify the start and end points of the wiring harness and its waypoints in a CAD environment. The software only generates a single geometric path based on preset rules, and branch structures, auxiliary features, and obstacle avoidance adjustments all require manual completion. This invention automates all core steps, including connection relationship identification, spatial path calculation, wiring harness geometry construction, and engineering specification verification, through an interactive mode of "connector selection, parameter configuration, and one-click generation." Manual operation only requires selecting the start / end connector and setting wiring parameters on the interface to directly obtain a complete 3D wiring harness model, eliminating the need for any manual segmentation modeling operations and achieving a qualitative leap in automation.

[0075] In existing technologies, the design cycle for wiring harnesses of complex equipment is typically measured in weeks or even months, and heavily relies on experienced senior engineers. This invention compresses the design process to the minute / hour level, enabling engineers to quickly obtain multiple feasible solutions for comparison and evaluation. Simultaneously, by embedding engineering experience (such as bending radius rules, avoidance strategies, and fixed point layout specifications) as algorithmic constraints, it reduces reliance on individual experience, allowing even junior engineers to produce design results that meet industry standards. This significantly saves labor costs and improves the overall productivity of the team.

[0076] In existing technologies, when equipment structures change, the constructed wiring harness digital models often become largely unusable. Engineers must manually replan the paths and rebuild the model segment by segment, resulting in modification costs approaching those of a complete redesign. This invention employs an architecture that decouples connectivity relationships from 3D geometry. The wiring harness path is generated in real-time by calculations of connectivity relationships and spatial constraints, rather than being a statically stored geometric entity. When connector positions are adjusted, added, or removed, or the wiring environment changes, the system can automatically re-trigger path calculations and update the 3D digital model, achieving a closed loop of "requirement change, automatic recalculation, and real-time model update." This avoids global rework caused by local changes and significantly improves the agility of design iterations.

[0077] Existing CAD software wiring harness modules are typically developed for specific fields (such as automotive) or platforms (such as CATIA), making it difficult to migrate these solutions to fields like shipbuilding, aviation, and nuclear power, and they are deeply tied to the CAD platform. This invention addresses this by abstracting a universal wiring harness connection model, a set of spatial constraint rules, and a geometry generation interface. It parameterizes domain-specific differences (such as bending radius standards, fixed point spacing requirements, and material specifications) into configurable rules and encapsulates platform differences (such as CATIA and NX) into standardized output interfaces. This constructs a cross-domain, cross-platform universal technical framework. The same core algorithm can adapt to engineering specifications across different industries, and the same system can output 3D digital models for different CAD platforms, significantly improving the reusability and application breadth of the technical solution.

[0078] Example: This example describes the automatic wiring harness routing for the left front door of a passenger vehicle. The door contains components such as a window lift motor, door lock actuator, door controller, and speaker. The space is narrow and there are many obstacles. The wiring harness routing must meet the requirements of collision-free, shortest path, and curvature compliance. A wiring system based on B-spline curves and near-end policy optimization (PPO) reinforcement learning is used to complete the fully automated design process.

[0079] Step S100, spatial environment modeling, specifically includes the following process: Step S101: Import the 3D CAD model of the car door, convert the car door sheet metal, motor, door lock, speaker and other parts into 5mm voxels, and encode them as spatial obstacles (marked as impassable areas). Step S102: Pre-calculate the full-space signed distance field (SDF) and gradient data file: SDF values ​​represent the minimum distance from the sampling point to the obstacle, and gradients indicate the direction away from the obstacle; Step S103 sets routing constraints, including: Wiring harness starting point: door controller interface (coordinates: X=100mm, Y=50mm, Z=80mm); Wiring harness endpoint: window lift motor interface (coordinates: X=300mm, Y=180mm, Z=120mm).

[0080] Step S200, path parameterization, specifically includes the following processes: Step S201 defines the door wiring harness path as a cubic B-spline curve, constrained by a starting point + 6 intermediate control points + an ending point, for a total of 8 control points; Step S202 Initialize intermediate control points: Perform linear interpolation between the start point and the end point, and distribute them evenly on the straight line; Step S203 sets the training rules, and the reinforcement learning agent outputs the X / Y / Z three-axis displacement (maximum ±2mm) of each intermediate control point. After the update, it is forcibly restricted to the door voxel space and does not exceed the physical boundary of the door.

[0081] Step S300 generates the B-spline curve, which specifically includes the following process: Step S301: Assemble the complete control point sequence: [start point, P1, P2, P3, P4, P5, P6, end point]; Step S302 uses non-uniform node vectors + chord length parameterization to generate B-spline curves, and calculates sampling points with a step size of 2mm.

[0082] This embodiment uses the OpenCASCADE core interface: calling GeomAPI_PointsToBSpline to generate a smooth B-spline curve based on the control points, and synchronously outputting the coordinates of the sampling points and the first derivative (for curvature calculation).

[0083] This embodiment uses GPU parallel acceleration to generate sampling points for 50 candidate paths simultaneously, thereby improving training efficiency.

[0084] Step S400, the reward function evaluation, specifically includes the following process: In one implementation, the sampling points of each candidate B-spline path are subjected to multi-dimensional constraint scoring, and the reward function rules include: Collision penalty: If the sampling point falls into an obstacle object, or the SDF value is <4mm (less than the wire harness radius), 100 points will be deducted per violation point; Length penalty: The longer the total path length, the more points are deducted (to encourage the shortest path). Curvature penalty: Calculate the curvature of the B-spline. If the maximum curvature is greater than 1 / 20 mm (corresponding to a minimum bending radius of 20 mm), deduct 50 points. Success reward: 200 points for a collision-free path and compliant curvature.

[0085] Step S500 reinforcement learning training specifically includes the following process: In one implementation, the PPOActor-Critic framework is adopted, including: an actor network (Actor): inputting the current state (control point coordinates, start / end point, sample point SDF value + gradient), and outputting the three-dimensional displacement motion of 6 intermediate control points; and a critic network (Critic): evaluating the value of the current state and guiding the actor to optimize the motion. For example, during training, the process iterates 20,000 times to gradually optimize the control point position, avoid obstacles, shorten the path, and meet the bending radius requirements. For example, after training, the training results show that the policy network converges and can output the optimal control point parameters within 0.5 seconds.

[0086] Step S600 3D digital model output specifically includes the following process: Step S601 uses the optimized 8 control points to generate the final B-spline curve, which is then converted into a three-dimensional center path in the physical coordinate system of the car door. Step S602 creates BRepBuilderAPI_MakeEdge using OpenCASCADE to generate B-spline curve edges; Step S603 exports the 3D curve file (Door_Wiring_Harness.step) in STEP format. The purpose of the output file in this embodiment is to use the STEP curve as the center path of the wire harness, so that the subsequent three-dimensional digital modeling of the wire harness sheath, branches, and terminals can be directly performed, and it is compatible with commercial CAD software such as CATIA and UG.

[0087] In summary, the door wiring harness path generated in this embodiment is completely collision-free, avoiding all internal door components; the total path length is 450mm (meeting the shortest path requirement); the minimum bending radius is 22mm (greater than the set value of 20mm, conforming to wiring harness bending specifications); the entire process is automated, improving efficiency by 80% compared to traditional manual wiring, with a 100% path qualification rate; it is evident that this embodiment fully implements the entire process of spatial modeling, path parameterization, curve generation, reward evaluation, reinforcement learning training, and 3D output, using a car door as a practical application scenario, clearly defining the hardware, software, parameters, code interfaces, and final results, and can be directly reproduced for automated wiring harness design in industrial applications.

[0088] This application also provides a smart terminal, including a memory and a processor. The memory stores a wire harness 3D path design program. When the wire harness 3D path design program is executed by the processor, it implements the steps of the reinforcement learning-based wire harness 3D path design method in any of the above embodiments.

[0089] This application embodiment also provides a storage medium storing a wire harness three-dimensional path design program, which, when executed by a processor, implements the steps of the wire harness three-dimensional path design method in any of the above embodiments.

[0090] In the embodiments of the smart terminal and storage medium provided in this application, all the technical features of any of the above-described embodiments of the three-dimensional path design method for wire harness may be included. The extended and explanatory content of the specification is basically the same as that of the embodiments of the above methods, and will not be repeated here.

[0091] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the methods described in the various possible implementations above.

[0092] This application also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device with the chip installed performs the methods described in the various possible implementations above.

[0093] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0094] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A method for designing three-dimensional paths for wire harnesses, characterized in that, Includes the following steps: After modeling the spatial environment of the wire harness, the wire harness path is parametrically designed to generate B-spline curves; After constraining and evaluating the sampling points of the B-spline curve using a reward function, the three-dimensional path of the wire harness is designed by an intelligent agent.

2. The method for designing a three-dimensional path for a wire harness according to claim 1, characterized in that: When performing spatial environment modeling, the three-dimensional spatial data of the equipment to be wired is acquired, and the door voxels and its component voxels are encoded as obstacles in space.

3. The method for designing a three-dimensional path for a wire harness according to claim 1, characterized in that: When performing parametric design, the intermediate control points of the B-spline curve are distributed by linear interpolation between the start and end points of the wire harness.

4. The method for designing a three-dimensional path for a wire harness according to claim 1, characterized in that: When generating B-spline curves, a complete sequence of control points is constructed based on the start point, intermediate control points, and end point of the control bundle. Curve sampling points are then generated using the B-spline degree and node vector.

5. The method for designing a three-dimensional path for a wire harness according to claim 1, characterized in that: When generating B-spline curves, non-uniform node vectors and chord length parameters are used to generate B-spline curves, and / or, the B-spline sampling points are generated in parallel for multiple paths.

6. The method for designing a three-dimensional path for a wire harness according to claim 1, characterized in that: When using the reward function, a collision penalty is applied when a sampling point falls into an obstacle or the SDF value is less than the radius of the wire harness; the path length is calculated based on the sum of the distances between adjacent sampling points and a length penalty is applied; the curvature is calculated based on the derivative of the sampling point or the B-spline, and a curvature penalty is applied when the maximum curvature exceeds the threshold corresponding to the minimum bending radius; a success reward is given when the path has no collisions and the curvature meets the requirements.

7. The method for designing a three-dimensional path for a wire harness according to claim 1, characterized in that: When designing the 3D path of the wire harness, an actor-critic framework is used to train the strategy network as an agent, and the intermediate control point is used as the object of the agent's action.

8. A method for designing three-dimensional paths for a wire harness according to any one of claims 1-7, characterized in that: After designing the three-dimensional path of the wire harness, the optimized B-spline control points are obtained using the intelligent agent to generate the wire harness path curve. This curve is then converted into a three-dimensional curve in the physical coordinate system. After creating the B-spline curve edge corresponding to this three-dimensional curve, the curve file is exported using the STEP format to characterize the center path of the wire harness in three-dimensional space.

9. A smart terminal, characterized in that, The smart terminal includes a processor and a memory; The memory stores a computer program, which, when executed by the processor, implements the steps of a wire harness three-dimensional path design method as described in any one of claims 1-8.

10. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of a wire harness three-dimensional path design method as described in any one of claims 1-8.