Contrast test configuration method of inference engine and related equipment

By defining the comparison test configuration logic and multiple sets of model data in the model file, the comparison test configuration of the inference engine is realized, which solves the efficiency problem of the deployment of the terminal device-side neural network model, and reduces the cost of compatible configuration, and realizes the stable coexistence of new and old versions of code.

CN120216002APending Publication Date: 2025-06-27BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311813456.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

How to efficiently complete the deployment of neural network algorithm models on the terminal device side, especially in the optimization iteration of the inference engine, to ensure the stability of iteration and reduce the cost of compatible configuration.

Method used

By defining the control test configuration logic and multiple sets of model data in the model file, the control test configuration of the inference engine is realized. The method includes receiving a model file, determining whether the control test configuration information has been received, determining the model data to be deployed based on the control test configuration logic, and creating an inference engine based on the data.

Benefits of technology

It realizes that without increasing the complexity of the code, ensures that the new and old versions of the code exist at the same time, reduces the caller's compatibility configuration cost, and improves the creation efficiency of the inference engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216002A_ABST
    Figure CN120216002A_ABST
Patent Text Reader

Abstract

The invention provides a contrast test configuration method for an inference engine. The contrast test configuration method comprises the following steps: receiving a model file corresponding to a to-be-created inference engine; wherein the model file comprises contrast test configuration logic and at least one group of model data; in response to determining to create the inference engine, determining whether contrast test configuration information is received; in response to determining that the contrast test configuration information is not received, determining model data to be deployed based on the contrast test configuration logic; in response to determining that the contrast test configuration information has been received, determining model data to be deployed based on the contrast test configuration information and the contrast test configuration logic; and creating an inference engine based on the to-be-deployed model data. The invention further provides a contrast test configuration device of the inference engine, electronic equipment, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and particularly to a method for configuring a control test of an inference engine and related devices. Background Art

[0002] Neural network algorithm models (hereinafter simply referred to as network models) mainly based on deep learning have gradually become the mainstream direction in daily computer technology applications and are increasingly used in various applications. For example, face recognition, intelligent voice, and customer service robots in various industries are all specific implementation applications of various network models. Similar to other software technologies in terms of specific implementation applications, network models also need to be specifically deployed on the hardware devices that execute the above network models and create corresponding inference engines before implementation. Therefore, how to complete the deployment of neural network algorithm models on the terminal device side is one of the hot issues in the application of neural network algorithm models currently. Summary of the Invention

[0003] In view of this, an embodiment of the present disclosure provides a method for configuring a control test of an inference engine, which can efficiently complete the deployment of a network model on the terminal device side.

[0004] The method for configuring a control test of an inference engine according to an embodiment of the present disclosure includes: receiving a model file corresponding to an inference engine to be created; wherein the model file includes control test configuration logic and at least one set of model data; in response to determining to create an inference engine, determining whether control test configuration information is received; in response to determining that the control test configuration information is not received, determining the model data to be deployed based on the control test configuration logic; in response to determining that the control test configuration information has been received, determining the model data to be deployed based on the control test configuration information and the control test configuration logic; and creating an inference engine based on the model data to be deployed.

[0005] In an embodiment of the present disclosure, the control test configuration logic is used to define which set of model data among the at least one set of model data to create an inference engine when the control test configuration information is not received; and which set of model data among the at least one set of model data to create an inference engine corresponding to the control test configuration information after the control test configuration information is received.

[0006] In an embodiment of the present disclosure, the control test configuration logic is written using macro code.

[0007] In an embodiment of the present disclosure, the above method further includes: forming a basic macro code of the model file from the at least one set of model data.

[0008] In an embodiment of the present disclosure, the above method further includes: in response to determining that a caller calls the inference engine for the first time, determining to create the inference engine.

[0009] In an embodiment of the present disclosure, the above method further includes: in response to determining that the caller calls the inference engine for the first time after receiving the control test configuration information, determining to create the inference engine.

[0010] In an embodiment of the present disclosure, determining the model data to be deployed based on the control test configuration logic includes: determining the model data to be deployed based on which set of the at least one set of model data to create an inference engine without receiving the control test configuration information as defined by the control test configuration logic.

