Algorithm model loading method and device, electronic equipment and storage medium

CN116991101BActive Publication Date: 2026-10-16CHINA FAW CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310952654.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2026-10-16
Estimated Expiration
2043-07-31

AI Technical Summary

Technical Problem

[0004]上述按照固定配置顺序加载算法模型方式,会将不需要的算法模型加载到DRAM中,存在占用DRAM存储空间的问题;进一步地,当海量算法模型所用内存大于DRAM内存时,存在不能将所有算法模型加载至DRAM中,带来的部分算法模型无法运行的问题

Benefits of technology

[0038] The algorithm model loading scheme of this invention is applied to an algorithm model loading system. The system includes a business control unit, a data loading unit, and a data storage unit. The business control unit and the data loading unit are respectively located in different CPU cores. Specifically, the business control unit sends a model loading instruction to the data loading unit according to the current business requirements. The model loading instruction includes the target algorithm name. The data loading unit loads the corresponding target algorithm model from the data storage unit into DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model. The scheme provided in this embodiment enables the business control unit and the data loading unit to communicate between cores. By loading the target algorithm model from the data storage unit into DRAM through the data loading unit, the target model can be quickly processed in DRAM. The algorithm model stored in DRAM is the algorithm model loaded according to the business requirements. Compared with the existing method of loading massive models into DRAM for operation, this method saves DRAM storage space and improves model processing speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116991101B_ABST
    Figure CN116991101B_ABST
Patent Text Reader

Abstract

The application discloses an algorithm model loading method and device, electronic equipment and a storage medium, and relates to the computer technology. The method comprises the following steps: a service control unit sends a model loading instruction to a data loading unit according to current service demand, wherein the model loading instruction comprises a target algorithm name; the data loading unit loads a corresponding target algorithm model from a data storage unit to DRAM according to the target algorithm name, so that the service control unit processes the target algorithm model. In the application, the service control unit and the data loading unit perform inter-core communication, and the data loading unit loads the target algorithm model from the data storage unit to the DRAM, so that the target model is quickly processed in the DRAM. The algorithm model stored in the DRAM is an algorithm model loaded according to service demand. Compared with the prior art that loads a large number of models into the DRAM for running, the application saves the DRAM storage space and improves the model processing speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an algorithm model loading method, apparatus, electronic device, and storage medium. Background Technology

[0002] As the complexity of business scenarios (such as autonomous driving scenarios) increases, the number of algorithm models involved in implementing business scenarios based on AI (Artificial Intelligence) algorithms is massive. How to load and run these massive number of algorithm models in an orderly manner is a key issue that needs to be addressed.

[0003] The current method for loading massive algorithm models involves pre-configuring the loading order of these models based on the business implementation process. During actual application, the business system controls the model loading unit to load all the massive algorithm models from the model storage unit into Dynamic Random Access Memory (DRAM) according to the pre-configured loading order. For sub-businesses containing decision logic, all algorithm models associated with the decision logic are loaded into DRAM, and the target algorithm model is selected from the DRAM based on the actual decision result.

[0004] The above method of loading algorithm models in a fixed configuration order will load unnecessary algorithm models into DRAM, which will occupy DRAM storage space. Furthermore, when the memory used by a large number of algorithm models is greater than the DRAM memory, there is a problem that not all algorithm models can be loaded into DRAM, resulting in some algorithm models being unable to run. Summary of the Invention

[0005] This invention provides an algorithm model loading method, apparatus, electronic device, and storage medium, which can improve existing solutions for loading algorithm models.

[0006] In a first aspect, the present invention provides an algorithm model loading method applied to an algorithm model loading system, the system comprising a business control unit, a data loading unit, and a data storage unit, wherein the business control unit and the data loading unit are respectively located in different CPU cores, and the method comprises:

[0007] The business control unit sends a model loading instruction to the data loading unit according to the current business requirements. The model loading instruction includes the target algorithm name.

[0008] The data loading unit loads the corresponding target algorithm model from the data storage unit into the DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model.

[0009] Optionally, a model loading list is stored in the DRAM, the model loading list including at least two algorithm names, each algorithm name being associated according to the business implementation logic order;

[0010] The business control unit sends a model loading instruction to the data loading unit according to the current business requirements, including:

