A virtual space-based vehicle virtual refitting method and system
By identifying the contact and collision relationships of vehicle models in virtual space, generating and optimizing modification sequences, the problem of inaccurate assembly sequences in existing technologies is solved, and efficient virtual vehicle modification is achieved.
Patent Information
- Application Number
- CN202511587346.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-11-03
AI Technical Summary
In existing virtual vehicle modification technologies, the assembly sequence planning is not accurate enough, resulting in long assembly times and low efficiency.
By acquiring initial vehicle and modification part models, contact recognition and collision modeling are performed to generate contact and collision matrices, output modification sequences, and optimize the sequences using particle swarm optimization to obtain the final modification sequence, ensuring the accuracy and efficiency of assembly.
It significantly improves the speed and accuracy of assembly sequence planning, shortens the overall assembly time, and increases assembly efficiency.
Smart Images

Figure CN121052144B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of vehicle virtual modification, and particularly relates to a vehicle virtual modification method and system based on virtual space. BACKGROUND
[0002] With the development of modernization, the manufacturing industry has undergone a revolutionary change due to computer networking, so the core competitiveness of manufacturing enterprises at the present stage lies in how to complete the process of vehicle modification parts from structural design, production and processing to final assembly forming with low cycle, high efficiency, low cost and high precision. Modification assembly is an important link of modified vehicles and is also the most important link. It not only accounts for more than 40% of the production cost in the production process, but also becomes the key technology restricting production efficiency, and bears the decisive role of the quality of the modified vehicle. Therefore, how to improve the assembly performance of the product, improve the assembly quality and assembly precision of the product has always been a research direction that is highly valued and deeply developed in the manufacturing field, and virtual manufacturing, virtual assembly and other technologies and modes integrating computer technology development have emerged as the times require.
[0003] Virtual assembly is a virtual manufacturing technology based on virtual reality technology. After a virtual assembly environment is built by computer software, users can interact with virtual parts in the environment through handles and other operating devices, and use collision detection, dynamics analysis and assembly motion guidance to perform assembly design and simulation analysis of products. Assembly sequence planning mainly uses the assembly constraint information of the existing complex assembly body to solve the assembly sequence, and at the same time, with the help of low-cost simulation technology and high-efficiency optimization performance of virtual assembly, technical personnel can discover possible conflicts and defects in assembly at an early stage of modified vehicle product research and development, and timely feedback assembly problems, modify assembly design, and improve assembly process, to provide correct assembly reference for assembly personnel, improve assembly efficiency, reduce assembly error rate, and reduce assembly cost.
[0004] For the prior art, virtual assembly technology is widely used in the design and assembly process of modified vehicles, but for the existing virtual modification of vehicles, the assembly sequence planned is not accurate enough, which affects the actual assembly process, and at the same time, it only performs linear planning without considering the actual assembly situation, resulting in a long assembly time. SUMMARY
[0005] In order to solve the above technical problems, the present application provides a vehicle virtual modification method and system based on virtual space, which is used to solve the technical problems in the prior art.
[0006] In a first aspect, the present application provides the following technical solution, a vehicle virtual modification method based on virtual space, comprising:
[0007] acquire an initial vehicle model file and a modification part model file and import the initial vehicle model and the modification part model into a virtual space to obtain an initial vehicle model and a modification part model;
[0008] perform contact identification based on the modification part model to obtain a contact matrix, perform collision modeling on the modification part model to obtain a collision detection model, and perform collision information acquisition based on the collision detection model to obtain a collision matrix;
[0009] output a modification sequence for the modification part model based on the contact matrix and the collision matrix to obtain a target modification sequence;
[0010] perform sequence parallel optimization on the target modification sequence to obtain a final modification sequence, and assemble the modification part model to the initial vehicle model based on the final modification sequence to complete virtual modification of the vehicle.
[0011] Compared with the prior art, the present application has the beneficial effects that: the present application firstly acquires an initial vehicle model file and a modification part model file and imports the initial vehicle model and the modification part model into a virtual space to obtain an initial vehicle model and a modification part model; then performs contact identification based on the modification part model to obtain a contact matrix, performs collision modeling on the modification part model to obtain a collision detection model, and performs collision information acquisition based on the collision detection model to obtain a collision matrix; then outputs a modification sequence for the modification part model based on the contact matrix and the collision matrix to obtain a target modification sequence; and finally performs sequence parallel optimization on the target modification sequence to obtain a final modification sequence, and assembles the modification part model to the initial vehicle model based on the final modification sequence to complete virtual modification of the vehicle. The present application firstly plans to obtain a target modification sequence, which can avoid falling into a local optimum condition, can significantly improve the speed of sequence planning and can improve the accuracy of sequence output. Then parallel optimization is performed, which can effectively shorten the overall assembly time and significantly improve the assembly efficiency.
[0012] Preferably, the step of performing contact identification based on the modification part model to obtain a contact matrix comprises:
[0013] identifying an assembly correlation relationship between the modification part models, judging whether there is a contact relationship between the modification part models based on the assembly correlation relationship, if there is a contact relationship between modification part model A and modification part model B, then the element of the A-th row and the B-th row in the contact matrix is 1, if there is no contact relationship between modification part model A and modification part model B, then the element of the A-th row and the B-th row in the contact matrix is 0, to output the contact matrix.
[0014] Preferably, the step of performing collision modeling on the modification part model to obtain a collision detection model comprises:
[0015] extracting a triangle mesh set from the modification part model according to the model composition of the modification part model in the virtual space, extracting a plurality of triangular facets from the triangle mesh set;
[0016] identifying vertices and triangular edges of the triangular facets, taking two triangular edges as split edges, and taking another triangular edge as a reference edge;
[0017] equally dividing the split edges by a preset equal division distance to form a plurality of first split points equally distributed on the split edges;
[0018] correspondingly connecting the first split points on the two split edges to obtain a plurality of parallel edges parallel to the reference edge, and equally dividing the parallel edges by the preset equal division distance to form a plurality of second split points equally distributed on the parallel edges;
[0019] storing the first split points, the vertices of the triangular facets, and the second split points in a target point set, constructing a plurality of target cubes with the points in the target point set as centers and the preset equal division distance as edge length, and combining the target cubes with the modification part model to obtain a collision detection model.
[0020] Preferably, the step of obtaining collision information based on the collision detection model to obtain a collision matrix comprises:
[0021] determining whether there is a collision interference relationship between the collision detection models according to a preset detection method in the virtual space, if there is a collision interference relationship between collision detection model A and collision detection model B, the element of the A row and the B row in the collision matrix is 1, if there is no collision interference relationship between collision detection model A and collision detection model B, the element of the A row and the B row in the collision matrix is 0, and the collision matrix is output.
[0022] Preferably, the step of outputting a target modification sequence based on the contact matrix and the collision matrix to the modification part model comprises:
[0023] arranging the serial number of the modification part model in an integer arrangement code as a chromosome gene, and randomly outputting a chromosome population;
[0024] judging and adjusting the sequence of each individual in the chromosome population according to the contact matrix and the collision matrix to output an adjusted chromosome population;
[0025] calculating the fitness value of each individual in the adjusted chromosome population :
[0026] ;
[0027] wherein, are respectively a first weight, a second weight, are respectively a first score and a second score;
[0028] According to the fitness value, a population optimal sequence and an individual optimal sequence are determined, and a particle swarm algorithm is used to perform a crossover operation on the individual sequence of the offspring and the individual optimal sequence of the parent to obtain a first crossover chromosome sequence;
[0029] A chromosome acceptance probability of the first crossover chromosome sequence is calculated , and the first crossover chromosome sequence is selectively accepted according to the chromosome acceptance probability of the first crossover chromosome sequence to obtain a first accepted sequence:
[0030] ; ;
[0031] wherein, is a fitness difference between the sequence after the crossover and the sequence before the crossover, is a current iteration temperature, is a cooling coefficient, is an iteration round, is an initial temperature;
[0032] The first accepted sequence and the population optimal sequence are subjected to a crossover operation to obtain a second crossover chromosome sequence, a chromosome acceptance probability of the second crossover chromosome sequence is calculated, and the second crossover chromosome sequence is selectively accepted according to the chromosome acceptance probability of the second crossover chromosome sequence to obtain a second accepted sequence;
[0033] The second accepted sequence is subjected to a mutation operation to obtain a mutated chromosome sequence, a chromosome acceptance probability of the mutated chromosome sequence is calculated, and the mutated chromosome sequence is selectively accepted according to the chromosome acceptance probability of the mutated chromosome sequence to obtain a third accepted sequence;
[0034] The fitness of the third accepted sequence is calculated, and the population optimal sequence and the individual optimal sequence are updated according to the fitness of the third accepted sequence;
[0035] The crossover, mutation and sequence updating processes are iteratively repeated until the current iteration temperature is less than a preset target temperature, and the individual optimal sequence after the last iteration is output to obtain a target modification sequence.
[0036] Preferably, the step of performing sequence superiority judgment and sequence superiority adjustment on the chromosome sequence of each individual in the chromosome population according to the contact matrix and the collision matrix to output an adjusted chromosome population comprises:
[0037] judging whether the values of the two modified part models C and D in the chromosome sequence of the individual in the chromosome population in the contact matrix are 1, if the values of the two modified part models C and D in the chromosome sequence of the individual in the chromosome population in the contact matrix are not 1, sequence superiority adjustment is not needed, if the values of the two modified part models C and D in the chromosome sequence of the individual in the chromosome population in the contact matrix are 1, judging whether the values of the two modified part models C and D in the chromosome sequence of the individual in the chromosome population in the collision matrix are 1, if the values of the two modified part models C and D in the chromosome sequence of the individual in the chromosome population in the collision matrix are 1, the arrangement position of the modified part model C is placed before the arrangement position of the modified part model D, if the values of the two modified part models C and D in the chromosome sequence of the individual in the chromosome population in the collision matrix are not 1, the arrangement position of the modified part model C is placed after the arrangement position of the modified part model D, and the sequence superiority judgment and sequence superiority adjustment process is repeatedly performed to output an adjusted chromosome population.
[0038] Preferably, the step of performing sequence parallel optimization on the target modification sequence to obtain a final modification sequence comprises:
[0039] identifying the assembly priority relationship of each modified part model in the target modification sequence based on the target modification sequence, the contact matrix and the collision matrix to obtain an assembly matrix, wherein if there is an assembly priority relationship between the modified part model A and the modified part model B, the element of the A-th row and the B-th row in the assembly matrix is 1, if there is no assembly priority relationship between the modified part model A and the modified part model B, the element of the A-th row and the B-th row in the assembly matrix is 0;
[0040] taking the modified part model with column elements of 0 in the assembly matrix as a basic modified part, and storing the basic modified part with a remaining assembly time greater than 0 in a target modified part set;
[0041] judging whether the number of basic modified parts in the target modified part set is greater than a parallel degree threshold value, and then calculating the assembly score of each basic modified part in the target modified part set :
[0042] ;
[0043] ;
[0044] wherein, respectively represent the first and second assembly weights, the first step the first step the evaluation value of the first step respectively represent the assembly time of the base modification part the maximum assembly time of the base modification part in the first step the maximum assembly time of the base modification part in the first step the maximum assembly time of the base modification part in the first step the maximum assembly time of the base modification part in the first step the maximum assembly time of the base modification part in the first step
[0045] The first step The first step The first step The first step The first step The first step
[0046] The first step The first step The first step The first step The first step
[0047] The first step The first step The first step
[0048] The first step The first step The first step The first step The first step
[0049] The first step The first step The first step The first step
[0050] The first step The first step
[0051] The first step The first step
[0052] The first step The first step
[0053] a sequence module, configured to perform a retrofit sequence output on the retrofit part model based on the contact matrix and the collision matrix to obtain a target retrofit sequence;
[0054] an optimization module, configured to perform sequence parallel optimization on the target retrofit sequence to obtain a final retrofit sequence, and assemble the retrofit part model to the initial vehicle model based on the final retrofit sequence to complete virtual retrofit of the vehicle.
[0055] In a third aspect, the present application provides a computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the virtual space-based vehicle virtual retrofit method as described above when executing the computer program.
[0056] In a fourth aspect, the present application provides a storage medium, and the storage medium stores a computer program, and the computer program is executable on a processor to implement the virtual space-based vehicle virtual retrofit method as described above. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0058] Figure 1 a flow chart of the virtual space-based vehicle virtual retrofit method provided by the first embodiment of the present application;
[0059] Figure 2 a structural block diagram of the virtual space-based vehicle virtual retrofit system provided by the second embodiment of the present application;
[0060] Figure 3 a hardware structure schematic diagram of the computer provided by another embodiment of the present application.
[0061] The embodiments of the present application will be further described below with reference to the drawings. DETAILED DESCRIPTION
[0062] The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are intended to explain the embodiments of the present application, and cannot be understood as a limitation of the present application.
[0063] Embodiment one
[0064] In an embodiment one of the present application, as shown in Figure 1 A virtual vehicle modification method based on virtual space, comprising:
[0065] S1, obtaining an initial vehicle model file and a modification part model file and importing the initial vehicle model and the modification part model into a virtual space to obtain an initial vehicle model and a modification part model;
[0066] Specifically, the virtual space here specifically refers to the virtual space in Unity3D software, and the initial vehicle model file and the modification part model file are specifically files that can be recognized by the virtual space. The initial vehicle model file specifically refers to the basic vehicle to be modified. By adding different modification parts to the basic vehicle, the modification process of the vehicle can be realized.
[0067] S2, contact recognition based on the modification part model to obtain a contact matrix, collision modeling of the modification part model to obtain a collision detection model, and collision information acquisition based on the collision detection model to obtain a collision matrix;
[0068] The step of contact recognition based on the modification part model to obtain a contact matrix comprises:
[0069] Identifying the assembly association relationship between the modification part models, judging whether there is a contact relationship between the modification part models based on the assembly association relationship, if there is a contact relationship between the modification part model A and the modification part model B, the element of the A row and the B row in the contact matrix is 1, if there is no contact relationship between the modification part model A and the modification part model B, the element of the A row and the B row in the contact matrix is 0, to output the contact matrix;
[0070] Specifically, the contact matrix is used to represent the contact relationship of a modification part with other modification parts in the entire assembly, which mainly improves the priority constraint relationship between the modification parts through the assembly association diagram of the product.
[0071] The step of collision modeling of the modification part model to obtain a collision detection model comprises:
[0072] S221, extracting a triangular mesh set from the modification part model according to the model composition of the modification part model in the virtual space, and extracting a plurality of triangular facets from the triangular mesh set;
[0073] Specifically, since in the Unity3D software, each physical model has MeshRenderer (mesh renderer) and MeshFilter (mesh filter) two components. The MeshRenderer component is mainly used to fill and map the mesh surface of the model, thereby generating an entity; the MeshFilter component is used to load the Mesh grid to build the overall framework of the solid model, and the Mesh grid of each solid model mainly includes the following attributes: vertex array (Vertex), normal (Normal), texture coordinate (UV) and triangle index array (Triangle), so it can be known that for the modification part model, it can be regarded as being jointed by a plurality of triangular facets, so in the present application, the construction of the collision detection model is completed by the target cube accumulation method.
[0074] S222, identify the vertices and triangular edges of the triangular facet, take two triangular edges as split edges, and take another triangular edge as a reference edge;
[0075] Specifically, the split edge and the reference edge here can be arbitrarily selected, but need to be selected in the same triangular facet.
[0076] S223, the split edge is equally divided by a preset equal division distance to form a plurality of equally spaced first split points on the split edge;
[0077] Specifically, in the present application, the smaller the preset equal division distance, the higher the progress of the collision detection model obtained finally, so the preset equal division distance here can be determined according to the size of the model.
[0078] S224, the first split points on the two split edges are connected one by one to obtain a plurality of parallel edges parallel to the reference edge, the parallel edges are equally divided by the preset equal division distance to form a plurality of equally spaced second split points on the parallel edges.
[0079] S225, the first split points, the vertices of the triangular facet and the second split points are stored in a target point set, a plurality of target cubes are constructed with the points in the target point set as the center and the preset equal division distance as the edge length, the target cubes are combined with the modification part model to obtain a collision detection model.
[0080] The step of obtaining a collision matrix based on the collision detection model includes:
[0081] determining whether there is a collision interference relationship between the collision detection models according to a preset detection method in the virtual space, if there is a collision interference relationship between the collision detection model A and the collision detection model B, the element of the A row and the B row in the collision matrix is 1, if there is no collision interference relationship between the collision detection model A and the collision detection model B, the element of the A row and the B row in the collision matrix is 0, to output the collision matrix;
[0082] Specifically, the preset detection method here is a built-in collision detection method in Unity3D software.
[0083] S3, outputting a target modification sequence based on the contact matrix and the collision matrix.
[0084] The step S3 comprises:
[0085] S31, taking the serial number of the modification part model as a chromosome gene in an integer permutation coding manner, and randomly outputting a chromosome population.
[0086] S32, judging and adjusting the sequence of each individual in the chromosome population according to the contact matrix and the collision matrix, to output an adjusted chromosome population.
[0087] The step S32 comprises:
[0088] determining whether the value of the two modification part models C and D in the contact matrix is 1, if the value of the two modification part models C and D in the contact matrix is not 1, the sequence judgment and adjustment is not needed, if the value of the two modification part models C and D in the contact matrix is 1, determining whether the value of the two modification part models C and D in the collision matrix is 1, if the value of the two modification part models C and D in the collision matrix is 1, the permutation position of the modification part model C is placed before the permutation position of the modification part model D, if the value of the two modification part models C and D in the collision matrix is not 1, the permutation position of the modification part model C is placed after the permutation position of the modification part model D, the sequence judgment and adjustment process is repeated to output the adjusted chromosome population.
[0089] Specifically, the two retrofit models C and D are adjacent in the original chromosome sequence, that is, if the value of C and D in the contact matrix is not 1, it indicates that there is no contact relationship between the two parts, and therefore the positions of C and D do not need to be adjusted and can be adjusted arbitrarily. However, in order to reduce the amount of calculation, it is set that no adjustment is needed if the value of the two retrofit models C and D in the collision matrix is 1, which indicates that C needs to be assembled before D, and if the value of the two retrofit models C and D in the collision matrix is not 1, which indicates that C needs to be assembled after D.
[0090] S33, calculate the fitness value of each individual in the adjusted chromosome population :
[0091] ;
[0092] wherein, are a first weight and a second weight, respectively, are a first score and a second score, respectively;
[0093] Specifically, the first weight and the second weight are both 0.5, the first score is specifically an assembly direction consistency score, that is, there are six degrees of freedom of assembly direction in the virtual space, if the assembly direction of the latter part is the same as that of the former part, the score of the part is 1, otherwise it is 10, and the scores of the entire sequence are added to obtain the first score, and similarly, the second score is specifically an assembly tool consistency score, if the assembly tool of the latter part is the same as that of the former part, the score of the part is 1, otherwise it is 10, and the scores of the entire sequence are added to obtain the second score.
[0094] S34, determine the population optimal sequence and the individual optimal sequence according to the fitness value, and perform a crossover operation on the individual sequence of the offspring and the individual optimal sequence of the parent by using a particle swarm algorithm to obtain a first crossover chromosome sequence.
[0095] S35, calculate the chromosome acceptance probability of the first crossover chromosome sequence , and the first crossover chromosome sequence is selectively accepted according to the chromosome acceptance probability of the first crossover chromosome sequence to obtain a first accepted sequence:
[0096] ; ;
[0097] wherein, is a fitness difference value between the sequence after the crossover and the sequence before the crossover, is a current iteration temperature, is a cooling coefficient, for the iteration round, for an initial temperature;
[0098] Specifically, in the present application, the annealing operation is combined with the genetic algorithm, that is, in the process of each iteration, the initial temperature is lowered by a cooling coefficient, and when the temperature is lowered to a certain extent, the iteration is stopped.
[0099] S36, cross the first accepted sequence with the population optimal sequence to obtain a second cross chromosome sequence, calculate the chromosome acceptance probability of the second cross chromosome sequence and selectively accept the second cross chromosome sequence according to the chromosome acceptance probability of the second cross chromosome sequence to obtain a second accepted sequence.
[0100] Specifically, the cross operation here is also processed by the particle swarm algorithm, which allows the offspring individual to cross with the parent individual optimal chromosome sequence and the population optimal chromosome sequence, thereby passing on excellent chromosome fragments to the next generation and improving the optimization speed.
[0101] S37, perform mutation operation on the second accepted sequence to obtain a mutation chromosome sequence, calculate the chromosome acceptance probability of the mutation chromosome sequence and selectively accept the mutation chromosome sequence according to the chromosome acceptance probability of the mutation chromosome sequence to obtain a third accepted sequence.
[0102] S38, calculate the fitness of the third accepted sequence, and update the population optimal sequence and the individual optimal sequence according to the fitness of the third accepted sequence.
[0103] S39, iteratively repeat the cross, mutation and sequence updating process until the current iteration temperature is less than the preset target temperature, output the individual optimal sequence after the last iteration to obtain a target modification sequence.
[0104] S4, perform sequence parallel optimization on the target modification sequence to obtain a final modification sequence, and assemble the modification part model to the initial vehicle model based on the final modification sequence to complete the virtual modification of the vehicle.
[0105] The step S4 includes:
[0106] S41, identify the assembly priority relationship of each modification part model in the target modification sequence based on the target modification sequence, the contact matrix and the collision matrix to obtain an assembly matrix, wherein if there is an assembly priority relationship between modification part model A and modification part model B, the element of the A row and the B row in the assembly matrix is 1, and if there is no assembly priority relationship between modification part model A and modification part model B, the element of the A row and the B row in the assembly matrix is 0.
[0107] Specifically, during the assembly process, any modified part may have an assembly priority relationship with other modified parts. Therefore, when performing parallel optimization, it is necessary to prioritize ensuring that the parallel assembly process satisfies the assembly priority relationship between modified parts to ensure the feasibility of the parallel assembly process. If the modified parts in the assembled product need to be assembled in parallel, there should be no assembly priority relationship between the parts that need to be assembled in parallel.
[0108] S42. Use the modified parts model with all column elements of 0 in the assembly matrix as the basic modified parts, and store the basic modified parts with the remaining assembly time greater than 0 into the target modified parts set.
[0109] Specifically, a modification model with a column element of 0 is a modification that does not have an assembly priority relationship, so it needs to be assembled first. The remaining assembly time indicates that the basic modification has not yet been assembled, so parallel planning is required.
[0110] S43. If the number of basic modification parts in the target modification parts set is greater than the parallelism threshold, then calculate the assembly score of each basic modification part in the target modification parts set. :
[0111] ;
[0112] ;
[0113] In the formula, These represent the weights of the first and second assemblies, respectively. For the first Basic modification parts in the assembly process The evaluation value, These represent basic modification parts. Assembly time, first The maximum assembly time for basic modified parts in the assembly process. Indicates the first Basic modification parts Assembly not yet complete;
[0114] Specifically, in the actual assembly process, the number of parts that can be assembled at the same time during parallel assembly is often limited due to the limitation of assembly capacity. Based on the maximum assembly capacity of the assembly team, the number of parts that can be assembled at the same time during the assembly process, i.e., the parallelism threshold, is set, and the first assembly weight and the second assembly weight are both 0.5.
[0115] If the number of basic modification parts derived from the assembly matrix exceeds the parallelism threshold during the q-th assembly step, then several parts need to be selected from the target modification part set for assembly. The number of parts selected here is the same as the parallelism threshold. When selecting, priority is given to assembling basic modification parts that have not been assembled in the previous step and those with shorter assembly time.
[0116] S44. Select the top few basic modification parts with the highest assembly scores from the target modification parts set and store them in the next... The assembly set of the step and the first The minimum assembly time for the basic modified parts in the first assembly step is taken as the first step. Assembly time of step ;
[0117] Specifically, the assembly set records the parallel assembly steps of the basic modification parts, while the assembly time records the assembly time required for each assembly step.
[0118] S45, based on the first Assembly time of step Update the remaining assembly time to obtain the updated remaining assembly time. :
[0119] ;
[0120] In the formula, For the first Basic modification parts in the assembly process The initial remaining assembly time;
[0121] Specifically, the remaining assembly time is used to record the remaining installation time required to complete the assembly of the basic modification component.
[0122] S46. Determine if the remaining update time for the assembly is greater than 0. If the remaining update time for the assembly is not greater than 0, then update the basic modification parts in the assembly matrix. Set the corresponding row element to 0 and output the first row. The assembly set of each step is repeatedly subjected to sequential parallel optimization on the basic modification parts of each step until all elements in the assembly matrix are 0, so as to output the final modification sequence.
[0123] Specifically, if the time taken to update the remaining assembly is greater than 0, the next basic modification part is selected and step S45 is executed again. When all elements in the assembly matrix corresponding to the assembly set of a time step are 0, the corresponding assembly set is recorded, and the assembly order of step q can be output. If it is not 0, the above steps are executed on the remaining basic modification parts in the target modification set. Then, q = q + 1 and the above steps are repeated to output the complete final modification sequence.
[0124] The virtual vehicle modification method based on virtual space provided in Embodiment 1 of this invention first obtains an initial vehicle model file and a modification part model file, and imports the initial vehicle model and modification part model into a virtual space to obtain the initial vehicle model and modification part model; then, based on the modification part model, contact recognition is performed to obtain a contact matrix, and collision modeling is performed on the modification part model to obtain a collision detection model, and collision information is acquired based on the collision detection model to obtain a collision matrix; then, based on the contact matrix and collision matrix, a modification sequence is output for the modification part model to obtain a target modification sequence; finally, the target modification sequence is optimized in parallel to obtain a final modification sequence, and based on the final modification sequence, the modification part model is assembled onto the initial vehicle model to complete the virtual vehicle modification. This invention first plans the target modification sequence, which can avoid getting trapped in local optima, significantly improve the speed of sequence planning and the accuracy of sequence output, and then performs parallel optimization, which can effectively shorten the overall assembly time and greatly improve the assembly efficiency.
[0125] Example 2
[0126] like Figure 2 As shown, in Embodiment 2 of the present invention, a vehicle virtual modification system based on virtual space is provided, the system comprising:
[0127] Model module 1 is used to obtain the initial vehicle model file and the modification part model file, and import the initial vehicle model and the modification part model into the virtual space to obtain the initial vehicle model and the modification part model;
[0128] The identification module 2 is used to perform contact identification based on the modified part model to obtain a contact matrix, perform collision modeling on the modified part model to obtain a collision detection model, and acquire collision information based on the collision detection model to obtain a collision matrix.
[0129] Sequence module 3 is used to output a modification sequence for the modified part model based on the contact matrix and the collision matrix, so as to obtain the target modification sequence;
[0130] Optimization module 4 is used to perform sequence parallel optimization on the target modification sequence to obtain the final modification sequence, and to assemble the modification part model onto the initial vehicle model based on the final modification sequence to complete the virtual modification of the vehicle.
[0131] The identification module 2 is used for:
[0132] Identify the assembly relationship between the modification models, determine whether there is a contact relationship between the modification models based on the assembly relationship, if there is a contact relationship between modification model A and modification model B, the element of the A row and the B row in the contact matrix is 1, if there is no contact relationship between modification model A and modification model B, the element of the A row and the B row in the contact matrix is 0, to output the contact matrix.
[0133] The identification module 2 is used to include:
[0134] The extraction submodule is used to extract a set of triangular meshes from the modification model according to the model composition of the modification model in the virtual space, and extract a plurality of triangular facets from the set of triangular meshes;
[0135] The identification submodule is used to identify the vertices and triangular edges of the triangular facet, take two triangular edges as split edges, and take another triangular edge as a reference edge;
[0136] The splitting submodule is used to divide the split edges by a preset equal division distance to form a plurality of equally spaced first split points on the split edges;
[0137] The connection submodule is used to one-to-one connect the first split points on the two split edges to obtain a plurality of parallel edges parallel to the reference edge, and divide the parallel edges by the preset equal division distance to form a plurality of equally spaced second split points on the parallel edges;
[0138] The combination submodule is used to store the first split points, the vertices of the triangular facet, and the second split points in a target point set, construct a plurality of target cubes with the target points in the target point set as the center and the preset equal division distance as the edge length, and combine the target cubes with the modification model to obtain a collision detection model.
[0139] The identification module 2 is used to:
[0140] Determine whether there is a collision interference relationship between the collision detection models according to a preset detection method in the virtual space, if there is a collision interference relationship between collision detection model A and collision detection model B, the element of the A row and the B row in the collision matrix is 1, if there is no collision interference relationship between collision detection model A and collision detection model B, the element of the A row and the B row in the collision matrix is 0, to output the collision matrix.
[0141] The sequence module includes:
[0142] The gene submodule is used to take the serial number of the modification model as a chromosome gene in an integer permutation coding manner, and randomly output a chromosome population;
[0143] The adjustment submodule is used to judge the sequence quality of each individual in the chromosome population and adjust the sequence quality according to the contact matrix and the collision matrix, so as to output the adjusted chromosome population.
[0144] The computational submodule is used to calculate the fitness value of each individual in the adjusted chromosome population. :
[0145] ;
[0146] In the formula, These are the first weight and the second weight, respectively. These are the first and second points, respectively;
[0147] The first crossover submodule is used to determine the population optimal sequence and the individual optimal sequence based on the fitness value, and to perform a crossover operation between the individual sequence of the offspring and the individual optimal sequence of the parent generation using the particle swarm optimization algorithm to obtain the first crossover chromosome sequence.
[0148] The first accepting submodule is used to calculate the chromosome acceptance probability of the first crossed chromosome sequence. and based on the chromosome acceptance probability of the first crossing chromosome sequence. Selectively accept the first crossed chromosome sequence to obtain the first accepted sequence:
[0149] ; ;
[0150] In the formula, The fitness difference between the sequence after crossover and the sequence before crossover. The temperature at the current iteration. The coefficient of performance is the cooling factor. For iteration rounds, The initial temperature;
[0151] The second crossover submodule is used to perform a crossover operation between the first accepted sequence and the population optimal sequence to obtain a second crossover chromosome sequence, calculate the chromosome acceptance probability of the second crossover chromosome sequence and selectively accept the second crossover chromosome sequence based on the chromosome acceptance probability of the second crossover chromosome sequence to obtain a second accepted sequence.
[0152] The second receiving submodule is used to perform mutation operations on the second receiving sequence to obtain a mutated chromosome sequence, calculate the chromosome acceptance probability of the mutated chromosome sequence, and selectively accept the mutated chromosome sequence according to the chromosome acceptance probability of the mutated chromosome sequence to obtain a third receiving sequence.
[0153] The updating submodule is configured to calculate fitness of the third accepted sequence, and update the population optimal sequence and the individual optimal sequence according to the fitness of the third accepted sequence.
[0154] The iteration submodule is configured to iteratively repeat the crossover, mutation and sequence updating process until the current iteration temperature is less than the preset target temperature, to output the individual optimal sequence after the last iteration, and to obtain the target modification sequence.
[0155] The adjusting submodule is configured to:
[0156] If the values of the two modification part models C and D in the chromosome sequence of the individual in the chromosome population in the contact matrix are not 1, the sequence advantage adjustment is not needed; if the values of the two modification part models C and D in the chromosome sequence of the individual in the chromosome population in the contact matrix are 1, it is judged whether the values of the two modification part models C and D in the chromosome sequence of the individual in the chromosome population in the collision matrix are 1; if the values of the two modification part models C and D in the chromosome sequence of the individual in the chromosome population in the collision matrix are 1, the arrangement position of the modification part model C is placed before the arrangement position of the modification part model D; if the values of the two modification part models C and D in the chromosome sequence of the individual in the chromosome population in the collision matrix are not 1, the arrangement position of the modification part model C is placed after the arrangement position of the modification part model D; the sequence advantage judgment and the sequence advantage adjustment process are repeatedly executed to output the adjusted chromosome population.
[0157] The optimization module includes:
[0158] The priority submodule is configured to identify assembly priority relationships of each modification part model in the target modification sequence based on the target modification sequence, the contact matrix and the collision matrix to obtain an assembly matrix, wherein if there is an assembly priority relationship between a modification part model A and a modification part model B, the element of the A-th row and the B-th row in the assembly matrix is 1; if there is no assembly priority relationship between the modification part model A and the modification part model B, the element of the A-th row and the B-th row in the assembly matrix is 0.
[0159] The basic submodule is configured to store the modification part models with column elements of 0 in the assembly matrix as basic modification parts, and store the basic modification parts with remaining assembly time greater than 0 in a target modification part set.
[0160] The scoring submodule is configured to judge whether the number of the basic modification parts in the target modification part set is greater than a parallelism threshold value, and calculate assembly scores of each basic modification part in the target modification part set if the number of the basic modification parts in the target modification part set is greater than the parallelism threshold value.
[0161] ;
[0162] ;
[0163] In the formula, These represent the weights of the first and second assemblies, respectively. For the first Basic modification parts in the assembly process The evaluation value, These represent basic modification parts. Assembly time, first The maximum assembly time for basic modified parts in the assembly process. Indicates the first Basic modification parts Assembly not yet complete;
[0164] The timing submodule is used to select the top few basic modification parts with the highest assembly scores from the target modification parts set and store them in the first... The assembly set of the step and the first The minimum assembly time for the basic modified parts in the first assembly step is taken as the first step. Assembly time of step ;
[0165] The time-update submodule is used to update based on the first... Assembly time of step Update the remaining assembly time to obtain the updated remaining assembly time. :
[0166] ;
[0167] In the formula, For the first Basic modification parts in the assembly process The initial remaining assembly time;
[0168] The iterative optimization submodule is used to determine whether the time required to update the remaining assembly is greater than 0. If the time required to update the remaining assembly is not greater than 0, then the basic modification parts in the assembly matrix are added. Set the corresponding row element to 0 and output the first row. The assembly set of each step is repeatedly subjected to sequential parallel optimization on the basic modification parts of each step until all elements in the assembly matrix are 0, so as to output the final modification sequence.
[0169] In other embodiments of the present invention, the present invention provides the following technical solution: a computer, including a memory 102, a processor 101, and a computer program stored in the memory 102 and executable on the processor 101, wherein the processor 101 executes the computer program to implement the vehicle virtual modification method based on virtual space as described above.
[0170] In particular, the processor 101 can include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement one or more embodiments of the present application.
[0171] The memory 102 can include mass storage for data or instructions. By way of example, and not limitation, the memory 102 can include a Hard Disk Drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash drive, a Compact Disk Read Only Memory (CD-ROM), a Digital Versatile Disk (DVD), a Blu-ray disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. The memory 102 can be removable and / or non-removable (or fixed) as appropriate. The memory 102 can be internal or external as appropriate. In certain embodiments, the memory 102 is a non-volatile memory. In certain embodiments, the memory 102 includes a Read-Only Memory (ROM) and a Random Access Memory (RAM). The ROM can be a mask-programmed ROM, a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), an Electrically Alterable ROM (EAROM), or a FLASH memory, or a combination of two or more of these, as appropriate. The RAM can be a Static Random-Access Memory (SRAM) or a Dynamic Random Access Memory (DRAM), which can be a Fast Page Mode Dynamic Random Access Memory (FPMDRAM), an Extended Data Output Dynamic Random Access Memory (EDODRAM), a Synchronous Dynamic Random-Access Memory (SDRAM), or the like, as appropriate.
[0172] The memory 102 can be used to store or buffer various data files needed for processing and / or communication, and possible computer program instructions executed by the processor 101.
[0173] The processor 101 realizes the above-mentioned virtual space-based vehicle virtual refitting method by reading and executing the computer program instructions stored in the memory 102.
[0174] In some embodiments, the computer can further include a communication interface 103 and a bus 100. In which, as shown in the figure, the processor 101, the memory 102, the communication interface 103 are connected through the bus 100 and complete the communication between each other. Figure 3
[0175] The communication interface 103 is used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application. The communication interface 103 can also realize the data communication between other components, such as: external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations, etc.
[0176] Bus 100 includes hardware, software, or both, to couple components of computer device to each other and to couple components of computer device to other devices. Bus 100 includes, but is not limited to, at least one of the following: a data bus, an address bus, a control bus, an expansion bus, a local bus, etc. By way of example and not limitation, bus 100 can include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or another suitable bus or a combination of two or more of these. Where appropriate, bus 100 can include one or more buses. Although the present embodiments describe and show a particular bus, the present embodiments contemplate any suitable bus or interconnect.
[0177] The computer can execute the virtual space-based vehicle virtual refitting method according to the virtual space-based vehicle virtual refitting system to achieve the virtual space-based vehicle virtual refitting.
[0178] In some embodiments of the present application, in combination with the above-mentioned virtual space-based vehicle virtual refitting method, the present embodiments provide the following technical solutions: a storage medium, the storage medium storing a computer program, the computer program being executed by a processor to implement the above-mentioned virtual space-based vehicle virtual refitting method.
[0179] Those skilled in the art will appreciate that the logic and / or steps represented in the flow diagrams, or otherwise described herein, can be embodied in
[0180] More specific examples (a non-exhaustive list) of the computer readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer readable medium can also be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via an optical scanner, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
[0181] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following technologies, known in the art, or combinations thereof, can be employed: a discrete logic circuit having logic gates for implementing logic functions upon an application of data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), and / or the like.
[0182] The technical features of the above-described embodiments can be combined in any manner, and in order to make the description concise, not all possible combinations of the technical features in the above-described embodiments are described, however, as long as the combinations of the technical features do not contradict each other, they should be considered to be within the scope of the present specification.
[0183] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are within the protection scope of the present application. Therefore, the protection scope of the present application patent should be subject to the appended claims.
Claims
1. A virtual vehicle modification method based on a virtual space, characterized by, The method comprises the following steps: acquiring an initial vehicle model file and a modification part model file and importing the initial vehicle model and the modification part model into a virtual space to obtain an initial vehicle model and a modification part model; contact identification based on the modification part model to obtain a contact matrix, collision modeling on the modification part model to obtain a collision detection model, and collision information acquisition based on the collision detection model to obtain a collision matrix; modification sequence outputting of the modification part model based on the contact matrix and the collision matrix to obtain a target modification sequence; sequence parallel optimization of the target modification sequence to obtain a final modification sequence, and modification part model assembly to the initial vehicle model based on the final modification sequence to complete virtual modification of the vehicle; the modification sequence outputting of the modification part model based on the contact matrix and the collision matrix to obtain the target modification sequence comprises the following steps: chromosome gene outputting of the modification part model sequence number in the form of integer permutation coding, and random outputting of a chromosome population; sequence quality judgment and sequence quality adjustment of the chromosome sequence of each individual in the chromosome population according to the contact matrix and the collision matrix, and adjustment chromosome population outputting; calculating a fitness value for each individual in the adjusted chromosome population ; group optimal sequence and individual optimal sequence determination according to the fitness value, and cross operation of the individual sequence of the offspring and the individual optimal sequence of the parent by using a particle swarm algorithm to obtain a first cross chromosome sequence; computing a chromosome acceptance probability for the first crossover chromosome sequence and computing a chromosome acceptance probability for the first crossover chromosome sequence selectively accepting the first crossover chromosome sequence to obtain a first accepted sequence; cross operation of the first accepted sequence and the group optimal sequence to obtain a second cross chromosome sequence, calculation of the chromosome acceptance probability of the second cross chromosome sequence, and selective acceptance of the second cross chromosome sequence according to the chromosome acceptance probability of the second cross chromosome sequence to obtain a second accepted sequence; mutation operation of the second accepted sequence to obtain a mutation chromosome sequence, calculation of the chromosome acceptance probability of the mutation chromosome sequence, and selective acceptance of the mutation chromosome sequence according to the chromosome acceptance probability of the mutation chromosome sequence to obtain a third accepted sequence; fitness calculation of the third accepted sequence, and group optimal sequence and individual optimal sequence updating according to the fitness of the third accepted sequence; iterative repetition of the cross operation, the mutation operation and the sequence updating process until the current iteration temperature is less than a preset target temperature, outputting of the individual optimal sequence after the last iteration to obtain the target modification sequence.
2. The virtual space-based vehicle virtual customization method according to claim 1, characterized by, the contact identification based on the modification part model to obtain the contact matrix comprises the following steps: identification of assembly correlation between the modification part models, judgment of whether there is a contact relationship between the modification part models based on the assembly correlation, if there is a contact relationship between modification part model A and modification part model B, the element of the A-th row and the B-th row in the contact matrix is 1, if there is no contact relationship between modification part model A and modification part model B, the element of the A-th row and the B-th row in the contact matrix is 0, and the contact matrix is outputted.
3. The virtual space-based vehicle virtual customization method according to claim 1, characterized by, the collision modeling on the modification part model to obtain the collision detection model comprises the following steps: extracting a triangle mesh set from the modification part model according to model composition of the modification part model in the virtual space, extracting a plurality of triangular facets from the triangle mesh set; identifying vertices and triangular edges of the triangular facets, taking two triangular edges as split edges, and taking another triangular edge as a reference edge; equally dividing the split edges by a preset equal division distance to form a plurality of first split points equally distributed on the split edges; connecting the first split points on the two split edges one by one to obtain a plurality of parallel edges parallel to the reference edge, and equally dividing the parallel edges by the preset equal division distance to form a plurality of second split points equally distributed on the parallel edges; storing the first split points, the vertices of the triangular facets, and the second split points in a target point set, constructing a plurality of target cubes with the points in the target point set as centers and the preset equal division distance as edge length, and combining the target cubes with the modification part model to obtain a collision detection model.
4. The virtual space-based vehicle virtual customization method according to claim 1, characterized by, The step of obtaining collision information based on the collision detection model to obtain a collision matrix comprises: determining whether there is a collision interference relationship between the collision detection models in the virtual space according to a preset detection method, if there is a collision interference relationship between collision detection model A and collision detection model B, the element of the A row and the B row in the collision matrix is 1, if there is no collision interference relationship between collision detection model A and collision detection model B, the element of the A row and the B row in the collision matrix is 0, and the collision matrix is output.
5. The virtual space-based vehicle virtual customization method according to claim 1, characterized by, The step of judging the advantages and disadvantages of the chromosome sequence of each individual in the chromosome population according to the contact matrix and the collision matrix and adjusting the advantages and disadvantages of the chromosome sequence to output an adjusted chromosome population comprises: determining whether the values of two modification part models C and D in the contact matrix are 1 in the chromosome sequence of the individual in the chromosome population, if the values of two modification part models C and D in the contact matrix are not 1 in the chromosome sequence of the individual in the chromosome population, the advantages and disadvantages of the chromosome sequence do not need to be adjusted, if the values of two modification part models C and D in the contact matrix are 1 in the chromosome sequence of the individual in the chromosome population, determining whether the values of two modification part models C and D in the collision matrix are 1 in the chromosome sequence of the individual in the chromosome population, if the values of two modification part models C and D in the collision matrix are 1 in the chromosome sequence of the individual in the chromosome population, arranging the arrangement position of the modification part model C before the arrangement position of the modification part model D, if the values of two modification part models C and D in the collision matrix are not 1 in the chromosome sequence of the individual in the chromosome population, arranging the arrangement position of the modification part model C after the arrangement position of the modification part model D, and repeating the process of judging the advantages and disadvantages of the chromosome sequence and adjusting the advantages and disadvantages of the chromosome sequence to output an adjusted chromosome population.
6. The virtual space-based vehicle virtual customization method according to claim 1, characterized by, The step of performing sequence parallel optimization on the target modification sequence to obtain a final modification sequence comprises: identify an assembly priority relationship of each modification part model in the target modification sequence based on the target modification sequence, the contact matrix and the collision matrix to obtain an assembly matrix, wherein if there is an assembly priority relationship between modification part model A and modification part model B, an element of an A-th row and a B-th row in the assembly matrix is 1, and if there is no assembly priority relationship between modification part model A and modification part model B, an element of an A-th row and a B-th row in the assembly matrix is 0; store modification parts with a remaining assembly time greater than 0 in the target modification part set as basic modification parts; determining that a number of base modifications in the target modification set is greater than a parallelism threshold, calculating an assembly score for each base modification in the target modification set : ; ; In the formula, respectively represent the first, second assembly weight, is the first step assembly of the base modification piece evaluation value, respectively represent the assembly time of the base modification piece , the maximum assembly time of the base modification piece in the first step assembly, represent the first step base modification piece not assembled; The basic modification parts with the maximum assembly scores in the previous several steps are stored in the assembly set of the first step The minimum assembly time of the basic modification parts in the assembly of the first step is taken as the assembly time of the first step The minimum assembly time of the basic modification parts in the assembly of the first step is taken as the assembly time of the first step The minimum assembly time of the basic modification parts in the assembly of the first step is taken as the assembly time of the first step ; Based on the first assembly time of the step updating the remaining assembly time to obtain an updated remaining assembly time : ; In the formula, is the first Step Assembly of Foundation Retrofit Initial remaining assembly time; determining whether the updated remaining assembly time is greater than 0, and if the updated remaining assembly time is not greater than 0, setting the element in the assembly matrix corresponding to the base rework item to 0 and outputting the assembly set for the step , repeating the performing of the sequence parallel optimization for the base rework item of each step until the elements in the assembly matrix are all 0 to output the final rework sequence.
7. A virtual vehicle customization system based on virtual space, the system employing the virtual vehicle customization method based on virtual space according to claim 1, characterized by The system comprises: a model module configured to obtain an initial vehicle model file and a modification part model file and import the initial vehicle model and the modification part model into a virtual space to obtain an initial vehicle model and a modification part model; an identification module configured to perform contact identification based on the modification part model to obtain a contact matrix, perform collision modeling on the modification part model to obtain a collision detection model, and perform collision information acquisition based on the collision detection model to obtain a collision matrix; a sequence module configured to output a modification sequence of the modification part model based on the contact matrix and the collision matrix to obtain a target modification sequence; an optimization module configured to perform sequence parallel optimization on the target modification sequence to obtain a final modification sequence, and assemble the modification part model to the initial vehicle model based on the final modification sequence to complete virtual modification of the vehicle.
8. A computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the virtual space-based vehicle virtual modification method in any one of claims 1 to 6 when executing the computer program.
9. A storage medium, characterized by The storage medium has the computer program stored thereon, and the computer program implements the virtual space-based vehicle virtual modification method in any one of claims 1 to 6 when executed by the processor.
Citation Information
Patent Citations
Bombyx mori gene sequencing path optimization system and method based on hybrid parallel genetic algorithm
CN120412718A
Structural variant analysis
WO2019094636A1