Power simulation method, system, computer device and storage medium
By using dynamic simulation methods and systems, simulation tasks are processed automatically, solving the problem of low efficiency in operating simulation software for non-power professionals. This achieves efficient simulation calculations and result management, and lowers the threshold for simulation operation.
Patent Information
- Application Number
- CN202411811669.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-12-10
AI Technical Summary
In existing technologies, non-power professionals cannot operate simulation software to perform whole vehicle power economy simulation, resulting in low simulation efficiency. Furthermore, the simulation software is expensive, and multiple users share it, leading to competition for use. Data storage is inconsistent and cannot be tracked throughout the entire process.
This paper provides a dynamic simulation method and system. The system allows the client to submit target component parameter data and operating conditions, and automatically calls the simulation terminal to perform simulation calculations, reducing manual operation steps. It utilizes the components of the server and simulation terminal to merge data and store simulation results, and builds a user-friendly simulation platform web interface.
It improves simulation efficiency, lowers the operational threshold, and enables non-power professionals to make real-time modifications and run simulation tasks, achieving multi-task parallel computing and result tracking.
Smart Images

Figure CN119849122B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of simulation technology, and in particular to a dynamic simulation method, system, computer equipment, and storage medium. Background Technology
[0002] Simulation analysis technology is used throughout the entire vehicle design process and has been widely applied to improve vehicle dynamics, structural analysis, vibration and noise, and aerodynamics.
[0003] Currently, vehicle dynamics simulation primarily involves highly repetitive tasks such as manual modeling, parameter adjustment, submission, result retrieval, and data comparison within simulation software. However, most simulation software requires a certain level of professional and theoretical background to perform vehicle dynamics analysis, and non-power system professionals are generally unable to operate such software. Therefore, if non-power system professionals want to understand the impact of component parameter modifications on vehicle dynamics, they can only rely on power system professionals to run the modified simulation tasks, resulting in low simulation efficiency. Summary of the Invention
[0004] Based on this, a dynamic simulation method, system, computer equipment, and storage medium are provided to solve the problem that in the prior art, simulation tasks with modified parameters can only be manually run with the help of dynamic professionals, and the operation is mostly highly repetitive, resulting in low simulation efficiency.
[0005] Firstly, this application provides a dynamic simulation method, the method comprising:
[0006] The system receives a target simulation task for a target basic dynamic model sent by a client; wherein the target simulation task includes modified target component parameter data, target operating conditions, and target data identifiers corresponding to the target basic dynamic model.
[0007] The target basic model file corresponding to the target basic dynamic model is obtained through the target data identifier, and the target pre-configured component information corresponding to the target basic dynamic model is queried.
[0008] The target pre-configured component information is merged with the target base 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 terminal. The simulation terminal then calls the simulation component to update the target component parameter data and the 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 dynamic simulation results.
[0010] By the above method, only the user needs to submit the target simulation task including the modified target component parameter data corresponding to the target base power model, the target working condition and the target data identifier on the client side, the simulation end can be automatically called, the modified target component parameter data and the target working condition are updated to the target model file corresponding to the target base 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 need to be manually operated, reducing the operation time of the simulation process, and improving the simulation efficiency.
[0011] In one embodiment, before receiving the target simulation task of the target base power model sent by the client, the method further comprises:
[0012] When receiving the import request of the local initial model file sent by the client, querying the preconfigured component information corresponding to the local initial model file based on the import request; wherein the model parsing interface is included in the import request;
[0013] Merging the preconfigured component information and the local initial model file to generate a local power model file;
[0014] 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;
[0015] Obtaining the parsing result and storing the parsing result as a base model file corresponding to a local power model in a database, so that the database generates a data identifier corresponding to the base model file and returns the data identifier to the client.
[0016] By the above method, the local power model file is parsed, the parsing result is stored as a base model file corresponding to the local power model, a data identifier corresponding to the base model file is generated, and the local power model is displayed as a base power model on the client side, so that any user can initiate a simulation task of the base power model on the client side, and non-power professionals can only focus on relevant data in their own field to perform efficient simulation of instant modification and instant operation. Moreover, users can simultaneously initiate multiple simulation tasks, and historical data comparison can be provided to improve simulation efficiency.
[0017] In one embodiment, after obtaining the target base model file corresponding to the target base power model through the target data identifier, the method further comprises:
[0018] 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;
[0019] copy the target base model file to the target workspace.
[0020] Through the above method, the target workspace corresponding to the target simulation task is created, so that the target workspace can record the related data of the target simulation task. By copying the target base model file to the target workspace, when the user initiates the simulation task of the target base model again, the target base model file does not need to be obtained again, and the simulation efficiency is improved.
[0021] In one embodiment, after the target simulation request is sent to the simulation end, the method further comprises:
[0022] obtain a running state and a power simulation result of the target simulation task; wherein the running state is one of to-be-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] generate a log corresponding to the target simulation task based on the running state and the power simulation result, store the log to the target workspace, and write the power simulation result to the target workspace in a preset manner.
[0024] Through the above method, the running state and the power simulation result of the target simulation task are polled and stored to the target workspace for searching.
[0025] In one embodiment, the method further comprises:
[0026] receive a result quick review query request of the target simulation task sent by the client, and read a task result data file in the target workspace based on the result quick review query request;
[0027] return the result data in the task result data file to the client, so that the client renders the result data into a first web page and displays the first web page.
[0028] Through the above method, when the result quick review 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, facilitating the user to view.
[0029] In one embodiment, the method further comprises:
[0030] receiving the component result snapshot query request of the target simulation task sent by the client, 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 snapshot query request;
[0031] returning the curve result data in the curve data file to the client to make the client render the curve result data into a curve chart and display the curve chart.
[0032] Through the above method, when receiving the component result snapshot query request, the component result data file in the target workspace and the curve data file associated with the component result description file can be quickly read, so that the client renders the curve result data in the curve data file into a curve chart and displays the curve chart, facilitating the user to quickly query the change trend of the key data of each component with time in the entire operating cycle.
[0033] In one embodiment, the method further comprises:
[0034] receiving the 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] returning the log data in the log file to the client to make the client render the log data into a second web page and display the second web page.
[0036] Through the above method, when receiving the log query, the log file in the target workspace can be quickly read, so that the client renders the log data in the log file into a second web page and displays the first web page, facilitating the user to view, and when the simulation has a problem, the problem can be quickly located and solved.
[0037] In a second aspect, the application provides a power simulation system, which comprises a client, a server and a simulation end, wherein:
[0038] The client is configured 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 comprises modified target component parameter data corresponding to the target basic power model, a target working condition and a target data identifier.
[0039] The server is configured to receive a target simulation task of a target basic power model sent by the client, acquire a target basic model file corresponding to the target basic power model through the target data identifier, and query target pre-configuration component information corresponding to the target basic power model; merge the target pre-configuration component information and 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 end;
[0040] The simulation end is configured to receive the target simulation request, and based on the target simulation request, call a simulation component to update the modified target component parameter data and the target working condition to the target model file, and perform simulation calculation 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, wherein the computer program is executable on a processor to implement the power simulation method of the first aspect.
[0043] The power simulation method, system, computer device and storage medium described above only need the user to submit the target simulation task containing the modified target component parameter data corresponding to the target basic power model, the target working condition and the target data identifier on the client, and then the simulation end can be automatically called to update the modified target component parameter data and the target working condition to the target model file corresponding to the target basic power model based on the simulation end, and perform simulation calculation on the updated target model file to obtain the power simulation result, thereby reducing the steps of manual operation, reducing the operation time of the simulation process, and improving the simulation efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 FIG. 1 is a structural block diagram of a power simulation system in an embodiment;
[0045] Figure 2 FIG. 2 is a flowchart of a power simulation method in an embodiment;
[0046] Figure 3 FIG. 3 is a flowchart of a model import method in an embodiment;
[0047] Figure 4 FIG. 4 is a flowchart of a data storage method in an embodiment;
[0048] Figure 5 Fig. 4 is a timing diagram of a power emulation flow in one embodiment;
[0049] Figure 6 Fig. 5 is an internal block diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. The specific operation methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". The association relationship of "and / or" describes the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone. A is connected with B, which can represent the following two cases: A is directly connected with B and A is connected with B through C. In addition, in the description of the present application, "first", "second", etc. are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.
[0051] In order to facilitate the understanding of those skilled in the art, first, the technical terms involved in the embodiments of the present application are explained and described.
[0052] (1) The programming language JavaScript is a high-level, interpreted programming language, mainly used for building interactive interfaces of web pages and applications. It allows developers to implement dynamic effects and respond to user behavior on web pages, and is also used for server-side programming, mobile application development and other platforms.
[0053] (2) The programming language object representation (JavaScript Object Notation, JSON) is an open standard file format and data exchange format, which is easy for people to read and write, and also easy for machines to parse and generate. JSON is a commonly used data format, which has multiple uses in electronic data exchange, including data exchange between web applications and servers.
[0054] (3) The Hypertext Transfer Protocol (HTTP) is a simple request-response protocol, which usually runs on top of the Transmission Control Protocol (TCP). It specifies what messages a client can send to a server and what responses it can get.
[0055] (4) Distributed document storage database MongoDB, aiming to provide scalable high-performance data storage solutions for WEB applications. MongoDB is a product between relational database and non-relational database, and is the most functional and most relational database among non-relational databases. It supports very loose data structures and can store more complex data types. The biggest feature of MongoDB is that its query language is very powerful, and it can almost realize most of the functions of single-table query of relational database, and also supports indexing data.
[0056] (5) Relational database management system MySQL is an open source small relational database management system. At present, MySQL is widely used in small and medium-sized websites on the Internet. Because of its small size, fast speed, low total cost, especially the open source feature, many small and medium-sized websites choose MySQL as the website database in order to reduce the total cost of the website. The relational database saves data in different tables, rather than putting all data in a large warehouse.
[0057] (6) Polling is a way for the central processing unit (CPU) to decide how to provide peripheral device services, also known as "programmed input and output". The concept of polling is: the CPU sends out inquiries at regular intervals, and inquires each peripheral device in turn whether it needs its service. If so, it is served, and after the service is over, the next peripheral is asked, and then the cycle continues.
[0058] The background of the present application is briefly described as follows.
[0059] The current whole vehicle power economy simulation mainly includes the following steps: user manually operates modeling, adjusts parameters, submits running, queries results and compares data, and other highly repetitive work on simulation software. This simulation method has the following problems:
[0060] I. When operating the simulation software, it is a fixed and repetitive process, such as repeatedly modifying parameters, selecting specific components, finding corresponding component parameter data, then modifying, running simulation tasks, and the overall process is time-consuming, resulting in low simulation efficiency.
[0061] II. Most simulation software requires certain professional and theoretical background to carry out whole vehicle dynamics analysis. Non-power professionals mostly cannot operate the simulation software. Therefore, non-power professionals want to know the influence of component parameter data modification on the whole vehicle dynamics, and can only ask for help from power professionals to run simulation tasks after modifying parameters, resulting in low simulation efficiency.
[0062] Thirdly, simulation software is expensive and charged according to the number of licenses. In order to save costs, multiple people share a set of simulation software most of the time, and there is a competitive use situation.
[0063] Fourthly, 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 the script, it is necessary to go to the simulation software to check the process results and task status.
[0064] Fifthly, 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 The structure diagram of the power simulation system in an embodiment is shown in FIG. 1. As shown in the figure, the system mainly includes a client 102, a server 104 and a simulation end 106. The client 102 communicates with the server 104 through a network, and the client 102 can call the simulation components of the simulation end 106 by calling the HTTP interface provided by the server 104. The simulation components can be simulation software, simulation programs, etc. In this embodiment, the simulation software is taken as an example for description. Figure 1
[0066] Exemplarily, the client 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. The client 102 is used to display a simulation platform web page interface, and the simulation platform web page interface includes a power simulation process and model maintenance.
[0067] On the one hand, in response to a user selecting operation on the model maintenance of the simulation platform web page interface, a power simulation engineering model library interface is displayed. The power simulation engineering model library interface includes an imported engineering file. In response to a user uploading a local initial model file through the imported engineering file, an imported request of the local initial model file is generated, and the imported request is uploaded to the server 104 through HTTP. The imported request includes an HTTP model parsing interface provided by the server 104 and called by the client 102 through a JavaScript script. So that the server 104 calls the simulation end 106 to parse the local initial model file through the HTTP model parsing interface, obtains a parsing result, and stores the parsing result to a MongoDB. At this time, the MongoDB generates a data identifier corresponding to the parsing result, and returns the data identifier to the client 102.
[0068] Further, the client 102 pops up a first window in the power simulation engineering model library interface when receiving the data identifier, where the first window is used to prompt the user that the model import is successful, at this time, the power simulation engineering model library interface displays the local initial model identifier and displays the local initial model identifier as the basic power model identifier in the power simulation process interface of the simulation platform webpage 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 detail 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, where the model query request includes the data identifier corresponding to the model, so that the server 104 queries the model specific information from the MongoDB through the data identifier when receiving the model query request, including all sub-models of the model, all components of the model, and all working conditions contained in the model, and returns the model specific information to the client 102.
[0070] Further, the client 102 renders the model specific information into an html structure interface through a JavaScript script to display 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 on the model in the power simulation engineering model library interface, a model deletion request is generated and sent to the server 104, where the model deletion request includes the data identifier corresponding to the model, so that the server 104 deletes the model specific information from the MongoDB through the data identifier when receiving the model deletion request, including all sub-models of the model, all components of the model, and all working conditions contained in the model, and returns a model deletion response to the client 102.
[0072] Further, the client 102 pops up a second window in the power simulation engineering model library interface when receiving the model deletion response, where the second window is used to prompt the user that the model deletion is successful.
[0073] On the other hand, in response to the user's power simulation process selection operation on the simulation platform webpage interface, the power simulation process interface is displayed, where the first sub-interface in the power simulation process interface is used to display each basic power model identifier; in response to the user's task new creation operation on the target basic power model in the first sub-interface, the components, component parameter data and working condition options corresponding to the target basic power model are automatically displayed in the second sub-interface of the power simulation process interface through a JavaScript script.
[0074] In response to the user's target component parameter data modification operation and target working condition selection operation (multiple selection, multiple working conditions running at a time) for 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 a parameter in JSON format, i.e., a target simulation task, by 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 corresponding to the target basic power model, the target working condition and the target data identifier. The server 104 calls the simulation end 106 to execute the target simulation task through the HTTP mode.
[0075] In one embodiment, the user can also be prompted in the second sub-interface to modify the component parameter data corresponding to the user's permission (realized through the permission configuration of the server 104). Specifically: in response to the user's task new 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 further 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 running, running failure and running completion tasks, and returns 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 to query the result quick view of the target simulation task in the power simulation process interface, the client 102 generates a result quick view query request and sends the result quick view query request to the server 104, so that the server 104 reads the result data based on the result quick view query request and returns to the client 102. The client 102 dynamically renders the result data into a first web page (html sub-page) through a JavaScript script, and displays the first web page.
[0079] When the user clicks the component result snapshot of the target simulation task in the power simulation process interface, the client 102 generates a component result snapshot query request and sends the component result snapshot query request to the server 104, so that the server 104 reads the curve result data based on the component result snapshot query request and returns 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, such as the curve graph of the speed of the whole vehicle at each moment, the voltage of the battery pack, etc.
[0080] When the user clicks 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 to the client 102. The client 102 dynamically renders the log data into a second web page (html sub-page) through a JavaScript script, and displays the second web page.
[0081] Exemplarily, the server 104 can be an independent server or a server cluster composed of multiple servers. The server 104 is used to process all requests from users, integrate all basic common functions, data analysis, historical data query, and other common 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, the server 104 queries the preconfigured component information corresponding to the local initial model file from the MySQL database based on the import request, and merges the preconfigured 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, the server 104 generates a parsing request based on the local power model file and the import request, and sends the parsing request to the simulation end 106 through a 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, and returns the parsing result.
[0083] Further, the server 104 obtains the parsing result and stores the parsing result as a basic model file corresponding to the local power model to the MongoDB, so that the 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 a target simulation task of a target base power model sent by the client 102; wherein the target simulation task includes modified target component parameter data corresponding to the target base power model, a target working condition and a target data identifier. Then, the target base model file corresponding to the target base power model is obtained from the MongoDB through the target data identifier, and the target pre-configuration component information corresponding to the target base power model is queried from the MySQL database. Further, the target pre-configuration component information is merged with the target base 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 end 106 through the HTTP mode, so that the simulation end 106 updates the modified target component parameter data and the target working condition to the target model file based on the target simulation request, and performs simulation calculation on the updated target model file to obtain a power simulation result.
[0086] In one embodiment, after obtaining the target base model file corresponding to the target base power model through the target data identifier, the server 104 also creates a target working space corresponding to the target simulation task, and generates a configuration file corresponding to the target working space based on the target simulation task, such as the information of the task submitter, and copies the obtained target base model file to the target working space.
[0087] In addition, when the simulation end 106 is called to perform simulation calculation on the updated target model file, the server 104 also obtains the running state and the power simulation result of the target simulation task; wherein the running state is one of waiting for running, 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.
[0088] Further, the server 104 generates a log corresponding to the target simulation task based on the obtained running state and the power simulation result, and stores the log to the target working space, and writes the power simulation result to the target working space in a preset mode, for example, writes the energy consumption data to a task result data file in the target working space, writes the component related description (such as the corresponding working condition) to a component description file in the target working space, and writes the curve data of the component parameter data changing with time when the component runs in the target working condition to a curve data file associated with the component description file, so as to be queried by the user.
[0089] Based on this, when the server 104 receives the result overview query request of the target simulation task sent by the client 102, the server 104 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, the server 104 reads the component result description file and the curve data file associated with the component result description file in the target workspace 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 the server 104 receives 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 an embodiment, when the server 104 receives the simulation task, the server 104 generates a task record with a running state of to-be-run and stores the task record in the MySQL database. Thus, the server 104 discovers the to-be-run simulation task by polling the MySQL database, so as to avoid missing the simulation task by the server 104, wherein the server 104 can discover 5 simulation tasks at a time. Meanwhile, when the server 104 obtains the change of the running state of the simulation task from the simulation end 106, the server 104 also updates the MySQL database in real time, so that the client 102 can query the running state 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, the server 104 queries all simulation tasks from the MySQL database based on the simulation record query request, and returns to the client 102.
[0094] In an embodiment, the server 104 also generates a piece of information containing the target simulation task, and stores the information in the simulation history database, so as to accumulate the simulation history data for subsequent use in artificial intelligence prediction and other related purposes.
[0095] Exemplarily, the simulation end 106 is used to integrate the simulation software, and the execution operation of the simulation software is encapsulated through the Python code, and all operations of the simulation software are executed through it. Specifically:
[0096] In one aspect, when the simulation end 106 receives the parsing request sent by the service end 104, the simulation end 106 downloads or copies the local dynamic model file from the parsing request, and calls the simulation software to parse the local dynamic model file through the internally defined Python code. 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 set of all working conditions contained in the model. An initial parsing result is obtained, and the initial parsing result is converted into JSON type data, which is returned to the service end 104 as the parsing result.
[0097] In another aspect, when the simulation end 106 receives the target simulation request sent by the service end 104, the simulation end 106 downloads or copies the target model file from the target simulation request, and calls the simulation software to update the modified target component parameter data and the target working condition to the target model file through the internally defined Python code. The updated target model file is transmitted into the simulation software to perform simulation calculation through the task submission interface of the Python code.
[0098] Then, the simulation end 106 polls to detect whether the simulation software has completed the target simulation task calculation, and generates a running state of the target simulation task, and writes the running state into the file storage. The running state is one of to-be-run, running, running failure, and running completion.
[0099] When it is detected that the simulation software completes the simulation calculation, the simulation end 106 reads the dynamic simulation result through the Python script defined in advance, converts the 100-kilometer energy consumption data into the JSON format easy to read, and writes the 100-kilometer energy consumption data into the file storage. The curve data of the component parameter data of the component in the target working condition changing over time is converted into the combination of the JSON format and the self-defined text format, and is written into the file storage. In this way, the service end 104 can obtain the running state and the dynamic simulation result by polling the file storage.
[0100] Based on the above system, the power simulation method provided by the embodiment of the application only needs to submit the target simulation task including the modified target component parameter data corresponding to the target basic dynamic model, the target working condition, and the target data identifier by the user at the client end. The simulation end can be automatically called to update the modified target component parameter data and the target working condition to the target model file corresponding to the target basic dynamic model, and to perform simulation calculation on the updated target model file to obtain the dynamic simulation result. In this way, the steps of manual operation are reduced, the operation time of the simulation process is reduced, and the simulation efficiency is improved. The method and the system described in the embodiment of the 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 be mutually referred to, and the repeated parts will not be described herein.
[0101] Figure 2 For a flowchart of the power simulation method in one embodiment, the flowchart can be executed by the power simulation system. As shown in Figure 2 the flowchart includes the following steps:
[0102] S201, receiving a target simulation task of a target base power model sent by a client;
[0103] Among them, the target simulation task includes the modified target component parameter data corresponding to the target base power model, the target working condition and the target data identifier.
[0104] Specifically, first, the user clicks the power simulation flow through the simulation platform web page interface shown in the client 102 as Figure 1 shown, at this time, the client 102 displays the power simulation flow interface. When the user selects the target base power model in the power simulation flow interface, right-clicks the new task, the browser JavaScript script automatically generates a sub-page for modifying the component parameter data of the model and selecting the working condition, and prompts the user that he can modify the component parameter data related to his account authority (this function is realized through the authority configuration of the server 104).
[0105] Further, after the user modifies the target component parameter data and selects the target working condition (multiple selection, multiple working conditions can be run at a time), clicks the submit task, the browser JavaScript script will assemble all the model data (such as the modified target component parameter data, the target data identifier of the target base power model, etc.) and the target working condition into a JSON format parameter, that is, generate a target simulation task, and send it to the server 104.
[0106] In one embodiment, when the server 104 receives the simulation task, it will generate a task record with a running state of to-be-run and store it in the MySQL database. Thus, the server 104 discovers the to-be-run simulation task by polling the MySQL database, avoiding the server 104 from missing the simulation task, wherein the server 104 can discover 5 simulation tasks at a time. This makes a set of simulation software can perform multiple simulation calculations at the same time, and can track the trend of the overall power simulation result in the simulation period.
[0107] Meanwhile, the server 104 also updates the MySQL database in real time when the running state of the simulation task obtained from the simulation terminal 106 changes, 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 generates a simulation record query request and sends 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 running, running failure and running completion tasks, 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.
[0108] In one embodiment, the server 104 also generates a piece of information containing the target simulation task and stores the information in the simulation history database, thereby accumulating simulation history data.
[0109] In one embodiment, the server 104 also generates a piece of information containing the target simulation task and stores the information in the simulation history database, thereby accumulating simulation history data.
[0110] In the embodiment of the application, the target workspace corresponding to the target simulation task can be created, the target basic model file obtained is copied to the target workspace, and the configuration file corresponding to the target workspace is generated based on the target simulation task, such as the information of the task submitter. Thus, when the simulation task of the target basic power model is initiated again, the target basic model file does not need to be obtained again, and the simulation efficiency is improved.
[0111] S203, merging the target pre-configuration component information and the target basic model file to generate a target model file;
[0112] The target model file is JSON format data.
[0113] S204, generating a target simulation request based on the target model file and the target simulation task, and sending the target simulation request to the simulation terminal, so that the simulation terminal updates the modified target component parameter data and the target working condition to the target model file based on the target simulation request, and performs simulation calculation 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 end 106 through HTTP. After receiving the target simulation request, the simulation end 106 downloads or copies the target model file from the target simulation request, and updates the modified target component parameter data and target working condition to the target model file through the internal defined Python code calling simulation software. Then, the simulation end 106 transmits the updated target model file into the simulation software through the task submission interface of the Python code calling simulation software to perform simulation calculation.
[0115] Then, the simulation end 106 polls to detect whether the simulation software has completed the target simulation task calculation, and generates a running state of the target simulation task, and writes the running state into a file storage, wherein the running state is one of a to-be-run, running, running failure and running completion.
[0116] When it is detected that the simulation software completes the simulation calculation, the simulation end 106 reads the power simulation result through the pre-defined Python script, converts the 100 km energy consumption data into an easily readable JSON format, and writes the 100 km energy consumption data into the file storage. In addition, the simulation end 106 converts the curve data of the component parameter data of the component in the target working condition changing over time into a combination of the JSON format and the self-defined text format, and writes the curve data into the file storage. In this way, the server 104 can obtain the running state and the power simulation result by polling the file storage.
[0117] Through the above method, the steps of manual operation are reduced, the operation time of the simulation process is reduced, the simulation efficiency is improved, and a simulation platform webpage interface more friendly to non-power professionals is constructed. Therefore, the non-power professionals only need to focus on the relevant data in their own field to perform efficient simulation of instant modification and instant running, and the simulation operation threshold of the user is reduced.
[0118] In one embodiment, before step S201, the target basic power model needs to be imported. Figure 3 For a flowchart of the model import method in one embodiment, as shown in Figure 3 The flowchart specifically includes the following steps:
[0119] S301, when receiving the import request of the local initial model file sent by the client, querying the pre-configured component information corresponding to the local initial model file based on the import request;
[0120] Specifically, the user selects a local initial model file in a dynamic simulation engineering model library interface of an emulation platform web page interface of the client 102, at this time, the client 102 generates an import request of the local initial model file, and uploads the import request to the server 104 through HTTP, wherein the import request includes an HTTP model parsing interface provided by the server 104 and called by the client 102 through a JavaScript script.
[0121] When the server 104 receives the import request uploaded by the client 102, the server 104 queries the preconfigured component information corresponding to the local initial model file from the MySQL database based on the import request.
[0122] S302, the preconfigured component information is merged with the local initial model file to generate a local dynamic model file;
[0123] The local dynamic model file is JSON format data.
[0124] S303, a parsing request is generated based on the local dynamic model file and the import request, and the parsing request is sent to the simulation end through the model parsing interface, so that the simulation end parses the local dynamic 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 104, the simulation end 106 downloads or copies the local dynamic model file from the parsing request, and calls the simulation software to parse the local dynamic model file through the internally defined Python code, 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 set of all working conditions contained in the model, to obtain an initial parsing result, and after the initial parsing result is converted into JSON type data, the initial parsing result is returned to the server 104 as the parsing result.
[0126] S304, the parsing result is obtained, and the parsing result is stored as a basic model file corresponding to the local dynamic 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 the server 104 obtains the parsing result, the server 104 stores the parsing result as a basic model file corresponding to the local dynamic model in the MongoDB, so that the MongoDB generates a data identifier corresponding to the basic model file, and returns the data identifier to the client 102.
[0128] The client 102 pops up a first window in the power simulation engineering model library interface when receiving the data identifier, where the first window is used to prompt the user that the model import is successful. At this time, the power simulation engineering model library interface displays the local initial model identifier and displays the local initial model identifier as the basic power model identifier in the power simulation process interface of the simulation platform web page interface.
[0129] In one embodiment, the power simulation engineering model library interface of the client 102 also provides a model detail 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, where the model query request includes the data identifier corresponding to the model. The server 104 queries the model specific information from the MongoDB through the data identifier when receiving the model query request, including all sub-models of the model, all components of the model, and all working conditions contained in the model, and returns the model specific information to the client 102.
[0130] Further, the client 102 renders the model specific information into an html structure interface through a JavaScript script to display 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, where the model deletion request includes the data identifier corresponding to the model. The server 104 deletes the model specific information from the MongoDB through the data identifier when receiving the model deletion request, and returns a model deletion response to the client 102.
[0132] Further, the client 102 pops up a second window in the power simulation engineering model library interface when receiving the model deletion response, where the second window is used to prompt the user that the model deletion is successful.
[0133] In one embodiment, after sending the target simulation request to the simulation end in S204, in order to facilitate the user to view the power simulation result, the power simulation result also needs to be stored. Figure 4 The flowchart of the data storage method in one embodiment is shown in Figure 4 The flowchart of the data storage method in one embodiment is shown in
[0134] S401, obtaining the running state and power simulation result of the target simulation task;
[0135] The running state includes one of a standby running state, a running state, a running failure state, and a running completion state, the power simulation result includes at least energy consumption data, and curve data of component parameter data changing over time when the component runs in the target working condition.
[0136] Specifically, the server 104 obtains the running state and the power simulation result by polling the file storage.
[0137] S402, based on the running state and the power simulation result, a log corresponding to the target simulation task is generated, and the log is stored in the target workspace, and the power simulation result is written into the target workspace in a preset manner.
[0138] Specifically, the log is stored in a log file in the target workspace; the hundred-kilometer energy consumption data in the power simulation result is written into a task result data file in the target workspace, component-related descriptions (such as corresponding working conditions) are written into a component description file in the target workspace, and curve data of the component parameter data changing over time when the component runs in the target working condition is written into a curve data file associated with the component description file, so as to be queried by a user.
[0139] In one embodiment, the power simulation process interface further 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 quick view of the target simulation task in the power simulation process interface, the client 102 generates a result quick view query request and sends the result quick view query request to the server 104. When the server 104 receives the result quick view query request sent by the client 102, the server 104 reads the task result data file in the target workspace based on the result quick view query request, and returns the result data in the task result data file to the client 102.
[0141] Further, when the client 102 receives the result data, the client 102 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 to query the component result quick view 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 quick view query request and sends the component result quick view query request to the server 104. When the server 104 receives the component result quick view query request sent by the client 102, the server 104 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 quick view query request, and returns the curve result data in the curve data file to the client 102.
[0143] Further, the client 102 dynamically renders the curve result data into a curve chart through a JavaScript script when the curve result data is received, and displays the curve chart, such as a curve chart of data of a speed of a whole vehicle at each moment, a voltage of a battery pack, and the like.
[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. The server 104 reads the log file in the target workspace based on the log query request when the log query request sent by the client 102 is received, and returns the log data in the log file to the client 102.
[0145] Further, the client 102 dynamically renders the log data into a second web page (html sub-page) through a JavaScript script when the log data is received, and displays the second web page.
[0146] It should be understood that, although Figures 2-4 the steps in the flowchart are shown in order according to the arrows, these steps are not necessarily executed in order according to the arrows. Unless otherwise specified in this article, the execution of these steps has no strict order limitation, and these steps can be executed in other orders. Moreover, Figures 2-4 at least part of the steps in the flowchart can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0147] In order to describe the power simulation method provided by the present application in more detail, the following will be described through a specific power simulation process, as shown in Figure 5 FIG. 1 is a timing schematic 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 the client 102 in Figure 1 the flowchart, the simulation platform backend service 502 is equivalent to the server 104 in Figure 1 the flowchart, and the power simulation capability integration system 503 and the professional simulation software 504 are equivalent to the simulation end 106 in Figure 1 the flowchart.
[0148] Exemplarily, a user initiates a target simulation task of a target base power model through the browser 501, and submits the target simulation task to the simulation platform backend service 502, wherein the target simulation task includes modified target component parameter data corresponding to the target base power model, a target working condition and a target data identifier.
[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, the target working condition and the target data identifier, and the model information includes a target base model file corresponding to the target base power model and target preconfigured component information. Then, the simulation platform backend service 502 generates a target simulation request based on the parameter information and the model information, and sends the target simulation request 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 updates the modified target component parameter data and the target working condition to the target model file through the internally defined Python code calling professional simulation software 504. Then, the power simulation capability integration system 503 transmits the updated target model file into the simulation software through the task submission interface of the Python code calling professional simulation software 504 to perform simulation calculation.
[0151] During the simulation calculation process, the power simulation capability integration system 503 polls the professional simulation software 504 to query the simulation running progress and the power simulation result. When detecting that the professional simulation software 504 completes the simulation calculation, the power simulation capability integration system 503 reads the power simulation result through the Python script defined in advance, and returns or copies the simulation running progress and the power simulation result to the simulation platform backend service 502 for storage.
[0152] Further, when the user initiates a quick review query request (including result quick review and component result quick review) of the target simulation task through the browser 501, the quick review query request is sent to the simulation platform backend service 502. After receiving the quick review query request, the simulation platform backend service 502 obtains corresponding result data from the power simulation result based on the quick review 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, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in FIG. 1. Figure 6The computer device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is configured 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 running the operating system and the computer program in the non-volatile storage medium. The database of the computer device is configured to store power simulation data. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a power simulation method.
[0154] Those skilled in the art can understand that, Figure 6 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can 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 on the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
[0156] receiving a target simulation task of a target base power model sent by a client; wherein the target simulation task includes modified target component parameter data corresponding to the target base power model, a target working condition and a target data identifier;
[0157] obtaining a target base model file corresponding to the target base power model through the target data identifier, and querying target pre-configuration component information corresponding to the target base power model;
[0158] merging the target pre-configuration component information and the target base model file to generate a target model file;
[0159] generating a target simulation request based on the target model file and the target simulation task, and sending the target simulation request to a simulation end, so that the simulation end updates the modified target component parameter data and the target working condition to the target model file based on the target simulation request, and performs simulation calculation on the updated target model file to obtain a power simulation result.
[0160] In one embodiment, the processor further implements the following steps when executing the computer program:
[0161] When receiving an import request of a local initial model file sent by the client, querying pre-configuration 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-configuration component information with the local initial model file to generate a local dynamic model file;
[0163] generate an analysis request based on the local dynamic model file and the import request, and send the analysis request to the simulation end through a model analysis interface, so that the simulation end calls the simulation component to analyze the local dynamic model file based on the analysis request to obtain an analysis result;
[0164] obtain the analysis result, and store the analysis result as a basic model file corresponding to the local dynamic model file to a database, 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, the processor, when executing the computer program, also 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 basic model file to the target workspace.
[0168] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0169] obtain a running state and a dynamic simulation result of the target simulation task; wherein the running state includes one of to-be-run, running, running failure and running completion, and the dynamic 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;
[0170] generate a log corresponding to the target simulation task based on the running state and the dynamic simulation result, and store the log to the target workspace, and write the dynamic simulation result to the target workspace in a preset manner.
[0171] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0172] receive a result overview query request of the target simulation task sent by the client, and read a task result data file in the target workspace based on the result overview query request;
[0173] return the result data in the task result data file 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, the processor, when executing the computer program, also implements the following steps:
[0175] receive a component result snapshot query request of a target simulation task sent by a client, 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 snapshot query request;
[0176] return the curve result data in the curve data file to the client, so that the client renders the curve result data into a curve chart and displays the curve chart.
[0177] In one embodiment, the processor, when executing the computer program, also implements the following steps:
[0178] receive a log query request of a target simulation task sent by a client, and read a log file in a target workspace based on the log query request;
[0179] return the log data in the log file 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, and the computer readable storage medium stores a computer program. The computer program, when executed by a processor, implements the following steps:
[0181] receive a target simulation task of a target base power model sent by a client; wherein the target simulation task includes modified target component parameter data corresponding to the target base power model, a target working condition and a target data identifier;
[0182] obtain a target base model file corresponding to the target base power model through the target data identifier, and query target preconfigured component information corresponding to the target base power model;
[0183] merge the target preconfigured component information and the target base model file to generate a target model file;
[0184] generate a target simulation request based on the target model file and the target simulation task, and send the target simulation request to a simulation end, so that the simulation end, based on the target simulation request, calls a simulation component to update the modified target component parameter data and the target working condition to the target model file, and performs simulation calculation on the updated target model file to obtain a power simulation result.
[0185] In one embodiment, the computer program, when executed by the processor, also implements the following steps:
[0186] when receiving an import request of a local initial model file sent by a client, query preconfigured 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-configuration component information with the local initial model file to generate a local dynamic model file;
[0188] Generate an analysis request based on the local dynamic model file and the import request, and send the analysis request to the simulation end through a model analysis interface, so that the simulation end calls the simulation component to analyze the local dynamic model file based on the analysis request to obtain an analysis result;
[0189] Obtain the analysis result and store the analysis result as a basic model file corresponding to the local dynamic 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.
[0190] In one embodiment, the computer program is executed by the processor to further implement the following steps:
[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 basic model file to the target workspace.
[0193] In one embodiment, the computer program is executed by the processor to further implement the following steps:
[0194] Obtain the running state and dynamic simulation result of the target simulation task; wherein the running state includes one of to-be-run, running, running failure and running completion, and the dynamic 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;
[0195] Generate a log corresponding to the target simulation task based on the running state and the dynamic simulation result, and store the log in the target workspace, and write the dynamic simulation result into the target workspace in a preset manner.
[0196] In one embodiment, the computer program is executed by the processor to further implement the following steps:
[0197] Receive the result overview query request of the target simulation task sent by the client, and read the task result data file in the target workspace based on the result overview query request;
[0198] Return the result data in the task result data file 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, the computer program is executed by the processor to further implement the following steps:
[0200] receive a component result snapshot query request of a target simulation task sent by a client, 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 snapshot query request;
[0201] return the curve result data in the curve data file to the client, so that the client renders the curve result data into a curve chart and displays the curve chart.
[0202] In one embodiment, the computer program, when executed by the processor, further implements the following steps:
[0203] receive a log query request of a target simulation task sent by a client, read a log file in a target workspace based on the log query request;
[0204] return the log data in the log file to the client, so that the client renders the log data into a second web page and displays the second web page.
[0205] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, storage, database or other medium 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 but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), 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) and the like.
[0206] Any combination of the technical features in the above embodiments can be made, and for the sake of brevity, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.
[0207] The above embodiments only express several implementation ways of the present application, and the description is specific and detailed, but it should not be understood as a limitation to the patent scope of the application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are all within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method of power simulation, characterized by, The method comprises: receiving a target simulation task of a target base power model sent by a client; wherein the target simulation task comprises modified target component parameter data corresponding to the target base power model, a target working condition, and a target data identifier; obtaining a target base model file corresponding to the target base power model through the target data identifier, and querying target preconfigured component information corresponding to the target base power model; merging the target preconfigured component information and the target base model file to generate a target model file; generating a target simulation request based on the target model file and the target simulation task, and sending the target simulation request to a simulation end, so that the simulation end updates the modified target component parameter data and the target working condition to the target model file based on the target simulation request, and performs simulation calculation on the updated target model file to obtain a power simulation result.
2. The method of claim 1, wherein, Before the receiving a target simulation task of a target base power model sent by a client, the method further comprises: when receiving an import request of a local initial model file sent by the client, querying preconfigured component information corresponding to the local initial model file based on the import request; wherein the import request comprises a model analysis interface; merging the preconfigured component information and the local initial model file to generate a local power model file; generating an analysis request based on the local power model file and the import request, and sending the analysis request to the simulation end through the model analysis interface, so that the simulation end analyzes the local power model file based on the analysis request to obtain an analysis result by calling the simulation component; obtaining the analysis result and storing the analysis result as a base model file corresponding to a local power model to a database, so that the database generates a data identifier corresponding to the base model file, and returns the data identifier to the client.
3. The method of claim 1, wherein, After the obtaining a target base model file corresponding to the target base power model through the target data identifier, the method further comprises: creating a target working space corresponding to the target simulation task, and generating a configuration file corresponding to the target working space based on the target simulation task; copying the target base model file to the target working space.
4. The method of claim 1, wherein, After the sending the target simulation request to the simulation end, the method further comprises: obtaining a running state and a power simulation result of the target simulation task; wherein the running state is one of to-be-run, running, running failure, and running completion, and the power simulation result at least comprises energy consumption data and curve data of component parameter data changing with time when a component runs in the target working condition; generating a log corresponding to the target simulation task based on the running state and the power simulation result, and storing the log to a target working space, and writing the power simulation result to the target working space in a preset manner.
5. The method of claim 4, wherein, The method further comprises: receive the result snapshot query request of the target simulation task sent by the client, and read the task result data file in the target workspace based on the result snapshot query request; return the result data in the task result data file 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 of claim 4, wherein, The method further comprises: receive the component result snapshot query request of the target simulation task sent by the client, and read the component result description file and the curve data file associated with the component result description file in the target workspace based on the component result snapshot query request; return the curve result data in the curve data file to the client, so that the client renders the curve result data into a curve graph and displays the curve graph.
7. The method of claim 4, wherein, The method further comprises: receive the log query request of the target simulation task sent by the client, and read the log file in the target workspace based on the log query request; return the log data in the log file 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 by, The system comprises a client, a server and a simulation end, wherein: The client is configured 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 comprises modified target component parameter data corresponding to the target basic power model, a target working condition and a target data identifier. The server is configured to receive the target simulation task of the target basic power model sent by the client, obtain a target basic model file corresponding to the target basic power model through the target data identifier, and query target preconfigured component information corresponding to the target basic power model; merge the target preconfigured component information and 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 end. The simulation end is configured to receive the target simulation request, and based on the target simulation request, call a simulation component to update the modified target component parameter data and the target working condition to the target model file, and perform simulation calculation 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 on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Battery simulation method and device, computer equipment and computer readable storage medium
CN119849190A