[0011] The business control unit determines the target algorithm name based on the current business requirements and the model loading list;

[0012] The business control unit generates a model loading instruction based on the target algorithm name and sends the model loading instruction to the data loading unit.

[0013] Optionally, before the algorithm models corresponding to at least two algorithm names contained in the model loading list are loaded, the method further includes:

[0014] The system receives an update instruction regarding the logical order of algorithm names that have not been loaded in the model loading list. The update instruction includes at least one of a modification instruction, a deletion instruction, and an addition instruction.

[0015] Optionally, the algorithm model loading system further includes a model calculation unit;

[0016] The business control unit processes the target algorithm model, including:

[0017] Obtain the model category of the target algorithm model;

[0018] When the model category is a judgment category, the operation of the business control unit sending a model loading instruction to the data loading unit according to the current business requirements is repeated.

[0019] When the model category is not the judgment category, the business control unit controls the model calculation unit to calculate the target algorithm model and obtain the model calculation result.

[0020] Optionally, the method further includes:

[0021] After the business control unit receives the loading completion flag of the target algorithm model sent by the data loading unit, it executes the operation of the business control unit controlling the model calculation unit to perform calculations on the target algorithm model.

[0022] Optionally, the business control unit sends a model loading instruction to the data loading unit according to the current business requirements, including:

[0023] When the distance between the vehicle and the lane stop line is less than a preset distance, the weather type is obtained, which includes sunny and rainy days.

[0024] When the weather type is rainy, the business control unit sends a loading instruction to the data loading unit to load the rainy day signal light model;

[0025] When the weather type is sunny, the business control unit sends a loading instruction to the data loading unit to load the sunny weather signal light model.

[0026] Optionally, the method further includes:

[0027] The business control unit loads the linked list according to the model to obtain the logical relationship between each algorithm name;

[0028] When the logical relationship between multiple algorithm names does not include a category judgment, the business control unit sends a model group loading instruction to the model loading instruction, and the model group loading instruction includes at least two algorithm names.

[0029] The data loading unit loads at least two corresponding algorithm models from the data storage unit into the DRAM based on at least two algorithm names.

[0030] Secondly, the present invention provides an algorithm model loading device integrated into an algorithm model loading system, the system comprising a business control unit, a data loading unit, and a data storage unit, wherein the business control unit and the data loading unit are respectively disposed in different CPU cores, and the device comprises:

[0031] The instruction sending module is used by the business control unit to send a model loading instruction to the data loading unit according to the current business requirements. The model loading instruction includes the target algorithm name.

[0032] The model loading module is used by the data loading unit to load the corresponding target algorithm model from the data storage unit into DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model.

[0033] Thirdly, the present invention also provides an electronic device, the electronic device comprising:

[0034] At least one processor; and

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

[0036] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the algorithm model loading method according to any embodiment of the present invention.

[0037] Fourthly, the present invention also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the algorithm model loading method described in any embodiment of the present invention.

[0038] The algorithm model loading scheme of this invention is applied to an algorithm model loading system. The system includes a business control unit, a data loading unit, and a data storage unit. The business control unit and the data loading unit are respectively located in different CPU cores. Specifically, the business control unit sends a model loading instruction to the data loading unit according to the current business requirements. The model loading instruction includes the target algorithm name. The data loading unit loads the corresponding target algorithm model from the data storage unit into DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model. The scheme provided in this embodiment enables the business control unit and the data loading unit to communicate between cores. By loading the target algorithm model from the data storage unit into DRAM through the data loading unit, the target model can be quickly processed in DRAM. The algorithm model stored in DRAM is the algorithm model loaded according to the business requirements. Compared with the existing method of loading massive models into DRAM for operation, this method saves DRAM storage space and improves model processing speed.

[0039] 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

[0040] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating the algorithm model loading method provided by the present invention;

[0042] Figure 2 This is a schematic diagram of the algorithm model loading system provided by the present invention;

[0043] Figure 3 This is another flowchart illustrating the algorithm model loading method provided by the present invention;

[0044] Figure 4 This is another structural schematic diagram of the algorithm model loading system provided by the present invention;

[0045] Figure 5 This is a schematic diagram of the algorithm model loading device provided by the present invention;

[0046] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0047] 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. 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.

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