[0011] In an embodiment of the present disclosure, determining the model data to be deployed based on the control test configuration information and the control test configuration logic includes: determining the model data to be deployed based on which set of the at least one set of model data to create an inference engine corresponding to the control test configuration information as defined by the control test configuration logic.

[0012] In an embodiment of the present disclosure, creating an inference engine based on the model data to be deployed includes: conditionally compiling the basic macro code based on the control test configuration logic to obtain a compiled execution file; and executing the execution file.

[0013] Based on the above control test configuration method of the inference engine, an embodiment of the present disclosure further provides a control test management device for an inference engine, including:

[0014] A file receiving module, configured to receive a model file corresponding to an inference engine to be created; wherein, the model file includes control test configuration logic and at least one set of model data;

[0015] A configuration information determination module, configured to determine whether control test configuration information is received in response to determining to create an inference engine;

[0016] A model data determination module, configured to determine the model data to be deployed based on the control test configuration logic in response to determining that the control test configuration information is not received; or, in response to determining that the control test configuration information has been received, determining the model data to be deployed based on the control test configuration information and the control test configuration logic; and

[0017] An inference engine creation module, creating an inference engine based on the model data to be deployed.

[0018] In addition, an embodiment of the present disclosure further provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, the above-mentioned control test configuration method of the inference engine is implemented.

[0019] An embodiment of the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the above-mentioned control test configuration method of the inference engine.

[0020] An embodiment of the present disclosure further provides a computer program product including computer program instructions, which when running on a computer, cause the computer to execute the above-mentioned control test configuration method of the inference engine.

[0021] In the above-mentioned control test configuration method of the inference engine and related devices, by defining the control test configuration logic in the model file and defining multiple sets of model data, the control test configuration of the inference engine can be realized, so that the deployment of the network model on the terminal device side can be efficiently completed. Further, the above method can ensure the coexistence of the new and old version codes for creating the inference engine while not increasing the code complexity. Moreover, in the above model file, the conditional switching of the new and old version codes of the inference engine can be completed without excessive code logic. In addition, for the service layer, the control test configuration method of the inference engine provided by the embodiments of the present disclosure can provide a unique global call entry for multiple callers, thereby reducing the compatible configuration cost of the callers. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only the embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0023] Figure 1 Shows an application scenario of the inference engine described in the embodiments of the present disclosure;

[0024] Figure 2 Shows another application scenario of the inference engine described in the embodiments of the present disclosure;

[0025] Figure 3 Shows the implementation process of the control test configuration method of the inference engine described in the embodiments of the present disclosure;

[0026] Figure 4 Shows a specific application scenario of the control test configuration method of the inference engine described in the embodiments of the present disclosure;

[0027] Figure 5 shows an example of a model file according to an embodiment of the present disclosure;

[0028] Figure 6 shows the internal structure of a control test management device of an inference engine according to some embodiments of the present disclosure;

[0029] Figure 7 shows a more specific schematic diagram of the hardware structure of an electronic device according to some embodiments of the present disclosure. Detailed implementation manners

[0030] To make the objectives, technical solutions and advantages of the present disclosure more clear and understandable, the present disclosure will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0031] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the ordinary meanings understood by those of ordinary skill in the art to which the present disclosure belongs. The "first", "second" and similar terms used in the embodiments of the present disclosure do not denote any order, quantity or importance, but are only used to distinguish different components. The terms such as "comprising" or "including" mean that the elements or objects appearing before this term cover the elements or objects listed after this term and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left" and "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0032] It can be understood that, before using the technical solutions of the various embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner and the user's authorization will be obtained.

[0033] For example, when responding to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be executed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium that executes the operations of the technical solutions of the present disclosure according to the prompt message.

[0034] As an optional but non-limiting implementation manner, in response to receiving an active request from a user, the manner of sending a prompt message to the user may be, for example, a pop-up window manner, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0035] It can be understood that the above notification and user authorization acquisition process is only illustrative and does not constitute a limitation on the implementation manner of the present disclosure. Other manners that comply with relevant laws and regulations can also be applied to the implementation manner of the present disclosure.

