CN116431308A - Multi-algorithm scheduling method, device, equipment and storage medium - Google Patents

Multi-algorithm scheduling method, device, equipment and storage medium Download PDF

Info

Publication number
CN116431308A
CN116431308A CN202310422880.0A CN202310422880A CN116431308A CN 116431308 A CN116431308 A CN 116431308A CN 202310422880 A CN202310422880 A CN 202310422880A CN 116431308 A CN116431308 A CN 116431308A
Authority
CN
China
Prior art keywords
algorithm
plug
algorithm plug
control signal
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310422880.0A
Other languages
Chinese (zh)
Inventor
袁郑
洪敏新
曲家朋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
PCI Technology Group Co Ltd
Original Assignee
PCI Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by PCI Technology Group Co Ltd filed Critical PCI Technology Group Co Ltd
Priority to CN202310422880.0A priority Critical patent/CN116431308A/en
Publication of CN116431308A publication Critical patent/CN116431308A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application discloses a multi-algorithm scheduling method, a multi-algorithm scheduling device, multi-algorithm scheduling equipment and a storage medium. According to the technical scheme provided by the embodiment of the application, at least one algorithm identifier is obtained, and a corresponding plug-in identifier is obtained according to the algorithm identifier and a preset association relationship; calling a corresponding algorithm plug-in according to the plug-in identification through a unified service interface; according to a start-stop control signal input by a user, the start-stop of the called algorithm plug-in is controlled, so that the problem of high operation and maintenance difficulty of multi-algorithm scheduling can be solved, the operation and maintenance difficulty of multi-algorithm scheduling is reduced, and the operation and maintenance cost is saved.

Description

