Algorithm development method, device and system and storage medium

By defining algorithm interface characteristic parameters and dynamic loading mechanism, the algorithm layer and application layer in the software system are decoupled, solving the problem in the existing technology that the application layer needs to be adjusted when the algorithm is modified or added, and reducing development and maintenance costs. , which improves the flexibility and scalability of the system.

CN119336315AInactive Publication Date: 2025-01-21SHENZHEN SEICHITECH TECHN CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411864982.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-01-21
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the application layer and the algorithm layer of the software system are highly coupled, resulting in the need to adjust and redevelop the application layer accordingly when the algorithm layer is modified or added, which increases the development cost and maintenance difficulty.

Method used

By defining the algorithm interface characteristic parameters, compiling the algorithm and forming a dynamic link library, using the reflection mechanism and template selector, the dynamic loading of the algorithm and the automatic matching of the user interface template are realized, avoiding direct adjustment of the application layer.

Benefits of technology

It reduces the coupling degree between the application layer and the algorithm layer of the software system, reduces the dependence on the application layer when the algorithm layer is modified or added, reduces development and maintenance costs, and improves the flexibility and scalability of the software system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336315A_ABST
    Figure CN119336315A_ABST
Patent Text Reader

Abstract

The invention discloses an algorithm development method, device and system and a storage medium, which can effectively reduce the coupling degree of an application layer and an algorithm layer of software, so that when the algorithm layer is modified or newly added, the application layer does not need to be correspondingly adjusted and re-developed, the development process is not influenced, and the development efficiency is improved. And the development and maintenance cost of software can be reduced. The method comprises the following steps: defining algorithm interface characteristic parameters; defining parameter instructions of the input parameters and the output parameters according to the algorithm interface characteristic parameters; compiling an algorithm according to the algorithm interface characteristic parameter and the parameter description, and arranging the algorithm and algorithm information to form a dynamic link library; constructing a template selector; when software runs, a to-be-selected algorithm of the dynamic link library is scanned and called through a reflection mechanism, a user interface template is automatically matched through a template selector according to the data type of the input parameter of the to-be-selected algorithm, and the to-be-selected algorithm is the algorithm conforming to the algorithm interface characteristic parameter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an algorithm development method, device, system and storage medium. Background Art

[0002] In the fields of computer science, software engineering, and algorithm design, the development of software systems usually involves the coupling of the application layer and the algorithm layer. The application layer is responsible for interacting with users, receiving user input, and calling the corresponding algorithm layer for calculation and processing according to user needs. The algorithm layer is responsible for specific algorithm implementation and provides calculation and processing functions. Due to the high degree of coupling between the application layer and the algorithm layer, any modification or addition to the algorithm layer may require corresponding adjustments and redevelopment of the application layer.

[0003] The existing processing method is that algorithm personnel write the algorithm and then connect with software personnel, and inform the software personnel of the algorithm name and algorithm parameters through documents or configuration files. The software personnel add the algorithm to the algorithm list, algorithm parameter type and requirements to add the UI into the software.

[0004] In the above processing process, the cost for algorithm personnel and software personnel is high, and when collaborating, they may encounter problems such as data consistency, parameter format mismatch and version control conflict, which will lead to interface call errors, delaying the development process and resulting in high development costs. Summary of the invention

[0005] The present application provides an algorithm development method, device, system and storage medium, which can effectively reduce the coupling degree between the application layer and the algorithm layer of the software, so that when the algorithm layer is modified or added, there is no need to make corresponding adjustments and redevelopment of the application layer, which will not affect the development process and can reduce the development and maintenance costs of the software.

[0006] The first aspect of the present application provides an algorithm development method, the method comprising: Define algorithm interface characteristic parameters; Define parameter descriptions of input parameters and output parameters according to the algorithm interface characteristic parameters; Compile the algorithm according to the algorithm interface characteristic parameters and the parameter description, and organize the algorithm and the algorithm information into a dynamic link library; Build a template selector; When the software is running, the algorithm to be selected in the dynamic link library is scanned and called through the reflection mechanism, and the user interface template is automatically matched according to the data type of the input parameter of the algorithm to be selected through the template selector, and the algorithm to be selected is an algorithm that meets the characteristic parameters of the algorithm interface; After determining a target algorithm from the candidate algorithms according to the user operation information, calling out a target user interface template of the target algorithm; The parameter value input by the user is input into the target user interface template, and the output result is displayed through the target user interface template.

[0007] Optionally, the parameter description of the input parameter and the output parameter is defined according to the characteristic parameters of the algorithm interface, including: Obtain the algorithm name and algorithm type in the algorithm interface characteristic parameters; The parameter description of the input parameters and the output parameters is defined according to the algorithm name and the algorithm type, wherein the parameter description includes the data type, parameter classification and parameter name, the data type requires parameters, initialization data and parameter status.

[0008] Optionally, automatically matching a user interface template according to a data type of an input parameter of the algorithm to be selected by the template selector includes: When the data type of the input parameter is bool, the CheckBox template is automatically matched according to the data type bool through the template selector; When the data type of the input parameter is int, the template selector automatically matches the TextBox template according to the data type int; When the data type of the input parameter is a KeyValue array, the ComboBox drop-down selection template is automatically matched according to the data type KeyValue array through the template selector.

[0009] Optionally, scanning and calling the candidate algorithm of the dynamic link library through a reflection mechanism includes: Scan the algorithms in the dynamic link library through a reflection mechanism; Determining whether the algorithm in the dynamic link library uses the algorithm interface characteristic parameters; If so, the candidate algorithm of the dynamic link library is called, and the candidate algorithm is an algorithm that meets the characteristic parameters of the algorithm interface.

[0010] Optionally, inputting the parameter value input by the user into the target user interface template, and displaying the output result through the target user interface template, includes: Get the parameter value entered by the user; Determine whether the numerical type of the parameter value input by the user conforms to the parameter description of the target algorithm input parameter; If yes, inputting the parameter value input by the user into the target user interface template to obtain an output result; The output result is displayed through a target user interface template.

[0011] Optionally, after determining a target algorithm from the candidate algorithms according to the user operation information, calling out a target user interface template of the target algorithm includes: Get user operation information; identifying an operation instruction according to the user operation information; A target algorithm is determined from the candidate algorithms through the operation instruction, and a target user interface template of the target algorithm is called out.

[0012] Optionally, when the software is running, before scanning and calling the candidate algorithm of the dynamic link library through the reflection mechanism, the method further includes: The dynamic link library is stored in the software directory of the software.

[0013] A second aspect of the present application provides an algorithm development system, the system comprising: The first definition unit is used to define characteristic parameters of the algorithm interface; A second definition unit, used to define parameter descriptions of input parameters and output parameters according to the algorithm interface characteristic parameters; A compiling unit, used for compiling the algorithm according to the algorithm interface characteristic parameters and the parameter description, and arranging the algorithm and the algorithm information to form a dynamic link library; Construction unit, used to build template selector; A calling unit, used to scan and call the candidate algorithm of the dynamic link library through a reflection mechanism when the software is running, and automatically match the user interface template according to the data type of the input parameter of the candidate algorithm through the template selector, wherein the candidate algorithm is an algorithm that meets the characteristic parameters of the algorithm interface; A calling unit, configured to call out a target user interface template of the target algorithm after determining the target algorithm from the candidate algorithms according to user operation information; The display unit is used to input the parameter value input by the user into the target user interface template, and display the output result through the target user interface template.

[0014] A third aspect of the present application provides an algorithm development device, the device comprising: processor, memory, input-output unit, and bus; The processor is connected to the storage, the input and output unit, and the bus; The storage stores a program, and the processor calls the program to execute the first aspect and any optional method in the first aspect.

[0015] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional method in the first aspect.

[0016] It can be seen from the above technical solutions that this application has the following advantages: 1. It can effectively reduce the coupling between the application layer and the algorithm layer of the software, so that when the algorithm layer is modified or added, there is no need to adjust and redevelop the application layer accordingly, thereby reducing the development and maintenance costs of the software system.

[0017] 2. By introducing a template selector to select different algorithm user interface templates, it can be achieved that no matter how the algorithm is modified, the modified content can be displayed on the user interface template without relying on the application layer for debugging.

[0018] 3. The implementation method of the limited protection algorithm layer allows the algorithm to be debugged independently, which not only reduces the difficulty of software system development and maintenance, but also improves the reliability and stability of the software system.

[0019] 4. This application solution does not rely on a specific programming language and framework and has good universality and scalability.

[0020] 5. The flexibility and scalability of the software are enhanced through the mechanisms of algorithm modularization, dynamic loading, and user interface adaptation. New algorithms can be introduced, existing algorithms can be updated, or the user interface can be adjusted to adapt to changing needs and environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 A flowchart of an embodiment of the algorithm development method of the present application; Figure 2 A schematic diagram of another embodiment of the algorithm development method of the present application; Figure 3 A schematic diagram of another embodiment of the algorithm development method of the present application; Figure 4 A schematic diagram of another embodiment of the algorithm development method of the present application; Figure 5 Another embodiment of the algorithm development method of this application is shown in FIG. Figure 6A schematic diagram of an embodiment of the algorithm development system of the present application; Figure 7 A schematic diagram of an embodiment of an algorithm development device of the present application. DETAILED DESCRIPTION

[0023] The present application provides an algorithm development method, device, system and storage medium, which can effectively reduce the coupling degree between the application layer and the algorithm layer of the software, so that when the algorithm layer is modified or added, there is no need to make corresponding adjustments and redevelopment of the application layer, which will not affect the development process and can reduce the development and maintenance costs of the software.

[0024] See also Figure 1 In a first aspect, the present application provides an embodiment of an algorithm development method, comprising: 101. Define algorithm interface characteristic parameters; 102. Define parameter descriptions of input parameters and output parameters according to the algorithm interface characteristic parameters; 103. Compile the algorithm according to the algorithm interface characteristic parameters and the parameter description, and organize the algorithm and the algorithm information to form a dynamic link library; 104. Build a template selector; 105. When the software is running, the algorithm to be selected of the dynamic link library is scanned and called through the reflection mechanism, and the user interface template is automatically matched according to the data type of the input parameter of the algorithm to be selected through the template selector, and the algorithm to be selected is an algorithm that meets the characteristic parameters of the algorithm interface; 106. After determining a target algorithm from the candidate algorithms according to the user operation information, calling out a target user interface template of the target algorithm; 107. Input the parameter value input by the user into the target user interface template, and display the output result through the target user interface template.

[0025] In an embodiment of the present application, the algorithm interface characteristic parameters are first defined, and then the parameter descriptions of the input parameters and the output parameters are defined according to the algorithm interface characteristic parameters. Then, the algorithm is further compiled according to the algorithm interface characteristic parameters and the parameter description, and the algorithm and the algorithm information are organized into a dynamic link library. After the template selector is constructed, and when the software is running, the candidate algorithm of the dynamic link library is scanned and called through the reflection mechanism, and the user interface template is automatically matched according to the data type of the input parameter of the candidate algorithm through the template selector. The candidate algorithm is an algorithm that meets the algorithm interface characteristic parameters. After determining the target algorithm from the candidate algorithm according to the user operation information, the target user interface template of the target algorithm is called out, and then the parameter value input by the user is input into the target user interface template, and the output result is displayed through the target user interface template.

[0026] The algorithm development method of the present application provides a flexible and efficient algorithm integration and application method. Through standardized interfaces and dynamic loading mechanisms, the development, selection and display of algorithms can be integrated into the software, which can effectively reduce the coupling between the application layer and the algorithm layer of the software. Therefore, when the algorithm layer is modified or added, there is no need to make corresponding adjustments and redevelopment of the application layer, thereby reducing the development and maintenance costs of the software system.

[0027] In step 101, the algorithm interface characteristic parameters are first defined. Specifically, by defining the algorithm interface characteristic parameters, it can be ensured that all subsequently developed algorithms can be integrated in accordance with unified standards. The algorithm interface characteristic parameters include the algorithm name and algorithm type. After the algorithm connector characteristic parameters are defined, step 102 is executed.

[0028] In step 102, parameter descriptions of input parameters and output parameters are defined according to the algorithm interface characteristic parameters. Specifically, after the interface characteristic parameters are defined, detailed description documents are provided for the input parameters and output parameters according to the interface characteristic parameters. These descriptions should include the data types of the input parameters and output parameters, parameter classification, parameter name, data type required parameters, initialization data and parameter status, that is, the algorithm interface characteristic parameters defined in step 101 and the algorithm type are defined. According to the algorithm type, the input and output parameter types and the output parameter types can be further limited.