[0049] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0050] Figure 1This is a flowchart illustrating the algorithm model loading method provided by the present invention. This embodiment is applicable to loading massive numbers of algorithm models in business scenarios. The method can be executed by an algorithm model loading device, which can be implemented in hardware and / or software and can be configured in computer equipment such as servers. The algorithm model loading method provided in this embodiment is applied to an algorithm model loading system. Specifically, refer to... Figure 1 The method may include the following steps:

[0051] S110. The business control unit sends a model loading instruction to the data loading unit according to the current business requirements. The model loading instruction includes the target algorithm name.

[0052] First, please refer to Figure 2 , Figure 2 This is a schematic diagram of the algorithm model loading system provided by the present invention. The algorithm model loading system provided in this embodiment includes a service control unit, a data loading unit, and a data storage unit. The service control unit and the data loading unit are respectively located in different CPU cores. The service control unit and the data loading unit communicate with each other via inter-core communication. The data loading unit and the data storage unit communicate via bus addressing or serial port communication. The data loading unit and the service control unit communicate with the DRAM via memory bus addressing.

[0053] The system includes a business control unit that stores a business control program to enable the business control unit to perform corresponding control functions; a data loading unit that stores a data loading program to enable the data loading unit to perform corresponding loading functions; a dynamic random access memory (DRAM) that stores the algorithm models loaded by the model loading unit so that the loaded algorithm models can be run; and a data storage unit that can be implemented by a non-volatile storage device (e.g., a disk) to store the massive number of algorithm models required to implement the business scenario. Taking an autonomous driving scenario as an example, the massive number of algorithm models included in the autonomous driving scenario can be driving road condition determination models, traffic light status determination models, vehicle acceleration and deceleration control models, and weather determination models, etc. The specific algorithm model loading scheme provided in this embodiment is not limited to the application of autonomous driving scenarios, and the algorithm models required for autonomous driving scenarios are not limited to the examples mentioned above.

[0054] The aforementioned business requirements are used to indicate the current needs in actual business applications. Taking the autonomous driving business scenario as an example, the current business requirements are determined based on the received real-time road scene data during vehicle operation. For example, the current business requirements can be braking requirements, parking requirements, lane changing requirements, and traffic light waiting requirements, etc. Taking the e-commerce business scenario as an example, the current business requirements are determined based on the control commands sent by the user. For example, the current business requirements can be searching for target products, product filtering requirements, order viewing requirements, and product ordering requirements, etc. One business requirement corresponds to one algorithm model.

[0055] The model loading instruction is used to instruct the data loading unit to load the target model in order to fulfill the current business requirements. The model loading instruction includes the target algorithm name. Specifically, each algorithm name can be named according to the corresponding business requirements. Taking the aforementioned autonomous driving business scenario as an example, the corresponding algorithm names could be braking algorithm, parking algorithm, lane changing algorithm, and parking waiting algorithm, etc. Optionally, each algorithm name can also be identified using a combination of numbers, letters, and symbols according to an encoding method. The specific identification method for each algorithm name is not limited here, as long as a unique corresponding target algorithm model can be obtained from the current algorithm name in subsequent steps.

[0056] S120: The data loading unit loads the corresponding target algorithm model from the data storage unit into the DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model.

[0057] The data storage unit stores at least one algorithm model, and each algorithm model contains the program code and algorithm name corresponding to the architecture model. Optionally, when storing each algorithm model in the data storage unit, a model-code mapping table may be included. Based on the model-code mapping table, the target algorithm model corresponding to the target algorithm name can be found. The data loading unit can load the target algorithm model found from the data storage unit into DRAM.

[0058] In this solution, the business control program in the business control unit runs on one processor core, while the model loading program in the data loading unit runs on another processor core. The business control unit and the model loading unit can share DRAM. When the business control unit determines that the target algorithm model has been loaded into DRAM, it can process the loaded target algorithm model. The solution provided in this embodiment can instruct the data loading unit to load a specific algorithm model at any time according to the business needs of the current business scenario. The advantage of this setting is that it enables the algorithm model loading method to be dynamically loaded according to the current business needs, making the model loading method more flexible and improving loading efficiency. Furthermore, the algorithm models stored in DRAM are the actual algorithm models used to implement the business, and there is no situation where the loaded model is not used, thus improving the storage efficiency of DRAM.