[0036] As mentioned above, how to complete the deployment of the neural network algorithm model on the terminal device side is one of the hot issues in the application of the neural network algorithm model currently. At present, the inference engine is a component responsible for logical reasoning and inference. The application of the inference engine ensures that the neural network algorithm model can run on different terminals and different systems. On the other hand, as an independent system, the inference engine also needs to be independently iteratively upgraded. However, due to the variety of platforms and the complexity of model scenarios, as a sub-module of an application, the optimization iteration of the inference engine, even a minor modification, will affect the performance of the application. Therefore, in order to ensure the stability of the iteration and facilitate the recovery of benefits, the inventor found that the controlled test can be considered to be applied to the optimization of the inference engine. Among them, the controlled test usually refers to setting two or more versions for the web page or the interface or process of the application in the application of the Internet. In the same time dimension, similar customer groups are respectively allowed to access the above two or more versions, and then the user experience data and business data of each customer group are collected. Finally, the optimal version is evaluated through significance test analysis. The above controlled test can also be called AB test or A / B Test. It can be seen that based on the above controlled test, through experimental comparison, data-driven can be established, the product can be continuously optimized, and the release risk of new products and new features can also be reduced. In the above application scenario of applying the controlled test to the optimization of the inference engine, how to complete the controlled test configuration of the inference engine is one of the difficult problems to be solved.

[0037] Figure 1 Shows an application scenario of the inference engine described in the embodiment of the present disclosure. As Figure 1As shown, when a user on the terminal device 110 side opens an application and invokes a function implemented based on a network model in the above application. For example, when the user selects to perform a stylization process on the selected image (assuming that the above stylization function is implemented based on a stylization model), if an inference engine corresponding to the above network model has not been created on the terminal device 110 side, it is necessary to first complete the deployment of the above network model on the terminal device 110 side to create a corresponding inference engine in the application. To complete the creation of the inference engine, first, the application on the terminal device 110 usually requests the server device 120 to load the above network model; the server device 120 feeds back the model file corresponding to the inference engine to be created to the terminal device 110; after receiving the model file, the application on the terminal device 110 creates a corresponding inference engine based on the received model file. Since the above model file usually refers to a piece of code related to the inference engine to be created, the process of creating the inference engine usually also includes operations such as compiling the model file and executing the compiled executable file. After completing the creation of the inference engine, the inference engine can be initialized based on actual requirements and further invoked for inference, that is, to implement the function of the network model. During the execution of the application, when the inference engine needs to be optimized, the server device 120 can send the optimized model file to the terminal device 110, and then the application in the terminal device 110 re-creates the inference engine to complete the optimization of the inference engine. As mentioned above, if the control test is applied to the optimization of the inference engine, it can facilitate the recovery of benefits while ensuring the stability of the optimization iteration of the inference engine.

[0038] However, since the inference engine is usually designed with multiple instances, and there are multiple callers and various call methods at the same time. In this way, if the interface layer is changed during the iteration of the inference engine, it will cause the callers to spend a large amount of cost on compatibility configuration. In addition, the inference engine also contains a variety of operators, and the implementation logic of the operators is complex, and it needs to support multiple platforms, multiple systems, and multiple types. The basis of the control test requires ensuring the coexistence of the new and old version codes, which further increases the code complexity.

[0039] To solve the above problems, the embodiments of the present disclosure provide a method for configuring a control test of an inference engine, which can efficiently complete the deployment of a network model on the terminal device side. Specifically, the above method for configuring a control test of an inference engine can implement the control test configuration of the inference engine, ensure the coexistence of the new and old version codes without increasing the code complexity, and provide a unique global call entry for multiple callers, thereby reducing the compatibility configuration cost of the callers.

[0040] To achieve the above goal, a control test management module is added to the application on the terminal device 110, such as Figure 2As shown. In an embodiment of the present disclosure, the above-mentioned control test management module is used to receive control test configuration information from the server device 120 from the application, and create an inference engine based on the received control test configuration information.

[0041] It should be noted that, in some embodiments, the above-mentioned control test management module is a static management module, which is the only instance in the life cycle of the above-mentioned application and also the only configuration entry for control test configuration information.

[0042] It can be seen that by adding the above-mentioned control test management module to the application in the terminal device 110, a unique global call entry can be provided for multiple callers, thereby reducing the compatible configuration cost of the callers.

[0043] Figure 3 Shows the implementation process of the control test configuration method of the inference engine described in the embodiment of the present disclosure. Figure 3 The control test configuration method of the inference engine shown can be implemented by the control test management module added to the application in the above-mentioned terminal device 110. As Figure 3 shown, the control test configuration method of the above-mentioned inference engine may include the following steps:

[0044] In step 310, receive the model file corresponding to the inference engine to be created.

[0045] In an embodiment of the present disclosure, the above-mentioned model file may include control test configuration logic and at least one set of model data.

[0046] Among them, the above-mentioned model data may include all the data required to create an inference engine in the terminal device 110. In some embodiments of the present disclosure, when there are multiple sets of model data in the above-mentioned model file, multiple versions of the inference engine can be created respectively based on the above-mentioned multiple sets of model data. For example, the above-mentioned model file may include: model data for creating an original version inference engine and model data for creating one or more optimized version inference engines. In addition, usually, the multiple sets of model data included in the above-mentioned model file may be independent of each other in structure and not related to each other. That is to say, the above-mentioned model file can ensure the coexistence of new and old version codes without increasing the code complexity.

[0047] The above-mentioned control test configuration logic respectively defines which set of model data among the above-mentioned at least one set of model data the control test management module needs to create an inference engine based on when no control test configuration information is received; and which set of model data among the above-mentioned at least one set of model data the control test management module needs to create an inference engine corresponding to the above-mentioned control test configuration information based on when control test configuration information is received.

[0048] It can be seen that based on the above control test configuration logic, the control test management module can create an inference engine based on the current conditions of the application. This is because in an application, there are usually multiple callers, and it is difficult to fix the timing for each caller to create an inference engine. It is impossible to determine the timing for the first creation of the inference engine and the caller. In such a situation, to simplify the complexity of the control test configuration and improve the stability of the application, the life cycle of the application can be divided into two stages: In the first stage, when the upper-layer service (i.e., the server device 120) has not sent the control test configuration information, when the caller needs to call the inference engine, the control test management module can create an inference engine for the caller using the default configuration based on the above control test configuration logic; In the second stage, when the upper-layer service sends the control test configuration information and the control test management module updates its own control test configuration information, when the caller needs to call the inference engine again, the control test management module can create an inference engine for the caller based on its own control test configuration information and the above control test configuration logic.

[0049] In a specific example, assuming that the above model file includes two sets of model data: the model data of inference engine A and the model data of inference engine B, the control test configuration logic included in the above model file can define the following multiple configuration logics:

[0050] 1) In response to determining that no control test configuration information has been received, create an inference engine based on the model data of inference engine A.

[0051] 2) In response to determining that control test configuration information has been received, determine whether the received control test configuration information meets a preset condition. For example, the above preset condition can be whether the received control test configuration information is the first control test configuration information.

[0052] 2-1) If it is determined that the above preset condition is met, create an inference engine based on the model data of inference engine A.

[0053] 2-2) If it is determined that the above preset condition is not met, create an inference engine based on the model data of inference engine B.

[0054] It can be seen that based on the above control test configuration logic, the control test management module can determine which set of the above at least one set of model data to select to create an inference engine under different conditions.

[0055] It should be noted that, in a specific example of the present disclosure, the above-mentioned control test configuration logic part can be implemented by macro code. For example, it can be implemented by macro code written in the C++ language. In addition, at least one set of model data will constitute the basic macro of the model file. Before execution, the basic macro of the above-mentioned model file will be conditionally compiled based on the above-mentioned control test configuration logic, so that when the control test management module compiles the corresponding code of the above-mentioned model file, it can only compile the model data related to the current configuration logic, without having to compile the model data unrelated to the current configuration logic, thereby greatly improving the compilation speed and execution speed of the model file. For example, assume that the above-mentioned control test configuration logic defines that when no control test configuration information is received, it is necessary to create an inference engine based on the model data of inference engine A. In this case, even if the above-mentioned model file also includes multiple other sets of model data, when no control test configuration information is received, the control test management module only needs to compile the code corresponding to the model data of inference engine A, and does not need to compile the code corresponding to other sets of model data, because, based on the definition of the macro code, the code corresponding to other sets of model data is deleted first during compilation. It can be seen that implementing the above-mentioned control test configuration logic through macro code can greatly improve the compilation and execution speed of the code, and thus improve the creation efficiency of the inference engine.

[0056] In step 320, in response to determining to create an inference engine, determine whether control test configuration information is received.