Multi-algorithm scheduling method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of algorithm scheduling, in particular to a multi-algorithm scheduling method, a multi-algorithm scheduling device, multi-algorithm scheduling equipment and a multi-algorithm scheduling storage medium.
Background
Each application program can open a series of service interfaces to the outside and can call services in other applications, and a cross nested service call relationship exists between the applications. In a service call relationship, a service provider is called a service provider, a service consumer is called a service consumer, the service provider opens an interface to the outside, the service consumer obtains the service from the service provider according to the opened interface, and the service can be passed only if the service interface called by the service consumer is completely consistent with the interface provided by the service provider, so if the interface provided by the service provider to the outside is changed, the caller also needs to modify to ensure that the call relationship operates normally.
When multi-algorithm control is performed, an algorithm calling interface is generally set corresponding to each algorithm, and the service application calls the corresponding algorithm through the corresponding algorithm calling interface. When a certain algorithm service is upgraded or changed, the problem of inconsistent algorithm calling interfaces is caused, so that service consumers in the calling relationship chain cannot acquire the service from the provider, and the service consumers can normally use the service after corresponding modification is carried out on the service application and the corresponding algorithm calling interfaces. In this way, when the number of the algorithm calling interfaces is large, the corresponding operation and maintenance difficulty is large, and the operation and maintenance cost is high.
Disclosure of Invention
The embodiment of the application provides a multi-algorithm scheduling method, a device, equipment and a storage medium, which can solve the problem of high operation and maintenance difficulty of multi-algorithm scheduling, reduce the operation and maintenance difficulty of multi-algorithm scheduling and save operation and maintenance cost.
In a first aspect, an embodiment of the present application provides a multi-algorithm scheduling method, including:
acquiring at least one algorithm identifier, and acquiring a corresponding plug-in identifier according to the algorithm identifier and a preset association relationship;
calling a corresponding algorithm plug-in according to the plug-in identification through a unified service interface;
and controlling the start and stop of the invoked algorithm plug-in according to a start and stop control signal input by a user.
Further, the calling, through the unified service interface, the corresponding algorithm plugin according to the plugin identifier includes:
scanning a plugin catalog according to the plugin identification through a unified service interface, and judging whether to scan to obtain a corresponding algorithm plugin;
if the corresponding algorithm plug-in is obtained through scanning, calling the algorithm plug-in;
if the corresponding algorithm plug-in is not obtained through scanning, the calling fails.
Further, if the corresponding algorithm plug-in is obtained by scanning, the algorithm plug-in is called, including:
if the corresponding algorithm plug-in is obtained through scanning, judging whether the algorithm plug-in is already loaded or not;
if the algorithm plug-in is already loaded, calling the algorithm plug-in;
if the algorithm plug-in is not loaded, a plug-in object is created for the algorithm plug-in, the dependency of the plug-in is verified, and after verification is passed, the algorithm plug-in is called.
Further, if the algorithm plug-in has been loaded, invoking the algorithm plug-in includes:
if the algorithm plug-in is already loaded, judging whether the algorithm plug-in is already installed or not;
if the algorithm plug-in is installed, calling the algorithm plug-in;
if the algorithm plug-in is not installed, a static file is issued, information of the algorithm plug-in is put in storage, and after the plug-in state is updated to be enabled, the algorithm plug-in is called.
Further, the controlling the start and stop of the invoked algorithm plug-in according to the start and stop control signal input by the user includes:
receiving a starting control signal input by a user;
acquiring a description object of the algorithm plug-in according to the starting control signal, and verifying the validity of the description object;
verifying that the validity of the description object passes, controlling the algorithm plug-in to start operation, and outputting a corresponding algorithm result;
and receiving a stop control signal input by a user, and controlling the suspension operation of the algorithm plug-in according to the stop control signal.
Further, the controlling the start and stop of the invoked algorithm plug-in according to the start and stop control signal input by the user includes:
according to a starting control signal input by a user based on a first algorithm plug-in, controlling the first algorithm plug-in to start running, and outputting a corresponding algorithm result;
and controlling the second algorithm plug-in to pause operation according to a stop control signal input by a user based on the second algorithm plug-in.
Further, the first algorithm plug-in comprises at least two algorithm plug-ins;
the method for controlling the first algorithm plug-in to start to operate according to the starting control signal input by the user based on the first algorithm plug-in, and outputting the corresponding algorithm result comprises the following steps:
and simultaneously controlling the at least two algorithm plug-ins to start running according to a starting control signal input by a user based on the at least two algorithm plug-ins, and outputting corresponding at least two algorithm results.
In a second aspect, an embodiment of the present application provides a multi-algorithm scheduling apparatus, including:
the plug-in identification acquisition unit is used for acquiring at least one algorithm identification and acquiring a corresponding plug-in identification according to the algorithm identification and a preset association relationship;
the algorithm plug-in calling unit is used for calling a corresponding algorithm plug-in according to the plug-in identification through the unified service interface;
and the start-stop unit is used for controlling the start-stop of the invoked algorithm plug-in according to a start-stop control signal input by a user.
Further, the algorithm plug-in calling unit is further configured to scan a plug-in directory according to the plug-in identifier through a unified service interface, and determine whether to scan to obtain a corresponding algorithm plug-in;
if the corresponding algorithm plug-in is obtained through scanning, calling the algorithm plug-in;
if the corresponding algorithm plug-in is not obtained through scanning, the calling fails.
Further, the algorithm plug-in calling unit is further configured to determine whether the algorithm plug-in has been loaded if a corresponding algorithm plug-in is obtained by scanning;
if the algorithm plug-in is already loaded, calling the algorithm plug-in;
if the algorithm plug-in is not loaded, a plug-in object is created for the algorithm plug-in, the dependency of the plug-in is verified, and after verification is passed, the algorithm plug-in is called.
Further, the algorithm plug-in calling unit is further configured to determine whether the algorithm plug-in is installed if the algorithm plug-in is already loaded;
if the algorithm plug-in is installed, calling the algorithm plug-in;
if the algorithm plug-in is not installed, a static file is issued, information of the algorithm plug-in is put in storage, and after the plug-in state is updated to be enabled, the algorithm plug-in is called.
Further, the start-stop unit is further configured to receive a start control signal input by a user;
acquiring a description object of the algorithm plug-in according to the starting control signal, and verifying the validity of the description object;
verifying that the validity of the description object passes, controlling the algorithm plug-in to start operation, and outputting a corresponding algorithm result;
and receiving a stop control signal input by a user, and controlling the suspension operation of the algorithm plug-in according to the stop control signal.
Further, the start-stop unit is further configured to control, according to a start control signal input by a user based on the first algorithm plug-in, the first algorithm plug-in to start running, and output a corresponding algorithm result;
and controlling the second algorithm plug-in to pause operation according to a stop control signal input by a user based on the second algorithm plug-in.
Further, the first algorithm plug-in comprises at least two algorithm plug-ins;
the start-stop unit is further used for simultaneously controlling the at least two algorithm plug-ins to start running according to a start control signal input by a user based on the at least two algorithm plug-ins and outputting corresponding at least two algorithm results.
In a third aspect, an embodiment of the present application provides a multi-algorithm scheduling apparatus, including:
a memory and one or more processors;
the memory is used for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the multi-algorithm scheduling method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium storing computer executable instructions that when executed by a computer processor are for performing the multi-algorithm scheduling method of the first aspect.
According to the embodiment of the application, the corresponding plug-in identification is obtained through obtaining at least one algorithm identification and according to the algorithm identification and the preset association relation, the corresponding algorithm plug-in is called through the unified service interface according to the plug-in identification, and the start and stop of the called algorithm plug-in are controlled according to the start and stop control signals input by a user. By adopting the technical means, the algorithm plug-in can be called according to the plug-in identification through the unified service interface, and the subsequent operation and maintenance only needs to be carried out aiming at the unified service interface, so that the problem of high difficulty in operation and maintenance of multi-algorithm scheduling can be avoided, the difficulty in operation and maintenance of the multi-algorithm scheduling is reduced, and the operation and maintenance cost is saved. In addition, the start and stop of the corresponding algorithm plug-in can be controlled according to the start and stop control signals input by the user, and the flexibility of multi-algorithm scheduling control is improved.
Drawings
FIG. 1 is a flowchart of a multi-algorithm scheduling method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a preset association relationship provided in an embodiment of the present application;
FIG. 3 is a flowchart of a call initiation algorithm plug-in provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of an upload and start algorithm plug-in provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of an algorithm list provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a multi-algorithm scheduling device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a multi-algorithm scheduling device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the following detailed description of specific embodiments thereof is given with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the matters related to the present application are shown in the accompanying drawings. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The multi-algorithm scheduling method, the device, the equipment and the storage medium provided by the application aim at calling the algorithm plug-in through the unified service interface according to the plug-in identification when the multi-algorithm scheduling is performed, and subsequent operation and maintenance only need to be performed aiming at the unified service interface, so that the operation and maintenance difficulty of the multi-algorithm scheduling is reduced, and the operation and maintenance cost is saved. In addition, the start and stop of the corresponding algorithm plug-in is controlled according to the start and stop control signal input by the user, so that the flexibility of multi-algorithm scheduling control is improved. Compared with the traditional multi-algorithm scheduling mode, an algorithm calling interface is arranged corresponding to each algorithm, and the service application calls the corresponding algorithm through the corresponding algorithm calling interface. When a certain algorithm service is upgraded or changed, the problem of inconsistent algorithm calling interfaces is caused, so that service consumers in the calling relationship chain cannot acquire the service from the provider, and the service consumers can normally use the service after corresponding modification is carried out on the service application and the corresponding algorithm calling interfaces. In this way, when the number of the algorithm calling interfaces is large, the corresponding operation and maintenance difficulty is large, and the operation and maintenance cost is high. Based on the above, the multi-algorithm scheduling method of the embodiment of the application is provided to solve the problem that the existing multi-algorithm scheduling operation and maintenance are difficult.
Fig. 1 shows a flowchart of a multi-algorithm scheduling method provided in the embodiment of the present application, where the multi-algorithm scheduling method provided in the embodiment may be implemented by a multi-algorithm scheduling device, and the multi-algorithm scheduling device may be implemented by software and/or hardware, and the multi-algorithm scheduling device may be configured by two or more physical entities or may be configured by one physical entity. In general, the multi-algorithm scheduling device may be a terminal device, such as a computer device or the like.
The following description will take a computer device as an example of a main body for executing the multi-algorithm scheduling method. Referring to fig. 1, the multi-algorithm scheduling method specifically includes:
s101, acquiring at least one algorithm identifier, and acquiring a corresponding plug-in identifier according to the algorithm identifier and a preset association relation.
Algorithm identification may be understood as a label used to identify an algorithm. The method comprises the steps of designing an algorithm plug-in advance, establishing a corresponding plug-in identifier and corresponding algorithm identifier, platform information and the like according to the designed algorithm plug-in, and establishing preset association according to the plug-in identifier, the algorithm identifier, the platform information and the like. Fig. 2 is a schematic diagram of a preset association relationship provided in the embodiment of the present application, and referring to fig. 2, a preset algorithm version table, a platform algorithm association table, a platform information table and a plug-in table. Key fields in the algorithm version table include algorithm identification, algorithm alias, algorithm name, vendor identification, etc. Each algorithm identification in the algorithm version table has a corresponding associated algorithm alias, algorithm name, vendor identification, etc. The key fields of the platform algorithm association table are algorithm identification, platform ID and the like. The platform algorithm association table is associated with the algorithm version table, and both the platform algorithm association table and the algorithm version table comprise algorithm identification fields, so that association information in the two tables can be found through algorithm identification. The key fields of the platform information table comprise a platform ID, a platform name, an account number password, an IP port, a plug-in ID and the like. The platform information table is associated with the platform algorithm association table, and key fields based on the platform information table and the platform algorithm association table comprise platform ID fields, so that the association information in the two tables can be found through the platform IDs. Key fields of the plug-in table include plug-in ID, plug-in name, plug-in version, plug-in status, etc. The plug-in table is associated with the platform information table, and key fields based on the two table comprise plug-in identifications (plug-in IDs), so that the associated information in the two tables can be found through the plug-in identifications (plug-in IDs). In summary, the corresponding plug-in identifier (plug-in ID) can be obtained according to the association relationship of the algorithm identifier based on the algorithm version table, the platform algorithm association table, the platform information table and the plug-in table.
When a certain algorithm is needed to be applied, the algorithm identification of the algorithm is needed to be obtained, and the corresponding plug-in identification is obtained according to the algorithm identification and the preset association relation. When a plurality of algorithms need to be applied, a plurality of corresponding plug-in identifiers can be obtained according to the corresponding algorithm identifiers of the algorithms and the preset association relation.
And the algorithm identification and the plugin identification (plugin ID) are associated through an algorithm version table, a platform algorithm association table, a platform information table and a plugin table which correspond to the preset association relation, so that the subsequent algorithm is conveniently and directly invoked according to the plugin identification, and the working efficiency of algorithm invocation is improved.
S102, calling a corresponding algorithm plug-in through a unified service interface according to the plug-in identification.
A service interface can be understood as a shared boundary of an application and an algorithmic service. The application program can call the algorithm service through the service interface to realize the operation of the algorithm. The embodiment of the application communicates with various algorithm services through a unified service interface. And the corresponding algorithm plug-in can be found and called according to the plug-in identification through the unified service interface.
The design of the algorithm plug-in is carried out in advance, the algorithm plug-in comprises a plug in (plug-in base class), a plug in manager (abstract plug-in management), a plug in loader (plug-in loading) and an extensionPoint (interface), and all the parts have their own roles and together form the complete life cycle of a plug-in. Among these, plugin (plug-in base class) is a base class of all plug-in types, and Plugin manager (abstract plug-in management) is used for all aspects of plug-in management, including loading, starting and stopping, etc. Plug loader is used to load all the information (classes) required by the plug-in. ExtensionPoint (interface) is the point in an application where custom code can be invoked. This is a java interface tag. Implementation of a specific algorithm plug-in needs to be implemented through this ExtensionPoint (interface). Any java interface or abstract class can be marked as an extension point, i.e., extensionPoint. Plug in (plug-in class) =extensionpoints and Extensions, and lifecycle method (start, stop, and delete).
In an embodiment, the unified service interface may be an SDK (Software Development Kit ) interface, and parameters such as a plug-in identifier (plug-in ID) and a platform ID port are transmitted through the SDK interface, and the service encapsulates request parameters of a corresponding algorithm, and calls a corresponding algorithm plug-in one step. The unified packaging of the same SDK interface is realized by calling different algorithms, and when the algorithm interface is called by the bottom layer application, only the input parameters and the output parameters of the SDK layer are required to be focused, and the calling logic of a specific algorithm is not required to be focused.
The unified service interface calls the corresponding algorithm plug-in according to the plug-in identification, so that operation and maintenance difficulties caused by setting a separate service interface for each algorithm are avoided, the number of the service interfaces is reduced, and operation and maintenance pressure is reduced, thereby reducing operation and maintenance cost.
S103, controlling the start and stop of the invoked algorithm plug-in according to the start and stop control signal input by the user.
And receiving a starting control signal input by a user based on the corresponding algorithm plug-in, controlling the called algorithm plug-in to start running according to the starting control signal, and outputting a corresponding algorithm result. And receiving a stop control signal input by a user, and controlling the called algorithm plug-in to pause operation according to the stop control signal.
In an embodiment, when there is multi-algorithm scheduling, the first algorithm plug-in may be controlled to start to operate according to a start control signal input by the user based on the first algorithm plug-in, and a corresponding algorithm result is output. Wherein the first algorithm plug-in comprises at least one algorithm plug-in. And controlling the second algorithm plug-in to pause operation according to a stop control signal input by the user based on the second algorithm plug-in. Wherein the second algorithm plug-in comprises at least one algorithm plug-in, and the second algorithm plug-in may be the same as the first algorithm plug-in or different from the first algorithm plug-in.
In an embodiment, the first algorithm plug-in comprises at least two algorithm plug-ins. And simultaneously controlling the at least two algorithm plug-ins to start running according to the starting control input by the user based on the at least two algorithm plug-ins, and outputting corresponding at least two algorithm results.
By uniformly scheduling through the multi-algorithm plug-in, plug-in and play are realized, plug-ins are dynamically added and deleted, start and stop of the plug-ins are dynamically controlled, and flexibility of multi-algorithm scheduling is improved.
Fig. 3 is a flowchart of a call start algorithm plug-in provided in an embodiment of the present application, and referring to fig. 3, the call start algorithm plug-in flow includes:
s201, receiving a starting control signal.
After the steps S101 to S102, a start control signal input by the user based on the plug-in identifier of the corresponding algorithm plug-in is received, and a start process is started according to the start signal.
S202, loading the plug-in by scanning the plug-in catalog.
The plug-in directory is designated as a local file directory in the host application configuration file. And scanning the local file catalogue according to the plug-in identification (plug-in ID) through the unified service interface to see whether the corresponding algorithm plug-in can be scanned.
S203, judging whether the algorithm plug-in is scanned.
And judging whether the algorithm plug-in can be scanned, if so, proving that the algorithm plug-in is transmitted in, and performing subsequent calling and starting to execute the step S204. If the scan is not completed, the algorithm plug-in is proved to be not transmitted, and the subsequent mobilization start cannot be performed, and the call fails, and the step S223 is executed, and the flow is ended.
S204, judging whether the algorithm plug-in is loaded.
If the corresponding algorithm plug-in is obtained through scanning, judging whether the algorithm plug-in is already loaded, and if the algorithm plug-in is already loaded, executing step S208 to prepare to start the algorithm plug-in. If the algorithm plug-in is not loaded, step S205 is executed to load the algorithm plug-in.
S205, creating a plug-in object for the algorithm plug-in.
If the algorithm plug-in is not loaded, a plug-in object, namely a PluginWrapper object, is created for the plug-in and stored in the set. The plug-in state is CBEATED at this time.
S206, verifying algorithm plug-in dependency.
Verifying whether the plug-in has circular dependence or undiscovered dependence, if so, automatically skipping the starting of the algorithm plug-in, and recording the log of the starting failure of the algorithm plug-in. If there is no cyclic dependency and no discovered dependency, the verification passes, step S207 is performed.
S207, changing the state of the algorithm plug-in.
The PluginWrapper state of the algorithm plug-in is set to RESOLVED and put into the corresponding set.
S208, preparing to start the plug-in.
S209, judging whether the algorithm plug-in is installed.
The lifecycle of the plug-in does not install this state, which is used to indicate that the plug-in information and resources, etc. have been properly saved to the database. If the algorithm plug-in has been installed, step S215 is performed, and the start-up operation is entered. If the algorithm plug-in has not been installed, step S210 is executed to perform the installation operation.
S210, issuing a static file.
And according to the information in the plug-in directory of the algorithm plug-in, issuing the corresponding static file.
S211, warehousing algorithm plug-in information.
After the static file is released, the algorithm plug-in information is put in storage, and if the algorithm plug-in information exists and the state is abandoned, the plug-in state is updated to be enabled. And if the algorithm plugin information does not exist, warehousing the algorithm plugin information, and setting the plugin state to be enabled.
S212, judging whether the plug-in has an operation which is not recorded in the database.
If there is an unrecorded operation, step S213 is executed to store the operation information. If there is no unrecorded operation, step S214 is executed, and the authority information is generated and put in storage.
S213, warehousing operation information.
The operation information is recorded in the database, and then step S214 is performed.
S214, generating authority information and warehousing.
And generating corresponding authority information based on the algorithm plug-in, and recording the authority information into a database.
S215, starting to start the plug-in.
At this time, the preparation work is completed, and the start () method of the plug-in is called to start the plug-in.
S216, acquiring the plug-in description object and verifying the validity of the plug-in description object.
And according to a starting control signal input by a user based on the algorithm plug-in, acquiring a description object of the plug-in, verifying the validity of the description object, and executing step S217 after the verification is passed.
S217, creating a plug-in application context.
S218, loading the externally exposed service of the plug-in and storing the service into a set held by the plug-in object.
S219, registering the plug-in.
The RequestMappinginfo in the plug-in is registered to RequestMappingHanadlerMapping. All methods with RequestMappingHanadlermapping can then be used to authenticate.
S220, judging whether the algorithm plug-in is successfully started.
If the start-up is successful, step S221 is executed, and if the start-up is failed, step S224 is executed.
S221, the algorithm plug-in is successfully started, and the state is modified.
The algorithm plug-in starts successfully, and the plug-in state is set to be STARTED.
S222, issuing a plug-in state change event.
After the algorithm plug-in is successfully STARTED and the plug-in state is set to be STARTED, a plug-in state change event is issued.
S223, completing the flow.
And after the algorithm plug-in is successfully STARTED and the plug-in state is set to be STARTED, a plug-in state change event is issued, and the starting flow is completed. Or, after the algorithm plug-in is not scanned in step S203, the start fails, and the flow ends.
S224, rolling back the database transaction.
If the start-up fails, the data transaction rollback is performed.
S225, unloading the startup failure plug-in.
And registering the plug-in with failed start-up to the RequestMappingHanadlermapping for unloading.
S226, unloading the interface.
Unloading Extension.
S227, closing the plug-in class loader.
S228, closing the plug-in application context.
S229, recording a plug-in start failure log.
Recording the plug-in startup failure log, generating corresponding prompt information, sending the prompt information to the client of the corresponding operation and maintenance personnel, executing step S223, and ending the flow.
Above, the implementation of calling different algorithms is uniformly packaged into the same SDK interface, when the bottom layer application calls the algorithm interface, only the input and output parameters of the SDK layer are concerned, and the calling logic of a specific algorithm is not concerned. The algorithm plug-in ensures that the core is simple but extensible, and the plug-ins can be dynamically loaded, started and stopped through the plug-in management interface, so that the function of dynamically adding and deleting the plug-ins is realized.
In an embodiment, a graph search is illustrated taking an application scene as a face. And (3) assuming that an algorithm manufacturer of the A company is added on the project site, only uploading and starting an algorithm plug-in corresponding to the A company, and enabling an application side to transmit the algorithm identification of the corresponding A company, such as algorithm alias or algorithm code, and the like, so that a result of executing and outputting the a algorithm of the A company to search the graph can be returned.
In one embodiment, it is assumed that a manufacturer of the algorithm of the B company is added to the project site, the algorithm plug-in of the B company is uploaded and started, and the application side transmits the algorithm identifier corresponding to the B company, for example, an algorithm alias or algorithm code, etc., so that the result of the B company B algorithm executing the output face to search the graph can be returned.
In an embodiment, the application side can also transmit the algorithm identifications of the company a and the company B at the same time, and can return the result of searching the graph by the face image output by the algorithm a and the result of searching the graph by the face image output by the algorithm B at the same time.
In one embodiment, it is assumed that the project site is currently using the company a algorithm vendor, and the company B algorithm vendor needs to be replaced, and the company a algorithm plug-in can be disabled only by inputting a stop control signal based on the company a algorithm plug-in by a user. Uploading and starting an algorithm plug-in of the company B, and changing an application side into an algorithm identifier of the company B, so that a result of searching the graph by the face image output by the algorithm B can be obtained.
The operations of adding algorithm manufacturers and replacing algorithm manufacturers are not needed to restart the service, so that the operation of adding updating algorithm manufacturers without stopping the service is realized, the user does not feel, and the use feeling of the user is improved.
Fig. 4 is a schematic diagram of an uploading and starting algorithm plug-in provided in the embodiment of the present application, and referring to fig. 4, in a display page of the corresponding uploading and starting algorithm plug-in, an uploading entry is provided through an uploading plug-in virtual key, and an uploading operation of the algorithm plug-in can be implemented by clicking the uploading plug-in virtual key. And inputting a start control signal and a stop control signal by operating the virtual key so as to control the operation of the corresponding algorithm plug-in. The display page of the corresponding uploading and starting algorithm plug-in also comprises an operation status bar for displaying the operation status of the corresponding algorithm plug-in.
Fig. 5 is a schematic diagram of an algorithm list provided in the embodiment of the present application, and referring to fig. 5, in a corresponding algorithm list display page, a corresponding algorithm alias, an algorithm name, an algorithm identifier, a service type, an algorithm manufacturer, and the like may be displayed.
And the corresponding plug-in identification is obtained according to the algorithm identification and the preset association relation by obtaining at least one algorithm identification, the corresponding algorithm plug-in is tuned to the plug-in through the unified service interface according to the plug-in identification, and the start and stop of the called algorithm plug-in are controlled according to a start and stop control signal input by a user. By adopting the technical means, the algorithm plug-in can be called according to the plug-in identification through the unified service interface, the subsequent operation and maintenance only need to be carried out aiming at the unified service interface, and the operation and maintenance difficulty of multi-algorithm scheduling is reduced, so that the operation and maintenance cost is saved. In addition, the start and stop of the corresponding algorithm plug-in can be controlled according to the start and stop control signals input by the user, and the flexibility of multi-algorithm scheduling control is improved.
On the basis of the above embodiment, fig. 6 is a schematic structural diagram of a multi-algorithm scheduling apparatus according to an embodiment of the present application. Referring to fig. 6, the multi-algorithm scheduling apparatus provided in this embodiment specifically includes: a plug-in identification acquisition unit 21, an algorithm plug-in calling unit 22 and a start-stop unit 23.
The plug-in identifier obtaining unit 21 is configured to obtain at least one algorithm identifier, and obtain a corresponding plug-in identifier according to the algorithm identifier and a preset association relationship;
an algorithm plug-in calling unit 22, configured to call a corresponding algorithm plug-in according to the plug-in identifier through a unified service interface;
and the start-stop unit 23 is used for controlling the start-stop of the invoked algorithm plug-in according to a start-stop control signal input by a user.
Further, the algorithm plug-in calling unit 22 is further configured to scan a plug-in directory according to the plug-in identifier through a unified service interface, and determine whether to scan to obtain a corresponding algorithm plug-in;
if the corresponding algorithm plug-in is obtained through scanning, calling the algorithm plug-in;
if the corresponding algorithm plug-in is not obtained through scanning, the calling fails.
Further, the algorithm plug-in calling unit 22 is further configured to determine whether the algorithm plug-in has been loaded if the corresponding algorithm plug-in is obtained by scanning;
if the algorithm plug-in is already loaded, calling the algorithm plug-in;
if the algorithm plug-in is not loaded, a plug-in object is created for the algorithm plug-in, the dependency of the plug-in is verified, and after verification is passed, the algorithm plug-in is called.
Further, the algorithm plug-in calling unit 22 is further configured to determine whether the algorithm plug-in is installed if the algorithm plug-in is already loaded;
if the algorithm plug-in is installed, calling the algorithm plug-in;
if the algorithm plug-in is not installed, a static file is issued, information of the algorithm plug-in is put in storage, and after the plug-in state is updated to be enabled, the algorithm plug-in is called.
Further, the start-stop unit 23 is further configured to receive a start control signal input by a user;
acquiring a description object of the algorithm plug-in according to the starting control signal, and verifying the validity of the description object;
verifying that the validity of the description object passes, controlling the algorithm plug-in to start operation, and outputting a corresponding algorithm result;
and receiving a stop control signal input by a user, and controlling the suspension operation of the algorithm plug-in according to the stop control signal.
Further, the start-stop unit 23 is further configured to control, according to a start control signal input by a user based on the first algorithm plug-in, the first algorithm plug-in to start running, and output a corresponding algorithm result;
and controlling the second algorithm plug-in to pause operation according to a stop control signal input by a user based on the second algorithm plug-in.
Further, the first algorithm plug-in comprises at least two algorithm plug-ins;
the start-stop unit 23 is further configured to simultaneously control the at least two algorithm plug-ins to start running according to a start control signal input by a user based on the at least two algorithm plug-ins, and output corresponding at least two algorithm results.
And the corresponding plug-in identification is obtained according to the algorithm identification and the preset association relation by obtaining at least one algorithm identification, the corresponding algorithm plug-in is tuned to the plug-in through the unified service interface according to the plug-in identification, and the start and stop of the called algorithm plug-in are controlled according to a start and stop control signal input by a user. By adopting the technical means, the algorithm plug-in can be called according to the plug-in identification through the unified service interface, the subsequent operation and maintenance only need to be carried out aiming at the unified service interface, and the operation and maintenance difficulty of multi-algorithm scheduling is reduced, so that the operation and maintenance cost is saved. In addition, the start and stop of the corresponding algorithm plug-in can be controlled according to the start and stop control signals input by the user, and the flexibility of multi-algorithm scheduling control is improved.
The multi-algorithm scheduling device provided by the embodiment of the application can be used for executing the multi-algorithm scheduling method provided by the embodiment, and has corresponding functions and beneficial effects.
An embodiment of the present application provides a multi-algorithm scheduling device, referring to fig. 7, including: processor 31, memory 32, communication module 33, input device 34 and output device 35. The number of processors in the multi-algorithm scheduling device may be one or more, and the number of memories in the multi-algorithm scheduling device may be one or more. The processors, memory, communication modules, input devices, and output devices of the multi-algorithm scheduling apparatus may be connected by a bus or other means.
The memory 32 is used as a computer readable storage medium for storing a software program, a computer executable program, and modules, and is used for storing program instructions/modules corresponding to the multi-algorithm scheduling method according to any embodiment of the present application (for example, a plug-in identifier obtaining unit, an algorithm plug-in calling unit, and a start-stop unit in the multi-algorithm scheduling apparatus). The memory may mainly include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, the memory may further include memory remotely located with respect to the processor, the remote memory being connectable to the device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The communication module 33 is used for data transmission.
The processor 31 executes various functional applications of the device and data processing by running software programs, instructions and modules stored in the memory, i.e. implements the multi-algorithm scheduling method described above.
The input means 34 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output means 35 may comprise a display device such as a display screen.
The multi-algorithm scheduling device provided by the embodiment can be used for executing the multi-algorithm scheduling method provided by the embodiment, and has corresponding functions and beneficial effects.
The present embodiments also provide a storage medium storing computer-executable instructions that when executed by a computer processor are for performing a multi-algorithm scheduling method comprising: acquiring at least one algorithm identifier, and acquiring a corresponding plug-in identifier according to the algorithm identifier and a preset association relationship; calling a corresponding algorithm plug-in according to the plug-in identification through a unified service interface; and controlling the start and stop of the invoked algorithm plug-in according to a start and stop control signal input by a user.
Storage media-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, lanbas (Rambus) RAM, etc.; nonvolatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a second, different computer system connected to the first computer system through a network such as the internet. The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (e.g., in different computer systems connected by a network). The storage medium may store program instructions (e.g., embodied as a computer program) executable by one or more processors.
Of course, the storage medium storing the computer executable instructions provided in the embodiments of the present application is not limited to the multi-algorithm scheduling method described above, and may also perform the related operations in the multi-algorithm scheduling method provided in any embodiment of the present application.
The multi-algorithm scheduling device, the storage medium and the multi-algorithm scheduling apparatus provided in the foregoing embodiments may execute the multi-algorithm scheduling method provided in any embodiment of the present application, and technical details not described in detail in the foregoing embodiments may be referred to the multi-algorithm scheduling method provided in any embodiment of the present application.
The foregoing description is only of the preferred embodiments of the present application and the technical principles employed. The present application is not limited to the specific embodiments described herein, but is capable of numerous obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the present application. Therefore, while the present application has been described in connection with the above embodiments, the present application is not limited to the above embodiments, but may include many other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.