[0059] The service control unit can determine that the target algorithm model has been loaded into DRAM by generating a loading completion flag after the target algorithm model is loaded. If the service control unit obtains the loading completion flag, it can determine that the target algorithm model has been loaded and can perform processing operations on the target algorithm model. If no loading completion flag is generated, the service control unit can wait until a loading completion flag is generated. Optionally, the loading completion flag can be indicated by generating a "complete" instruction code if loading is complete, or by using "1". The specific representation of the loading completion flag is not limited here.

[0060] The business control unit can process the target algorithm model in several ways, such as determining whether to load the next algorithm model based on the currently loaded target algorithm model, or performing calculations on the current algorithm model. For example, if the target algorithm model is a judgment model related to the current requirement, then the business control unit needs to continue loading the algorithm model corresponding to the actual judgment result, and can send a model loading instruction to the data loading unit. If the target algorithm model is not a judgment model, then the target algorithm model needs to be solved to obtain the model settlement result, and then the next algorithm model to be loaded can be determined based on the settlement result and the current actual scenario. The specific method by which the business control unit processes the target algorithm model is not limited here.

[0061] The algorithm model loading method provided in this embodiment is applied to an algorithm model loading system. The system includes a business control unit, a data loading unit, and a data storage unit. The business control unit and the data loading unit are respectively located in different CPU cores. Specifically, the business control unit sends a model loading instruction to the data loading unit according to the current business requirements. The model loading instruction includes the target algorithm name. The data loading unit loads the corresponding target algorithm model from the data storage unit into DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model. The solution provided in this embodiment enables the business control unit and the data loading unit to communicate between cores. By loading the target algorithm model from the data storage unit into DRAM through the data loading unit, the target model can be quickly processed in DRAM. The algorithm model stored in DRAM is the algorithm model loaded according to the business requirements. Compared with the existing method of loading massive models into DRAM for operation, this method saves DRAM storage space and improves model processing speed.

[0062] Figure 3 This is another flowchart illustrating the algorithm model loading method provided by the present invention. The relationship between this embodiment and the above embodiments further refines the corresponding features of the above embodiments. Figure 3 As shown, the method may include the following steps:

[0063] S210. The business control unit determines the target algorithm name based on the current business requirements and the model loading list.

[0064] The model loading list is stored in DRAM. The model loading list includes at least two algorithm names, and each algorithm name is associated with the order of business implementation logic.

[0065] In this scheme, through the DRAM sharing mechanism, both the business control unit and the data loading unit can obtain the contents stored in the model loading list. In the model loading list, each algorithm name is associated according to the business implementation logic order. For example, the algorithm names contained in the model loading list are Model A, Model B, Model C, and Model D, etc. In actual business requirements, the model implementation logic order can be Model A-Model B-Model C or Model D. Therefore, each algorithm name can be pre-associated according to the current business implementation logic order. The advantage of doing so is that it makes it easier for the business control unit to know the next algorithm model to be loaded.

[0066] The business control unit determines the target algorithm name based on the current business requirements and the model loading list in the following ways: For example, when a vehicle is driving on the road, the vehicle controller knows from the pre-loaded driving map that there are traffic lights ahead. The current business requirement can be to process the traffic lights. Furthermore, based on the pre-determined vehicle driving logic order in the model loading list, the current target algorithm name can be determined to be the traffic light processing algorithm.

[0067] Optionally, in addition to the name of each algorithm, the model loading list may also contain information such as the offset of each model, the memory size occupied by the model, and whether it has been loaded. The specific information contained in the model loading list is not limited here.

[0068] S211. The business control unit generates a model loading instruction based on the target algorithm name and sends the model loading instruction to the data loading unit.

[0069] In one implementation, the solution provided in this embodiment further includes the following method before the algorithm models corresponding to at least two algorithm names in the model loading linked list are loaded:

[0070] Receive update instructions for the logical order of algorithm names that have not been loaded in the model loading list. Update instructions include at least one of modification instructions, deletion instructions, and addition instructions.

[0071] For the massive number of algorithm models required to implement business scenarios, if the algorithm model corresponding to the algorithm name in the model loading list is not loaded, the logical order between the unloaded algorithm names can be updated so that the model loading list can be adjusted according to actual needs.