[0057] In some embodiments of the present disclosure, when a certain caller first calls an inference engine, it can be determined that the above-mentioned inference engine needs to be created.

[0058] In some other embodiments of the present disclosure, when the control test configuration information is received and a certain caller calls the above-mentioned inference engine again, it can also be determined that the above-mentioned inference engine needs to be created.

[0059] In step 330, in response to determining that no control test configuration information is received, determine the model data to be deployed based on the above-mentioned control test configuration logic.

[0060] As described above, in the embodiments of the present disclosure, the above control test configuration logic defines which set of model data among the above at least one set of model data the control test management module needs to use to create an inference engine when no control test configuration information is received. Therefore, in step 220 above, the control test management module can directly determine the model data to be deployed based on the above control test configuration logic. In the embodiments of the present disclosure, the above configuration may also be referred to as the default configuration. For example, if the above control test configuration logic defines that when no control test configuration information is received, the control test management module needs to create an inference engine based on the model data of inference engine A, then in step 220 above, the control test management module can determine that the model data to be deployed is the model data of inference engine A.

[0061] In step 340, in response to determining that the control test configuration information has been received, determine the model data to be deployed based on the above control test configuration information and the above control test configuration logic.

[0062] In the embodiments of the present disclosure, the above control test configuration information may be the specific test version in the control test that the application in the current terminal device should select, which is configured by the server device and sent by the server device. It can be understood that in order to complete the control test of an inference engine, the server device usually determines in advance the terminal devices for deploying inference engines of different test versions. For example, assuming that the control test configuration information of the current terminal device configured by the server device is the first control test configuration information, it means that the first test version or version A in the control test that the application in the current terminal device should select; and if the control test configuration information of the current terminal device configured by the server device is the second control test configuration information, it means that the second test version or version B in the control test that the application in the current terminal device should select. Of course, when the control test includes more than two test versions, more than two control test configuration information can also be used to represent different test versions respectively.

[0063] In the embodiments of the present disclosure, by defining the control test configuration logic in the model file, different control test configuration information can be mapped one-to-one with multiple sets of model data. For example, in the foregoing example, the above first control test configuration information may correspond to the model data of the above inference engine A; the above second control test configuration information may correspond to the model data of the above inference engine B.

[0064] In this way, in step 230 above, the inference engine can directly determine the model data to be deployed based on the received control test configuration information and the above control test configuration logic.

[0065] In step 350, create an inference engine based on the above model data to be deployed.

[0066] In an embodiment of the present disclosure, the process of creating the inference engine generally may include operations such as compiling the model data and executing the compiled file. Specifically, in a specific example, step 350 above may include: First, conditionally compile the basic macro code composed of multiple groups of model data based on the above control test configuration logic to obtain an executed file after compilation; then, execute the above executed file.

[0067] As described above, the above control test configuration logic part may be implemented by macro code. For example, it is implemented by macro code written in the C++ language. Based on the characteristics of macro code, when compiling the corresponding code of the above model file, only the model data related to the current configuration logic needs to be compiled, and there is no need to compile the model data unrelated to the current configuration logic, thereby greatly improving the compilation speed and execution speed of the model file.

[0068] In the above control test configuration method, by defining the control test configuration logic in the model file and defining multiple groups of model data, the control test configuration of the inference engine can be realized. The above method can ensure the coexistence of new and old version codes without increasing the code complexity. Moreover, the new and old version codes can be conditionally switched without too much code logic. In addition, for the business layer, the inference engine control test configuration method provided by the embodiments of the present disclosure can provide a unique global call entry for multiple callers to reduce the compatible configuration cost of the callers.

[0069] The above control test configuration method will be described in detail below in combination with the accompanying drawings and specific examples.

[0070] Figure 4 shows a specific application scenario of the control test configuration method described in the embodiments of the present disclosure. As Figure 4 shown, based on the control test configuration method described in the embodiments of the present disclosure, in the case where no control test configuration information is received, when caller A first calls the inference engine, the control test management module will create inference engine A for caller A based on the default configuration defined in the control test configuration logic. In the case where the received control test configuration information is the second control test configuration information, when caller A calls the above inference engine again, the control test management module will create inference engine B for caller A based on the received second control test configuration information and the configuration logic defined in the control test configuration logic. Further, in the case where the received control test configuration information is the second control test configuration information, when caller B first calls the above inference engine, the control test management module will create inference engine B for caller B based on the received second control test configuration information and the configuration logic defined in the control test configuration logic.