[0029] In step 103, the algorithm is compiled, and the algorithm and algorithm information are organized into a dynamic link library. Specifically, according to the algorithm interface characteristic parameters and the corresponding parameter descriptions, a specific algorithm implementation code can be written and compiled into an executable code through a compiler. The compiled algorithm code and its related information are then packaged into a dynamic link library (DLL). The advantage of a dynamic link library is that it can be dynamically loaded by the software at runtime without determining the specific algorithm implementation at compile time, thereby improving the flexibility and scalability of the software.

[0030] In step 104, a template selector is constructed, wherein the template selector is a mechanism for automatically matching user interface templates according to the data type of the algorithm input parameter. The template selector includes a series of predefined user interface templates, each of which can be used for data input and display, that is, the template selector can parse the data type of the algorithm input parameter and select the most appropriate user interface template based on the data type to ensure that the user can intuitively input parameters and understand the output results.

[0031] In step 105, before the software is run, the obtained dynamic link library is stored in the software directory of the software, so that when the software is running, the dynamic link library in the software is dynamically scanned by using the reflection mechanism, and the candidate algorithm that meets the characteristic parameters of the algorithm interface in the dynamic link library is further obtained, wherein the reflection mechanism allows the software to flexibly load and use the newly developed algorithm at run time without modifying the source code of the software. After the candidate algorithm is selected, the user interface template is automatically matched according to the data type of the input parameter of the candidate algorithm through the template selector, wherein the user interface template can select different templates according to different input parameter types, that is: when the data type of the input parameter is bool, the CheckBox template is automatically matched according to the data type bool through the template selector; when the data type of the input parameter is int, the TextBox template is automatically matched according to the data type int through the template selector; when the data type of the input parameter is KeyValue array, the ComboBox drop-down selection template is automatically matched according to the data type KeyValue array through the template selector. No specific limitation is made to the user interface template matching the data type.

[0032] In step 106, after selecting the candidate algorithms, further determining the target algorithm from the candidate algorithms based on the user operation information, the target user interface template is called out. Specifically, after receiving the user's operation information, one or more algorithms are selected as the target algorithm based on the user's operation information, and then the template selector is used to automatically call out the user interface template that matches the target algorithm, and prepare to receive the user's input. It should be noted that one target algorithm matches one user interface template, that is, there are as many user interface templates as there are target algorithms, and the number of target algorithms and user interface templates is not specifically limited in this application.

[0033] In step 107, the parameter values ​​input by the user are input into the target user interface template, these inputs are received through the user interface template, and the input parameter values ​​are passed to the target algorithm for processing. After the target algorithm is executed, the results are displayed to the user through the same user interface template.

[0034] In summary, the algorithm development method proposed in this application realizes a highly flexible, scalable and user-friendly algorithm integration and application method by defining standardized algorithm interface characteristic parameters, dynamically loading algorithms, and automatically matching user interface templates. And by introducing a template selector to select different algorithm user interface templates, it can be achieved that no matter how the algorithm is modified, the modified content can be displayed on the user interface template without relying on the application layer for debugging, thereby reducing the development and maintenance costs of the software system.

[0035] Reference Figure 2According to some embodiments of the present invention, the parameter description of defining the input parameters and the output parameters according to the algorithm interface characteristic parameters in step 102 may specifically include, but is not limited to, the following: 201. Obtain an algorithm name and an algorithm type in the algorithm interface characteristic parameters; 202. Define parameter descriptions of input parameters and output parameters according to the algorithm name and the algorithm type, the parameter descriptions including data type, parameter classification and parameter name, the data type requires parameters, initialization data and parameter status.

[0036] In an embodiment of the present application, the algorithm name and algorithm type in the algorithm interface characteristic parameters are obtained, wherein the algorithm name is the identifier of the algorithm, which is used to distinguish different algorithms in the software, and the name of the algorithm enables the user to quickly understand the function or purpose of the algorithm; the algorithm type describes the category or field to which the algorithm belongs, such as image processing algorithm, data analysis algorithm, machine learning algorithm, etc. The algorithm type helps to classify and retrieve algorithms, and also facilitates users to quickly find suitable algorithms according to their needs.

[0037] The purpose of obtaining the algorithm name and algorithm type is to accurately define the input and output parameters for the algorithm and to build a matching user interface template.

