A method and device for executing a batch model algorithm

By analyzing the calling relationship of model algorithms, constructing fast functions and optimizing data processing, the problem of excessive calculation amount when the intelligent operation and maintenance platform executes model algorithms in batches is solved, the execution speed is improved, and the resource burden is reduced.

CN112269610BActive Publication Date: 2024-10-22NANJING JIQI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011152232.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-26
Publication Date
2024-10-22
Estimated Expiration
2040-10-26

AI Technical Summary

Technical Problem

When the intelligent operation and maintenance platform executes model algorithms in batches, the amount of calculation is too large, resulting in an overburden of resources and difficulty in effective processing.

Method used

By analyzing the calling relationship of model algorithms, we can build fast functions and replace the original model algorithm calls, sort the model algorithm queue, use intermediate data sets to access results, optimize the data collection cycle, and reduce the amount of calculations.

Benefits of technology

By exchanging space for time, the execution speed of batch model algorithms is significantly improved and the burden on computing resources is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112269610B_ABST
    Figure CN112269610B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for executing batch model algorithms. The method first initializes the model algorithm as a whole. During the initialization process, a fast function is constructed for the called model algorithm through the model algorithm call relationship analysis, and the original model algorithm in each other model algorithm is replaced by the fast function. When the batch model algorithm is executed, it is first sorted according to the model algorithm call relationship, and then the sorted model algorithms are executed in sequence. When executing the fast function, the intermediate data set is first searched according to the interface name and input parameters. If the corresponding intermediate data can be found in the intermediate data set, the intermediate data is returned; otherwise, the original model algorithm is executed, and the execution result is saved to the intermediate data set according to the interface name and input parameters. The present invention greatly improves the execution speed of the batch model algorithm by exchanging space for time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to optimizing the execution of batch model algorithms. Background Art

[0002] The intelligent operation and maintenance platform involves manufacturers and customers. Manufacturers produce and provide equipment; customers purchase and use equipment; the intelligent operation and maintenance platform provides maintenance services for customers. Each customer may have purchased multiple different types of equipment from multiple manufacturers. Manufacturers may produce different types of equipment. When the intelligent operation and maintenance platform provides equipment maintenance services to customers, it needs to collect various operating data of each equipment produced by each manufacturer, and then analyze the status of each equipment based on various operating data. The intelligent operation and maintenance platform analyzes the status of equipment through various operating data, which involves models and algorithms. Since the intelligent operation and maintenance platform involves many equipment from many manufacturers, there are also many model algorithms involved. Every time the equipment status is monitored, many model algorithms need to be executed in batches, which consumes a lot of computing power. Especially when the model algorithm needs to analyze historical operating data, the amount of computing power required is even larger, and it may even make the operation and maintenance platform unable to afford it. Summary of the invention

[0003] The problem to be solved by the present invention is that too much computational effort is consumed when executing model algorithms in batches.

[0004] To solve the above problems, the solution adopted by the present invention is as follows:

[0005] A method for executing a batch model algorithm according to the present invention comprises the following steps:

[0006] S11: Acquire a model algorithm information set; the model algorithm information is information about the model algorithm, including at least an interface name, input parameter information, and a program instruction set;

[0007] S12: obtaining a calling relationship of the model algorithm by analyzing a program instruction set of each model algorithm in the model algorithm information set;

[0008] S13: constructing a corresponding fast function for each called model algorithm according to the calling relationship of the model algorithms, and replacing the call to the called model algorithm in the program instruction set of all model algorithms that call the called model algorithm with the call to the corresponding fast function;

[0009] S21: Obtain a set of model algorithms to be executed;

[0010] S22: sorting the model algorithms in the set of model algorithms to be executed according to the calling relationship of the model algorithms to obtain a sorted model algorithm queue, so that the called model algorithm is arranged before the model algorithm that calls the called model algorithm;

[0011] S31: Obtain input source data set;

[0012] S32: Execute each model algorithm replaced by the quick function in the sorted model algorithm queue in sequence according to the input source data set; when executing the model algorithm, for the model algorithm that is called, store the output result data after the execution of the model algorithm into the intermediate data set according to the interface name of the model algorithm and the input parameter data of the model algorithm; when the quick function is called, search for the output result data from the intermediate data set according to the interface name and input parameter data of the model algorithm corresponding to the quick function; if the output result data can be found, return the found output result data as the output result data of the quick function; if the output result data cannot be found, execute the model algorithm corresponding to the quick function, and store the output result data after its execution into the intermediate data set according to the interface of the model algorithm and the input parameter data of the model algorithm.

