CN113031986B - Feature comparison algorithm dynamic loading method, device, terminal and medium - Google Patents

Feature comparison algorithm dynamic loading method, device, terminal and medium Download PDF

Info

Publication number
CN113031986B
CN113031986B CN202110323615.8A CN202110323615A CN113031986B CN 113031986 B CN113031986 B CN 113031986B CN 202110323615 A CN202110323615 A CN 202110323615A CN 113031986 B CN113031986 B CN 113031986B
Authority
CN
China
Prior art keywords
algorithm
feature comparison
comparison algorithm
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.)
Active
Application number
CN202110323615.8A
Other languages
Chinese (zh)
Other versions
CN113031986A (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

Abstract

The application provides a dynamic loading method, a device, a terminal and a medium for a feature comparison algorithm, wherein the method comprises the following steps: acquiring a feature comparison algorithm package from an algorithm bin platform; the feature comparison algorithm package information is sent to an information platform, and the corresponding feature comparison algorithm package is downloaded through monitoring the theme of the information platform; and checking the feature comparison algorithm package according to the feature comparison algorithm package and interfaces required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model by using a new algorithm version model after the feature comparison algorithm package passes the checking, so as to realize the dynamic loading of the feature comparison algorithm. According to the feature comparison algorithm package and the interface required by the current environment, the feature comparison algorithm package is checked, after the verification is passed, the old algorithm in the environment is dynamically replaced by the loaded feature comparison algorithm package, the noninductive upgrading of the feature comparison algorithm is realized, the application range of the feature comparison algorithm is expanded, the usability of the software in an updated state is enhanced, and meanwhile, the maintainability is increased, so that the software has more advantages.

Description

Feature comparison algorithm dynamic loading method, device, terminal and medium
Technical Field
The present disclosure 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, AI (Artificial Intelligence) algorithms are also increasing and updating is faster and faster. In some possible implementation scenarios, a developer uploads an installation file corresponding to a new algorithm to a server, the server discovers the installation file corresponding to the new version algorithm through pushing or autonomous detection of software, and when a user confirms to update (new version algorithm) software, the installation file of the software is downloaded, and software update is completed through the installation file.
However, the existing software upgrade does not consider the running environment of the new software (i.e. whether the current environment has the hardware requirements required for upgrade), but directly selects the upgrade software, which not only causes that the software cannot be dynamically loaded, but also delays the time of 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 for solving 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 method for dynamically loading a feature alignment algorithm, including:
acquiring a feature comparison algorithm package from an algorithm bin platform;
the feature comparison algorithm package information is sent to an information platform, and the corresponding feature comparison algorithm package is downloaded through monitoring the theme of the information platform;
and checking the feature comparison algorithm package according to the feature comparison algorithm package and interfaces required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model by a new algorithm version model after the feature comparison algorithm package passes the checking, so as to realize the dynamic loading of the feature comparison algorithm.
Another object of the present application is to provide a dynamic loading device for a feature alignment algorithm, including:
the image acquisition module is used for acquiring a feature comparison algorithm package 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 the interfaces required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model by a new algorithm version model after the verification is passed, so as to realize the dynamic loading of the feature comparison algorithm.
Another object of the present application is to provide a terminal, including:
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, the one or more processing devices are caused 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 having stored thereon a computer program for causing the computer to perform the feature alignment algorithm dynamic loading method.
As described above, the feature comparison algorithm dynamic loading method, device, terminal and medium have the following beneficial effects:
according to the feature comparison algorithm package and the interface required by the current environment, the feature comparison algorithm package is verified, after verification is passed, the old algorithm in the environment is dynamically replaced by the loaded feature comparison algorithm package, the noninductive upgrading of the feature comparison algorithm is realized, the application range of the feature comparison algorithm is expanded, the usability of the software in an updated state is enhanced, and meanwhile, the maintainability is increased, so that the software has more advantages.
Drawings
FIG. 1 shows a flow chart of a dynamic loading method of a feature comparison algorithm provided by the application;
FIG. 2 is a flowchart showing a step S3 in a dynamic loading method of a feature comparison algorithm provided in the present application;
FIG. 3 is another flowchart of step S3 in a dynamic loading method of a feature comparison algorithm provided in the present application;
FIG. 4 is a complete flowchart of a dynamic loading method of a feature comparison algorithm provided in the present application;
FIG. 5 shows a block diagram of a feature alignment algorithm dynamic loading device 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
Other advantages and effects of the present application will become apparent to those skilled in the art from the present disclosure, when the following description of the embodiments is taken in conjunction with the accompanying drawings. The present application may be embodied or carried out in other specific embodiments, and the details of the present application may be modified or changed from various points of view and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be noted that, the illustrations provided in the following embodiments merely illustrate the basic concepts of the application by way of illustration, and only the components related to the application are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complex.
Referring to fig. 1, a flow chart of a dynamic loading method of a feature comparison algorithm provided in the present application includes:
step S1, obtaining a feature comparison algorithm package from an algorithm bin platform;
specifically, a feature comparison algorithm package (algorithm package) from an algorithm bin 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 specification, 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 bin platform acquires an uploaded algorithm package, analyzes a description file in the algorithm package to generate a piece of information of the comparison algorithm package in a comparison algorithm list, wherein the description file in the algorithm package comprises an algorithm package description, an algorithm type, a compiling time algorithm version, an algorithm model version number, a quality component stretch coefficient and an inheritable algorithm model version number list.
Step S2, the feature comparison algorithm package information is sent to an information platform, and the corresponding feature comparison algorithm package is downloaded through monitoring the theme of the information platform;
the information platform can be Kafka, which is a high-throughput distributed publish-subscribe message system, and can process all action stream data of consumers in websites. The algorithm package information is sent to a Topic appointed by Kafka according to an appointed Topic structure by using the algorithm bin platform, and installation information is obtained by monitoring the appointed Topic and the algorithm package is downloaded;
when an interface calling instruction is received, the feature comparison algorithm package information is sent to a theme appointed by an information platform;
specifically, when the algorithm bin platform detects an installation interface call, updating information into a Topic designated by Kafka according to a designated Topic structure; for example, when the algorithm bin receives the installation interface call, the algorithm bin assembles 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 update, if yes, acquiring installation information according to a specified theme, updating the offset, and downloading a feature comparison algorithm package according to the installation information
Specifically, when the update of the offset of the Kafka is monitored, the Topic consumes and updates the offset, and when the installation information of the algorithm package is consumed, the algorithm package is downloaded according to the path of the feature comparison algorithm package in the Kafka; for example, when the update of the kafka offset is monitored by using the view library, the topic is consumed and the offset is updated, and after the algorithm package installation information (i.e., the algorithm package installation information) is consumed, the view library downloads the algorithm package according to the path of the feature comparison algorithm package in the kafka.
And S3, checking the feature comparison algorithm package according to the feature comparison algorithm package and interfaces required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model by a new algorithm version model after the checking is passed, so as to realize the dynamic loading of the feature comparison algorithm.
Specifically, the downloaded file is read, the feature comparison algorithm package is checked through the description file in the feature comparison algorithm package, the comparison algorithm library file and the interface required by the current environment, for example, the content and the format in the feature comparison algorithm package are checked, 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 the existing algorithm in the dynamic replacement environment.
In this embodiment, the feature comparison algorithm package is checked according to the feature comparison algorithm package and the interface required by the current environment, and after the feature comparison algorithm package passes the check, the old algorithm in the environment is dynamically replaced by the loaded feature comparison algorithm package, so as to realize the noninductive upgrade of the feature comparison algorithm, expand the application range of the actual application scene, enhance the availability of the software in the updated state, and increase the maintainability, so that the software has more advantages.
Referring to fig. 2, a flowchart of step S3 in a dynamic loading method of a feature comparison algorithm provided in the present application, based on the embodiment of fig. 1, further includes, in step S3:
step S31, reading the feature comparison algorithm package, obtaining interfaces of the feature comparison algorithm package and storing the interfaces into an interface list;
step S32, judging whether the interface number of the interface list is less than the interface number of the interfaces required by the current environment, thereby checking the format of the feature comparison algorithm packet once;
step S321, if the number of interfaces of the interface list is less than the number of interfaces of the interfaces required by the current environment, judging that the feature comparison algorithm packet is abnormal;
step S322, if the interface number of the interface list is not less than the interface number of the interfaces required by the current environment, performing secondary verification on the content consistency of the interface list;
and 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 new folder of the description file in the algorithm package according to the version number of the algorithm model, and storing the comparison algorithm library file and the description file in 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 the number of interfaces required by the current environment (namely, the necessary interfaces required by the installation of the current environment); if the number of interfaces of the interface list is less than the number of interfaces of the interfaces required by the current environment, the comparison algorithm library file is considered to be abnormal, and errors are reported; and if the number of the interfaces of the interface list is not less than the number 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 secondary verification 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 package is matched with the same content, judging the next interface; if the new feature comparison algorithm package cannot be matched with the same content, reporting errors.
Specifically, by checking the consistency of the content 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 checking the consistency of the content; if the newly added algorithm packages find the consistency, traversing the next interface; if the newly added algorithm package cannot find the consistency, reporting errors integrally; until all interfaces in the interface list have been traversed.
In this embodiment, by checking the format and content of the feature comparison algorithm package, for example, on one hand, by checking the number of interfaces (format) necessary for comparing the interfaces of the algorithm library file with the number of interfaces in the current environment in the algorithm package, it can be confirmed whether the current environment meets the hardware requirement required for new algorithm upgrade; on the other hand, content consistency in the interface list is checked, whether the number and the names of interfaces required by the current environment are the same is accurately determined, so that an old algorithm in the environment is dynamically replaced, and the noninductive upgrading of a feature comparison algorithm package is realized.
Referring to fig. 3, another flowchart of step S3 in a dynamic loading method of a feature comparison algorithm provided in the present application is shown, including:
step S31, reading the feature comparison algorithm package, obtaining interfaces of the feature comparison algorithm package and storing the interfaces into an interface list;
step S311, judging whether the key field of the description file in the feature comparison algorithm package is missing for three times,
step S3111, if missing, reporting error without replacing the comparison algorithm;
step S3112, if not missing, verifying the content of the description file four times according to a preset field verification rule;
step S31121, if the content check is not passed, reporting an error;
step S31122, if the content verification is passed, verifying the feature comparison algorithm packet once;
step S32, judging whether the interface number of the interface list is less than the interface number of interfaces required by the current environment, and checking the feature comparison algorithm package once according to the judgment basis;
step S321, if the number of interfaces of the interface list is less than the number of interfaces of the interfaces required by the current environment, judging that the feature comparison algorithm packet is abnormal;
step S322, if the interface number of the interface list is not less than the interface number of the interfaces required by the current environment, performing secondary verification on the content consistency of the interface list;
and step S33, until all interfaces in the interface list are verified.
In this embodiment, before the number of interfaces is checked: firstly, three times of verification are carried out on key fields in a description file in an algorithm package, so that whether the algorithm package is complete and accurate can be roughly estimated; and secondly, the content of the description file in the algorithm package is checked four times, so that whether the downloaded algorithm package is complete or not can be accurately judged, and the subsequent dynamic loading of the corresponding algorithm is facilitated.
In other embodiments, the verifying and dynamically replacing pairs includes:
and (a) after the algorithm package is downloaded by utilizing the view library, creating a folder according to the algorithm model version number in the description file according to the description file stored in the/home/algorithm/directory in the algorithm package, and comparing the algorithm library file with the description file stored in the algorithm model version number in the/home/algorithm/corresponding folder, for example, A050001.
Step (b), decompressing the algorithm package and storing, firstly, checking the fields of the description file for three times to confirm whether the key fields are missing, if so, reporting errors, 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 and the like) of the field, and subsequent operation is performed after the check is passed, and if the check is not passed, the error is reported.
After the basic information passes verification, reading a feature comparison algorithm package through a C++ function dlopen, performing interface traversal reading of the file through the C++ function dlsym after reading is completed, and storing the interface traversal reading into an interface list; 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 required by the current environment, judging that a comparison packet is abnormal, and reporting errors, (note that the number of interfaces and the list of interfaces required by the previous environment are built in a program, and the interface list is in a comparison algorithm packet document);
and (d) if the number of interfaces in the interface list is consistent with or greater than the number of interfaces required by the current environment, performing secondary verification on the consistency of the list content, traversing the interface list proposed by the algorithm package one by one according to the list of the interfaces required by the current environment, if the interfaces are found to be consistent in the newly added algorithm package, performing next interface traversal, and if the interfaces are failed, reporting errors integrally until the final required parameters are completely traversed.
And (e) reloading the cache information after the verification is finished and the cache information passes, replacing old algorithm model version information in the environment with new algorithm model version information, and updating subsequent requests with new algorithm model version numbers.
In this embodiment, the key field verification, the content verification, the verification of the number of interfaces of the algorithm library file and the verification of the content of the interface list are performed on the description file in the algorithm package, and the dynamic loading of the feature comparison algorithm during the subsequent algorithm upgrading is ensured through a series of complete file formats and the verification of the content.
Referring to fig. 4, a complete flowchart of a dynamic loading method of a feature comparison algorithm provided in the present application, on the basis of fig. 1, further includes:
step S4, detecting whether the version number of the old algorithm version model is in an updated inheritable algorithm model version number list, and determining whether the version number of the old algorithm version model can be inherited according to a detection result; the method comprises the following steps:
step S41, detecting whether the version number of the old algorithm version model is in an updated and inheritable algorithm model version number list;
step S42, 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 performed;
step S43, if the old algorithm version number is not in the updated inheritable algorithm model version number list, performing algorithm feature refreshing; and acquiring a characteristic length according to the characteristic protection file, cutting the characteristic according to a fixed length, and calling an analysis interface to update the characteristic until all the cut characteristics are completely updated.
For example, if the old algorithm version model contains features, such as A0, etc., and if the new algorithm version model still has features after updating, 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, then no operation is performed; if the new algorithm version model has no relevant features after updating, i.e. the old algorithm version number is not in the updated and inheritable algorithm model version number list, the feature A0 needs to be updated into the feature B0 so as to overcome the phenomenon that the partial features of the old algorithm version are not available after updating.
In this embodiment, after the feature comparison algorithm passes through and is replaced, whether the feature file can be inherited is determined, whether the version number of the old algorithm version model is in the updated and inheritable algorithm model version number list is determined, and if so, no operation is performed; if the characteristic is not in the inheritable algorithm model version number list, the algorithm characteristic is updated, the algorithm is updated to C++ to obtain the characteristic length according to the characteristic protection file, the characteristic is fixed and cut, the analysis interface is called by a section of characteristic after cutting to update the characteristic, and the characteristic is stored in a new file position until all the characteristic is updated, and the characteristic consumption is not performed during the period of updating.
In other embodiments, the algorithm package is updated from a050001 to a050002, and is illustrated as follows:
firstly, uploading an algorithm package on a page of an algorithm bin platform, after uploading is completed (forming the algorithm package and installation information), transmitting the installation information to a view library through kafka, downloading the algorithm package by the view library, creating a file catalog according to algorithm model version number information in a description file after downloading is completed, storing the file according to the catalog, and installing the file catalog;
and then, comparing the description file with an algorithm package interface, synchronizing information to kafka if any check in the comparison process is not passed, feeding back to an algorithm bin, marking a task state by the algorithm bin until the format and the content of the algorithm package are checked, 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.
Confirm A050001 still in can inherit algorithm version number A050002, if yes, do not carry on the characteristic to update; if not, carrying out feature updating and creating a feature file.
Referring to fig. 5, a structural block diagram of a dynamic loading device for a feature comparison algorithm provided in the present application is provided; comprising the following steps:
the image acquisition module 1 is used for acquiring a feature comparison algorithm package from the 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 interfaces required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model by a new algorithm version model after verification is passed, so that dynamic loading of the feature comparison algorithm is realized;
the feature updating module 4 is used for detecting whether the version number of the old algorithm version model is in an updated inheritable algorithm model version number list, and determining whether the version number of the old algorithm version model can be inherited according to a detection result; for example, detecting whether the version number of the old algorithm version model is in an 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 method is not operated; if the old algorithm version number is not in the updated inheritable algorithm model version number list, carrying out algorithm feature refreshing; and acquiring a characteristic length according to the characteristic protection file, cutting the characteristic according to a fixed length, and calling an analysis interface to update the characteristic until all the cut characteristics are completely updated.
The feature comparison algorithm dynamic loading device and the feature comparison algorithm dynamic loading method are in one-to-one correspondence, wherein technical details and technical effects related to each module and the above flow steps are the same, and are not described in detail herein, please refer to the feature comparison algorithm dynamic loading method.
The terminal device in the embodiments of the present disclosure may include, but is not limited to, a fixed terminal such as a cell phone, a tablet, a laptop, a desktop computer, a computer all-in-one, a server, a workstation, a television, a set-top box, smart glasses, a smartwatch, a digital camera, an MP4 play terminal, an MP5 play terminal, a learning machine, a point-to-read machine, an electronic book, an electronic dictionary, an in-vehicle terminal, a virtual reality (VirtualReality, VR) play terminal, or an augmented reality (Augmented Reality, AR) play terminal.
As shown in fig. 6, the terminal 600 may include a processing device (e.g., a central processor, a graphic processor, etc.) 601, which may perform various appropriate actions and processes according to 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 required 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 through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic 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 devices, it is to be understood that not all illustrated devices are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to 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 shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the terminal; or may exist alone without being fitted into the terminal.
The computer-readable medium carries one or more programs which, when executed by the terminal, cause the terminal to:
step S1, obtaining a feature comparison algorithm package from an algorithm bin platform;
step S2, the feature comparison algorithm package information is sent to an information platform, and the feature comparison algorithm package is obtained by monitoring the theme of the information platform;
and S3, checking the feature comparison algorithm package according to the feature comparison algorithm package and interfaces required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model by a new algorithm version model after the checking is passed, so as to realize the dynamic loading of the feature comparison algorithm.
Computer program code for carrying out operations of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 interfaces 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, thereby realizing the noninductive upgrade of the feature comparison algorithm, expanding the application range of the actual application scenario, enhancing the availability of the software in the updated state, and simultaneously increasing the maintainability, so that the software has more advantages.
The foregoing embodiments are merely illustrative of the principles of the present application and their effectiveness, and are not intended to limit the application. Modifications and variations may be made to the above-described embodiments by those of ordinary skill in the art without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications and variations which may be accomplished by persons skilled in the art without departing from the spirit and technical spirit of the disclosure be covered by the claims of this application.

Claims (8)

1. The dynamic loading method of the feature comparison algorithm is characterized by comprising the following steps of:
acquiring a feature comparison algorithm package from an algorithm bin platform;
transmitting the feature comparison algorithm package information to an information platform, and downloading the corresponding feature comparison algorithm package by monitoring the topic of the information platform;
checking the feature comparison algorithm package according to the feature comparison algorithm package and interfaces required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model by a new algorithm version model after the feature comparison algorithm package passes the checking, so as to realize the dynamic loading of the feature comparison algorithm;
reading the feature comparison algorithm package, obtaining an interface of the feature comparison algorithm package and storing the interface into an interface list; judging whether the interface number of the interface list is less than the interface number of interfaces required by the current environment, so as to check the feature comparison algorithm package once;
detecting whether the version number of the old algorithm version model is in an updated and inheritable algorithm model version number list; if the version number of the old algorithm version model is in the updated and inheritable algorithm model version number list, the method is not operated; if the old algorithm version number is not in the updated inheritable algorithm model version number list, carrying out algorithm feature refreshing; and acquiring a characteristic length according to the characteristic protection file, cutting the characteristic according to a fixed length, and calling an analysis interface to update the characteristic until all the cut characteristics are completely updated.
2. The method for dynamically loading the 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 topic of the information platform comprises the following steps:
when an interface calling instruction is received, the feature comparison algorithm package information is sent to a topic appointed by an information platform;
and monitoring whether the information platform has offset updating, if yes, acquiring installation information according to the designated topic, updating the offset, and downloading a feature comparison algorithm package according to the installation information.
3. The method for dynamically loading a feature alignment algorithm according to claim 1, further comprising:
if the number of interfaces of the interface list is less than the number of interfaces required by the current environment, judging that the feature comparison algorithm packet is abnormal;
if the number of interfaces of the interface list is not less than the number of interfaces 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 verified.
4. A method for dynamically loading a feature alignment algorithm according to claim 1 or 3, wherein before the step of obtaining the interface of the feature alignment algorithm package and storing the interface in the interface list, the method further comprises:
judging whether key fields of the description file in the feature comparison algorithm package are missing for three times,
if the comparison algorithm is not changed, reporting errors;
if not, performing four times of verification on the content of the description file according to a preset field verification rule;
if the content verification is not passed, reporting an error;
and if the content verification is passed, verifying the feature comparison algorithm package once.
5. The method for dynamically loading a feature comparison algorithm according to claim 3, wherein the step of secondarily verifying the content consistency of the interface list 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 package is matched with the same content, judging the next interface;
if the new feature comparison algorithm package cannot be matched with the same content, reporting errors.
6. The utility model provides a characteristic compares algorithm dynamic loading device which characterized in that includes:
the image acquisition module is used for acquiring a feature comparison algorithm package 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 topic of the information platform;
the verification loading module is used for verifying the feature comparison algorithm package according to the feature comparison algorithm package and the interfaces required by the current environment, and loading the feature comparison algorithm package to replace an old algorithm version model by a new algorithm version model after the verification is passed, so that the dynamic loading of the feature comparison algorithm is realized;
reading the feature comparison algorithm package, obtaining an interface of the feature comparison algorithm package and storing the interface into an interface list; judging whether the interface number of the interface list is less than the interface number of interfaces required by the current environment, so as to check the feature comparison algorithm package once;
detecting whether the version number of the old algorithm version model is in an updated and inheritable algorithm model version number list; if the version number of the old algorithm version model is in the updated and inheritable algorithm model version number list, the method is not operated; if the old algorithm version number is not in the updated inheritable algorithm model version number list, carrying out algorithm feature refreshing; and acquiring a characteristic length according to the characteristic protection file, cutting the characteristic according to a fixed length, and calling an analysis interface to update the characteristic until all the cut characteristics are completely updated.
7. A terminal, characterized by: comprising the following steps:
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, the one or more processing devices are caused to implement the feature alignment algorithm dynamic loading method as set forth in any one of claims 1-5.
8. A computer-readable storage medium having stored thereon a computer program for causing the computer to perform the feature alignment algorithm dynamic loading method of any one of claims 1 to 5.
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 CN113031986A (en) 2021-06-25
CN113031986B true 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
Geospatial Event Detection by Grouping Emotion Contagion in Social Media;Brandon Lwowski等;《IEEE Transactions on Big Data》;159 - 170 *
小程序运营活动管理平台的设计与实现;刘雪娜;《中国优秀硕士学位论文全文数据库信息科技辑》;I138-220 *
面向Kafka消息中间件的监控管理系统设计与实现;孙龙龙;《中国优秀硕士学位论文全文数据库 信息科技辑》;I138-772 *

Also Published As

Publication number Publication date
CN113031986A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN111221572B (en) Method, device, medium and equipment for automatically adapting to running environment
CN110865898B (en) Method, device, medium and equipment for converging crash call stack
CN110851139B (en) Method and device for checking codes and electronic equipment
CN111367516B (en) Application interface generation method and device 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
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
CN110990038B (en) Method, apparatus, electronic device and medium for applying local update
CN113031986B (en) Feature comparison algorithm dynamic loading method, device, terminal and medium
CN111177260A (en) Database remote copying method and device and electronic equipment
CN112422648B (en) Data synchronization method and system
CN111240657A (en) Method and device for generating SDK and electronic equipment
CN111625232B (en) Method and device for generating application program installation package, readable medium and electronic equipment
CN112286609B (en) Method and device for managing shortcut setting items of intelligent terminal
CN110968334B (en) Application resource updating method, resource package manufacturing method, device, medium and equipment
CN111738415B (en) Model synchronous updating method and device and electronic equipment
CN111367555B (en) Assertion method, assertion device, electronic equipment and computer readable medium
CN116302208A (en) Apollo configuration modification method, apparatus, electronic device and computer readable medium
CN116931978A (en) Upgrade operation execution method, device, electronic equipment and computer readable medium
CN117609077A (en) Method and device for rechecking configuration parameters, electronic equipment and storage medium
CN117197565A (en) Content understanding model training, content understanding method, device, medium and equipment
CN117472425A (en) Resource processing method and device, readable medium and electronic equipment

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