Dynamic simulation method and system, computer equipment and storage medium
By submitting the modified power model parameters and working conditions on the client, the simulation end is automatically called for simulation calculations, which solves the problem of inefficiency of non-power professionals relying on power professionals to perform simulation tasks and realizes an efficient power simulation process.
Patent Information
- Application Number
- CN202411811669.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-10
Smart Images

Figure CN119849122A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of simulation technology, and in particular to a power simulation method, system, computer device and storage medium. Background Art
[0002] Simulation analysis technology runs through the entire vehicle design process and has been widely used to improve performance such as vehicle dynamics, structural analysis, vibration and noise, and aerodynamics.
[0003] At present, the simulation of vehicle power economy mainly involves highly repetitive work such as manual modeling, parameter adjustment, submission and operation, query results and data comparison on simulation software. However, most simulation software requires a certain professional and theoretical background to carry out vehicle dynamics analysis, and most non-power professionals do not know how to operate simulation software. Therefore, if non-power professionals want to know the impact of component parameter data modification on vehicle power, they can only ask power professionals to help run the simulation task after the parameters are modified, resulting in low simulation efficiency. Summary of the invention
[0004] Based on this, a power simulation method, system, computer device and storage medium are provided to solve the problem that in the prior art, only power professionals can help to manually run the simulation tasks after modifying the parameters, and the running operations are mostly highly repetitive operations, resulting in low simulation efficiency.
[0005] In a first aspect, the present application provides a power simulation method, the method comprising:
[0006] Receive a target simulation task of a target basic power model sent by a client; wherein the target simulation task includes modified target component parameter data, target operating conditions and target data identifier corresponding to the target basic power model;
[0007] Acquire a target basic model file corresponding to the target basic power model through the target data identifier, and query target pre-configured component information corresponding to the target basic power model;
[0008] Merging the target pre-configuration component information with the target basic model file to generate a target model file;
[0009] A target simulation request is generated based on the target model file and the target simulation task, and the target simulation request is sent to the simulation end, so that the simulation end calls the simulation component to update the modified target component parameter data and the target operating condition to the target model file based on the target simulation request, and performs simulation calculations on the updated target model file to obtain a power simulation result.
[0010] Through the above method, the user only needs to submit a target simulation task containing modified target component parameter data, target operating conditions and target data identifiers corresponding to the target basic power model on the client, and the simulation end can be automatically called. Based on the simulation end, the modified target component parameter data and target operating conditions are updated to the target model file corresponding to the target basic power model, and simulation calculations are performed on the updated target model file to obtain power simulation results, thereby reducing the steps that require manual operation, reducing the operation time of the simulation process, and improving simulation efficiency.
[0011] In one embodiment, before receiving the target simulation task of the target basic power model sent by the client, the method further includes:
[0012] Upon receiving an import request for a local initial model file sent by the client, querying pre-configured component information corresponding to the local initial model file based on the import request; wherein the import request includes a model parsing interface;
[0013] Merging the pre-configured component information with the local initial model file to generate a local power model file;
[0014] Generate a parsing request based on the local power model file and the import request, and send the parsing request to the simulation end through the model parsing interface, so that the simulation end calls the simulation component to parse the local power model file based on the parsing request to obtain a parsing result;
[0015] The analysis result is obtained, and the analysis result is stored in a database as a basic model file corresponding to a local power model, so that the database generates a data identifier corresponding to the basic model file, and returns the data identifier to the client.
[0016] Through the above method, the local power model file is parsed, the parsing result is stored as the basic model file corresponding to the local power model, and the data identifier corresponding to the basic model file is generated, and the local power model is displayed on the client as the basic power model, so that any user can initiate the simulation task of the basic power model on the client, so that non-power professionals only need to pay attention to the relevant data in their own field to perform efficient simulation with instant modification and instant operation. It also allows users to initiate multiple simulation tasks at the same time, and can provide historical data comparison to improve simulation efficiency.
[0017] In one embodiment, after obtaining the target basic model file corresponding to the target basic power model through the target data identifier, the method further includes:
[0018] Creating a target workspace corresponding to the target simulation task, and generating a configuration file corresponding to the target workspace based on the target simulation task;
[0019] The target base model file is copied to the target workspace.
[0020] Through the above method, a target workspace corresponding to the target simulation task is created so that the target workspace can record relevant data of the target simulation task, and by copying the target basic model file to the target workspace, when the user initiates the simulation task of the target basic power model again, there is no need to obtain the target basic model file again, thereby improving the simulation efficiency.
[0021] In one embodiment, after sending the target simulation request to the simulation end, the method further includes:
[0022] Obtaining the running state and power simulation result of the target simulation task; wherein the running state is one of waiting to run, running, running failure and running completion, and the power simulation result at least includes energy consumption data and curve data of component parameter data changing with time when the component runs in the target working condition;
[0023] A log corresponding to the target simulation task is generated based on the operating status and the power simulation result, and the log is stored in a target workspace, and the power simulation result is written into the target workspace in a preset manner.
[0024] Through the above method, the running status and dynamic simulation results of the target simulation task are polled and stored in the target workspace for easy retrieval.
[0025] In one embodiment, the method further comprises:
[0026] receiving a result quick-view query request for the target simulation task sent by the client, and reading a task result data file in the target workspace based on the result quick-view query request;
[0027] The result data in the task result data file is returned to the client, so that the client renders the result data into a first web page and displays the first web page.
[0028] By using the above method, when a result quick-view query request is received, the task result data file can be quickly read from the target workspace, so that the client renders the result data in the task result data file into a first web page and displays the first web page for user viewing.
[0029] In one embodiment, the method further comprises:
[0030] Receiving a component result quick-view query request of the target simulation task sent by the client, and reading a component result description file in the target workspace and a curve data file associated with the component result description file based on the component result quick-view query request;
[0031] The curve result data in the curve data file is returned to the client, so that the client renders the curve result data into a curve graph and displays the curve graph.
[0032] Through the above method, when a component result quick-view query request is received, the component result data file and the curve data file associated with the component result description file can be quickly read from the target workspace, so that the client can render the curve result data in the curve data file into a curve graph and display the curve graph, so that users can quickly query the change trend of key data of each component over time during the entire operating cycle.
[0033] In one embodiment, the method further comprises:
[0034] Receiving a log query request of the target simulation task sent by the client, and reading a log file in the target workspace based on the log query request;
[0035] The log data in the log file is returned to the client, so that the client renders the log data into a second web page and displays the second web page.
[0036] Through the above method, when a log query is received, the log file can be quickly read from the target workspace, so that the client can render the log data in the log file into a second web page and display the first web page for user viewing. When a problem occurs in the simulation, the problem can be quickly located and solved.
[0037] In a second aspect, the present application provides a power simulation system, the system comprising a client, a server and a simulation end, wherein:
[0038] The client is used to generate a target simulation task corresponding to a target basic power model, and send the target simulation task to the server; wherein the target simulation task includes modified target component parameter data, target operating conditions and target data identifier corresponding to the target basic power model;
[0039] The server is used to receive a target simulation task of a target basic power model sent by a client; obtain a target basic model file corresponding to the target basic power model through the target data identifier, and query the target pre-configuration component information corresponding to the target basic power model; merge the target pre-configuration component information with the target basic model file to generate a target model file; generate a target simulation request based on the target model file and the target simulation task, and send the target simulation request to the simulation terminal;
[0040] The simulation end is used to receive the target simulation request, and based on the target simulation request, call the simulation component to update the modified target component parameter data and the target operating condition to the target model file, and perform simulation calculations on the updated target model file to obtain a power simulation result.
[0041] In a third aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the power simulation method of the first aspect when executing the computer program.
[0042] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the power simulation method of the first aspect is implemented.
[0043] The above-mentioned power simulation method, system, computer equipment and storage medium can automatically call the simulation end, and update the modified target component parameter data and target operating conditions to the target model file corresponding to the target basic power model based on the simulation end, and perform simulation calculations on the updated target model file to obtain power simulation results, thereby reducing the steps that require manual operation, reducing the operation time of the simulation process, and improving simulation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A structural block diagram of a power simulation system in one embodiment;
[0045] Figure 2 A schematic diagram of a flow chart of a power simulation method in one embodiment;
[0046] Figure 3 A schematic diagram of a flow chart of a model importing method in one embodiment;
[0047] Figure 4 A schematic diagram of a flow chart of a data storage method in one embodiment;
[0048] Figure 5 A timing diagram of a power simulation process in one embodiment;
[0049] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, and A and B exist, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0051] In order to facilitate understanding by those skilled in the art, the technical terms involved in the embodiments of the present application are first explained.
[0052] (1) JavaScript is a high-level, interpreted programming language that is mainly used to build interactive interfaces for web pages and applications. It allows developers to achieve dynamic effects on web pages and respond to user behavior. It is also used in server-side programming, mobile application development and other platforms.
[0053] (2) JavaScript Object Notation (JSON) is an open standard file format and data exchange format that is easy for humans to read and write, and easy for machines to parse and generate. JSON is a commonly used data format that has many uses in electronic data exchange, including data exchange between web applications and servers.
[0054] (3) Hypertext Transfer Protocol (HTTP) is a simple request-response protocol that usually runs on top of Transmission Control Protocol (TCP). It specifies what messages a client may send to a server and what responses it may receive.
[0055] (4) MongoDB, a distributed document storage database, is designed to provide a scalable, high-performance data storage solution for web applications. MongoDB is a product between relational and non-relational databases. It is the most feature-rich and relational database among non-relational databases. The data structure it supports is very loose and can store relatively complex data types. The biggest feature of Mongo is that the query language it supports is very powerful, which can almost realize most of the functions of single-table queries similar to relational databases, and it also supports indexing of data.
[0056] (5) Relational database management system MySQL is an open source small relational database management system. Currently, MySQL is widely used in small and medium-sized websites on the Internet. Due to its small size, fast speed, low total cost of ownership, and especially its open source feature, many small and medium-sized websites choose MySQL as their website database in order to reduce the total cost of ownership of the website. Relational databases store data in different tables instead of putting all data in a large warehouse.
[0057] (6) Polling is a method by which the central processing unit (CPU) decides how to provide services to peripheral devices, also known as "programmed input and output". The concept of polling is that the CPU periodically sends out inquiries to each peripheral device in order to see if it needs its service. If so, it will provide service. After the service is completed, it will ask the next peripheral device, and then repeat the process over and over again.
[0058] The following is a brief description of the background technology of this application.
[0059] At present, vehicle power economy simulation mainly involves highly repetitive work such as manual modeling, parameter adjustment, submission, result query and data comparison on simulation software. This simulation method has the following problems:
[0060] 1. When operating the simulation software, the process is fixed and repetitive. For example, parameters are repeatedly modified. First, a specific component is selected, the corresponding component parameter data is found, and then the data is modified and the simulation task is run. The overall process is time-consuming, resulting in low simulation efficiency.
[0061] Second, most simulation software requires certain professional and theoretical background to carry out vehicle dynamics analysis, and most non-power professionals do not know how to operate simulation software. Therefore, if non-power professionals want to know the impact of component parameter data modification on vehicle dynamics, they can only ask power professionals to help run simulation tasks after parameter modification, resulting in low simulation efficiency.
[0062] 3. Simulation software is charged according to the number of licenses and is expensive. In order to save costs, most of the time multiple people share a set of simulation software, resulting in competition for its use.
[0063] 4. Data and semi-automatic scripts are not in the same system, and all functions cannot be operated in one place. For example, after completing the simulation task through script execution, you still need to go to the simulation software to view the process results, task status, etc.
[0064] 5. There is no unified data storage method, no data sharing, and no full-process data tracking. These functions need to be customized and developed according to user needs.
[0065] In order to solve the above problems, an embodiment of the present application provides a power simulation system. Figure 1 FIG. 1 is a structural block diagram of a power simulation system in one embodiment. Figure 1 As shown, the system mainly includes a client 102, a server 104 and a simulation terminal 106. The client 102 communicates with the server 104 through a network, and the client 102 can call the simulation component of the simulation terminal 106 by calling the HTTP interface provided by the server 104, wherein the simulation component can be simulation software, simulation program, etc., and the simulation software is used as an example for description in this embodiment.
[0066] Exemplarily, the client 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The client 102 is used to display the simulation platform web interface, which includes the power simulation process and model maintenance.
[0067] On the one hand, in response to the user's model maintenance selection operation on the simulation platform web page interface, the power simulation engineering model library interface is displayed; wherein, the power simulation engineering model library interface includes importing engineering files; in response to the user uploading the local initial model file by importing the engineering file, an import request for the local initial model file is generated, and the import request is uploaded to the server 104 via HTTP, wherein the import request includes the HTTP model parsing interface provided by the server 104 called by the client 102 through the JavaScript script. So that the server 104 calls the simulation end 106 through the HTTP model parsing interface to parse the local initial model file, obtain the parsing result, and store the parsing result in MongoDB. At this time, MongoDB will generate a data identifier corresponding to the parsing result, and return the data identifier to the client 102.
[0068] Furthermore, when the client 102 receives the data identifier, a first window pops up in the power simulation engineering model library interface, wherein the first window is used to prompt the user that the model has been imported successfully. At this time, the power simulation engineering model library interface will display the local initial model identifier, and the local initial model identifier will be displayed as the basic power model identifier in the power simulation process interface of the simulation platform web interface.
[0069] In addition, the power simulation engineering model library interface also provides a model detail query function. Specifically: in response to the user's detailed query operation on the model in the power simulation engineering model library interface, a model query request is generated and sent to the server 104, wherein the model query request includes a data identifier corresponding to the model, so that when the server 104 receives the model query request, it queries the model specific information from MongoDB through the data identifier, including all sub-models of the model, all components of the model, and all working conditions included in the model, and returns the model specific information to the client 102.
[0070] Furthermore, the client 102 renders the model specific information into an HTML structured interface through JavaScript scripts and displays it to the user, so that the user can intuitively see the model specific information.
[0071] In addition, the power simulation engineering model library interface also provides a model deletion function. Specifically: in response to the user's deletion selection operation for the model in the power simulation engineering model library interface, a model deletion request is generated and sent to the server 104, wherein the model deletion request includes a data identifier corresponding to the model, so that when the server 104 receives the model deletion request, it deletes the model specific information from MongoDB through the data identifier, including all sub-models of the model, all components of the model, and all working conditions included in the model, and returns a model deletion response to the client 102.
[0072] Furthermore, when the client 102 receives the model deletion response, a second window pops up in the power simulation engineering model library interface, wherein the second window is used to prompt the user that the model has been successfully deleted.
[0073] On the other hand, in response to the user's power simulation process selection operation on the simulation platform web interface, the power simulation process interface is displayed, wherein the first sub-interface in the power simulation process interface is used to display the identification of each basic power model; in response to the user's task creation operation on the target basic power model in the first sub-interface, the components, component parameter data and operating condition options corresponding to the target basic power model are automatically displayed in the second sub-interface of the power simulation process interface through JavaScript scripts.
[0074] In response to the user's target component parameter data modification operation and target operating condition selection operation (multiple selections are allowed, and multiple operating conditions can be run at one time) on the second sub-interface, a target simulation task of the target basic power model is generated, for example, all the generated data is assembled into JSON format parameters, i.e., the target simulation task, through a JavaScript script, and the target simulation task is sent to the server 104, wherein the target simulation task includes the modified target component parameter data, target operating condition, and target data identifier corresponding to the target basic power model. The server 104 calls the simulation terminal 106 through HTTP to execute the target simulation task.
[0075] In one embodiment, the user may be prompted in the second sub-interface that the component parameter data corresponding to the user's authority can be modified (implemented through the authority configuration of the server 104). Specifically: in response to the user's task creation operation for the target basic power model in the first sub-interface, the corresponding user role is determined according to the user identifier, and the corresponding modifiable component parameter data is determined based on the user role.
[0076] In one embodiment, the power simulation process interface also includes a task list management function, a task result quick view function, a component result quick view function, and a task log query function. Specifically:
[0077] When the user clicks to query the task list in the power simulation process interface, the client 102 generates a simulation record query request and sends the simulation record query request to the server 104, so that the server 104 queries all simulation tasks, including tasks in progress, failed to run, and completed, and returns them to the client 102. The client 102 dynamically renders these data into an html sub-page through a JavaScript script and displays the html sub-page.
[0078] When the user clicks on the result overview query of the target simulation task in the power simulation process interface, the client 102 generates a result overview query request and sends the result overview query request to the server 104, so that the server 104 reads the result data based on the result overview query request and returns it to the client 102. The client 102 dynamically renders the result data into a first web page (html subpage) through a JavaScript script and displays the first web page.
[0079] When the user clicks on the component result overview query of the target simulation task in the power simulation process interface and selects a specific working condition and a specific component channel data, the client 102 generates a component result overview query request and sends the component result overview query request to the server 104, so that the server 104 reads the curve result data based on the component result overview query request and returns it to the client 102. The client 102 dynamically renders the curve result data into a curve graph through a JavaScript script and displays the curve graph, for example, a curve graph of data such as the speed of the whole vehicle at each moment and the voltage of the battery pack.
[0080] When the user clicks to query the log of the target simulation task in the power simulation process interface, the client 102 generates a log query request and sends the log query request to the server 104, so that the server 104 reads the log data based on the log query request and returns it to the client 102. The client 102 dynamically renders the log data into a second web page (html subpage) through a JavaScript script and displays the second web page.
[0081] For example, the server 104 can be implemented as an independent server or a server cluster composed of multiple servers. The server 104 is used to process all requests from users and integrate all basic general functions, data analysis, historical data query and other general functions. Specifically:
[0082] On the one hand, when the server 104 receives the import request of the local initial model file uploaded by the client 102, it queries the pre-configured component information corresponding to the local initial model file from the MySQL database based on the import request, and merges the pre-configured component information with the local initial model file to generate a local power model file, wherein the local power model file is JSON format data. Then, a parsing request is generated based on the local power model file and the import request, and the parsing request is sent to the simulation end 106 through the model parsing interface, so that the simulation end 106 calls the simulation software to parse the local power model file based on the parsing request, obtains the parsing result, and returns the parsing result.
[0083] Furthermore, the server 104 obtains the analysis result, and stores the analysis result as a basic model file corresponding to the local power model in MongoDB, so that MongoDB generates a data identifier corresponding to the basic model file, and returns the data identifier to the client 102 .
[0084] On the other hand, the server 104 receives the target simulation task of the target basic power model sent by the client 102; wherein the target simulation task includes the modified target component parameter data, target operating conditions and target data identifier corresponding to the target basic power model. Then, the target basic model file corresponding to the target basic power model is obtained from MongoDB through the target data identifier, and the target pre-configured component information corresponding to the target basic power model is queried from the MySQL database. Then, the target pre-configured component information is merged with the target basic model file to generate a target model file, wherein the target model file is JSON format data, and a target simulation request is generated based on the target model file and the target simulation task.
[0085] The target simulation request is sent to the simulation terminal 106 via HTTP, so that the simulation terminal 106 calls the simulation software to update the modified target component parameter data and target operating conditions to the target model file based on the target simulation request, and performs simulation calculations on the updated target model file to obtain the power simulation results.
[0086] In one embodiment, after obtaining the target basic model file corresponding to the target basic power model through the target data identifier, the server 104 will also create a target workspace corresponding to the target simulation task, and generate a configuration file corresponding to the target workspace based on the target simulation task, such as the information of the task submitter, and copy the obtained target basic model file to the target workspace.
[0087] In addition, when the server 104 calls the simulation end 106 to perform simulation calculations on the updated target model file, it will also obtain the operating status and power simulation results of the target simulation task; wherein the operating status is one of waiting to run, running, failed to run and completed to run, and the power simulation results include at least energy consumption data, and curve data of component parameter data changing with time when the component is running in the target working condition.
[0088] Furthermore, the server 104 generates a log corresponding to the target simulation task based on the acquired operating status and power simulation results, stores the log in the target workspace, and writes the power simulation results into the target workspace in a preset manner, for example, writing the energy consumption data into the task result data file in the target workspace, and writing the component-related description (for example, the corresponding working condition) into the component description file in the target workspace, and writing the curve data of the component parameter data changing with time when the component is running in the target working condition into the curve data file associated with the component description file for user query.
[0089] Based on this, when the server 104 receives the result overview query request of the target simulation task sent by the client 102 , it reads the task result data file in the target workspace based on the result overview query request and returns the result data in the task result data file to the client 102 .
[0090] When the server 104 receives the component result overview query request of the target simulation task sent by the client 102, it reads the component result description file in the target workspace and the curve data file associated with the component result description file based on the component result overview query request, and returns the curve result data in the curve data file to the client 102.
[0091] When receiving the log query request of the target simulation task sent by the client 102 , the server 104 reads the log file in the target workspace based on the log query request, and returns the log data in the log file to the client 102 .
[0092] In one embodiment, when receiving a simulation task, the server 104 generates a task record with a running status of "to be run" and stores it in the MySQL database. Thus, the server 104 finds the simulation task to be run by polling the MySQL database, thereby preventing the server 104 from missing simulation tasks. The server 104 can find 5 simulation tasks at a time. At the same time, when the server 104 obtains the running status of the simulation task from the simulation terminal 106, it will also update it to the MySQL database in real time, so that the client 102 can query the running status of the current task at any time.
[0093] Based on this, when the server 104 receives the simulation record query request sent by the client 102 , it queries all simulation tasks from the MySQL database based on the simulation record query request and returns them to the client 102 .
[0094] In one embodiment, the server 104 also generates a message including the target simulation task, and stores the message in a simulation history database, so as to accumulate simulation history data for subsequent use in artificial intelligence prediction and other related purposes.
[0095] Exemplarily, the simulation terminal 106 is used to integrate the simulation software, and the execution operation of the simulation software is encapsulated through Python code, and all operations with the simulation software are executed through it. Specifically:
[0096] On the one hand, when the simulation end 106 receives the parsing request sent by the server end 104, it downloads or copies the local power model file from the parsing request, and calls the simulation software through the internally defined Python code to parse the local power model file. The parsed data includes: all sub-models in the model, all components of the model, all parameter names and default parameter data of each component, and a collection of all working conditions contained in the model, and obtains the initial parsing result. After converting the initial parsing result into JSON type data, it returns it to the server end 104 as the parsing result.
[0097] On the other hand, when the simulation end 106 receives the target simulation request sent by the server end 104, it downloads or copies the target model file from the target simulation request, and calls the simulation software through the internally defined Python code to update the modified target component parameter data and target operating conditions to the target model file. Then, it calls the task submission interface of the simulation software through the Python code, and passes the updated target model file into the simulation software to perform simulation calculations.
[0098] Then, the simulation end 106 polls to detect whether the simulation software has completed the calculation of the target simulation task, generates the running status of the target simulation task, and writes it into the file storage, wherein the running status is one of waiting to be run, running, running failure and running completion.
[0099] When it is detected that the simulation software has completed the simulation calculation, the simulation end 106 reads the power simulation result through a pre-defined Python script, and converts its energy consumption data per 100 kilometers into an easy-to-read JSON format, and writes it into a file storage device. In addition, the curve data of the component parameter data changing over time when the component is running in the target working condition is converted into a combination of JSON format and custom text format, and written into the file storage device, so that the server end 104 can obtain the operating status and power simulation results by polling the file storage device.
[0100] Based on the above system, a power simulation method provided in an embodiment of the present application only requires the user to submit a target simulation task including the modified target component parameter data, target operating conditions and target data identifier corresponding to the target basic power model on the client, and the simulation end can be automatically called, and the modified target component parameter data and target operating conditions are updated to the target model file corresponding to the target basic power model based on the simulation end, and the simulation calculation is performed on the updated target model file to obtain the power simulation result, thereby reducing the steps that require manual operation, reducing the operation time of the simulation process, and improving the simulation efficiency. Among them, the method and system described in the embodiment of the present application are based on the same technical concept. Since the principles of the problems solved by the method and the system are similar, the embodiments of the system and the method can refer to each other, and the repeated parts will not be repeated.
[0101] Figure 2 FIG. 1 is a schematic diagram of a flow chart of a power simulation method in an embodiment, and the flow chart can be executed by a power simulation system. Figure 2 As shown, the process includes the following steps:
[0102] S201, receiving a target simulation task of a target basic power model sent by a client;
[0103] The target simulation task includes modified target component parameter data, target operating conditions and target data identification corresponding to the target basic power model.
[0104] Specifically, the user first passes through Figure 1 The client 102 shows a simulation platform web page interface, and clicks on the power simulation process. At this time, the client 102 displays the power simulation process interface. When the user selects the target basic power model in the power simulation process interface and right-clicks on the new task, the browser JavaScript script automatically generates a sub-webpage for modifying the component parameter data of the model and selecting the working condition, and prompts the user through the user's account authority that the component parameter data related to his authority can be modified (this function is realized through the authority configuration of the server 104).
[0105] Furthermore, after the user modifies the target component parameter data and selects the target operating conditions to be run (multiple selections are allowed, and multiple operating conditions can be run at one time), he clicks to submit the task. The browser JavaScript script will assemble all model data (for example, the modified target component parameter data, the target data identifier of the target basic power model, etc.) and the target operating conditions into parameters in JSON format, thereby generating a target simulation task and sending it to the server 104.
[0106] In one embodiment, when receiving a simulation task, the server 104 generates a task record with a running status of "to be run" and stores it in the MySQL database. Thus, the server 104 finds the simulation task to be run by polling the MySQL database, thereby preventing the server 104 from missing the simulation task. The server 104 can find 5 simulation tasks at a time. This allows multiple people to perform multi-task simulation calculations on a set of simulation software at the same time, and can track the trend of the overall power simulation results within the simulation cycle.
[0107] At the same time, when the running state of the simulation task obtained from the simulation terminal 106 changes, the server 104 will also update it to the MySQL database in real time, so that the client 102 can query the running state of the current task at any time. Specifically, the power simulation process interface also includes a task list management function. When the user clicks to query the task list in the power simulation process interface, the client 102 will generate a simulation record query request and send the simulation record query request to the server 104. When the server 104 receives the simulation record query request sent by the client 102, it queries all simulation tasks from the MySQL database, including tasks in operation, failed operation and completed operation, and returns to the client 102. The client 102 dynamically renders these data into html subpages through JavaScript scripts and displays the html subpages.
[0108] In one embodiment, the server 104 also generates a message including the target simulation task, and stores the message in a simulation history database, so as to accumulate simulation history data.
[0109] S202, obtaining a target basic model file corresponding to a target basic power model through a target data identifier, and querying target pre-configured component information corresponding to the target basic power model;
[0110] In the embodiment of the present application, a target workspace corresponding to the target simulation task can be created, the acquired target basic model file can be copied to the target workspace, and a configuration file corresponding to the target workspace can be generated based on the target simulation task, such as the information of the task submitter. Therefore, when the simulation task of the target basic power model is initiated again, there is no need to re-acquire the target basic model file, thereby improving the simulation efficiency.
[0111] S203, merging the target pre-configured component information with the target basic model file to generate a target model file;
[0112] The target model file is in JSON format.
[0113] S204, generates a target simulation request based on the target model file and the target simulation task, and sends the target simulation request to the simulation end, so that the simulation end calls the simulation component to update the modified target component parameter data and target operating conditions to the target model file based on the target simulation request, and performs simulation calculations on the updated target model file to obtain a power simulation result.
[0114] Specifically, the server 104 sends the target simulation request to the simulation terminal 106 via HTTP. After receiving the target simulation request, the simulation terminal 106 downloads or copies the target model file from the target simulation request, and calls the simulation software through the internally defined Python code to update the modified target component parameter data and target working conditions to the target model file, and then calls the task submission interface of the simulation software through the Python code to pass the updated target model file into the simulation software to perform simulation calculations.
[0115] Then, the simulation end 106 polls to detect whether the simulation software has completed the calculation of the target simulation task, generates the running status of the target simulation task, and writes it into the file storage, wherein the running status is one of waiting to be run, running, running failure and running completion.
[0116] When it is detected that the simulation software has completed the simulation calculation, the simulation end 106 reads the power simulation result through a pre-defined Python script, and converts its energy consumption data per 100 kilometers into an easy-to-read JSON format, and writes it into a file storage device. In addition, the curve data of the component parameter data changing over time when the component is running in the target working condition is converted into a combination of JSON format and custom text format, and written into the file storage device, so that the server end 104 can obtain the operating status and power simulation results by polling the file storage device.
[0117] Through the above method, the steps that require manual operation are reduced, the operation time of the simulation process is reduced, the simulation efficiency is improved, and a simulation platform web interface that is more friendly to non-power professionals is built, so that non-power professionals only need to pay attention to the relevant data in their own field to perform efficient simulation with instant modification and instant operation, thereby lowering the simulation operation threshold for users.
[0118] In one embodiment, before step S201 , the target basic power model needs to be imported first. Figure 3 FIG. 1 is a flow chart of a model import method in an embodiment, such as Figure 3 As shown, the process specifically includes the following steps:
[0119] S301, when receiving an import request for a local initial model file sent by a client, querying pre-configured component information corresponding to the local initial model file based on the import request;
[0120] Specifically, the user chooses to import the local initial model file in the power simulation engineering model library interface of the simulation platform web interface of the client 102. At this time, the client 102 generates an import request for the local initial model file and uploads the import request to the server 104 via HTTP, wherein the import request includes the HTTP model parsing interface provided by the server 104 called by the client 102 through a JavaScript script.
[0121] When receiving the import request uploaded by the client 102 , the server 104 queries the MySQL database for pre-configured component information corresponding to the local initial model file based on the import request.
[0122] S302, merging the pre-configured component information with the local initial model file to generate a local power model file;
[0123] Among them, the local power model file is JSON format data.
[0124] S303, generating a parsing request based on the local power model file and the import request, and sending the parsing request to the simulation end through the model parsing interface, so that the simulation end calls the simulation component to parse the local power model file based on the parsing request to obtain a parsing result;
[0125] Specifically, when the simulation end 106 receives the parsing request sent by the server end 104, it downloads or copies the local power model file from the parsing request, and calls the simulation software through the internally defined Python code to parse the local power model file, wherein the parsed data includes: all sub-models in the model, all components of the model, all parameter names and default parameter data of each component, and a collection of all working conditions included in the model, to obtain an initial parsing result, and after converting the initial parsing result into JSON type data, it returns it as a parsing result to the server end 104.
[0126] S304, obtaining the analysis result, and storing the analysis result as the basic model file corresponding to the local power model in the database, so that the database generates a data identifier corresponding to the basic model file, and returns the data identifier to the client.
[0127] After obtaining the analysis result, the server 104 stores the analysis result as the basic model file corresponding to the local power model in MongoDB, so that MongoDB generates a data identifier corresponding to the basic model file and returns the data identifier to the client 102 .
[0128] When the client 102 receives the data identifier, a first window pops up in the power simulation engineering model library interface, wherein the first window is used to prompt the user that the model has been successfully imported. At this time, the power simulation engineering model library interface will display the local initial model identifier, and the local initial model identifier will be displayed as the basic power model identifier in the power simulation process interface of the simulation platform web interface.
[0129] In one embodiment, the power simulation engineering model library interface of the client 102 also provides a model details query function. Specifically: the user selects a previously imported model in the power simulation engineering model library interface and clicks to view the model details. At this time, the client 102 generates a model query request and sends it to the server 104, wherein the model query request includes a data identifier corresponding to the model. When receiving the model query request, the server 104 queries the model specific information from MongoDB through the data identifier, including all sub-models of the model, all components of the model, and all working conditions included in the model, and returns the model specific information to the client 102.
[0130] Furthermore, the client 102 renders the model specific information into an HTML structured interface through JavaScript scripts and displays it to the user, so that the user can intuitively see the model specific information.
[0131] In one embodiment, the power simulation engineering model library interface of the client 102 also provides a model deletion function. Specifically: the user selects a previously imported model in the power simulation engineering model library interface and clicks to delete the model. At this time, the client 102 generates a model deletion request and sends it to the server 104, wherein the model deletion request includes a data identifier corresponding to the model. When the server 104 receives the model deletion request, it deletes the model specific information from MongoDB through the data identifier and returns a model deletion response to the client 102.
[0132] Furthermore, when the client 102 receives the model deletion response, a second window pops up in the power simulation engineering model library interface, wherein the second window is used to prompt the user that the model has been successfully deleted.
[0133] In one embodiment, after the target simulation request is sent to the simulation end in S204, the power simulation result needs to be stored for the convenience of the user to view the power simulation result. Figure 4 FIG. 1 is a flow chart of a data storage method in an embodiment. Figure 4 As shown, the process specifically includes the following steps:
[0134] S401, obtaining the running status and power simulation results of the target simulation task;
[0135] The operation status includes one of waiting to operate, operating, operation failure and operation completion, and the power simulation result includes at least energy consumption data and curve data of component parameter data changing with time when the component operates in the target working condition.
[0136] Specifically, the server 104 obtains the operating status and power simulation results by polling the file storage.
[0137] S402, generating a log corresponding to the target simulation task based on the running status and the power simulation result, storing the log in the target workspace, and writing the power simulation result into the target workspace in a preset manner.
[0138] Specifically, the log is stored in the log file in the target workspace; the energy consumption data per 100 kilometers in the power simulation results is written into the task result data file in the target workspace, and the component-related description (for example, the corresponding working condition) is written into the component description file in the target workspace, and the curve data of the component parameter data changing with time when the component is running in the target working condition is written into the curve data file associated with the component description file for user query.
[0139] In one embodiment, the power simulation process interface also includes a task result quick view function, a component result quick view function, and a task log query function. Specifically:
[0140] When the user clicks to query the result overview of the target simulation task in the power simulation process interface, the client 102 generates a result overview query request and sends the result overview query request to the server 104. When the server 104 receives the result overview query request sent by the client 102, it reads the task result data file in the target workspace based on the result overview query request and returns the result data in the task result data file to the client 102.
[0141] Furthermore, when the client 102 receives the result data, it dynamically renders the result data into a first web page (html sub-page) through a JavaScript script and displays the first web page.
[0142] When the user clicks on the component result overview query of the target simulation task in the power simulation process interface and selects a specific working condition and a specific component channel data, the client 102 generates a component result overview query request and sends the component result overview query request to the server 104. When the server 104 receives the component result overview query request sent by the client 102, it reads the component result description file in the target workspace and the curve data file associated with the component result description file based on the component result overview query request, and returns the curve result data in the curve data file to the client 102.
[0143] Furthermore, when the client 102 receives the curve result data, it dynamically renders the curve result data into a curve graph through a JavaScript script, and displays the curve graph, for example, a curve graph of data such as the speed of the entire vehicle at each moment, the voltage of the battery pack, etc.
[0144] When the user clicks to query the log of the target simulation task in the power simulation process interface, the client 102 generates a log query request and sends the log query request to the server 104. When receiving the log query request sent by the client 102, the server 104 reads the log file in the target workspace based on the log query request and returns the log data in the log file to the client 102.
[0145] Furthermore, when receiving the log data, the client 102 dynamically renders the log data into a second web page (html subpage) through a JavaScript script, and displays the second web page.
[0146] It should be understood that although Figure 2-4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0147] In order to further elaborate on a power simulation method provided by the present application, the following is an explanation through a specific power simulation process. Figure 5 As shown, it is a timing diagram of a power simulation process in an embodiment, including: a browser 501, a simulation platform backend service 502, a power simulation capability integration system 503 and professional simulation software 504, wherein the browser 501 is equivalent to Figure 1 The client 102 in the simulation platform backend service 502 is equivalent to Figure 1 The server 104, the power simulation capability integration system 503 and the professional simulation software 504 are equivalent to Figure 1 The simulation terminal 106 in the embodiment.
[0148] Exemplarily, a user initiates a target simulation task of a target basic power model through a browser 501 and submits the target simulation task to a simulation platform backend service 502, wherein the target simulation task includes modified target component parameter data, target operating conditions and target data identifiers corresponding to the target basic power model.
[0149] After receiving the target simulation task, the simulation platform backend service 502 creates a corresponding task path and stores parameter information and model information corresponding to the target simulation task, wherein the parameter information includes the modified target component parameter data, target working condition and target data identifier, and the model information includes the target basic model file and target pre-configured component information corresponding to the target basic power model. Then, a target simulation request is generated based on the parameter information and the model information, and the target simulation request is sent to the power simulation capability integration system 503.
[0150] When receiving the target simulation request, the power simulation capability integration system 503 stores the target simulation request, and polls and executes the simulation request. Specifically, the power simulation capability integration system 503 downloads or copies the target model file from the target simulation request, and calls the professional simulation software 504 through the internally defined Python code to update the modified target component parameter data and target working conditions to the target model file, and then calls the task submission interface of the professional simulation software 504 through the Python code to pass the updated target model file into the simulation software to perform simulation calculations.
[0151] When the professional simulation software 504 is executing the simulation calculation, the power simulation capability integration system 503 will poll the professional simulation software 504 to query the simulation operation progress and power simulation results. When it is detected that the professional simulation software 504 has completed the simulation calculation, the power simulation capability integration system 503 reads the power simulation results through the pre-defined Python script, and transmits the simulation operation progress and power simulation results back or copies them to the simulation platform backend service 502 for storage.
[0152] Furthermore, when the user initiates a quick-view query request (including quick-view of results and quick-view of component results) of the target simulation task in the browser 501, the quick-view query request is sent to the simulation platform backend service 502. After receiving the quick-view query request, the simulation platform backend service 502 obtains corresponding result data from the power simulation result based on the quick-view query request, and returns the corresponding result data to the browser 501. After receiving the corresponding result data, the browser 501 displays it to the user.
[0153] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store power simulation data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a power simulation method is implemented.
[0154] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0155] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0156] Receive a target simulation task of a target basic power model sent by a client; wherein the target simulation task includes modified target component parameter data, target operating conditions and target data identifier corresponding to the target basic power model;
[0157] Obtain a target basic model file corresponding to the target basic power model through the target data identifier, and query the target pre-configured component information corresponding to the target basic power model;
[0158] Merge the target pre-configured component information with the target basic model file to generate a target model file;
[0159] A target simulation request is generated based on the target model file and the target simulation task, and the target simulation request is sent to the simulation end, so that the simulation end calls the simulation component to update the modified target component parameter data and target operating conditions to the target model file based on the target simulation request, and performs simulation calculations on the updated target model file to obtain a dynamic simulation result.
[0160] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0161] Upon receiving an import request for a local initial model file sent by a client, querying pre-configured component information corresponding to the local initial model file based on the import request; wherein the import request includes a model parsing interface;
[0162] Merge the pre-configured component information with the local initial model file to generate a local power model file;
[0163] Generate a parsing request based on the local power model file and the import request, and send the parsing request to the simulation end through the model parsing interface, so that the simulation end calls the simulation component to parse the local power model file based on the parsing request to obtain the parsing result;
[0164] The analysis result is obtained, and the analysis result is stored in the database as the basic model file corresponding to the local power model, so that the database generates a data identifier corresponding to the basic model file, and returns the data identifier to the client.
[0165] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0166] Create a target workspace corresponding to the target simulation task, and generate a configuration file corresponding to the target workspace based on the target simulation task;
[0167] Copy the target base model file to the target workspace.
[0168] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0169] Obtaining the running status and power simulation results of the target simulation task; wherein the running status includes one of waiting to run, running, running failure and running completion, and the power simulation results at least include energy consumption data and curve data of component parameter data changing with time when the component runs in the target working condition;
[0170] A log corresponding to the target simulation task is generated based on the running status and the power simulation result, and the log is stored in the target workspace, and the power simulation result is written into the target workspace in a preset manner.
[0171] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0172] Receive a result quick-view query request for a target simulation task sent by a client, and read the task result data file in the target workspace based on the result quick-view query request;
[0173] The result data in the task result data file is returned to the client, so that the client renders the result data into a first web page and displays the first web page.
[0174] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0175] Receive a component result quick-view query request of a target simulation task sent by a client, and read a component result description file in a target workspace and a curve data file associated with the component result description file based on the component result quick-view query request;
[0176] The curve result data in the curve data file is returned to the client, so that the client renders the curve result data into a curve graph and displays the curve graph.
[0177] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0178] Receive a log query request for a target simulation task sent by a client, and read a log file in a target workspace based on the log query request;
[0179] The log data in the log file is returned to the client, so that the client renders the log data into a second web page and displays the second web page.
[0180] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0181] Receive a target simulation task of a target basic power model sent by a client; wherein the target simulation task includes modified target component parameter data, target operating conditions and target data identifier corresponding to the target basic power model;
[0182] Obtain a target basic model file corresponding to the target basic power model through the target data identifier, and query the target pre-configured component information corresponding to the target basic power model;
[0183] Merge the target pre-configured component information with the target basic model file to generate a target model file;
[0184] A target simulation request is generated based on the target model file and the target simulation task, and the target simulation request is sent to the simulation end, so that the simulation end calls the simulation component to update the modified target component parameter data and target operating conditions to the target model file based on the target simulation request, and performs simulation calculations on the updated target model file to obtain a dynamic simulation result.
[0185] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0186] Upon receiving an import request for a local initial model file sent by a client, querying pre-configured component information corresponding to the local initial model file based on the import request; wherein the import request includes a model parsing interface;
[0187] Merge the pre-configured component information with the local initial model file to generate a local power model file;
[0188] Generate a parsing request based on the local power model file and the import request, and send the parsing request to the simulation end through the model parsing interface, so that the simulation end calls the simulation component to parse the local power model file based on the parsing request to obtain the parsing result;
[0189] The analysis result is obtained, and the analysis result is stored in the database as the basic model file corresponding to the local power model, so that the database generates a data identifier corresponding to the basic model file, and returns the data identifier to the client.
[0190] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0191] Create a target workspace corresponding to the target simulation task, and generate a configuration file corresponding to the target workspace based on the target simulation task;
[0192] Copy the target base model file to the target workspace.
[0193] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0194] Obtaining the running status and power simulation results of the target simulation task; wherein the running status includes one of waiting to run, running, running failure and running completion, and the power simulation results at least include energy consumption data and curve data of component parameter data changing with time when the component runs in the target working condition;
[0195] A log corresponding to the target simulation task is generated based on the running status and the power simulation result, and the log is stored in the target workspace, and the power simulation result is written into the target workspace in a preset manner.
[0196] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0197] Receive a result quick-view query request for a target simulation task sent by a client, and read the task result data file in the target workspace based on the result quick-view query request;
[0198] The result data in the task result data file is returned to the client, so that the client renders the result data into a first web page and displays the first web page.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0200] Receive a component result quick-view query request of a target simulation task sent by a client, and read a component result description file in a target workspace and a curve data file associated with the component result description file based on the component result quick-view query request;
[0201] The curve result data in the curve data file is returned to the client, so that the client renders the curve result data into a curve graph and displays the curve graph.
[0202] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0203] Receive a log query request for a target simulation task sent by a client, and read a log file in a target workspace based on the log query request;
[0204] The log data in the log file is returned to the client, so that the client renders the log data into a second web page and displays the second web page.
[0205] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0206] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0207] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A power simulation method, characterized in that: The method comprises: Receive a target simulation task of a target basic power model sent by a client; wherein the target simulation task includes modified target component parameter data, target operating conditions and target data identifier corresponding to the target basic power model; Acquire a target basic model file corresponding to the target basic power model through the target data identifier, and query target pre-configured component information corresponding to the target basic power model; Merging the target pre-configuration component information with the target basic model file to generate a target model file; A target simulation request is generated based on the target model file and the target simulation task, and the target simulation request is sent to the simulation end, so that the simulation end calls the simulation component to update the modified target component parameter data and the target operating condition to the target model file based on the target simulation request, and performs simulation calculations on the updated target model file to obtain a power simulation result.
2. The method according to claim 1, characterized in that Before receiving the target simulation task of the target basic power model sent by the client, the method further includes: Upon receiving an import request for a local initial model file sent by the client, querying pre-configured component information corresponding to the local initial model file based on the import request; wherein the import request includes a model parsing interface; Merging the pre-configured component information with the local initial model file to generate a local power model file; Generate a parsing request based on the local power model file and the import request, and send the parsing request to the simulation end through the model parsing interface, so that the simulation end calls the simulation component to parse the local power model file based on the parsing request to obtain a parsing result; The analysis result is obtained, and the analysis result is stored in a database as a basic model file corresponding to a local power model, so that the database generates a data identifier corresponding to the basic model file, and returns the data identifier to the client.
3. The method according to claim 1, characterized in that After obtaining the target basic model file corresponding to the target basic power model through the target data identifier, the method further includes: Creating a target workspace corresponding to the target simulation task, and generating a configuration file corresponding to the target workspace based on the target simulation task; The target base model file is copied to the target workspace.
4. The method according to claim 1, characterized in that: After sending the target simulation request to the simulation end, the method further includes: Obtaining the running state and power simulation result of the target simulation task; wherein the running state is one of waiting to run, running, running failure and running completion, and the power simulation result at least includes energy consumption data and curve data of component parameter data changing with time when the component runs in the target working condition; A log corresponding to the target simulation task is generated based on the operating status and the power simulation result, and the log is stored in a target workspace, and the power simulation result is written into the target workspace in a preset manner.
5. The method according to claim 4, characterized in that The method further comprises: receiving a result quick-view query request for the target simulation task sent by the client, and reading a task result data file in the target workspace based on the result quick-view query request; The result data in the task result data file is returned to the client, so that the client renders the result data into a first web page and displays the first web page.
6. The method according to claim 4, characterized in that The method further comprises: Receiving a component result quick-view query request of the target simulation task sent by the client, and reading a component result description file in the target workspace and a curve data file associated with the component result description file based on the component result quick-view query request; The curve result data in the curve data file is returned to the client, so that the client renders the curve result data into a curve graph and displays the curve graph.
7. The method according to claim 4, characterized in that The method further comprises: Receiving a log query request of the target simulation task sent by the client, and reading a log file in the target workspace based on the log query request; The log data in the log file is returned to the client, so that the client renders the log data into a second web page and displays the second web page.
8. A power simulation system, characterized in that: The system comprises: a client, a server and a simulation end, wherein: The client is used to generate a target simulation task corresponding to a target basic power model, and send the target simulation task to the server; wherein the target simulation task includes modified target component parameter data, target operating conditions and target data identifier corresponding to the target basic power model; The server is used to receive a target simulation task of a target basic power model sent by a client; obtain a target basic model file corresponding to the target basic power model through the target data identifier, and query the target pre-configuration component information corresponding to the target basic power model; merge the target pre-configuration component information with the target basic model file to generate a target model file; generate a target simulation request based on the target model file and the target simulation task, and send the target simulation request to the simulation terminal; The simulation end is used to receive the target simulation request, and based on the target simulation request, call the simulation component to update the modified target component parameter data and the target operating condition to the target model file, and perform simulation calculations on the updated target model file to obtain a power simulation result.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Simulation test method, device, electronic equipment and storage medium
CN112668181A
Automobile thermal simulation method and device, storage medium and equipment
CN118260871A
Battery simulation method and device, computer equipment and computer readable storage medium
CN119849190A