[0038] After obtaining the algorithm name and type, you need to write parameter descriptions for the algorithm's input and output parameters. The parameter description is an integral part of the algorithm interface. The parameter description defines the way and rules for the algorithm to interact with the outside world. Specifically, the parameter description should include the following: Data type: specifies the data format or type supported by the parameter, such as integer, floating point number, string, array, object, etc.

[0039] Parameter classification: Classify parameters, such as input parameters, output parameters, optional parameters, required parameters, etc. Parameter classification helps users understand the role and importance of parameters, and how to configure these parameters when using algorithms.

[0040] Parameter name: It is the identifier of the parameter assignment and is used to reference the parameter in the code and documentation. The parameter name is descriptive and can reflect the meaning or purpose of the parameter.

[0041] Initialization data: For some parameters, default values ​​or initial values ​​need to be provided so that there is a reasonable starting point when the algorithm is executed. The initialization data can be a specific value, an empty array, a default object, etc., depending on the data type of the parameter and the requirements of the algorithm.

[0042] Parameter status: refers to the status information of the parameters during the execution of the algorithm, such as whether it has been modified, whether it is valid, whether it has been verified, etc.

[0043] It can be seen that by writing detailed parameter descriptions for the input and output parameters of the algorithm, it can ensure that the algorithm users can accurately understand the meaning and function of the parameters, so as to correctly configure and use the algorithm. At the same time, this also provides clear interface specifications, which helps to ensure the correct implementation and integration of the algorithm.

[0044] Reference Figure 3 According to some embodiments of the present invention, the algorithm to be selected by scanning and calling the dynamic link library through the reflection mechanism in step 105 may specifically include, but is not limited to, the following: 301. Scan the algorithms in the dynamic link library through a reflection mechanism; 302. Determine whether the algorithm in the dynamic link library uses the algorithm interface characteristic parameters; 303. If yes, call the candidate algorithm of the dynamic link library, where the candidate algorithm is an algorithm that meets the characteristic parameters of the algorithm interface.

[0045] In an embodiment of the present application, the algorithms in the dynamic link library are scanned through the reflection mechanism. The reflection mechanism is a technology that can check, call and modify the structure and behavior of the program itself at runtime. In the present application, the reflection mechanism is used to dynamically scan the dynamic link library loaded into the software to identify the algorithms contained therein. Specifically, the software first loads the dynamic link library file containing the algorithm. Once the dynamic link library is loaded, the reflection mechanism can be used to query the algorithms defined in the library, including obtaining the algorithm name, version number, author, description and other information, as well as the algorithm entry point. After that, the software lists all available algorithms in the dynamic link library through the reflection mechanism.

[0046] After scanning the algorithms in the dynamic link library, the software needs to determine whether these algorithms comply with the predefined algorithm interface characteristic parameters. The purpose is to ensure the key of interoperability between algorithms, because only when the algorithms follow the same interface specifications can they be integrated and used by the software.

[0047] The software compares the interface characteristic parameters of each algorithm, such as the input parameter type of the algorithm, with the algorithm interface characteristic parameters. If the two match, it means that the algorithm complies with the interface specification. After the above comparison, if an algorithm in the dynamic link library is determined to comply with the algorithm interface characteristic parameters, then this algorithm is regarded as a candidate algorithm and can be called and executed by the software.

[0048] By scanning the algorithms in the dynamic link library through the reflection mechanism, judging whether the algorithms conform to the characteristic parameters of the algorithm interface, and calling the candidate algorithms that conform to the specifications, dynamic loading and flexible integration of algorithms can be achieved.

[0049] Reference Figure 4 According to some embodiments of the present invention, in step 107, the parameter value input by the user is input into the target user interface template, and the output result is displayed through the target user interface template, which may specifically include, but is not limited to, the following: 401. Get the parameter value entered by the user; 402. Determine whether the numerical type of the parameter value input by the user conforms to the parameter description of the target algorithm input parameter; 403. If yes, input the parameter value input by the user into the target user interface template to obtain an output result; 404. Display the output result through a target user interface template.

[0050] In the embodiment of the present application, the parameter values ​​input by the user are obtained in order to collect the parameter values ​​required for the execution of the algorithm, which is implemented through a user interface. The user interface can be graphical, such as a window, a dialog box, etc., or a command line. After obtaining the parameter values ​​input by the user, the parameter values ​​are entered in the corresponding input box or command line according to the requirements of the algorithm input parameters. After obtaining the parameter values ​​input by the user, the software needs to verify these parameter values ​​to ensure that they meet the parameter description of the target algorithm input parameters. This step involves checking whether the numerical type of the parameter value is consistent with the type expected by the algorithm. If the parameter value does not meet the requirements, the software will provide a clear error prompt to the user and guide the user to re-enter the correct parameter value.