[0072] The update instructions include at least one of modification instructions, deletion instructions, and addition instructions. The model loading list will modify, delete, or add the implementation logic order between the pre-associated algorithm names according to the actual meaning indicated by the update instructions.

[0073] It should be noted that when the update instruction is an add instruction, it indicates that an algorithm model name needs to be added to the model loading list and logically associated. In this case, the data storage unit must contain the actual algorithm model corresponding to the added algorithm model name so that the loading operation of the added algorithm model can be realized based on the added algorithm model name.

[0074] S220: The data loading unit loads the corresponding target algorithm model from the data storage unit into the DRAM according to the target algorithm name.

[0075] S230. Obtain the model category of the target algorithm model.

[0076] The model categories provided in this embodiment may include judgment categories and other categories. The purpose of determining the model category is to facilitate the determination of how the business control unit processes the target algorithm model in subsequent steps.

[0077] Among them, the judgment category indicates that the target algorithm model is a judgment logic, which needs to determine the next algorithm model to be loaded based on the actual data; other categories indicate the specific algorithm model, which is used in subsequent steps to calculate the algorithm model and obtain the calculation result.

[0078] Please refer to Figure 4 , Figure 4 This is another structural schematic diagram of the algorithm model loading system provided by the present invention. The algorithm model loading system provided in this embodiment also includes a model calculation unit. The model calculation unit stores a model calculation program to implement the corresponding inference operation functions of the model calculation unit based on the model calculation program.

[0079] The model calculation unit communicates with the DRAM via bus addressing, and the model calculation unit is connected to the service control unit via bus or serial port. The service control unit can control the model calculation unit to perform calculations on the algorithm model loaded in the DRAM to obtain the calculation results of the model.

[0080] S231. Determine whether the model category of the target algorithm model is a judgment category.

[0081] If so, the business control unit returns to execution step S210 based on the current business result.

[0082] If not, proceed to step S240.

[0083] In another optional embodiment, the solution provided in this embodiment further includes: the business control unit obtains the logical relationship between each algorithm name according to the model loading linked list; when the logical relationship between multiple algorithm names does not include the judgment category, the business control unit sends a model group loading instruction to the model loading instruction, the model group loading instruction including at least two algorithm names; the data loading unit loads at least two corresponding algorithm models from the data storage unit into DRAM according to the at least two algorithm names.

[0084] The current embodiment can be understood as follows: if the logical relationship between multiple algorithm names includes a judgment category, then the next algorithm model to be loaded needs to be determined according to the actual judgment result of the judgment category. For algorithm models where the logical relationship between multiple algorithm names includes a judgment category, the business control unit sends a model group loading instruction to the model loading instruction so that the data loading unit loads the algorithm models corresponding to at least two algorithm names contained in the model group loading instruction into DRAM. The advantage of doing this is that, under the condition that the logical order remains unchanged, the business control unit does not need to send the model loading instruction to the data loading unit multiple times, which can improve the model loading efficiency.

[0085] The improved solution in this embodiment allows the business control unit to flexibly decide, based on business needs, whether to continuously load a series of model groups or select the next algorithm model from the calculation results of the current algorithm model. The model loading program provides a general and flexible unified interface for the business through the model loading linked list of models to be loaded, which can load a group of algorithm models in a sequential list or load a single algorithm model.

[0086] S240. After the business control unit receives the loading completion flag of the target algorithm model sent by the data loading unit, the business control unit controls the model calculation unit to calculate the target algorithm model.

[0087] The loading completion flag is a notification sent by the data loading unit indicating whether the target algorithm model has been successfully loaded. Only after receiving this loading completion flag can the model computation unit perform computations on the target algorithm model in DRAM.

[0088] In a practical application scenario, the business control unit sends a model loading instruction to the data loading unit based on current business requirements, including:

[0089] When the distance between the vehicle and the lane stop line is less than a preset distance, the weather type is obtained, which includes sunny and rainy weather. When the weather type is rainy, the business control unit sends a loading instruction to the data loading unit to load the rainy traffic light model. When the weather type is sunny, the business control unit sends a loading instruction to the data loading unit to load the sunny traffic light model.

