Counterweight file generation method and device, equipment and medium
By automatically filtering and updating subsystems and components in the vehicle modeling process, and generating counterweight files based on subsystem configuration files, the problem of low generation efficiency of counterweight files in the existing technology is solved, and efficient counterweight data update is achieved Interact with human-computer.
Patent Information
- Application Number
- CN202411049708.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-01
AI Technical Summary
In the prior art, the generation efficiency of counterweight files during the modeling process of automobile and vehicle is low, and technicians need to manually enter a large amount of data, resulting in cumbersome processes and high efficiency, especially when the subsystem configuration is updated, it takes a lot of time.
By obtaining the subsystem configuration file, automatically filter the subsystems and components that need to be adjusted by counterweight, generate counterweight files based on preset rules, realize automatic update of counterweight data, and reduce manual intervention.
It improves the efficiency of counterweight file generation and human-computer interaction efficiency, and can quickly respond to situations where there are more data and high frequency of counterweight adjustments, reducing the operating time of technicians.
Smart Images

Figure CN119047074A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer-aided design technology, and in particular to a method, device, equipment, and medium for generating a weight file. Background Art
[0002] Before the car is officially put into production, technicians build a vehicle safety model based on computer simulation technology and other methods to simulate the three-dimensional form of the vehicle and the situation of the vehicle when it is actually put into use, so as to ensure that the vehicle can drive safely and determine the production specifications of each part, such as size and weight. The vehicle is divided into multiple subsystems according to its functions, and each subsystem can be regarded as a collection of parts. In the early stage of modeling, the initial weight of each component of the vehicle will be set, and the weight of the component will be adjusted at any time according to the test results during the modeling process.
[0003] In the related art, each vehicle model project needs to select the IDs (component names) of components in different subsystems and located in different areas according to certain criteria, and update the weights of the selected components into the weight file.
[0004] However, the number of components that need to be updated for counterweight is often large. The above method requires technicians to manually enter data to obtain counterweight files, which is a cumbersome and inefficient process. When the configuration of a subsystem is updated, technicians need to spend time reprocessing it. Summary of the invention
[0005] The embodiment of the present application provides a method, device, equipment, and medium for generating a weight file, which can improve the efficiency of generating a weight file. The technical solution is as follows:
[0006] In one aspect, a method for generating a weight file is provided, the method comprising:
[0007] Acquire a subsystem configuration file of a first vehicle, the subsystem configuration file being used to indicate conditions of a plurality of subsystems of the first vehicle divided according to functions, the subsystem configuration file comprising respective names and weight adjustment data of the plurality of subsystems, the subsystem comprising a plurality of vehicle components, the weight adjustment data being used to indicate weights of the plurality of vehicle components in the subsystem that need to be adjusted respectively when weight adjustment is performed on the subsystem;
[0008] In response to receiving the file reading operation, reading the subsystem configuration file, and determining at least one target subsystem among the multiple subsystems that needs to be weight adjusted;
[0009] Based on a preset weight balancing rule, at least one target component that needs to be weighted is selected from the at least one target subsystem;
[0010] The weight adjustment is automatically performed on the at least one target component based on the subsystem configuration file, and the weight file corresponding to the at least one target component is generated, wherein the weight file contains weight data of the at least one target component after the weight adjustment.
[0011] In another aspect, a device for generating a weight file is provided, the device comprising:
[0012] an acquisition module, configured to acquire a subsystem configuration file of a first vehicle, wherein the subsystem configuration file is used to indicate conditions of a plurality of subsystems of the first vehicle divided according to functions, wherein the subsystem configuration file includes names and weight adjustment data of the respective subsystems, wherein the subsystem includes a plurality of vehicle components, and the weight adjustment data is used to indicate weights of the plurality of vehicle components in the subsystem that need to be adjusted respectively when weight adjustment is performed on the subsystem;
[0013] A reading module, configured to read the subsystem configuration file in response to receiving a file reading operation, and determine at least one target subsystem among the multiple subsystems that needs to be weight adjusted;
[0014] A screening module, used for screening out at least one target component requiring counterweight adjustment from the at least one target subsystem based on a preset counterweight rule;
[0015] A weight balancing module is used to automatically adjust the weight of the at least one target component based on the subsystem configuration file, and generate the weight balancing file corresponding to the at least one target component, wherein the weight balancing file contains weight data of the at least one target component after the weight balancing is adjusted.
[0016] In an optional embodiment, the reading module is further used to obtain an area selection file corresponding to the subsystem configuration file, the area selection file is used to determine the at least one target subsystem that needs to be weight adjusted, the area selection file includes multiple selection areas obtained by three-dimensional area division of the three-dimensional model of the first vehicle; the subsystem configuration file is read based on the area selection file to determine the at least one target subsystem.
[0017] In an optional embodiment, the screening module is further used to read the initial weight balancing data corresponding to multiple candidate components in the at least one target subsystem, wherein the i-th initial weight balancing data includes the initial weight, thickness, and component name of the i-th component among the multiple candidate components, and i is a positive integer; based on the preset weight balancing rule and the initial weight balancing data, the at least one target component is screened out from the multiple candidate components.
[0018] In an optional embodiment, the screening module is further used to, when screening the i-th component, determine that the i-th component is a target component in response to the initial weight of the i-th component not reaching a preset weight threshold, the thickness of the i-th component not reaching a preset thickness threshold, and the component name of the i-th component conforming to a preset naming rule.
[0019] In an optional embodiment, the weight balancing module is also used to obtain target weight adjustment data corresponding to the at least one target subsystem from the subsystem configuration file based on the at least one target subsystem, wherein the j-th target subsystem corresponds to the j-th target weight adjustment data, and j is a positive integer; when performing weight balancing adjustment on the target component in the j-th target subsystem, the target component in the j-th target subsystem is adjusted based on the j-th target weight adjustment data to obtain the j-th weight balancing data corresponding to the j-th target subsystem; after integrating the weight balancing data corresponding to each of the at least one target subsystem, the weight balancing file corresponding to the at least one target component is generated.
[0020] In an optional embodiment, the balancing module is also used to determine a first quantity of target components in the jth target subsystem when adjusting the balancing of target components in the jth target subsystem; divide the jth target weight adjustment data equally based on the first quantity to obtain a jth equal adjustment range; and adjust the target components in the jth target subsystem respectively based on the jth equal adjustment range to obtain the jth balancing data corresponding to the jth target subsystem.
[0021] In an optional embodiment, the j-th target weight adjustment data includes the k-th adjustment weight when adjusting the weight of the k-th target component in the j-th target subsystem, where k is a positive integer;
[0022] The balancing weight module is also used to adjust the kth target component in the jth target subsystem based on the kth adjustment weight and the jth target weight adjustment data; when all target components in the jth target subsystem have been adjusted, the jth balancing weight data corresponding to the jth target subsystem is obtained.
[0023] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for generating a weight file as described in any of the above-mentioned embodiments of the present application.
[0024] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a method for generating a weight file as described in any of the above-mentioned embodiments of the present application.
[0025] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for generating a weight file described in any of the above embodiments.
[0026] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0027] By presetting the subsystem configuration file, the subsystems that need to be adjusted for weight balance are automatically screened out based on the subsystem configuration file during the vehicle modeling process, and the target components that need to be configured and adjusted in the target subsystem are further confirmed. The weight balance file is automatically generated based on the weight adjustment method indicated in the subsystem configuration file, and the weight balance data is automatically updated. Compared with the method in the related art that requires technicians to manually update the configuration data to obtain the weight balance file, the efficiency of generating the weight balance file is effectively improved, and it can cope with the situation where there is a large amount of data and a high frequency of weight balance adjustment, thereby improving the efficiency of human-computer interaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 is a schematic diagram of a system for generating a weight file provided by an exemplary embodiment of the present application;
[0030] Figure 2 is a flow chart of a method for generating a weight file provided by an exemplary embodiment of the present application;
[0031] Figure 3 is a structural block diagram of a device for generating a weight file provided by an exemplary embodiment of the present application;
[0032] Figure 4 It is a structural block diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0034] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0035] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0036] It should be noted that the information and data involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0037] It should be understood that, although the terms first, second, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0038] First, a brief introduction is given to the terms involved in the embodiments of the present application:
[0039] TCL scripting language (Tool Command Language): is a general-purpose multi-paradigm system programming language. It is a scripting language designed to provide applications with the ability to communicate with each other. It is designed for rapid development of various applications, especially in automation, testing, and prototyping.
[0040] Before the car officially enters the production line, technicians will use computer simulation technology and other means to build a vehicle safety model to simulate the three-dimensional appearance of the vehicle and predict the performance of the vehicle in the actual use environment. In this way, the safety of the vehicle during driving can be ensured, and the production standards of each component can be accurately determined, including parameters such as the size and weight of each component.
[0041] Among them, the car is divided into several subsystems according to its functions, and each subsystem is composed of a group of specific components.
[0042] During the initial construction of the vehicle model, technicians will set the initial weight for each component that makes up the vehicle. As the model is built, the weight of the components is constantly adjusted based on the results of simulation tests and experiments to ensure the overall performance and safety of the vehicle.
[0043] In related technologies, each vehicle model project needs to select components in different subsystems and in different areas according to certain criteria, and update the weight of the selected components to the weight file. The weight file is used to record the weight of each component in the vehicle. During the vehicle model construction process, the data in the weight file is updated in real time.
[0044] However, the number of components that need to be updated for counterweight is often large. The above method requires technicians to manually enter data to obtain counterweight files, which is a cumbersome and inefficient process. When the configuration of a subsystem is updated, technicians need to spend time reprocessing it.
[0045] The present application provides a method for generating a ballast file, which can automatically complete subsystem screening, component screening, component weight update, ballast file generation and other processes based on a pre-configured subsystem configuration file, without the need for technicians to manually enter data, thereby improving the efficiency of ballast file generation and the efficiency of component weight data update.
[0046] Next, the generation system of the weight file involved in the embodiment of the present application is described. For illustration, please refer to Figure 1 The implementation environment involves a terminal 100 and a server 120 , and a communication connection 140 is established between the terminal 100 and the server 120 .
[0047] The terminal 100 is installed with an application capable of modeling the entire first vehicle, through which a simulation model of the first vehicle is generated and used to simulate and test the performance of the first vehicle when it is actually put into use. The technician tests and adjusts the vehicle model in the terminal 100 and organizes the subsystem configuration files.
[0048] The server 120 is equipped with a tool that can realize the rapid distribution of component weights in the model. The tool is implemented based on the TCL scripting language. Among the large number of components in the safety vehicle model, the tool identifies the key components required for the weight distribution of each subsystem according to the dimensions of attribute quality and position, and realizes the function of quickly creating and updating the weight distribution for each subsystem according to the parameters input by the user. It is used to improve the efficiency of weight distribution update of each subsystem of the safety vehicle model, reduce the repeated and tedious operations of technicians, and reduce the time spent on updating, so that more energy can be invested in the actual analysis and improvement process.
[0049] The technicians first prepare a subsystem configuration file, which is used to indicate the conditions of multiple subsystems of the first vehicle divided according to their functions. The subsystem configuration file includes the names and weight adjustment data of each of the multiple subsystems. The subsystem includes multiple vehicle components, and the weight adjustment data is used to indicate the weights that need to be adjusted for the multiple vehicle components in the subsystem when adjusting the weight of the subsystem.
[0050] That is, taking the first vehicle as an example, the first vehicle is divided into multiple subsystems according to its functions, and each subsystem contains multiple components. During the modeling process, in order to simulate and test the safety of the first vehicle when it is actually put into use, it is necessary to adjust and update the weight of the components in real time to obtain a weight file containing the weight data of each component.
[0051] The subsystem configuration file is imported into the server 120 through the terminal 100, and the server 120 reads the subsystem configuration file, and determines that there is a target subsystem that needs to be weight adjusted based on the subsystem configuration file. Since not all components in the target subsystem need to be weight adjusted, after determining the target subsystem, it is necessary to further screen out the target components in the target subsystem that need to be weight adjusted based on the preset weight rules.
[0052] The subsystem configuration file pre-indicates the method of adjusting the weight of the target component and the specific weight change range. Therefore, the server 120 automatically generates a corresponding weight file for the target component based on the subsystem configuration file.
[0053] In some embodiments, in order to enable the server 120 to more quickly locate the target subsystem that needs counterweight adjustment, the technician can also upload a region selection file on the terminal 100. The region selection file contains the selection area obtained by dividing the three-dimensional model of the vehicle into regions. The target subsystem can be quickly determined based on the location information indicated by the selection area and the name of the subsystem indicated in the subsystem configuration file.
[0054] In some embodiments, the operations performed / realizable functions by the terminal 100 and the server 120 can be integrated on the same device. For example, only the terminal 100 is required to implement the uploading, reading, and weighting processes of the subsystem configuration file to obtain an automatically updated / generated weighting file, or the above process is only implemented through the server 120, which is not limited in this application.
[0055] The above-mentioned terminal can be a mobile phone, a tablet computer, a desktop computer, a portable laptop computer, a smart TV, a car terminal, a smart home device and other terminal devices in various forms, which is not limited in the embodiments of the present application.
[0056] It is worth noting that the above-mentioned servers can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0057] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0058] In some embodiments, the above server can also be implemented as a node in a blockchain system.
[0059] In combination with the above-mentioned noun introduction and application scenarios, the method for generating a weight file provided by the present application is described. The method can be executed by a server or a terminal, or can be executed by a server and a terminal together. In the embodiment of the present application, the method is described by taking the execution of the server as an example. Figure 2 As shown, Figure 2 1 is a flow chart of a method for generating a weight file provided by an exemplary embodiment of the present application. The method comprises the following steps.
[0060] Step 210: Obtain a subsystem configuration file of the first vehicle.
[0061] The subsystem configuration file is a pre-configured file uploaded by a technician, who uploads a manually configured subsystem configuration file to the terminal, or directly configures the subsystem configuration file on the terminal, and sends the subsystem configuration file to the server. The terminal includes an application capable of generating a subsystem configuration file. In some embodiments, the method provided by the present application is executed by a terminal, and the technician directly generates a subsystem configuration file in the terminal and implements the configuration adjustment process of the vehicle components.
[0062] The subsystem configuration file is used to indicate the conditions of multiple subsystems of the first vehicle divided according to functions, and the subsystem configuration file contains the names and weight adjustment data of each of the multiple subsystems.
[0063] The subsystem includes multiple vehicle components, and the weight adjustment data is used to indicate the weights of the multiple vehicle components in the subsystem that need to be adjusted respectively when the subsystem is subjected to weight adjustment.
[0064] The technician saves the subsystem names and weight adjustment data as input data into a CSV file (Comma-Separated Values) to obtain the subsystem configuration file. Among them, the CSV file stores tabular data in plain text form, each line represents a row in the table, and each field value is separated by a comma. CSV files are often used to transfer data between different applications because they are easy to generate and parse and are supported by many different programs.
[0065] That is, the subsystem configuration file stores the weight information of the plurality of vehicle components of the first vehicle when they are adjusted respectively in a table format.
[0066] Exemplarily, the first vehicle includes a total of 200 components (which can be called parts), and the above 200 components are divided into 10 subsystems according to the functions of the first vehicle. Each subsystem corresponds to a different vehicle function. For example, the door on the driver's side of the first vehicle is regarded as a subsystem, which includes 20 components, such as window glass, door handles, etc.
[0067] The weight adjustment data includes the total weight adjustment distribution of each subsystem.
[0068] For example, taking the first subsystem as an example, the first subsystem includes 20 components, and the weight adjustment data is used to indicate that the weight of each component of the first subsystem is increased, and the total increased weight is 0.1 kg, that is, the total increased weight of the 20 components is 0.1 kg.
[0069] The weight adjustment data indicates that the weight adjustment method for each component in the subsystem may be arbitrary and pre-set by a technician. For example, among 20 components, 5 components need to reduce weight, 10 components need to increase weight, and the remaining 5 components do not need to be adjusted.
[0070] Exemplarily, the first subsystem is the left door system located on the driver's side, including 20 components, such as window glass, outer door handles, inner door handles, window lifters, etc. The weight adjustment data of the first subsystem indicates that the weight of the window lifter is increased by 0.08kg, the weight of the outer door handle and the inner door handle are each reduced by 0.02kg, and the weight of the window glass is not adjusted.
[0071] Step 220 , in response to receiving a file reading operation, read the subsystem configuration file to determine at least one target subsystem among the multiple subsystems that needs to be weight adjusted.
[0072] Optionally, a region selection file (which may be called a block file) corresponding to the subsystem configuration file is obtained, and the region selection file is used to determine at least one target subsystem that needs to be weight adjusted, and the region selection file contains multiple selection regions obtained by dividing the three-dimensional model of the first vehicle into three-dimensional regions. For example, the left door, right door, driver's seat, and co-driver's seat of the first vehicle are respectively selected to obtain selection regions, each selection region is used to indicate a three-dimensional region in the first vehicle, and each selection region involves at least one component.
[0073] Among them, the area selection file is also a pre-configured file uploaded by the technician. When simulating and modeling the first vehicle, different selection areas are set for the three-dimensional model of the first vehicle. When the selection area partially overlaps with the three-dimensional model of the first vehicle, the overlapping part is the content selected by the selection area. When setting the area selection file, the technician will set the selection area in units of subsystems. A selection area is used to select one of the subsystems of the first vehicle, that is, to select all components of the subsystem. In some embodiments, a selection area may be used to select a partial area of one of the subsystems, that is, to select only some components of the subsystem. The subsystem configuration file is read based on the area selection file to determine at least one target subsystem.
[0074] After receiving the file reading operation, the obtained area selection file is used as a backup file, and the target subsystem is determined in combination with the selection area, which can make the determination result of the target subsystem more accurate. For example, the subsystem includes a left door system and a right door system, and the names of these systems are similar but the areas in the first vehicle are different. The direction indicated by the selection area in the area selection file is the left side of the first vehicle. Therefore, based on the selection area in the area selection file, it can be further determined that the target subsystem is the left door system.
[0075] In some embodiments, a different prefix number is set for each subsystem in the subsystem configuration file, and is distinguished by an "include" header file identifier for ease of reading by the server / terminal device. By reading the prefix number after include, the target subsystem that needs to be adjusted can be directly determined based on the correspondence between the prefix number and the subsystem.
[0076] For example, the first vehicle is divided into 10 subsystems, and the prefix numbers of each subsystem are 0001, 0002, 0003, 0004, 0005, 0006, 0007, 0008, 0009, and 0010 respectively. The subsystem configuration file indicates that the subsystems with prefix numbers 0003, 0004, and 0007 are target subsystems. The subsystem configuration file contains the following content: "include 0003; include 0004; include 0007". When the subsystem configuration file is read, the target subsystem is automatically identified and determined.
[0077] Step 230 : Screen out at least one target component that needs to be adjusted in terms of weight from at least one target subsystem based on a preset weight adjustment rule.
[0078] Optionally, initial weight data corresponding to multiple candidate components in at least one target subsystem are read, wherein the i-th initial weight data includes the initial weight, thickness, and component name of the i-th component among the multiple candidate components, and i is a positive integer.
[0079] Exemplarily, the number of target subsystems is 10, each target subsystem contains 10 candidate components, for a total of 100 candidate components. The initial weight data corresponding to each of the 100 candidate components is read. The initial weight data is the weight set for each component in the initial stage of vehicle model building. When the model performs different safety test tasks, the initial weight data will be updated in real time according to the test results to better meet the safety requirements of vehicle driving.
[0080] Among them, since the number of times the weight adjustment of each component is performed during the adjustment process of the whole vehicle model is usually multiple times, the above-mentioned initial weight data is updated in real time. When the weight adjustment of the component is performed for the i-th time, the data saved in the initial weight data is the result of the weight adjustment of the component for the i-1th time.
[0081] At least one target component is selected from a plurality of candidate components based on a preset weight distribution rule and initial weight distribution data.
[0082] Among them, the preset weight balancing rules include filtering conditions in multiple dimensions, and the multiple dimensions include at least one of component thickness, component mass, and component name. The weight balancing rules are used to compare with the initial weight balancing data, and the components whose initial weight balancing data meet the filtering conditions of all dimensions are determined as target components that need to be adjusted in weight.
[0083] Exemplarily, when screening the i-th component, in response to the initial weight of the i-th component not reaching a preset weight threshold, the thickness of the i-th component not reaching a preset thickness threshold, and the component name of the i-th component conforming to a preset naming rule, the i-th component is determined to be a target component.
[0084] Optionally, the preset weight threshold is 0.1kg, the preset thickness threshold is 1mm, and the preset naming rule means that the candidate components do not contain keywords. That is, the weighting rule is as follows: after removing the candidate components with a weight (mass) exceeding 0.1kg, the candidate components with a thickness exceeding 1mm, and the candidate components with keywords in the names, the remaining candidate components are the target components.
[0085] Exemplarily, the keywords include "glass", "connection", and "flange". When the component name of the candidate component contains any one or more of the above keywords, it does not comply with the preset naming rules.
[0086] After determining the target component that needs to be adjusted in weight from multiple candidate components based on the preset weighting rule, the component name of the target component is taken as a set, which is used to record the target component and serves as a part of the weighting file.
[0087] Step 240: automatically adjust the weight of at least one target component based on the subsystem configuration file, and generate a weight file corresponding to the at least one target component.
[0088] The weight file includes weight data of at least one target component after weight adjustment.
[0089] Optionally, the weight file contains weight data of all components of the first vehicle, and the weight data of the target components is updated in real time. During the vehicle modeling process, the weight file remains the same file, and the data in the weight file is different at different time points; each time the weight data in the weight file is updated, the previous weight data is automatically saved so that technicians can observe changes in the components of the first vehicle during the vehicle modeling process.
[0090] Alternatively, the weight file only contains the weight data of the target component, which is used to reflect the weight of the target component at different time points. The number of weight files increases with the number of weight adjustment events that occur to the target component. For example, when the model is just being built, the first weight file is generated to record the initial weight data; in the subsequent process, the weight of the target component is adjusted three times in total, and the second configuration file, the third configuration file, and the fourth configuration file are generated respectively to record the weight of the target component at different time points.
[0091] Optionally, target weight adjustment data corresponding to at least one target subsystem is obtained from a subsystem configuration file based on at least one target subsystem, wherein the j-th target subsystem corresponds to the j-th target weight adjustment data, and j is a positive integer.
[0092] Optionally, when performing weight adjustment on a target component in the jth target subsystem, the target component in the jth target subsystem is adjusted based on the jth target weight adjustment data to obtain the jth weight adjustment data corresponding to the jth target subsystem.
[0093] After integrating the weight data corresponding to the at least one target subsystem, a weight file corresponding to the at least one target component is generated.
[0094] Exemplarily, when adjusting the weight of the target components in the jth target subsystem, the first quantity of the target components in the jth target subsystem is determined, the jth target weight adjustment data is evenly divided based on the first quantity to obtain the jth average adjustment range, and the target components in the jth target subsystem are adjusted respectively based on the jth average adjustment range to obtain the jth weight data corresponding to the jth target subsystem.
[0095] For example, j is 5, and the fifth target subsystem contains four target components: component 1, component 2, component 3, and component 4, with weights of 0.02kg, 0.03kg, 0.01kg, and 0.07kg respectively.
[0096] The 5th target weight adjustment data indicates that the components of the 5th target subsystem are to be increased in weight, with a total weight increase of 0.1kg. Dividing it equally, the 5th equal adjustment range is 0.1 / 5=0.02kg. After adjusting the weights of the 4 target components based on the 5th equal adjustment range, the 5th weight data is as follows: the adjusted weight of the 1st component is 0.02+0.02=0.04kg, the adjusted weight of the 2nd component is 0.03+0.02=0.05kg, the adjusted weight of the 3rd component is 0.01+0.02=0.03kg, and the adjusted weight of the 4th component is 0.07+0.02=0.09kg.
[0097] In some embodiments, in addition to equally adjusting the target components, the adjustment weight of each target component may be directly set in the target weight adjustment data, that is, the adjustment amplitude of each target component is determined by the product of its corresponding adjustment weight and the target weight adjustment data.
[0098] Optionally, the jth target weight adjustment data includes a kth adjustment weight when adjusting the weight of the kth target component in the jth target subsystem, where k is a positive integer. The kth target component in the jth target subsystem is adjusted based on the kth adjustment weight and the jth target weight adjustment data, where the kth adjustment weight can be any value.
[0099] When all target components in the j-th target subsystem have been adjusted, the j-th counterweight data corresponding to the j-th target subsystem is obtained.
[0100] For example, j is 5, and the fifth target subsystem includes four target components: the first target component, the second target component, the third target component, and the fourth target component, with weights of 0.02 kg, 0.03 kg, 0.01 kg, and 0.07 kg, respectively. The fifth target weight adjustment data indicates that the components of the fifth target subsystem are increased in weight, and the total amount of the increase is 0.1 kg.
[0101] Among them, the ratio between each adjustment weight is as follows: [1st adjustment weight: 2nd adjustment weight: 3rd adjustment weight: 4th adjustment weight = 1:3:2:-2].
[0102] The fifth weight data obtained after weight adjustment of the four target components based on the above four adjustment weights are as follows: the weight of the first component after adjustment is 0.02+0.1*(1 / 1+3+2-2)=0.02+0.1*0.25=0.045kg, the weight of the second component after adjustment is 0.03+0.1*(3 / 1+3+2-2)
[0103] =0.02+0.1*0.75=0.095kg, the weight of the third component after adjustment is 0.01+0.1*(2 / 1+3+2-2)
[0104] =0.02+0.1*0.5=0.07kg, the weight of the fourth component after adjustment is 0.07-0.1*(2 / 1+3+2-2)=0.07-0.1*0.5=0.02kg.
[0105] In summary, the method for generating a weight file provided in the present application pre-sets a subsystem configuration file, automatically screens out the subsystems that need to be adjusted for weight based on the subsystem configuration file during the vehicle modeling process, further confirms the target components that need to be configured and adjusted in the target subsystem, and automatically generates a weight file based on the weight adjustment method indicated in the subsystem configuration file, thereby realizing automatic updating of weight data. Compared with the method in the related art in which a technician needs to manually update configuration data to obtain a weight file, the method effectively improves the efficiency of generating a weight file, can cope with situations in which a large amount of data and a high frequency of weight adjustment are required, and improves the efficiency of human-computer interaction.
[0106] Figure 3 is a structural block diagram of a device for generating a weight file provided by an exemplary embodiment of the present application, such as Figure 3 As shown, the device includes the following parts.
[0107] The acquisition module 310 is used to acquire a subsystem configuration file of the first vehicle, wherein the subsystem configuration file is used to indicate the conditions of multiple subsystems of the first vehicle divided according to functions, wherein the subsystem configuration file includes names and weight adjustment data of the multiple subsystems, wherein the subsystem includes multiple vehicle components, and the weight adjustment data is used to indicate the weights of the multiple vehicle components in the subsystem that need to be adjusted respectively when the subsystem is subjected to weight adjustment;
[0108] A reading module 320, configured to read the subsystem configuration file in response to receiving a file reading operation, and determine at least one target subsystem among the multiple subsystems that needs to be weight adjusted;
[0109] A screening module 330, configured to screen out at least one target component that needs to be adjusted in terms of weight from the at least one target subsystem based on a preset weighting rule;
[0110] The weight balancing module 340 is used to automatically adjust the weight of the at least one target component based on the subsystem configuration file, and generate the weight balancing file corresponding to the at least one target component, wherein the weight balancing file contains weight data of the at least one target component after the weight balancing is adjusted.
[0111] In an optional embodiment, the reading module 320 is further used to obtain an area selection file corresponding to the subsystem configuration file, the area selection file is used to determine the at least one target subsystem that needs to be weight adjusted, the area selection file includes multiple selection areas obtained by dividing the three-dimensional model of the first vehicle into three-dimensional areas; the subsystem configuration file is read based on the area selection file to determine the at least one target subsystem.
[0112] In an optional embodiment, the screening module 330 is further used to read the initial weight balancing data corresponding to the multiple candidate components in the at least one target subsystem, wherein the i-th initial weight balancing data includes the initial weight, thickness, and component name of the i-th component among the multiple candidate components, and i is a positive integer; based on the preset weight balancing rule and the initial weight balancing data, the at least one target component is screened out from the multiple candidate components.
[0113] In an optional embodiment, the screening module 330 is further used to, when screening the i-th component, determine that the i-th component is a target component in response to the initial weight of the i-th component not reaching a preset weight threshold, the thickness of the i-th component not reaching a preset thickness threshold, and the component name of the i-th component conforming to a preset naming rule.
[0114] In an optional embodiment, the weight balancing module 340 is also used to obtain target weight adjustment data corresponding to the at least one target subsystem from the subsystem configuration file based on the at least one target subsystem, wherein the j-th target subsystem corresponds to the j-th target weight adjustment data, and j is a positive integer; when performing weight balancing adjustment on the target component in the j-th target subsystem, the target component in the j-th target subsystem is adjusted based on the j-th target weight adjustment data to obtain the j-th weight balancing data corresponding to the j-th target subsystem; after integrating the weight balancing data corresponding to each of the at least one target subsystem, the weight balancing file corresponding to the at least one target component is generated.
[0115] In an optional embodiment, the weight balancing module 340 is also used to determine a first quantity of target components in the jth target subsystem when adjusting the weight of the target components in the jth target subsystem; divide the jth target weight adjustment data equally based on the first quantity to obtain a jth equal adjustment range; and adjust the target components in the jth target subsystem respectively based on the jth equal adjustment range to obtain the jth weight balancing data corresponding to the jth target subsystem.
[0116] In an optional embodiment, the j-th target weight adjustment data includes the k-th adjustment weight when adjusting the weight of the k-th target component in the j-th target subsystem, where k is a positive integer;
[0117] The weight balancing module 340 is also used to adjust the kth target component in the jth target subsystem based on the kth adjustment weight and the jth target weight adjustment data; when all target components in the jth target subsystem have been adjusted, the jth weight balancing data corresponding to the jth target subsystem is obtained.
[0118] In summary, the device for generating a weight file provided in the present application can pre-set a subsystem configuration file, automatically screen out the subsystems that need to be adjusted for weight based on the subsystem configuration file during the vehicle modeling process, further confirm the target components that need to be configured and adjusted in the target subsystem, and automatically generate a weight file based on the weight adjustment method indicated in the subsystem configuration file, thereby realizing automatic updating of weight data. Compared with the method in the related art where a technician needs to manually update the configuration data to obtain a weight file, the efficiency of generating a weight file is effectively improved, and it can cope with the situation where a large amount of data and a high frequency of weight adjustment are required, thereby improving the efficiency of human-computer interaction.
[0119] It should be noted that the device for generating a weight file provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for generating a weight file provided in the above embodiment and the method for generating a weight file are of the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0120] Figure 4 The block diagram of the structure of a computer device 400 provided by an exemplary embodiment of the present application is shown. The computer device 400 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Compression Standard Audio Layer 3), an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) player, a laptop computer or a desktop computer. The computer device 400 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0121] Typically, the computer device 400 includes a processor 401 and a memory 402 .
[0122] The processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0123] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction, which is used to be executed by the processor 401 to implement the method for generating a weight file provided in the method embodiment of the present application.
[0124] In some embodiments, the computer device 400 further includes some other components 403, and the type and quantity of the other components 403 can be selected based on the functional requirements of the computer device 400. Those skilled in the art will appreciate that Figure 4 The structure shown in the figure does not constitute a limitation on the computer device 400, and the computer device 400 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.
[0125] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0126] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for generating a weight file as described in any of the above embodiments of the present application.
[0127] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a method for generating a weight file as described in any of the above embodiments of the present application.
[0128] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method for generating a weight file described in any of the above embodiments.
[0129] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0130] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a weight file, It is characterized in that The method comprises: Acquire a subsystem configuration file of a first vehicle, the subsystem configuration file being used to indicate conditions of a plurality of subsystems of the first vehicle divided according to functions, the subsystem configuration file comprising respective names and weight adjustment data of the plurality of subsystems, the subsystem comprising a plurality of vehicle components, the weight adjustment data being used to indicate weights of the plurality of vehicle components in the subsystem that need to be adjusted respectively when weight adjustment is performed on the subsystem; In response to receiving the file reading operation, reading the subsystem configuration file, and determining at least one target subsystem among the multiple subsystems that needs to be weight adjusted; Based on a preset weight balancing rule, at least one target component that needs to be weighted is selected from the at least one target subsystem; The weight adjustment is automatically performed on the at least one target component based on the subsystem configuration file, and the weight file corresponding to the at least one target component is generated, wherein the weight file contains weight data of the at least one target component after the weight adjustment.
2. The method according to claim 1, It is characterized in that In response to receiving the file reading operation, reading the subsystem configuration file and determining at least one target subsystem among the multiple subsystems that needs to be weight adjusted includes: Acquire a region selection file corresponding to the subsystem configuration file, the region selection file being used to determine the at least one target subsystem that needs to be weight adjusted, the region selection file comprising a plurality of selection regions obtained by performing three-dimensional region division on the three-dimensional model of the first vehicle; The subsystem configuration file is read based on the area selection file to determine the at least one target subsystem.
3. The method according to claim 1, It is characterized in that The step of selecting at least one target component that needs to be adjusted in terms of weight from the at least one target subsystem based on a preset weight-balancing rule includes: Reading initial weight data corresponding to a plurality of candidate components in the at least one target subsystem, wherein the i-th initial weight data includes the initial weight, thickness, and component name of the i-th component among the plurality of candidate components, and i is a positive integer; Based on the preset weight distribution rule and the initial weight distribution data, the at least one target component is selected from the plurality of candidate components.
4. The method according to claim 3, It is characterized in that Based on the preset weight balancing rule and the initial weight balancing data, selecting the at least one target component from the plurality of candidate components comprises: When screening the i-th component, in response to the initial weight of the i-th component not reaching a preset weight threshold, the thickness of the i-th component not reaching a preset thickness threshold, and the component name of the i-th component conforming to a preset naming rule, the i-th component is determined to be a target component.
5. The method according to any one of claims 1 to 4, It is characterized in that The step of performing weight adjustment on the at least one target component based on the subsystem configuration file and generating the weight file corresponding to the at least one target component includes: Based on the at least one target subsystem, acquiring target weight adjustment data corresponding to the at least one target subsystem from the subsystem configuration file, wherein the j-th target subsystem corresponds to the j-th target weight adjustment data, and j is a positive integer; When performing weight adjustment on the target component in the j-th target subsystem, adjusting the target component in the j-th target subsystem based on the j-th target weight adjustment data to obtain j-th weight adjustment data corresponding to the j-th target subsystem; After integrating the weight data corresponding to each of the at least one target subsystems, the weight file corresponding to the at least one target component is generated.
6. The method according to claim 5, It is characterized in that When the target component in the j-th target subsystem is subjected to weight adjustment, the target component in the j-th target subsystem is adjusted based on the j-th target weight adjustment data to obtain the j-th weight adjustment data corresponding to the j-th target subsystem, including: When performing weight adjustment on the target component in the j-th target subsystem, determining a first quantity of the target components in the j-th target subsystem; Dividing the j-th target weight adjustment data equally based on the first quantity to obtain a j-th equally divided adjustment range; The target components in the j-th target subsystem are adjusted respectively based on the j-th equally divided adjustment amplitude to obtain the j-th counterweight data corresponding to the j-th target subsystem.
7. The method according to claim 5, It is characterized in that The j-th target weight adjustment data includes the k-th adjustment weight when the weight of the k-th target component in the j-th target subsystem is adjusted, where k is a positive integer; When the target component in the j-th target subsystem is subjected to weight adjustment, the target component in the j-th target subsystem is adjusted based on the j-th target weight adjustment data to obtain the j-th weight adjustment data corresponding to the j-th target subsystem, including: Adjusting the kth target component in the jth target subsystem based on the kth adjustment weight and the jth target weight adjustment data; When all target components in the j-th target subsystem have been adjusted, the j-th counterweight data corresponding to the j-th target subsystem is obtained.
8. A device for generating a weight file, It is characterized in that The device comprises: an acquisition module, configured to acquire a subsystem configuration file of a first vehicle, wherein the subsystem configuration file is used to indicate conditions of a plurality of subsystems of the first vehicle divided according to functions, wherein the subsystem configuration file includes names and weight adjustment data of the respective subsystems, wherein the subsystem includes a plurality of vehicle components, and the weight adjustment data is used to indicate weights of the plurality of vehicle components in the subsystem that need to be adjusted respectively when weight adjustment is performed on the subsystem; A reading module, configured to read the subsystem configuration file in response to receiving a file reading operation, and determine at least one target subsystem among the multiple subsystems that needs to be weight adjusted; A screening module, used for screening out at least one target component requiring counterweight adjustment from the at least one target subsystem based on a preset counterweight rule; A weight balancing module is used to automatically adjust the weight of the at least one target component based on the subsystem configuration file, and generate the weight balancing file corresponding to the at least one target component, wherein the weight balancing file contains weight data of the at least one target component after the weight balancing is adjusted.
9. A computer device, It is characterized in that The computer device includes a processor and a memory, wherein at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the method for generating a weight file according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the method for generating a weight file according to any one of claims 1 to 7.
Citation Information
Patent Citations
Counterweight adding method and system in CAE model, and storage medium
CN112329125A
Method and system for automatically calculating weight of whole vehicle based on matching mode
CN115600043A
Automatic weight balancing method for collision simulation vehicle model
CN117852190A
Component data adjustment system and component data adjustment method
WO2018146818A1
Cited By
File access method and device, equipment and storage medium
CN121075029A