[0013] Further, according to the execution method of batch model algorithms of the present invention, the step S31 also includes performing collection cycle reduction processing on the periodically collected data in the input source data set, so that the collection cycle of each periodically collected data is the same; the step S32 executes each model algorithm in the sorted model algorithm queue in sequence according to the data set after the collection cycle reduction processing.

[0014] Furthermore, the batch model algorithm execution method according to the present invention also includes step S14; the step S14: persistently stores the constructed fast function, the model algorithm information set replaced by step S13, and the model algorithm calling relationship.

[0015] Furthermore, the batch model algorithm execution method according to the present invention also includes step S23; in step S23: constructing a first program instruction set according to the sorted model algorithm queue; in step S32, executing the first program instruction set according to the input source data set.

[0016] A batch model algorithm execution device according to the present invention includes a model algorithm overall initialization module, a to-be-executed model algorithm initialization module, and a sequential execution module;

[0017] The model algorithm overall initialization module includes the following modules:

[0018] M11, used to: obtain a model algorithm information set; the model algorithm information is information about the model algorithm, including at least an interface name, input parameter information, and a program instruction set;

[0019] M12, used to obtain the calling relationship of the model algorithm by analyzing the program instruction set of each model algorithm in the model algorithm information set;

[0020] M13, used for: constructing a corresponding fast function for each called model algorithm according to the calling relationship of the model algorithm, and replacing the call to the called model algorithm in the program instruction set of all model algorithms that call the called model algorithm with the call to the corresponding fast function;

[0021] The model algorithm initialization module to be executed includes the following modules:

[0022] M21, used to: obtain a set of model algorithms to be executed;

[0023] M22, used to: sort the model algorithms in the set of model algorithms to be executed according to the calling relationship of the model algorithms to obtain a sorted model algorithm queue, so that the called model algorithm is arranged before the model algorithm that calls the called model algorithm;

[0024] The sequential execution module includes the following modules:

[0025] M31 is used to: obtain input source data sets;

[0026] M32, used for: executing each model algorithm replaced by the quick function in the sorted model algorithm queue in sequence according to the input source data set; when executing the model algorithm, for the model algorithm that is called, storing the output result data after the execution of the model algorithm into the intermediate data set according to the interface name of the model algorithm and the input parameter data of the model algorithm; when the quick function is called, searching the output result data from the intermediate data set according to the interface name and input parameter data of the model algorithm corresponding to the quick function; if the output result data can be found, returning the found output result data as the output result data of the quick function; if the output result data cannot be found, executing the model algorithm corresponding to the quick function, and storing the output result data after its execution into the intermediate data set according to the interface of the model algorithm and the input parameter data of the model algorithm.

[0027] Further, according to the execution device of the batch model algorithm of the present invention, the module M31 also includes performing collection cycle reduction processing on the periodically collected data in the input source data set, so that the collection cycle of each periodically collected data is the same; the module M32 executes each model algorithm in the sorted model algorithm queue in sequence according to the data set after the collection cycle reduction processing.

[0028] Further, according to the batch model algorithm execution device of the present invention, the model algorithm overall initialization module also includes a module M14; the module M14 is used to: continuously store the constructed fast function, the model algorithm information set replaced by the module M13, and the model algorithm calling relationship.

[0029] Further, according to the batch model algorithm execution device of the present invention, the model algorithm initialization module to be executed also includes a module M23; the module M23 is used to: construct a first program instruction set according to the sorted model algorithm queue; in the module M32, the first program instruction set is executed according to the input source data set.

[0030] The technical effects of the present invention are as follows: the present invention greatly improves the execution speed of the batch model algorithm by exchanging space for time. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of the module structure of an embodiment of the present invention.

[0032] in,

[0033] 100 is an equipment status monitoring system;

[0034] 111 is a manufacturer model algorithm package and equipment information access module, 112 is a model algorithm optimization package access module, 113 is an equipment operation data access module, 114 is an intermediate data access module, and 115 is an equipment status information access module;

[0035] 121 is a device operation data receiving module;

[0036] 131 is a device operation data input interface module;

[0037] 141 is a model algorithm call relationship analysis module, and 142 is a model algorithm optimization module;

[0038] 151 is a module for extracting model algorithms to be executed, and 152 is a module for sorting model algorithms to be executed;

[0039] 160 is a device status analysis execution module;

[0040] Dev_1~Dev_n are n detection devices respectively. DETAILED DESCRIPTION

[0041] The present invention is further described in detail below with reference to the accompanying drawings.

[0042] This embodiment relates to an intelligent operation and maintenance platform system. The intelligent operation and maintenance platform system, such as Figure 1 As shown, it includes a device status monitoring system 100. The device status monitoring system 100 is a system implemented by a machine executing a software program. The machine that implements the device status monitoring system 100 is connected to detection devices Dev_1~Dev_n for operation and maintenance management. The intelligent operation and maintenance platform system is used to provide operation and maintenance services for the connected detection devices, wherein the device status detection system 100 is used to analyze the device status of each detection device by analyzing the operating data of each detection device. Among them, the detection devices Dev_1~Dev_n may be provided by multiple manufacturers and include various types of equipment.

[0043] The device state detection system 100 is a specific embodiment of a batch model algorithm execution device referred to in the present invention, including: a manufacturer model algorithm package and device information access module 111, a model algorithm optimization package access module 112, a device operation data access module 113, an intermediate data access module 114, a device state information access module 115, a device operation data receiving module 121, a model algorithm call relationship analysis module 131, a model algorithm optimization module, a to-be-executed model algorithm extraction module 141, a to-be-executed model algorithm sorting module 142, a device state analysis execution module, a device operation data input interface module and a device state data output interface module. The interaction process between the modules of the above-mentioned device state detection system 100 is a specific embodiment of a batch model algorithm execution method referred to in the present invention.

[0044] The manufacturer model algorithm package and device information access module 111 are used to access the manufacturer model algorithm package and the device information of the detection equipment for operation and maintenance management. The manufacturer model algorithm package is usually represented by a file, which contains model algorithm information for performing device status analysis on various types of detection equipment of each manufacturer. Model algorithm information is information about the model algorithm. In this embodiment, the model algorithm is implemented by a function, so the information of the model algorithm is also the function information corresponding to the model algorithm, which at least includes the interface name, input parameter information and program instruction set. The function used to define the model algorithm can be implemented in a scripting language, or in a language such as Java or Python. In this embodiment, the function used to define the model algorithm uses the Java language, and the aforementioned manufacturer model algorithm package is also a Java class file package. The device information is the information of the detection equipment, including information such as the device type, supplier, device serial number, and device status parameters. The detection equipment for operation and maintenance management, in this embodiment, is the aforementioned detection equipment Dev_1~Dev_n connected for operation and maintenance management. In this embodiment, the manufacturer model algorithm package is preferably saved in a file format, and the device information is preferably saved in a database format.

[0045] The model algorithm optimization package access module 112 is used to access the optimized model algorithm package and the calling relationship between the model algorithm. For the calling relationship between the optimized model algorithm package and the model algorithm, please refer to the description of the model algorithm calling relationship analysis module 141 and the model algorithm optimization module 142.

[0046] The device operation data access module 113 is used to access the operation data of the detection device. The operation data of the detection device in this embodiment is also the input source data referred to in the present invention; the input source data set referred to in the present invention is also the set of the operation data of the detection device in this embodiment.

[0047] The intermediate data access module 114 is used to access the intermediate data generated during the execution of the model algorithm. The collection of intermediate data is the intermediate data set. In this embodiment, the intermediate data access module 114 provides two interfaces: StoreMFVallue and FindMFValue. Among them, StoreMFValue is used to store the result data of the execution of the model algorithm as intermediate data into the intermediate data set according to the interface name of the model algorithm and the input parameter data of the model algorithm. The calling method is as follows: StoreMFValue(MF_Name, MF_ParaList, MF_rValue). FindMFValue is used to find out whether the intermediate data set has corresponding intermediate data according to the interface name of the model algorithm and the input parameter data of the model algorithm. The calling method is as follows: MF_rValue =FindMFValue(MF_Name, MF_ParaList).

[0048] In the above calling methods of StoreMFValue and FindMFValue, MF_Name represents the interface name of the model algorithm, MF_ParaList represents the list of input parameter data of the model algorithm, and MF_rValue represents the result data returned when the model algorithm represented by MF_Name is called according to the input parameter data MF_ParaList. If the MF_rValue returned by FindMFValue(MF_Name, MF_ParaList) is empty, it means that the intermediate data corresponding to MF_Name and MF_ParaList cannot be found in the intermediate data set.

[0049] The device status information access module 115 is used to access the device status information obtained by analysis. In this embodiment, the device status information of each device analyzed by the device status monitoring system 100 is stored through the device status information access module 115. When other modules of the intelligent operation and maintenance platform system need to obtain the device status information of the detection device, they are extracted through the device status information access module 115.

[0050] The device operation data receiving module 121 is used to receive the operation data sent by the detection device, or to collect the operation data of the detection device at regular intervals. These operation data are related to the device status. For example, the optical fiber signal strength of the transmission device and the bit error rate of the data transmission, the processor temperature and fan speed of the computer device, the energy consumption of the energy-saving device, etc. The operation data of the detection device obtained by the device operation data receiving module 121 is continuously stored through the device operation data access module 113. The storage of the operation data of the detection device is preferably carried out in a database.

