Simulation model creation method, interaction method and device for asynchronous interaction interface

By generating and configuring simulation models of asynchronous interaction interfaces, the problem of simulation tools not supporting the modeling of asynchronous interaction interfaces is solved, enabling simple and fast simulation of asynchronous interaction interfaces and improving the performance and concurrency of vehicle software systems.

CN117931308BActive Publication Date: 2026-06-19CHINA FAW CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA FAW CO LTD
Filing Date
2023-12-21
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing simulation tools do not support asynchronous interactive interface modeling, making it impossible to perform asynchronous interactive interface simulation simply and quickly.

Method used

By obtaining the asynchronous configuration file of the modeling tool, generating the header file, creating the asynchronous interaction interface in the modeling tool, configuring the interface based on the asynchronous configuration file, building the initial simulation model, and adjusting the initial simulation model based on the configuration results, a simulation model of the asynchronous interaction interface is generated.

Benefits of technology

It enables simple and rapid modeling of asynchronous interaction interfaces using simulation tools, thereby improving the overall performance and task concurrency of vehicle software systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117931308B_ABST
    Figure CN117931308B_ABST
Patent Text Reader

Abstract

This invention discloses a method, interaction method, and apparatus for creating a simulation model of an asynchronous interactive interface. The method includes: obtaining an asynchronous configuration file of a modeling tool and generating a header file based on the asynchronous configuration file; creating an asynchronous interactive interface in the modeling tool, wherein the asynchronous interactive interface includes at least an asynchronous call interface and a corresponding asynchronous call result interface, the asynchronous call interface and the asynchronous call result interface being used to realize asynchronous interaction between the server and the client; configuring the asynchronous interactive interface based on the asynchronous configuration file to obtain a configuration result; constructing an initial simulation model based on the header file; and adjusting the initial simulation model based on the configuration result to obtain a simulation model of the asynchronous interactive interface. This invention solves the technical problem of the inability to easily and quickly model asynchronous interactive interfaces due to the lack of support for asynchronous interactive interface modeling in simulation tools.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicles, and more specifically, to a method for creating a simulation model of an asynchronous interactive interface, an interaction method, and a device. Background Technology

[0002] In vehicle software development projects, synchronous communication between the client and server can lead to blocking calls, resulting in slow server responses and long client wait times, thus impacting overall system performance. Therefore, using asynchronous communication interfaces in vehicle software is a superior approach, reducing client wait times, improving task concurrency, and ensuring overall system performance.

[0003] To implement asynchronous interaction interfaces in vehicle software, these interfaces can be simulated and modeled, and the resulting simulation model can be burned into the vehicle's electronic control unit. However, not all simulation tools support asynchronous interface modeling. Some user-friendly simulation tools with strong simulation capabilities and the ability to generate executable code, while highly user-friendly and reducing development workload, only support synchronous interaction interface modeling and cannot easily and quickly model asynchronous interaction interfaces.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This invention provides a method, method, and apparatus for creating simulation models of asynchronous interactive interfaces, thereby at least solving the technical problem that it is impossible to easily and quickly model asynchronous interactive interfaces because simulation tools do not support asynchronous interactive interface modeling.

[0006] According to one aspect of the present invention, a method for creating a simulation model of an asynchronous interaction interface is provided, comprising: obtaining an asynchronous configuration file of a modeling tool and generating a header file based on the asynchronous configuration file; creating an asynchronous interaction interface in the modeling tool, wherein the asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface, the asynchronous call interface and the asynchronous call result interface being used to realize asynchronous interaction between a server and a client; configuring the asynchronous interaction interface based on the asynchronous configuration file to obtain a configuration result; constructing an initial simulation model based on the header file; and adjusting the initial simulation model based on the configuration result to obtain a simulation model of the asynchronous interaction interface.

[0007] Optionally, an initial simulation model is constructed based on the header file, including: adjusting the input parameter functions of the client interface and the server interface in the header file to obtain the target header file; loading the target header file into the simulation environment; and encapsulating the asynchronous call function of the target header file in the simulation environment to obtain the initial simulation model.

[0008] Optionally, the target header file is loaded into the simulation environment, and the asynchronous call function of the target header file is encapsulated in the simulation environment to obtain the initial simulation model. This includes: adding the asynchronous file from the target header file to the simulation target in the simulation environment; creating a function call module corresponding to the asynchronous call function in the simulation environment based on the asynchronous file; and encapsulating the asynchronous call function based on the function call module to obtain the initial simulation model.

[0009] Optionally, the initial simulation model is adjusted based on the configuration results to obtain a simulation model of the asynchronous interaction interface, including: performing integration testing on the initial simulation model based on the configuration results to obtain the simulation model.

[0010] Optionally, creating an asynchronous interaction interface in the modeling tool includes: creating a first runnable entity and a second runnable entity in the modeling tool; creating an asynchronous call interface within the first runnable entity; and creating an asynchronous call result interface within the second runnable entity.

[0011] Optionally, the asynchronous interaction interface also includes an asynchronous call result event interface, and the method further includes: creating an asynchronous call result event interface corresponding to the asynchronous call result interface within the second runnable entity.

[0012] According to another aspect of the present invention, a simulation model interaction method for an asynchronous interaction interface is also provided, comprising: responding to receiving multiple request instructions from multiple clients, processing the multiple request instructions using a simulation model of the asynchronous interaction interface to obtain multiple processing results; and sending the multiple processing results to multiple clients using the simulation model, wherein the simulation model is obtained by adjusting an initial simulation model through configuration results, the initial simulation model is constructed through a header file, the configuration results are obtained by configuring the asynchronous interaction interface based on an asynchronous configuration file, the asynchronous interaction interface is created in a modeling tool, and the asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface, the asynchronous call interface and the asynchronous call result interface are used to realize asynchronous interaction between the server and the client.

[0013] According to a third aspect of the present invention, a simulation model creation apparatus for an asynchronous interactive interface is also provided, comprising: an acquisition module for acquiring an asynchronous configuration file of a modeling tool and generating a header file based on the asynchronous configuration file; a creation module for creating an asynchronous interactive interface in the modeling tool, wherein the asynchronous interactive interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface, the asynchronous call interface and the asynchronous call result interface being used to realize asynchronous interaction between a server and a client; a configuration module for configuring the asynchronous interactive interface based on the asynchronous configuration file to obtain a configuration result; a construction module for constructing an initial simulation model based on the header file; and an adjustment module for adjusting the initial simulation model based on the configuration result to obtain a simulation model of the asynchronous interactive interface.

[0014] According to a fourth aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein, when the program is running, it controls the execution of the above-described asynchronous interaction interface simulation model creation method and the above-described asynchronous interaction interface simulation model interaction method in the processor of the device.

[0015] According to a fifth aspect of the present invention, an electronic device is also provided, comprising: one or more processors; a storage device for storing one or more programs; wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-described method for creating a simulation model of an asynchronous interactive interface and the above-described method for interacting with a simulation model of an asynchronous interactive interface.

[0016] In this embodiment of the invention, an asynchronous configuration file of a modeling tool is obtained, and a header file is generated based on the asynchronous configuration file. An asynchronous interaction interface is created in the modeling tool, wherein the asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface. The asynchronous call interface and the asynchronous call result interface are used to realize asynchronous interaction between the server and the client. The asynchronous interaction interface is configured based on the asynchronous configuration file to obtain a configuration result. An initial simulation model is constructed based on the header file. The initial simulation model is adjusted based on the configuration result to obtain a simulation model of the asynchronous interaction interface. By obtaining the asynchronous configuration file from the modeling tool, creating the asynchronous interaction interface in the modeling tool, obtaining the header file from the asynchronous configuration file, configuring the asynchronous interaction interface based on the asynchronous configuration file to obtain a configuration result, and adjusting the initial simulation model obtained from the header file using the configuration result, the purpose of establishing a simulation model of the asynchronous interaction interface is achieved. This realizes the technical effect of simple and fast simulation modeling of asynchronous interaction interfaces using simulation tools, and solves the technical problem that it is impossible to simply and quickly model asynchronous interaction interfaces because simulation tools do not support asynchronous interaction interface modeling. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0018] Figure 1 This is a flowchart of a simulation model creation method for an asynchronous interactive interface according to an embodiment of the present invention;

[0019] Figure 2 This is a flowchart illustrating an optional asynchronous interactive interface simulation model creation method according to an embodiment of the present invention.

[0020] Figure 3 This is a schematic diagram of a simulation model interaction method for an asynchronous interactive interface according to an embodiment of the present invention;

[0021] Figure 4 This is a schematic diagram of a simulation model creation device for an asynchronous interactive interface according to an embodiment of the present invention. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] Example 1

[0025] According to an embodiment of the present invention, an embodiment of a simulation model creation method for an asynchronous interactive interface is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0026] Figure 1 This is a flowchart of a simulation model creation method for an asynchronous interactive interface according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0027] Step S102: Obtain the asynchronous configuration file of the modeling tool and generate a header file based on the asynchronous configuration file.

[0028] The modeling tools mentioned above are software or tools used to create, edit, and manage various models, and can be used to obtain asynchronous configuration files. An asynchronous configuration file is a file used to store and manage asynchronous interface configuration information, describing the execution rules and parameters of the asynchronous interface. The header file is generated based on the asynchronous configuration file and contains asynchronous interface information, allowing the generation of an initial simulation model of the asynchronous interaction interface.

[0029] In one optional embodiment, the asynchronous configuration file of the modeling tool is first obtained. This can be selected from, but is not limited to, VOS Architect (Vehicle Object Simulation Architect) or Rational Rose (an object-oriented visual modeling tool). For example, using VOS Architect, the C / S (Client / Server) interface can be configured for asynchronous calls, and then the asynchronous configuration file can be exported from VOS Architect. Subsequently, a header file is generated based on the asynchronous configuration file. This asynchronous configuration file can be imported into a tool that can generate header files to produce a header file containing asynchronous configuration information.

[0030] Step S104: Create an asynchronous interaction interface in the modeling tool. The asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface. The asynchronous call interface and the asynchronous call result interface are used to realize asynchronous interaction between the server and the client.

[0031] The asynchronous interaction interface described above allows a client to send a request to a server and then continue performing other operations without waiting for a result. The asynchronous interaction interface includes an asynchronous call interface and an asynchronous call result interface. These two interfaces are interconnected. The asynchronous call interface characterizes the occurrence of an asynchronous call event, while the asynchronous call result interface characterizes the result of that event and can be triggered by an asynchronous call return event. A server is a computer that provides services or resources, receives and processes client requests, and then returns the result to the client. A client is a computer or device that sends requests to a server and receives responses; it is typically a device used by an end user.

[0032] In one alternative embodiment, an asynchronous interaction interface is created in the modeling tool. First, an asynchronous call interface is created to implement asynchronous calls between the client and the server. Then, a corresponding asynchronous call result interface is established. Finally, an asynchronous call return event is established so that after using the asynchronous call interface, the returned asynchronous call return event can be received, triggering the associated asynchronous call result interface.

[0033] Step S106: Configure the asynchronous interaction interface based on the asynchronous configuration file to obtain the configuration result.

[0034] The configuration results in the above steps can characterize the underlying software configuration adapted to the asynchronous interaction interface based on the asynchronous configuration file. It can be obtained by configuring the asynchronous interaction interface according to the asynchronous configuration file and can be used to adjust the initial simulation model.

[0035] In one alternative embodiment, the configuration file can be imported into the modeling tool, and then the runnable entity task module can be configured to generate runtime environment code, operating system code, and basic software code. The configuration results can be saved for subsequent adjustments to the initial simulation model.

[0036] Step S108: Construct the initial simulation model based on the header file.

[0037] The initial simulation model in the above steps is generated based on the header file. It is a preliminary simulation model of the asynchronous interactive interface and needs to be further adjusted based on the configuration results to generate the final simulation model.

[0038] In one optional embodiment, the header file contains declarations of asynchronous scheduling runtime environment functions for software resources. The asynchronous call functions of the header file can be encapsulated in the simulation environment, and the header file can be loaded into the simulation environment. Simulink (a tool supporting design, simulation, and automatic code generation), SystemModeler (a tool for system modeling, simulation, and analysis), and Modelica (a tool for modeling, simulating, and analyzing complex dynamic systems) can be selected as the simulation environment. After encapsulating the asynchronous call functions, a call model and a result model are generated as a preliminary simulation model.

[0039] Step S110: Adjust the initial simulation model based on the configuration results to obtain the simulation model of the asynchronous interaction interface.

