Model debugging method and related apparatus
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YINWANG INTELLIGENT TECHNOLOGIES CO LTD
- Filing Date
- 2024-09-30
- Publication Date
- 2026-06-05
AI Technical Summary
Existing model debugging methods are inefficient for debugging multi-instance reference models, making it difficult to efficiently observe and modify the internal state of reference models.
By acquiring the second and third models associated with the main model and transmitting data between different call points, synchronous debugging is performed using the edit-state model and the runtime model, allowing direct switching of reference models to observe internal data and states without stopping debugging.
It improves the efficiency of model debugging, enables efficient debugging and modification of models referenced by multiple instances, and allows for simultaneous observation of internal model data and status.
Smart Images

Figure CN122162118A_ABST
Abstract
Description
Model debugging method and related device TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a model debugging method and related device. BACKGROUND
[0002] In order to complete software development in a short time, the idea of model based design (MBD) and development has been greatly developed in recent years, and various model based development software tools have emerged, involving model design, simulation, analysis and verification, etc. The model development tool enables engineers to use intuitive module diagrams on a visual interactive platform for model based design and development. When using the model development tool for behavior modeling development, it is often necessary to reuse a certain model (generally referred to as a reference model) as a module of another model (generally referred to as a parent model). This modeling method using reference models can greatly save the operation cost and time cost of model development by developers, and is very suitable for team cooperation for model development.
[0003] When the reference model is called multiple times in the parent model (referred to as a multi-instance reference model), the developer may often need to observe the state and intermediate running results of each reference model during the development and debugging stage. However, the current model debugging method has low debugging efficiency for multi-instance reference models.
[0004] Therefore, how to efficiently debug the model is a major problem to be solved.
[0005] SUMMARY
[0006] The embodiments of the present application provide a model debugging method and related device, which can improve the efficiency of model debugging.
[0007] In a first aspect, the embodiments of the present application provide a model debugging method applied to a main model, the main model including a first calling point and a second calling point, a model called by the main model through the first calling point including a first model, and a model called by the main model through the second calling point including the first model. The model debugging method includes:
[0008] obtaining a second model and a third model, the calling point corresponding to the second model and the calling point corresponding to the third model being different, the second model being called by the main model through the first calling point, the third model being called by the main model through the second calling point, and the second model, the third model and the first model being associated;
[0009] controlling data transmission between the first calling point and the second model, and between the second calling point and the third model.
[0010] In the embodiments of the present application, a model debugging method is provided. In the case that the model called by the first calling point and the model called by the second calling point both include the first model, the second model and the third model associated with the first model can be obtained, the second model is called by the main model through the first calling point, and the third model is called by the main model through the second calling point. Thus, data transmission between the first calling point and the second model, and between the second calling point and the third model can be controlled. By taking the first model as an editing state model and taking the second model and the third model as running state models, the first calling point calling the second model and the second calling point calling the third model can be simultaneously debugged, the synchronization of debugging and modifying the first model in the model debugging process is ensured, and the debugging can be directly switched to the referenced model of different calling points without stopping the debugging, the internal data and state of the model are observed, and the efficiency of model debugging is greatly improved.
[0011] Optionally, the second model and the third model are associated with the first model, which can be understood as that the second model and the third model have the same model content as the first model, and specifically can refer to the same modeling content, for example, the same model architecture and model running environment, but different input model data.
[0012] Optionally, the main model includes N calling points, N is an integer greater than 2, and the models called by the N calling points of the main model all include the first model. In this case, the model debugging method in the present application can obtain N running state models associated with the first model, the N running state models are respectively called by the main model through the N calling points, and data transmission between the N calling points and the N running state models can be controlled. By using one editing state model and N running state models, N calling points respectively calling N running state models can be simultaneously debugged, the synchronization of debugging and modifying the first model in the model debugging process is ensured, and the debugging can be directly switched to the referenced model of different calling points without stopping the debugging, the internal data and state of the model are observed, and the efficiency of model debugging is greatly improved.
[0013] In a possible implementation, the obtaining of the second model and the third model includes:
[0014] obtaining the first model;
[0015] generating the second model and the third model based on the first model.
[0016] In the embodiment, a possible implementation of obtaining the second model and the third model is provided, specifically, a first model is obtained, and the second model and the third model are generated based on the first model. Through one editing state model (the first model) and two running state models (the second model and the third model), the synchronization of the debugging and modification of the first model in the model debugging process can be ensured, and the reference model of different calling points can be directly switched without stopping the debugging, the internal data and state of the model are observed, and the efficiency of the model debugging is greatly improved.
[0017] Optionally, the model content of the second model and the third model generated based on the first model is the same as the model content of the first model, specifically, the modeling content is the same, for example, the model architecture and the model running environment are the same, but the input model data is different.
[0018] Optionally, the first model is obtained, specifically, the first model is loaded into the memory based on the path identifier of the first model, for example, a uniform resource locator (URL), and it can be understood that at this time, there is only one reference model instance in the memory, and the processing performed by calling the first model through the first calling point is synchronized with the processing performed by calling the first model through the second calling point in the first model.
[0019] In a possible implementation, the method further includes:
[0020] The data transmission situation and / or the running state of the second model and / or the third model are controlled to be displayed.
[0021] In the embodiment, the running state models of different calling points can be randomly switched to observe the data transmission situation and / or the running state. For example, in the model debugging process, the data transmission situation and / or the running state of the second model can be controlled to be displayed, the data transmission situation and / or the running state of the third model can be controlled to be displayed, the data transmission situation and / or the running state of the second model and the third model can be simultaneously controlled to be displayed, and the output results corresponding to different inputs are observed and compared.
[0022] In a possible implementation, the method further includes:
[0023] Based on the position information of the first calling point in the main model and the position information of the first model, a first path is obtained.
[0024] Based on the first path, the first debugging data is input into the second model through the first calling point for model debugging.
[0025] In the embodiment, a possible implementation of model debugging is also provided, specifically, based on the position information of the first call point in the main model and the position information of the first model, a first path is obtained, which can be understood as a unique identifier of data injection to the second model and observation mark through the first call point, and thus the first debugging data can be input into the second model through the first call point for model debugging based on the first path, so that accurate data injection and data observation can be performed, and the second model can be debugged.
[0026] Optionally, the method further comprises:
[0027] Based on the position information of the second call point in the main model and the position information of the first model, a second path is obtained;
[0028] Based on the second path, the second debugging data is input into the third model through the second call point for model debugging.
[0029] Through the embodiments of the application, accurate data injection and data observation can be performed on the respective independent running state models, and efficient model debugging can be realized.
[0030] In a possible implementation, the method further comprises:
[0031] After the debugging of the second model and the third model ends, the second model and the third model are released.
[0032] In the embodiment, a possible implementation of normal end of debugging is provided, specifically, after the debugging of the second model and the third model ends, the second model and the third model are released, which can save memory resources and wait for the next simulation debugging.
[0033] Optionally, after the debugging of the second model and the third model ends, the first model is retained, which can ensure the uniqueness of the subsequent modifiable model.
[0034] In a possible implementation, the method further comprises:
[0035] After the debugging of the second model and the third model ends, the display of the data transmission situation and / or the running state of the second model and the third model is controlled to be closed.
[0036] In the embodiment, a possible implementation of normal end of debugging is provided, specifically, after the debugging of the second model and the third model ends, the display of the data transmission situation and / or the running state of the second model and the third model is controlled to be closed, which can avoid misleading the user when modifying the model.
[0037] In a possible implementation, the method further includes:
[0038] In the case of an abnormal interruption of debugging in the process of debugging the second model, determining error information corresponding to the first calling point;
[0039] Based on the error information corresponding to the first calling point, determining an error cause and / or a modification suggestion for the first model.
[0040] In the embodiment, a possible specific implementation of debugging an abnormal interruption is provided, specifically, in the case of an abnormal interruption of debugging in the process of debugging the second model, error information corresponding to the first calling point is determined, and based on the error information, an error cause and / or a modification suggestion for the first model is determined.
[0041] Optionally, whether the debugging ends normally or abnormally, the first calling point and the second calling point are re-associated with the first model, that is, the main model calls the first model through the first calling point or the second calling point.
[0042] In a possible implementation, the method further includes:
[0043] Releasing the second model; and / or, controlling display of the error cause and / or the modification suggestion for the first model.
[0044] In the embodiment, a possible specific implementation of debugging an abnormal interruption is provided, specifically, in the case of an abnormal interruption of debugging in the process of debugging the second model, the second model is released, memory resources are saved, the next simulation debugging is waited for, and / or the error cause and / or the modification suggestion for the first model is controlled to be displayed.
[0045] In a possible implementation, the method further includes:
[0046] Packing the debugging information corresponding to the second model and the debugging information corresponding to the third model.
[0047] In a possible implementation, the packing the debugging information corresponding to the second model and the debugging information corresponding to the third model includes:
[0048] Based on the calling sequence of calling the second model through the first calling point and calling the third model through the second calling point, the debugging information corresponding to the second model and the debugging information corresponding to the third model are packed in sequence.
[0049] In a possible implementation, the main model further includes a third calling point, and the model called by the main model through the third calling point includes the first model; the model debugging method further includes:
[0050] controlling data transmission between the third calling point and the second model, or controlling data transmission between the third calling point and the third model.
[0051] In the embodiment, a model debugging method is provided. In the case that a model called by a first calling point, a model called by a second calling point and a model called by a third calling point all include a first model, without obtaining three running state models, only the second model and the third model associated with the first model can be obtained. In the first simulation debugging, the second model is called by the first calling point of the main model, and data transmission between the first calling point and the second model is controlled. The third model is called by the second calling point of the main model, and data transmission between the second calling point and the third model is controlled. After the first simulation debugging is completed, the second simulation debugging is started. The second model is called by the third calling point of the main model, and data transmission between the third calling point and the second model is controlled. Or, the third model is called by the third calling point of the main model, and data transmission between the third calling point and the third model is controlled. Through the embodiment, without obtaining the same number of running state models as the number of calling points, only less running state models than the number of calling points are obtained. The simulation debugging of the first model called by multiple calling points is completed in multiple times by using less running state models than the number of calling points, which can improve the model debugging efficiency.
[0052] Optionally, the main model includes N calling points, N is an integer greater than 2, and the models called by the N calling points of the main model all include the first model. The model debugging method in the application can obtain N-M running state models associated with the first model, M is an integer satisfying 0
[0053] In a possible implementation, the main model further comprises a fourth calling point, the model called by the main model through the fourth calling point comprises the first model; and the model debugging method further comprises:
[0054] acquiring the first model;
[0055] controlling data transmission between the fourth calling point and the first model.
[0056] In the embodiment, a model debugging method is provided. In the case where the model called by the main model through a first calling point, the model called by the main model through a second calling point, and the model called by the main model through a fourth calling point all comprise a first model, the second model and the third model associated with the first model can be acquired instead of acquiring three running state models. In the simulation debugging, the second model is called by the main model through the first calling point, and data transmission is controlled between the first calling point and the second model. The third model is called by the main model through the second calling point, and data transmission is controlled between the second calling point and the third model. The first model is called by the main model through the fourth calling point, and data transmission is controlled between the fourth calling point and the first model. According to the embodiment, the running state model is acquired instead of the same number of calling points, and the running state model is acquired less than the number of calling points. The simulation debugging of the main model calling the first model through multiple calling points is realized by using the running state model less than the number of calling points and the unique editing state model (the first model), and the model debugging efficiency is improved.
[0057] Optionally, the main model comprises N calling points, N is an integer greater than 2, and the models called by the main model through the N calling points all comprise the first model. The model debugging method in the application can acquire N-1 running state models associated with the first model. In the simulation debugging process, the N-1 running state models are called by the main model through N-1 calling points respectively, data transmission can be controlled between the N-1 calling points and the N-1 running state models, and the unique editing state model (the first model) is called by the main model through the remaining one calling point, and data transmission can be controlled between the one calling point and the one editing state model. Through the one editing state model and the N-1 running state models, the main model can simultaneously call the N-1 running state models through N-1 calling points respectively and call the one editing state model through one calling point, ensure the synchronization of the debugging and modification of the first model in the model debugging process, and can directly switch the reference models of different calling points without stopping the debugging, observe the internal data and state of the model, and greatly improve the efficiency of the model debugging.
[0058] In a possible implementation, the main model further includes a plurality of the first call points, and inputs of the plurality of the first call points are identical; and the model debugging method further includes:
[0059] controlling data transmission between the plurality of the first call points and the second model.
[0060] In this embodiment, a model debugging method is provided. In a case where a main model includes a plurality of first call points and inputs of the plurality of the first call points are identical, the second model can be called by the main model through the plurality of the first call points simultaneously, and data transmission is controlled between the plurality of the first call points and the second model. According to this embodiment, one running state model can be obtained instead of obtaining running state models with the same number of call points, and the simulation debugging of calling the first model through the plurality of the first call points is completed by using the one running state model. Compared with a method of generating running state models with the same number of call points, only one running state model needs to be generated in this embodiment, and the model debugging efficiency can be improved.
[0061] Optionally, in the process of calling the second model by the main model through the plurality of the first call points simultaneously, the state inside the second model does not change, for example, the second model does not record historical data inside components, or the second model does not include a state machine component, and the like. It can be understood that the running inside the second model does not depend on historical data in the process of calling the second model by the main model through the plurality of the first call points simultaneously.
[0062] In a second aspect, an embodiment of the present application provides a model debugging method, applied to a main model, the main model including a fifth call point and a sixth call point, a model called by the main model through the fifth call point including a fourth model, and a model called by the main model through the sixth call point including the fourth model; the model debugging method including:
[0063] obtaining a fifth model, the calling point corresponding to the fourth model and the calling point corresponding to the fifth model being not completely identical, the fourth model being called by the main model through the fifth call point, the fifth model being called by the main model through the sixth call point, and the fifth model being associated with the fourth model;
[0064] controlling data transmission between the fifth call point and the fourth model, and data transmission between the sixth call point and the fifth model.
[0065] In the embodiments of the present application, a model debugging method is provided. In the case that a model called by a fifth calling point and a model called by a sixth calling point both include a fourth model, the fifth model associated with the fourth model can be obtained, the fourth model is called by the main model through the fifth calling point, and the fifth model is called by the main model through the sixth calling point. Thus, the data transmission between the fifth calling point and the fourth model and the data transmission between the sixth calling point and the fifth model can be controlled. Through one editing state model (the fourth model) and one running state model (the fifth model), the fifth calling point calling the fourth model and the sixth calling point calling the fifth model can be simultaneously debugged, the synchronization of the debugging and modification of the fourth model in the model debugging process is ensured, and the reference model of different calling points can be directly switched without stopping the debugging, the internal data and state of the model are observed, and the efficiency of the model debugging is greatly improved.
[0066] Optionally, the fifth model is associated with the fourth model, which can be understood as that the model content of the fifth model is the same as that of the fourth model, and specifically can refer to the same modeling content, for example, the same model architecture and model running environment, but different input model data.
[0067] In a possible implementation, the fifth model is obtained by:
[0068] The fourth model is obtained.
[0069] The fifth model is generated based on the fourth model.
[0070] In a possible implementation, the method further includes:
[0071] The data transmission situation and / or running state of the fourth model and / or the fifth model is controlled to be displayed.
[0072] In a possible implementation, the method further includes:
[0073] The path through the sixth calling point and the path in the fifth model are determined as a third path.
[0074] Third debugging data is input into the fifth model through the sixth calling point based on the third path for model debugging.
[0075] In a possible implementation, the method further includes:
[0076] After the debugging of the fourth model and the fifth model is completed, the fifth model is released.
[0077] In a possible implementation, the method further includes:
[0078] After the debugging of the fourth model and the fifth model ends, display of data transmission and / or running state of the fourth model and the fifth model is controlled to be closed.
[0079] In a possible implementation, the method further includes:
[0080] In a case where an abnormal interruption occurs during the debugging of the fifth model, error information corresponding to the sixth calling point is determined.
[0081] Based on the error information corresponding to the sixth calling point, an error cause and / or a modification suggestion for the fourth model is determined.
[0082] In a possible implementation, the method further includes:
[0083] The fifth model is released; and / or, the error cause and / or the modification suggestion for the fourth model is displayed.
[0084] In a possible implementation, the method further includes:
[0085] Debugging information corresponding to the fourth model and debugging information corresponding to the fifth model are packaged.
[0086] In a possible implementation, the packaging of the debugging information corresponding to the fourth model and the debugging information corresponding to the fifth model includes:
[0087] Based on an order of calling the fourth model through the fifth calling point and calling the fifth model through the sixth calling point, the debugging information corresponding to the fourth model and the debugging information corresponding to the fifth model are packaged in sequence.
[0088] In a third aspect, an embodiment of the present application provides a model debugging apparatus, which includes units for performing the method in any of the first aspects.
[0089] In a possible design, the apparatus is applied to a main model, the main model includes a first calling point and a second calling point, a model called by the main model through the first calling point includes a first model, and a model called by the main model through the second calling point includes the first model; and the model debugging apparatus includes:
[0090] A communication unit is configured to acquire a second model and a third model, the second model corresponds to a calling point different from a calling point corresponding to the third model, the second model is called by the main model through the first calling point, the third model is called by the main model through the second calling point, and the second model and the third model are associated with the first model.
[0091] a processing unit, configured to control data transmission between the first calling point and the second model, and data transmission between the second calling point and the third model.
[0092] The processing unit and the communication unit according to the third aspect and any possible implementation can perform the steps as described with reference to the first aspect and the corresponding implementation.
[0093] The technical effects brought by the third aspect and any possible implementation can refer to the introduction of the technical effects of the first aspect and the corresponding implementation.
[0094] In another possible design, the device is applied to a main model, the main model comprises a fifth calling point and a sixth calling point, a model called by the main model through the fifth calling point comprises the fourth model, and a model called by the main model through the sixth calling point comprises the fourth model; the model debugging device comprises:
[0095] a communication unit, configured to obtain a fifth model, the calling point corresponding to the fourth model and the calling point corresponding to the fifth model are not completely same, the fourth model is called by the main model through the fifth calling point, the fifth model is called by the main model through the sixth calling point, and the fifth model is associated with the fourth model;
[0096] a processing unit, configured to control data transmission between the fifth calling point and the fourth model, and data transmission between the sixth calling point and the fifth model.
[0097] The processing unit and the communication unit according to the third aspect and any possible implementation can perform the steps as described with reference to the second aspect and the corresponding implementation.
[0098] The technical effects brought by the third aspect and any possible implementation can refer to the introduction of the technical effects of the second aspect and the corresponding implementation.
[0099] Optionally, in the model debugging device according to the third aspect and any possible implementation,
[0100] In an implementation, the model debugging device is a model debugging apparatus. When the model debugging device is a model debugging apparatus, the communication unit can be a transceiver, or an input / output interface; and the processing unit can be at least one processor. Optionally, the transceiver can be a transceiver circuit. Optionally, the input / output interface can be an input / output circuit.
[0101] In another implementation, the model debugging apparatus is a chip (system) or circuit in the model debugging device. When the model debugging apparatus is a chip (system) or circuit in the model debugging device, the communication unit can be a communication interface (input / output interface), interface circuit, output circuit, input circuit, pin, or related circuit on the chip (system) or circuit; and the processing unit can be at least one processor, processing circuit, or logic circuit.
[0102] In a fourth aspect, an embodiment of the present application provides a model debugging apparatus, which includes a processor. The processor is coupled with a memory and is configured to execute instructions in the memory to implement the method in any of the first aspect to the second aspect and any possible implementation.
[0103] In a fifth aspect, an embodiment of the present application provides a chip, which includes a logic circuit and a communication interface. The communication interface is configured to receive or send information; and the logic circuit is configured to receive or send information through the communication interface, so that the chip implements the method in any of the first aspect to the second aspect and any possible implementation.
[0104] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, which is configured to store a computer program (also referred to as code or instructions). When the computer program is run on a computer, the method in any of the first aspect to the second aspect and any possible implementation is implemented.
[0105] In a seventh aspect, an embodiment of the present application provides a computer program product, which includes a computer program (also referred to as code or instructions). When the computer program is run, the computer executes the method in any of the first aspect to the second aspect and any possible implementation.
[0106] In an eighth aspect, an embodiment of the present application provides a movable terminal, which includes at least one model debugging apparatus according to the third aspect, or a model debugging apparatus according to the fourth aspect, or a chip according to the fifth aspect.
[0107] Optionally, the movable terminal can be a vehicle, such as a vehicle used in any possible scenario, for example, a car, a truck, an aircraft, a drone, a slow transport vehicle, a space vehicle, or a ship, and the present application is not limited in this regard.
[0108] Optionally, the mobile terminal is configured to implement the method described in any of the first aspect to the second aspect and any possible implementation.
[0109] Further, in the process of executing the method described in any of the first aspect to the second aspect and any possible implementation, the process of sending information and / or receiving information and the like in the above method can be understood as the process of outputting information by the processor, and / or the process of receiving input information by the processor. When outputting information, the processor can output the information to the transceiver (or the communication interface, or the sending module) so as to be transmitted by the transceiver. After being output by the processor, the information can also need to be processed further before reaching the transceiver. Similarly, when the processor receives input information, the transceiver (or the communication interface, or the sending module) receives the information and inputs it to the processor. Furthermore, after the transceiver receives the information, the information can need to be processed further before being input to the processor.
[0110] Based on the above principle, for example, the sending information mentioned in the foregoing method can be understood as the processor outputting information. For another example, the receiving information can be understood as the processor receiving input information.
[0111] Optionally, for the transmission, sending and receiving operations and the like involved by the processor, if no special description is made, or if it is not contrary to the actual role or inherent logic thereof in the related description, it can be more generally understood as the processor outputting and receiving, inputting and the like.
[0112] Optionally, in the process of executing the method described in any of the first aspect to the second aspect and any possible implementation, the processor can be a processor specially configured to execute the method, or can be a processor such as a general processor which executes the method by executing computer instructions in a memory. The memory can be a non-transitory memory such as a read only memory (ROM), which can be integrated on the same chip as the processor, or can be respectively arranged on different chips. The type of the memory and the arrangement manner of the memory and the processor are not limited in the embodiments of the present application.
[0113] In a possible implementation, the at least one memory is located outside the apparatus.
[0114] In another possible implementation, the at least one memory is located inside the apparatus.
[0115] In another possible implementation, part of the at least one memory is located inside the apparatus, and another part of the at least one memory is located outside the apparatus.
[0116] In this application, the processor and the memory can also be integrated in one device, that is, the processor and the memory can also be integrated together. BRIEF DESCRIPTION OF DRAWINGS
[0117] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced as follows. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can also be obtained according to these drawings without creative labor for those skilled in the art.
[0118] Fig. 1 is a schematic diagram of a model reference relationship;
[0119] Fig. 2 is a flowchart of a model debugging method;
[0120] Fig. 3 is a flowchart of another model debugging method;
[0121] Fig. 4 is a schematic diagram of an application scenario of a model debugging provided by the embodiments of the present application;
[0122] Fig. 5 is a flowchart of a model debugging method provided by the embodiments of the present application;
[0123] Fig. 6 is a schematic diagram of a multi-instance reference model call provided by the embodiments of the present application;
[0124] Fig. 7 is a schematic diagram of a reference model internal data state provided by the embodiments of the present application;
[0125] Fig. 8 is a flowchart of another model debugging method provided by the embodiments of the present application;
[0126] Fig. 9 is a schematic diagram of a multi-instance reference model debugging provided by the embodiments of the present application;
[0127] Fig. 10 is a schematic diagram of another multi-instance reference model debugging provided by the embodiments of the present application;
[0128] Fig. 11 is a schematic diagram of still another multi-instance reference model debugging provided by the embodiments of the present application;
[0129] Fig. 12 is a structural schematic diagram of a model debugging apparatus provided by the embodiments of the present application;
[0130] Fig. 13 is a structural schematic diagram of an electronic device provided by the embodiments of the present application;
[0131] Fig. 14 is a structural schematic diagram of a chip provided by the embodiments of the present application. DETAILED DESCRIPTION
[0132] In order to make the purposes, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described below with reference to the drawings.
[0133] The terms "first" and "second" and the like in the description, claims, and drawings of the present application are used to distinguish different objects, and are not used to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device, etc. including a series of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed, or can optionally include other steps or units inherent to the process, method, product, or device, etc.
[0134] "Embodiments" mentioned herein mean that the specific features, structures, or properties described in conjunction with the embodiments can be included in at least one embodiment of the present application. The appearance of this phrase at various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment to other embodiments. It can be explicitly and implicitly understood by those skilled in the art that, unless otherwise specified and logically contradictory, the terms and / or descriptions between various embodiments of the present application are consistent and can be mutually referred to, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationship.
[0135] It should be understood that in the present application, "at least one" means one or more, "multiple" means two or more, "at least two" means two or three and more, and "and / or" is used to describe the association between the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases of only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0136] It should be noted that in the present application, "indication" can include direct indication, indirect indication, display indication, and implicit indication. When describing that certain indication information is used to indicate A, it can be understood that the indication information carries A, directly indicates A, or indirectly indicates A.
[0137] In the present application, the information indicated by the indication information is referred to as to-be-indicated information. In the specific implementation process, there are many ways to indicate the to-be-indicated information, for example, but not limited to, the to-be-indicated information can be directly indicated, such as the to-be-indicated information itself or the index of the to-be-indicated information. The to-be-indicated information can also be indirectly indicated by indicating other information, wherein the other information and the to-be-indicated information have an association relationship. The to-be-indicated information can also be only indicated a part, and the other part of the to-be-indicated information is known or agreed in advance. For example, the indication of specific information can also be achieved by means of the arrangement order of each information agreed in advance (for example, the protocol stipulates), thereby reducing the indication overhead to a certain extent. The to-be-indicated information can be sent together as a whole, or can be sent separately into multiple sub-information, and the sending period and / or sending opportunity of the sub-information can be the same or different. The specific sending method is not limited in the present application. The sending period and / or sending opportunity of the sub-information can be predefined, for example, predefined according to the protocol, or configured by the transmitting end device by sending configuration information to the receiving end device.
[0138] It should be noted that in the present application, "sending" can be understood as "output", and "receiving" can be understood as "input". "Sending information to A", wherein "to A" only indicates the direction of information transmission, and A is the destination, without limiting that "sending information to A" must be direct sending on the air interface. "Sending information to A" includes directly sending information to A, and also includes indirectly sending information to A through a transmitter, so "sending information to A" can also be understood as "outputting information to A". Similarly, "receiving information from A" indicates that the source of the information is A, including directly receiving information from A, and also including indirectly receiving information from A through a receiver, so "receiving information from A" can also be understood as "inputting information from A".
[0139] The present application provides a model debugging method and related device, which is applied to the field of computer technology, such as model debugging in the industrial software development scene based on the behavior modeling tool of the modeling method. In order to better understand the technical scheme of the present application, the related terms and concepts that may be involved in the embodiments of the present application will be introduced first.
[0140] Embedded system: The embedded system is generally composed of four parts of embedded microprocessor, peripheral hardware device, embedded operating system and user's application program, which is used to realize the control, monitoring or management functions of other devices.
[0141] Embedded software: The embedded software is a kind of software based on the design of embedded system, which is also a kind of computer software, and is composed of program and document, and is an important part of embedded system.
[0142] Model-based development: a method of software design through models, which makes developers able to develop faster and with less cost than traditional software development process. It is suitable for signal processing, control system, communication industry. Model is the center of the whole development process, throughout the requirement, design, implementation and testing. It is widely used in aerospace and automotive industry.
[0143] Model-based development: another expression of model-based development.
[0144] Referenced model: a model that can be simulated and debugged as part of another model.
[0145] Master model: a model that uses referenced models.
[0146] Component: the atomic component of a model (it can be understood as the smallest unit of a model), which has various functions and types.
[0147] Composite component: a special component that can carry various components and the connection relationship between components.
[0148] Port: a unit for transmitting data to a component and helping the component to accept data.
[0149] Referenced model call point: in a modeling tool based on model-based method, it is in the form of a component, which can be configured to point to a local model file by configuring the relevant attributes of the component. The input of the component will transmit the data transmitted in the master model to the referenced model, and the output of the referenced model will also be transmitted back to the master model through the component. The referenced model includes a running state model. Optionally, the referenced model call point can refer to the description of the "first call point" or "second call point" below. Optionally, the referenced model can refer to the description of the "second model" or "third model" below.
[0150] Model file: the persistent file of the model established in the modeling tool.
[0151] Model instance: the model loaded into the memory through the model file.
[0152] Multi-instance referenced model: there are n (n≥2) referenced model call points for a certain referenced model in the master model, which is called a multi-instance referenced model.
[0153] Data observation: recording and observing the simulation output of a part of the model.
[0154] Data injection: inputting specified data to the simulation input of a part of the model.
[0155] Model simulation: in the modeling tool, the established model is scheduled to run, according to the input data, according to the specified scheduling order, let the components in the model execute and output the results.
[0156] The traditional embedded software development work is divided into two stages, first, design the function algorithm of the software, and then use a specific programming language to realize the algorithm, and then deploy it to the hardware device for testing. The update and modification of the function algorithm to the code and the re-deployment of the program for testing is a long process, which greatly consumes manpower. In order to complete this process in a shorter time, the idea of model based design (MBD) and development has been greatly developed in recent years, various model based development software tools have emerged, involving model design, simulation, analysis and verification, etc. The model development tool enables engineers to use intuitive module diagrams on a visual interactive platform for model based design and development.
[0157] When using the model development tool for behavior modeling development, it is often necessary to reuse a certain model (generally referred to as a reference model) as a module of another model (generally referred to as a parent model). This modeling method using reference models can greatly save the operation cost and time cost of the modeler during modeling, and is very suitable for team-based model development work mode.
[0158] Please refer to FIG. 1, which is a schematic diagram of a model reference relationship.
[0159] As shown in FIG. 1, the parent model includes three call points (call point 1, call point 2, and call point 3).
[0160] Among them, the parent model calls the reference model A through the call point 1, which can be understood as that the reference model A is reused as a module of the parent model through the call point 1. Since the reference model A only exists in one place (call point 1) in the parent model, this case can be referred to as single reference, and the reference model A is referred to as single instance reference model.
[0161] The parent model calls the reference model B through the call point 2, and calls the reference model B through the call point 3, which can be understood as that the reference model B is reused as a module of the parent model through the call point 2, and is reused as a module of the parent model through the call point 3. Since the reference model B exists in multiple places (call point 2, call point 3) in the parent model, this case can be referred to as multiple reference, and the reference model B is referred to as multiple instance reference model.
[0162] When there are multiple calls of a referenced model in a parent model (which can be referred to as multiple-instance referenced model), the developer may often need to observe the state inside each referenced model and the intermediate running results during the debugging stage of development. Therefore, how to display the data and state inside these referenced models during debugging to facilitate efficient debugging of the model is a major problem to be solved.
[0163] Referring to FIG. 2, FIG. 2 is a flowchart of a model debugging method.
[0164] As shown in FIG. 2, a composite component is used to replace the component of the referenced model for model development and model debugging. The composite component is a commonly used special component that can be used to carry other components, mainly including but not limited to the following steps:
[0165] Step 1: Create a composite component.
[0166] Create a composite component at a place where the referenced model is needed.
[0167] Step 2: Copy all components inside the referenced model.
[0168] Open the referenced model and copy all components and connections inside.
[0169] Step 3: Paste all components into the composite component.
[0170] Paste the copied components and connection relationships into the composite component.
[0171] Step 4: Copy the composite component at all places where the referenced model is needed.
[0172] Through the above model debugging method, simple and fast debugging of the model can be achieved, but in the actual development process, there is a problem of low model debugging efficiency, mainly in the following aspects:
[0173] First, the size of the model will rapidly expand with the increase of the call points of the referenced model.
[0174] Second, if the referenced model needs to be modified, it may need to be modified in a "shotgun" manner, and it is difficult to modify synchronously, which is complicated and may be missed.
[0175] Third, the models are not separated, and subsequent development reuse or cooperative development cannot be performed.
[0176] Referring to FIG. 3, FIG. 3 is a flowchart of another model debugging method.
[0177] As shown in FIG. 3, a specific call point in the multi-instance reference model to be observed in the simulation debugging process is specified in advance through a configuration item, and then simulation debugging is performed. During the simulation debugging process, when the reference model is opened from any call point, the running state and data transmission of the reference model are displayed. It can be understood that the user needs to specify the call point to be observed, and then all views are bound to the call point. The method mainly includes the following steps:
[0178] Step one: collect all call points of the reference model in the main model.
[0179] Step two: select the call point to be displayed.
[0180] The user selects the call point to be displayed in the debugging process from all call points.
[0181] Step three: perform simulation debugging and open the application model.
[0182] After performing simulation debugging, the internal state and data of the reference model displayed when the reference model is opened from any call point are the results of the input data of the call point specified by the user.
[0183] Step four: display the reference model selected in advance.
[0184] If the user needs to modify the results of the call point to be displayed, return to step two.
[0185] Through the above model debugging method, the debugging of the multi-instance reference model can be supported, but in the actual development process, the model debugging efficiency is low, mainly in the following aspects:
[0186] First, the user can only modify the reference model of the call point to be displayed before simulation debugging, and cannot switch and display the call point during simulation debugging.
[0187] Second, only the execution results of one call point input in the reference model can be opened, and the internal views of two or more different call points cannot be opened at the same time, and the running data and state cannot be compared.
[0188] Third, the data injection and observation of the internal components of the reference model cannot be differentiated according to the call point.
[0189] In summary, the model debugging method shown in FIGS. 2 and 3 has low debugging efficiency for the multi-instance reference model.
[0190] Therefore, how to efficiently debug the model is a major problem to be solved at present.
[0191] In view of this, the application provides a new model debugging method, which is applied to the field of computer technology, such as model debugging in the industrial software development scenario of a behavior modeling tool based on a modeling method, and can improve the efficiency of model debugging.
[0192] Please refer to FIG. 4, which is a schematic diagram of an application scenario of model debugging provided by an embodiment of the application.
[0193] As shown in FIG. 4, in the whole vehicle software development process, four links are mainly included: requirement analysis, whole vehicle system design, software development and verification, and integrated test verification.
[0194] The model debugging method provided by the application can be applied to the industrial software development of a behavior modeling tool based on a modeling method. The behavior modeling tool is in the software development and verification link and is mainly used for application software design, business code generation, and model simulation debugging and verification.
[0195] In the model simulation debugging and verification function of the behavior modeling tool, the simulation debugging of the model is a key link. After the development personnel designs the application software in the whole vehicle software development process, the model needs to be repeatedly simulated and debugged to ensure that the software design is correct and the business code logic generated according to the model is accurate.
[0196] The model debugging method provided by the application is mainly aimed at the simulation debugging and verification of a multi-instance reference model. The multi-instance reference model can be accurately and reliably debugged and observed. Meanwhile, the reference model instances of different calling points can be freely switched in the debugging process to observe the internal data and state. In addition, data injection and data observation can be performed on the reference model of a specified path in the multi-instance reference model. Through the model debugging method provided by the application, the model simulation debugging and verification capability of the behavior modeling tool can be improved.
[0197] Based on the application scenario of model debugging shown in FIG. 4, the application further provides a new model debugging method, which will be described below in combination with FIGS. 5 to 11.
[0198] Please refer to FIG. 5, which is a flowchart of a model debugging method provided by an embodiment of the application. The model debugging method is applied to the field of computer technology, such as model debugging in the industrial software development scenario of a behavior modeling tool based on a modeling method.
[0199] Specifically, the model debugging method is applied to a main model, the main model includes a first calling point and a second calling point, a model called by the first calling point of the main model includes a first model, and a model called by the second calling point of the main model includes the first model; the model debugging method includes but is not limited to the following steps:
[0200] S501: The model debugging apparatus acquires a second model and a third model.
[0201] S502: The model debugging apparatus controls data transmission between the first call point and the second model, and data transmission between the second call point and the third model.
[0202] It can be understood that the model debugging apparatus in the embodiments of the present application can be a device loaded with a processor / chip that can be used to execute computer execution instructions, or can be a processor / chip that can be used to execute computer execution instructions. Alternatively, the model debugging apparatus can be an electronic device or a processor / chip in an electronic device, which is used to execute the model debugging method in the embodiments of the present application to improve the efficiency of model debugging.
[0203] Alternatively, the model debugging apparatus at this time can be specifically applied to model debugging in the industrial software development scenario of the behavior modeling tool based on the modeling method shown in FIG. 4, which will not be described here.
[0204] Alternatively, the model debugging apparatus and the model debugging method in the embodiments of the present application can be applied to a vehicle-mounted system, and the vehicle loaded with the vehicle-mounted system is an intelligent driving vehicle, and can be replaced by a terminal device, which can include but is not limited to a vehicle, such as a commercial vehicle, a passenger vehicle, a train, an industrial vehicle (such as a forklift, a trailer, a tractor, etc.), an engineering vehicle (such as an excavator, a bulldozer, a crane, etc.), a robot, etc., which is not limited in the embodiments of the present application.
[0205] The call point corresponding to the second model is different from the call point corresponding to the third model, the second model is called by the main model through the first call point, the third model is called by the main model through the second call point, and the second model and the third model are associated with the first model.
[0206] Alternatively, the second model and the third model are associated with the first model, which can be understood as that the model content of the second model and the third model is the same as that of the first model, specifically, the modeling content is the same, for example, the model architecture and the model running environment are the same, but the input model data is different.
[0207] Alternatively, the main model calls the first model through the first call point and / or the second call point, which can be understood as observing and / or editing the first model, and the purpose is to generate a suitable actual running / debugging model, such as the second model and the third model.
[0208] Alternatively, the main model calls the second model through the first call point, which can be understood as actually running and debugging the second model.
[0209] Optionally, the main model calls the third model through the second calling point, which can be understood as actually running and debugging the third model.
[0210] Optionally, as explained above in the explanation of the technical term "calling point of reference model", the first calling point is in the form of a component in the modeling tool based on the modeling method, and the first calling point can be configured to point to the second model by configuring the relevant attributes of the component. At this time, the control is between the first calling point and the second model to transmit data, which can be understood as the input of the first calling point (component) transmitting the data transmitted in the main model to the second model for running / debugging, and the output of the second model will be transmitted back to the main model through the first calling point.
[0211] Similarly, the control is between the second calling point and the third model to transmit data, which is similar to the control between the first calling point and the second model to transmit data, which will not be repeated here.
[0212] It can be understood that in the model debugging method, when the models called by the main model through the first calling point and the models called by the main model through the second calling point all include the first model, the second model associated with the first model and the third model associated with the first model can be obtained, the second model is called by the main model through the first calling point, and the third model is called by the main model through the second calling point, so that the data transmission between the first calling point and the second model and the data transmission between the second calling point and the third model can be controlled.
[0213] In the embodiments of the present application, by taking the first model as the editing state model, the second model and the third model as the running state model, the second model called by the first calling point and the third model called by the second calling point can be debugged at the same time, the synchronization of the debugging and modification of the first model in the model debugging process is ensured, and the reference models of different calling points can be switched directly without stopping debugging, the internal data and state of the model can be observed, and the efficiency of model debugging is greatly improved.
[0214] Optionally, the main model includes N calling points, N is an integer greater than 2, and the models called by the main model through the N calling points all include the first model, so that the model debugging method in the present application can obtain N running state models associated with the first model, the N running state models are called by the main model through the N calling points respectively, so that the data transmission between the N calling points and the N running state models can be controlled.
[0215] In the embodiment of the present application, through one editing state model and N running state models, N calling points can be simultaneously debugged to call N running state models respectively, the synchronization of the debugging and modification of the first model during the model debugging process is ensured, and without stopping the debugging, the reference models of different calling points can be directly switched, the internal data and state of the model can be observed, and the efficiency of the model debugging is greatly improved.
[0216] For example, the main model includes six calling points (calling point 1, calling point 2, calling point 3, calling point 4, calling point 5, and calling point 6), and the models called by the six calling points of the main model all include model A. Therefore, the model debugging method in the present application can obtain six running state models (model a1, model a2, model a3, model a4, model a5, and model a6) associated with model A.
[0217] During the simulation debugging process, model a1 is called by the main model through calling point 1, model a2 is called by the main model through calling point 2, model a3 is called by the main model through calling point 3, model a4 is called by the main model through calling point 4, model a5 is called by the main model through calling point 5, and model a6 is called by the main model through calling point 6.
[0218] Correspondingly, the model debugging method in the present application controls data transmission between calling point 1 and model a1, controls data transmission between calling point 2 and model a2, controls data transmission between calling point 3 and model a3, controls data transmission between calling point 4 and model a4, controls data transmission between calling point 5 and model a5, and controls data transmission between calling point 6 and model a6.
[0219] In this example, through one editing state model and six running state models, six calling points can be simultaneously debugged to call six running state models respectively, the synchronization of the debugging and modification of the only editing state model (model A) during the model debugging process is ensured, and without stopping the debugging, the reference models of different calling points can be directly switched, the internal data and state of the model can be observed, and the efficiency of the model debugging is greatly improved.
[0220] In a possible embodiment, the above-mentioned obtaining of the second model and the third model can also be implemented in the following manner:
[0221] The first model is obtained, and based on the first model, the second model and the third model are generated.
[0222] Optionally, the first model is obtained, and specifically, the first model can be loaded into the memory based on the path identifier of the first model, for example, a uniform resource locator (URL).
[0223] It can be understood that at this time, there is only one reference model instance in the memory, and the processing of the first model called through the first calling point and the processing of the first model called through the second calling point are synchronized in the first model.
[0224] Optionally, the model contents of the second model and the third model generated based on the first model are the same as the model contents of the first model, which can refer to the same modeling contents, for example, the same model architecture and model running environment, but different input model data.
[0225] Through one editing state model (the first model) and two running state models (the second model and the third model), the synchronization of the debugging and modification of the first model in the model debugging process can be ensured, and the debugging can be directly switched between the reference models of different calling points without stopping the debugging, the internal data and state of the model can be observed, and the efficiency of the model debugging is greatly improved.
[0226] In a possible embodiment, the above model debugging method can further perform the following steps:
[0227] The data transmission situation and / or running state of the second model and / or the third model are controlled to be displayed.
[0228] It can be understood that in the model debugging process, the data transmission situation and / or running state of the second model can be controlled to be displayed, the data transmission situation and / or running state of the third model can be controlled to be displayed, or the data transmission situation and / or running state of the second model and the third model can be controlled to be displayed at the same time, so as to observe and compare the corresponding output results under different inputs.
[0229] Through the embodiments of the present application, the running state models of different calling points can be randomly switched to observe the data transmission situation and / or running state.
[0230] Specifically, refer to FIG. 6 and FIG. 7, FIG. 6 is a schematic diagram of a multi-instance reference model call provided by an embodiment of the present application, and FIG. 7 is a schematic diagram of internal data state of a reference model provided by an embodiment of the present application.
[0231] As shown in FIG. 6, for the scenario that the main model respectively calls the three running state models (such as: reference model 1, reference model 2, reference model 3) corresponding to the multi-instance reference model through calling point 1, calling point 2 and calling point 3. Among them, the component Ramp is used to generate a data, and the data generated by each Ramp (Ramp_1, Ramp_2, Ramp_3, Ramp_4, Ramp_5, Ramp_6) is different. The component ElementsToArray is used to array the data, and the format of the arrayed data by each ElementsToArray (ElementsToArray_1, ElementsToArray_2, ElementsToArray_3, ElementsToArray_4, ElementsToArray_5, ElementsToArray_6) is different. The data in the main model is input to calling point 1 after being arrayed by ElementsToArray_1 and ElementsToArray_2, calling point 1 transmits the input data to reference model 1 called by calling point 1 for running / debugging, the output of reference model 1 is also transmitted back to the main model through calling point 1, and the running result is output to the corresponding display (display 1) for display observation. Similarly, the data in the main model input to calling point 2 after being arrayed by ElementsToArray_3 and ElementsToArray_4, calling point 2 transmits the input data to reference model 2 called by calling point 2 for running / debugging, the output of reference model 2 is also transmitted back to the main model through calling point 2, and the running result is output to the corresponding display (display 2) for display observation. Similarly, the main model calls reference model 3 through calling point 3, which is similar and will not be described here.
[0232] As shown in FIG. 7, it is a schematic diagram of the internal data state of reference model 1 called by calling point 1 of the main model in FIG. 6. Among them, the adder is used to perform addition operation on the input data, and transmits the operation result back to the main model through calling point 1, and outputs the running result to display 1 for display observation, the delay timer transmits the operation result output by the adder to the adder as the input of the adder for iterative addition operation, and the finite state machine (FSM) component is used to make state conversion inside the model called by the calling point.
[0233] Through the examples of FIG. 6 and FIG. 7, the reference model instances of different calling points can be freely switched during the debugging process, the internal data and state can be observed, and accurate data injection and data observation can be performed on the respective independent running state instances.
[0234] In a possible embodiment, the model debugging method described above can further perform the following steps:
[0235] obtaining a first path based on the location information of the first call point in the main model and the location information of the first model.
[0236] inputting the first debugging data into the second model through the first call point based on the first path for model debugging.
[0237] The location information of the second model generated based on the first model is the same as the location information of the first model, the first path can be understood as a unique identifier of data injection into the second model through the first call point and observation markers, and therefore the first debugging data can be input into the second model through the first call point based on the first path for model debugging, so that accurate data injection and data observation can be performed, and the second model can be debugged.
[0238] Similarly, the model debugging method can further perform the following steps:
[0239] obtaining a second path based on the location information of the second call point in the main model and the location information of the first model.
[0240] inputting the second debugging data into the third model through the second call point based on the second path for model debugging.
[0241] Through the embodiments of the present application, accurate data injection and data observation can be performed on respective independent running state models, and efficient model debugging can be achieved.
[0242] In a possible embodiment, for the case that the model debugging is normally ended, the model debugging method can further perform the following steps:
[0243] releasing the second model and the third model after the debugging of the second model and the third model is ended.
[0244] Through the embodiments of the present application, memory resources can be saved, and waiting for the next simulation debugging can be performed.
[0245] Optionally, after the debugging of the second model and the third model is ended, the first model can be retained, and uniqueness of the subsequent modifiable model can be ensured.
[0246] Optionally, after the debugging of the second model and the third model is ended, the display of the data transmission situation and / or the running state of the second model and the third model is closed.
[0247] Through the embodiments of the present application, the user can be prevented from being misled when modifying the model.
[0248] Optionally, after the normal debugging ends, the first call point and the second call point are re-associated with the first model, i.e., the main model calls the first model through the first call point or the second call point.
[0249] In a possible embodiment, for the case that the model debugging is interrupted abnormally, the model debugging method can further perform the following steps:
[0250] In the case that the debugging of the second model is interrupted abnormally, the error information corresponding to the first call point is determined.
[0251] Based on the error information corresponding to the first call point, the error cause and / or the modification suggestion for the first model are determined.
[0252] Optionally, in the case that the debugging of the second model is interrupted abnormally, the error cause and / or the modification suggestion for the first model is displayed.
[0253] Optionally, in the case that the debugging of the second model is interrupted abnormally, the second model is released, which can save memory resources and wait for the next simulation debugging.
[0254] Optionally, after the debugging is interrupted abnormally, the first call point and the second call point are re-associated with the first model, i.e., the main model calls the first model through the first call point or the second call point.
[0255] In a possible embodiment, the model debugging method can further perform the following steps:
[0256] The debugging information corresponding to the second model and the debugging information corresponding to the third model are packaged.
[0257] Optionally, the second model and the third model can be called through the first call point and the second call point in a calling sequence, and the debugging information corresponding to the second model and the debugging information corresponding to the third model are packaged in sequence.
[0258] Through the embodiments of the present application, the debugging information of the model debugging can be recorded for subsequent tracing.
[0259] In a possible embodiment, the main model further includes a plurality of first call points, and the inputs of the plurality of first call points are the same; the model debugging method can further perform the following steps:
[0260] Data transmission is controlled between the plurality of first call points and the second model.
[0261] It can be understood that, in the case that the main model includes a plurality of first call points and inputs of the plurality of first call points are the same, the second model can be called by the main model through the plurality of first call points at the same time, and data transmission between the plurality of first call points and the second model is controlled to be performed at the same time.
[0262] Optionally, in the process of calling the second model by the main model through the plurality of first call points at the same time, a state inside the second model does not change, for example, there is no component recording historical data inside the second model, or the second model does not contain a state machine component, and the like. The state machine component is a component of a mathematical model for representing a finite number of states and behaviors such as transitions and actions between the states.
[0263] It can be understood that, in the process of calling the second model by the main model through the plurality of first call points at the same time, the running of the second model inside does not depend on historical data.
[0264] Exemplarily, it is assumed that the above-mentioned main model includes A first call points (A is an integer greater than 1), the models called by the main model through the A first call points respectively all include the first model (the editing state model), and inputs of the A first call points are all the same. At this time, A second models (the running state model) need to be generated based on the first model, the main model respectively calls A second models through A first call points one by one in a one-to-one correspondence, and data transmission between A first call points and A second models in a one-to-one correspondence is controlled, so as to realize simulation debugging of the main model calling the first model (the editing state model) through A first call points respectively.
[0265] However, by the embodiment of the present application, A second models (the running state model) equal to the number of A first call points do not need to be obtained, but only one second model (the running state model) needs to be obtained. At this time, the main model simultaneously calls the one second model through A first call points, and data transmission between A first call points and the one second model at the same time is controlled, so as to realize simulation debugging of the main model calling the first model (the editing state model) through A first call points respectively. Compared with the above-mentioned method of generating A second models (the running state model), the embodiment of the present application only needs to generate one second model (the running state model), and can achieve the effect of improving model debugging efficiency.
[0266] In a possible embodiment, the above-mentioned main model further includes a third call point, and a model called by the main model through the third call point includes the first model; and the above-mentioned model debugging method can further perform the following steps:
[0267] Data transmission between the third call point and the second model is controlled, or data transmission between the third call point and the third model is controlled.
[0268] It can be understood that in the model debugging method, in the case that the model called by the host model through the first calling point, the model called through the second calling point, and the model called through the third calling point all include the first model, the three running state models do not need to be obtained, but only the second model and the third model associated with the first model can be obtained.
[0269] In the first simulation debugging, the second model is called by the host model through the first calling point, and data transmission between the first calling point and the second model is controlled; the third model is called by the host model through the second calling point, and data transmission between the second calling point and the third model is controlled.
[0270] After the first simulation debugging is completed, the second simulation debugging is started, the second model is called by the host model through the third calling point, and data transmission between the third calling point and the second model is controlled; or the third model is called by the host model through the third calling point, and data transmission between the third calling point and the third model is controlled.
[0271] Through the embodiments of the present application, the running state models of the same number as the calling points do not need to be obtained, but the running state models less than the calling points are obtained, and the simulation debugging of the first model by the multiple calling points is completed in multiple times by using the running state models less than the calling points, so that the effect of improving the model debugging efficiency can also be achieved.
[0272] Optionally, the host model includes N calling points, N is an integer greater than 2, and the models called by the host model through the N calling points all include the first model, so that the model debugging method in the present application can obtain N-M running state models associated with the first model, and M is an integer satisfying 0
[0273] In the first simulation debugging process, the N-M running state models are called by the host model through the N-M calling points respectively, and data transmission between the N-M calling points and the N-M running state models can be controlled.
[0274] In the subsequent multiple simulation debugging processes, the remaining M calling points can reuse the N-M running state models, the M running state models are called by the host model through the remaining M calling points respectively, and data transmission between the remaining M calling points and the same number of M running state models can be controlled.
[0275] In the embodiments of the present application, through the 1 editing state model and the N-M running state models, the host model can call the N-M running state models through the N calling points in multiple times respectively, ensure the synchronization of the debugging and modification of the first model in the model debugging process, and can directly switch the referenced models of different calling points without stopping the debugging, observe the internal data and state of the model, and greatly improve the efficiency of the model debugging.
[0276] Exemplarily, the main model includes 6 calling points (calling point 1, calling point 2, calling point 3, calling point 4, calling point 5, and calling point 6), the models called by the 6 calling points of the main model all include the model B, and the model debugging method in the application can obtain 3 running state models (model b1, model b2, and model b3) associated with the model B.
[0277] In the first simulation debugging process, the model b1 is called by the main model through the calling point 1, the model b2 is called by the main model through the calling point 2, and the model b3 is called by the main model through the calling point 3.
[0278] Correspondingly, the model debugging method in the application controls data transmission between the calling point 1 and the model b1, controls data transmission between the calling point 2 and the model b2, and controls data transmission between the calling point 3 and the model b3.
[0279] After the first simulation debugging ends, the second simulation debugging starts, the model b1 is called by the main model through the calling point 4, the model b2 is called by the main model through the calling point 5, and the model b3 is called by the main model through the calling point 6.
[0280] Correspondingly, the model debugging method in the application controls data transmission between the calling point 4 and the model b1, controls data transmission between the calling point 5 and the model b2, and controls data transmission between the calling point 6 and the model b3.
[0281] In the example, through 1 editing state model and 3 running state models, the main model can call 3 running state models through 6 calling points twice, ensure synchronization of debugging and modification of the unique editing state model (model B) in the model debugging process, and can directly switch the referenced models of different calling points without stopping debugging, observe the internal data and state of the model, and greatly improve the efficiency of model debugging.
[0282] In a possible embodiment, the main model further includes a fourth calling point, and the model called by the main model through the fourth calling point includes the first model; and the model debugging method can further perform the following steps:
[0283] Obtaining the first model and controlling data transmission between the fourth calling point and the first model.
[0284] It can be understood that, in the model debugging method, when the model called by the main model through the first calling point, the model called by the main model through the second calling point, and the model called by the main model through the fourth calling point all include the first model, three running state models do not need to be obtained, but only the second model and the third model associated with the first model can be obtained.
[0285] In the simulation debugging, the second model is called by the first calling point of the main model, and data transmission between the first calling point and the second model is controlled; the third model is called by the second calling point of the main model, and data transmission between the second calling point and the third model is controlled; and the first model is called by the fourth calling point of the main model, and data transmission between the fourth calling point and the first model is controlled.
[0286] According to the embodiment of the application, one running state model less than the number of calling points is obtained, and the simulation debugging of the main model calling the first model through multiple calling points is implemented by using the one running state model less than the number of calling points and the unique editing state model (the first model), so that the model debugging efficiency is improved.
[0287] Optionally, the main model includes N calling points, N is an integer greater than 2, and the models called by the N calling points of the main model all include the first model, so that the model debugging method in the application can obtain N-1 running state models associated with the first model.
[0288] In the simulation debugging, the N-1 running state models are called by the N-1 calling points of the main model, respectively, so that data transmission between the N-1 calling points and the N-1 running state models is controlled; and the unique editing state model (the first model) is called by the remaining one calling point of the main model, so that data transmission between the one calling point and the one editing state model is controlled.
[0289] In the embodiment of the application, by using the one editing state model and the N-1 running state models, the main model can call the N-1 running state models through the N-1 calling points, respectively, and call the one editing state model through the one calling point, so that the synchronization of the debugging and modification of the first model in the model debugging process is ensured, and the debugging can be directly switched to the reference model of different calling points without stopping the debugging, so that the internal data and state of the model can be observed, and the model debugging efficiency is greatly improved.
[0290] For example, the main model includes six calling points (calling point 1, calling point 2, calling point 3, calling point 4, calling point 5 and calling point 6), and the models called by the six calling points of the main model all include model C, so that the model debugging method in the application can obtain five running state models (model c1, model c2, model c3, model c4 and model c5) associated with model C.
[0291] In the simulation debugging process, the model c1 is called by the main model through the calling point 1, the model c2 is called by the main model through the calling point 2, the model c3 is called by the main model through the calling point 3, the model c4 is called by the main model through the calling point 4, the model c5 is called by the main model through the calling point 5, and the model C is called by the main model through the calling point 6.
[0292] Correspondingly, the model debugging method in the application controls data transmission between the calling point 1 and the model c1, controls data transmission between the calling point 2 and the model c2, controls data transmission between the calling point 3 and the model c3, controls data transmission between the calling point 4 and the model c4, controls data transmission between the calling point 5 and the model c5, and controls data transmission between the calling point 6 and the model C.
[0293] In the example, through one editing state model and five running state models, the main model can simultaneously call five running state models and one editing state model through six calling points, respectively, to ensure the synchronization of debugging and modification of the unique editing state model (model C) in the model debugging process, and to directly switch the referenced models of different calling points without stopping debugging, to observe the internal data and state of the model, and to greatly improve the efficiency of model debugging.
[0294] The application also provides a model debugging method, which is applied to the field of computer technology, such as model debugging in the industrial software development scene based on the behavior modeling tool of the modeling method.
[0295] It can be understood that the steps in the embodiments of the application can be regarded as a reasonable deformation or supplement of the embodiments in the above-mentioned FIG. 5, or it can be understood that the model debugging method in the embodiments of the application can also be regarded as an independently executable embodiment, and the application does not limit this.
[0296] It can be understood that the model debugging device involved in the model debugging method provided by the embodiments of the application can refer to the related description of the model debugging device involved in the model debugging method shown in the above-mentioned FIG. 5, which will not be repeated here.
[0297] Specifically, the model debugging method is applied to a main model, the main model includes a fifth calling point and a sixth calling point, a model called by the main model through the fifth calling point includes a fourth model, and a model called by the main model through the sixth calling point includes the fourth model; the model debugging method includes but is not limited to the following steps:
[0298] The model debugging device acquires a fifth model, controls data transmission between the fifth calling point and the fourth model, and controls data transmission between the sixth calling point and the fifth model.
[0299] The calling point corresponding to the fourth model and the calling point corresponding to the fifth model are not completely same, the fourth model is called by the main model through the fifth calling point, the fifth model is called by the main model through the sixth calling point, and the fifth model is associated with the fourth model.
[0300] Optionally, the fifth model is associated with the fourth model, which can be understood as that the fifth model has the same model content as the fourth model, specifically, the modeling content is the same, for example, the model architecture and the model running environment are the same, but the input model data is different.
[0301] It can be understood that in the model debugging method, in the case that the model called by the main model through the fifth calling point and the model called by the main model through the sixth calling point both include the fourth model, the fifth model associated with the fourth model can be obtained, the fourth model is called by the main model through the fifth calling point, and the fifth model is called by the main model through the sixth calling point, so that the data transmission between the fifth calling point and the fourth model and the data transmission between the sixth calling point and the fifth model can be controlled.
[0302] In the embodiment of the application, through one editing state model (the fourth model) and one running state model (the fifth model), the main model can call the fourth model through the fifth calling point and call the fifth model through the sixth calling point at the same time, ensure the synchronization of the debugging and modification of the fourth model in the model debugging process, and can directly switch the referenced models of different calling points without stopping debugging, observe the internal data and state of the model, and greatly improve the efficiency of model debugging.
[0303] Exemplarily, the main model includes two calling points (calling point 1 and calling point 2), and the models called by the main model through the two calling points both include model D, so that the model debugging method in the application can obtain one running state model (denoted as model d1) associated with model D.
[0304] In the simulation debugging process, model D is called by the main model through calling point 1, and model d1 is called by the main model through calling point 2.
[0305] Correspondingly, the model debugging method in the application controls the data transmission between calling point 1 and model D, and controls the data transmission between calling point 2 and model d1.
[0306] In this example, through one editing state model (model D) and one running state model (model d1), the main model can call one running state model and one editing state model through two calling points at the same time, ensure the synchronization of the debugging and modification of the only editing state model (model D) in the model debugging process, and can directly switch the referenced models of different calling points without stopping debugging, observe the internal data and state of the model, and greatly improve the efficiency of model debugging.
[0307] In a possible embodiment, the obtaining the fifth model can also be implemented in the following manner:
[0308] obtaining a fourth model, and generating the fifth model based on the fourth model.
[0309] Optionally, the fourth model is obtained, and specifically, the fourth model can be loaded into the memory based on the path identifier, for example, the URL, of the fourth model.
[0310] It can be understood that at this time, there is only one instance of the reference model in the memory, and the processing performed by calling the fourth model through the fifth calling point and the processing performed by calling the fourth model through the sixth calling point are synchronized in the fourth model.
[0311] Optionally, the model content of the fifth model generated based on the fourth model is the same as the model content of the fourth model, and specifically, the modeling content is the same, for example, the model architecture and the model running environment are the same, but the input model data is different.
[0312] In a possible embodiment, the model debugging method can further perform the following steps:
[0313] controlling display of the data transmission situation and / or the running state of the fourth model and / or the fifth model.
[0314] It can be understood that during the model debugging process, the data transmission situation and / or the running state of the fourth model can be controlled to be displayed, the data transmission situation and / or the running state of the fifth model can be controlled to be displayed, the data transmission situation and / or the running state of the fourth model and the fifth model can be controlled to be displayed at the same time, and the corresponding output results under different inputs are observed and compared.
[0315] According to the embodiments of the present application, the running state model observation data transmission situation and / or running state of different calling points can be switched at will.
[0316] In a possible embodiment, the method further includes:
[0317] obtaining a third path according to the position information of the sixth calling point in the main model and the position information of the fourth model.
[0318] based on the third path, inputting the third debugging data into the fifth model through the sixth calling point for model debugging.
[0319] The position information of the fifth model generated based on the fourth model is the same as the position information of the fourth model, the third path can be understood as a unique identifier of data injection to the fifth model and observation markers through the sixth call point, and therefore the third debugging data can be input into the fifth model through the sixth call point for model debugging based on the third path, so that accurate data injection and data observation can be performed, and debugging of the fifth model can be realized.
[0320] Similarly, the model debugging method can further perform the following steps:
[0321] According to the position information of the fifth call point in the main model and the position information of the fourth model, the fourth path is obtained.
[0322] Based on the fourth path, the fourth debugging data is input into the fourth model through the fifth call point for model debugging.
[0323] According to the embodiments of the present application, accurate data injection and data observation can be realized for the respective independent running state models, and efficient model debugging can be realized.
[0324] In a possible embodiment, for the case that the model debugging is normally ended, the model debugging method can further perform the following steps:
[0325] After the debugging of the fourth model and the fifth model is ended, the fifth model is released.
[0326] According to the embodiments of the present application, memory resources can be saved, and waiting for the next simulation debugging can be realized.
[0327] Optionally, after the debugging of the fourth model and the fifth model is ended, the fourth model can be retained, and uniqueness of the subsequent modifiable model can be ensured.
[0328] Optionally, after the debugging of the fourth model and the fifth model is ended, the display of the data transmission situation and / or the running state of the fourth model and the fifth model is closed.
[0329] According to the embodiments of the present application, misleading of the user when modifying the model can be avoided.
[0330] Optionally, after the debugging is normally ended, the fifth call point and the sixth call point are re-associated with the fourth model, that is, the main model calls the fourth model through the fifth call point or the sixth call point.
[0331] In a possible embodiment, for the case that the model debugging is abnormally interrupted, the model debugging method can further perform the following steps:
[0332] In the case that the debugging of the fifth model is abnormally interrupted, error information corresponding to the sixth call point is determined.
[0333] Based on the error information corresponding to the sixth calling point, the error cause and / or the modification suggestion for the fourth model are determined.
[0334] Optionally, in the case that the debugging is abnormally interrupted during the debugging of the fifth model, the error cause and / or the modification suggestion for the fourth model are displayed.
[0335] Optionally, in the case that the debugging is abnormally interrupted during the debugging of the fifth model, the fifth model is released, so as to save the memory resource and wait for the next simulation debugging.
[0336] Optionally, after the debugging is abnormally interrupted, the fifth calling point and the sixth calling point are re-associated with the fourth model, that is, the main model calls the fourth model through the fifth calling point or the sixth calling point.
[0337] In a possible embodiment, the model debugging method described above can further perform the following steps:
[0338] The debugging information corresponding to the fourth model and the debugging information corresponding to the fifth model are packaged.
[0339] Optionally, the debugging information corresponding to the fourth model and the debugging information corresponding to the fifth model can be packaged in sequence based on the calling sequence of the fourth model called through the fifth calling point and the fifth model called through the sixth calling point.
[0340] According to the embodiments of the present application, the debugging information of the model debugging can be recorded for subsequent tracing.
[0341] Please refer to FIG. 8, which is a flowchart of another model debugging method provided by the embodiments of the present application. The model debugging method is applied to the field of computer technology, such as the model debugging in the industrial software development scene based on the behavior modeling tool of the modeling method.
[0342] It can be understood that the steps in the embodiments of the present application can be regarded as reasonable variations or supplements of the embodiments described in FIG. 5 above; or it can be understood that the model debugging method in the embodiments of the present application can also be regarded as an independently executable embodiment, and the present application does not limit this.
[0343] It can be understood that the model debugging device involved in the model debugging method provided by the embodiments of the present application can refer to the related description of the model debugging device involved in the model debugging method shown in FIG. 5 above, which will not be repeated here.
[0344] Specifically, the model debugging method mainly includes but is not limited to the following steps:
[0345] Step one: loading and editing checking of the referenced model in the loading and editing stage.
[0346] It can be understood that at this stage, the instance of the referenced model is unique, and there is only one edited state model. For specific relationships, refer to FIG. 9, which is a schematic diagram of multi-instance referenced model debugging provided by an embodiment of the present application.
[0347] As shown in FIG. 9, each call point (call point 1, call point 2, and call point 3) in the main model calls the same local referenced model file, and in the calling process, the referenced model file is loaded into the memory and is jointly held by each call point.
[0348] Optionally, the specific implementation of step one can be as follows:
[0349] Step 1.1: loading model stage, in the model debugging device, open the main model of the multi-instance referenced model, and take the full path of the multi-instance referenced model as the unique identifier, load the model instance into the memory according to the model file path. Optionally, it can be to load the unique single-instance edited state referenced model into the memory according to the URL. It can be understood that at step one stage, there is only one instance of the referenced model in the memory.
[0350] Step 1.2: editing model stage, open the referenced model from any call point (call point 1, call point 2, and call point 3), and all that is shown is the unique single-instance referenced model in the memory. At this time, in the model debugging device, the main model and the referenced model are edited, and the modification of the referenced model is synchronized, and switching the call point to open the referenced model will be synchronized.
[0351] Step 1.3: select the specific component port that needs to be observed or injected, and the user opens the referenced model from any call point (call point 1, call point 2, and call point 3) to check and verify the main model and the referenced model. When performing data injection annotation or data observation annotation on the port or component in the referenced model, the model debugging device will collect the call point path and the path of the port or component in the referenced model to jointly form the unique identifier of the data injection and observation annotation, thereby supporting subsequent precise data injection and observation recording of the model instance of the call point required by the user in the simulation debugging stage.
[0352] Step two: simulation debugging stage for constructing and observing the multi-instance referenced model.
[0353] It can be understood that at this stage, the instance of the referenced model will generate N running state models through the unique edited state model, and one running state model that belongs to the call point is allocated to each call point, and the running state models of the call points are completely independent of each other. For specific details, refer to FIG. 10, which is another schematic diagram of multi-instance referenced model debugging provided by an embodiment of the present application.
[0354] As shown in FIG. 10, the instance of the referenced model generates three running state instances (running state instance 1, running state instance 2, and running state instance 3) through the unique edited state model. Running state instance 1 that is unique to call point 1 is assigned to call point 1, and running state instance 1 of call point 1 performs completely independent simulation and debugging display operations. Running state instance 2 that is unique to call point 2 is assigned to call point 2, and running state instance 2 of call point 2 performs completely independent simulation and debugging display operations. Running state instance 3 that is unique to call point 3 is assigned to call point 3, and running state instance 3 of call point 3 performs completely independent simulation and debugging display operations.
[0355] Optionally, the specific implementation of step two can be as follows:
[0356] Step 2.1: Prepare the running state model stage. According to the unique model instance of the edited state and the number of call points, construct the same number of running state model instances, and prepare the related instances to be in a state ready for running. At this time, in the model debugging device, the instance of the referenced model has N+1 in total, where N is the number of call points, and is composed of N running state model instances and 1 edited state instance.
[0357] Step 2.2: Simulation running stage. Each call point receives data transmitted by other components, and each call point transmits the data to the port of the running state model owned by itself according to the port name, drives the simulation running of the running state model, and each running state instance independently schedules and executes the internal components, and is completely independent and decoupled from each other. For a given simulation injection port, the corresponding component is marked and data is generated and injected according to the call point component path and the referenced model internal component path.
[0358] Step 2.3: Simulation pause debugging stage. The model debugging device can observe the internal data and running state of the model by opening the connection label and highlighting the component. The internal execution of the composite component can also be observed. For the model component of the call point, the model debugging device supports opening the internal running state model from the component in the form of a new tab page, and at the same time, the running state model of different call points can be randomly switched during simulation pause to observe and compare the output results of the components under different inputs.
[0359] Step three: Simulation end stage processing of the multi-instance referenced model.
[0360] It can be understood that at this stage, the model debugging apparatus will perform packaging operation of all reference models, package some execution information in the model, sequentially package the multi-instance running state model according to the execution order of the calling points, and finally release all running state models and only keep the editing state model to ensure the uniqueness of the subsequent modifiable model. For details, refer to FIG. 11, which is another schematic diagram of multi-instance reference model debugging provided by an embodiment of the present application.
[0361] As shown in FIG. 11, according to the execution order of the calling point 1, the calling point 2 and the calling point 3, running state instance 1, running state instance 2 and running state instance 3 are sequentially packaged, and finally all running state instances are released and only the editing state instance is kept to ensure the uniqueness of the subsequent modifiable model.
[0362] Optionally, the specific implementation content of step three can be as follows:
[0363] Step 3.1: Abnormal end stage, according to the position of the simulation interruption, package error information, and give the error information in the reference model to the model component of the calling point to present the error information on the top layer, and then release the running state model and reassociate the calling point component with the editing state instance. The user can jump to the error calling point component according to the error information and open the editing state model for model modification. For example, the reference model can obtain the value of the corresponding subscript in an array according to the value of the input port and output it. At this time, if the data input by the calling point is problematic, the corresponding error will be prompted at the calling point, and the error reason will also be displayed later.
[0364] Step 3.2: Normal end stage, during the debugging process, the opened running state model tab page will be automatically closed to avoid misleading the user when modifying the model. For the ports specified for data observation, the calling point component path and the internal component path of the reference model will be used as the mark point to observe and record the precise data of the model instance of the calling point required by the user.
[0365] Step 3.3: Release the running state model to save memory and wait for the next simulation debugging.
[0366] When simulating and debugging the multi-instance reference model, the embodiments of the present application can freely switch the internal view of different reference models, observe the internal data and state of the reference model, save the time and cost of the model development personnel in debugging operation, and compare and observe the internal state data of different calling point reference models. Moreover, the internal reference model of different calling points of the multi-instance reference model can be distinguished for precise data injection and observation marking, which can improve the accuracy of data observation of the internal multi-instance reference model. The data observation marking can help the developer to filter useless data, and the data injection marking can make the data injection position more refined.
[0367] The above describes the method of the embodiments of the present application in detail. The following provides an apparatus for implementing any of the methods of the embodiments of the present application, for example, an apparatus including units (or means) for implementing the steps performed by the devices in any of the above methods.
[0368] Please refer to FIG. 12, which is a structural schematic diagram of a model debugging apparatus provided by the embodiments of the present application.
[0369] As shown in FIG. 12, the model debugging apparatus 120 can include a communication unit 1201 and a processing unit 1202. The communication unit 1201 and the processing unit 1202 can be software, hardware, or a combination of software and hardware.
[0370] The communication unit 1201 can implement a sending function and / or a receiving function, and the communication unit 1201 can also be described as a transceiving unit. The communication unit 1201 can also be a unit integrating an acquisition unit and a sending unit, where the acquisition unit is configured to implement a receiving function, and the sending unit is configured to implement a sending function. Alternatively, the communication unit 1201 can be configured to receive information sent by another apparatus, and can also be configured to send information to another apparatus.
[0371] In a possible design, the model debugging apparatus 120 can correspond to the model debugging apparatus in the method embodiments shown in FIG. 5 and FIG. 8, and the model debugging apparatus 120 can be an electronic device or a chip in an electronic device. The model debugging apparatus 120 can include units for performing operations performed by the model debugging apparatus in the method embodiments shown in FIG. 5 and FIG. 8, and each unit in the model debugging apparatus 120 is configured to implement operations performed by the model debugging apparatus in the method embodiments shown in FIG. 5 and FIG. 8. The apparatus is applied to a main model, the main model includes a first call point and a second call point, a model called by the main model through the first call point includes a first model, and a model called by the main model through the second call point includes the first model. The units are described as follows.
[0372] The communication unit 1201 is configured to acquire a second model and a third model, the second model corresponds to a call point different from a call point corresponding to the third model, the second model is called by the main model through the first call point, the third model is called by the main model through the second call point, and the second model, the third model and the first model are associated.
[0373] The processing unit 1202 is configured to control data transmission between the first call point and the second model, and data transmission between the second call point and the third model.
[0374] In a possible implementation, the communication unit 1201 is further configured to acquire the first model.
[0375] The processing unit 1202 is further configured to generate the second model and the third model based on the first model.
[0376] In a possible implementation, the processing unit 1202 is further configured to control display of data transmission status and / or running status of the second model and / or the third model.
[0377] In a possible implementation, the processing unit 1202 is further configured to determine a path passing through the first call point and a path in the second model as a first path.
[0378] The processing unit 1202 is further configured to input first debugging data into the second model through the first call point based on the first path, for model debugging.
[0379] In a possible implementation, the processing unit 1202 is further configured to release the second model and the third model after the debugging of the second model and the third model ends.
[0380] In a possible implementation, the processing unit 1202 is further configured to control display of the data transmission status and / or the running status of the second model and the third model to be closed after the debugging of the second model and the third model ends.
[0381] In a possible implementation, the processing unit 1202 is further configured to determine error information corresponding to the first call point in a case where an abnormal interruption debugging occurs during the debugging of the second model.
[0382] The processing unit 1202 is further configured to determine an error cause and / or a modification suggestion for the first model based on the error information corresponding to the first call point.
[0383] In a possible implementation, the processing unit 1202 is further configured to release the second model; and / or control display of the error cause and / or the modification suggestion for the first model.
[0384] In a possible implementation, the processing unit 1202 is further configured to package debugging information corresponding to the second model and debugging information corresponding to the third model.
[0385] In a possible implementation, the processing unit 1202 is further configured to sequentially pack the debugging information corresponding to the second model and the debugging information corresponding to the third model based on an order of calling the second model through the first calling point and calling the third model through the second calling point.
[0386] In a possible implementation, the main model further includes a third calling point, and the model called by the main model through the third calling point includes the first model.
[0387] The processing unit 1202 is further configured to control data transmission between the third calling point and the second model, or control data transmission between the third calling point and the third model.
[0388] In a possible implementation, the main model further includes a fourth calling point, and the model called by the main model through the fourth calling point includes the first model.
[0389] The communication unit 1201 is further configured to obtain the first model.
[0390] The processing unit 1202 is further configured to control data transmission between the fourth calling point and the first model.
[0391] In a possible implementation, the main model further includes a plurality of first calling points, and the plurality of first calling points have the same input.
[0392] The processing unit 1202 is further configured to control data transmission between the plurality of first calling points and the second model.
[0393] The communication unit 1201 and the processing unit 1202 described in the design perform the steps as described in the model debugging apparatus corresponding to the method embodiments shown in FIG. 5 and FIG. 8.
[0394] The technical effects brought by the implementation of the communication unit 1201 and the processing unit 1202 described in the design can be referred to the introduction of the technical effects of the method embodiments shown in FIG. 5 and FIG. 8.
[0395] In another possible design, the apparatus is applied to a main model, the main model includes a fifth calling point and a sixth calling point, the model called by the main model through the fifth calling point includes a fourth model, and the model called by the main model through the sixth calling point includes the fourth model; and the description of each unit in the model debugging apparatus is as follows.
[0396] The communication unit 1201 is configured to obtain a fifth model, wherein the calling point corresponding to the fourth model and the calling point corresponding to the fifth model are not completely same, the fourth model is called by the main model through the fifth calling point, the fifth model is called by the main model through the sixth calling point, and the fifth model is associated with the fourth model.
[0397] The processing unit 1202 is configured to control data transmission between the fifth calling point and the fourth model, and data transmission between the sixth calling point and the fifth model.
[0398] As to the communication unit 1201 and the processing unit 1202 described in the design, the steps performed by the communication unit 1201 and the processing unit 1202 can refer to the corresponding implementation of the model debugging device in the method embodiments shown in FIG. 5 and FIG. 8.
[0399] As to the technical effects brought by the implementation of the communication unit 1201 and the processing unit 1202 described in the design, the technical effects brought by the implementation of the communication unit 1201 and the processing unit 1202 can refer to the technical effects of the method embodiments shown in FIG. 5 and FIG. 8.
[0400] According to the embodiments of the present application, each unit in the device shown in FIG. 12 can be combined into one or several other units respectively or all, or some of the units can be further split into a plurality of units with smaller functions to constitute, which can achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions, and in actual application, the functions of a unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of the present application, the electronic device can also include other units, and in actual application, these functions can also be realized by other units, and can be realized by multiple units.
[0401] It should be noted that the implementation of each unit can also correspond to the description of the corresponding method embodiments shown in FIG. 5 and FIG. 8.
[0402] In the model debugging device 120 described in FIG. 12, the efficiency of model debugging can be improved.
[0403] For the case that the above-mentioned model debugging device 120 is an electronic device, the structure schematic diagram of the electronic device can be referred to FIG. 13.
[0404] It should be understood that the electronic device 130 shown in FIG. 13 is only an example, and the electronic device of the embodiments of the present application can also include other components, or include components similar in function to the components in FIG. 13, or not include all the components in FIG. 13.
[0405] The electronic device 130 includes a transceiver interface 1301 and at least one processor 1302.
[0406] The electronic device 130 can correspond to a model debugging apparatus. The transceiver interface 1301 is configured to transceive signals, and the at least one processor 1302 executes program instructions to cause the electronic device 130 to implement the corresponding procedures of the methods performed by the corresponding device in the above method embodiments.
[0407] In a possible design, the electronic device 130 can correspond to the model debugging apparatus in the method embodiments shown in FIG. 5 and FIG. 8. For example, the electronic device 130 can be the model debugging apparatus, or can be a chip in the model debugging apparatus. The electronic device 130 can include components configured to perform the operations performed by the model debugging apparatus in the above method embodiments, and each component in the electronic device 130 is respectively configured to implement the operations performed by the model debugging apparatus in the above method embodiments. Specifically, the electronic device 130 can include the following components:
[0408] obtaining a second model and a third model, the calling point corresponding to the second model being different from the calling point corresponding to the third model, the second model being called by the main model through the first calling point, the third model being called by the main model through the second calling point, the second model and the third model being associated with the first model;
[0409] controlling data transmission between the first calling point and the second model, and data transmission between the second calling point and the third model.
[0410] Alternatively,
[0411] obtaining a fifth model, the calling point corresponding to the fourth model being different from the calling point corresponding to the fifth model, the fourth model being called by the main model through the fifth calling point, the fifth model being called by the main model through the sixth calling point, the fifth model being associated with the fourth model;
[0412] controlling data transmission between the fifth calling point and the fourth model, and data transmission between the sixth calling point and the fifth model.
[0413] The transceiver interface 1301 and the at least one processor 1302 described in the present design perform the steps, which can refer to the implementation corresponding to the model debugging apparatus in the method embodiments shown in FIG. 5 and FIG. 8.
[0414] The technical effects brought by the implementation of the transceiver interface 1301 and the at least one processor 1302 described in the present design can refer to the introduction of the technical effects of the method embodiments shown in FIG. 5 and FIG. 8.
[0415] In the electronic device 130 described in FIG. 13, the efficiency of model debugging can be improved.
[0416] For the case that the model debugging apparatus 120 described above is a chip or a chip system, refer to the structural schematic diagram of the chip shown in FIG. 14.
[0417] As shown in FIG. 14, the chip 140 includes a processor 1401 and an interface 1402. The number of the processor 1401 can be one or more, and the number of the interface 1402 can be multiple. It should be noted that the functions of the processor 1401 and the interface 1402 respectively can be implemented by hardware design, or by software design, or by a combination of software and hardware, which is not limited here.
[0418] Optionally, the chip 140 can further include a memory 1403, which is used to store necessary program instructions and data.
[0419] In the present application, the processor 1401 can be used to call the implementation program of the model debugging method provided by one or more embodiments of the present application in the model debugging apparatus from the memory 1403, and execute the instructions included in the program. The interface 1402 can be used to output the execution result of the processor 1401. In the present application, the interface 1402 can be specifically used to output various messages or information of the processor 1401.
[0420] The model debugging method provided by one or more embodiments of the present application can refer to the foregoing various embodiments shown in FIG. 5 and FIG. 8, which will not be repeated here.
[0421] The processor in the embodiments of the present application can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0422] The memory in the embodiments of the present application is used to provide a storage space, and the storage space can store data such as an operating system and a computer program. The memory includes but is not limited to a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a compact disc read-only memory (CD-ROM).
[0423] According to the method provided in the embodiments of the present application, the embodiments of the present application further provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program runs on one or more processors, the method shown in FIG. 5 and FIG. 8 can be implemented.
[0424] According to the method provided in the embodiments of the present application, the embodiments of the present application further provide a computer program product, and the computer program product includes a computer program. When the computer program runs on a processor, the method shown in FIG. 5 and FIG. 8 can be implemented.
[0425] The embodiments of the present application further provide an intelligent driving vehicle, and the intelligent driving vehicle includes at least one model debugging apparatus 120, or an electronic device 130, or a chip 140.
[0426] The embodiments of the present application further provide a processing apparatus, including a processor and an interface. The processor is used to execute the method in any of the method embodiments.
[0427] It should be understood that the processing apparatus can be a chip. The units in the various apparatus embodiments and the electronic devices in the method embodiments fully correspond to each other, and the corresponding steps are executed by the corresponding modules or units. For example, the communication unit (transceiver) executes the steps of receiving or sending in the method embodiments. The other steps except for sending and receiving can be executed by the processing unit (processor). The functions of the specific units can be referred to the corresponding method embodiments. The processor can be one or more.
[0428] It can be understood that the electronic device in the embodiments of the present application can execute part or all of the steps in the embodiments of the present application. These steps or operations are only examples, and the embodiments of the present application can also execute other operations or various modifications of the operations. In addition, the various steps can be executed in different orders presented in the embodiments of the present application, and it is possible that not all the operations in the embodiments of the present application are executed.
[0429] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.
[0430] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0431] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing unit, or each unit can be a physically independent unit, or two or more units can be integrated into a unit.
[0432] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program codes that can be stored in the medium.
[0433] The above is merely specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application.
Claims
1. A model debugging method characterized by comprising: The method is applied to a main model, the main model comprises a first calling point and a second calling point, a model called by the main model through the first calling point comprises a first model, and a model called by the main model through the second calling point comprises the first model; the model debugging method comprises the following steps: obtaining a second model and a third model, the calling point corresponding to the second model and the calling point corresponding to the third model are different, the second model is called by the main model through the first calling point, the third model is called by the main model through the second calling point, and the second model, the third model and the first model are associated; controlling data transmission between the first calling point and the second model, and data transmission between the second calling point and the third model.
2. The method of claim 1, wherein, The method further comprises the following steps: obtaining the first model; generating the second model and the third model based on the first model.
3. The method according to claim 1 or 2, characterized in that, The method further comprises the following steps: controlling display of data transmission and / or running state of the second model and / or the third model.
4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises the following steps: based on position information of the first calling point in the main model and position information of the first model, obtaining a first path; based on the first path, inputting first debugging data into the second model through the first calling point for model debugging.
5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises the following steps: after the debugging of the second model and the third model is completed, releasing the second model and the third model.
6. The method according to any one of claims 1 to 5, characterized in that, The method further comprises the following steps: after the debugging of the second model and the third model is completed, controlling display of data transmission and / or running state of the second model and the third model to be closed.
7. The method according to any one of claims 1 to 4, characterized in that, The method further comprises the following steps: in the case that an abnormal interruption occurs during the debugging of the second model, determining error information corresponding to the first calling point; based on the error information corresponding to the first calling point, determining an error cause and / or a modification suggestion for the first model.
8. The method of claim 7, wherein, The method further comprises the following steps: releasing the second model; and / or, controlling display of the error cause and / or the modification suggestion for the first model.
9. The method according to any one of claims 1 to 8, characterized in that, The method further comprises the following steps: packing debugging information corresponding to the second model and debugging information corresponding to the third model.
10. The method of claim 9, wherein, The method further comprises the following steps: based on a calling sequence of the second model through the first calling point and the third model through the second calling point, sequentially packing the debugging information corresponding to the second model and the debugging information corresponding to the third model.
11. The method according to any one of claims 1 to 10, characterized in that, The main model further comprises a third calling point, a model called by the main model through the third calling point comprises the first model; the model debugging method further comprises the following steps: controlling data transmission between the third calling point and the second model, or controlling data transmission between the third calling point and the third model.
12. The method according to any one of claims 1 to 10, characterized in that, The main model further comprises a fourth calling point, a model called by the main model through the fourth calling point comprises the first model; the model debugging method further comprises the following steps: acquiring the first model; controlling data transmission between the fourth calling point and the first model.
13. The method according to any one of claims 1 to 10, characterized in that, The main model further comprises a plurality of the first calling points, and inputs of the plurality of the first calling points are identical; the model debugging method further comprises: controlling data transmission between the plurality of the first calling points and the second model.
14. A model debugging apparatus characterized by comprising: comprising units for performing the method according to any one of claims 1 to 13.
15. A model debugging apparatus characterized by comprising: comprising a processor for performing the method according to any one of claims 1 to 13.
16. A chip, characterized by comprising a logic circuit and an interface, the logic circuit and the interface being coupled; the interface is used for inputting and / or outputting information, and the logic circuit is used for performing the method according to any one of claims 1 to 13.
17. A mobile terminal, characterized by comprising the model debugging apparatus according to claim 14, or the model debugging apparatus according to claim 15, or the chip according to claim 16.
18. A computer-readable storage medium, characterized in that, The computer readable storage medium is used for storing a computer program, and the computer program is executed to perform the method according to any one of claims 1 to 13.
19. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed to perform the method according to any one of claims 1 to 13.