[0051] The equipment operation data input interface module 131 is used to provide an interface service for the model algorithm to extract the operation data of the detection equipment stored in the equipment operation data access module 113. The set of operation data of the detection equipment stored in the equipment operation data access module 113 extracted by the equipment operation data input interface module 131 is the acquisition of the input source data set referred to by the module M31 of the present invention.

[0052] It should be noted that the device state monitoring system 100 of this embodiment is connected to a large number of detection devices, so the time periods of the operation data sent by different types of detection devices may be different, that is, the time periods of the operation data of the detection devices received by the device operation data receiving module 121 may be different. Therefore, the time periods of the operation data of each detection device stored in the device operation data access module 113 may be different.

[0053] In order to facilitate the processing of the model algorithm, in this embodiment, the equipment operation data input interface module 131 performs collection cycle normalization processing on the periodically collected data, so that the collection cycle of each periodically collected data is the same. Therefore, the model algorithm extracts the operation data of the detection device through the equipment operation data input interface module 131 The time period is the same. The data collection period here is the time period of the operation data of the detection device received by the aforementioned equipment operation data receiving module 121. The collection cycle normalization processing is specifically as follows:

[0054] First, the operation data collection period of each detection device is obtained, and then the greatest common divisor of these collection periods is calculated, and finally the greatest common divisor is used as the collection period to make period compensation for the operation data of the detection device. For example, the operation data collection period of the detection device Dev_1 is 3 minutes, the operation data collection period of the detection device Deve_2 is 5 minutes, and so on. Thus, the greatest common divisor of the operation data collection periods of these detection devices is calculated to be 1 minute, and then the operation data of the detection devices with a collection period of 1 minute is compensated for.

[0055] For example, a model algorithm needs to obtain the latest 24-hour operation data of the detection device Dev_1. According to the original 3-minute collection cycle, the latest 480 operation data of the detection device Dev_1 need to be extracted from the device operation data access module 113. After the device operation data input interface module 131 performs cycle compensation, the 480 operation data are compensated to 1440 operation data.

[0056] The method of operating data compensation can simply adopt linear compensation. For example, the operating data of the detection device Dev_1 includes the processor temperature. In the 480 operating data queues, the first processor temperature is 37, and the second processor temperature is 40, that is, the 480 processor temperature data are: 37, 40, .... Compensating 480 operating data into 1440 operating data means inserting two compensated processor temperature data between the first processor temperature and the second processor temperature. According to the linear compensation method, the two compensated processor temperatures are 38 and 39. Therefore, the 1440 compensated processor temperatures are: 37, 38, 39, 40, .... Among them, 38 and 39 are the compensated inserted processor temperatures.

[0057] The model algorithm call relationship analysis module 141, which is the aforementioned module M12, is used to obtain the call relationship of the model algorithm by analyzing the program instruction set of each model algorithm in the model algorithm information set. The model algorithm information set comes from the manufacturer model algorithm package and the manufacturer model algorithm package stored in the device information access module 111. The manufacturer model algorithm package and the manufacturer model algorithm package stored in the device information access module 111 are combined into a model algorithm information set, which is the model algorithm information set obtained in the aforementioned module M11.

[0058] In this embodiment, the model algorithm is implemented by a Java function, and the manufacturer's model algorithm package is a Java class file package. Therefore, when the module M11 obtains the model algorithm information set, it also includes a process of decompiling the Java class file package. Therefore, in this embodiment, the program instruction set of the model algorithm in the model algorithm information set is a Java function definition expressed in the Java language. Since the model algorithm is implemented by a function, the essence of the model algorithm call relationship analysis module 141 is the function call relationship analysis. Function call relationship analysis is familiar to those skilled in the art and will not be repeated in this specification.

[0059] The model algorithm optimization module 142, that is, the aforementioned module M13, is used to: build a corresponding fast function for each called model algorithm according to the calling relationship of the model algorithm, and replace the call to the called model algorithm in the program instruction set of all model algorithms that call the called model algorithm with a call to its corresponding fast function.

[0060] For example, assume that the current model algorithm information set includes ten model algorithms, namely MF1 to MF10. One of the model algorithms, such as MF5, calls the model algorithm MF3, and MF3 is the called model algorithm. The corresponding fast function definition for the called model algorithm MF3 is as follows:

[0061] MF3_f(MF3ParaList)

[0062] {

[0063] ReturnValueSet rValue; / / Define the return value;

[0064] rValue = FindMFValue("MF3", MF3ParaList);

[0065] / / Find the intermediate data set

[0066] If (rValue!=NULL) return rValue; / / If the intermediate data is found in the intermediate data set

[0067] rValue = MF3(MF3ParaList); / / If not found, directly call the original model algorithm;

[0068] StoreMFValue("MF3", MF3ParaList,rValue);

[0069] / / Store the results in the intermediate dataset

[0070] Return rValue; / / return;

[0071] }