[0051] If the parameter values ​​entered by the user pass the verification and meet the parameter description of the target algorithm input parameters, the software will pass these parameter values ​​to the target algorithm for execution. During this process, the software will use the previously selected target user interface template to pass the parameter values ​​to the algorithm in an appropriate form. The target user interface template is not only used to display the output results of the algorithm, but also to receive and display the parameter values ​​entered by the user before the algorithm is executed. In this way, users can see the input and output of the algorithm through the same interface, so as to better understand the working process and results of the algorithm.

[0052] After the algorithm is executed, the software will obtain the output results of the algorithm and display them to the user through the previously selected target user interface template. For example, it can be a simple text output, or a more intuitive display method such as a chart or image. No matter which method is used, the accuracy and readability of the output results can be ensured so that users can correctly understand and use these results.

[0053] Reference Figure 5According to some embodiments of the present invention, after determining the target algorithm from the candidate algorithms according to the user operation information in step 106, calling out the target user interface template of the target algorithm may specifically include, but is not limited to, the following: 501. Obtain user operation information; 502. Identify an operation instruction according to the user operation information; 503. Determine a target algorithm from the candidate algorithms through the operation instruction, and call out a target user interface template of the target algorithm.

[0054] In the embodiment of the present application, various operation behavior data performed by the user are obtained through the software interface. The user operation information may include but is not limited to the following: click events, input data, drag and drop, slide and zoom, and selection operations. After collecting the user operation information, it is necessary to parse it to identify the user's specific operation instructions. After identifying the user's operation instructions, the software will perform the following steps to determine the target algorithm and display the corresponding user interface template: Algorithm selection: According to the user's operation instructions, the target algorithm that the user wants to run is determined from the pre-loaded or defined list of candidate algorithms.

[0055] Template matching: Match the corresponding user interface template for each algorithm. These templates should be able to intuitively display the algorithm's input parameters, execution status, and output results. When the user selects an algorithm, the software will automatically match and call out the corresponding user interface template for the algorithm.

[0056] Interface display: Render the called user interface template onto the software interface for users to input parameters, execute algorithms and view results.

[0057] In summary, the software can achieve a seamless connection from user operation to algorithm execution, providing users with an intuitive, convenient and efficient algorithm application experience.

[0058] Reference Figure 6 The second aspect of the present application provides an algorithm development system, the system comprising: The first definition unit 601 is used to define algorithm interface characteristic parameters; A second definition unit 602, used to define parameter descriptions of input parameters and output parameters according to the algorithm interface characteristic parameters; A compiling unit 603, configured to compile an algorithm according to the algorithm interface characteristic parameters and the parameter description, and organize the algorithm and the algorithm information into a dynamic link library; A construction unit 604, used to construct a template selector; The calling unit 605 is used to scan and call the candidate algorithm of the dynamic link library through the reflection mechanism when the software is running, and automatically match the user interface template according to the data type of the input parameter of the candidate algorithm through the template selector, and the candidate algorithm is an algorithm that meets the characteristic parameters of the algorithm interface; A calling unit 606, configured to call out a target user interface template of the target algorithm after determining the target algorithm from the candidate algorithms according to the user operation information; The display unit 607 is used to input the parameter value input by the user into the target user interface template, and display the output result through the target user interface template.

[0059] Reference Figure 7 According to a third aspect of the present application, there is provided an algorithm development device, the device comprising: Processor 701, memory 702, input and output unit 703 and bus 704; The processor 701 is connected to the storage 702, the input and output unit 703 and the bus 704; The storage 702 stores a program, and the processor 701 calls the program to execute the method as described in the first aspect and any one of the first aspects.

[0060] The present application also relates to a computer-readable storage medium, on which a program is stored. When the program is run on a computer, the computer executes the method as described in the first aspect and any one of the first aspects.

[0061] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0062] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0063] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0064] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0065] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk, etc., various media that can store program codes.

Claims