[0071] Figure 5Shows an example of a model file described in an embodiment of the present disclosure. In Figure 5 In the shown example, the model file is a code file written in the C++ language. As Figure 5 shown, in an embodiment of the present disclosure, the above model file includes: a first model data part S1, a second model data part S2, and a control test configuration logic part S3. Among them, the control test configuration logic part S3 is written in C++ macro code, such as the control TEST_EN control LE part in Figure 5 . The control test configuration logic part S3 defines that under the condition of not receiving the control test configuration information, the first model data part S1 is executed; under the condition of configuring the control test configuration information a, the first model data part S1 is executed; under the condition of configuring the control test configuration information b, the second model data part S2 is executed. In addition, the above first model data part S1 and second model data part S2 are defined by the basic macro control TEST_EN control LE shown in Figure 5 .

[0072] It can be understood that for the optimization of the inference engine, most of them are operator-level optimizations, and the code fragments are discrete. If new logic is added to the code segment, the readability of the code will become poor. For the control test, its core logic is the condition. Based on the above considerations, in an embodiment of the present disclosure, by setting the independent first model data part S1, second model data part S2, and control test configuration logic part S3, the safe isolation of the optimized codes of the new and old versions can be ensured, the code is clear, and there is no need to generate too much code logic to switch the new and old codes conditionally, and at the same time, the readability of the code is also ensured.

[0073] In addition, in practical applications, the basic macro control TEST_ZONE part in the above Figure 5 will be conditionally compiled based on the control TEST_EN control LE part. That is, after the control TEST_EN control LE macro is turned off, only the first model data part S1 will take effect, and the other parts will not take effect during compilation. The above processing method not only improves the compilation efficiency and execution efficiency of the code, but also ensures that after the new version of the code is verified to be stable online, it is convenient to remove the old version of the code.

[0074] Corresponding to the above control test configuration method, an embodiment of the present disclosure also discloses a control test management device for an inference engine. In an embodiment of the present disclosure, the above control test management device is the control test management module in the terminal device 110 shown in Figure 2 . Figure 6 Shows the internal structure of the control test management device for the inference engine described in some embodiments of the present disclosure. As Figure 6 shown, the above control test management device may include the following modules:

[0075] A file receiving module 610 for receiving a model file corresponding to an inference engine to be created; wherein the model file includes a control test configuration logic and at least one set of model data;

[0076] A configuration information determination module 620 for determining whether control test configuration information is received in response to determining to create an inference engine;

[0077] A model data determination module 630 for determining model data to be deployed based on the control test configuration logic in response to determining that the control test configuration information has not been received; or determining model data to be deployed based on the control test configuration information and the control test configuration logic in response to determining that the control test configuration information has been received; and

[0078] An inference engine creation module 640 for creating an inference engine based on the model data to be deployed.

[0079] For the specific implementation of each of the above modules, reference may be made to the foregoing method and the accompanying drawings, which will not be repeated here. For the sake of convenience of description, when describing the above device, various modules are described separately according to their functions. Of course, when implementing the present disclosure, the functions of each module may be implemented in one or more software and / or hardware. The device of the above embodiment is used to implement the control test configuration method of the corresponding inference engine in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0080] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present disclosure also provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, it implements the control test configuration method of the inference engine described in any of the foregoing embodiments.

[0081] Figure 7 FIG. shows a hardware structure diagram of a more specific electronic device provided in this embodiment. The device may include: a processor 2010, a memory 2020, an input / output interface 2030, a communication interface 2040, and a bus 2050. Among them, the processor 2010, the memory 2020, the input / output interface 2030, and the communication interface 2040 are communicatively connected to each other inside the device through the bus 2050.

[0082] The processor 2010 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0083] The memory 2020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 2020 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 2020 and are called and executed by the processor 2010.

[0084] The input / output interface 2030 is used to connect to input / output devices to achieve information input and output. Among them, the input / output devices can be configured as components in the device or externally connected to the device to provide corresponding functions. The input devices can include microphones, various sensors, etc., and the output devices can include displays, speakers, vibrators, indicator lights, etc.

