A model integration method, device, equipment and storage medium

CN116360749BActive Publication Date: 2026-10-30SHANGHAI YUWEI SEMICON TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310319182.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2026-10-30
Estimated Expiration
2043-03-29

AI Technical Summary

Benefits of technology

[0018]本发明实施例提供了一种模型集成方法、装置、设备及存储介质,该方法包括:当收集到开发完毕的底层开发模型时,根据预设的版本号规则,将所述底层开发模型存储至目标文件夹中;将所述目标文件夹中底层开发模型与预先构建的命令树进行匹配,确定待集成的目标集成模型的命令流;构建与各所述底层开发模型中变量对应的全局变量,将所述全局变量存储至变量存储区中,并根据所述全局变量确定所述目标集成模型的数据流,以实现模型集成。上述技术方案,基于模型开发中的引用模型方式,预先构建命令树;当收集到用户开发的底层开发模型时,可以筛选出符合版本要求的底层开发模型,避免人工手动集成出现的版本管理错误;再将筛选出的底层开发模型与命令树进行匹配,进行命令流的构建;最后基于底层开发模型中的变量构建对应的全局变量,基于全局变量的读写情况形成数据流,代替现有技术中人工手动连线的方式,能够实现底层开发模型的自动集成。相比于现有技术中人工手动集成的方式,减少了研发人员集成耗时,提高了集成效率,降低了集成错误率。同时降低了对集成工程师的门槛要求,优化了企业的人员成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116360749B_ABST
    Figure CN116360749B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a model integration method, device and equipment and storage medium, the method comprising: when a developed bottom layer development model is collected, storing the bottom layer development model into a target folder according to a preset version number rule; matching the bottom layer development model in the target folder with a pre-constructed command tree to determine a command flow of a target integration model to be integrated; constructing global variables corresponding to variables in each bottom layer development model, storing the global variables into a variable storage area, and determining a data flow of the target integration model according to the global variables to realize model integration. By using the method, bottom layer development models meeting version requirements are screened out; the bottom layer development models are matched with the command tree to construct the command flow; and the corresponding global variables are constructed based on the variables in the bottom layer development models, and the reading and writing of the global variables form the data flow, so that automatic integration of the bottom layer development models can be realized, integration efficiency is improved, and integration error rate is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model development and integration technology, and in particular to a model integration method, apparatus, device, and storage medium. Background Technology

[0002] In the field of semiconductor device development, it is necessary to develop and integrate control firmware code for a large number of embedded modules. Using a model-based development approach can greatly accelerate the development of embedded code for semiconductor devices. However, due to the characteristics of semiconductor devices, such as numerous modules, complex subsystems, and high coupling, the development of their control firmware code also has the characteristics of numerous modules and complex models.

[0003] Traditional model-based development typically involves each developer responsible for a specific model. After each developer generates their code, an integration specialist manually integrates each model's code into a single project. The integrated model and project are then delivered to testers for manual testing, and a test report is generated. This requires multiple developers working on different modules, all integrated from a single master model. Manual integration demands a high level of technical skill from the integration specialist, and as model complexity increases, the time required for integration rises exponentially, resulting in low development efficiency and a high risk of human error. Summary of the Invention

[0004] This invention provides a model integration method, apparatus, device, and storage medium, which realizes automatic integration of development models, improves integration efficiency, and reduces integration error rate.

[0005] In a first aspect, embodiments of the present invention provide a model ensemble method, comprising:

[0006] Once the completed underlying development model is collected, it is stored in the target folder according to the preset version number rules.

[0007] The underlying development model in the target folder is matched with the pre-built command tree to determine the command flow of the target integration model to be integrated;

[0008] Construct global variables corresponding to the variables in each of the underlying development models, store the global variables in the variable storage area, and determine the data flow of the target integration model based on the global variables to achieve model integration.

[0009] Secondly, embodiments of the present invention provide a model integration apparatus, comprising:

[0010] The model collection module is used to store the collected underlying development models into the target folder according to the preset version number rules when the completed underlying development models are collected.

[0011] The command flow determination module is used to match the underlying development model in the target folder with the pre-built command tree to determine the command flow of the target integration model to be integrated.

[0012] The data flow determination module is used to construct global variables corresponding to the variables in each of the underlying development models, store the global variables in the variable storage area, and determine the data flow of the target integration model based on the global variables to achieve model integration.

[0013] Thirdly, embodiments of the present invention also provide an electronic device, comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the model integration method as described in the first aspect embodiment.

[0017] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the model integration method as described in the first aspect embodiment.

