Model database nesting method and system, electronic equipment and readable storage medium
By generating user type tables, variable tables, and reference tables, model database nesting is achieved, which solves the problems of missed modifications and compilation failures caused by database dependencies in multi-model collaborative development, and realizes centralized reuse of user-defined types and variables.
Patent Information
- Application Number
- CN202511587389.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-08-22
- Filing Date
- 2025-10-31
- Publication Date
- 2026-03-03
AI Technical Summary
In multi-model collaborative development, existing technologies suffer from problems such as model dependency on databases leading to missed or incorrect modifications, and compilation failures.
By generating at least two sets of user type tables, variable tables, and reference tables, nesting of model databases is achieved. The name of another model database is added as a reference item using the reference table, thus enabling nesting between different model databases.
It eliminates the problems of missed or incorrect modifications, compilation failures, repetitive maintenance, and difficulty in traceability caused by cross-library copying, and enables centralized reuse of user-defined types and variables across different models.
Smart Images

Figure CN121597683A_ABST
Abstract
Description
[0001] Cross-references to related applications
[0002] This application is based on and asserts priority to Chinese Patent Application No. 2025109616996, filed on July 14, 2025, and Chinese Patent Application No. 2025111786001, filed on August 22, 2025, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This invention relates to database management technology, specifically to a method, system, electronic device, and readable storage medium for nested model databases. Background Technology
[0004] A model can refer to a "graphical program," such as a Simulink block diagram, which is a common representation. In multi-model collaborative development, models often depend on databases. For example, model A depends on database 'a', and model B depends on database 'b'. If model A needs to obtain the output of model B, the traditional method is to copy the relevant content from database 'b' into database 'a' to correctly parse the output of model B. If database 'b' is subsequently updated during development, the corresponding content in database 'a' needs to be modified synchronously, which can easily lead to missed or incorrect modifications. Furthermore, if model A and model B generate code simultaneously, the relevant content in database 'b' will be generated repeatedly, resulting in compilation failure.
[0005] Therefore, existing technologies for multi-model collaborative development have technical problems such as model dependence on databases, which can easily lead to missed modifications, incorrect modifications, and compilation failures.
[0006] It should be noted that the information disclosed in this background section is only for understanding the background technology of this application concept, and therefore, the above description is not considered to constitute prior art information. Summary of the Invention
[0007] The purpose of this invention is to provide a method, system, electronic device, and readable storage medium for nesting model databases.
[0008] To address the aforementioned technical problems, this invention provides a method for nesting model databases, comprising:
[0009] At least two model databases are generated using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to a specific set of user type tables, variable tables, and reference tables; and
[0010] By adding the name of another model database as a reference to the reference table of the model database being processed, nesting of the model database being processed with another model database based on the user type table and variable table can be achieved;
[0011] in:
[0012] The user type table is used to define user data types;
[0013] The variable table is used to define signals and parameters to associate them with user data types;
[0014] The reference table is used to define the names of other model databases referenced by the model database being processed.
[0015] In another aspect, the present invention also provides a model database nesting system, comprising:
[0016] A computer device for executing the model database nesting method as described above;
[0017] The computer device is configured to include:
[0018] The generation module is configured to generate at least two model databases using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to each set of user type tables, variable tables, and reference tables.
[0019] Nested modules are configured to nest one model database with another model database based on a user type table and a variable table by adding the name of another model database as a reference to the model database being processed in the reference table of the model database being processed.
[0020] Thirdly, the present invention also provides a non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to execute the model database nesting method described above.
[0021] Fourthly, the present invention also provides an electronic device, comprising:
[0022] Non-transitory computer-readable storage medium;
[0023] processor;
[0024] The non-transitory computer-readable storage medium stores instructions that, when executed by a processor, cause the processor to perform the aforementioned model database nesting method.
[0025] Fifthly, the present invention also provides a computer program including instructions that, when executed by a processor, cause the processor to perform the aforementioned model database nesting method.
[0026] The beneficial effects of this invention are that the model database nesting method of this invention references the user type table and variable table of other model databases through the reference table of the model database being processed, thereby realizing the centralized reuse of user-defined user types and variables between different models, eliminating problems such as missed or incorrect modifications, compilation failures, and repeated maintenance and difficulty in traceability caused by cross-database copying.
[0027] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.
[0028] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0029] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0030] Figure 1 The steps of the model database nesting method involved in some embodiments are illustrated in the diagram.
[0031] Figure 2 Sample diagrams of user type tables involved in some embodiments are shown;
[0032] Figure 3 The diagram illustrates a method for creating a value type named SpeedType in some examples.
[0033] Figure 4 Example diagrams of variable tables involved in some embodiments are shown;
[0034] Figure 5 The illustration shows a method for selecting the desired type as the type of signal and / or parameter from a variable type selector in some of the cases involved in the embodiments;
[0035] Figure 6 A schematic diagram of the model database BasicData in some of the embodiments is shown;
[0036] Figure 7 The illustration shows a method for adding a user type to a variable type selector in some of the examples.
[0037] Figure 8 The illustration shows a case in which a reference to the model database BasicData is added to the reference table of the model database ABSData in some embodiments;
[0038] Figure 9 The diagram illustrates the available types displayed in the variable type selector of the model database ABSData in some of the cases involved in the embodiments;
[0039] Figure 10 The illustration shows a case in some embodiments where, when adding a reference to the model database ABSData and selecting the model database BasicData, the reference addition fails.
[0040] Figure 11 The illustrations show the intent of user type representation in some of the cases involved in the embodiments;
[0041] Figure 12 The illustration shows a case study of converting a user type table into a header file named BasicData.h in some embodiments.
[0042] Figure 13 The following illustrations show the intended representation of variables in some of the examples.
[0043] Figure 14 The illustration shows a method for importing C header files in the user type table interface in some of the examples.
[0044] Figure 15 The parsed user type representation intent is shown in some examples involving the implementation;
[0045] Figure 16 The diagram illustrates a method for importing C header files in a variable table interface in some of the embodiments.
[0046] Figure 17 The diagram illustrates the intended representation of variables obtained after parsing in some of the examples involved in the embodiments;
[0047] Figure 18 A block diagram illustrating the principle of a nested model database system is shown in some embodiments;
[0048] Figure 19 Block diagrams of electronic devices involved in some embodiments are shown;
[0049] Figure 20 Block diagrams of electronic devices involved in some embodiments are shown. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] A model can refer to a "graphical program," such as a Simulink block diagram, which is a common representation. In multi-model collaborative development, models often depend on databases. For example, model A depends on database 'a', and model B depends on database 'b'. If model A needs to obtain the output of model B, the traditional method is to copy the relevant content from database 'b' into database 'a' to correctly parse the output of model B. If database 'b' is subsequently updated during development, the corresponding content in database 'a' needs to be modified synchronously, which can easily lead to missed or incorrect modifications. Furthermore, if model A and model B generate code simultaneously, the relevant content in database 'b' will be generated repeatedly, resulting in compilation failure.
[0052] Therefore, at least one embodiment provides a method for nesting model databases, including:
[0053] At least two model databases are generated using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to a specific set of user type tables, variable tables, and reference tables; and
[0054] By adding the name of another model database as a reference to the reference table of the model database being processed, nesting of the model database being processed with another model database based on the user type table and variable table can be achieved.
[0055] The model database nesting method in this embodiment references the user type table and variable table of other model databases through the reference table of the model database being processed. This enables the centralized reuse of user-defined user types and variables across different models, eliminating problems such as missed or incorrect modifications, compilation failures, repetitive maintenance, and difficulty in traceability caused by cross-database copying.
[0056] For example, in calibration scenarios, multiple common calibration parameters (filter time constant, threshold, scaling factor, etc.) may be used simultaneously by multiple ECUs / models. In traditional, decentralized development processes, each developer has a copy of these calibration parameters on their computer. If the architect modifies the default value of a calibration parameter (e.g., filter time constant) and notifies the developers to update it, each developer needs to modify their own copy in the database. This can lead to omissions or errors, causing the ECU to behave inconsistently with expectations. However, if a nested model-database approach is used, each developer does not need to modify their own database. The referenced common database is automatically updated to the latest version as the code repository is pulled, fundamentally eliminating synchronization errors caused by manual intervention.
[0057] The various non-limiting embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings.
[0058] like Figure 1 As shown, some embodiments provide a method for nesting model databases, including:
[0059] Step S101: Generate at least two model databases using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to each set of user type tables, variable tables, and reference tables;
[0060] Step S102: By adding the name of another model database as a reference item to the reference table of the model database being processed, the nesting of the model database being processed with another model database based on the user type table and variable table is achieved.
[0061] Specifically, the User Type table is used to define user data types; the Variable table is used to define signals and parameters to associate with user data types; and the Reference table is used to define the names of other model databases referenced by the model database being processed.
[0062] In some embodiments, when at least one user type is created, the associated type is configured for each user type according to predefined association rules, so as to generate the user type table through each user type and the type associated with each user type.
[0063] In some embodiments, a user type refers to a set of user-defined data types, including one or more of the following: Alias type, Bus type, Enum type, Value type, and Numeric type;
[0064] Users can customize names for each user type, and users of the same type can be distinguished by different custom names.
[0065] Once the user type is created, the associated type is defined according to the association rules. The associated type can be a user type or a basic data type. The association rules specifically include at least one of the following:
[0066] If the user type is an alias type, then the types associated with the alias type can be enumeration types, value types, or basic data types;
[0067] If the user type is a structure (Bus) type, then the types of its member associations can be defined as alias type, structure (Bus) type, enumeration (Enum) type, value (Value) type, numeric (Numeric) type, or basic data type;
[0068] If the user type is an enumeration (Enum) type, then the types associated with its members include integer types in the basic data types;
[0069] If the user type is a value type, then the associated types of the value type can include alias type, bus type, enum type, value type, numeric type, or basic data type;
[0070] If the user type is numeric, then the types associated with the numeric type can be defined as double, single, or boolean.
[0071] Specifically, the basic data types include: integer types: int8, uint8, int16, uint16, int32, uint32, int64, uint64; floating-point types: single, double; boolean type: bool; character type: char (equivalent to int8).
[0072] In some embodiments, the formed user type representation is, for example Figure 2 As shown, the user type table in this example fully contains the aforementioned types:
[0073] The name of the value type includes: SpeedType.
[0074] The structure type names include: WheelPara, AxisPara, and VehiclePara. VehiclePara contains two child members, Front and Rear, defined as type AxisPara. AxisPara contains two child members, Left and Right, defined as type WheelPara. WheelPara contains a Radius defined as type single and a Teeth defined as type uint8.
[0075] The names of enumeration types include IGN.
[0076] Alias type names include float.
[0077] Numeric types include expr_return.
[0078] The following example illustrates in detail how, when at least one user type is created, the associated types are configured for each user type according to predefined association rules, so as to generate the user type table through each user type and the types associated with each user type:
[0079] Taking a value type named SpeedType as an example, we need to create a data type representing wheel speed or vehicle speed. First, open the user type table (which is usually blank during initialization). Right-click in the table or click the "Add Value Type" button in the toolbar menu. A new value type record named Value1 will be added to the table. Select this record, click in its "Name" column, and you can change Value1 to SpeedType by typing it in the keyboard. Since this type also needs to represent the decimal point in the speed, it is a single-precision type. Therefore, click the "Type" column and select "single" in the pop-up type selector. This defines the SpeedType type as "single". Figure 3 As shown.
[0080] In automotive applications, speeds typically range from 0 to 100 meters per second. Therefore, this type is set with a minimum value of 0 and a maximum value of 100, in m / s. Enter "wheel speed" in the description column. The rightmost two columns, "Last Modified" and "Last Modified By," are read-only and automatically generated by the system.
[0081] Adding the necessary records to this table creates a user type table that meets specific design requirements.
[0082] In some embodiments, the types of association include: user types in the model database being processed and user types in other model databases referenced by the model database being processed.
[0083] Specifically, when a user defines the association type for a custom user type according to the association rules, the association type can be a user type already contained in the model database being processed, or a user type contained in other model databases referenced by the model database being processed.
[0084] In some embodiments, when at least one signal and / or parameter is created, corresponding attributes are configured for each signal and / or parameter according to preset model design requirements to generate the variable table; the attributes include: type.
[0085] Specifically, the attributes also include: name, initial value, array size, minimum value, maximum value, unit, description, last modifier and last modification time.
[0086] Specifically, each variable in the variable table defines a "signal" and "parameter" in the model. Each variable displays its binding type and can directly participate in simulation, testing, and the compilation and execution of the target program. The variable table also records attributes such as the last person / time who modified it, thus avoiding the omissions, discrepancies, and difficulty in traceability caused by traditional copy-paste methods. An example of a variable table is shown below. Figure 4 As shown.
[0087] In some embodiments, a variable type selector is used to configure the appropriate type for each signal and / or parameter.
[0088] Specifically, such as Figure 5 As shown, selecting a record in the variable table and clicking in the "Type" column will bring up the "Variable Type Selector," which contains all possible variable types. Users can select the type they want to associate with.
[0089] In some embodiments, the variable type selector includes: the basic data type, all user types in the model database being processed, and all user types in other model databases referenced by the model database being processed.
[0090] Specifically, when the variable type selector is created, all basic data types (double, single, int8, uint8, int16, uint16, int32, uint32, int64, uint64, bool) are added to the variable type selector; all user types are added to the variable type selector; and all user types from other model databases referenced by the model database being processed are added to the variable type selector.
[0091] The following example details how to create a variable type selector:
[0092] For example, design the model database ABSData for the ABS module, and design the model database ABSData that is being processed to reference the model database BasicData.
[0093] like Figure 6 As shown, it is assumed that the model database BasicData already contains all basic data types, and its user type table contains user types such as speed type and four-wheel speed.
[0094] In the ABS model's model database ABSData, you can first design user types belonging to this module, such as wheel status, axle status types, etc., and then add all the designed user types to the variable type selector, such as... Figure 7 As shown.
[0095] Additionally, a reference to the BasicData model database needs to be added to the reference table of the ABSData model database, such as... Figure 8 As shown.
[0096] As shown in Figure 9, in the variable type selector of the model database ABSData, you can now select variables of the following types:
[0097] 1. Basic data types (double, single, int8, uint8, int16, uint16, int32, uint32, int64, uint64, bool).
[0098] 2. User types from the model database BasicData (SpeedType, WheelPara, IGN, float, expr_return, AxisPara, VehiclePara).
[0099] 3. User types (WheelState, AxisState) from the model database ABSData itself.
[0100] In some embodiments, the model database being processed references other model databases in an open-loop manner.
[0101] Following the example above, the model database ABSData already references the model database BasicData. An open-loop reference means that the model database BasicData can no longer reference the model database ABSData. Figure 10 As shown, when adding a reference to the model database ABSData and selecting the model database BasicData, the reference addition fails, and the system prints an error message indicating that a circular reference has been detected.
[0102] In some embodiments, when the user type table and variable table are converted into a code file containing type declarations and variable definitions, the attributes of the user types and the attributes of the variables are written into the code file as comments to participate in model simulation, testing, and the execution of the target program.
[0103] Specifically, the user type table and variable table can be exported as C language header files and code files respectively, to participate in model simulation, testing, and the execution of the target program.
[0104] Specifically, with Figure 11 Taking the user type table shown as an example, right-clicking on the user type table and selecting the "Export C Header File..." option will yield a file like this. Figure 12 As shown, in the BasicData.h header file, the properties of the user type are all presented in the form of comments.
[0105] by Figure 13 Taking the variable table shown as an example, right-clicking on the variable table and selecting the "Export C Code..." option will allow the exported code to directly participate in the compilation process, thereby participating in the simulation execution process of the model.
[0106] In some embodiments, the user type table and variable table are restored when the declaration and definition sections of the code file are extracted.
[0107] Specifically, by extracting the declarations and definitions from existing code files, the user type table and variable table corresponding to the code files can be restored.
[0108] Specifically, such as Figure 14 As shown, right-clicking in the blank area of the user type table interface and selecting "Import C Header Files..." will generate the user type table parsed from the header file, as follows. Figure 15 As shown.
[0109] Specifically, such as Figure 16 As shown, right-clicking in the blank area of the variable table interface and selecting "Import C Code..." will generate the variable table parsed from the C code, as follows. Figure 17 As shown.
[0110] In some embodiments, the method for restoring the user type table and variable table during extraction of the declaration and definition sections in the code file includes:
[0111] The code file is parsed using a code syntax parser to extract user type names and associated types from the declaration section, as well as variable names, variable definitions, and variable prefixes from the definition section.
[0112] Construct a user type table by user type name and a variable table by variable name;
[0113] By searching through the user type table for the corresponding user type name in the currently processed model database or other model databases referenced by the currently processed model database, the search continues until the type associated with the user type is found to be a basic data type or structure type, thus completing the restoration of the user type table; and
[0114] Determine whether a variable is a signal or a parameter by using its prefix;
[0115] By searching for the corresponding variable type name level by level in the user type table of the model database being processed or other model databases referenced by the model database being processed, the variable table can be restored.
[0116] Specifically, through two case studies: single-database (the model database being processed) parsing and cross-database (referencing other model databases) parsing, the method of retrieving the declaration and definition sections of code files to reconstruct the user type table and variable table is explained in detail:
[0117] 1. The parsing rules and prefix conventions are as follows:
[0118] Type extraction (declaration section): Parse typedef, enum, and struct declarations from the header file to obtain the mapping of "type name ←→ type definition";
[0119] Variable extraction (definition part): Parse "variable type + variable name + initial value / dimension" etc. from the source file;
[0120] Prefix discrimination (signal / parameter): Determine the variable category by the prefix of the variable name, for example:
[0121] g_sig_ → signal
[0122] g_par_ → parameter
[0123] It can be extended according to enterprise specifications (such as sig_ / par_, S_ / P_, etc.).
[0124] Hierarchical type resolution: Based on the type definitions in the "User Type Table", the system searches level by level until it reaches the basic type or structure type; when crossing databases, it needs to be combined with the "Reference Table" to continue resolution in the referenced database.
[0125] 2. Case Study 1: Single Database Parsing (Model Database Being Processed)
[0126] Example header file BasicTypes.h (declaration section):
[0127]
[0128]
[0129] Example source file BasicData.c (definition section):
[0130]
[0131] 2.1 Extraction Steps
[0132] Build a code syntax parser: parse BasicTypes.h and BasicData.c;
[0133] Type declaration extraction: Collects the definitions of single, GearEnum, Speed, and VehicleInfo;
[0134] Variable definition extraction: Collect g_sig_VehicleSpeed_kph, g_sig_GearPos, g_par_FrontTrack_mm, and g_sig_VehicleInfo;
[0135] Create user type table / variable table: Create tables by "type name / variable name";
[0136] Type lookup is performed level by level: for example, Speed → single → float; VehicleInfo members are accessed level by level up to uint16_t / Speed;
[0137] Prefix classification: g_sig_* is classified as "signal", and g_par_* is classified as "parameter".
[0138] 2.2 Example of Extraction Results
[0139] User type table (excerpt):
[0140]
[0141] Variable table (excerpt):
[0142]
[0143] 3. Case Study 2: Cross-Library Reference Resolution (Nested)
[0144] Reference relationship: The model database ADAS.DB references the model database Chassis.DB through the "reference table".
[0145] The referenced library header file is ChassisTypes.h (Chassis.DB):
[0146]
[0147] The source file for this library is ADASData.c (ADAS.DB):
[0148]
[0149] 3.1 Extraction Steps
[0150] Build a syntax parser: parse the code of both ADAS.DB and Chassis.DB simultaneously;
[0151] Type declaration extraction: Chassis.DB provides single / Speed / ChassisStatus; ADAS.DB itself does not add any new types;
[0152] Variable definitions extracted: g_sig_ChassisStatus, g_sig_TargetSpeed_kph, g_par_AEB_TimeGap_s;
[0153] Cross-database hierarchical search:
[0154] g_sig_TargetSpeed_kph: Speed → single → float (completed in the referenced library);
[0155] g_sig_ChassisStatus:ChassisStatus structure member vcuSpeed:Speed→float;
[0156] Prefix classification: g_sig_* = signal, g_par_* = parameter.
[0157] 3.2 Example of Extraction Results
[0158] User type table (aggregate view):
[0159] Type Name Belonging library category Definition / Member Final parsing type single Chassis.DB Alias typedef float single; float Speed Chassis.DB Alias typedef single Speed; float ChassisStatus Chassis.DB Structure vcuSpeed:Speed {float}
[0160] Variable table (aggregate view):
[0161] name category type initial value Source library g_sig_ChassisStatus Signal ChassisStatus na ADAS.DB g_sig_TargetSpeed_kph Signal Speed 80.0 ADAS.DB g_par_AEB_TimeGap_s parameter float 1.2 ADAS.DB
[0162] 4. Processing flow pseudocode (brief)
[0163]
[0164]
[0165] like Figure 18 As shown, some embodiments also provide a nested model database system, including:
[0166] A computer device is configured to perform the model database nesting method as described above; the computer device is configured to include:
[0167] The generation module is configured to generate at least two model databases using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to each set of user type tables, variable tables, and reference tables.
[0168] Nested modules are configured to nest one model database with another model database based on a user type table and a variable table by adding the name of another model database as a reference to the model database being processed in the reference table of the model database being processed.
[0169] The specific implementation functions of the generation module and the nested module are implemented in the computer device. For details, please refer to the aforementioned content on the nested model database method, which will not be repeated here.
[0170] The electronic devices in the embodiments of this disclosure are described below from the perspective of hardware processing:
[0171] The embodiments disclosed herein do not limit the specific implementation of the electronic device.
[0172] like Figure 19 As shown, some embodiments also provide an electronic device, including: a processor, a non-transitory computer-readable storage medium, a communication bus, and a communication interface; wherein the processor, the non-transitory computer-readable storage medium, and the communication interface communicate with each other through the communication bus; the non-transitory computer-readable storage medium stores instructions that, when executed by the processor, cause the processor to execute the aforementioned model database nesting method.
[0173] like Figure 20 As shown, some embodiments also provide an electronic device, including:
[0174] The processor, the display communicating with the processor to render the webpage, and the non-transitory computer-readable storage medium; wherein
[0175] The non-transitory computer-readable storage medium stores instructions that, when executed by a processor, cause the processor to perform the following operations:
[0176] At least two model databases are generated by using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to each set of user type tables, variable tables, and reference tables.
[0177] By adding the name of another model database as a reference to the currently being processed model database in its reference table, nesting of the currently being processed model database with another model database based on user type tables and variable tables is achieved; and
[0178] The display is configured to show at least two model databases.
[0179] In some embodiments, a computer device (e.g., an industrial control computer) may be used as an electronic device and as a server.
[0180] Figure 19 and Figure 20 The diagram shows a schematic structure of an electronic device, which is for illustration only and does not constitute a limitation on the electronic device. The electronic device may include fewer or more components than shown, or may combine components, or may use different component arrangements.
[0181] In some embodiments, the communication interface may include physical interfaces such as RS-232, RS-485, and USB (including Type-C) for connecting external devices or bus adapters; it may also include wired network interfaces such as Ethernet, or wireless network interfaces such as Wi-Fi and Bluetooth for establishing communication connections between computer devices and other electronic devices.
[0182] In some embodiments, non-transitory computer-readable storage media include, but are not limited to, flash memory, hard disks, magnetic storage, magnetic disks, optical disks, and card-type storage (e.g., multimedia cards, secure digital storage (SD) memory, etc.). In some embodiments, the storage medium can serve as an internal storage unit of a computer device, such as a built-in hard disk; in other embodiments, it can serve as an external storage device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital storage (SD) card, a flash memory card, etc. Furthermore, the storage medium may also include both internal storage units and external storage devices. This storage medium can be used to store application software and various types of data (e.g., computer program code) installed on the computer device, and can also be used to temporarily store data that has been output or will be output.
[0183] In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, for running program code in a storage medium and / or processing data, such as executing a computer program.
[0184] In some embodiments, the communication bus can be an input / output bus, such as a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This bus can be categorized into an address bus, a data bus, and a control bus.
[0185] Optionally, the computer device also includes a user interface. The user interface may include a display, an input unit (e.g., a keyboard), and standard wired and / or wireless interfaces. Optionally, the display (or display module) may be an LED display, a liquid crystal display, a touch-screen liquid crystal display, or an OLED display. The display (or display module) may also be referred to as a screen or display unit, used to display information processed by the computer device and present a visual user interface.
[0186] When the processor executes the program, it implements the above. Figure 1 The steps in the nested model database method embodiment are shown. Alternatively, the processor executes the computer program to implement the functions of each module or unit in the above-described device embodiments.
[0187] Some embodiments also provide a non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the model database nesting method described above.
[0188] Please refer to the detailed description of the model database nesting method; it will not be repeated here.
[0189] Some embodiments also provide a non-transitory computer-readable storage medium storing computer-readable instructions that, when executed by at least one processor, cause the model database nesting method described above to be executed, specifically as follows:
[0190] At least two model databases are generated using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to a specific set of user type tables, variable tables, and reference tables; and
[0191] By adding the name of another model database as a reference to the reference table of the model database being processed, nesting of the model database being processed with another model database based on the user type table and variable table can be achieved.
[0192] Some embodiments also provide a computer program including instructions that, when executed by a processor, cause the processor to perform the previously described model database nesting method.
[0193] Please refer to the detailed description of the model database nesting method; it will not be repeated here.
[0194] Some embodiments also provide a computer program product including a readable storage medium having readable program code stored thereon, the readable program code including instructions that cause at least one processor (one or more computer devices) to perform the following operations:
[0195] At least two model databases are generated using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to a specific set of user type tables, variable tables, and reference tables; and
[0196] By adding the name of another model database as a reference to the reference table of the model database being processed, nesting of the model database being processed with another model database based on the user type table and variable table can be achieved.
[0197] It should be understood that the apparatuses and methods disclosed in the several embodiments provided by this invention can also be implemented in other ways. The above apparatus embodiments are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatuses, methods, and computer program products according to various embodiments of the invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked by the blocks may occur in a different order than shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or sometimes in reverse order, depending on the functions involved. Furthermore, it should be noted that each block in the block diagrams and / or flowcharts, and combinations of such blocks, may be implemented by a dedicated hardware-based system for performing the specified function or action, or by a combination of dedicated hardware and computer instructions.
[0198] In addition, in the various embodiments of the present invention, the organization of each functional module can be flexibly selected: they can all be integrated into an independent part, or they can exist independently, or at least two modules can be integrated into an independent part.
[0199] When the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a non-transitory computer-readable storage medium. Based on this, the overall technical solution of the present invention and its improvements to the prior art can both be embodied in a software product. The software product, stored in the aforementioned storage medium, includes instructions for causing a computer device (e.g., a personal computer, server, or network device) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0200] Based on the foregoing description of the preferred embodiments of the present invention, those skilled in the art can make various changes and modifications without departing from the technical spirit of the present invention. The technical scope of the present invention is not limited to the specification, but should be determined by the scope of the claims.
Claims
1. A method for nesting model databases, characterized in that, include: At least two model databases are generated using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to a specific set of user type tables, variable tables, and reference tables; and By adding the name of another model database as a reference to the reference table of the model database being processed, nesting of the model database being processed with another model database based on the user type table and variable table can be achieved; in: The user type table is used to define user data types; The variable table is used to define signals and parameters to associate them with user data types; The reference table is used to define the names of other model databases referenced by the model database being processed.
2. The model database nesting method according to claim 1, characterized in that, When at least one user type is created, the associated type is configured for each user type according to predefined association rules, so as to generate the user type table through each user type and the type associated with each user type; The user types include one or more of the following: alias type, structure type, enumeration type, value type, and numeric type; The association rule includes at least one of the following: If the user type is an alias type, then the type associated with the alias type can be an enumeration type, a value type, or a basic data type. If the user type is a structure type, then the types associated with its members can be alias types, structure types, enumeration types, value types, numeric types, or basic data types. If the user type is an enumeration type, then the types associated with its members include integer types in the basic data types; If the user type is a value type, then the associated type of the value type can be an alias type, a structure type, an enumeration type, a value type, a numeric type, or a basic data type. If the user type is numeric, then the associated types for defining numeric types include double-precision floating-point types, single-precision floating-point types, or Boolean types in the basic data types.
3. The model database nesting method according to claim 2, characterized in that, The types of associations include: user types in the model database being processed and user types in other model databases referenced by the model database being processed.
4. The model database nesting method according to claim 1, characterized in that, When at least one signal and / or parameter is created, corresponding attributes are configured for each signal and / or parameter according to the preset model design requirements to generate the variable table; The attribute includes: type.
5. The model database nesting method according to claim 4, characterized in that, Configure the appropriate type for each signal and / or parameter using the variable type selector.
6. The model database nesting method according to claim 5, characterized in that, The variable type selector includes: basic data types, all user types in the model database being processed, and all user types in other model databases referenced by the model database being processed.
7. The model database nesting method according to claim 1, characterized in that, The model database being processed references other model databases in an open-loop manner.
8. The model database nesting method according to claim 1, characterized in that, When the user type table and variable table are converted into a code file containing type declarations and variable definitions, the attributes of the user types and the attributes of the variables are written into the code file as comments to participate in model simulation, testing, and the execution of the target program.
9. The model database nesting method according to claim 8, characterized in that, When the declaration and definition sections of the code file are extracted, the user type table and variable table are restored.
10. The model database nesting method according to claim 9, characterized in that, The methods for restoring the user type table and variable table during the extraction of declarations and definitions in the code file include: The code file is parsed using a code syntax parser to extract user type names and associated types from the declaration section, as well as variable names, variable definitions, and variable prefixes from the definition section. Construct a user type table by user type name and a variable table by variable name; By searching through the user type table for the corresponding user type name in the currently processed model database or other model databases referenced by the currently processed model database, the search continues until the type associated with the user type is found to be a basic data type or structure type, thus completing the restoration of the user type table; and Determine whether a variable is a signal or a parameter by using its prefix; By searching for the corresponding variable type name level by level in the user type table of the model database being processed or other model databases referenced by the model database being processed, the variable table can be restored.
11. A model database nesting system, characterized in that, include: A computer device, the computer device being configured to perform the model database nesting method as described in any one of claims 1-10; The computer device is configured to include: The generation module is configured to generate at least two model databases using at least two sets of user type tables, variable tables, and reference tables, with each model database corresponding to each set of user type tables, variable tables, and reference tables. Nested modules are configured to nest one model database with another based on a user type table and a variable table by adding the name of another model database as a reference to the model database being processed in the reference table of the model database being processed.
12. A non-transitory computer-readable storage medium, characterized in that, The system stores instructions that, when executed by a processor, cause the processor to perform the model database nesting method according to any one of claims 1-10.
13. An electronic device, characterized in that, include: Non-transitory computer-readable storage medium; processor; The non-transitory computer-readable storage medium stores instructions that, when executed by a processor, cause the processor to perform the model database nesting method according to any one of claims 1-10.
14. A computer program, characterized in that, Includes instructions that, when executed by a processor, cause the processor to perform the model database nesting method according to any one of claims 1-10.