[0072] In the fast function represented by the pseudo code above, MF3_f is a fast function constructed by MF3. MF3 is the original model algorithm corresponding to the fast function MF3_f. MF3ParaList is the input parameter of the model algorithm. FindMFValue and StoreMFValue are interfaces provided by the intermediate data access module 114.

[0073] "Replace the calls to the called model algorithm in the program instruction set of all model algorithms that call the called model algorithm with the calls to its corresponding fast function", for the aforementioned model algorithm MF5, that is, replace MF3 in the program instruction set of MF5 with the fast function MF3_f. For example, the original model algorithm MF5 is defined as follows:

[0074] MF5(MF5ParaList)

[0075] {

[0076] …

[0077] T3 = MF3(MF3ParaList);

[0078] …

[0079] }

[0080] The model algorithm MF5 after fast function replacement is defined as follows:

[0081] MF5(MF5ParaList)

[0082] {

[0083] …

[0084] T3 = MF3_f(MF3ParaList);

[0085] …

[0086] }

[0087] The fast function constructed by the above-mentioned model algorithm optimization module 142 and the model algorithm information set formed after the fast function is replaced by the model algorithm optimization module 142 constitute the aforementioned "optimized model algorithm package".

[0088] In this embodiment, the calling relationship of the model algorithm obtained by the model algorithm calling relationship analysis module 141, the fast function constructed by the model algorithm optimization module 142, and the model algorithm information set formed after the fast function is replaced by the model algorithm optimization module 142 are persistently stored through the model algorithm optimization package access module 112. The persistent storage is the aforementioned module M14.

[0089] The model algorithm extraction module 151 to be executed is used to extract the model algorithm to be executed according to the manufacturer's model algorithm package and the device information in the device information access module 111. Specifically, it is based on the model algorithm corresponding to the device status parameters in the device information. For example, the device status parameters of a certain type of equipment include: A1, A2, A3, and the corresponding model algorithms are MF3, MF4, and MF5. Therefore, the model algorithms to be executed extracted by the model algorithm extraction module 151 to be executed are: MF3, MF4, and MF5. MF3, MF4, and MF5 constitute the model algorithm set to be executed.

[0090] The correspondence between the model algorithm and the device status parameters is preferably defined in a definition file in an XML format in the manufacturer's model algorithm package.

[0091] Obviously, the model algorithm extracted by the model algorithm extraction module 141 to be executed is a subset of the model algorithm defined by the manufacturer's model algorithm package. For example, the manufacturer's model algorithm package defines ten model algorithms, MF1~MF10, while the model algorithm extraction module 151 to be executed extracts only three model algorithms: MF3, MF4, and MF5. The model algorithm extraction module 151 to be executed is the aforementioned module M21, which extracts the model algorithm set to be executed. Among them, the model algorithm set is usually a set composed of the interface names of the model algorithms.

[0092] The model algorithm to be executed sorting module 152 is used to: sort each model algorithm in the model algorithm set to be executed according to the calling relationship of the model algorithm to obtain a sorted model algorithm queue, so that the called model algorithm is arranged before the model algorithm that calls the called model algorithm; and then construct a first program instruction set according to the sorted model algorithm queue. In the model algorithm to be executed sorting module 152, the calling relationship of the model algorithm is taken from the calling relationship of the model algorithm persistently stored in the model algorithm optimization package access module 112. The calling relationship of the model algorithm persistently stored in the model algorithm optimization package access module 112 comes from the output of the model algorithm calling relationship analysis module 141. Therefore, the calling relationship of the model algorithm required to be used by the model algorithm to be executed sorting module 152 ultimately comes from the output of the model algorithm calling relationship analysis module 141. The model algorithm set to be executed in the model algorithm to be executed sorting module 152 comes from the output of the model algorithm to be executed extraction module 151.

[0093] The function of the above-mentioned model algorithm sorting module 152 to be executed is also the function of the aforementioned module M22 and module M23. Among them, the output of module M22 is the sorted model algorithm queue, which is the queue of model algorithms to be executed. Module M23 is the process of packaging the sorted model algorithm queue to be executed into a program instruction set. Specifically, that is, first extract the program instruction set of each model algorithm in the model algorithm information set formed after the fast function replacement by the model algorithm optimization module 142, which is continuously stored by the model algorithm optimization package access module 112, and the program instruction set of the fast function constructed by the model algorithm optimization module 142, and then combine it with the summary interface of the module algorithm to be executed to form a first program instruction set.