[0085] The communication interface 2040 is used to connect to a communication module (not shown in the figure) to achieve communication interaction between this device and other devices. The communication module can achieve communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as mobile network, WIFI, Bluetooth, etc.).

[0086] The bus 2050 includes a path for transmitting information between various components of the device (such as the processor 2010, the memory 2020, the input / output interface 2030, and the communication interface 2040).

[0087] It should be noted that although the above device only shows the processor 2010, the memory 2020, the input / output interface 2030, the communication interface 2040, and the bus 2050, in the specific implementation process, this device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification, and do not necessarily include all the components shown in the figure.

[0088] The electronic device in the above embodiment is used to implement the corresponding control test configuration method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0089] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the control test configuration method of the inference engine as described in any one of the above embodiments.

[0090] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0091] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the task processing method as described in any one of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0092] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples; under the concept of the present disclosure, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of brevity.

[0093] In addition, for simplicity of explanation and discussion, and so as not to make the embodiments of the present disclosure difficult to understand, well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Further, the devices may be shown in block diagram form in order to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that details regarding the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In cases where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure may be practiced without these specific details or with variations of these specific details. Accordingly, these descriptions are to be regarded as illustrative rather than restrictive.

[0094] Although the present disclosure has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0095] Embodiments of the present disclosure are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of the present disclosure shall be included within the protection scope of the present disclosure.

Claims

1. A method for configuring a control test of an inference engine, which is executed by a control test management module in a terminal device, includes: Receiving a model file corresponding to the inference engine to be created; wherein, the model file includes control test configuration logic and at least one set of model data; Responding to determining to create the inference engine, and determining whether control test configuration information is received; Responding to determining that the control test configuration information has not been received, determining the model data to be deployed based on the control test configuration logic; Responding to determining that the control test configuration information has been received, determining the model data to be deployed based on the control test configuration information and the control test configuration logic; and Creating an inference engine based on the model data to be deployed.

2. The method according to claim 1, wherein, The control test configuration logic is used to define which set of model data in the at least one set of model data to create the inference engine when the control test configuration information is not received; And which set of model data in the at least one set of model data to create an inference engine corresponding to the control test configuration information after the control test configuration information is received.

3. The method according to claim 2, wherein, The control test configuration logic is written using macro code.

4. The method according to claim 3, further comprising: The at least one set of model data constitutes the basic macro code of the model file.

5. The method according to claim 1, further comprising: Responding to determining that a caller calls the inference engine for the first time, determining to create the inference engine.

6. The method according to claim 5, further comprising: Responding to determining that the caller calls the inference engine for the first time after receiving the control test configuration information, determining to create the inference engine.

7. The method according to claim 2, wherein The determining the model data to be deployed based on the control test configuration logic includes: Determining the model data to be deployed based on which set of model data in the at least one set of model data to create the inference engine as defined by the control test configuration logic when the control test configuration information is not received.

8. The method according to claim 2, wherein The determining the model data to be deployed based on the control test configuration information and the control test configuration logic includes: Determining the model data to be deployed based on which set of model data in the at least one set of model data to create an inference engine corresponding to the control test configuration information as defined by the control test configuration logic.

9. The method according to claim 4, wherein, The creating an inference engine based on the model data to be deployed includes: Performing conditional compilation on the basic macro code based on the control test configuration logic to obtain a compiled execution file; and Executing the execution file.

10. A control test management device for an inference engine, includes: A file receiving module, configured to receive a model file corresponding to the inference engine to be created; wherein, the model file includes control test configuration logic and at least one set of model data; A configuration information determining module, configured to respond to determining to create the inference engine, and determine whether control test configuration information is received; A model data determining module, configured to respond to determining that the control test configuration information has not been received, determine the model data to be deployed based on the control test configuration logic; or, respond to determining that the control test configuration information has been received, determine the model data to be deployed based on the control test configuration information and the control test configuration logic; and An inference engine creation module creates an inference engine based on the model data to be deployed.

11. An electronic device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, it implements the control test configuration method of the inference engine according to any one of claims 1-9.

12. A non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the control test configuration method of the inference engine according to any one of claims 1-9.

13. A computer program product includes computer program instructions that, when run on a computer, cause the computer to execute the control test configuration method of the inference engine according to any one of claims 1-9.