1. An algorithm development method, characterized in that: The method comprises: Define algorithm interface characteristic parameters; Define parameter descriptions of input parameters and output parameters according to the algorithm interface characteristic parameters; Compile the algorithm according to the algorithm interface characteristic parameters and the parameter description, and organize the algorithm and the algorithm information into a dynamic link library; Build a template selector; When the software is running, the algorithm to be selected in the dynamic link library is scanned and called through the reflection mechanism, and the user interface template is automatically matched according to the data type of the input parameter of the algorithm to be selected through the template selector, and the algorithm to be selected is an algorithm that meets the characteristic parameters of the algorithm interface; After determining a target algorithm from the candidate algorithms according to the user operation information, calling out a target user interface template of the target algorithm; The parameter value input by the user is input into the target user interface template, and the output result is displayed through the target user interface template.

2. The algorithm development method according to claim 1, characterized in that: The parameter description of the input parameters and output parameters is defined according to the characteristic parameters of the algorithm interface, including: Obtain the algorithm name and algorithm type in the algorithm interface characteristic parameters; The parameter description of the input parameters and the output parameters is defined according to the algorithm name and the algorithm type, wherein the parameter description includes the data type, parameter classification and parameter name, the data type requires parameters, initialization data and parameter status.

3. The algorithm development method according to claim 1, characterized in that: Automatically matching the user interface template according to the data type of the input parameter of the algorithm to be selected by the template selector includes: When the data type of the input parameter is bool, the CheckBox template is automatically matched according to the data type bool through the template selector; When the data type of the input parameter is int, the template selector automatically matches the TextBox template according to the data type int; When the data type of the input parameter is a KeyValue array, the ComboBox drop-down selection template is automatically matched according to the data type KeyValue array through the template selector.

4. The algorithm development method according to claim 1, characterized in that: Scanning and calling the candidate algorithm of the dynamic link library through the reflection mechanism includes: Scan the algorithms in the dynamic link library through a reflection mechanism; Determining whether the algorithm in the dynamic link library uses the algorithm interface characteristic parameters; If so, the candidate algorithm of the dynamic link library is called, and the candidate algorithm is an algorithm that meets the characteristic parameters of the algorithm interface.

5. The algorithm development method according to claim 1, characterized in that: Inputting the parameter value input by the user into the target user interface template, and displaying the output result through the target user interface template, including: Get the parameter value entered by the user; Determine whether the numerical type of the parameter value input by the user conforms to the parameter description of the target algorithm input parameter; If yes, inputting the parameter value input by the user into the target user interface template to obtain an output result; The output result is displayed through a target user interface template.

6. The algorithm development method according to claim 1, characterized in that: After determining a target algorithm from the candidate algorithms according to the user operation information, calling out a target user interface template of the target algorithm includes: Get user operation information; identifying an operation instruction according to the user operation information; A target algorithm is determined from the candidate algorithms through the operation instruction, and a target user interface template of the target algorithm is called out.

7. The algorithm development method according to claim 1, characterized in that: When the software is running, before scanning and calling the candidate algorithm of the dynamic link library through the reflection mechanism, the method further includes: The dynamic link library is stored in the software directory of the software.

8. An algorithm development system, characterized in that: The system comprises: The first definition unit is used to define characteristic parameters of the algorithm interface; A second definition unit, used to define parameter descriptions of input parameters and output parameters according to the algorithm interface characteristic parameters; A compiling unit, used for compiling the algorithm according to the algorithm interface characteristic parameters and the parameter description, and arranging the algorithm and the algorithm information to form a dynamic link library; Construction unit, used to build template selector; A calling unit, used to scan and call the candidate algorithm of the dynamic link library through a reflection mechanism when the software is running, and automatically match the user interface template according to the data type of the input parameter of the candidate algorithm through the template selector, wherein the candidate algorithm is an algorithm that meets the characteristic parameters of the algorithm interface; A calling unit, configured to call out a target user interface template of the target algorithm after determining the target algorithm from the candidate algorithms according to user operation information; The display unit is used to input the parameter value input by the user into the target user interface template, and display the output result through the target user interface template.

9. An algorithm development device, characterized in that: The device comprises: processor, memory, input-output unit, and bus; The processor is connected to the storage, the input and output unit, and the bus; The storage stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Algorithm arrangement method and device, equipment and medium

    CN115686488A

  • Image processing method and device, storage medium and terminal

    CN115994086A

  • Method for packaging and debugging mature algorithm block on user side

    CN117389547A