[0094] The summary interface of the module algorithms to be executed is the call sequence composed of the sorted model algorithms to be executed. For example, the sorted model algorithms to be executed are MF3, MF4, and MF5; among them, MF5 calls MF3; then the summary interface of the module algorithms to be executed is defined as follows:

[0095] Main_Interface()

[0096] {

[0097] …

[0098] / / Initialization of model algorithm input parameters M3ParaList, M4ParaList, M5ParaList

[0099] …

[0100] MF3_rValue = MF3_f(M3ParaList);

[0101] MF4_rValue = MF4(M4ParaList);

[0102] MF5_rValue = MF5(M5ParaList);

[0103] …

[0104] / / The execution results of the model algorithm MF3_rValue, MF4_rValue, MF5_rValue

[0105] / / Persistently store through the device status information access module 115.

[0106] }

[0107] It should be pointed out that in the summary interface of the module algorithm to be executed, the model algorithm that is called is replaced by its corresponding fast function.

[0108] In this embodiment, the program instruction sets of the fast functions and model algorithms stored in the model algorithm optimization package access module 112 are all java source codes. Therefore, when the model algorithm to be executed sorting module 152 forms the first program instruction set, it also includes the compilation of the java source code, and the first program instruction set finally obtained is a java class file package.

[0109] The device status analysis execution module 160 is used to execute the first program instruction set, that is, in the aforementioned module M32, to sequentially execute each model algorithm after the quick function replacement in the sorted model algorithm queue according to the input source data set. The first program instruction set in this embodiment can be regarded as "sequentially executing each model algorithm after the quick function replacement in the sorted model algorithm queue" represented by the program instruction set.

[0110] When executing the first program instruction set, since the corresponding original model algorithm is replaced by a fast function in the first program instruction set, for the model algorithm that is called, the output result data after the model algorithm is executed is stored in the intermediate data set according to the interface name of the model algorithm and the input parameter data of the model algorithm. In this embodiment, the process of outputting the model algorithm that is called to the intermediate data set is implemented by the program instruction set defined by the summary interface Main_Inferface of the module algorithm to be executed.

[0111] Taking the sorted model algorithm to be executed in the aforementioned Main_Interface as an example, the model algorithm MF3 is a model algorithm that is called, so the original model algorithm MF3 is replaced by the fast function MF3_f. Therefore, when executing to the fast function MF3_f, first call FindMFValue("MF3", MF3ParaList), because MF3 has not been called before, the returned rValue is empty, that is, the corresponding result cannot be found in the intermediate data set, and then execute the original model algorithm, that is, rValue = MF3(MF3ParaList), and then store the output result data rValue after the execution of the original model algorithm MF3 into the intermediate data set by calling the function StoreMFValue.

[0112] In the above process, since FindMFValue always returns null, the summary interface Main_Inferface of the above module algorithm to be executed can be further optimized as follows:

[0113] Main_Interface()

[0114] {

[0115] …

[0116] / / Initialization of model algorithm input parameters M3ParaList, M4ParaList, M5ParaList

[0117] …

[0118] MF3_rValue = MF3(M3ParaList);

[0119] StoreMFValue(“MF3”, MF3ParaList, MF3_rValue);

[0120] MF4_rValue = MF4(M4ParaList);

[0121] MF5_rValue = MF5(M5ParaList);

[0122] …

[0123] / / The execution results of the model algorithm MF3_rValue, MF4_rValue, MF5_rValue

[0124] / / Persistently store through the device status information access module 115.

[0125] }

[0126] Since the original model algorithm MF5 calls the original model algorithm MF3, in the program instruction set defined by the summary interface Main_Inferface of the module algorithm to be executed, the model algorithm MF5 is an optimized model algorithm, which calls the fast function MF3_f of the model algorithm MF3. Therefore, when the program instruction set defined by the summary interface Main_Inferface of the module algorithm to be executed is executed to the model algorithm MF5, the fast function MF3_f of the model algorithm MF3 will be called.

[0127] Refer to the program instruction set definition of the aforementioned fast function MF3_f. When the fast function MF3_f is called, first, the interface name "MF3" of the model algorithm corresponding to the fast function MF3_f and the input parameter data MF3ParaList are used as input parameters to call FindMFValue, that is, the statement: rValue = FindMFValue("MF3", MF3ParaList). The process of calling FindMFValue is the aforementioned "searching for output result data from the intermediate data set according to the interface name and input parameter data of the model algorithm corresponding to the fast function". Among them, rValue is the output result data obtained by the search. Then determine whether the return rValue of FindMFValue is empty. If rValue is not empty, rValue is returned, that is, the statement: "If (rValue!=NULL) return rValue". The process of executing the statement "If (rValue!=NULL) return rValue" is the aforementioned "if the output result data can be found, the output result data found is returned as the output result data of the fast function". "If the output result data cannot be found, the model algorithm corresponding to the fast function is executed, and the output result data after execution is stored in the intermediate data set according to the interface of the model algorithm and the input parameter data of the model algorithm." This is the process in which the statements "rValue = MF3(MF3ParaList)" and "StoreMFValue("MF3", MF3ParaList, rValue)" are executed.

[0128] That is, in the aforementioned module M32, "when the fast function is called, the output result data is searched from the intermediate data set according to the interface name and input parameter data of the model algorithm corresponding to the fast function; if the output result data can be found, the found output result data is returned as the output result data of the fast function; if the output result data cannot be found, the model algorithm corresponding to the fast function is executed, and the output result data after execution is stored in the intermediate data set according to the interface of the model algorithm and the input parameter data of the model algorithm" is implemented when the program instruction set defined by the fast function is executed.

[0129] When the program instruction set defined by the summary interface Main_Inferface of the module algorithm to be executed is executed, the model algorithm input parameter data M3ParaList, M4ParaList, and M5ParaList are first initialized. The input parameter data M3ParaList, M4ParaList, and M5ParaList include the operating data of the detection equipment; that is, when initializing the model algorithm input parameters, it is necessary to obtain the operating data of the detection equipment. And obtaining the operating data of the detection equipment is the "obtaining input source data set" referred to by the aforementioned module M31. After the model algorithms MF3, MF4, and MF5 are executed, the results MF3_rValue, MF4_rValue, and MF5_rValue returned by each model algorithm MF3, MF4, and MF5 will eventually be stored persistently by calling the interface function provided by the device status information access module 115. That is, in this embodiment, modules M31 and M32 are implemented by defining and executing the program instruction set of the summary interface Main_Inferface of the module algorithm to be executed.

[0130] It should be pointed out that, in this embodiment, the execution of the first program instruction set is a periodic process, which is generally driven by a timer, that is, the device status analysis execution module 160 is driven by a timer. The process processed by the model algorithm call relationship analysis module 141 and the model algorithm optimization module 142 is a process of initializing the model algorithm as a whole, that is, the model algorithm call relationship analysis module 141 and the model algorithm optimization module 142 constitute the aforementioned model algorithm overall initialization module. The process of initializing the model algorithm as a whole occurs when the manufacturer's model algorithm package changes. The process processed by the model algorithm extraction module 151 to be executed and the model algorithm sorting module 152 to be executed is the process of initializing the model algorithm to be executed. That is, the model algorithm extraction module 151 to be executed and the model algorithm sorting module 152 to be executed constitute the aforementioned model algorithm initialization module to be executed. The process of initializing the model algorithm to be executed occurs when the manufacturer's model algorithm package changes or when the detection device changes. Therefore, the execution method of the batch model algorithm corresponding to the execution device of the batch model algorithm in this embodiment includes two initialization steps and the step of executing the first program instruction set, and the two initialization steps are: the model algorithm overall initialization step and the model algorithm to be executed initialization step. The model algorithm overall initialization step is the step corresponding to the model algorithm overall initialization module, that is, the combination of the aforementioned steps S11, S12, S13, and S14. The model algorithm initialization step to be executed is also the step corresponding to the model algorithm initialization module to be executed, that is, the combination of the aforementioned steps S21, S22, and S23. After the initialization is completed, the steps of the first program instruction set are executed regularly by the timer. In this embodiment, when the first program instruction set is executed, the aforementioned steps S31 and S32 are executed by calling the summary interface Main_Inferface of the execution module algorithm.

[0131] It should be noted that this embodiment is only an application of the batch model algorithm execution method and device of the present invention in the equipment status detection system 100. The adjustments made to the batch model algorithm execution method and device of the present invention in different application scenarios also fall within the protection scope of the claims of the present invention.

Claims

1. A method for executing a batch model algorithm, characterized in that: The steps include: S11: Acquire a model algorithm information set; the model algorithm information is information about the model algorithm, including at least an interface name, input parameter information, and a program instruction set; S12: obtaining a calling relationship of the model algorithm by analyzing a program instruction set of each model algorithm in the model algorithm information set; S13: constructing a corresponding fast function for each called model algorithm according to the calling relationship of the model algorithms, and replacing the call to the called model algorithm in the program instruction set of all model algorithms that call the called model algorithm with the call to the corresponding fast function; S21: extracting a set of model algorithms to be executed; S22: sorting the model algorithms in the set of model algorithms to be executed according to the calling relationship of the model algorithms to obtain a sorted model algorithm queue, so that the called model algorithm is arranged before the model algorithm that calls the called model algorithm; S31: Obtain input source data set; S32: executing the model algorithms replaced by the quick functions in the sorted model algorithm queue in sequence according to the input source data set; when executing the model algorithms, for the model algorithms that are called, storing the output result data after the model algorithms are executed into the intermediate data set according to the interface name of the model algorithms and the input parameter data of the model algorithms; when the quick function is called, searching the output result data from the intermediate data set according to the interface name and input parameter data of the model algorithm corresponding to the quick function; If the output result data can be found, the found output result data is returned as the output result data of the fast function; If the output result data cannot be found, the model algorithm corresponding to the fast function is executed, and the output result data after the execution is stored in the intermediate data set according to the interface of the model algorithm and the input parameter data of the model algorithm; The step S31 further includes performing collection cycle normalization processing on the periodically collected data in the input source data set, so that the collection cycle of each periodically collected data is the same; the step S32 sequentially executes each model algorithm in the sorted model algorithm queue according to the data set after the collection cycle normalization processing; The collection cycle normalization process is specifically as follows: First, the operation data collection period of each detection device is obtained, then the greatest common divisor of these collection periods is calculated, and finally the greatest common divisor is used as the collection period to make period compensation for the operation data of the detection device; The periodically collected data in the input source data set is the operation data of each detection device.

2. The method for executing a batch model algorithm according to claim 1, characterized in that: The method also includes step S14; the step S14: persistently stores the constructed fast function, the model algorithm information set replaced by step S13, and the model algorithm calling relationship.

3. The method for executing a batch model algorithm according to claim 1, characterized in that: It also includes step S23; in step S23, a first program instruction set is constructed according to the sorted model algorithm queue; in step S32, the first program instruction set is executed according to the input source data set.

4. A batch model algorithm execution device, characterized in that: It includes a model algorithm overall initialization module, a to-be-executed model algorithm initialization module, and a sequential execution module; The model algorithm overall initialization module includes the following modules: M11, used to: obtain a model algorithm information set; the model algorithm information is information about the model algorithm, including at least an interface name, input parameter information, and a program instruction set; M12, used to obtain the calling relationship of the model algorithm by analyzing the program instruction set of each model algorithm in the model algorithm information set; M13, used for: constructing a corresponding fast function for each called model algorithm according to the calling relationship of the model algorithm, and replacing the call to the called model algorithm in the program instruction set of all model algorithms that call the called model algorithm with the call to the corresponding fast function; The model algorithm initialization module to be executed includes the following modules: M21, used to: obtain a set of model algorithms to be executed; M22, used to: sort the model algorithms in the set of model algorithms to be executed according to the calling relationship of the model algorithms to obtain a sorted model algorithm queue, so that the called model algorithm is arranged before the model algorithm that calls the called model algorithm; The sequential execution module includes the following modules: M31 is used to: obtain input source data sets; M32, used for: executing each model algorithm replaced by the quick function in the sorted model algorithm queue in sequence according to the input source data set; when executing the model algorithm, for the model algorithm that is called, storing the output result data after the execution of the model algorithm into the intermediate data set according to the interface name of the model algorithm and the input parameter data of the model algorithm; when the quick function is called, searching the output result data from the intermediate data set according to the interface name and input parameter data of the model algorithm corresponding to the quick function; If the output result data can be found, the found output result data is returned as the output result data of the fast function; If the output result data cannot be found, the model algorithm corresponding to the fast function is executed, and the output result data after the execution is stored in the intermediate data set according to the interface of the model algorithm and the input parameter data of the model algorithm; The module M31 further includes performing collection cycle normalization processing on the periodically collected data in the input source data set, so that the collection cycle of each periodically collected data is the same; the module M32 sequentially executes each model algorithm in the sorted model algorithm queue according to the data set after the collection cycle normalization processing; The collection cycle normalization process is specifically as follows: First, the operation data collection period of each detection device is obtained, then the greatest common divisor of these collection periods is calculated, and finally the greatest common divisor is used as the collection period to make period compensation for the operation data of the detection device; The periodically collected data in the input source data set is the operation data of each detection device.

5. The execution device of the batch model algorithm according to claim 4, characterized in that: The model algorithm overall initialization module also includes a module M14; the module M14 is used to: continuously store the constructed fast function, the model algorithm information set replaced by the module M13, and the model algorithm calling relationship.

6. The execution device of the batch model algorithm according to claim 4, characterized in that: The model algorithm initialization module to be executed also includes a module M23; the module M23 is used to: construct a first program instruction set according to the sorted model algorithm queue; in the module M32, execute the first program instruction set according to the input source data set.