CN113031986A - Dynamic loading method, device, terminal and medium for feature comparison algorithm - Google Patents

Dynamic loading method, device, terminal and medium for feature comparison algorithm Download PDF

Info

Publication number
CN113031986A
CN113031986A CN202110323615.8A CN202110323615A CN113031986A CN 113031986 A CN113031986 A CN 113031986A CN 202110323615 A CN202110323615 A CN 202110323615A CN 113031986 A CN113031986 A CN 113031986A
Authority
CN
China
Prior art keywords
comparison algorithm
algorithm
feature comparison
package
interface
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.)
Granted
Application number
CN202110323615.8A
Other languages
Chinese (zh)
Other versions
CN113031986B (en
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.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight Technology 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 Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN202110323615.8A priority Critical patent/CN113031986B/en
Publication of CN113031986A publication Critical patent/CN113031986A/en
Application granted granted Critical
Publication of CN113031986B publication Critical patent/CN113031986B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Landscapes

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

Abstract

The application provides a dynamic loading method, a dynamic loading device, a dynamic loading terminal and a dynamic loading medium for a feature comparison algorithm, wherein the method comprises the following steps: acquiring a feature comparison algorithm packet from an algorithm bin platform; sending the feature comparison algorithm package information to an information platform, and downloading a corresponding feature comparison algorithm package by monitoring the theme of the information platform; and verifying the feature comparison algorithm package according to the feature comparison algorithm package and an interface required by the current environment, and after the verification is passed, loading the feature comparison algorithm package, and replacing the old algorithm version model with the new algorithm version model to realize the dynamic loading of the feature comparison algorithm. The method and the device check the feature comparison algorithm package according to the feature comparison algorithm package and the interface required by the current environment, load the feature comparison algorithm package to dynamically replace the old algorithm in the environment after the check is passed, realize the noninductive upgrade of the feature comparison algorithm, expand the application range of the actual application scene, enhance the usability of the software in the update state, and increase the maintainability so that the software has more advantages.

Description

Dynamic loading method, device, terminal and medium for feature comparison algorithm
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a terminal, and a medium for dynamically loading a feature comparison algorithm.
Background
With the rapid development of artificial intelligence, the ai (intellectual intelligence) algorithm is more and more, and is updated more and more quickly. In some possible implementation scenarios, a developer uploads an installation file corresponding to a new algorithm to a server, the server finds the installation file corresponding to the new version algorithm through pushing or autonomous software detection, and when a user confirms that software (new version algorithm) is updated, the installation file of the software is downloaded, and software updating is completed through the installation file.
However, in the existing software upgrade, the software is directly selected to be upgraded without considering the operating environment of the new software (i.e. whether the current environment meets the hardware requirement required by the upgrade), which not only causes the software not to be dynamically loaded, but also delays the time for downloading and installing, thereby increasing the burden of the software.
Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present application is to provide a method, an apparatus, a terminal and a medium for dynamically loading a feature comparison algorithm, which are used to solve the problem that software cannot be dynamically loaded when software is upgraded in the prior art.
To achieve the above and other related objects, the present application provides a dynamic loading method for feature comparison algorithm, comprising:
acquiring a feature comparison algorithm packet from an algorithm bin platform;
sending the feature comparison algorithm package information to an information platform, and downloading the corresponding feature comparison algorithm package by monitoring the theme of the information platform;
and verifying the feature comparison algorithm package according to the feature comparison algorithm package and an interface required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model with a new algorithm version model after the verification is passed, so as to realize the dynamic loading of the feature comparison algorithm.
Another objective of the present application is to provide a dynamic loading apparatus for feature matching algorithm, including:
the image acquisition module is used for acquiring a feature comparison algorithm packet from the algorithm bin platform;
the file downloading module is used for sending the feature comparison algorithm package information to an information platform and downloading the corresponding feature comparison algorithm package by monitoring the theme of the information platform;
and the verification loading module is used for verifying the feature comparison algorithm package according to the feature comparison algorithm package and an interface required by the current environment, and after the verification is passed, loading the feature comparison algorithm package and replacing an old algorithm version model with a new algorithm version model to realize the dynamic loading of the feature comparison algorithm.
Another object of the present application is to provide a terminal, comprising:
one or more processing devices;
a memory for storing one or more programs; when the one or more programs are executed by the one or more processing devices, causing the one or more processing devices to perform the feature comparison algorithm dynamic loading method.
It is a further object of the present application to provide a computer-readable storage medium, on which a computer program is stored, the computer program being used for causing the computer to execute the feature comparison algorithm dynamic loading method.
As described above, the method, the device, the terminal and the medium for dynamically loading the feature comparison algorithm of the present application have the following advantages:
the method and the system have the advantages that the characteristic comparison algorithm package is verified according to the characteristic comparison algorithm package and the interface required by the current environment, after the verification is passed, the characteristic comparison algorithm package is loaded to dynamically replace the old algorithm in the environment, the noninductive upgrading of the characteristic comparison algorithm is realized, the application range of the actual application scene is expanded, the usability of the software in an updating state is enhanced, and meanwhile, the maintainability is increased, so that the software has advantages.
Drawings
FIG. 1 is a flow chart of a dynamic loading method for a feature comparison algorithm provided herein;
FIG. 2 is a flowchart illustrating step S3 of a dynamic loading method for feature matching algorithm provided by the present application;
FIG. 3 is another flowchart of step S3 in the dynamic loading method for feature matching algorithm provided in the present application;
FIG. 4 is a flowchart illustrating a complete dynamic loading method for a feature comparison algorithm provided herein;
FIG. 5 is a block diagram of a dynamic loading apparatus for feature comparison algorithm provided in the present application;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application is provided by way of specific examples, and other advantages and effects of the present application will be readily apparent to those skilled in the art from the disclosure herein. The present application is capable of other and different embodiments and its several details are capable of modifications and/or changes in various respects, all without departing from the spirit of the present application. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present application, and the drawings only show the components related to the present application and are not drawn according to the number, shape and size of the components in actual implementation, and the type, number and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
Referring to fig. 1, a flowchart of a dynamic loading method for a feature comparison algorithm provided in the present application includes:
step S1, acquiring a feature comparison algorithm package from the algorithm bin platform;
specifically, a feature comparison algorithm package (algorithm package) from an algorithm warehouse platform is obtained, wherein the feature comparison algorithm package at least comprises a description file and a comparison algorithm library file;
the different algorithm packages are required to be packaged according to the same standard, the algorithm package file at least comprises two files, one is a description file, the other is a comparison algorithm library file generated by comparison compiling, and the comparison algorithm library file comprises various algorithm interfaces. For example, the algorithm warehouse platform acquires the uploaded algorithm package, analyzes the description file in the algorithm package to generate a piece of information of the comparison algorithm package in the comparison algorithm list, wherein the description file in the algorithm package comprises algorithm package description, algorithm type, compiling time algorithm version, algorithm model version number, quality component extension coefficient and inheritable algorithm model version number list.
Step S2, sending the feature comparison algorithm package information to an information platform, and downloading the corresponding feature comparison algorithm package by monitoring the theme of the information platform;
the information platform, which may be Kafka, is a high-throughput distributed publish-subscribe messaging system that can handle all the action flow data of a consumer in a website. Sending the algorithm package information to a designated Topic of Kafka according to a designated Topic structure by using the algorithm warehouse platform, acquiring installation information by monitoring the designated Topic and downloading the algorithm package;
when an interface calling instruction is received, sending the feature comparison algorithm package information to a theme appointed by an information platform;
specifically, when the algorithm silo platform detects an installation interface call, updating information into the Topic specified by Kafka according to a specified Topic structure; for example, when the algorithm silo receives an installation interface call, the assembly is carried out according to the structure of the appointed topic, and after the assembly is completed, the information is updated to the appointed topic of kafka.
Monitoring whether the information platform has offset updating or not, if the offset updating is monitored, acquiring installation information and updating the offset according to a specified theme, and downloading a feature comparison algorithm package according to the installation information
Specifically, when monitoring that the offset of the Kafka is updated, the Topic consumes and updates the offset, and when consuming the installation information of the algorithm package, the algorithm package is downloaded according to the path of the characteristic comparison algorithm package in the Kafka; for example, when monitoring that the kafka offset is updated, the view library consumes topic and updates the offset, and after consuming the algorithm package installation information (i.e., the algorithm package installation information), the view library downloads the algorithm package according to the feature comparison in kafka and the path of the algorithm package.
And step S3, verifying the feature comparison algorithm package according to the feature comparison algorithm package and the interface required by the current environment, loading the feature comparison algorithm package and replacing the old algorithm version model with the new algorithm version model after the verification is passed, thereby realizing the dynamic loading of the feature comparison algorithm.
Specifically, the downloaded file is read, the feature comparison algorithm package is verified through a description file in the feature comparison algorithm package, a comparison algorithm library file and an interface required by the current environment, for example, the content and the format in the feature comparison algorithm package are verified, after the verification is passed, the cache information is reloaded, the old algorithm version model is replaced by the new algorithm version model, and the non-inductive upgrading of the feature comparison algorithm package is realized through dynamically replacing the existing algorithm in the environment.
In this embodiment, the feature comparison algorithm package is verified according to the feature comparison algorithm package and the interface required by the current environment, and after the verification is passed, the feature comparison algorithm package is loaded to dynamically replace the old algorithm in the environment, so that the non-inductive upgrade of the feature comparison algorithm is realized, the application range of the actual application scene is expanded, the usability of the software in the update state is enhanced, and meanwhile, the maintainability is increased, so that the software has advantages.
Referring to fig. 2, the flowchart of step S3 in the dynamic loading method for feature comparison algorithm provided by the present application, based on the embodiment of fig. 1, in step S3, further includes:
step S31, reading the feature comparison algorithm package, obtaining the interface of the feature comparison algorithm package and storing the interface into an interface list;
step S32, judging whether the number of interfaces in the interface list is less than that of the interfaces needed by the current environment, thereby carrying out one-time verification on the format of the feature comparison algorithm package;
step S321, if the number of the interfaces in the interface list is less than that of the interfaces required by the current environment, judging that the feature comparison algorithm packet is abnormal;
step S322, if the number of the interfaces in the interface list is not less than the number of the interfaces needed in the current environment, performing secondary verification on the content consistency of the interface list;
step S33, until all interfaces in the interface list are verified.
In the embodiment, according to the storage directory of the downloaded file, reading a description file in the algorithm package, creating a folder according to the version number of the algorithm model, and storing a comparison algorithm library file and the description file into the folder under the directory; reading a comparison algorithm library file, traversing interfaces of the comparison algorithm library file, storing the interfaces into an interface list, and judging whether the number of the interfaces of the interface list is less than that of the interfaces required by the current environment (namely, the necessary interfaces required by the installation of the current environment); if the number of the interfaces in the interface list is less than that of the interfaces required by the current environment, the comparison algorithm library file is considered to be abnormal, and an error is reported; and if the number of the interfaces in the interface list is not less than that of the interfaces required by the current environment, performing secondary verification on the content consistency of the interface list until all the interfaces in the interface list are verified (wherein the verification comprises primary verification, secondary verification, tertiary verification and the like).
In step S322, the step of performing a second check on the content consistency of the interface list further includes:
judging the content consistency of the interface list one by one according to the interfaces required by the current environment; if the new feature comparison algorithm packet matches the same content, judging the next interface; if the new feature comparison algorithm package can not be matched with the same content, an error is reported.
Specifically, by checking the consistency of the contents of the interface list, for example, traversing the interfaces of the algorithm package one by one according to the interface list required by the current environment and performing content consistency check; if the newly added algorithm packet is consistent, traversing the next interface; if the newly added algorithm packet cannot find the consistency, the whole error is reported; until all interfaces in the interface list are traversed.
In this embodiment, the format and the content of the feature comparison algorithm package are verified, for example, on one hand, the number of interfaces for comparing the algorithm library file in the algorithm package with the number of interfaces necessary in the current environment is (format) verified, so as to determine whether the current environment meets the hardware requirement required by the new algorithm upgrade; on the other hand, the consistency of the content in the interface list is checked, and whether the number and the name of the interface required by the current environment are the same or not is accurately determined, so that the old algorithm in the environment is dynamically replaced, and the noninductive upgrading of the feature comparison algorithm package is realized.
Referring to fig. 3, another flowchart of step S3 in the dynamic loading method for feature matching algorithm provided in the present application is shown, which includes:
step S31, reading the feature comparison algorithm package, obtaining the interface of the feature comparison algorithm package and storing the interface into an interface list;
step S311, judging whether the key field of the description file in the feature comparison algorithm package is missing for carrying out three times of verification,
step S3111, if the comparison result is missing, reporting an error and not replacing the comparison algorithm;
step S3112, if the content of the description file is not missing, checking the content of the description file four times according to a preset field checking rule;
step S31121 if the content check fails, reporting an error;
step S31122, if the content verification is passed, performing a first verification on the feature comparison algorithm package;
step S32, judging whether the number of interfaces in the interface list is less than that of the interfaces needed by the current environment, and carrying out primary verification on the feature comparison algorithm package according to the judgment basis;
step S321, if the number of the interfaces in the interface list is less than that of the interfaces required by the current environment, judging that the feature comparison algorithm packet is abnormal;
step S322, if the number of the interfaces in the interface list is not less than the number of the interfaces needed in the current environment, performing secondary verification on the content consistency of the interface list;
step S33, until all interfaces in the interface list are verified.
In this embodiment, before the interface number is checked: firstly, checking key fields in a description file in an algorithm package for three times, and roughly estimating whether the algorithm package is complete and accurate; and secondly, the content of the description file in the algorithm package is checked for four times, so that whether the downloaded algorithm package is complete or not can be accurately judged, and the corresponding algorithm can be conveniently and dynamically loaded subsequently.
In other embodiments, the pair is verified and dynamically replaced, including:
after downloading the algorithm package by using the view library, newly building a folder according to the algorithm model version number in the description file and storing the comparison algorithm library file and the description file in the algorithm model version number in the/home/algorithmm/corresponding folder according to the storage/home/algorithmm/directory of the description file in the algorithm package, for example, A050001.
Step (b), decompressing and storing the algorithm packet, firstly, checking the fields of the description file for three times to determine whether the key fields are missing, if so, reporting an error, and not replacing the comparison algorithm; if the key field is not missing, the content of the description file is checked four times according to a preset check rule (for example, a common data check rule, such as parity check, MD5 check, cyclic redundancy check code, LRC check, etc.) of the field, and subsequent operations are performed after the check is passed, and if the check is not passed, an error is reported.
Step (C), after the basic information is verified, reading the feature comparison algorithm packet through a C + + function dlopen, performing interface traversal reading on the file through the C + + function dlsym after the reading is completed, and storing the file into an interface list after the interface traversal reading is completed; firstly, checking the number of interfaces in an interface list once, if the number in the interface list is less than the number of interfaces of the interfaces required by the current environment, considering that the comparison package is abnormal, and reporting errors (note: the number of interfaces of the interfaces required by the previous environment and the list are built in a program, and the interface list is in a comparison algorithm package document);
and (d) if the number of the interfaces in the interface list is consistent with the number of the interfaces required by the current environment or is larger than the number of the interfaces required by the current environment, performing secondary verification on the consistency of the list contents, traversing the interface lists extracted from the algorithm packet one by one according to the list of the interfaces required by the current environment, traversing the next interface if the consistency is found in the newly added algorithm packet, and reporting an error integrally if the consistency is failed until all the required parameters are traversed.
And (e) after the verification is finished and the verification is passed, reloading the cache information, replacing the old algorithm model version information in the environment with the new algorithm model version information, and updating the subsequent requests with the new algorithm model version number.
In this embodiment, by performing key field verification and content verification on the description file in the algorithm package, verifying the number of interfaces of the comparison algorithm library file in the algorithm package, and verifying the contents of the interface list, it is ensured that the feature comparison algorithm can be dynamically loaded when the subsequent algorithm is updated through a series of complete file formats and content verification.
Please refer to fig. 4, which is a complete flowchart of a dynamic loading method for a feature comparison algorithm provided in the present application, and on the basis of fig. 1, the method further includes:
step S4, detecting whether the version number of the old algorithm version model is in the updated and inheritable algorithm model version number list, and determining whether the version number of the old algorithm version model can be inherited according to the detection result; the method specifically comprises the following steps:
step S41, detecting whether the version number of the old algorithm version model is in the updated and sustainable algorithm model version number list;
step S42, if the version number of the old algorithm version model is in the updated and sustainable algorithm model version number list, not operating;
step S43, if the old algorithm version number is not in the updated and sustainable algorithm model version number list, algorithm characteristic renovation is carried out; and obtaining the characteristic length according to the characteristic protection file, cutting the characteristic according to the fixed length, and calling an analysis interface to update the characteristic until all the cut characteristics are updated.
For example, the old algorithm version model contains features, such as a0, etc., if the new algorithm version model still has features after being updated, a0, a1, etc., then if the version number of the old algorithm version model is in the updated and inheritable algorithm model version number list, no operation is performed; if the new algorithm version model has no relevant features after updating, namely the old algorithm version number is not in the updated and inheritable algorithm model version number list, the feature A0 needs to be renovated into the feature B0 to overcome the phenomenon that the features of the old algorithm version are not available after being upgraded.
In this embodiment, after the feature comparison algorithm passes and is replaced, it is determined whether the feature file can be inherited, and whether the version number of the old algorithm version model is in the updated and inheritable algorithm model version number list, and if so, no operation is performed; and if the current characteristic is not in the sustainable algorithm model version number list, performing algorithm characteristic renovation, wherein the algorithm renovation is that C + + acquires characteristic length according to the characteristic protection file, then performing characteristic fixed cutting, calling an analysis interface through a section of cut characteristic to update the characteristic, and storing the updated characteristic in a new file position until all the characteristics are renovated, and performing no characteristic consumption in the renovation period.
In other embodiments, the algorithm package is updated from a050001 to a050002, for example:
firstly, uploading an algorithm package on a page of an algorithm cabin platform, after the uploading is finished (the algorithm package and installation information are formed), transmitting the installation information to a view library through kafka, downloading the algorithm package by the view library, after the downloading is finished, creating a file directory according to the algorithm model version number information in a description file, storing the file according to the directory, and installing the file;
and then, comparing the description file with the algorithm package interface, synchronizing the information to kafka if any check fails in the comparison process, feeding back the information to an algorithm bin, marking the task state by the algorithm bin until the format and the content check of the algorithm package pass, replacing the algorithm package, and updating the content and the version number information of the algorithm model in the file after the replacement is completed.
Confirming whether the A050001 is still in the inheritable algorithm version number A050002, and if so, not updating the features; if not, updating the characteristics and creating a new characteristic file.
Please refer to fig. 5, which is a block diagram of a dynamic loading device for a feature comparison algorithm according to the present application; the method comprises the following steps:
the image acquisition module 1 is used for acquiring a feature comparison algorithm package from an algorithm bin platform;
the file downloading module 2 is used for sending the feature comparison algorithm package information to an information platform and downloading the corresponding feature comparison algorithm package by monitoring the theme of the information platform;
the verification loading module 3 is used for verifying the feature comparison algorithm package according to the feature comparison algorithm package and an interface required by the current environment, and after the verification is passed, loading the feature comparison algorithm package and replacing an old algorithm version model with a new algorithm version model to realize the dynamic loading of the feature comparison algorithm;
the characteristic updating module 4 is used for detecting whether the version number of the old algorithm version model is in an updated and inheritable algorithm model version number list or not and determining whether the version number of the old algorithm version model can be inherited or not according to a detection result; for example, it is detected whether the version number of the old algorithm version model is in the updated and inheritable list of algorithm model version numbers; if the version number of the old algorithm version model is in the updated and inheritable algorithm model version number list, the operation is not carried out; if the old algorithm version number is not in the updated and sustainable algorithm model version number list, algorithm characteristic renovation is carried out; and obtaining the characteristic length according to the characteristic protection file, cutting the characteristic according to the fixed length, and calling an analysis interface to update the characteristic until all the cut characteristics are updated.
It should be further noted that the dynamic feature comparison algorithm loading device and the dynamic feature comparison algorithm loading method are in a one-to-one correspondence relationship, and here, technical details and technical effects of each module and the above process steps are the same, and are not described herein any more, please refer to the above dynamic feature comparison algorithm loading method.
Referring now to fig. 6, a schematic diagram of a terminal (e.g., a terminal device or server 600) suitable for implementing embodiments of the present disclosure is shown, where the terminal device in embodiments of the present disclosure may include, but is not limited to, a fixed terminal such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal computer, a server, a workstation, a television, a set-top box, smart glasses, a smart watch, a digital camera, an MP4 player terminal, an MP5 player terminal, a learning machine, a point-reading machine, an electronic book, an electronic dictionary, a vehicle-mounted terminal, a Virtual Reality (VR) player terminal, or an Augmented Reality (AR) player terminal, etc. the terminal shown in fig. 6 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 6, terminal 600 may include a processing device (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage device 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the terminal 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the terminal 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates a terminal 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. When executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the terminal; or may exist separately and not be assembled into the terminal.
The computer readable medium carries one or more programs which, when executed by the terminal, cause the terminal to:
step S1, acquiring a feature comparison algorithm package from the algorithm bin platform;
step S2, sending the feature comparison algorithm package information to an information platform, and acquiring the feature comparison algorithm package by monitoring the theme of the information platform;
and step S3, verifying the feature comparison algorithm package according to the feature comparison algorithm package and the interface required by the current environment, loading the feature comparison algorithm package and replacing the old algorithm version model with the new algorithm version model after the verification is passed, thereby realizing the dynamic loading of the feature comparison algorithm.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In summary, the present application verifies the feature comparison algorithm package according to the feature comparison algorithm package and the interface required by the current environment, and loads the feature comparison algorithm package to dynamically replace the old algorithm in the environment after the verification is passed, so as to implement the non-inductive upgrade of the feature comparison algorithm, expand the application range of the actual application scenario, enhance the usability of the software in the update state, and increase the maintainability, so that the software has advantages.
The above embodiments are merely illustrative of the principles and utilities of the present application and are not intended to limit the application. Any person skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of the present application.

Claims (10)

1. A dynamic loading method for a feature comparison algorithm is characterized by comprising the following steps:
acquiring a feature comparison algorithm packet from an algorithm bin platform;
sending the feature comparison algorithm package information to an information platform, and downloading the corresponding feature comparison algorithm package by monitoring the theme of the information platform;
and verifying the feature comparison algorithm package according to the feature comparison algorithm package and an interface required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model with a new algorithm version model after the verification is passed, so as to realize the dynamic loading of the feature comparison algorithm.
2. The method for dynamically loading a feature comparison algorithm according to claim 1, wherein the step of sending the feature comparison algorithm package information to an information platform and downloading the corresponding feature comparison algorithm package by monitoring a theme of the information platform comprises:
when an interface calling instruction is received, sending the feature comparison algorithm package information to a theme appointed by an information platform;
monitoring whether the information platform has offset updating or not, if the offset updating is monitored, acquiring installation information and updating the offset according to a specified theme, and downloading a feature comparison algorithm package according to the installation information.
3. The method for dynamically loading signature comparison algorithms according to claim 1, wherein the step of verifying the signature comparison algorithm package according to the signature comparison algorithm package and the interface required by the current environment comprises:
reading the feature comparison algorithm packet, acquiring an interface of the feature comparison algorithm packet and storing the interface into an interface list;
and judging whether the number of the interfaces in the interface list is less than that of the interfaces required by the current environment or not, and checking the feature comparison algorithm packet once.
4. The dynamic loading method of feature comparison algorithm according to claim 3, further comprising:
if the number of the interfaces in the interface list is less than that of the interfaces required by the current environment, judging that the feature comparison algorithm packet is abnormal;
if the number of the interfaces of the interface list is not less than that of the interfaces required by the current environment, performing secondary verification on the content consistency of the interface list;
until all interfaces in the interface list are checked.
5. The method for dynamically loading signature comparison algorithms according to claim 3 or 4, wherein before the step of obtaining the interface of the signature comparison algorithm package and storing the interface into the interface list, the method further comprises:
judging whether the key fields of the description files in the feature comparison algorithm package are missing or not to carry out three times of verification,
if the comparison result is missing, reporting an error and not replacing the comparison algorithm;
if the content of the description file is not lost, checking the content of the description file for four times according to a preset field checking rule;
if the content verification fails, an error is reported;
and if the content passes the verification, performing primary verification on the feature comparison algorithm packet.
6. The dynamic loading method for feature comparison algorithm according to claim 4, wherein the step of checking the consistency of the contents of the interface list for the second time comprises:
judging the content consistency of the interface list one by one according to the interfaces required by the current environment;
if the new feature comparison algorithm packet matches the same content, judging the next interface;
if the new feature comparison algorithm package can not be matched with the same content, an error is reported.
7. The dynamic loading method of feature comparison algorithm according to claim 1, further comprising:
detecting whether the version number of the old algorithm version model is in an updated and inheritable algorithm model version number list or not;
if the version number of the old algorithm version model is in the updated and inheritable algorithm model version number list, the operation is not carried out;
if the old algorithm version number is not in the updated and sustainable algorithm model version number list, algorithm characteristic renovation is carried out; and obtaining the characteristic length according to the characteristic protection file, cutting the characteristic according to the fixed length, and calling an analysis interface to update the characteristic until all the cut characteristics are updated.
8. A dynamic loading device for a feature comparison algorithm is characterized by comprising:
the image acquisition module is used for acquiring a feature comparison algorithm packet from the algorithm bin platform;
the file downloading module is used for sending the feature comparison algorithm package information to an information platform and downloading the corresponding feature comparison algorithm package by monitoring the theme of the information platform;
and the verification loading module is used for verifying the feature comparison algorithm package according to the feature comparison algorithm package and an interface required by the current environment, and after the verification is passed, loading the feature comparison algorithm package and replacing an old algorithm version model with a new algorithm version model to realize the dynamic loading of the feature comparison algorithm.
9. A terminal, characterized by: the method comprises the following steps:
one or more processing devices;
a memory for storing one or more programs; when executed by the one or more processing devices, the one or more programs cause the one or more processing devices to implement the dynamic loading method for feature matching algorithms as described in any of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program for causing a computer to execute the method for dynamic loading of a feature matching algorithm according to any of claims 1 to 7.
CN202110323615.8A 2021-03-26 2021-03-26 Feature comparison algorithm dynamic loading method, device, terminal and medium Active CN113031986B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110323615.8A CN113031986B (en) 2021-03-26 2021-03-26 Feature comparison algorithm dynamic loading method, device, terminal and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110323615.8A CN113031986B (en) 2021-03-26 2021-03-26 Feature comparison algorithm dynamic loading method, device, terminal and medium

Publications (2)

Publication Number Publication Date
CN113031986A true CN113031986A (en) 2021-06-25
CN113031986B CN113031986B (en) 2023-05-12

Family

ID=76474133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110323615.8A Active CN113031986B (en) 2021-03-26 2021-03-26 Feature comparison algorithm dynamic loading method, device, terminal and medium

Country Status (1)

Country Link
CN (1) CN113031986B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016086654A1 (en) * 2014-12-03 2016-06-09 广州广电运通金融电子股份有限公司 Remote upgrade method and system for software on self-service terminal, and upgrade package creation method
EP3373142A1 (en) * 2017-03-09 2018-09-12 Capital One Services, LLC Systems and methods for real time message processing using an event driven framework
CN111556488A (en) * 2020-04-13 2020-08-18 易视腾科技股份有限公司 OTA (over the air) upgrading method and system for terminal equipment
CN112287643A (en) * 2020-09-01 2021-01-29 上海泛微软件有限公司 Message monitoring method, device, equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016086654A1 (en) * 2014-12-03 2016-06-09 广州广电运通金融电子股份有限公司 Remote upgrade method and system for software on self-service terminal, and upgrade package creation method
EP3373142A1 (en) * 2017-03-09 2018-09-12 Capital One Services, LLC Systems and methods for real time message processing using an event driven framework
CN111556488A (en) * 2020-04-13 2020-08-18 易视腾科技股份有限公司 OTA (over the air) upgrading method and system for terminal equipment
CN112287643A (en) * 2020-09-01 2021-01-29 上海泛微软件有限公司 Message monitoring method, device, equipment and computer readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BRANDON LWOWSKI等: "Geospatial Event Detection by Grouping Emotion Contagion in Social Media", 《IEEE TRANSACTIONS ON BIG DATA》 *
刘雪娜: "小程序运营活动管理平台的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
孙龙龙: "面向Kafka消息中间件的监控管理系统设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
CN113031986B (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN109358858B (en) Automatic deployment method, device, medium and electronic equipment
CN111221572B (en) Method, device, medium and equipment for automatically adapting to running environment
CN110851139B (en) Method and device for checking codes and electronic equipment
CN110960855B (en) Communication protocol code updating method and device, electronic equipment and storage medium
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
CN111258998A (en) Data verification method, device, medium and electronic equipment
CN110362371B (en) View level control method, device and system, computer equipment and medium
CN112650521B (en) Software development kit SDK thermal restoration method and device and electronic equipment
CN111625291B (en) Automatic iteration method and device for data processing model and electronic equipment
CN111506904B (en) Method and device for online bug repair
CN111177260A (en) Database remote copying method and device and electronic equipment
CN113031986B (en) Feature comparison algorithm dynamic loading method, device, terminal and medium
US10311138B2 (en) Preventing partial change set deployments in content management systems
US9075679B1 (en) Creating a prerequisite checklist corresponding to a software application
CN111625232B (en) Method and device for generating application program installation package, readable medium and electronic equipment
CN113656050B (en) Method and apparatus for generating version number
CN110968334B (en) Application resource updating method, resource package manufacturing method, device, medium and equipment
CN112068895A (en) Code configuration method and device, video playing equipment and storage medium
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN112286609B (en) Method and device for managing shortcut setting items of intelligent terminal
CN111367555B (en) Assertion method, assertion device, electronic equipment and computer readable medium
CN116561015B (en) Map application testing method, electronic device and computer readable medium
CN112559394B (en) System library access method and device and electronic equipment
CN117648117A (en) Code branch management method, system, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant