CN112230898A - Model application interaction system, method, readable storage medium and electronic device - Google Patents

Model application interaction system, method, readable storage medium and electronic device Download PDF

Info

Publication number
CN112230898A
CN112230898A CN202011144653.9A CN202011144653A CN112230898A CN 112230898 A CN112230898 A CN 112230898A CN 202011144653 A CN202011144653 A CN 202011144653A CN 112230898 A CN112230898 A CN 112230898A
Authority
CN
China
Prior art keywords
model
module
called
engineering
strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011144653.9A
Other languages
Chinese (zh)
Inventor
任丙东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beike Technology Co Ltd
Original Assignee
Beike 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 Beike Technology Co Ltd filed Critical Beike Technology Co Ltd
Priority to CN202011144653.9A priority Critical patent/CN112230898A/en
Publication of CN112230898A publication Critical patent/CN112230898A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the disclosure discloses a model application interaction system, a method, a readable storage medium and an electronic device, wherein the system comprises: the system comprises a strategy module, an engineering module and a sharing module, wherein the strategy module is used for training and generating an initial model, and the strategy module further comprises an offline strategy evaluation unit which is used for evaluating the initial model; the shared module is used for processing the initial model generated by the strategy module to obtain a called model used by the engineering module; the engineering module is used for configuring the called model for the user to use; the technical stacks of the strategy module, the engineering module and the shared module are consistent, and the strategy module is decoupled from the engineering module. The method and the device for evaluating the model can improve the efficiency of model deployment, reduce the probability of code modification problems, improve the efficiency of model evaluation, lay a foundation for solving project isomerism, and simultaneously improve the communication efficiency of strategy personnel and engineering personnel and improve the development efficiency.

Description

Model application interaction system, method, readable storage medium and electronic device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a model application interaction system, a method, a readable storage medium, and an electronic device.
Background
In the field of machine learning, there are situations where engineering and strategies work together. This is because machine learning contains two parts of content: firstly, model training and model iteration under a line; and secondly, deploying the produced model into an online service. The cooperative work of the two parts of content constitutes complete machine learning. The emphasis points of the contents of the two parts are different, the model training emphasizes high-efficiency model output and selection and evaluation of the algorithm. Therefore, the structure of the training code, the robustness and the expansibility of the program are not considered too much, a brute force growth mode is generally adopted, and the quality of the produced model is emphasized. The on-line service is like the common web service, and needs to ensure high availability, high performance, easy expansion and clear and readable code structure of the on-line service.
At present, the cooperative work usually generates a model file and a corresponding model preprocessing code through a strategy, delivers the model file and the corresponding model preprocessing code to engineering personnel, and the engineering personnel reconstructs the code into engineering service and evaluates the accuracy of the model through unified evaluation data. If the accuracy of the model has deviation, strategic personnel and engineering personnel are required to perform coordinated analysis to find a deviation point and solve the problem.
Disclosure of Invention
Embodiments of the present disclosure provide a model application interaction system, method, computer-readable storage medium and electronic device.
An embodiment of the present disclosure provides a model application interaction system, including: the system comprises a strategy module, an engineering module and a sharing module, wherein the strategy module is used for training and generating an initial model, and the strategy module further comprises an offline strategy evaluation unit which is used for evaluating the initial model; the shared module is used for processing the initial model generated by the strategy module to obtain a called model used by the engineering module; the engineering module is used for configuring the called model for the user to use; the technical stacks of the strategy module, the engineering module and the shared module are consistent, and the strategy module is decoupled from the engineering module.
In some embodiments, the engineering module includes a control unit and a service unit, wherein the control unit is configured to receive information to be identified, which is to be identified by using the called model, and process the information obtained after identification, and the service unit is configured to extract the called model from the common module and perform a preset function on the information to be identified by using the called model.
In some embodiments, the number of invoked models is at least two, the service unit is further configured to:
and assembling at least two called models into a complete model, and executing a preset function on the information to be identified by using the complete model.
In some embodiments, the shared module includes a model encapsulation unit for encapsulating the initial model and generating a called model for processing information input by the engineering module based on the encapsulated model.
In some embodiments, the common module further includes a template matching unit configured to set a template matching function of the called model to perform template matching on the information output by the encapsulated model.
In some embodiments, the shared module further comprises at least one of: the data post-processing unit is used for setting an information conversion function of the called model, and the information conversion function is used for converting the matched information into result data with a preset structure; and the data precipitation unit is used for setting a data storage function of the called model, and the information storage function is used for sending the result data and the corresponding information to be identified to a preset database for storage.
In some embodiments, the model encapsulation unit and the template matching unit are implemented by factory models.
In some embodiments, the engineering module further includes an engineering evaluation unit for evaluating the called model configured by the engineering module.
In some embodiments, the engineering module loads the called model by using a preset model service component, and provides service for the user side by using a preset interface; the policy module loads the initial model into a model object and uses the model object to perform the functions of the initial model.
According to another aspect of the embodiments of the present disclosure, there is provided a model application interaction method, including: the strategy module is used for training to obtain an initial model for executing a preset function based on a preset training sample; evaluating the initial model, and if the initial model passes the evaluation, sending the initial model to the sharing module; the shared module processes the initial model to obtain a called model and sends the called model to the engineering module; the engineering module configuration is invoked to the model for use by the user.
In some embodiments, the engineering module configures the called model for use by a user, including: the engineering module receives information to be identified, which is to be identified by using the called model, and processes the information obtained after identification; and extracting a called model from the common module, and executing a preset function on the information to be identified by using the called model.
In some embodiments, the number of called models is at least two; and the step of extracting the called model from the shared module and executing a preset function on the information to be identified by using the called model comprises the following steps: and the engineering module assembles at least two called models into a complete model, and executes a preset function on the information to be identified by using the complete model.
In some embodiments, the processing of the initial model by the common module to obtain a called model and sending the called model to the engineering module includes: and the shared module encapsulates the initial model and generates a called model for processing the information input by the engineering module based on the encapsulated model.
In some embodiments, the common module processes the initial model to obtain a called model and sends the called model to the engineering module, further comprising: and the shared module sets the template matching function of the called model so as to perform template matching on the information output by the packaged model.
In some embodiments, the method further comprises: the common module performs at least one of the following steps: converting the matched information into result data with a preset structure; and sending the result data and the corresponding information to be identified to a preset database for storage.
In some embodiments, after the engineering module configures the called model for use by a user, the method further comprises: and the engineering module evaluates the called model configured by the engineering module.
In some embodiments, the engineering module configures the called model for use by a user, including: the engineering module loads a called model by adopting a preset model service component and provides service for a user side by adopting a preset interface; after the strategy module trains and obtains an initial model executing a preset function based on a preset training sample, the method further includes: the policy module loads the initial model into a model object and uses the model object to perform the functions of the initial model.
According to another aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the above-described model application interaction method.
According to another aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; and the processor is used for reading the executable instructions from the memory and executing the instructions to realize the model application interaction method.
Based on the model application interaction system, the model application interaction method, the computer-readable storage medium and the electronic device provided by the embodiments of the disclosure, the strategy module and the engineering module are decoupled, so that the decoupling modification of the strategy module and the engineering module is not influenced mutually, and the model deployment efficiency is improved. The shared module can be maintained by the strategy module and the engineering module together, so that convenience is provided for modification of the strategy module and the engineering module, and the probability of problems occurring in modified codes is reduced. By arranging the strategy evaluation unit, the strategy module can be used for service evaluation at any time and any place without starting a heavy application middleware for evaluation like engineering, so that the efficiency of model evaluation is improved. The strategy and the engineering can be cooperatively developed by using the same set of codes through the unified technology stack, so that the foundation is laid for solving the problem of project isomerism, and meanwhile, the communication efficiency of strategy personnel and engineering personnel can be improved, and the development efficiency is improved.
The technical solution of the present disclosure is further described in detail by the accompanying drawings and examples.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in more detail embodiments of the present disclosure with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is a block diagram of a model application interaction system provided in an exemplary embodiment of the present disclosure.
Fig. 2 is a block diagram of a model application interaction system according to another exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart of a model application interaction method according to an exemplary embodiment of the present disclosure.
Fig. 4 is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure.
Detailed Description
Hereinafter, example embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of the embodiments of the present disclosure and not all embodiments of the present disclosure, with the understanding that the present disclosure is not limited to the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present disclosure are used merely to distinguish one element from another, and are not intended to imply any particular technical meaning, nor is the necessary logical order between them.
It is also understood that in embodiments of the present disclosure, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the disclosure, may be generally understood as one or more, unless explicitly defined otherwise or stated otherwise.
In addition, the term "and/or" in the present disclosure is only one kind of association relationship describing an associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the former and latter associated objects are in an "or" relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
The disclosed embodiments may be applied to electronic devices such as terminal devices, computer systems, servers, etc., which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set top boxes, programmable consumer electronics, network pcs, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above systems, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Summary of the application
The current cooperative working mode has the following problems:
1. a large number of iterations. After the policy personnel code is produced, engineering personnel are required to read the code and reconstruct the code into a code of an on-line service style. This process is time consuming and has low effective throughput for the engineer.
2. The delivery of the model and the code is generally delivered through files, and the problems of missed delivery and wrong delivery are easily caused without strict control. And after delivery, deviation is easily introduced in the process of reading and reconstructing by engineering personnel, so that the evaluation results are inconsistent.
3. Deviation checking is difficult, time consumption is high, and the whole working efficiency is greatly reduced. For example, python code is delivered, and engineering uses c + + as a technology stack, which is very easy to cause code understanding errors because of the difference of the technology stacks.
Exemplary System
FIG. 1 illustrates an exemplary system architecture 100 of a model application interaction system to which embodiments of the present disclosure may be applied.
As shown in FIG. 1, the system architecture 100 may include a policy module 101, an engineering module 102, and a common module 103. The policy module 101, the engineering module 102, and the sharing module 103 may be disposed on at least one electronic device. For example, the policy module 101, the engineering module 102, and the sharing module 103 may be respectively disposed on different electronic devices, and the electronic devices may be connected via a network. For another example, the policy module 101, the engineering module 102, and the sharing module 103 may be modules that are disposed on the same electronic device and implement respective functions. It should be noted that the modules may be software modules, hardware modules or modules combining software and hardware. The electronic devices may be, but are not limited to, various devices of a server, a laptop, a desktop, a PAD (tablet), and the like.
The strategy module 101 is used for training and generating an initial model. The initial model may be a model that implements various functions, such as an image recognition model, a text recognition model, a speech recognition model, and so forth. Generally, the strategy module 101 may collect training samples in advance, and use the training samples to train and obtain the initial model based on a machine learning method.
The policy module 101 further includes an offline policy evaluation unit 1011, and the offline policy evaluation unit 1011 is configured to evaluate the initial model. The evaluation content may include, but is not limited to, identification accuracy, execution efficiency, execution stability, and the like of the test model. The off-line strategy evaluation unit is in an off-line state during evaluation, namely, the evaluation and the engineering application are completely decoupled, namely, the model can be evaluated at any time and any place without starting a heavy application middleware like engineering.
The sharing module 103 is configured to process the initial model generated by the policy module 101 to obtain a called model for the engineering module 102 to use. The processing method of the initial model may include various methods, for example, encapsulating the initial model, adjusting the calling method of the model, setting more functions of the called model, and the like. The sharing module 103 can be called by the policy module 101 and the engineering module 102 at the same time, the policy module 101 sends the trained model to the sharing module 103, the sharing module 103 processes the model without the participation of the policy module 101, the called model generated by the sharing module 103 is submitted to the engineering module 102, and the engineering module 102 deploys the called model on line.
The engineering module 102 is used to configure the called model for use by the user. Specifically, the engineering module 102 may provide a service entry and schedule a service to be performed, that is, extract a called model implementing a preset function.
The technology stacks of the policy module 101, the engineering module 102 and the common module 103 are consistent, and the policy module 101 is decoupled from the engineering module 102. The technology stack refers to a combination of various technologies used for realizing the functions of the system. As an example, each of the modules described above uses python as the main stack development language and tensorflow or pytorch as the training framework. And (3) using a flash as a service framework (the engineering module 102 uses the flash as a web service, and the strategy module 101 uses the flash-script as a cli service), unifying the python version and the dependent library version, and ensuring that the environment is completely consistent.
Generally, the policy module 101 operates in an offline state and the engineering module 102 operates in an online state, so that the policy module 101 and the engineering module 102 are decoupled, i.e., modifying the code of the policy module 101 does not affect the engineering service and modifying the code of the engineering module 102 does not affect the policy evaluation.
According to the system provided by the above embodiment of the disclosure, the policy module 101 and the engineering module 102 are decoupled, so that modifications of the decoupling of the policy module 101 and the decoupling of the engineering module 102 are not influenced mutually, and the efficiency of model deployment is improved. By arranging the sharing module 103, communication intermediate services are provided for the policy module 101 and the engineering module 102, the sharing module 103 can be maintained by the policy module 101 and the engineering module 102 together, convenience is provided for modification of the policy module 101 and the engineering module 102, and the probability of problems occurring in modifying codes is reduced. By arranging the strategy evaluation unit, the strategy module 101 can be used for service evaluation at any time and any place without starting a heavy application middleware for evaluation like engineering, so that the efficiency of model evaluation is improved. The strategy and the engineering can be cooperatively developed by using the same set of codes through the unified technology stack, so that the foundation is laid for solving the problem of project isomerism, and meanwhile, the communication efficiency of strategy personnel and engineering personnel can be improved, and the development efficiency is improved.
In some alternative implementations, as shown in fig. 2, the engineering module 102 may include a control unit 1021 and a service unit 1022, where the control unit 1021 is configured to receive information to be identified by using the called model, and process information obtained after the identification. The service unit 1022 is configured to extract the called model from the shared module 103, and perform a preset function on the information to be recognized by using the called model.
Specifically, the control unit 1021 is a service portal, and includes parameter information required for executing a preset function (e.g., image recognition, voice recognition, etc.) and further processes information returned after executing the preset function (e.g., field regularization, abnormal compatibility, etc.). That is, the control unit 1021 belongs to a scheduling layer, and determines which services of the service unit 1022 should be called when the preset function is executed this time. The service unit 1022 extracts the called model from the common module 103 to execute the corresponding service according to the instruction of the control unit 1021.
As an example, when the system is applied to an identification card identification service, the control unit 1021 may construct a service method, where the method needs to receive a piece of picture information to be identified, and then call the picture identification service in the service unit 1022 for information identification, where the picture identification service may perform information identification using a picture identification model, and then the control unit 1021 performs field regularization, abnormal compatibility, and the like on the identified information.
In the implementation manner, the control unit 1021 and the service unit 1022 are arranged in the engineering module 102, so that the information to be recognized can be received in a targeted manner and the corresponding preset function can be executed on the information to be recognized, and the efficiency of executing the preset function on line by using the called model is further improved.
In some optional implementations, the number of called models is at least two, and the service unit 1022 is further configured to: and assembling at least two called models into a complete model, and executing a preset function on the information to be identified by using the complete model. Namely, the service unit 1022 is used for performing service assembly, and the commonly maintained underlying service modules are assembled into a complete functional module. For example, an identification service, the called model to be called includes a rectification model, a detection model and an identification model, the service unit 1022 assembles the three called models into a complete function module, and inputs the information to be identified into the function module, so as to output the identification result.
In this implementation manner, by assembling at least two called models into a complete model, the complexity of the structure of the service unit 1022 can be reduced, which is helpful for improving the efficiency of executing the preset function.
In some optional implementations, as shown in fig. 2, the common module 103 includes a model packaging unit 1031, configured to package an initial model, and generate a called model for processing information input by the engineering module 102 based on the packaged model.
Specifically, the model packaging unit 1031 may package the pre-and-post data processing method and the parameter format processing method required by the initial model into the called model, which facilitates different upstream calls. For example, the format of the input and output data of the initial model is unified, and multiple model calling modes (such as a TF-serving mode, a load _ model mode, etc.) are supported at the same time. The shared module 103 may use the encapsulated model as the called model, or may use the encapsulated model
By way of example, when the initial model is an identification card recognition model, the identification card recognition model and the pre-and post-processing method can be packaged into a called model for identification card recognition. For example, a picture with a size of 224 × 3 is input, and a corresponding text is output. The model encapsulation unit 1031 hides other implementation details. The upstream only needs to transmit parameters with fixed specifications and indicate what model calling method (e.g., load _ model, TF-serving, etc.) the model packaging unit 1031 uses.
The sharing module 103 may use the encapsulated model as a called model, or may further process the encapsulated model (for example, add a target matching function) to obtain a called model.
In the implementation manner, the model packaging unit 1031 is arranged in the shared module 103, so that specific implementation details of using the initial model can be hidden, the called model is easier to use, and operation of users of the policy module 101 and users of the engineering module 102 is facilitated.
In some optional implementations, as shown in fig. 2, the sharing module 103 further includes a template matching unit 1032, configured to set a template matching function of the called model, so as to perform template matching on the information output by the encapsulated model.
In particular, template matching is a way to generalize structured data. For example, after all the information in the picture is identified, the corresponding relationship between various information needs to be correctly determined. Such as identifying several text messages: "name", "sex", "male" and "Zhangsan". How to correspond the name to the Zhang III requires finding the corresponding relation of texts in the picture, and the template matching means that the contents of the picture are made into a template in advance, and the relation between the texts is set out by using the template after the contents of the picture are identified.
The template matching unit 1032 can add a template matching function to the called model based on the encapsulated model, so that the called model processes more data, enriches the functions of the called model, and improves the efficiency of the engineering module 102 in using the called model.
In some alternative implementations, as shown in fig. 2, the common module 103 further includes at least one of:
a data post-processing unit 1033 configured to set an information conversion function of the called model, where the information conversion function is configured to convert the matched information into result data of a preset structure;
a data deposition unit 1034, configured to set a data storage function of the called model, where the information storage function is configured to send the result data and corresponding information to be identified (e.g., information such as pictures and audio) to a preset database for storage.
The result data of the preset structure may be data conforming to a set data structure, and the structure of the result data is more rigorous. For example, the data obtained after the identification information is identified is incomplete, and the missing data can be automatically filled, so that the result data is more complete and is convenient to call. The preset database stores the information to be identified and the result data which correspond to each other, so that the subsequent identification effect analysis can be facilitated, the adjustment of the model parameters is facilitated, and the identification precision of the model is improved.
In some alternative implementations, the model packaging unit 1031 and the template matching unit 1032 are implemented by factory patterns. Specifically, Factory schema (Factory Pattern) is one of design schemas commonly used in object-oriented programming languages. This type of design schema belongs to the creation type schema, which provides an optimal way to create objects. The calling mode of the mode is simple, if an object is to be created, the name of the object is only needed to be known; the expansibility is high, if a product is added, only one factory class needs to be expanded; the specific implementation of the product can be shielded, and the caller only concerns the interface of the product. The realization mode can simplify the calling mode of the called model by using the factory mode, improve the use convenience of the system and contribute to improving the development efficiency of the system.
In some optional implementations, as shown in fig. 2, the engineering module 102 further includes an engineering evaluation unit 1023 for evaluating the called model configured by the engineering module 102. The engineering evaluation unit 1023 can evaluate the online service, which is helpful to adjust the parameters of the called model in time and improve the recognition accuracy of the called model.
In some optional implementations, the engineering module 102 loads the called model by using a preset model service component, and provides a service to the user terminal by using a preset interface.
Specifically, a separate model service, such as (TensorFlow-servicing), needs to be used for the engineering module 102. The model file is loaded by the model service and then the service is provided in the form of an interface (e.g., restful, grpc, etc.). The grpc or restful call is then encapsulated into a call () method in the model call.
The policy module 101 loads the initial model into a model object and uses the model object to perform the functions of the initial model.
Specifically, for the policy module 101, the complexity of the model service is too high, and the model file can be directly loaded into a model object by means of a model _ load method of a third-party class library in Python, and then a prediction method of the object is used for model inference. The method is simple, and the efficiency of the strategy module 101 for model evaluation can be improved.
In the implementation mode, different model calling modes are set for the strategy module 101 and the engineering module 102, so that the strategy module 101 and the engineering module 102 can be provided with model services in a targeted manner, and the efficiency and the accuracy of model execution are improved.
Exemplary method
Fig. 3 is a flowchart illustrating a method for model application interaction according to an exemplary embodiment of the present disclosure. The embodiment can be applied to the model application interaction system shown in fig. 1, and as shown in fig. 3, the method includes the following steps:
step 301, the strategy module trains to obtain an initial model executing a preset function based on a preset training sample.
In the present embodiment, the initial model may be a model that implements various functions, such as an image recognition model, a character recognition model, a voice recognition model, and the like. Generally, the strategy module may collect training samples in advance, and train the initial model using the training samples based on a machine learning method.
Step 302, the strategy module evaluates the initial model and sends the initial model to the common module if the evaluation is passed.
In this embodiment, the policy module may evaluate the initial model. The evaluation content may include, but is not limited to, identification accuracy, execution efficiency, execution stability, and the like of the test model. The off-line strategy evaluation unit is in an off-line state during evaluation, namely, the evaluation and the engineering application are completely decoupled, namely, the model can be evaluated at any time and any place without starting a heavy application middleware like engineering.
And determining that the evaluation is passed when the evaluation result meets the corresponding preset condition, for example, determining that the evaluation is passed when the identification accuracy is greater than a preset accuracy threshold.
Step 303, the shared module processes the initial model to obtain a called model and sends the called model to the engineering module.
In this embodiment, the manner of processing the initial model may include multiple manners, for example, encapsulating the initial model, adjusting the calling manner of the model, setting more functions of the called model, and the like. The shared module can be called by the strategy module and the engineering module at the same time, the strategy module sends the trained model to the shared module, the shared module processes the model without participation of the strategy module, the called model generated by the shared module is submitted to the engineering module, and the engineering module deploys the called model on line.
At step 304, the engineering module configuration is invoked on the model for use by the user.
In this embodiment, the engineering module may provide a service entry, and schedule a service to be performed, that is, extract a called model that implements a preset function.
According to the method provided by the embodiment of the disclosure, the shared module provides communication intermediate service for the strategy module and the engineering module, and the shared module can be maintained by the strategy module and the engineering module together, so that convenience is provided for modification of the strategy module and the engineering module, and the probability of problems occurring in code modification is reduced. By evaluating the initial model at the measuring module, the strategy module can be used for service evaluation at any time and any place without starting a heavy application middleware for evaluation like engineering, so that the efficiency of model evaluation is improved.
In some optional implementations, in step 304, the engineering module may further receive information to be recognized, which is to be recognized by using the called model, and process the information obtained after recognition. And then, extracting the called model from the shared module, and executing a preset function on the information to be identified by using the called model.
In some optional implementations, the number of the called models is at least two, and in step 304, the engineering module may further assemble the at least two called models into a complete model, and perform a preset function on the information to be recognized by using the complete model.
In some optional implementations, in step 303, the shared module may further encapsulate the initial model, and generate a called model for processing information input by the engineering module based on the encapsulated model.
In some optional implementations, in step 303, the sharing module may further set a template matching function of the called model to perform template matching on the information output by the encapsulated model.
In some optional implementations, after step 303, the common module may further perform at least one of the following steps:
step one, converting the matched information into result data with a preset structure.
And step two, sending the result data and the corresponding information to be identified to a preset database for storage.
In some alternative implementations, the engineering module may also evaluate the called model of the engineering module configuration during or after step 304.
In some optional implementations, in step 304, the engineering module may load the called model by using a preset model service component, and provide a service to the user end by using a preset interface;
after step 301, the policy module may load the initial model into a model object and use the model object to perform the functions of the initial model.
Exemplary electronic device
Next, an electronic apparatus according to an embodiment of the present disclosure is described with reference to fig. 4. FIG. 4 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure.
As shown in fig. 4, the electronic device 400 includes one or more processors 401 and memory 402.
The processor 401 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 400 to perform desired functions.
Memory 402 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory can include, for example, Random Access Memory (RAM), cache memory (or the like). The non-volatile memory may include, for example, Read Only Memory (ROM), a hard disk, flash memory, and the like. One or more computer program instructions may be stored on a computer-readable storage medium and executed by processor 401 to implement the above model application interaction methods of the various embodiments of the present disclosure and/or other desired functionality. Various contents such as training samples, information to be recognized, and the like may also be stored in the computer-readable storage medium.
In one example, the electronic device 400 may further include: an input device 403 and an output device 404, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, the input device 403 may be a mouse, a keyboard, a microphone, or the like.
The output device 404 may output various information to the outside, including the called model, information of the model output, and the like. The output devices 404 may include, for example, a display, speakers, a printer, and a communication network and its connected remote output devices, among others.
Of course, for simplicity, only some of the components of the electronic device 400 relevant to the present disclosure are shown in fig. 4, omitting components such as buses, input/output interfaces, and the like. In addition, electronic device 400 may include any other suitable components depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the model application interaction method according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like 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 computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a model application interaction method according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (10)

1. A model application interaction system, comprising: the system comprises a strategy module, an engineering module and a sharing module, wherein the strategy module is used for training and generating an initial model, the strategy module further comprises an offline strategy evaluation unit, and the offline strategy evaluation unit is used for evaluating the initial model; the shared module is used for processing the initial model generated by the strategy module to obtain a called model used by the engineering module; the engineering module is used for configuring the called model for a user to use;
the policy module, the engineering module and the common module have technology stacks that are consistent and the policy module is decoupled from the engineering module.
2. The system of claim 1, wherein the engineering module comprises a control unit and a service unit, wherein the control unit is configured to receive information to be identified, which is to be identified by using the called model, and process the identified information, and the service unit is configured to extract the called model from the common module and perform a preset function on the information to be identified by using the called model.
3. The system of claim 2, wherein the number of invoked models is at least two, the service unit further to:
and assembling at least two called models into a complete model, and executing a preset function on the information to be identified by using the complete model.
4. The system of claim 1, wherein the common module comprises a model encapsulation unit for encapsulating the initial model and generating a called model for processing information input by the engineering module based on the encapsulated model.
5. The system of claim 4, wherein the common module further comprises a template matching unit for setting a template matching function of the called model to perform template matching on the information output by the packaged model.
6. The system of claim 5, wherein the common module further comprises at least one of:
the data post-processing unit is used for setting an information conversion function of the called model, and the information conversion function is used for converting the matched information into result data with a preset structure;
and the data precipitation unit is used for setting a data storage function of the called model, and the information storage function is used for sending the result data and the corresponding information to be identified to a preset database for storage.
7. The system according to one of claims 1 to 6, wherein the engineering module loads the called model using a preset model service component and provides a service to a user side using a preset interface;
the policy module loads the initial model into a model object and uses the model object to perform the functions of the initial model.
8. A model application interaction method, the method comprising:
the strategy module is used for training to obtain an initial model for executing a preset function based on a preset training sample; evaluating the initial model, and if the initial model passes the evaluation, sending the initial model to a common module;
the shared module processes the initial model to obtain a called model and sends the called model to an engineering module;
the engineering module configures the called model for use by a user.
9. A computer-readable storage medium, which stores a computer program for implementing the functions of the method of claim 8.
10. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the functions of the method of claim 8.
CN202011144653.9A 2020-10-23 2020-10-23 Model application interaction system, method, readable storage medium and electronic device Pending CN112230898A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011144653.9A CN112230898A (en) 2020-10-23 2020-10-23 Model application interaction system, method, readable storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011144653.9A CN112230898A (en) 2020-10-23 2020-10-23 Model application interaction system, method, readable storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN112230898A true CN112230898A (en) 2021-01-15

Family

ID=74110040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011144653.9A Pending CN112230898A (en) 2020-10-23 2020-10-23 Model application interaction system, method, readable storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112230898A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160148115A1 (en) * 2014-11-26 2016-05-26 Microsoft Technology Licensing Easy deployment of machine learning models
CN108804630A (en) * 2018-05-31 2018-11-13 江苏运时数据软件股份有限公司 A kind of big data intellectual analysis service system of Industry-oriented application
CN109343857A (en) * 2018-08-22 2019-02-15 中国平安人寿保险股份有限公司 Method, equipment and the storage medium of machine learning model are disposed on line
CN109685160A (en) * 2019-01-18 2019-04-26 创新奇智(合肥)科技有限公司 A kind of on-time model trained and dispositions method and system automatically
CN111310934A (en) * 2020-02-14 2020-06-19 北京百度网讯科技有限公司 Model generation method and device, electronic equipment and storage medium
CN111324379A (en) * 2020-01-15 2020-06-23 携程旅游网络技术(上海)有限公司 Model deployment system based on general SOA service
CN111527499A (en) * 2017-11-22 2020-08-11 亚马逊技术股份有限公司 Dynamic accuracy-based deployment and monitoring of machine learning models in provider networks
CN111612158A (en) * 2020-05-22 2020-09-01 云知声智能科技股份有限公司 Model deployment method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160148115A1 (en) * 2014-11-26 2016-05-26 Microsoft Technology Licensing Easy deployment of machine learning models
CN111527499A (en) * 2017-11-22 2020-08-11 亚马逊技术股份有限公司 Dynamic accuracy-based deployment and monitoring of machine learning models in provider networks
CN108804630A (en) * 2018-05-31 2018-11-13 江苏运时数据软件股份有限公司 A kind of big data intellectual analysis service system of Industry-oriented application
CN109343857A (en) * 2018-08-22 2019-02-15 中国平安人寿保险股份有限公司 Method, equipment and the storage medium of machine learning model are disposed on line
CN109685160A (en) * 2019-01-18 2019-04-26 创新奇智(合肥)科技有限公司 A kind of on-time model trained and dispositions method and system automatically
CN111324379A (en) * 2020-01-15 2020-06-23 携程旅游网络技术(上海)有限公司 Model deployment system based on general SOA service
CN111310934A (en) * 2020-02-14 2020-06-19 北京百度网讯科技有限公司 Model generation method and device, electronic equipment and storage medium
CN111612158A (en) * 2020-05-22 2020-09-01 云知声智能科技股份有限公司 Model deployment method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10678522B1 (en) Compiler and method for compiling business rules for a serverless runtime environment
US10642913B2 (en) Intent and bot based query guidance
CN111399853B (en) Templated deployment method for machine learning model and custom operator
Sarma et al. Automatic test case generation from UML models
US11068385B2 (en) Behavior driven development test framework for application programming interfaces and webservices
US20140100910A1 (en) System and Method for Audits with Automated Data Analysis
US9170821B1 (en) Automating workflow validation
US20060265469A1 (en) XML based scripting framework, and methods of providing automated interactions with remote systems
CN112015396B (en) DSL-based intelligent contract code generation method, device, equipment and storage medium
WO2015199748A1 (en) Rest service source code generation
CN114217887A (en) Micro-service arranging method, micro-service executing method, micro-service arranging device and micro-service executing server
CN113971110A (en) Interface testing method, device, equipment and computer readable storage medium
CN114168190A (en) Interface document generation method and device, computer equipment and storage medium
CN110955600A (en) Interface test method and device
CN116911588A (en) Business process execution method, device, equipment and storage medium
Gómez et al. A model-based approach for developing event-driven architectures with asyncapi
CN109240923B (en) Interface test script generation method and computer readable storage medium
Nascimento et al. Arcmape: A software product line infrastructure to support fault-tolerant composite services
US20220147438A1 (en) Method and system for an automated testing framework in design pattern and validating messages
CN109376076A (en) A kind of test method and device for integrated system
CN113721898A (en) Machine learning model deployment method, system, computer device and storage medium
CN111190750B (en) Data processing method and system
CN112230898A (en) Model application interaction system, method, readable storage medium and electronic device
CN114745449B (en) Message processing method and device, storage medium and electronic equipment
CN115904317A (en) Method, device, equipment and storage medium for uniformly calling front-end interface and back-end interface

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