[0090] This embodiment uses the example of loading a traffic light model corresponding to a specific weather type based on weather conditions to illustrate the situation. For instance, in a current autonomous driving scenario, the traffic light monitoring model includes rainy and sunny traffic light models. Before determining whether the current weather type is rainy or sunny, the existing method of loading models into DRAM in a fixed order loads both rainy and sunny traffic light models into DRAM. It then combines this with a weather judgment model to determine the actual weather type the vehicle is currently experiencing. If the actual weather type is determined to be rainy, the loaded rainy traffic light model is used for calculation, while the sunny traffic light model is not used. Assume that both the rainy and sunny traffic light models require a large amount of memory, such as 5GB, but other algorithm models also require a total of 4GB. However, due to project cost constraints, only 8GB of DRAM is configured. This results in insufficient memory.

[0091] According to the solution provided in this embodiment, the weather type can be obtained when the vehicle is at a preset distance (e.g., 100 meters) from the traffic light. The current method for obtaining the weather type is as follows: the business control unit sends an instruction to the data loading unit to load a weather type algorithm model. Once the weather type algorithm model is loaded, environmental data obtained during vehicle operation can be input to determine the target weather type of the current actual environment. If the target weather type is determined to be rainy, the business control unit sends an instruction to the data loading unit to load a rainy traffic light model; if the target weather type is determined to be sunny, the business control unit sends an instruction to the data loading unit to load a sunny traffic light model. In this example, the algorithm model can be dynamically loaded according to business needs, allowing the corresponding algorithm model to be used in both sunny and rainy weather. The business control unit can flexibly control the data loading unit to load algorithm models according to current business requirements. Furthermore, the process of controlling the data loading unit to load one algorithm model and the process of controlling the model calculation unit to calculate another algorithm model can run in parallel, fully utilizing the parallel processing of different cores and system software in a multi-core system to improve operating efficiency.

[0092] The algorithm model loading method provided in this embodiment involves a business control program in the business control unit running on one processor core and a model loading program in the data loading unit running on another processor core. By sharing DRAM, a model loading linked list is stored in the DRAM. The business control unit can instruct the data loading unit to load specific models according to actual needs, achieving the effect of flexibly loading algorithm models based on actual requirements. Furthermore, the logical relationships between each algorithm name are obtained through the model loading linked list. When the logical relationships between multiple algorithm names do not include category judgment, the business control unit sends a model group loading instruction to the model loading instruction. This allows the business control unit to flexibly decide, based on business needs, whether to continuously load a series of model groups or select the next algorithm model from the calculation results of the current algorithm model, thereby improving model loading efficiency.

[0093] Figure 5 This is a schematic diagram of an algorithm model loading device provided by the present invention. This device is suitable for executing the method integrated into the algorithm model loading system provided in this embodiment. The device can be integrated into the algorithm model loading system, which includes a business control unit, a data loading unit, and a data storage unit. The business control unit and the data loading unit are respectively located in different CPU cores. Specifically, the device may include: an instruction sending module 310 and a model loading module 320, wherein:

[0094] Instruction sending module 310 is used for the business control unit to send a model loading instruction to the data loading unit according to the current business requirements, wherein the model loading instruction includes the target algorithm name;

[0095] The model loading module 320 is used by the data loading unit to load the corresponding target algorithm model from the data storage unit into DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model.

[0096] The algorithm model loading device of this invention is applied to an algorithm model loading system. The system includes a business control unit, a data loading unit, and a data storage unit. The business control unit and the data loading unit are respectively located in different CPU cores. Specifically, the business control unit sends a model loading instruction to the data loading unit according to the current business requirements. The model loading instruction includes the target algorithm name. The data loading unit loads the corresponding target algorithm model from the data storage unit into DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model. The solution provided in this embodiment uses inter-core communication between the business control unit and the data loading unit to load the target algorithm model from the data storage unit to the data loading unit. This allows the target model to be processed quickly in DRAM. The algorithm model stored in DRAM is the algorithm model loaded according to the business requirements. Compared with the existing method of loading massive models into DRAM for operation, this method saves DRAM storage space and improves model processing speed.

[0097] In one embodiment, a model loading list is stored in the DRAM, the model loading list including at least two algorithm names, each algorithm name being associated according to the business implementation logic order;

[0098] The instruction sending module 310 includes: a name determination unit and an instruction sending unit, wherein:

[0099] A name determination unit is used by the business control unit to determine the target algorithm name based on the current business requirements and the model loading list;

[0100] The instruction sending unit is used by the business control unit to generate a model loading instruction based on the target algorithm name and send the model loading instruction to the data loading unit.

[0101] In one embodiment, the apparatus further includes: an instruction receiving module, wherein:

[0102] The instruction receiving module is used to receive an update instruction for the logical order of algorithm names that have not been loaded in the model loading list. The update instruction includes at least one of the following: a modification instruction, a deletion instruction, and an addition instruction.

[0103] In one embodiment, the algorithm model loading system further includes a model calculation unit; the device further includes a model processing module, wherein:

[0104] The model processing module is used to obtain the model category of the target algorithm model; when the model category is a judgment category, the operation of the business control unit sending a model loading instruction to the data loading unit according to the current business requirements is repeatedly executed; when the model category is not a judgment category, the business control unit controls the model calculation unit to calculate the target algorithm model and obtain the model calculation result.

[0105] In one embodiment, the method further includes an identifier receiving module, wherein:

[0106] The identifier receiving module is used for the business control unit to receive the loading completion identifier of the target algorithm model sent by the data loading unit.

[0107] In one embodiment, the instruction sending module 310 is specifically used to obtain the weather type when the interval between the vehicle and the lane stop line is less than a preset distance, the weather type including sunny and rainy; when the weather type is rainy, the service control unit sends a loading instruction for loading the rainy traffic light model to the data loading unit; when the weather type is sunny, the service control unit sends a loading instruction for loading the sunny traffic light model to the data loading unit.

[0108] In one embodiment, the apparatus further includes: a relationship acquisition module, wherein:

[0109] The relationship acquisition module is used by the business control unit to load a linked list based on the model to obtain the logical relationship between each algorithm name;

[0110] The instruction sending module is also used to send a model group loading instruction to the model loading instruction when the logical relationship between multiple algorithm names does not include a judgment category. The model group loading instruction includes at least two algorithm names.

[0111] The model loading module is also used by the data loading unit to load at least two corresponding algorithm models from the data storage unit into DRAM based on at least two algorithm names.

[0112] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is merely an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0113] The present invention also provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable 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 execute the algorithm model loading method described in any embodiment of the present invention.

[0114] The present invention also provides a computer-readable medium storing computer instructions that, when executed by a processor, implement the algorithm model loading method described in any embodiment of the present invention.

[0115] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing the electronic device of the present invention. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of this embodiment.

[0116] like Figure 6 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0117] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.

[0118] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined above in the system of this invention.

[0119] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present 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 indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0121] The modules and / or units described in this embodiment can be implemented in software or hardware. The described modules and / or units can also be located in a processor; for example, a processor can be described as including an instruction sending module and a model loading module. The names of these modules do not necessarily limit the module itself.

[0122] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: a business control unit sending a model loading instruction to a data loading unit according to current business requirements, the model loading instruction including a target algorithm name; the data loading unit loading a corresponding target algorithm model from the data storage unit into DRAM according to the target algorithm name, so that the business control unit processes the target algorithm model.

[0123] According to the technical solution of this embodiment, the business control unit and the data loading unit communicate with each other. The target algorithm model is loaded from the data storage unit into the DRAM by the data loading unit, so that the target model can be processed quickly in the DRAM. The algorithm model stored in the DRAM is the algorithm model that has been loaded according to the business requirements. Compared with the existing method of loading a large number of models into the DRAM for operation, this method has the beneficial effects of saving DRAM storage space and improving the model processing speed.

[0124] 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 occur depending on 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 method for loading an algorithm model, characterized in that, An algorithm model loading system is applied, comprising a business control unit, a data loading unit, a data storage unit, and a model calculation unit. The business control unit and the data loading unit are respectively located in different CPU cores. The business control unit and the data loading unit communicate with each other via inter-core communication. The data loading unit and the data storage unit communicate via bus addressing or serial communication. The business control unit and the data loading unit communicate with DRAM via memory bus addressing. The method includes: The business control unit sends a model loading instruction to the data loading unit according to the current business requirements; wherein, the model loading instruction includes the target algorithm name; the current business requirements are determined based on the real-time road scene data received during vehicle operation; The data loading unit loads the corresponding target algorithm model from the data storage unit into the DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model; wherein, the DRAM stores a model loading linked list; the model loading linked list includes at least two algorithm names, and each algorithm name is associated according to the business implementation logic order; The process of the business control unit sending a model loading instruction to the data loading unit according to the current business requirements includes: the business control unit determining the target algorithm name based on the current business requirements and the model loading linked list; the business control unit generating a model loading instruction based on the target algorithm name and sending the model loading instruction to the data loading unit. The business control unit processes the target algorithm model, including: obtaining the model category of the target algorithm model; when the model category is a judgment category, repeatedly executing the operation of the business control unit sending a model loading instruction to the data loading unit according to the current business requirements; when the model category is not a judgment category, the business control unit controls the model calculation unit to calculate the target algorithm model and obtain the model calculation result.

2. The algorithm model loading method according to claim 1, characterized in that, Before the algorithm models corresponding to at least two algorithm names contained in the model loading list are loaded, the method further includes: The system receives an update instruction regarding the logical order of algorithm names that have not been loaded in the model loading list. The update instruction includes at least one of a modification instruction, a deletion instruction, and an addition instruction.

3. The algorithm model loading method according to claim 1, characterized in that, The method further includes: After the business control unit receives the loading completion flag of the target algorithm model sent by the data loading unit, it executes the operation of the business control unit controlling the model calculation unit to perform calculations on the target algorithm model.

4. The algorithm model loading method according to claim 1, characterized in that, The business control unit sends a model loading instruction to the data loading unit according to the current business requirements, including: When the distance between the vehicle and the lane stop line is less than a preset distance, the weather type is obtained, which includes sunny and rainy days. When the weather type is rainy, the business control unit sends a loading instruction to the data loading unit to load the rainy day signal light model; When the weather type is sunny, the business control unit sends a loading instruction to the data loading unit to load the sunny weather signal light model.

5. The algorithm model loading method according to claim 1, characterized in that, The method further includes: The business control unit loads the linked list according to the model to obtain the logical relationship between each algorithm name; When the logical relationship between multiple algorithm names does not include a category judgment, the business control unit sends a model group loading instruction to the model loading instruction, and the model group loading instruction includes at least two algorithm names. The data loading unit loads at least two corresponding algorithm models from the data storage unit into the DRAM based on at least two algorithm names.

6. An algorithm model loading device, characterized in that, An algorithm model loading system is integrated into the system, which includes a business control unit, a data loading unit, a data storage unit, and a model calculation unit. The business control unit and the data loading unit are respectively located in different CPU cores. The business control unit and the data loading unit communicate with each other via inter-core communication. The data loading unit and the data storage unit communicate via bus addressing or serial port communication. The business control unit and the data loading unit communicate with DRAM via memory bus addressing. The device includes: The instruction sending module is used by the business control unit to send a model loading instruction to the data loading unit according to the current business requirements; wherein, the model loading instruction includes the target algorithm name; the current business requirements are determined based on real-time road scene data received during vehicle operation; A model loading module is used by the data loading unit to load the corresponding target algorithm model from the data storage unit into DRAM according to the target algorithm name, so that the business control unit can process the target algorithm model; wherein, the DRAM stores a model loading linked list; the model loading linked list includes at least two algorithm names, and each algorithm name is associated according to the business implementation logic order; The instruction sending module includes a name determination unit and an instruction sending unit; The name determination unit is used by the business control unit to determine the target algorithm name based on the current business requirements and the model loading list; The instruction sending unit is used by the business control unit to generate a model loading instruction based on the target algorithm name and send the model loading instruction to the data loading unit; The model processing module is used to: obtain the model category of the target algorithm model; when the model category is a judgment category, repeatedly execute the operation of the business control unit sending a model loading instruction to the data loading unit according to the current business requirements; when the model category is not a judgment category, the business control unit controls the model calculation unit to calculate the target algorithm model and obtain the model calculation result.

7. An electronic device, characterized in that, The electronic device includes: At least one processor; and 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, the computer program being executed by the at least one processor to enable the at least one processor to perform the algorithm model loading method according to any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the algorithm model loading method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Model management method and device, computer equipment and storage medium

    CN113176906A