Interface model updating method and device, electronic equipment and storage medium
By obtaining and utilizing version difference information for interface model updates, the problems of high cost and poor stability in MATLAB script updates are solved, efficient interface model updates and continuous integration are achieved, and the delivery frequency and reliability of application-level software are improved.
Patent Information
- Application Number
- CN202510411419.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-07-11
AI Technical Summary
In the application layer software development of vehicle control units, the existing technology automatically generates interface models and files through MATLAB scripts and has problems such as high licensing costs, insufficient automation, low stability, and poor continuous integration support, making it difficult to effectively support the update of interface models and files.
By obtaining the model configuration file and version difference information of the original interface model, using file writing operations outside the script to write the version difference information to the model configuration file, generating the current configuration file, and creating a model update script based on the file path information, realizing incremental update of the interface model, reducing dependence on paid licensing platforms, and improving stability and update speed.
It has achieved the reduction of R&D costs, improved the stability and speed of interface model updates, supported continuous integration, and improved the delivery frequency and reliability of application-level software.
Smart Images

Figure CN120295658A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of model updating, and particularly to an interface model updating method, apparatus, electronic device, and storage medium. Background Art
[0002] In the application layer software development of vehicle control units, the input / output signals and the interaction signals between the bottom layer software (Bottom Layer, B) and the application layer (Application Layer, A) are usually defined by spreadsheet files. The interaction signals include the BtoA signals transmitted from the bottom layer software to the application layer and the AtoB signals transmitted from the application layer to the bottom layer software. The spreadsheet files include Excel. In addition, the Data Communication Message (DCM) calibration file is used to store key information such as replacement values and timeout calibrations. The traditional manual maintenance of these files is not only time-consuming but also prone to introducing human errors, affecting the development efficiency and software quality.
[0003] To solve the above problems, attempts have been made to use MATLAB scripts to automatically generate the updates of the interface model and files. However, MATLAB scripts bring new problems such as high licensing costs, insufficient automation, low stability, and poor continuous integration support, making it difficult to support the updates of the interface model and files. Summary of the Invention
[0004] This application provides an interface model updating method, apparatus, electronic device, and storage medium to solve the above technical problem that it is difficult to automatically support the updates of the interface model and files through scripts.
[0005] In some embodiments of this application, an interface model updating method is provided, including: obtaining a model configuration file and version difference information of an original interface model, where the model configuration file at least includes file path information and diagnostic configuration information, the original interface model is used to simulate the transmission process of messages and signals, the version difference information is obtained based on communication data definition files of different versions, and the communication data definition file is used to store the attributes, formats, and protocols of messages and signals; writing the version difference information into the model configuration file through a file writing operation external to the script to obtain a current configuration file; creating a model update script corresponding to the version difference information based on the file path information, and performing data writing on the model update script according to the version difference information to obtain a current update script, where the data writing includes converting the format of the version difference information into a format recognizable by the model update script through a file writing operation external to the script and writing it into the model update script; and updating the original interface model according to the current update script and the current configuration file to obtain a target interface model.
[0006] In some embodiments of the present application, the version difference information is written into the model configuration file through a file writing operation external to the script to obtain the current configuration file, including: reading the model configuration file through a file writing operation external to the script, where the model configuration file further includes model variable definition information and diagnostic configuration information; updating the model variable definition information based on the version difference information, where the model variable definition information includes at least one of message attribute information, signal attribute information, and control calibration information; updating the diagnostic configuration information based on the version difference information, where the diagnostic configuration information includes at least one of timeout calibration information and alternative values.
[0007] In some embodiments of the present application, the format of the version difference information is converted into a format recognizable by the model update script through a file writing operation external to the script and written into the model update script, including: converting the format of the version difference information into a format corresponding to the transmission simulation module in the current update script through a file writing operation external to the script, where the format corresponding to the transmission simulation module includes at least one of module definition elements, connections, bus signal generation, and output port setting formats; obtaining the data writing permission of the current update script through a file writing operation external to the script, and converting the converted version difference information into a string and writing it into the model update script to obtain the current update script; where the transmission simulation module is used for modular representation of the transmission of messages and signals, and the module definition elements include at least one of module name elements, module location elements, module background color elements, module port handle elements, and unified management elements.
[0008] In some embodiments of the present application, the version difference information is obtained based on communication data definition files of different versions, including: converting communication definition files of different versions into comparison graphs in graph format, where the nodes of the comparison graphs are used to represent data definition elements, and the edges in the comparison graphs are used to represent the association relationships between the data definition elements; associating the attribute information of the data definition elements with the corresponding nodes; setting the relationship types and influence weights corresponding to the association relationships; and identifying the graph changes between the comparison graphs of different versions based on the relationship types, the influence weights, and the attribute information to obtain the version difference information.
[0009] In some embodiments of the present application, the difference types of the version difference information include addition of messages, deletion of messages, addition of signals, deletion of signals, and modification of signals; the modification of signals includes at least one of modification of signal maximum value, signal minimum value, signal offset, signal gain, and signal start bit.
[0010] In some embodiments of the present application, updating the original interface model according to the current update script and the current configuration file to obtain a target interface model includes: obtaining the current update script, the current configuration file, and the original interface model; preliminarily updating the original interface model according to the call of the current configuration file and the current update script to obtain a current interface model; testing the current interface model; if the test passes, determining the current interface model as the target interface model; if the test fails, repairing the current interface model to obtain the target interface model.
[0011] In some embodiments of the present application, testing the current interface model includes: performing an independent function test on the transmission simulation module in the current interface model; performing an interaction function test on the combination of multiple transmission simulation modules; performing a usage test on the current interface model, where the usage test includes function correctness, response time, and resource consumption.
[0012] In some embodiments of the present application, after obtaining the model configuration file and the version difference information of the original interface model, the method further includes: structurally storing the version difference information; structurally storing the update status of the model configuration file, as well as the generation status and writing status of the current update script; where the structurally stored information is used for the update audit and problem tracking of the original interface model.
[0013] In some embodiments of the present application, the present application provides an interface model update device, including: an acquisition module, configured to acquire a model configuration file and version difference information of an original interface model, where the model configuration file at least includes file path information and diagnostic configuration information, the original interface model is used to simulate the transmission process of messages and signals, the version difference information is obtained based on communication data definition files of different versions, and the communication data definition file is used to store the attributes, formats, and protocols of messages and signals; a configuration module, configured to write the version difference information into the model configuration file through a file writing operation external to the script to obtain a current configuration file; a script generation module, configured to create a model update script corresponding to the version difference information based on the file path information, and perform data writing on the model update script according to the version difference information to obtain a current update script, where the data writing includes converting the format of the version difference information into a format recognizable by the model update script through a file writing operation external to the script and writing it into the model update script; an update module, configured to update the original interface model according to the current update script and the current configuration file to obtain a target interface model.
[0014] In some embodiments of the present application, the present application provides an electronic device, which includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements the steps of the interface model update method as described in any one of the above.
[0015] In some embodiments of the present application, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor of a computer, the computer executes the steps of the interface model update method as described in any one of the above.
[0016] Advantages of the embodiments of the present application: The present application provides an interface model update method, device, electronic device and storage medium. In the embodiments of the present application, the update of the model configuration file and the generation of the current update script are completed through the file writing operation outside the script. During the update process of the original interface model, the dependence on the paid licensing platform is reduced, and the R & D cost is lowered; incremental modification can be achieved through the version difference information, the amount of file modification is reduced, and the stability and update speed are improved, so that continuous integration can be supported, continuous construction and automated testing can be realized, and the delivery frequency and reliability of the application layer software are improved.
[0017] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts. In the drawings:
[0019] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied is shown;
[0020] Figure 2 A flowchart of an interface model update method according to an embodiment of the present application is shown;
[0021] Figure 3 An implementation flowchart of an interface model update method according to an embodiment of the present application is shown;
[0022] Figure 4 A block diagram of an interface model update device according to an embodiment of the present application is shown;
[0023] Figure 5The structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown. Detailed implementation manners
[0024] The following uses specific specific examples to illustrate the implementation manners of the present application. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0025] The diagrams provided in the following embodiments only illustrate the basic concept of the present application in a schematic manner. Therefore, only the components related to the present application are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The form, quantity, and proportion of each component in actual implementation can be an arbitrary change, and the layout form of its components may also be more complex.
[0026] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0027] Please refer to Figure 1 , Figure 1 The schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied is shown. As Figure 1 shown, the original interface model, model configuration file, and current update script are usually stored in a version control system and the update of the original interface model is implemented through a continuous integration (CI) platform. The version control system includes a distributed system, such as a Git repository. The format of the current update script includes the MATLAB script format of a paid licensing platform, and the format of the original interface model includes the simulink (a graphical programming environment based on MATLAB) model format in MATLAB.
[0028] In some embodiments of the present application, when it is detected that there is an update to a message or signal, a full new original interface model can be generated through a MATLAB script to achieve model update. However, due to the high dependence on MATLAB, the number of licenses increases, which raises the R & D cost. Moreover, the newly generated full files need to be manually copied to the project files corresponding to the original interface model, increasing the consumption of human resources and being unable to support continuous integration (CI). CI is a software development practice that completes integration functions such as compilation, release, and automated testing during the update process of the original interface model. Each time a full generation is performed, the modification amount of the project files is too large, which is not conducive to the stability of the application layer software. The project files include spreadsheet files corresponding to model variable definition information, data communication message (DCM) calibration files corresponding to diagnostic configuration information, binary files corresponding to the original model interface, etc. In contrast, through the file writing operation outside the script in the present application, the model configuration file can be directly incrementally updated based on the version difference information, and the current update script can be generated, reducing the dependence on MATLAB, reducing the file modification amount, improving stability and update speed, supporting continuous integration, realizing continuous construction and automated testing, and improving the delivery frequency and reliability of the application layer software.
[0029] To solve the above technical problems, the present application provides an interface model update method, device, electronic device, and storage medium. The implementation details of the technical solutions of the embodiments of the present application will be elaborated in detail below.
[0030] Please refer to Figure 2 , Figure 2 which shows a schematic flowchart of an interface model update method according to an embodiment of the present application. As Figure 2 shown, in an exemplary embodiment, the interface model update method at least includes steps S210 to S240, which are introduced in detail as follows:
[0031] Step S210, obtain the model configuration file and version difference information of the original interface model. The model configuration file at least includes file path information and diagnostic configuration information. The original interface model is used to simulate the transmission process of messages and signals. The version difference information is obtained based on communication data definition files of different versions. The communication data definition files are used to store the attributes, formats, and protocols of messages and signals.
[0032] Step S220, write the version difference information into the model configuration file through a file writing operation outside the script to obtain the current configuration file.
[0033] Step S230: Create a model update script corresponding to the version difference information based on the file path information, and write data to the model update script according to the version difference information to obtain the current update script. The data writing includes converting the format of the version difference information into a format recognizable by the model update script through a file writing operation external to the script and writing it into the model update script.
[0034] Step S240: Update the original interface model according to the current update script and the current configuration file to obtain the target interface model.
[0035] In some embodiments of the present application, the communication data definition file includes a Controller Area Network Database (DBC) file, a communication configuration (ARXML) file under the AUTOSAR standard, etc.; the DBC file details the attribute information of each message and the signals it contains in the Controller Area Network (CAN); the ARXML file is used to define the architecture of the automotive electronic system.
[0036] In some embodiments of the present application, the type of the message includes CAN messages.
[0037] In some embodiments of the present application, the model variable definition information is used to characterize the declarations and definitions of various variables used in the original interface model, including but not limited to variable names, data types, initial values, range limits, etc. The file path information is used to characterize the file storage location information corresponding to the original interface model to store the original interface model, the current update script, and the model configuration file. The diagnostic configuration information is used to characterize the pre-configured processing mechanism, such as timeout calibration information and alternative values.
[0038] In some embodiments of the present application, the file writing operation external to the script is provided by a platform other than the platform where the model update script itself is located, such as the Go language platform in an open-source platform, reducing the dependence on a paid license platform.
[0039] In some embodiments of the present application, the format recognizable by the model update script can be the MATLAB script format. Among them, the created model update script is an empty file.
[0040] In some embodiments of the present application, in step S210, the version difference information can be obtained by comparing different versions of the communication data definition files. For example, for two different versions of the communication data definition files, the comparison function of pycharm in an open-source Integrated Development Environment (IDE) tool can be used to obtain the version difference information.
[0041] In some embodiments of the present application, in step S230, a model update script is created under the defined file path based on the file path information. Among them, the number of model update scripts created can be determined based on the number of signals in the version difference information.
[0042] In some embodiments of the present application, there is no limitation on the order between the update of the model configuration file in step S220 and the generation of the current update script in step S230.
[0043] In some embodiments of the present application, the present application can directly complete the update of the model configuration file and the generation of the current update script through file writing operations outside the script, reducing the dependence on the paid license platform and lowering the R & D cost; moreover, incremental modification can be achieved through the version difference information, reducing the amount of file modification, improving stability and update speed, thereby supporting continuous integration, realizing continuous construction and automated testing, and improving the delivery frequency and reliability of the application layer software.
[0044] In some embodiments of the present application, the version difference information is obtained based on communication data definition files of different versions, including: converting communication definition files of different versions into comparison graphs in graph format, where the nodes of the comparison graphs are used to represent data definition elements, and the edges in the comparison graphs are used to represent the association relationships between data definition elements; associating the element attribute information of the data definition elements with the corresponding nodes; setting the relationship types and influence weights corresponding to the association relationships; and identifying the graph changes between the comparison graphs of different versions based on the relationship types, influence weights, and attribute information to obtain the version difference information.
[0045] In some embodiments of the present application, the data definition elements include signals, messages, and communication nodes.
[0046] In some embodiments of the present application, the communication nodes include electronic control units (ECUs) that send and receive messages.
[0047] In some embodiments of the present application, the relationship types of the association relationships include at least one of dependence, inclusion, parallelism, sequence, etc.
[0048] In some embodiments of the present application, there may be interdependent relationships between signals, transmission sequence relationships between messages, and message sending and receiving relationships between ECUs, etc. These edges can be one-to-one, one-to-many, or many-to-many association relationships.
[0049] In some embodiments of the present application, through the edges between each node, the association relationships that signals belong to messages and messages belong to ECUs can be obtained.
[0050] In some embodiments of the present application, the influence weight is used to characterize the influence strength between two data definition elements. For example, the influence strength of a signal on a message.
[0051] In some embodiments of the present application, the element attribute information includes message attribute information and signal attribute information.
[0052] In some embodiments of the present application, the graph change is obtained by the fast retrieval difference function of the graph database to find the changes of nodes and edges. For example, the graph changes between different versions of the graphs to be compared are determined by algorithms such as graph traversal, graph clustering, and graph similarity measurement.
[0053] In some embodiments of the present application, the graph changes are obtained by the Graph Diff algorithm in graph similarity measurement or based on the structural similarity of the graph to identify similar nodes and edges.
[0054] In some embodiments of the present application, the difference types of the version difference information include the addition of a message, the deletion of a message, the addition of a signal, the deletion of a signal, and the modification of a signal; the modification of a signal includes at least one of the modification of the signal maximum value, the signal minimum value, the signal offset, the signal gain, and the signal start bit.
[0055] In some embodiments of the present application, the version difference information is written into the model configuration file through a file writing operation external to the script to obtain the current configuration file, including: reading the model configuration file through a file writing operation external to the script, and the model configuration file further includes model variable definition information and diagnostic configuration information; updating the model variable definition information based on the version difference information, and the model variable definition information includes at least one of message attribute information, signal attribute information, and control calibration information; updating the diagnostic configuration information based on the version difference information, and the diagnostic configuration information includes at least one of timeout calibration information and alternative values.
[0056] In some embodiments of the present application, the message attribute information includes message identification, message name, message length, period, etc. The signal attribute information includes signal name, signal range, signal offset, signal start bit, etc. The control calibration information is used to characterize the adjustable performance optimization parameters for calibration, such as fuel injection time, etc.
[0057] In some embodiments of the present application, the model variable definition information further includes input variable information and output variable information of the original interface model.
[0058] In some embodiments of the present application, the timeout calibration information is used for preset disposal methods after exceeding the set response time, such as retry, abandon, etc. The alternative value is used to temporarily replace the actual value with a preset value during the test session or the fault session to ensure the correctness and integrity of the message and the signal.
[0059] In some embodiments of the present application, the model variable definition information further includes the number of messages and the nodes for message sending and receiving.
[0060] In some embodiments of the present application, the model variable definition information is stored in a spreadsheet file, such as Excel. The diagnostic configuration information is stored in the DCM calibration file to ensure the correctness and integrity of the newly added signals. If there are signals deleted or modified, corresponding modifications are also required.
[0061] In some embodiments of the present application, after reading the model configuration file through the Go language, updates can be made, thereby achieving incremental updates to the model configuration file, without relying on a paid licensing platform, and providing support for CI.
[0062] In some embodiments of the present application, the format of the version difference information is converted into a format recognizable by the model update script through a file writing operation external to the script and written into the model update script, including: converting the format of the version difference information into the format corresponding to the transmission simulation module in the current update script through a file writing operation external to the script, and the format corresponding to the transmission simulation module includes at least one of module definition elements, connections, bus signal generation, and output port setting formats; obtaining the data writing permission of the current update script through a file writing operation external to the script, and converting the converted version difference information into a string and writing it into the model update script to obtain the current update script; wherein, the transmission simulation module is used for modular representation of message and signal transmission, and the module definition elements include at least one of module name elements, module location elements, module background color elements, module port handle elements, and unified management elements.
[0063] In some embodiments of the present application, the current update script in MATLAB format is dynamically written through the Go language. The current update script contains the logic for modifying the original interface model in the simulink model format, including adding new signals, modifying signal attribute information, deleting the model in simulink format, etc. The present application takes adding a new signal as an example to illustrate the generation of the current update script. Among them, the name of the newly added signal is Rx_ESP, the signal ID is IFA, and the newly added signal is an input signal of the CAN signal of the Powertrain (PT). This is only an example and does not impose any restrictions on the version difference information of the present application.
[0064] In some embodiments of the present application, a model update file corresponding to the newly added signal is created, such as named: PT_Rx_SRR_1FA_message_add_1.m.
[0065] In some embodiments of the present application, the transmission simulation module corresponding to the new signal is added through the add_block function in Simulink. For example, after copying an input module in Simulink through the add_block function, the name and placement path of the input module are defined to obtain the transmission simulation module corresponding to the new signal.
[0066] In some embodiments of the present application, the module position element and module background color element of the transmission simulation module are set through the set_param function in Simulink.
[0067] In some embodiments of the present application, the vertical coordinate of the lower left corner and the module height in the module position element can be set based on the total amount of signals. For example, [900, 100 + Sig_CNT * 175, 1000, 125 + Sig_CNT * 175], where 900 is the horizontal coordinate of the lower left corner, 100 + Sig_CNT * 175 is the vertical coordinate of the lower left corner, 1000 is the module width, and Sig_CNT * 175 is the module height, and Sig_CNT is the number of signals.
[0068] In some embodiments of the present application, the module port handle is obtained through the get_param function in Simulink to connect multiple transmission simulation modules, modify port attributes, etc.
[0069] In some embodiments of the present application, the transmission simulation module with the parameter settings completed is added to the end of the unified management vector of the transmission simulation modules to achieve unified management of the transmission simulation modules. As shown in Model1_all = [Model1_all Htemp], the Htemp corresponding to the transmission simulation module is added to the unified management vector Model1_all.
[0070] In some embodiments of the present application, file writing is performed through fmt.Fprintf(in.file, "converted version difference information") in the Go language. Here, in.file points to the model update script, and the converted version difference information is formatted into a string through the fmt.Fprintf function and written into the model update script to obtain the current update script, thereby decoupling MATLAB, reducing the direct dependence on the MATLAB environment, and allowing developers and maintainers to work without a MATLAB license to support continuous integration.
[0071] In some embodiments of the present application, the present application completes simmulink elements such as wiring, bus signal generation (buscreater), and output port (OUT) through an open-source platform.
[0072] In some embodiments of the present application, after obtaining the model configuration file and the version difference information of the original interface model, the method further includes: storing the version difference information in a structured manner; storing the update status of the model configuration file, as well as the generation status and writing status of the current update script in a structured manner; wherein, the information stored in a structured manner is used for the update audit and problem tracking of the original interface model.
[0073] In some embodiments of the present application, the specific content of the incremental change of each operation is recorded, that is, the version difference information, such as the addition of signals, the deletion of signals, and the modification of signals; the update status, generation status, and writing status can be identified as failed or successful. The information stored in a structured manner is also the log, and the log is used for subsequent update audit and problem tracking.
[0074] In some embodiments of the present application, the original interface model is updated according to the current update script and the current configuration file to obtain the target interface model, including: obtaining the current update script, the current configuration file, and the original interface model; initially updating the original interface model according to the call of the current configuration file and the current update script to obtain the current interface model; testing the current interface model; if the test passes, determining the current interface model as the target interface model; if the test fails, repairing the current interface model to obtain the target interface model.
[0075] In some embodiments of the present application, after downloading the current update script, the current configuration file, and the original interface model from the version control system through continuous integration (CI), the current update script is called, and the original interface model is initially updated according to the current configuration file, and then the final update of the original interface model is completed through model testing to obtain the target interface model.
[0076] In some embodiments of the present application, the current update script is called under the license of the paid license platform. The present application can use the license of the paid license platform in the model update process to reduce the number of licenses occupied.
[0077] In some embodiments of the present application, in the configuration automatic build of the CI process, the current update script is called through jenkins (an open-source tool for continuous integration), and the original interface model is updated according to the current configuration file, and then the automated test is run to verify the correctness and stability of the generated current interface model, and potential problems are discovered and repaired in a timely manner, so as to obtain the final target interface model.
[0078] In some embodiments of the present application, testing the current interface model includes: performing independent functional testing on the transmission simulation module in the current interface model; performing interactive functional testing on the combination of multiple transmission simulation modules; and performing usage testing on the current interface model, where the usage testing includes functional correctness, response time, and resource consumption.
[0079] In some embodiments of the present application, with the support of continuous integration, the present application can achieve automatic update and automatic testing, improving the delivery frequency and reliability of application layer software.
[0080] In some embodiments of the present application, please refer to Figure 3 , Figure 3 shows a schematic flowchart of the implementation process of an interface model update method according to an embodiment of the present application. As Figure 3 shown, in step S310, identifying changed content: obtaining version difference information through the graph changes of communication data definition files of different versions. If there is version difference information, proceed to step S320; if there is no version difference information, proceed to step S360; in step S320, dynamically incrementally modifying information: incrementally updating the version difference information to the model configuration file through file writing operations outside the script; in step S330, generating the current update script: creating a model update script corresponding to the version difference information based on the file path information, converting the format of the version difference information to a format recognizable by the model update script through file writing operations outside the script, and writing it into the model update script to obtain the current update script; in step S340, writing logs: respectively storing the version difference information, the update status of the model configuration file, the generation status of the current update script, and the writing status in a structured manner in the logs for reference in the update audit and problem tracking of the original interface model; in step S350, CI updating the original interface model: after downloading the current update script, the current configuration file, and the original interface model through continuous integration, completing the update of the original interface model; in step S360, no increment: a prompt indicating no version difference information can be output to end the update.
[0081] Please refer to Figure 4 , Figure 4 shows a block diagram of an interface model update device according to an embodiment of the present application. This device can be applied to the Figure 1 shown implementation environment. This device can also be applicable to other exemplary implementation environments and be specifically configured in other devices. This embodiment does not limit the implementation environment applicable to this device.
[0082] As Figure 4 shown, an interface model update device 400 according to an embodiment of the present application includes: an acquisition module 401, a configuration module 402, a script generation module 403, and an update module 404.
[0083] Among them, an acquisition module 401 is configured to acquire a model configuration file and version difference information of an original interface model. The model configuration file at least includes file path information and diagnostic configuration information. The original interface model is used to simulate the transmission process of messages and signals. The version difference information is obtained based on communication data definition files of different versions. The communication data definition files are used to store attributes, formats, and protocols of messages and signals.
[0084] A configuration module 402 is configured to write the version difference information into the model configuration file through a file writing operation outside the script to obtain a current configuration file.
[0085] A script generation module 403 is configured to create a model update script corresponding to the version difference information based on the file path information, and perform data writing on the model update script according to the version difference information to obtain a current update script. The data writing includes converting the format of the version difference information into a format recognizable by the model update script through a file writing operation outside the script and writing it into the model update script.
[0086] An update module 404 is configured to update the original interface model according to the current update script and the current configuration file to obtain a target interface model.
[0087] The interface model update device provided in the above embodiments and the interface model update method provided in the above embodiments belong to the same concept. The specific manners in which each module and unit perform operations have been described in detail in the method embodiments and will not be elaborated here. In practical applications, the interface model update device provided in the above embodiments can, according to needs, allocate the above functions to different functional modules, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above. This is not limited here either.
[0088] An embodiment of the present application further provides an electronic device, including: one or more processors; a storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the electronic device implements the interface model update method provided in each of the above embodiments.
[0089] Please refer to Figure 5 , Figure 5 which shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. Figure 5 The computer system 500 of the electronic device shown is only an example and should not impose any limitations on the functions and usage scopes of the embodiments of the present application.
[0090] As Figure 5As shown, computer system 500 includes a central processing unit 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory 502 or a program loaded from a storage section 508 into a random access memory 503, such as executing the methods in the above embodiments. In the random access memory 503, various programs and data required for system operation are also stored. The central processing unit 501, the read-only memory 502, and the random access memory 503 are connected to each other via a bus 504. An input / output interface 505 is also connected to the bus 504.
[0091] The following components are connected to the input / output interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom can be installed into the storage section 508 as needed.
[0092] Specifically, according to an embodiment of the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 509, and / or installed from the removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, various functions defined in the system of the present application are executed.
[0093] The computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0095] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not, in some cases, constitute a limitation on the units themselves. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of this application.
[0096] Another aspect of this application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor of the computer, the computer is enabled to execute the interface model update method provided in each of the above embodiments. The computer-readable storage medium can be included in the electronic device described in the above embodiments, or can exist alone without being assembled into the electronic device.
[0097] In the above embodiments, unless otherwise specified, when using serial numbers such as "first" and "second" to describe a common object, it only indicates different instances of the same object being referred to, rather than indicating that the object being described must be in a given order, whether in terms of time, space, sorting, or any other way.
[0098] The above embodiments are only used to exemplarily illustrate the principles and effects of this application, rather than to limit this application. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed in this application should still be covered by the claims of this application.
Claims
1. An interface model update method, characterized in that, The method includes: Obtaining a model configuration file and version difference information of an original interface model, where the model configuration file includes at least file path information and diagnostic configuration information, the original interface model is used to simulate the transmission process of messages and signals, the version difference information is obtained based on communication data definition files of different versions, and the communication data definition files are used to store attributes, formats, and protocols of messages and signals; Writing the version difference information into the model configuration file through a file writing operation external to the script to obtain a current configuration file; Creating a model update script corresponding to the version difference information based on the file path information, and performing data writing on the model update script according to the version difference information to obtain a current update script, where the data writing includes converting the format of the version difference information into a format recognizable by the model update script through a file writing operation external to the script and writing it into the model update script; Updating the original interface model according to the current update script and the current configuration file to obtain a target interface model.
2. The interface model update method according to claim 1, wherein Writing the version difference information into the model configuration file through a file writing operation external to the script to obtain a current configuration file, including: Reading the model configuration file through a file writing operation external to the script, where the model configuration file further includes model variable definition information and diagnostic configuration information; Updating the model variable definition information based on the version difference information, where the model variable definition information includes at least one of message attribute information, signal attribute information, and control calibration information; Updating the diagnostic configuration information based on the version difference information, where the diagnostic configuration information includes at least one of timeout calibration information and alternative values.
3. The interface model update method according to claim 1, characterized in that, Converting the format of the version difference information into a format recognizable by the model update script through a file writing operation external to the script and writing it into the model update script, including: Converting the format of the version difference information into a format corresponding to a transmission simulation module in the current update script through a file writing operation external to the script, where the format corresponding to the transmission simulation module includes at least one of module definition elements, connections, bus signal generation, and output port setting formats; Obtaining data writing permission for the current update script through a file writing operation external to the script, and converting the converted version difference information into a string and writing it into the model update script to obtain a current update script; Wherein, the transmission simulation module is used for modular representation of the transmission of messages and signals, and the module definition elements include at least one of module name elements, module position elements, module background color elements, module port handle elements, and unified management elements.
4. The interface model update method according to claim 1, wherein The version difference information is obtained based on communication data definition files of different versions, including: Converting communication definition files of different versions into comparison graphs in atlas format, where the nodes of the comparison graphs are used to represent data definition elements, and the edges in the comparison graphs are used to represent the association relationships between the data definition elements; Associating the attribute information of the data definition elements with the corresponding nodes; Set the relationship type and influence weight corresponding to the association relationship; Based on the relationship type, the influence weight, and the attribute information, identify the graph changes between different versions of the graphs to be compared, and obtain version difference information.
5. The interface model update method according to claim 4, wherein The difference types of the version difference information include addition of messages, deletion of messages, addition of signals, deletion of signals, and modification of signals; The modification of the signal includes at least one of modification of the signal maximum value, signal minimum value, signal offset, signal gain, and signal start bit.
6. The interface model update method according to any one of claims 1-5, characterized in that Update the original interface model according to the current update script and the current configuration file to obtain a target interface model, including: Obtain the current update script, the current configuration file, and the original interface model; Perform a preliminary update on the original interface model according to the call of the current configuration file and the current update script to obtain the current interface model; Test the current interface model; If the test passes, determine the current interface model as the target interface model; If the test fails, repair the current interface model to obtain the target interface model.
7. The interface model update method according to any one of claims 1-5, characterized in that, After obtaining the model configuration file and the version difference information of the original interface model, the method further includes: Structurally store the version difference information; Structurally store the update status of the model configuration file, as well as the generation status and writing status of the current update script; Among them, the information stored structurally is used for the update audit and problem tracking of the original interface model.
8. An interface model updating device, characterized in that, The device includes: An acquisition module, configured to acquire a model configuration file and version difference information of an original interface model, where the model configuration file at least includes file path information and diagnostic configuration information, the original interface model is used to simulate the transmission process of messages and signals, the version difference information is obtained based on communication data definition files of different versions, and the communication data definition file is used to store attributes, formats, and protocols of messages and signals; A configuration module, configured to write the version difference information into the model configuration file through a file writing operation external to the script to obtain the current configuration file; A script generation module, configured to create a model update script corresponding to the version difference information based on the file path information, and perform data writing on the model update script according to the version difference information to obtain the current update script, where the data writing includes converting the format of the version difference information into a format recognizable by the model update script through a file writing operation external to the script and writing it into the model update script; An update module, configured to update the original interface model according to the current update script and the current configuration file to obtain a target interface model.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the electronic device to implement the interface model update method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored thereon, which, when executed by a processor of a computer, causes the computer to execute the interface model updating method according to any one of claims 1 to 7.