[0040] The simulation model in the above steps is obtained by adjusting the initial simulation model based on the configuration results. The final simulation model of the asynchronous interaction interface can realize asynchronous interaction between the server and the client.

[0041] In one alternative embodiment, the initial simulation model can be adjusted using the configuration results obtained by configuring the underlying software. After integration, compilation, burning, and debugging, an executable asynchronous interactive interface simulation model can be obtained. The simulation model can be stored in the ECU (Electronic Control Unit) and asynchronous interaction can be performed between the control server and the client.

[0042] In this embodiment of the invention, an asynchronous configuration file of a modeling tool is obtained, and a header file is generated based on the asynchronous configuration file. An asynchronous interaction interface is created in the modeling tool, wherein the asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface. The asynchronous call interface and the asynchronous call result interface are used to realize asynchronous interaction between the server and the client. The asynchronous interaction interface is configured based on the asynchronous configuration file to obtain a configuration result. An initial simulation model is constructed based on the header file. The initial simulation model is adjusted based on the configuration result to obtain a simulation model of the asynchronous interaction interface. By obtaining the asynchronous configuration file from the modeling tool, creating the asynchronous interaction interface in the modeling tool, obtaining the header file from the asynchronous configuration file, configuring the asynchronous interaction interface based on the asynchronous configuration file to obtain a configuration result, and adjusting the initial simulation model obtained from the header file using the configuration result, the purpose of establishing a simulation model of the asynchronous interaction interface is achieved. This realizes the technical effect of simple and fast simulation modeling of asynchronous interaction interfaces using simulation tools, and solves the technical problem that it is impossible to simply and quickly model asynchronous interaction interfaces because simulation tools do not support asynchronous interaction interface modeling.

[0043] Optionally, an initial simulation model is constructed based on the header file, including: adjusting the input parameter functions of the client interface and the server interface in the header file to obtain the target header file; loading the target header file into the simulation environment; and encapsulating the asynchronous call function of the target header file in the simulation environment to obtain the initial simulation model.

[0044] The client and server interfaces mentioned above are interfaces in the header file used to implement asynchronous interaction. The client interface is used for processing client-side parameters in asynchronous interaction, and the server interface is used for processing server-side parameters in asynchronous interaction. Input parameter functions are functions that accept and process input parameters. After receiving input parameters, they perform corresponding operations based on the parameter's value or type and can return the processed result. The target header file is a file obtained by adjusting the input parameter functions of the client and server interfaces based on the header file. Simulation environments are often provided through simulation software, typically using mathematical models and algorithms to simulate system behavior and providing visualization tools to display the simulation results. The asynchronous call function is encapsulated based on the function call module to obtain the initial simulation model. The asynchronous call function is a function used to implement asynchronous interaction between the client and server.

[0045] In one optional embodiment, firstly, the header file is modified by changing the input parameters of the client and server interface input function to specific data structures, and writing the function return value type and the basic data type declaration of the input parameters, thus obtaining the target header file. Subsequently, the target header file is loaded into the simulation environment, which can be Simulink, SystemModeler, or Modelica, among others. Then, asynchronous call functions are created and encapsulated within the simulation environment, with asynchronous files added during the encapsulation process to create the function call module, thereby obtaining the initial simulation model.

[0046] Optionally, the target header file is loaded into the simulation environment, and the asynchronous call function of the target header file is encapsulated in the simulation environment to obtain the initial simulation model. This includes: adding the asynchronous file from the target header file to the simulation target in the simulation environment; creating a function call module corresponding to the asynchronous call function in the simulation environment based on the asynchronous file; and encapsulating the asynchronous call function based on the function call module to obtain the initial simulation model.

[0047] The asynchronous file mentioned in the above steps is a file in the target header file used to describe the characteristics of asynchronous interaction. The function call module is the module that defines asynchronous interaction behavior and executes asynchronous interaction operation modes, corresponding to the asynchronous function call.

[0048] In one optional embodiment, Simulink, SystemModeler, and Modelica can be selected as the simulation environment. For example, taking Simulink as an example, asynchronous files are added to the Simulink simulation target. Based on the runnable entities and their configurations designed in the simulation environment architecture, corresponding function call modules are created in the asynchronous call functions. The creation method could be to generate the corresponding Simulink framework based on the asynchronous configuration file, then create the corresponding function call modules in the periodic asynchronous call functions, and also create the same function call modules in the runnable entities returned by the asynchronous calls, but this is not limited to this. Finally, the asynchronous call functions are encapsulated based on the function call modules. Modeling can be performed using SWC (SpeedWeb Compiler), but this is not limited to this, generating the corresponding SWC code to obtain the initial simulation model.

[0049] Optionally, the initial simulation model is adjusted based on the configuration results to obtain a simulation model of the asynchronous interaction interface, including: performing integration testing on the initial simulation model based on the configuration results to obtain the simulation model.

[0050] Integration testing in the above steps refers to the compilation, burning, and debugging processes during software development. Compilation and burning load the executable file into the appropriate location to perform specific functions, while debugging verifies whether the integration and interaction between different modules or components are normal.

[0051] In one optional embodiment, the initial simulation model is adjusted based on the configuration results. The configuration results are the underlying software configuration of the asynchronous interaction interface, and the initial simulation model contains descriptions of the attributes and behaviors of the asynchronous interaction interface. The configuration results and the initial simulation model are integrated and compiled to obtain compiled code, which is then exported to generate an executable file. The executable file is burned into the vehicle's electronic control unit and subsequently debugged. If the debugging is successful, the final simulation model is obtained.

[0052] Optionally, creating an asynchronous interaction interface in the modeling tool includes: creating a first runnable entity and a second runnable entity in the modeling tool; creating an asynchronous call interface within the first runnable entity; and creating an asynchronous call result interface within the second runnable entity.

[0053] The running entities in the above steps are functions or tasks defined inside the software component to execute specific functions or algorithms. The first running entity is the running entity used to create the asynchronous call interface, and the second running entity is the running entity used to create the asynchronous call result interface.

[0054] In one optional embodiment, firstly, based on the specific application domain of the asynchronous interaction interface, the asynchronous interaction interface to be established is determined. This asynchronous interaction interface can be applied in the automotive field, but is not limited to it. According to the vehicle development system architecture specifications, the asynchronous interaction interfaces to be established are determined to be an asynchronous call interface and an asynchronous call result interface. Then, a first runnable entity is created in the modeling tool to create the asynchronous call interface, and a second runnable entity is created to create the asynchronous call result interface.

[0055] Optionally, the asynchronous interaction interface also includes an asynchronous call result event interface, and the method further includes: creating an asynchronous call result event interface corresponding to the asynchronous call result interface within the second runnable entity.

[0056] The asynchronous call result event interface in the above steps corresponds to the asynchronous result call interface and is used to characterize the asynchronous call result event handling method.

[0057] In one alternative embodiment, an asynchronous call result event interface is created within a second runnable entity. The asynchronous call result event interface corresponds to the asynchronous call result interface, and its use can trigger a response from the asynchronous call result interface.

[0058] The following is combined with Figure 2 A preferred embodiment of the present invention will be described in detail below, such as... Figure 2 As shown, the creation of the asynchronous interaction interface simulation model includes three steps: design, development, and integration testing. In the design phase, asynchronous configuration is performed in the modeling tool, and an asynchronous configuration file containing asynchronous information is obtained. In the development phase, the asynchronous interaction interface is created in the modeling tool, the asynchronous configuration file is imported, the underlying software is configured, and runtime environment code, operating system code, and basic software code supporting the asynchronous interaction mode are generated. Simultaneously, in the development phase, a header file is generated based on the asynchronous information in the asynchronous configuration file. Then, the synchronous file is loaded into the simulation software, a function call module is created in the simulation software, and the asynchronous scheduling function in the header file is encapsulated. High-speed network compiler modeling is then performed to obtain the corresponding high-speed network compiler code. Finally, the runtime environment code, operating system code, basic software code, and high-speed network compiler code are integrated and compiled to obtain an executable file. This executable file is then burned into the vehicle's electronic control unit for debugging. After successful debugging, the simulation model of the asynchronous interaction interface is obtained.

[0059] Example 2

[0060] According to an embodiment of the present invention, an embodiment of a simulation model interaction method for an asynchronous interactive interface is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0061] Figure 3 This is a method for creating a simulation model of an asynchronous interactive interface according to an embodiment of the present invention, such as... Figure 3 As shown, the method includes the following steps:

[0062] Step S202: In response to receiving multiple request commands from multiple clients, the simulation model of the asynchronous interaction interface is used to process the multiple request commands and obtain multiple processing results.

[0063] In one optional embodiment, when the server receives multiple request commands from multiple clients, it processes the multiple request commands using a simulation model of the asynchronous interaction interface burned into the vehicle's electronic control unit. Following the principle of asynchronous interaction, after sending a request command, the client does not need to wait for the server's response and can continue to execute other tasks without being blocked. The server processes the request commands in a certain order, determined by the specific algorithm used by the server, and obtains multiple processing results after processing.

[0064] Step S204: Using the simulation model, multiple processing results are sent to multiple clients respectively. The simulation model is obtained by adjusting the initial simulation model through the configuration results. The initial simulation model is constructed through the header file. The configuration results are obtained by configuring the asynchronous interaction interface based on the asynchronous configuration file. The asynchronous interaction interface is created in the modeling tool. The asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface. The asynchronous call interface and the asynchronous call result interface are used to realize asynchronous interaction between the server and the client.

[0065] In one alternative embodiment, after the server processes multiple request commands, it uses a simulation model to send multiple processing results to multiple clients. The multiple processing results can be sent to multiple clients in the form of a callback function, or the processing results can be notified to multiple clients asynchronously, but it is not limited to these methods.

[0066] It should be noted that the specific implementation method and preferred application scenario of this embodiment are the same as those of Embodiment 1 above, and will not be repeated here.

[0067] Example 3

[0068] According to another aspect of the present invention, an embodiment of a simulation model creation device for an asynchronous interactive interface is also provided. This device can execute the simulation model creation method for the asynchronous interactive interface provided in Embodiment 1 above. The specific implementation method and preferred application scenario are the same as those in Embodiment 1 above, and will not be repeated here.

[0069] Figure 4 This is a schematic diagram of a vehicle diagnostic device according to an embodiment of the present invention. Figure 4 As shown, the device includes:

[0070] Module 40 is used to obtain the asynchronous configuration file of the modeling tool and generate a header file based on the asynchronous configuration file.

[0071] Create module 42 to create asynchronous interaction interfaces in the modeling tool. The asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface. The asynchronous call interface and the asynchronous call result interface are used to realize asynchronous interaction between the server and the client.

[0072] Configuration module 44 is used to configure the asynchronous interaction interface based on the asynchronous configuration file and obtain the configuration result.

[0073] Module 46 is used to build the initial simulation model based on the header file.

[0074] Adjustment module 48 is used to adjust the initial simulation model based on the configuration results to obtain the simulation model of the asynchronous interactive interface.

[0075] Optionally, the construction module includes: an adjustment unit for adjusting the input parameter functions of the client interface and the server interface in the header file to obtain the target header file; and an encapsulation unit for loading the target header file into the simulation environment and encapsulating the asynchronous call functions of the target header file in the simulation environment to obtain the initial simulation model.

[0076] Optionally, the encapsulation unit is also used to add asynchronous files from the target header file to the simulation target in the simulation environment; create function call modules corresponding to the asynchronous call functions in the simulation environment based on the asynchronous files; and encapsulate the asynchronous call functions based on the function call modules to obtain the initial simulation model.

[0077] Optionally, the adjustment module includes an integration test module, used to perform integration tests on the initial simulation model based on the configuration results to obtain the simulation model.

[0078] Optionally, the creation module includes: a first creation unit for creating a first runnable entity and a second runnable entity in the modeling tool; a second creation unit for creating an asynchronous call interface within the first runnable entity; and a third creation unit for creating an asynchronous call result interface within the second runnable entity.

[0079] Optionally, the third creation unit is also used to create an asynchronous call result event interface corresponding to the asynchronous call result interface within the second runnable entity.

[0080] Example 4

[0081] According to embodiments of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein, when the program is running, it controls the device where the computer-readable storage medium is located to execute the simulation model creation method of the asynchronous interaction interface in Embodiment 1 and the simulation model interaction method of the asynchronous interaction interface in Embodiment 2.

[0082] Example 5

[0083] According to embodiments of the present invention, an electronic device is also provided, including one or more processors and a storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors execute the simulation model creation method of the asynchronous interaction interface in Embodiment 1 and the simulation model interaction method of the asynchronous interaction interface in Embodiment 2.

[0084] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0085] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0086] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0087] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0088] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0089] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0090] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method of creating a simulation model of an asynchronous interaction interface, characterized by, include: Obtain the asynchronous configuration file of the modeling tool, and generate a header file based on the asynchronous configuration file; An asynchronous interaction interface is created in the modeling tool, wherein the asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface, and the asynchronous call interface and the asynchronous call result interface are used to realize asynchronous interaction between the server and the client; The asynchronous interaction interface is configured based on the asynchronous configuration file to obtain the configuration result; The input parameter functions of the client interface and server interface in the header file are adjusted to obtain the target header file; The target header file is loaded into the simulation environment, and the asynchronous call function of the target header file is encapsulated in the simulation environment to obtain the initial simulation model; Based on the configuration results, the initial simulation model is integrated and tested to obtain the simulation model.

2. The method of claim 1, wherein, The target header file is loaded into the simulation environment, and the asynchronous call function of the target header file is encapsulated in the simulation environment to obtain the initial simulation model, including: Add the asynchronous file from the target header file to the simulation target in the simulation environment; Based on the asynchronous file, create the function call module corresponding to the asynchronous call function in the simulation environment; The asynchronous call function is encapsulated based on the function call module to obtain the initial simulation model.

3. The method of claim 1, wherein, Create an asynchronous interaction interface in the modeling tool, including: Create a first runnable entity and a second runnable entity in the modeling tool; Create the asynchronous call interface within the first runnable entity; Create the asynchronous call result interface within the second runnable entity.

4. The method of claim 3, wherein, The asynchronous interaction interface also includes an asynchronous call result event interface, and the method further includes: Within the second runnable entity, create the asynchronous call result event interface corresponding to the asynchronous call result interface.

5. A method for interacting with a simulation model of an asynchronous interaction interface, the method comprising: The simulation model obtained by applying the method of any one of claims 1 to 4 includes: In response to receiving multiple request commands from multiple clients, the simulation model of the asynchronous interaction interface is used to process the multiple request commands and obtain multiple processing results; The simulation model is used to send the multiple processing results to the multiple clients respectively. The simulation model is obtained by adjusting the initial simulation model through the configuration results. The initial simulation model is constructed through the header file. The configuration results are obtained by configuring the asynchronous interaction interface based on the asynchronous configuration file. The asynchronous interaction interface is created in the modeling tool. The asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface. The asynchronous call interface and the asynchronous call result interface are used to realize asynchronous interaction between the server and the client.

6. An asynchronous interaction interface simulation model creation apparatus characterized by comprising: include: The acquisition module is used to acquire the asynchronous configuration file of the modeling tool and generate a header file based on the asynchronous configuration file; A creation module is used to create an asynchronous interaction interface in the modeling tool, wherein the asynchronous interaction interface includes at least an asynchronous call interface and an asynchronous call result interface corresponding to the asynchronous call interface, and the asynchronous call interface and the asynchronous call result interface are used to realize asynchronous interaction between the server and the client; The configuration module is used to configure the asynchronous interaction interface based on the asynchronous configuration file and obtain the configuration result; A construction module is used to adjust the input parameter functions of the client interface and server interface in the header file to obtain the target header file; the target header file is loaded into the simulation environment, and the asynchronous call function of the target header file is encapsulated in the simulation environment to obtain the initial simulation model; The adjustment module is used to perform integrated testing on the initial simulation model based on the configuration results, so as to obtain the simulation model.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the processor of the device to execute the simulation model creation method of the asynchronous interactive interface according to any one of claims 1 to 4 and the simulation model interaction method of the asynchronous interactive interface according to claim 5.

8. An electronic device, comprising: include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors execute the simulation model creation method of the asynchronous interactive interface according to any one of claims 1 to 4 and the simulation model interaction method of the asynchronous interactive interface according to claim 5.

Citation Information

Patent Citations

  • Distributed real-time interactive simulation system based on modelica modeling language

    CN102622262A

  • Implementation method for simulation application of visual integrated environment on basis of object class interaction diagrams

    CN104268346A