Claims (10)

1. A multi-algorithm scheduling method, comprising:
acquiring at least one algorithm identifier, and acquiring a corresponding plug-in identifier according to the algorithm identifier and a preset association relationship;
calling a corresponding algorithm plug-in according to the plug-in identification through a unified service interface;
and controlling the start and stop of the invoked algorithm plug-in according to a start and stop control signal input by a user.
2. The method according to claim 1, wherein the calling, through a unified service interface, the corresponding algorithm plug-in according to the plug-in identification comprises:
scanning a plugin catalog according to the plugin identification through a unified service interface, and judging whether to scan to obtain a corresponding algorithm plugin;
if the corresponding algorithm plug-in is obtained through scanning, calling the algorithm plug-in;
if the corresponding algorithm plug-in is not obtained through scanning, the calling fails.
3. The method according to claim 2, wherein the invoking the algorithm plug-in if the scanning results in the corresponding algorithm plug-in comprises:
if the corresponding algorithm plug-in is obtained through scanning, judging whether the algorithm plug-in is already loaded or not;
if the algorithm plug-in is already loaded, calling the algorithm plug-in;
if the algorithm plug-in is not loaded, a plug-in object is created for the algorithm plug-in, the dependency of the plug-in is verified, and after verification is passed, the algorithm plug-in is called.
4. A method according to claim 3, wherein invoking the algorithm plug-in if the algorithm plug-in has been loaded comprises:
if the algorithm plug-in is already loaded, judging whether the algorithm plug-in is already installed or not;
if the algorithm plug-in is installed, calling the algorithm plug-in;
if the algorithm plug-in is not installed, a static file is issued, information of the algorithm plug-in is put in storage, and after the plug-in state is updated to be enabled, the algorithm plug-in is called.
5. The method according to claim 1, wherein controlling the start and stop of the invoked algorithm plug-in according to a start and stop control signal input by a user comprises:
receiving a starting control signal input by a user;
acquiring a description object of the algorithm plug-in according to the starting control signal, and verifying the validity of the description object;
verifying that the validity of the description object passes, controlling the algorithm plug-in to start operation, and outputting a corresponding algorithm result;
and receiving a stop control signal input by a user, and controlling the suspension operation of the algorithm plug-in according to the stop control signal.
6. The method according to claim 1, wherein controlling the start and stop of the invoked algorithm plug-in according to a start and stop control signal input by a user comprises:
according to a starting control signal input by a user based on a first algorithm plug-in, controlling the first algorithm plug-in to start running, and outputting a corresponding algorithm result;
and controlling the second algorithm plug-in to pause operation according to a stop control signal input by a user based on the second algorithm plug-in.
7. The method of claim 6, wherein the first algorithm plug-in comprises at least two algorithm plug-ins;
the method for controlling the first algorithm plug-in to start to operate according to the starting control signal input by the user based on the first algorithm plug-in, and outputting the corresponding algorithm result comprises the following steps:
and simultaneously controlling the at least two algorithm plug-ins to start running according to a starting control signal input by a user based on the at least two algorithm plug-ins, and outputting corresponding at least two algorithm results.
8. A multi-algorithm scheduling apparatus, comprising:
the plug-in identification acquisition unit is used for acquiring at least one algorithm identification and acquiring a corresponding plug-in identification according to the algorithm identification and a preset association relationship;
the algorithm plug-in calling unit is used for calling a corresponding algorithm plug-in according to the plug-in identification through the unified service interface;
and the start-stop unit is used for controlling the start-stop of the invoked algorithm plug-in according to a start-stop control signal input by a user.
9. A multi-algorithm scheduling apparatus, comprising:
a memory and one or more processors;
the memory is used for storing one or more programs;
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
10. A storage medium storing computer executable instructions which, when executed by a processor, are adapted to carry out the method of any one of claims 1 to 7.
CN202310422880.0A 2023-04-19 2023-04-19 Multi-algorithm scheduling method, device, equipment and storage medium Pending CN116431308A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310422880.0A CN116431308A (en) 2023-04-19 2023-04-19 Multi-algorithm scheduling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310422880.0A CN116431308A (en) 2023-04-19 2023-04-19 Multi-algorithm scheduling method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116431308A true CN116431308A (en) 2023-07-14

