An automobile system schematic diagram automatic drawing method and system
By automating the generation of automotive system schematics and utilizing data parsing and layout algorithms, the problems of inconsistent quality and long cycle times in traditional drawing methods have been solved, achieving efficient and low-cost generation of system schematics.
Patent Information
- Application Number
- CN202311494391.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-11-10
AI Technical Summary
Traditional automotive system schematic drawing relies on manual operation, resulting in inconsistent drawing quality, long development cycles, and high costs.
An automated approach is used, employing data parsing, layout positioning algorithms, and genetic algorithms, combined with JavaScript, to automatically draw the system schematic on an HTML5 Canvas, including components, pins, and connections.
It improved drawing efficiency, ensured consistent drawing quality, reduced manual operations, and lowered development costs and time.
Smart Images

Figure CN117473938B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of automobile aftermarket circuit diagram development, and particularly relates to an automobile system schematic diagram automatic drawing method and system. BACKGROUND
[0002] In the field of automobile repair and maintenance, system schematic diagrams are essential tools for explaining the working principles of automobile electrical functions and the connection relationships between various electronic elements. System schematic diagrams are important reference resources for automobile repair personnel and engineers when diagnosing problems, maintaining and repairing vehicles. Traditionally, the drawing of system schematic diagrams is a manual and labor-intensive process involving steps such as analyzing reference materials, manually drawing diagrams, positioning elements, and layout.
[0003] 1. Highly dependent on manual operation: The traditional drawing method requires the drafter to analyze and manually draw, which requires high skills and experience of the drafter.
[0004] 2. Consistency is difficult to guarantee: Due to the complexity of manual operation, the drawing results of different drafters may differ, resulting in inconsistent drawing quality.
[0005] 3. Long development cycle: Manually drawing system schematic diagrams requires a long time, especially for complex automobile systems. SUMMARY
[0006] To solve the above problems, the present application provides an automobile system schematic diagram automatic drawing method and system, which improves the drawing efficiency of automobile system schematic diagrams, reduces manual operation, and ensures the quality consistency of the drawing process.
[0007] Based on the above purpose, in the first aspect, the present application provides an automobile system schematic diagram automatic drawing method, which mainly includes the following steps:
[0008] Step 1. System schematic diagram element confirmation:
[0009] The first step of the present application is to confirm the elements of the system schematic diagram. According to the circuit diagram catalog development standard, create a name for each system schematic diagram. Then, according to the functional principle content and circuit connection relationship to be described by each system schematic diagram, analyze and define the relationship between the wire harness components in the system and the system schematic diagram. This step ensures the clear definition of the elements and circuits to be drawn, providing necessary information for subsequent automatic drawing.
[0010] Step 2. System schematic diagram automatic drawing:
[0011] The core part of the invention is the process of automatically drawing the system schematic diagram. This step is divided into the following key sub-steps:
[0012] 2.1 Data analysis: The drawing module analyzes the corresponding relationship between the vehicle system schematic diagram line information and the components and the system schematic diagram, and converts the connection relationship into a tree structure. The purpose of this step is to provide data support for subsequent automatic layout.
[0013] 2.2 Layout positioning algorithm preset: This step includes the following key sub-steps:
[0014] 2.2.1 System schematic diagram layout effect evaluation: Preset layout typesetting three-layer matrix format, and use component layout evaluation algorithm to calculate the rationality of component layout. This evaluation algorithm includes calculating the weight of connection distance, the weight of connection intersection and the weight of component type level to determine the optimal solution of component layout.
[0015] 2.2.2 Component layout positioning: Genetic algorithm is used to perform iterative search through breeding, mutation and selection steps to find the optimal solution of component layout. The key parameters of this step include initialization population, crossover probability, mutation probability and iteration number.
[0016] 2.2.3 Pin layout positioning: According to the component layout and pin connection relationship, the optimal position of the pin on the component is calculated to ensure the least connection intersection. This includes using force-directed algorithm and dynamic programming algorithm.
[0017] 2.3 Automatic drawing of drawing board:
[0018] Finally, using JavaScript script, the drawing module automatically draws the system schematic diagram on the HTML5 Canvas drawing board. This includes automatic drawing of components, pins, connection points, wiring harnesses and other elements, as well as drawing of connection lines and addition of text information. Through this step, the system schematic diagram is automatically drawn and presented.
[0019] Through the above method, the invention realizes the automatic drawing of system schematic diagram, greatly improves the drawing efficiency, reduces the manual operation, and ensures the consistency and quality of the drawing process. This invention has important application prospects in the field of automobile repair and maintenance.
[0020] As a further scheme of the invention, the automobile system schematic diagram automatic drawing method specifically includes the following steps:
[0021] Step 1: Determine the drawing elements
[0022] Based on the predefined correspondence information between wire harness components and system schematic diagrams, the wire harness component elements that need to be drawn for each system schematic diagram are determined, including the name of the system schematic diagram, the functional principle content, and the circuit connection relationship.
[0023] Step 2: Create a drawing module
[0024] Create a plotting module for data parsing and graph drawing. This plotting module will perform the following operations:
[0025] Step 2.1: Data Analysis
[0026] Analyzing the wiring information relationships in the vehicle system schematic diagram and the correspondence between wiring harness components and the system schematic diagram involves extracting the wiring information of the vehicle system schematic diagram from reference materials and converting it into a tree structure.
[0027] Step 2.2: Preset system schematic layout
[0028] The layout of the system schematic is preset, dividing the layout area of the system schematic into different levels (top layer, middle layer, bottom layer).
[0029] The component layout evaluation algorithm is used to calculate the rationality of the component layout, and the most reasonable component layout is determined based on the calculation results.
[0030] Step 2.3: Component layout and positioning
[0031] A genetic algorithm is used for iterative search to find the optimal component layout. This includes steps such as population initialization, fitness function, selection operation, reproduction operation, and mutation operation.
[0032] Step 2.4: Pin Layout and Positioning
[0033] To calculate the optimal position of the pins on the component, consider using a force-directed algorithm to determine the pin positions.
[0034] Using a dynamic programming algorithm, the order of pins on the same side is selected to minimize the crossover of pins.
[0035] Step 2.5: Drawing board coordinate transformation
[0036] Calculate the actual size of the components (based on the number of pins) and the spacing between the components, and convert the relative positions in the component layout positioning and pin layout positioning into the positions in the actual layout.
[0037] Fine-tuning is performed using a force-guided placement algorithm to ensure the accurate placement of components.
[0038] Step 2.6: Automatic drawing generation on the drawing board
[0039] Using JavaScript and the Fabric.js library, various elements of the system schematic are automatically drawn on an HTML5 Canvas, including component frames, pins, connection points, and docking plugs.
[0040] Based on the connection relationships and layout of components, the system automatically generates connections and adds related text information such as wire color, wire diameter, and configuration code.
[0041] Finally, confirm the drawing effect of the system schematic diagram, and allow for manual intervention to optimize the layout.
[0042] The generated system schematic can be saved or exported as an SVG format using the API provided by Fabric.js, thus completing the automatic drawing of the system schematic.
[0043] The automatic drawing method for automotive system schematics of the present invention can significantly improve the production efficiency of automotive system schematics while ensuring the quality and consistency of the graphics.
[0044] As a further aspect of the present invention, determining the wire harness component elements required to be drawn in the system schematic includes: creating a name for each system schematic based on the circuit diagram catalog development standard;
[0045] Based on the functional principles and circuit connections required to be explained in each system schematic, the relationship between the wire harness components in the system and the system schematic is analyzed and defined, and the wire harness component elements that need to be drawn in each system schematic are determined.
[0046] As a further aspect of the present invention, the creation of a drawing module for data parsing also includes using two pointers to traverse the data, obtaining the connection relationships between component pins from the wiring information relationship table of the whole vehicle system schematic diagram, and converting the connection relationships into a tree structure.
[0047] As a further aspect of the present invention, the drawing module is pre-set with a layout positioning algorithm: the drawing module is pre-set with a three-layer matrix format for layout, and the layout area is divided into: top layer, middle layer and bottom layer; the specific positioning of the components is determined by the matrix coordinate points, and the matrix [0][0] represents the lower left corner of the layout; in addition, the rationality of the component layout is calculated by setting a component layout evaluation algorithm.
[0048] As a further aspect of the present invention, the component layout evaluation algorithm calculates the following weights based on the connection relationships: the weight of the connection distance, the weight of the component intersection, and the weight of the component type's level. The sum of these weights is used as the component layout evaluation value. The rationality of the component layout is determined by the component layout evaluation value, and a smaller evaluation value indicates a more reasonable layout effect.
[0049] As a further aspect of the present invention, the drawing module also employs a genetic algorithm to iteratively search through steps such as reproduction, mutation, and selection to find the optimal solution for component layout; and calculates the optimal position of the pins on the components based on the component layout positioning and pin connection relationship.
[0050] As a further aspect of the present invention, the automatic drawing method for automotive system schematic diagrams includes the following steps for canvas coordinate transformation:
[0051] Calculate the actual size and spacing of the components, convert all relative positions in the component layout and pin layout into positions in the actual layout, and fine-tune the actual positions of the components through the force-guided layout algorithm between components.
[0052] Using a connection point position calculation algorithm, the positions directly above or below the pin are traversed to find the position that minimizes the sum of the distances between the connection point and the pin, which is then used as the positioning coordinates of the connection point on the drawing board.
[0053] As a further aspect of the present invention, in the automatic drawing method for automotive system schematic diagrams, JavaScript is used to automatically draw the system schematic diagram on an HTML5 Canvas canvas.
[0054] As a further aspect of the present invention, the automatic drawing output from the drawing board includes the following steps:
[0055] The drawing module calls the obtained pin and connection point layout position data, uses the Fabric.js library, and automatically draws the graphic of each element in the system schematic diagram on the canvas according to the preset system schematic diagram element template and the positioning data, and groups the graphic of each element.
[0056] The system calls upon the correspondence between components and the system schematic, as well as the pin connection relationships, to calculate the relative positions of pins with connections. It then matches the corresponding connection point relative position path processing algorithm in the connection rules to calculate the path coordinates of the harness direction points. Finally, it uses the Fabric.js library to automatically draw the harness between pins according to the path coordinates and adds relevant text information about the harness.
[0057] To verify the system schematic drawing effect of the drawing module, use the API provided by Fabric.js to save or export the system schematic on the canvas as SVG format to complete the drawing of the schematic graphics of each system.
[0058] As a further aspect of the present invention, the graphic elements of the system schematic diagram are automatically drawn on the drawing board, including component frames, pins, connection points, and docking plugs. When manually optimizing the layout, the graphic elements can be moved as a whole.
[0059] Secondly, the present invention provides an automatic schematic diagram drawing system for automotive systems, comprising the following modules:
[0060] System Schematic Drawing Element Confirmation Module: This module confirms the elements required for drawing system schematics, including the system schematic name, functional principle content, and circuit connection relationships. Based on the circuit diagram catalog development standard, this module creates names for each system schematic and analyzes and determines the wiring harness component elements that need to be drawn in each system schematic based on the functional principle content and circuit connection relationships.
[0061] The system schematic diagram auto-drawing module is used to automatically draw system schematic diagrams. It includes the following sub-modules:
[0062] Data parsing module: Used to parse the wiring information and the correspondence between components and the system schematic diagram of the entire vehicle system. By traversing the data with two pointers, the connection relationships are converted into a tree structure. Based on the correspondence between components and the system schematic diagram, the module calculates the possibilities for the layout and arrangement of graphic elements in each system schematic diagram.
[0063] The layout and positioning algorithm preset module presets the system schematic layout, dividing the layout area into different levels (top, middle, and bottom), and sets a component layout evaluation algorithm to calculate the rationality of the component layout. Weight parameters include the weight of connection distances, the weight of component intersections, and the weight of the layer in which the component type is located.
[0064] Component layout and location module: This module uses a genetic algorithm for iterative search to find the optimal solution for component placement. The module includes steps such as population initialization, fitness function, selection operation, reproduction operation, and mutation operation to determine the component layout.
[0065] Pin layout and positioning module: This module calculates the optimal position of pins on components, including using force-guided algorithms and dynamic programming algorithms to determine the pin positions, so as to ensure the best layout of the wiring.
[0066] The drawing board coordinate transformation module calculates the actual dimensions and spacing of components, converting the relative positions in component and pin layout positioning into their actual positions within the layout. It uses force-guided layout algorithms and connection point position calculation algorithms to fine-tune the actual positions of components, ensuring layout accuracy.
[0067] Automatic Drawing Module on HTML5 Canvas: This module uses JavaScript in conjunction with the Fabric.js library to automatically draw various elements of the system schematic on an HTML5 Canvas, including component frames, pins, connection points, and docking plugs. The module also handles drawing connections and adding text information related to wire harnesses to generate a complete system schematic.
[0068] In the automatic schematic drawing system for automotive systems of the present invention, the functions of each module work closely together to form a system capable of automatically drawing automotive system schematics. This system can improve drawing efficiency, ensure consistent drawing quality, and reduce development costs and time.
[0069] In another aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, performs any of the above-described methods for automatically drawing automotive system schematic diagrams according to the present invention.
[0070] In another aspect, the present invention provides a computer-readable storage medium storing computer program instructions that, when executed, implement any of the above-described methods for automatically drawing automotive system schematic diagrams according to the present invention.
[0071] Compared with existing technologies, the automatic drawing method and system for automotive system schematics proposed in this invention have the following advantages:
[0072] 1. Improved drawing efficiency: Traditional system schematic drawing methods require extensive manual analysis, drawing, and layout. This invention's automatic drawing method, through algorithms and calculations, can rapidly generate system schematics, significantly improving drawing efficiency. This helps accelerate the development of automotive circuit diagrams.
[0073] 2. Improved consistency in drawing quality: Because the drawing is based on preset drawing and layout positioning algorithms, the drawing quality of the system schematic diagram remains consistent each time it is generated. This reduces errors and inconsistencies that may be introduced by manual drawing.
[0074] 3. Automated Layout and Typesetting: The algorithm used in this invention can automatically calculate and recommend the most reasonable component layout and typesetting, thereby reducing the workload of drafters. This helps ensure a more compact and reasonable layout of the system schematic, saving time and effort.
[0075] 4. Optimize component placement: By using optimization algorithms such as genetic algorithms, the system can find the best component layout to reduce wiring distance and the number of component intersections, thereby improving the readability and understandability of the system schematic.
[0076] 5. Automated wiring and path generation: The algorithm used in the invention can automatically generate wiring and harness paths between components, reducing tedious manual wiring work while ensuring the rationality of harness routing and minimal intersections.
[0077] 6. Real-time feedback and optimization opportunities: The drawing module can generate initial system schematics while allowing for manual intervention and optimization to ensure that the final system schematics meet specific requirements.
[0078] 7. Accurate pin positions and connection point layout: Through force-guided algorithms and dynamic programming, the system ensures the optimal pin position settings for components to reduce wiring crossovers and improve wiring clarity.
[0079] 8. Output in multiple formats: The system in the invention can output system schematics in multiple formats, such as SVG format, making them easy to share and further edit.
[0080] 9. Reduced manual intervention: The automated drawing process reduces the high skill requirements for drawing personnel, thus reducing reliance on senior drawing staff and the risk of drawing errors.
[0081] 10. Cost-effectiveness: By reducing the time and effort spent on manual drawing, the automatic drawing method of system schematics reduces development costs and provides a cost-effective solution.
[0082] In summary, this invention provides an intelligent and efficient method and system for automatically drawing automotive system schematics, which has significant potential value in the field of automotive circuit diagram development. It helps to improve drawing efficiency, quality, and maintainability, thereby providing an innovative solution for the automotive aftermarket and the field of electronic engineering.
[0083] These or other aspects of this application will become more apparent from the following description of embodiments. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the application. Attached Figure Description
[0084] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art 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 embodiments can be obtained based on these drawings without creative effort.
[0085] In the diagram:
[0086] Figure 1 This is a flowchart of an automatic schematic diagram drawing method for an automotive system according to an embodiment of the present invention.
[0087] Figure 2 This is a flowchart illustrating the operation of the drawing module in an automatic drawing method for automotive system schematics according to an embodiment of the present invention.
[0088] Figure 3 This is a structural block diagram of an automatic drawing system for automotive system schematics, as described in an embodiment of the present invention. Detailed Implementation
[0089] The present application will now be further described in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.
[0090] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to specific examples and the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0091] It should be noted that all uses of "first" and "second" in the embodiments of the present invention are for the purpose of distinguishing two different entities or different parameters with the same name. Therefore, "first" and "second" are merely for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as other steps or units inherent in a process, method, system, product, or device that includes a series of steps or units.
[0092] 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, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0093] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0094] Traditional system schematic diagram drawing methods primarily involve analyzing reference materials to obtain system schematic circuit information, manually drawing the various elements of the schematic diagram using relevant drawing software, and manually positioning and laying out the graphics to complete each system schematic diagram. This development method requires highly skilled system schematic diagram artists, makes it difficult to guarantee consistent work quality, and also results in long development cycles and high costs. To ensure the quality of system schematic diagram drawing and improve drawing efficiency, this invention proposes an automatic method and system for drawing automotive system schematic diagrams.
[0095] This invention provides a method and system for automatically drawing automotive system schematics. The drawing module includes a pre-set drawing algorithm that analyzes the wiring information and the correspondence between components and the system schematic in the overall vehicle system schematic. It automatically calculates various possibilities for element layout and arrangement in each system schematic and recommends the most reasonable drawing scheme. Based on the recommended scheme, the drawing module automatically calls the corresponding pre-set element graphic templates and positions, lays out, and draws the coordinates of each element in the system schematic lines on the drawing board, completing the automatic drawing process. This drawing method significantly improves the efficiency of system schematic drawing and ensures consistent quality throughout the drawing process.
[0096] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0097] See Figure 1 As shown in the figure, this invention provides a method for automatically drawing automotive system schematics, which includes the following steps:
[0098] Step S10: Determine the drawing elements
[0099] Based on the predefined correspondence information between wire harness components and system schematic diagrams, the wire harness component elements that need to be drawn for each system schematic diagram are determined, including the name of the system schematic diagram, the functional principle content, and the circuit connection relationship.
[0100] In this embodiment, determining the wiring harness component elements required for drawing the system schematic includes: creating a name for each system schematic based on the circuit diagram catalog development standard;
[0101] Based on the functional principles and circuit connections required to be explained in each system schematic, the relationship between the wire harness components in the system and the system schematic is analyzed and defined, and the wire harness component elements that need to be drawn in each system schematic are determined.
[0102] Step S20: Create a drawing module
[0103] Create a plotting module for data parsing and graph creation. See also Figure 2 As shown, this drawing module is used to perform the following operations:
[0104] Step S201: Data Analysis
[0105] Analyzing the wiring information relationships in the vehicle system schematic diagram and the correspondence between wiring harness components and the system schematic diagram involves extracting the wiring information from the reference materials and converting it into a tree structure.
[0106] In this embodiment, the creation of a drawing module for data parsing also includes using two pointers to traverse the data, obtaining the connection relationships between component pins from the wiring information relationship table of the whole vehicle system schematic diagram, and converting the connection relationships into a tree structure.
[0107] Step S202: Preset system schematic layout
[0108] The layout of the system schematic is preset, dividing the layout area of the system schematic into different levels (top layer, middle layer, bottom layer).
[0109] The component layout evaluation algorithm is used to calculate the rationality of the component layout, and the most reasonable component layout is determined based on the calculation results.
[0110] In this embodiment, the drawing module has a preset layout positioning algorithm: the drawing module presets a three-layer matrix format for layout, dividing the layout area into: top layer, middle layer and bottom layer; the specific positioning of the components is determined by the matrix coordinate points, and matrix [0][0] represents the lower left corner of the layout; in addition, the rationality of the component layout is calculated by setting a component layout evaluation algorithm.
[0111] Step S203: Component layout and positioning
[0112] A genetic algorithm is used for iterative search to find the optimal component layout. This includes steps such as population initialization, fitness function, selection operation, reproduction operation, and mutation operation.
[0113] In this embodiment, the component layout evaluation algorithm calculates the following weights based on the connection relationships: the weight of the connection distance, the weight of the component intersection, and the weight of the component type's level. The sum of these weights is used as the component layout evaluation value. The rationality of the component layout is determined by the component layout evaluation value; the smaller the evaluation value, the more reasonable the layout effect.
[0114] The drawing module also employs a genetic algorithm, which iteratively searches through steps such as reproduction, mutation, and selection to find the optimal solution for component layout; and calculates the optimal position of the pins on the components based on the component layout and pin connection relationship.
[0115] Step S204: Pin layout positioning
[0116] To calculate the optimal position of the pins on the component, consider using a force-directed algorithm to determine the pin positions.
[0117] Using a dynamic programming algorithm, the order of pins on the same side is selected to minimize the crossover of pins.
[0118] Step S205: Drawing board coordinate transformation
[0119] Calculate the actual size of the components (based on the number of pins) and the spacing between the components, and convert the relative positions in the component layout positioning and pin layout positioning into the positions in the actual layout.
[0120] Fine-tuning is performed using a force-guided placement algorithm to ensure the accurate placement of components.
[0121] In this embodiment, the coordinate transformation includes the following steps:
[0122] Calculate the actual size and spacing of the components, convert all relative positions in the component layout and pin layout into positions in the actual layout, and fine-tune the actual positions of the components through the force-guided layout algorithm between components.
[0123] Using a connection point position calculation algorithm, the positions directly above or below the pin are traversed to find the position that minimizes the sum of the distances between the connection point and the pin, which is then used as the positioning coordinates of the connection point on the drawing board.
[0124] Step S206: Automatic drawing generation on the drawing board
[0125] Using JavaScript and the Fabric.js library, various elements of the system schematic are automatically drawn on an HTML5 Canvas, including component frames, pins, connection points, and docking plugs.
[0126] Based on the connection relationships and layout of components, the system automatically generates connections and adds related text information such as wire color, wire diameter, and configuration code.
[0127] Finally, confirm the drawing effect of the system schematic diagram, and allow for manual intervention to optimize the layout.
[0128] The generated system schematic can be saved or exported as an SVG format using the API provided by Fabric.js, thus completing the automatic drawing of the system schematic.
[0129] In this embodiment, the automatic drawing generation on the drawing board includes the following steps:
[0130] The drawing module calls the obtained pin and connection point layout position data, uses the Fabric.js library, and automatically draws the graphic of each element in the system schematic diagram on the canvas according to the preset system schematic diagram element template and the positioning data, and groups the graphic of each element.
[0131] The system calls upon the correspondence between components and the system schematic, as well as the pin connection relationships, to calculate the relative positions of pins with connections. It then matches the corresponding connection point relative position path processing algorithm in the connection rules to calculate the path coordinates of the harness direction points. Finally, it uses the Fabric.js library to automatically draw the harness between pins according to the path coordinates and adds relevant text information about the harness.
[0132] To verify the system schematic drawing effect of the drawing module, use the API provided by Fabric.js to save or export the system schematic on the canvas as SVG format to complete the drawing of the schematic graphics of each system.
[0133] The system schematic diagram automatically draws various elements on the drawing board, including component frames, pins, connection points, and docking plugs. When manually optimizing the layout, the entire graphic elements can be moved.
[0134] By employing the above method, this invention achieves automated drawing of system schematics, significantly improving drawing efficiency, reducing manual operations, and ensuring consistency and quality in the drawing process. This invention has significant application prospects in the field of automotive repair and maintenance.
[0135] This invention provides a method for automatically drawing automotive system schematics, the specific steps of which are as follows:
[0136] Step 1: Confirm the elements for drawing the system schematic diagram
[0137] Create the names of each system schematic diagram according to the development standards of the circuit diagram catalog. Based on the functional principles and circuit connection relationships to be described in each system schematic diagram, manually analyze and define the relationship between each wire harness component and the system schematic diagram, and determine the wire harness component elements to be drawn in each system schematic diagram.
[0138] For example, when defining the system by manual analysis, if the system schematic is named "Automatic Air Conditioning", the corresponding components would be: air conditioning controller, blower, electric compressor, indoor temperature sensor, etc.
[0139] Step 2: Automatic drawing of system schematic diagram
[0140] Create a plotting module for data parsing and graph drawing. This plotting module is used to perform the following operations:
[0141] Step 2.1, Data Analysis
[0142] The drawing module analyzes the wiring information of the whole vehicle system schematic extracted from the reference materials and the correspondence between the components defined in step 1 and the system schematic. It uses two pointers to traverse the data, obtains the connection relationship between component pins from the whole vehicle system schematic wiring information relationship table, converts the connection relationship into a tree structure, and performs algorithm analysis and calculation on the possibility of layout and arrangement of graphic elements of each system schematic based on the correspondence between components and system schematic.
[0143] When using two pointers to traverse the data, the path data of the connections between nodes is traversed using two pointers to extract the connection relationships between nodes:
[0144] 1. Define two pointers: a fast pointer and a slow pointer. Initially, both pointers point to the starting node of the path data.
[0145] 2. Use a loop to traverse the path data until the fast pointer reaches the end of the path data. In each loop iteration, the fast pointer moves forward one step.
[0146] 3. In each iteration, by comparing the nodes pointed to by the fast pointer and the slow pointer, if both pointers point to the same node as a component node, the connection relationship between the nodes is extracted, the connection relationship is stored in the node's connection list, and then the slow pointer is set to the node pointed to by the fast pointer at this time.
[0147] 4. The loop ends when the fast pointer reaches the end of the path data. At this point, the connection relationships between the nodes can be obtained.
[0148] Step 2.2, Preset the layout and positioning algorithm
[0149] Step 2.2.1: Evaluation of System Schematic Layout Effect
[0150] In the drawing module, a three-layer matrix format for layout is preset (dividing the layout area into: top layer, middle layer, and bottom layer). The specific location of the components is determined by the matrix coordinate points, where matrix [0][0] represents the lower left corner of the layout. A component layout evaluation algorithm is set to calculate the rationality of the component layout.
[0151] When determining the specific location of components using matrix coordinate points, the following methods are included:
[0152] Construct a two-dimensional array to represent matrix coordinate points to determine the specific location of the component:
[0153] 1. Define the number of rows and columns of the layout matrix, and create a two-dimensional array to represent the matrix. Assuming the matrix has 3 rows and N columns, create a two-dimensional array of size 3xN.
[0154] 2. Each component occupies a specific position in the layout matrix, and the position coordinates of the component can be represented by the index of a two-dimensional array. In the matrix, the first dimension represents the number of rows, and the second dimension represents the number of columns. For example, the position of the component in the layout matrix is (0, 0), which is located in the lower left corner of the matrix, and the corresponding index of the two-dimensional array is [0][0].
[0155] 3. Map the top, middle, and bottom layers of the layout to different areas of the layout matrix. The top layer component has an index of 2 in the first dimension of the layout matrix, the middle layer component has an index of 1 in the first dimension of the layout matrix, and the bottom layer component has an index of 0 in the first dimension of the layout matrix.
[0156] 4. Use matrix coordinates to determine the specific location of each component in the layout. By traversing all matrix coordinates within this range, the position of each component in the layout can be determined.
[0157] The component placement evaluation algorithm is calculated based on the connection relationships:
[0158] 1. Weighting of connection distance;
[0159] 2. Weight values of component intersections;
[0160] 3. The weight value of the level in which the component type is located.
[0161] The sum of the three weight values mentioned above is used as the component layout evaluation value. The rationality of the component layout is determined by the component layout evaluation value. The smaller the evaluation value, the more reasonable the layout effect.
[0162] In this embodiment, the specific weight calculation method (the weight parameters can be set by the user) is as follows:
[0163] Component layout evaluation value = Weight 1 + Weight 2 + Weight 3
[0164] 1) Weight of connection distance
[0165] Weight of interconnections of components on the same layer
[0166] Weight 1 = Horizontal projection distance of the connecting line * weight1
[0167] Located in the middle layer: weight1 = 2.9
[0168] In other layers: weight1 = 2.4
[0169] Cross-layer component connection weight
[0170] Weight 1 = Horizontal projection distance of the connecting line * weight 2 + Vertical projection distance of the connecting line * weight 3
[0171] The horizontal projection distance of the connecting line has a weight² = 1.2.
[0172] The weight3 of the perpendicular projection distance of the connecting line is 1.6.
[0173] 2) Weight of the intersection points of the connecting lines
[0174] Weight 2 = Number of intersections on the connection line * weight 4
[0175] The weight4 of the intersection of the lines is 1.
[0176] 3) Weight of the component type at different levels
[0177] Weight 3 = weight 5
[0178] The components are fuse box type.
[0179] Component level is not at the top level: weight5 = 200
[0180] The component level is at the top: weight5 = component's horizontal coordinate * 3
[0181] The component is a grounding point type:
[0182] The component level is at the bottom: weight5 = 10 - component horizontal coordinate * 0.2
[0183] Component level is not the bottom layer: weight5 = 40 - component horizontal coordinate * 0.2
[0184] Components are of other types:
[0185] weight5 = 0
[0186] Step 2.2.2, Component Layout and Positioning
[0187] The drawing module employs a Genetic Algorithm, which iteratively searches through steps such as reproduction, mutation, and selection to find the optimal solution for component layout. The key parameters of the Genetic Algorithm are set as follows:
[0188] Initialize the population: set to 2500 individuals, crossover probability 0.5, mutation probability 0.5, and number of iterations 250;
[0189] Initialize individual functions:
[0190] 1) Create a three-layer layout matrix to store the components in each layer;
[0191] 2) Components are categorized into fuse box elements and non-fuse box elements;
[0192] 3) Randomly sort the elements of the safe box to obtain an array of safe box elements;
[0193] 4) Randomly sort the non-safety box elements into three layers. After sorting, assign the element array to the corresponding layer storage position of the layout layer array.
[0194] Fitness function: The fitness value is the result of the component placement evaluation algorithm.
[0195] Selection operation: Tournament selection is used, randomly selecting 5 individuals from the population, and then selecting the individual with the best fitness from among them as the next generation.
[0196] In tournament selection, a commonly used selection method in genetic algorithms, a certain number of individuals are first randomly selected from the current population as competitors (generally referred to as the tournament size). Then, the individual with the best fitness is selected from these competitors to become the parent individual. The specific steps are as follows:
[0197] A fixed number of individuals are randomly selected as competitors.
[0198] Compare the fitness of competitors and select the individual with the best fitness.
[0199] Repeat the above steps multiple times until a sufficient number of parent individuals are selected.
[0200] The main characteristics of tournament selection are its simplicity and ease of implementation. By introducing competition, the chances of each individual in the population being selected as a parent can be increased, especially for individuals with lower fitness. Furthermore, by adjusting the tournament size, selection pressure and diversity can be flexibly balanced to control the algorithm's convergence speed and the degree of population diversity.
[0201] Breeding procedures:
[0202] 1) When the random value (0-1) is greater than the crossover probability of 0.5, a breeding operation is performed.
[0203] 2) Within the layout positioning, randomly select a group of components, cut and shift them to the end, and then keep the original layer quantity setting to swap the order of the fuse boxes in the two layouts.
[0204] Mutation operation:
[0205] 1) When the random value (0-1) is greater than the mutation probability of 0.5, a mutation operation is performed;
[0206] 2) During the mutation operation, when the random value (0-1) of each element in the layer is greater than the mutation probability of 0.5, an internal mutation occurs (internal mutation refers to randomly sorting the components in the layout layer); otherwise, no operation is performed on the current layer.
[0207] Step 2.2.3, Pin Layout and Positioning
[0208] Based on the component layout and pin connections, calculate the optimal pin positions on the components:
[0209] 1) Using the component layout and positioning in step 2.2.2, the pin connection relationship is calculated using a force-guided algorithm to determine the magnitude of the traction force on each pin and whether the pin position is set above or below the component graphic.
[0210] When using a force-oriented algorithm to define the pin connection relationship, the following is included: (The traction force formula is then defined.)
[0211] Traction force = 1 / (distance between the coordinate points at both ends of the line) * 2
[0212] Steps to calculate traction force: For each pin, calculate the distance between it and other pins, and calculate the magnitude of the traction force it experiences according to the traction force formula.
[0213] 2) Using dynamic programming algorithm, calculate the pin order selection on the same side of the component to ensure that the crossover between pins is minimized.
[0214] The dynamic programming algorithm involves substituting the coordinates of the pin at the midpoint of its height within the component into the traction force formula. The sum of the traction force of the pin above the pin coordinate and the sum of the traction force of the pin below the pin coordinate are compared. If the sum of the traction force of the upper component on the pin is greater than the sum of the traction force of the lower component on the pin, then the pin is set as the upper pin; otherwise, it is set as the lower pin.
[0215] Step 2.2.4: Drawing board coordinate transformation
[0216] The actual dimensions of the components (based on the number of pins) and the component spacing are calculated, and all relative positions in the component layout and pin layout are converted into positions in the actual layout. A force-guided layout algorithm between components is then used to fine-tune the actual positions of the components.
[0217] By using a force-guided layout algorithm between pins, we attempt to move the pin positions to obtain more orthogonal connections without turning points.
[0218] Using a connection point position calculation algorithm, the positions directly above or below the pin are traversed to find the position that minimizes the sum of the distances between the connection point and the line connecting the pin (i.e., the horizontal projection of the line). This position is then used as the positioning coordinates of the connection point on the drawing board.
[0219] The algorithm for calculating the location of a connection point involves iterating through the available coordinates of the connecting lines along the path where the connection point is located, calculating the sum of the distances between the line segments of all the connecting lines at which the connection point is located when it is set to these coordinates, and determining the location coordinates of the connection point on the canvas when the sum of the distances is minimized.
[0220] Step 2.3: Automatic drawing generation on the drawing board
[0221] Using JavaScript, the drawing module automatically draws the system schematic on the HTML5 Canvas. The specific rules are as follows:
[0222] 1) The drawing module calls the pin and connection point layout position data obtained in step 2.2, uses the Fabric.js library, and automatically draws the graphic of each element in the system schematic diagram (component frame, pin, connection point, docking plug, etc.) on the canvas according to the preset system schematic diagram element template and the positioning data, and groups each element (the graphic of the element can be moved as a whole when manually optimizing the layout).
[0223] 2) Invoke the correspondence between components and the system schematic, and the pin connection relationship, to calculate the relative position of pins with connection relationships. Match the corresponding connection point relative position path processing algorithm in the connection rules to calculate the path coordinates of the harness direction point. Use the Fabric.js library to automatically draw the harness between pins according to the path coordinates, and add harness-related text information (wire color, wire diameter, configuration code, etc.).
[0224] The system schematic drawing effect of the drawing module is confirmed, and manual intervention can be made for the positioning of elements that can be optimized. Using the API provided by Fabric.js, the system schematic on the canvas is saved or exported as SVG format to complete the drawing of the schematic graphics of each system.
[0225] The algorithm for matching the relative position path of the corresponding connection points in the connection rules includes:
[0226] 1. If either the starting point or the ending point has a terminal facing upwards, then take the smaller of the Y-axis values of the starting and ending points minus the distance of 2 grids as the Y-coordinate of the inflection point. The X-coordinates of the starting and ending points are respectively used as the X-coordinates of the inflection points. Add 2 inflection points between the starting and ending points to connect them.
[0227] 2. Next, determine if either the starting point or the ending point is a grounding point, and if the Y-coordinate of the grounding point is less than the Y-coordinate of the other end plus two grid distances, then take the Y-coordinate of the other end plus two grid distances as the Y-coordinate of the inflection point, and take the X-coordinates of the starting point and the ending point as the X-coordinates of the inflection points respectively. Add two inflection points between the starting point and the ending point to connect them.
[0228] 3. Finally, if the X coordinate of the starting point is not equal to the X coordinate of the ending point, then take the endpoint of the Y-axis coordinates of the starting point and the ending point as the Y coordinate of the inflection point, and take the X coordinates of the starting point and the ending point as the X coordinates of the inflection point respectively. Add two inflection points between the starting point and the ending point to connect them.
[0229] This invention provides an intelligent and efficient method and system for automatically drawing automotive system schematics, which has significant potential value in the field of automotive circuit diagram development. It helps to improve drawing efficiency, quality and maintainability, thus providing an innovative solution for the automotive aftermarket and the field of electronic engineering.
[0230] It should be noted that the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may, for example, be executed synchronously or asynchronously in multiple modules.
[0231] It should be understood that although the above description follows a certain order, these steps are not necessarily executed in that order. Unless otherwise expressly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, some steps in this embodiment may include multiple steps or multiple stages, which are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least a portion of the steps or stages in other steps.
[0232] A second aspect of the present invention is described in [reference 1]. Figure 3 As shown, the present invention also provides an automatic schematic diagram drawing system for automotive systems, comprising:
[0233] System Schematic Drawing Element Confirmation Module: This module confirms the elements required for drawing system schematics, including the system schematic name, functional principle content, and circuit connection relationships. Based on the circuit diagram catalog development standard, this module creates names for each system schematic and analyzes and determines the wiring harness component elements that need to be drawn in each system schematic based on the functional principle content and circuit connection relationships.
[0234] The system schematic diagram auto-drawing module is used to automatically draw system schematic diagrams. It includes the following sub-modules:
[0235] Data parsing module: Used to parse the wiring information and the correspondence between components and the system schematic diagram of the entire vehicle system. By traversing the data with two pointers, the connection relationships are converted into a tree structure. Based on the correspondence between components and the system schematic diagram, the module calculates the possibilities for the layout and arrangement of graphic elements in each system schematic diagram.
[0236] The layout and positioning algorithm preset module presets the system schematic layout, dividing the layout area into different levels (top, middle, and bottom), and sets a component layout evaluation algorithm to calculate the rationality of the component layout. Weight parameters include the weight of connection distances, the weight of component intersections, and the weight of the layer in which the component type is located.
[0237] Component layout and location module: This module uses a genetic algorithm for iterative search to find the optimal solution for component placement. The module includes steps such as population initialization, fitness function, selection operation, reproduction operation, and mutation operation to determine the component layout.
[0238] Pin layout and positioning module: This module calculates the optimal position of pins on components, including using force-guided algorithms and dynamic programming algorithms to determine the pin positions, so as to ensure the best layout of the wiring.
[0239] The drawing board coordinate transformation module calculates the actual dimensions and spacing of components, converting the relative positions in component and pin layout positioning into their actual positions within the layout. It uses force-guided layout algorithms and connection point position calculation algorithms to fine-tune the actual positions of components, ensuring layout accuracy.
[0240] Automatic Drawing Module on HTML5 Canvas: This module uses JavaScript in conjunction with the Fabric.js library to automatically draw various elements of the system schematic on an HTML5 Canvas, including component frames, pins, connection points, and docking plugs. The module also handles drawing connections and adding text information related to wire harnesses to generate a complete system schematic.
[0241] The automatic automotive system schematic diagram drawing system of the present invention is used to execute the automatic automotive system schematic diagram drawing method of the above-described embodiments, and will not be described again here. In the automatic automotive system schematic diagram drawing system of the present invention, the functions of each module work closely together to form a system capable of automatically drawing automotive system schematic diagrams. This system can improve drawing efficiency, ensure consistent drawing quality, and reduce development costs and time.
[0242] A third aspect of the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the method of any of the above embodiments.
[0243] The computer device includes a processor and a memory, and may also include an input system and an output system. The processor, memory, input system, and output system can be connected via a bus or other means. The input system can receive input digital or character information and generate signal inputs related to the automatic drawing of the automotive system schematic. The output system may include display devices such as a screen.
[0244] Memory, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the automatic drawing method for automotive system schematics in this embodiment. Memory may include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created using the automatic drawing method for automotive system schematics, etc. Furthermore, memory may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the local module via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0245] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. This processor is typically used to control the overall operation of a computer device. In this embodiment, the processor is used to run program code stored in memory or process data. In this embodiment, the processors of multiple computer devices execute various server functions and data processing by running non-volatile software programs, instructions, and modules stored in memory, thereby implementing the steps of the automatic schematic drawing method for automotive systems described in the above embodiment.
[0246] It should be understood that, where there is no conflict, all the embodiments, features and advantages described above for the automatic drawing method of automotive system schematic diagrams according to the present invention are equally applicable to the automatic drawing and storage medium of automotive system schematic diagrams according to the present invention.
[0247] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the functionality of various illustrative components, blocks, modules, circuits, and steps has been generally described. Whether this functionality is implemented as software or as hardware depends on the specific application and the design constraints imposed on the system as a whole. Those skilled in the art can implement the functionality in various ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the embodiments disclosed herein.
[0248] Finally, it should be noted that the computer-readable storage medium (e.g., memory) described herein can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. By way of example, and not limitation, non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which can act as external cache memory. By way of example, and not limitation, RAM can be obtained in various forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices disclosed herein are intended to include, but are not limited to, these and other suitable types of memory.
[0249] The various exemplary logic blocks, modules, and circuits described herein can be implemented or performed using the following components designed to perform the functions herein: general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general-purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP, and / or any other such configuration.
[0250] The above are exemplary embodiments disclosed in this invention. However, it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of this invention as defined by the claims. The functions, steps, and / or actions of the methods according to the disclosed embodiments described herein do not need to be performed in any particular order. Furthermore, although the elements disclosed in the embodiments of this invention may be described or claimed individually, they may be understood as multiple unless explicitly limited to a singular number.
[0251] It should be understood that, as used herein, the singular form "a" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the associatedly listed items. The embodiment numbers disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0252] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the invention (including the claims) is limited to these examples. Within the framework of the invention, technical features of the above embodiments or different embodiments can be combined, and many other variations of different aspects of the invention exist, which are not provided in the details for the sake of brevity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
Claims
1. A method for automatically drawing automotive system schematics, characterized in that, Includes the following steps: Step 1): Determine the drawing elements Based on the predefined correspondence information between wire harness components and system schematic diagrams, the wire harness component elements that need to be drawn for each system schematic diagram are determined. Step 2): Create a drawing module Create a plotting module for data parsing and graph drawing. This plotting module will perform the following operations: Step 2.1): Data Analysis Analyze the wiring information relationships in the vehicle system schematic diagram and the correspondence between wiring harness components and the system schematic diagram; Step 2.2): Preset the layout and arrangement of the system schematic diagram. The layout of the system schematic is preset, the layout area of the system schematic is divided into different levels, the rationality of the component layout is calculated, and the most reasonable component layout is determined based on the calculation results. Step 2.3): Component layout and positioning The optimal component layout is found by using a genetic algorithm for iterative search. Step 2.4): Pin layout and positioning Calculate the optimal position of the pins on the component and determine the pin positions; Step 2.5): Drawing board coordinate transformation Calculate the actual dimensions of the components and the spacing between them, and convert the relative positions in the component layout positioning and pin layout positioning into their actual positions in the layout. Step 2.6): The drawing board automatically generates the drawing. The system automatically draws each element graphic in the system schematic diagram on the drawing board and groups each element graphic; calculates the relative position of the pins and the path coordinates of the wire harness direction points, automatically draws the wire harness between the pins, and adds wire harness-related text information to complete the automatic drawing of the system schematic diagram.
2. The method for automatically drawing automotive system schematic diagrams according to claim 1, characterized in that, Determine the wiring harness component elements required for the system schematic, including: Create a name for each system schematic based on the circuit diagram catalog development standards; Based on the functional principles and circuit connections required to be explained in each system schematic, the relationship between the wire harness components in the system and the system schematic is analyzed and defined, and the wire harness component elements that need to be drawn in each system schematic are determined.
3. The method for automatically drawing automotive system schematic diagrams according to claim 1, characterized in that, The creation of a drawing module for data parsing also includes using two pointers to traverse the data, obtaining the connection relationships between component pins from the wiring information relationship table of the whole vehicle system schematic diagram, and converting the connection relationships into a tree structure.
4. The method for automatically drawing automotive system schematic diagrams according to claim 3, characterized in that, The drawing module has a preset layout positioning algorithm: the drawing module presets a three-layer matrix format for layout, dividing the layout area into: top layer, middle layer and bottom layer; the specific positioning of the components is determined by the matrix coordinate points, and matrix [0][0] represents the lower left corner of the layout; in addition, the rationality of the component layout is calculated by setting a component layout evaluation algorithm.
5. The method for automatically drawing automotive system schematic diagrams according to claim 4, characterized in that, The component layout evaluation algorithm calculates the following weights based on the connection relationships: the weight of the connection distance, the weight of the component intersection, and the weight of the component type's level. The sum of these weights is used as the component layout evaluation value. The lower the evaluation value, the more reasonable the layout effect.
6. The method for automatically drawing automotive system schematic diagrams according to claim 5, characterized in that, The drawing module also employs a genetic algorithm, which iteratively searches through steps such as reproduction, mutation, and selection to find the optimal solution for component layout; and calculates the optimal position of the pins on the components based on the component layout and pin connection relationship.
7. The method for automatically drawing automotive system schematic diagrams according to claim 6, characterized in that, The canvas coordinate transformation includes the following steps: Calculate the actual size and spacing of the components, convert all relative positions in the component layout and pin layout into positions in the actual layout, and fine-tune the actual positions of the components through the force-guided layout algorithm between components. Using a connection point position calculation algorithm, the positions directly above or below the pin are traversed to find the position that minimizes the sum of the distances between the connection point and the pin, which is then used as the positioning coordinates of the connection point on the drawing board.
8. The method for automatically drawing automotive system schematic diagrams according to claim 1, characterized in that, When the drawing board automatically generates diagrams, JavaScript is used to automatically draw the system schematic on the HTML5 Canvas drawing board.
9. The method for automatically drawing automotive system schematics according to claim 8, characterized in that, The automatic drawing generation process on the drawing board includes the following steps: The drawing module calls the obtained pin and connection point layout position data, uses the Fabric.js library, and automatically draws the graphic of each element in the system schematic diagram on the canvas according to the preset system schematic diagram element template and the positioning data, and groups the graphic of each element. The system calls upon the correspondence between components and the system schematic, as well as the pin connection relationships, to calculate the relative positions of pins with connections. It then matches the corresponding connection point relative position path processing algorithm in the connection rules to calculate the path coordinates of the harness direction points. Finally, it uses the Fabric.js library to automatically draw the harness between pins according to the path coordinates and adds relevant text information about the harness. To verify the system schematic drawing effect of the drawing module, use the API provided by Fabric.js to save or export the system schematic on the canvas as SVG format to complete the drawing of the schematic graphics of each system.
10. An automatic schematic diagram drawing system for automotive systems, characterized in that, The method for automatically drawing automotive system schematic diagrams according to any one of claims 1-9, the automotive system schematic diagram automatic drawing system comprising: System schematic drawing element confirmation module: used to confirm the elements required for drawing system schematics. Based on the circuit diagram catalog development standard, the system schematic drawing element confirmation module is used to create the name of each system schematic and analyze and determine the wire harness component elements that need to be drawn in each system schematic based on the functional principle content and circuit connection relationship. The system schematic diagram auto-drawing module is used to automatically draw system schematic diagrams. It includes the following sub-modules: Data parsing module: used to parse the wiring information and the correspondence between components and the system schematic diagram of the whole vehicle system; Layout and positioning algorithm preset module: presets the layout of the system schematic diagram and divides the layout area into different levels; Component layout and positioning module: Used to perform iterative search using a genetic algorithm to find the optimal solution for component layout; Pin layout and positioning module: used to calculate the optimal position of pins on components, including using force-directed algorithms and dynamic programming algorithms to determine the pin positions; Drawing board coordinate transformation module: used to calculate the actual size and spacing of components, and convert the relative positions in component layout positioning and pin layout positioning into the positions in the actual layout; Automatic drawing module on the canvas: This module uses JavaScript scripts in conjunction with the Fabric.js library to automatically draw the various elements of the system schematic on the HTML5 Canvas canvas. It is also used to draw connections and add text information related to wire harnesses to generate a complete system schematic.
Citation Information
Patent Citations
Design method of intelligent wire harness
CN116432592A
Automatic arrangement method for device arrangement diagram
CN116976057A