[0018] This invention provides a model integration method, apparatus, device, and storage medium. The method includes: when a completed underlying development model is collected, storing the underlying development model in a target folder according to a preset version number rule; matching the underlying development model in the target folder with a pre-built command tree to determine the command flow of the target integration model to be integrated; constructing global variables corresponding to variables in each of the underlying development models, storing the global variables in a variable storage area, and determining the data flow of the target integration model based on the global variables to achieve model integration. This technical solution, based on the model referencing method in model development, pre-constructs a command tree; when user-developed underlying development models are collected, models that meet version requirements can be selected, avoiding version management errors that occur during manual integration; the selected underlying development models are then matched with the command tree to construct the command flow; finally, corresponding global variables are constructed based on the variables in the underlying development models, and a data flow is formed based on the read and write status of the global variables. This replaces the manual connection method in the prior art and enables automatic integration of underlying development models. Compared to the manual integration methods used in existing technologies, this reduces the integration time spent by R&D personnel, improves integration efficiency, and lowers the integration error rate. It also lowers the entry requirements for integration engineers, optimizing personnel costs for enterprises.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 Example flowchart for developing integration of models in existing technologies;

[0022] Figure 2 This is a flowchart illustrating a model integration method provided in Embodiment 1 of the present invention;

[0023] Figure 3 This is an example diagram of the framework architecture of the entire model in a model integration method provided in Embodiment 1 of the present invention;

[0024] Figure 4 This is a flowchart illustrating another model integration method provided in Embodiment 2 of the present invention;

[0025] Figure 5 This is a schematic diagram illustrating the execution of a model integration method provided in Embodiment 2 of the present invention;

[0026] Figure 6 This is a flowchart illustrating the execution of the model integration method in a certain application scenario provided in Embodiment 2 of the present invention.

[0027] Figure 7 This is a schematic diagram of the structure of a model integration device provided in Embodiment 3 of the present invention;

[0028] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation

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

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

[0031] The traditional model-based development approach involves each developer responsible for a specific model. After their respective models generate code, integrators manually integrate the code from each model into a single project. The integrated model and project are then delivered to testers for manual testing, and a test report is generated. Therefore, this requires multiple developers working on different modules, followed by overall model integration by integrators. For example... Figure 1 Example flowchart for developing integration of models in existing technologies, such as Figure 1 As shown, the development team needs developer 1 to develop the framework model, developer 2 to develop the algorithm model, and developer 3 to develop the diagnostic model, etc. Figure 1 The code does not list all development models; framework models, algorithm models, diagnostic models, etc., can all be considered underlying development models. After developers 1, 2, 3, etc., complete their underlying development models, they submit them to integration personnel. The integration personnel manually integrate the collected underlying development models, and then submit them to the testing end for testing. However, manual integration requires extremely high technical skills from the integration personnel, and the time required increases exponentially with model complexity, resulting in low development efficiency and susceptibility to human error. Therefore, a model integration method is needed to solve these problems.

[0032] Example 1

[0033] Figure 2 This is a flowchart illustrating a model integration method provided in Embodiment 1 of the present invention. This method is applicable to the automatic integration of underlying development models. The method can be executed by a model integration device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 2 As shown, the model integration method provided in this embodiment can specifically include the following steps:

[0034] S101. When the completed underlying development model is collected, the underlying development model is stored in the target folder according to the preset version number rules.

[0035] In this system, different developers are responsible for developing different models. After each model generates its own code, the models are integrated. In this embodiment, the completed models are referred to as the underlying development models. The control firmware needs to be formed by integrating all the underlying development models. Version number rules are used for version management of the integrated models. Underlying development models with the same version number are stored in the same folder, designated as the target folder.

[0036] In this embodiment, after developers complete the underlying development model they are responsible for, they need to upload the underlying development model to the management system. The management system collects the completed underlying development models. Once the underlying development models are collected, the integration execution of the underlying development models is triggered based on the set continuous integration tool to monitor the continuous integration of the underlying development models. Preferably, the completed underlying development models are collected by the repository management system, and the model integration execution is triggered by the continuous integration tool. For example, the repository management system can be the repository management system GitLab, and the continuous integration tool can be Jenkins. When an underlying development model is uploaded to GitLab, GitLab triggers the continuous integration tool Jenkins to start the execution of the automatic model integration step.

[0037] It should be noted that the model integration method provided in this embodiment is based on a modeling tool. No specific limitations are placed on the modeling tool used; for example, Simulink can be used.

[0038] Understandably, when a completed underlying development model is collected, the automatic integration process is triggered. First, the underlying development model is stored in the target folder according to a preset version number rule. Considering that each device has its own complete software package, which contains control firmware integrated from the underlying development model, both the complete software and the underlying development model have corresponding version numbers. If the complete software hasn't been updated and is still using the old version of the control firmware and interfaces, when a new underlying development model is collected, since the complete software hasn't been updated and is still using the old version of the code, the control firmware version number should correspond to the complete software version number. Even if a new underlying development model is stored, it doesn't need to be integrated. Therefore, to facilitate the management of model integration version numbers, version number rules can be preset.

[0039] Considering that in existing technologies, developers need to manually set a version number after uploading their self-developed underlying development model, the overall integration model indexes the major version number of development model 1-1 based on the major version number of the top-level integration model, and then selects the latest minor version number. However, if the major version is too advanced or too outdated, the model reference will fail. Therefore, in this embodiment, when indexing the model, the model version number is first determined according to a preset version number rule to see if it meets the integration conditions. Only models that meet the integration conditions can be integrated. In this step, underlying development models that meet the version number rule are placed in the corresponding target folder, while those that do not meet the version number rule are not extracted to the target folder; for example, they can remain in the hosted warehouse management system.

[0040] In this embodiment, if the version number of the new underlying development model is greater than the version number of the whole machine software, the latest underlying development model cannot be provided to the whole machine software. Therefore, during automatic model integration, the latest model is not necessarily integrated. Instead, the version number of the underlying development model to be integrated is determined based on the total version number of the whole machine software.

[0041] In this embodiment, the model version number includes a major version number, a minor version number, and its hierarchical level. After the underlying development model is uploaded to the hosted repository management system, a version number is automatically generated in the model attributes. The version number extends according to the hierarchical level to which the model belongs. For example, the top-level model would use 01.0_00, where the first digit 01 represents the major version number, .0 represents the minor version number within the major version, and the last digit 00 represents the hierarchical level, with 00 belonging to the top-level level. The preset version number rule can be understood as determining the hierarchical relationship of the model based on the hierarchical level in the model's version number. During model integration, the major version number of the next level should be the same as the major version number of the previous level, and the minor version number of the next level should be lower than or equal to the minor version number of the previous level for automatic integration to occur.

[0042] Specifically, models with the same version number from the collected underlying development models are indexed, and then these models are added to the target folder. Here, "same version number" refers to the version number corresponding to a model that conforms to a preset version numbering rule. This step is equivalent to implementing version management for model integration.

[0043] S102. Match the underlying development model in the target folder with the pre-built command tree to determine the command flow of the target integration model to be integrated.

[0044] Specifically, the target integration model can be understood as the control firmware formed by integrating various underlying development models. The control firmware to be implemented can be denoted as the target integration model. In this embodiment, to implement the target integration model, it is necessary to determine the underlying development models required to construct the target integration model, as well as the command flow and data flow of the target integration model. Each underlying development model has function calls related to the command flow. The command flow refers to the command instructions within the target integration model, which can call function calls. This step is used to determine the command flow of the target integration model to be integrated.

[0045] In this embodiment, a command tree is pre-built based on the target integration model to be integrated. The command tree contains ports that connect to the underlying development models, allowing for connection with the corresponding underlying development models. The underlying development models in the target folder are connected to the command tree to form the command flow of the target integration model. The command tree is represented using hierarchical references, with the lowest level containing the ports that need to connect to the underlying development models. When building the command tree, each port needs to be named and numbered. Similarly, developers need to name and number the interfaces of each underlying development model during development. Since the specific nature of the target integration model is known, the command tree and how it connects to the underlying development models are also known. To ensure that each port of the command tree connects to its corresponding underlying development model, the interface name of each underlying development model is the same as the name of the corresponding port in the command tree. This guarantees that the underlying development model connects to the corresponding port in the command tree.

[0046] Continuing from the above description, after the command tree is constructed, each port in the command tree has a corresponding port name. When there is a newly updated underlying development model in the target folder that needs to be integrated, the new underlying development model in the target folder and each port in the command tree are traversed. The interface of the underlying development model is connected to the port in the command tree with the same port name. Thus, once the command tree is connected to the corresponding underlying development model, the corresponding function in the underlying development model that it calls can be determined, thereby realizing the construction of the command flow of the target integration model.

[0047] In this embodiment, the reference model method from model development is used when constructing the command tree. Taking the modeling tool Simulink as an example, Simulink provides a dedicated component that supports the reference model method. This method allows linking other models within a Simulink model and using their provided inputs, outputs, and variables. Based on Simulink's reference model method, a main framework model can be pre-constructed. This main framework model includes the logical relationships for referencing models at different levels. These hierarchical referencing relationships are obtained based on the analysis of the target integrated model. The main framework model can be represented from top to bottom as a top-level overall model, intermediate reference models, and bottom-level development models. This way, the main framework model contains the logic for referencing models at different levels, while also achieving the same effect of all bottom-level development models running within the same model. The command tree approach allows multiple bottom-level development models to be developed in parallel while maintaining version management according to a single overall model. It should be noted that intermediate reference models can continue to reference other reference models, but reference models cannot reference their own parent models. Through layers of referencing, all underlying development models eventually converge into a single control firmware.

[0048] For example, Figure 3 This is an example diagram illustrating the framework architecture of the entire model in a model integration method provided in Embodiment 1 of the present invention. Figure 3 As shown, analyzing the target integration model can determine the framework architecture of the entire model. According to the top-down referencing relationship, the framework architecture of the entire model includes the top-level overall model 1-3, which can be further decomposed into the first-level referencing model, and the first-level referencing model can be further decomposed into the second-level referencing model. Here, the first-level referencing model and the second-level referencing model are both intermediate referencing models 1-2, and the intermediate referencing model 1-2 can be further decomposed into the bottom-level development model 1-1.

[0049] Continuing from the above description, once several underlying development models are obtained, they are placed in the same folder. Based on the constructed command tree—that is, after setting the reference logic between the top-level overall model 1-3 and the intermediate reference model 1-2, and the reference logic between the intermediate reference model 1-2 and the underlying development model 1-1—the modeling tool (preferably Simulink) will open all intermediate reference models 1-2 and underlying development models 1-1 in the same folder according to the pre-defined logical relationships and import them into the top-level overall model 1-3. The interfaces of the underlying development model 1-1 will be connected to ports with the same port names in the command tree. This completes the construction of the command flow for the target integrated model. Thus, during integration, only the initially designed command tree is needed to automatically integrate the underlying development models uploaded by each developer. The logic of this command tree is remotely managed on a model hosting repository, enabling real-time model integration and updates.

[0050] S103. Construct global variables corresponding to the variables in each underlying development model 1-1, store the global variables in the variable storage area, and determine the data flow of the target integration model based on the global variables to achieve model integration.

[0051] Step S102 above determined the command flow of the target integration model to be integrated. This step is executed after step S102 and is used to construct the data flow of the target integration model. Once the data flow is determined, the integration of the control firmware is completed, and the underlying development model 1-1 is integrated into the target integration model. Here, the data flow refers to the input and output of data in each underlying development model 1-1 in the target integration model.

[0052] Considering that data flow transmission in existing technologies is often achieved manually through connections, data is transferred from one underlying development model 1-1 to the next via data cables. For example, using Simulink modeling, if interface A outputs data and a data cable is set to flow to interface B, data flow is achieved between interfaces A and B. During manual model integration, all data flow transmission is implemented through this connection method. However, the target integrated model is very complex, potentially involving hundreds of underlying development models 1-1 and tens of thousands of connections. A single incorrect connection can lead to extremely difficult program errors. To ensure automatic integration without this manual connection work while still guaranteeing data flow transmission, this embodiment uses global variables set in the variable storage area.

[0053] In this embodiment, a variable storage area is provided, containing global variables. The number of global variables is the same as the total number of variables in the underlying development model 1-1 in the target folder. First, all underlying development models 1-1 in the target folder are traversed to determine which read and write variables each developer has set within their underlying development model. Then, the corresponding global variables are set in the variable storage area. This allows variables from the underlying development models to flow to the corresponding global variables set in the variable storage area. Subsequently, other functional functions in the underlying development model 1-1 retrieve the data from the corresponding global variables in the variable storage area, thus achieving data transmission. It should be noted that these other functional functions can be from the same underlying development model 1-1 or from different underlying development models 1-1. When using these variables, each underlying development model 1-1 can achieve data interaction between different underlying development models 1-1 by using the input or output of global variables, thereby realizing the construction of the data flow in the target integration model. After the data flow is constructed, the automatic integration of the target integration model is achieved.

[0054] Understandably, each developer only needs to specify which variables they want to read and write in their underlying development module. During automatic integration, all these read and write variables will be traversed, and global variables with the same names will be generated in the variable storage area. This solves the data flow connection problem, eliminating the need for manual connections. During each version update, the global variables in the variable storage area are compared with the variables included in the updated underlying development model 1-1. If there are extra global variables in the variable storage area, they can be left as is; if any are missing, they must be added.

[0055] This invention provides a model integration method, which includes: when a completed underlying development model is collected, storing the underlying development model in a target folder according to a preset version number rule; matching the underlying development model in the target folder with a pre-built command tree to determine the command flow of the target integration model to be integrated; constructing global variables corresponding to variables in each underlying development model, storing the global variables in a variable storage area, and determining the data flow of the target integration model based on the global variables to achieve model integration. This technical solution, based on the model referencing method in model development, pre-constructs a command tree; when user-developed underlying development models are collected, models that meet version requirements can be selected, avoiding version management errors that occur during manual integration; the selected underlying development models are then matched with the command tree to construct the command flow; finally, corresponding global variables are constructed based on the variables in the underlying development model, and a data flow is formed based on the read and write status of the global variables, replacing the manual connection method in the prior art, and enabling automatic integration of underlying development models. Compared with the manual integration method in the prior art, this reduces the integration time for R&D personnel, improves integration efficiency, and reduces the integration error rate. At the same time, it lowers the entry requirements for integration engineers and optimizes the company's personnel costs.

[0056] As an optional embodiment of the present invention, based on the above embodiments, the steps for constructing the command tree can be specifically described as follows:

[0057] a1. Analyze the target integration model to be integrated, and determine the underlying development model, intermediate reference model, top-level overall model, and model reference relationships between the various layers required by the target integration model.

[0058] In this embodiment, the target integration model to be integrated is analyzed to determine which algorithm commands it needs to include, and then the target integration model is decomposed hierarchically. The target integration model can be decomposed into a top-level overall model, then into intermediate reference models, and finally into bottom-level development models. While performing this hierarchical decomposition of the target integration model, the reference relationships between the models at each level can be determined.

[0059] b1. Generate the command tree corresponding to the target ensemble model based on the model at each layer and the model reference relationship.

[0060] The command tree contains ports that connect to the underlying development model. Specifically, based on the models at each level and the reference relationships between them, a command tree corresponding to the target integration model is generated. The command tree contains ports that connect to the underlying development model, and each port is named. Since the ports in the command tree are used to connect to the underlying development model, the names of each port in the command tree should be consistent with the interface names of the underlying development model to be connected.

[0061] This optional embodiment specifies the steps for constructing the command tree corresponding to the target integration model. By decomposing the target integration model to be integrated, an overall model framework is generated, and the corresponding command tree is constructed. In this way, during integration, only the command tree corresponding to the initially designed target integration model needs to be used to automatically integrate the underlying development models of each developer. The logic of this command tree can be placed on a model hosting repository for remote management, enabling developers to integrate and update models in real time.

[0062] Example 2

[0063] Figure 4 This is a flowchart illustrating another model integration method provided in Embodiment 2 of the present invention. This embodiment is a further optimization of the above embodiment. In this embodiment, the following is further optimized: "When the completed underlying development model is collected, the underlying development model is stored in the target folder according to the preset version number rule". The following is further optimized: "Match the underlying development model in the target folder with the pre-built command tree to determine the command flow of the target integration model to be integrated". The following is further optimized: "Construct global variables corresponding to the variables in each underlying development model, store the global variables in the variable storage area, and determine the data flow of the target integration model according to the global variables to achieve model integration".

[0064] like Figure 4 As shown, this second embodiment provides a model ensemble method, which specifically includes the following steps:

[0065] S201. When all completed underlying development models are collected, iterate through each underlying development model and obtain the version number of the underlying development model.

[0066] The version number includes a major version number, a minor version number, and the layer it belongs to. Collecting and automatically integrating underlying development models is an ongoing process. Collecting completed underlying development models can be done for the first time when integrating models, or it can be done when a version update is performed, collecting new underlying development models for integration. Specifically, collecting completed underlying development models from multiple developers can be understood as developers submitting their completed underlying development models to the repository management system. The repository management system only manages the modeling model (such as a Simulink model) in terms of time, and cannot manage whether the internal content of the model has changed. Therefore, during the underlying development model upload process, it is necessary to traverse each underlying development model and obtain the version number of each model.

[0067] For example, the top-level model is represented by 01.0_00, where the first digit 01 indicates the major version number, .0 indicates the minor version number within the major version, and the last digit 00 indicates the level to which it belongs. 00 can be set to belong to the top-level level, the next level can be set to 01, and so on.

[0068] S202. Identify the underlying development models with the same major version number as the initial models to be integrated.

[0069] Specifically, when automatically integrating models, version control is required. Major version numbers should be compared first, followed by minor version numbers, and the major version numbers must be equal.

[0070] S203. Determine the version number of the next-level model above the initial model to be integrated, based on the level to which the version number belongs.

[0071] Specifically, this step is used to obtain the version number of the model at the next higher level.

[0072] S204. If the minor version number of the initial model to be integrated is lower than or equal to the minor version number of the model at the next higher level, then the initial model to be integrated will be stored in the target folder.

[0073] Specifically, model integration can only proceed if the minor version number of the next-level model is lower than or equal to the minor version number of the previous-level model. Download the qualified underlying development model from the repository management system and place it in the target folder.

[0074] It should be noted that if the model is being integrated for the first time, only the underlying development model with the same version number needs to be identified for integration. If the model is being updated, it is also necessary to compare the major and minor version numbers at each level. Integration can only proceed if the major version numbers at each level are the same, and the minor version number at the next level is lower than or equal to the minor version number at the previous level.

[0075] S205. Otherwise, do not update the target folder.

[0076] Specifically, if the version number condition mentioned above is not met, the underlying development model will not be indexed, and therefore the target folder will not be updated, and model integration is unnecessary. In this case, feedback regarding the inability to integrate the model can be provided to the user via email or other means.

[0077] S206. Obtain the interface name of the underlying development model and the port name of the command tree in the target folder.

[0078] After completing the model collection, it is necessary to determine how to implement command flow transmission. For the unique structures within all the underlying development models, after uploading the models, the function names of the internal functionalities of the development models are numbered and named. Then, based on the command tree, the command flow is placed in the corresponding positions using name indexing. Specifically, after completing the model collection, the underlying development models and command tree ports in the target folder are first traversed to obtain the interface names of the underlying development models and the port names of the command trees.

[0079] S207. If the interface name and the port name are the same, then connect the underlying development model corresponding to the interface name to the command tree port corresponding to the port name.

[0080] Specifically, the command tree's port names are traversed, and the underlying development model corresponding to the interface name that matches each port name is obtained. If an interface name matches a port name, the underlying development model corresponding to the interface name can be connected to the command tree port corresponding to that port name. This connection can be made by linking add-line functional modules.

[0081] S208. After all the underlying development models are connected to the command tree, determine the command flow of the target integration model.

[0082] Specifically, the underlying development model contains functional functions. When the port of the command tree is connected to the interface of the underlying development model, command scheduling can be realized. Once the command tree is fully connected to the corresponding underlying development model, the command flow is determined.

[0083] S209. Construct global variables corresponding to the variables in each underlying development model, and store the global variables in the variable storage area.

[0084] After implementing the command flow, the next step is to implement the data flow. To implement and ensure the correctness of the data flow, it's necessary to determine which variables are included in the underlying development model. Based on these variables, corresponding global variables should be set and stored in the variable storage area. Underlying development models involving data flow transmission of a specific variable share the same variable; the difference lies only in whether the variable is used as input or output. It can be understood that any combination of the aforementioned underlying development models is equivalent to the input and output of variables involving the same functional function, with functional functions having different structures in parts other than the common components.

[0085] Furthermore, the step of constructing global variables corresponding to the variables in each of the underlying development models and storing the global variables in the variable storage area can be described as follows:

[0086] a2. Traverse the underlying development model to determine the variables contained in the underlying development model.

[0087] Specifically, iterate through the underlying development models to determine the variables contained in each underlying development model. These variables may be variables that the underlying development model needs to read or variables that the underlying development model needs to write.

[0088] b2. Determine if the global variable corresponding to the variable exists in the variable storage area.

[0089] Specifically, the name of each global variable in the variable storage area is iterated through, and then compared with the name of each variable in each underlying development model to determine whether the variable storage area contains the corresponding variable for the underlying development model. In essence, the global variables corresponding to the variables in each underlying development model are sequentially set and stored in the variable storage area.

[0090] c2. If it exists, do not update the variable storage area.

[0091] Specifically, if the global variable corresponding to the variable in the underlying development model already exists in the variable storage area, then the variable storage area will not be updated.

[0092] d2. If it does not exist, then construct the corresponding global variable and store it in the variable storage area.

[0093] Specifically, if there are missing global variables, the missing global variables will be added, and the names of the global variables will be set and stored in the variable storage area.

[0094] e2. Return and continue traversing the next underlying development model until all underlying development models in the target folder have been traversed.

[0095] Specifically, once all underlying development models have been traversed, the corresponding global variables are stored in the variable storage area. When more underlying development models are collected, the corresponding global variables are added.

[0096] S210. Based on the global variables contained in the variable storage area, determine the underlying development model associated with the global variables.

[0097] Specifically, the variable storage area stores global variables that correspond to the variables in the underlying development model. Since each global variable is set according to the variables in the underlying development model, the underlying development model corresponding to the global variable can be determined based on the global variable.

[0098] S211. Based on the input and output of global variables in the associated underlying development model and the data corresponding to the global variables, determine the data flow of the target integration model to achieve model integration.

[0099] In this embodiment, developers set read and write variables when developing the underlying development model. Once the underlying development model associated with the global variable is determined, it can be confirmed that data interaction will occur between these underlying development models. This step implements data interaction between various underlying development models based on global variables, further determining the data flow direction based on the input and output of the global variables in the associated underlying development models. Since the global variables contain data, data transfer can be achieved. After determining the data flow of the target integration model, automatic model integration is then realized.

[0100] For example, Figure 5 This is a schematic diagram illustrating the execution of a model integration method provided in Embodiment 2 of the present invention, as shown below. Figure 5 As shown, the model integration method mainly includes three parts. The first part is the model collection stage. The diagram exemplifies this with underlying development model 1 and underlying development model 2. Underlying development model 1 contains function 1 and function 2, and both contain variable 1. The second part involves connecting the command tree ports to the underlying development models to construct a command flow. These ports connect to the function 1 and function 2 interfaces of underlying development model 1, and the function 3 interface of underlying development model 2. Connections to other ports are not listed. The third part involves setting global variables corresponding to the variables in the underlying development models in the variable storage area, such as variable 1, variable 2, and variable 3. As shown in the diagram, both underlying development model 1 and underlying development model 2 contain variable 1. Data transfer can be achieved by accessing the global variable (variable 1) in the variable storage area. Thus, automatic model integration can be achieved through model collection, command flow transfer, and data flow transfer.

[0101] This embodiment details how to select underlying development models that meet version requirements based on preset version number rules, construct command flows based on a pre-built command tree and the underlying development models, and finally achieve data flow transmission of the models by setting global variables. This realizes automatic model integration, lowers the integration threshold, improves integration development efficiency, and accelerates the model iteration and optimization process. At this point, all underlying development models belong to a single top-level overall model, and different modules do not interfere with each other. Developers working on different modules can upload only their own modules to the code hosting software for version management without having to consider the coupling of other modules. Compared to traditional methods, in this step, integrators need to manually integrate the underlying development models provided by each developer into the top-level overall model, and then upload the top-level overall model to the hosting repository for management. Because it is necessary to pay attention to the version and input / output alignment between each development model, this step is extremely prone to errors such as model version errors and input / output misalignment, which is both labor-intensive and error-prone. The method provided in this embodiment only requires planning the overall architecture of the model in the early stage, and then it can be handed over to the developers for self-management, which is efficient, has a low error rate, and saves labor costs.

[0102] To more clearly illustrate the model integration method provided in this embodiment of the invention, an example of automatically integrating the underlying development model in a practical application scenario will be used for explanation. For example, Figure 6 This is a flowchart illustrating the execution of the model integration method in a certain application scenario provided in Embodiment 2 of the present invention. Figure 6 As shown, the specific execution steps of the model ensemble method include:

[0103] S1. Analyze the target integration model to be integrated to determine the underlying development model, intermediate reference model, top-level overall model, and model reference relationships between each layer required by the target integration model.

[0104] S2. Based on the models at each layer and the model reference relationships, generate the command tree corresponding to the target integrated model. The command tree contains the ports that connect to the underlying development model.

[0105] The above steps are the steps for constructing the command tree, and are steps to be executed in advance.

[0106] S3. When the completed underlying development models are collected, iterate through each underlying development model and obtain the version number of the underlying development model. The version number includes the major version number, minor version number and the level to which it belongs.

[0107] S4. Identify the underlying development models with the same major version number as the initial models to be integrated.

[0108] S5. Based on the version number of the initial model to be integrated, determine the version number of the model at the next higher level.

[0109] S6. If the minor version number of the initial model to be integrated is lower than or equal to the minor version number of the model at the next higher level, then the initial model to be integrated will be stored in the target folder.

[0110] S7. Otherwise, do not update the target folder.

[0111] S8. Obtain the interface name of the underlying development model and the port name of the command tree in the target folder.

[0112] S9. If the interface name and the port name are the same, then connect the underlying development model corresponding to the interface name to the command tree port corresponding to the port name.

[0113] S10. After all the underlying development models are connected to the command tree, determine the command flow of the target integration model.

[0114] S11. Traverse the underlying development model to determine the variables contained in the underlying development model.

[0115] S12. Determine whether the global variable corresponding to the variable exists in the variable storage area. If it exists, proceed to step S13; otherwise, proceed to step S14.

[0116] S13. Do not update the variable storage area.

[0117] S14. Construct the global variable corresponding to the variable and store it in the variable storage area. Return and continue to traverse the next underlying development model until all underlying development models in the target folder have been traversed.

[0118] S15. Based on the global variables contained in the variable storage area, determine the underlying development model associated with the global variables.

[0119] S16. Based on the input and output of global variables in the associated underlying development model and the data corresponding to the global variables, determine the data flow of the target integration model to achieve model integration.

[0120] Example 3

[0121] Figure 7 This is a schematic diagram of a model integration device provided in Embodiment 3 of the present invention. This device is applicable to the automatic integration of underlying development models and can be configured in electronic devices, such as… Figure 7 As shown, the device includes: a model collection module 31, a command flow determination module 32, and a data flow determination module 33; wherein,

[0122] The model collection module 31 is used to store the underlying development model in the target folder according to the preset version number rules when the completed underlying development model is collected.

[0123] Command flow determination module 32 is used to match the underlying development model in the target folder with the pre-built command tree to determine the command flow of the target integration model to be integrated;

[0124] The data flow determination module 33 is used to construct global variables corresponding to the variables in each underlying development model, store the global variables in the variable storage area, and determine the data flow of the target integration model based on the global variables to achieve model integration.

[0125] This invention provides a model integration device, comprising: a model collection module, used to store the collected underlying development models in a target folder according to a preset version number rule; a command flow determination module, used to match the underlying development models in the target folder with a pre-built command tree to determine the command flow of the target integration model; and a data flow determination module, used to construct global variables corresponding to variables in each underlying development model, store the global variables in a variable storage area, and determine the data flow of the target integration model based on the global variables to achieve model integration. This technical solution, based on the model referencing method in model development, pre-builds a command tree; when user-developed underlying development models are collected, models that meet version requirements can be selected, avoiding version management errors that occur during manual integration; the selected underlying development models are then matched with the command tree to construct the command flow; finally, corresponding global variables are constructed based on the variables in the underlying development models, and a data flow is formed based on the read and write status of the global variables, replacing the manual connection method in the prior art and enabling automatic integration of underlying development models. Compared to the manual integration methods used in existing technologies, this reduces the integration time spent by R&D personnel, improves integration efficiency, and lowers the integration error rate. It also lowers the entry requirements for integration engineers, optimizing personnel costs for enterprises.

[0126] Optionally, the device also includes a command tree building module for:

[0127] The target integration model to be integrated is analyzed to determine the underlying development model, intermediate reference model, top-level overall model, and model reference relationships between each layer required by the target integration model.

[0128] Based on the models at each layer and the model reference relationships, a command tree corresponding to the target integrated model is generated. The command tree contains ports that connect to the underlying development model.

[0129] Optional, model collection module, specifically used for:

[0130] Iterate through each underlying development model and obtain the version number of the underlying development model. The version number includes the major version number, minor version number, and the level to which it belongs.

[0131] The underlying development models with the same major version number are identified as the initial models to be integrated.

[0132] Based on the version number of the initial model to be integrated, determine the version number of the model at the next higher level.

[0133] If the minor version number of the initial model to be integrated is lower than or equal to the minor version number of the model at the next higher level, then the initial model to be integrated will be stored in the target folder.

[0134] Otherwise, do not update the target folder.

[0135] Optional, the command flow determination module, specifically used for:

[0136] Obtain the interface name of the underlying development model and the port name of the command tree in the target folder;

[0137] If the interface name and the port name are the same, then connect the underlying development model corresponding to the interface name to the command tree port corresponding to the port name;

[0138] Once the underlying development models are all connected to the command tree, the command flow of the target integration model is determined.

[0139] Optionally, the data flow determination module includes:

[0140] The global variable construction unit is used to construct global variables corresponding to variables in each underlying development model and store the global variables in the variable storage area;

[0141] The model determination unit is used to determine the underlying development model associated with the global variables based on the global variables contained in the variable storage area.

[0142] The data flow determination unit is used to determine the data flow of the target integration model based on the input and output of global variables in the associated underlying development model and the data corresponding to the global variables, so as to achieve model integration.

[0143] Optional, global variable building blocks, specifically used for:

[0144] Traverse the underlying development model to determine the variables contained within it;

[0145] Determine if a global variable corresponding to the variable exists in the variable storage area;

[0146] If it exists, the variable storage area is not updated;

[0147] If it does not exist, then create the corresponding global variable and store it in the variable storage area;

[0148] Return and continue traversing the next underlying development model until all underlying development models in the target folder have been traversed.

[0149] Optionally, the completed underlying development model is collected by the repository management system, and the continuous integration tool triggers the execution of model integration.

[0150] The model integration apparatus provided in this embodiment of the invention can execute the model integration method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0151] Example 4

[0152] Figure 8 This is a schematic diagram of an electronic device according to Embodiment 4 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0153] like Figure 8 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded into the RAM 43 from storage unit 48. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0154] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0155] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as model ensemble methods.

[0156] In some embodiments, the model integration method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the model integration method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the model integration method by any other suitable means (e.g., by means of firmware).

[0157] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0158] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0159] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0160] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0161] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0162] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0163] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0164] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A model ensemble method, characterized in that, include: Once the completed underlying development model is collected, it is stored in the target folder according to the preset version number rules. The underlying development model in the target folder is matched with the pre-built command tree to determine the command flow of the target integration model to be integrated; Construct global variables corresponding to the variables in each of the underlying development models, store the global variables in the variable storage area, and determine the data flow of the target integration model based on the global variables to achieve model integration; The steps for constructing the command tree include: The target integration model to be integrated is analyzed to determine the underlying development model, intermediate reference model, top-level overall model, and model reference relationships between each layer required to integrate the target integration model. Based on the model layers and model reference relationships, a command tree corresponding to the target integrated model is generated, and the command tree contains ports connected to the underlying development model; According to the preset version number rules, the underlying development model is stored in the target folder, including: Iterate through each of the underlying development models and obtain the version number of the underlying development model. The version number includes the major version number, the minor version number, and the level to which it belongs. The underlying development models with the same major version number among the aforementioned version numbers are identified as the initial models to be integrated. Based on the version number of the initial model to be integrated, determine the version number of the model at the next higher level. If the minor version number of the initial model to be integrated is lower than or equal to the minor version number of the model at the next higher level, then the initial model to be integrated will be stored in the target folder. Otherwise, do not update the target folder; The underlying development model in the target folder is matched with a pre-built command tree to determine the command flow of the target integration model to be integrated, including: Obtain the interface name of the underlying development model in the target folder and the port name of the command tree; If the interface name is the same as the port name, then connect the underlying development model corresponding to the interface name to the command tree port corresponding to the port name; Once the underlying development models are all connected to the command tree, the command flow of the target integration model is determined.

2. The method according to claim 1, characterized in that, The process of constructing global variables corresponding to the variables in each of the underlying development models, storing the global variables in a variable storage area, and determining the data flow of the target integration model based on the global variables to achieve model integration includes: Construct global variables corresponding to the variables in each of the underlying development models, and store the global variables in the variable storage area; Based on the global variables contained in the variable storage area, determine the underlying development model associated with the global variables; Based on the input and output of the global variables in the associated underlying development model and the data corresponding to the global variables, the data flow of the target integration model is determined to achieve model integration.

3. The method according to claim 2, characterized in that, The construction of global variables corresponding to the variables in each of the underlying development models, and the storage of the global variables in the variable storage area, includes: Traverse the underlying development model to determine the variables contained in the underlying development model; Determine whether the global variable corresponding to the variable exists in the variable storage area; If it exists, then the variable storage area is not updated; If it does not exist, then construct the global variable corresponding to the variable and store it in the variable storage area; Return and continue traversing the next underlying development model until all underlying development models in the target folder have been traversed.

4. The method according to claim 1, characterized in that, The completed underlying development model is collected by the repository management system, and the continuous integration tool triggers the execution of model integration.

5. A model integration device, characterized in that, For performing the model integration method as described in any one of claims 1-4, comprising: The model collection module is used to store the collected underlying development models into the target folder according to the preset version number rules when the completed underlying development models are collected. The command flow determination module is used to match the underlying development model in the target folder with the pre-built command tree to determine the command flow of the target integration model to be integrated. The data flow determination module is used to construct global variables corresponding to the variables in each of the underlying development models, store the global variables in the variable storage area, and determine the data flow of the target integration model based on the global variables to achieve model integration.

6. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the model integration method according to any one of claims 1-4.

7. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the model integration method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Model integration dispatching system

    CN104021464A

  • MATLAB / Simulink-based method for integrating upper layer logic and bottom layer codes

    CN106980499A