Family

ID=87094163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310422880.0A Pending CN116431308A (en) 2023-04-19 2023-04-19 Multi-algorithm scheduling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116431308A (en)

Similar Documents

Publication Publication Date Title
CN111314141B (en) Route updating method and device
US9253265B2 (en) Hot pluggable extensions for access management system
US8997088B2 (en) Methods and systems for automated deployment of software applications on heterogeneous cloud environments
CN104679534B (en) System application installation package loading processing method, apparatus and terminal
US6871223B2 (en) System and method for agent reporting in to server
CN104978191B (en) Using dispositions method and service device
CN111695156A (en) Service platform access method, device, equipment and storage medium
US11960869B2 (en) Android penetration method and device for implementing silent installation based on accessibility services
CN113434158B (en) Custom management method, device, equipment and medium for big data component
CN110968331A (en) Method and device for running application program
US20230259358A1 (en) Documentation enforcement during compilation
JP2003022189A (en) Distributed network computing system
CN109992295B (en) Version management method and server
CN114547569A (en) Account login processing method and device
CN115129740B (en) Method and system for updating distributed micro-service database in cloud native environment
CN113590179B (en) Plug-in detection method and device, electronic equipment and storage medium
CN116431308A (en) Multi-algorithm scheduling method, device, equipment and storage medium
CN112448909A (en) Electronic lock management method, device, system and storage medium
US11757976B2 (en) Unified application management for heterogeneous application delivery
CN113031964B (en) Big data application management method, device, equipment and storage medium
CN105610908B (en) A kind of samba service implementing method and system based on Android device
CN115129348A (en) Resource updating method, device and equipment of application program and readable storage medium
CN111949301B (en) Application program hot update method, device and computer readable storage medium
CN112583890A (en) Message pushing method and device based on enterprise office system and computer equipment
CN108804236B (en) AIDL file sharing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination