CN109298831B - Information storage method and device - Google Patents

Information storage method and device Download PDF

Info

Publication number
CN109298831B
CN109298831B CN201710606581.7A CN201710606581A CN109298831B CN 109298831 B CN109298831 B CN 109298831B CN 201710606581 A CN201710606581 A CN 201710606581A CN 109298831 B CN109298831 B CN 109298831B
Authority
CN
China
Prior art keywords
model
information
target
target model
updated
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
CN201710606581.7A
Other languages
Chinese (zh)
Other versions
CN109298831A (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710606581.7A priority Critical patent/CN109298831B/en
Publication of CN109298831A publication Critical patent/CN109298831A/en
Application granted granted Critical
Publication of CN109298831B publication Critical patent/CN109298831B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The embodiment of the application discloses an information storage method and device. One embodiment of the method comprises: periodically determining whether there is an update in the model information stored in the management server; in response to determining that the model information is updated, analyzing the updated model information to determine that an updated model exists; taking the determined model as a target model, and determining whether a PMML file of the target model is stored locally; in response to determining that the PMML file of the target model is not stored locally, downloading and storing the PMML file of the target model from the cloud server. This embodiment increases the flexibility of model deployment.

Description

Information storage method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to the field of internet technologies, and in particular, to an information storage method and apparatus.
Background
With the development of computer technology, machine learning methods are more and more widely applied. At present, models such as classification, prediction and clustering in machine learning are widely applied to the fields of electronic commerce, commodity recommendation, junk mail classification and the like.
Usually, technicians need to train a model according to business requirements, translate the trained model parameters into source codes, and then obtain corresponding processing results by using the model. However, when the service changes, the operations of screening, training and translating the source code of the model need to be performed again, so that the problem of low flexibility of model deployment exists.
Disclosure of Invention
An object of the embodiments of the present application is to provide an improved information storage method and apparatus, so as to solve the technical problems mentioned in the above background.
In a first aspect, an embodiment of the present application provides an information storage method for a model server, where the model server is in communication connection with a management server and a cloud server respectively, the management server is in communication connection with the cloud server, the management server is used to store model information, and the cloud server is used to store a predictive model markup language PMML file of a model, where the method includes: periodically determining whether there is an update in the model information stored in the management server; in response to determining that the model information is updated, analyzing the updated model information to determine that an updated model exists; taking the determined model as a target model, and determining whether a PMML file of the target model is stored locally; in response to determining that the PMML file of the target model is not stored locally, downloading and storing the PMML file of the target model from the cloud server.
In some embodiments, in response to determining that the PMML file of the target model is not stored locally, downloading and storing the PMML file of the target model from the cloud server includes: and in response to the fact that the PMML file of the target model is not stored locally, downloading the PMML file of the target model from the cloud server, and storing the PMML file of the target model into a dictionary container of the memory in a key-value pair mode by taking the name of the target model as a key and the content in the PMML file of the target model as a value.
In some embodiments, the model information includes: name of the model, version number, input parameter information, and output result information.
In some embodiments, after downloading and storing the PMML file of the target model from the cloud server, the method further comprises: respectively determining whether the input parameter information and the output result information of the target model are updated or not; and in response to determining that the input parameter information or the output result information of the target model is updated, replacing the pre-stored input parameter information or the pre-stored output result information of the target model with the updated input parameter information or the updated output result information of the target model.
In some embodiments, the model server is further communicatively connected to a model invocation client; and the method further comprises: in response to receiving a model calling request which is sent by a model calling client and contains the name of the model to be called, inquiring input parameter information of the model to be called, and returning the inquired input parameter information to the model calling client; receiving an input parameter sent by the model calling client, inputting the input parameter into the model to be called, obtaining an output result corresponding to the input parameter, and returning the output result to the model calling client.
In a second aspect, an embodiment of the present application provides an information storage apparatus for a model server, where the model server is communicatively connected to a management server and a cloud server respectively, the management server is communicatively connected to the cloud server, the management server is used to store model information, and the cloud server is used to store a predictive model markup language PMML file of a model, the apparatus includes: a first determination unit configured to periodically determine whether there is an update of the model information stored in the management server; the analysis unit is configured to respond to the determination that the model information is updated, analyze the updated model information and determine that the updated model exists; the second determining unit is configured to use the determined model as a target model and determine whether a PMML file of the target model is stored locally; and the storage unit is configured to download and store the PMML file of the target model from the cloud server in response to determining that the PMML file of the target model is not locally stored.
In some embodiments, the memory unit is further configured to: and in response to the fact that the PMML file of the target model is not stored locally, downloading the PMML file of the target model from the cloud server, and storing the PMML file of the target model into a dictionary container of the memory in a key-value pair mode by taking the name of the target model as a key and the content in the PMML file of the target model as a value.
In some embodiments, the model information includes: name of the model, version number, input parameter information, and output result information.
In some embodiments, the apparatus further comprises: a third determining unit configured to determine whether there is an update in the input parameter information and the output result information of the target model, respectively; and the replacing unit is configured to replace the pre-stored input parameter information or output result information of the target model with the updated input parameter information or output result information of the target model in response to the fact that the input parameter information or output result information of the target model is updated.
In some embodiments, the model server is further communicatively connected to a model invocation client; and the apparatus further comprises: the query unit is configured to respond to a received model calling request which is sent by the model calling client and contains the name of the model to be called, query the input parameter information of the model to be called and return the queried input parameter information to the model calling client; and the input unit is configured to receive the input parameters sent by the model calling client, input the input parameters into the model to be called, obtain an output result corresponding to the input parameters, and return the output result to the model calling client.
In a third aspect, an embodiment of the present application provides a server, including: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement a method as in any embodiment of the information storage method.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the computer program implements a method as in any one of the information storage methods.
According to the information storage method and device provided by the embodiment of the application, whether the model information stored in the management server is updated or not is periodically determined, so that the updated model is determined after the model information is determined to be updated, the determined model is used as the target model, whether the PMML file of the target model is locally stored or not is determined, the PMML file of the target model is downloaded and stored from the cloud server after the PMML file of the target model is determined not to be locally stored, the latest model can be stored in time, the latest model is directly provided when the service is changed, operations such as model training and model parameter writing into a source code are not needed when the service is changed, and the flexibility of model deployment is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of an information storage method according to the present application;
FIG. 3 is a schematic diagram of an application scenario of an information storage method according to the present application;
FIG. 4 is a flow diagram of yet another embodiment of an information storage method according to the present application;
FIG. 5 is a schematic block diagram of one embodiment of an information storage device according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which the information storage method or information storage device of the present application may be applied.
As shown in fig. 1, system architecture 100 may include a model server 101, a management server 103, a cloud server 105, and networks 102, 104, 106. Network 102 is used to provide the medium of a communication link between model server 101 and management server 103, network 104 is used to provide the medium of a communication link between model server 101 and cloud server 105, and network 106 is used to provide the medium of a communication link between management server 103 and cloud server 105. The networks 102, 104, 106 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
Cloud server 105 may be used to store a Model PMML (Predictive Model Markup Language) file. A user (e.g., an algorithm engineer, a project administrator, etc.) may store the trained model structures and model parameters as a PMML file at any time, and upload the PMML file to cloud server 105. In practice, PMML is a de facto standard language in the field of machine learning for presenting data mining models. The method standardizes machine learning and data mining tasks by using XML (Extensible Markup Language) as a carrier, and can apply a machine learning or data mining scheme created by a certain product to any other product or platform conforming to PMML standards without considering specific implementation details in an algorithm model.
The management server 103 may be used to store model information. A user (e.g., an algorithm engineer, a project administrator, etc.) may upload model information corresponding to the PMML file stored by the cloud server, which may include, but is not limited to, a name, a version number, etc. of the model, to the management server 103.
The user may also perform operations such as downloading and deleting on the PMML file stored in the cloud server 105. The model information stored by the management server 103 and the PMML files stored by the cloud server 105 are in one-to-one correspondence, that is, each PMML file corresponds to one model information.
The model server 101 may provide a model invocation service for clients used by users (e.g., development engineers). The model server 101 may periodically determine whether there is an update in the model information stored in the management server 103 through the network 102, or may download and store a PMML file of the model from the cloud server 105 through the network 104.
It should be noted that the information storage method provided in the embodiment of the present application is generally executed by the model server 101, and accordingly, the information storage device is generally disposed in the model server 101.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of model servers, management servers, cloud servers, and networks, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of an information storage method for a model server according to the present application is shown. The model server may be in communication connection with a management server and a cloud server, the management server may be in communication connection with the cloud server, the management server may be configured to store model information, and the cloud server may be configured to store a predictive model markup language PMML file of a model. The information storage method comprises the following steps:
periodically, it is determined whether there is an update to the model information stored in the management server, step 201.
In this embodiment, an electronic device (for example, the model server 101 shown in fig. 1) on which the information storage method operates may periodically determine whether there is an update in model information stored in a management server (for example, the management server 103 shown in fig. 1) through a wired connection manner or a wireless connection manner, where the model information may be various information related to a model, and may include, but is not limited to, a name of the model, a version number of the model, a functional introduction of the model, and the like. It should be noted that the model information stored by the management server and the PMML files stored by the cloud server are in one-to-one correspondence, that is, each PMML file corresponds to one piece of model information. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
The electronic device may determine whether there is an update to the model information in various ways. As an example, the electronic device may store initial model information, and the electronic device may match the initial model information with model information stored in the management server; in response to determining that the initial model information is different from the model information stored in the management server, it may be determined whether there is an update of the model information stored in the management server. It should be noted that, for each cycle, after the operation of determining whether the model information is updated is performed, the electronic device may download and store the model information stored in the management server to the local, and when the operation of determining whether the model information is updated in the next cycle is performed, the model information stored locally is used as the initial model information to perform matching of the model information.
In some optional implementation manners of this embodiment, the management server may further store an update time of each piece of model information, and the electronic device may record an operation time of each time the operation of determining whether the piece of model information is updated is performed. The electronic device may determine whether there is an update of the model information according to the update time of the model information and the recorded operation time. Specifically, the electronic device may first obtain update time of each piece of model information stored by the management server; then, for each piece of model information, the electronic device may determine whether an operation time of performing an operation of determining whether the piece of model information is updated in a previous cycle is earlier than an update time of the piece of model information, and if so, may determine that the piece of model information stored by the management server is updated.
Step 202, in response to determining that the model information is updated, analyzing the updated model information to determine that the updated model exists.
In this embodiment, the electronic device may extract the model information of which update exists in response to determining that the model information stored in the management server exists. Since the model information may include information such as a name and a version number of the model, the electronic device may determine the name of the model from the extracted model information, and determine the model indicated by the determined name as the model for which the update exists.
And step 203, taking the determined model as a target model, and determining whether a PMML file of the target model is stored locally.
In this embodiment, the electronic device may determine whether the PMML file of the target model is stored locally, with the updated model determined in step 202 as the target model. In practice, the memory of the electronic device may store PMML files of a plurality of models, so that a user (e.g., a development engineer) can call the PMML files.
And step 204, in response to determining that the PMML file of the target model is not stored locally, downloading and storing the PMML file of the target model from the cloud server.
In this embodiment, in response to determining that the PMML file of the target model is not stored locally, the electronic device may download and store the PMML file of the target model from a cloud server (e.g., cloud server 105 shown in fig. 1). In practice, the electronic device may store the PMML file of the target model in a memory for a user to call.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the information storage method according to the present embodiment. In the application scenario of fig. 3, model server 301 first periodically determines whether there is an update to the model information stored in management server 302; then, in response to determining that the model information is updated, the model server 301 determines that the updated model information is analyzed, and determines that an updated model exists; then, the model server 301 determines whether the PMML file of the target model is stored locally, taking the determined model as the target model; finally, model server 301 downloads and stores the PMML file of the target model from cloud server 303 in response to determining that the PMML file of the target model is not stored locally.
The method provided by the above embodiment of the application determines whether the model information stored in the management server is updated periodically, so that after the model information is determined to be updated, it is determined that the updated model exists, then the determined model is used as the target model, and it is determined whether the PMML file of the target model is locally stored, so that after the PMML file of the target model is determined not to be locally stored, the PMML file of the target model is downloaded and stored from the cloud server, so that the latest model can be stored in time, the latest model is directly provided when the service changes, operations such as training the model and writing model parameters into source codes are not required when the service changes, and the flexibility of model deployment is improved.
With further reference to FIG. 4, a flow 400 of yet another embodiment of an information storage method for a model server is shown. The model server may be in communication connection with a management server and a cloud server, the management server may be in communication connection with the cloud server, the management server may be configured to store model information, and the cloud server may be configured to store a predictive model markup language PMML file of a model. The process 400 of the information storage method includes the following steps:
periodically, it is determined whether there is an update to the model information stored in the management server, step 401.
In the present embodiment, the electronic device (for example, the model server 101 shown in fig. 1) on which the information storage method operates may periodically determine whether there is an update of model information stored in a management server (for example, the management server 103 shown in fig. 1), where the model information may be various information related to a model, and may include, but is not limited to, a name, a version number, input parameter information, output result information, and the like of the model. Here, the input parameter information may be information of parameters that need to be input into the model when the model is used, and the input parameter information may include an input parameter name and an input parameter type. The output result information may be a result output by the model when the model is used, and the output result information may include a name of the output result and a type of the output result. The electronic device may store initial model information (the initial model information may include, but is not limited to, a name, a version number, input parameter information, output result information, and the like of a model), match the initial model information with the model information stored by the management server, and determine whether there is an update in the model information by checking whether the model name and the version number in the model information are changed. It should be noted that, for each cycle, after the operation of determining whether the model information is updated is performed, the electronic device may download and store the model information stored in the management server to the local. And when the operation of determining whether the model information is updated or not in the next cycle is executed, the model information stored locally is used as the initial model information to perform the matching of the model information.
Step 402, in response to determining that the model information is updated, analyzing the updated model information to determine that an updated model exists.
In this embodiment, the electronic device may extract the model information of which update exists in response to determining that the model information stored in the management server exists. Since the model information may include information such as a name and a version number of the model, the electronic device may determine the name of the model from the extracted model information, and determine the model indicated by the determined name as the model for which the update exists.
And step 403, taking the determined model as a target model, and determining whether a PMML file of the target model is stored locally.
In this embodiment, the electronic device may determine whether the PMML file of the target model is stored locally, using the updated model determined in step 402 as the target model. In practice, the memory of the electronic device may store PMML files of a plurality of models for a user (e.g., a development engineer) to call, and the stored PMML files may be stored in a dictionary container of the memory in the form of key value pairs by using names of the models as keys and contents in the PMML files of the models as values. The dictionary container may be a container for storing data having a one-to-one correspondence relationship (e.g., a HashMap container commonly used in Java language, a Map container commonly used in C + + language, and the like).
It should be noted that the operations of the steps 401-403 are substantially the same as the operations of the steps 201-203, and are not described herein again.
Step 404, in response to determining that the PMML file of the target model is not stored locally, downloading the PMML file of the target model from the cloud server, and storing the PMML file of the target model in a form of key value pairs by taking the name of the target model as a key and the content in the PMML file of the target model as a value into a dictionary container of the memory.
In this embodiment, in response to determining that the PMML file of the target model is not stored locally, the electronic device may download the PMML file of the target model from a cloud server (e.g., the cloud server 105 shown in fig. 1), and store the PMML file of the target model in a dictionary container of a memory in a form of key-value pairs with a name of the target model as a key and a content in the PMML file of the target model as a value.
Step 405, determining whether the input parameter information and the output result information of the target model are updated respectively.
In this embodiment, the electronic device may determine whether there is an update in the input parameter information and the output result information of the target model, respectively. Taking the determination of the input parameter information as an example, the electronic device may match the input parameter information in the model information of the target model stored in the management server with the input parameter information in the initial model information of the target model stored locally, and if there is a difference between the two, it may be determined that the input parameter information is updated.
And step 406, in response to determining that the input parameter information or the output result information of the target model is updated, replacing the pre-stored input parameter information or the pre-stored output result information of the target model with the updated input parameter information or the updated output result information of the target model.
In this embodiment, in response to determining that there is an update in the input parameter information or the output result information of the target model, the electronic device may replace the input parameter information or the output result information of the target model stored in advance (i.e., the input parameter information or the output result information in the initial model information of the target model stored locally) with the updated input parameter information or the updated output result information of the target model.
Step 407, in response to receiving the model calling request which is sent by the model calling client and contains the name of the model to be called, querying the input parameter information of the model to be called, and returning the queried input parameter information to the model calling client.
In this embodiment, in response to receiving a model calling request which is sent by a model calling client and includes a name of a model to be called, the electronic device may query input parameter information of the model to be called, and return the queried input parameter information to the model calling client. It should be noted that steps 407-408 may be performed at any time, and are not limited to be performed after step 406.
And 408, receiving the input parameters sent by the model calling client, inputting the input parameters into the model to be called to obtain an output result corresponding to the input parameters, and returning the output result to the model calling client.
In this embodiment, the electronic device may first receive an input parameter sent by a model invoking client, where the input parameter may be a specific numerical value of an input parameter indicated by each input parameter name in the input parameter information of the model to be invoked. And then, the electronic equipment can input the input parameters into the model to be called to obtain an output result corresponding to the input parameters, and return the output result to the model calling client.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the information storage method in this embodiment highlights the steps of updating the input parameter information and the output result information, and performing model use based on the information and data of the model stored in the memory and obtaining the output result. Therefore, the scheme described in the embodiment can output the model result of the real-time data on the line, and all calculation and cost are stored in the memory, so that the output speed of the model is improved; meanwhile, after the input parameter information of the model is updated, the model calling client can reuse the model only by changing the input parameters, and the flexibility of model deployment is further improved.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present application provides an embodiment of an information storage apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which can be applied in a model server.
As shown in fig. 5, the information storage apparatus 500 of the present embodiment includes: a first determining unit 501 configured to periodically determine whether there is an update in the model information stored in the management server; an analyzing unit 502 configured to analyze the updated model information in response to determining that the model information has an update, and determine that an updated model exists; a second determining unit 503, configured to determine whether the PMML file of the target model is stored locally, using the determined model as the target model; a storage unit 504 configured to download and store the PMML file of the target model from the cloud server in response to determining that the PMML file of the target model is not locally stored.
In the present embodiment, the first determination unit 501 described above may periodically determine whether there is an update in the model information stored in the management server (e.g., the management server 103 shown in fig. 1). As an example, the first determining unit 501 may match initial model information stored in advance with model information stored in the management server, and in response to determining that there is a difference between the initial model information and the model information stored in the management server, may determine whether there is an update in the model information stored in the management server.
In this embodiment, the parsing unit 502 may extract the updated model information in response to determining that the model information stored in the management server exists updated. Since the model information may include information such as a name and a version number of the model, the name of the model may be determined from the extracted model information, and the model indicated by the determined name may be determined as the model for which the update exists.
In this embodiment, the second determining unit 503 may determine whether the PMML file of the target model is locally stored, with the updated model determined by the analyzing unit 502 as the target model. In practice, the memory of the model server may store PMML files of a plurality of models for a user (e.g., a development engineer) to call.
In this embodiment, in response to determining that the PMML file of the target model is not stored locally, the storage unit 504 may download and store the PMML file of the target model from a cloud server (e.g., the cloud server 105 shown in fig. 1). In practice, the storage unit 504 may store the PMML file of the target model in a memory of a model server for a user to call.
In some optional implementation manners of this embodiment, the storage unit 504 may be further configured to, in response to determining that the PMML file of the target model is not locally stored, download the PMML file of the target model from the cloud server, and store the PMML file of the target model in a dictionary container of an internal memory in a form of a key-value pair with a name of the target model as a key and a content in the PMML file of the target model as a value.
In some optional implementations of this embodiment, the model information may include, but is not limited to, a name, a version number, input parameter information, and output result information of the model.
In some optional implementations of the present embodiment, the information storage apparatus 500 further includes a third determining unit and a replacing unit (not shown in the figure). The third determining unit may be configured to determine whether there is an update in the input parameter information and the output result information of the target model, respectively. The replacing unit may be configured to replace the input parameter information or the output result information of the target model stored in advance with the updated input parameter information or the updated output result information of the target model in response to a determination that there is an update in the input parameter information or the output result information of the target model.
In some optional implementations of this embodiment, the model server may further be connected to the model invoking client in a communication manner. The information storage device 500 further includes an inquiry unit and an input unit (not shown in the figure). The query unit may be configured to query input parameter information of the model to be called in response to receiving a model calling request that includes a name of the model to be called and is sent by the model calling client, and return the queried input parameter information to the model calling client. The input unit may be configured to receive an input parameter sent by the model calling client, input the input parameter to the model to be called, obtain an output result corresponding to the input parameter, and return the output result to the model calling client.
The device provided by the above embodiment of the present application periodically determines whether there is an update in the model information stored in the management server through the first determining unit 501, so that the parsing unit 502 determines that there is an updated model after determining that there is an update in the model information, and then the second determining unit 503 determines whether there is a PMML file of the target model stored locally with the determined model as the target model, so that the storage unit 504 downloads and stores the PMML file of the target model from the cloud server after determining that there is no PMML file of the target model stored locally, thereby being capable of storing the latest model in time, directly providing the latest model when a service changes, and improving flexibility of model deployment without performing operations such as model training and model parameter writing into source code when a service changes.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing a server according to embodiments of the present application. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can 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 section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, 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 this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. 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.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a first determining unit, a parsing unit, a second determining unit, and a storage unit. Where the names of the units do not constitute a limitation on the units themselves in some cases, for example, the first determination unit may also be described as a "unit that periodically determines whether there is an update in the model information stored in the management server".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: periodically determining whether there is an update in the model information stored in the management server; in response to determining that the model information is updated, analyzing the updated model information to determine that an updated model exists; taking the determined model as a target model, and determining whether a PMML file of the target model is stored locally; in response to determining that the PMML file of the target model is not stored locally, downloading and storing the PMML file of the target model from the cloud server.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. An information storage method for a model server, wherein the model server is respectively connected with a management server and a cloud server in a communication way, the management server is connected with the cloud server in a communication way, the management server is used for storing model information, and the cloud server is used for storing a Predictive Model Markup Language (PMML) file of a model, the method comprises the following steps:
periodically determining whether there is an update in the model information stored in the management server;
in response to determining that the model information is updated, determining that the updated model information is analyzed, and determining that an updated model exists;
taking the determined model as a target model, and determining whether a PMML file of the target model is stored locally;
in response to determining that the PMML file of the target model is not stored locally, downloading and storing the PMML file of the target model from the cloud server.
2. The information storage method of claim 1, wherein the downloading and storing the PMML file of the target model from the cloud server in response to determining that the PMML file of the target model is not stored locally comprises:
and in response to determining that the PMML file of the target model is not stored locally, downloading the PMML file of the target model from the cloud server, and storing the PMML file of the target model into a dictionary container of a memory in a key-value pair mode by taking the name of the target model as a key and the content in the PMML file of the target model as a value.
3. The information storage method according to claim 1, wherein the model information includes: name of the model, version number, input parameter information, and output result information.
4. The information storage method of claim 3, wherein after said downloading and storing the PMML file of the target model from the cloud server, the method further comprises:
respectively determining whether the input parameter information and the output result information of the target model are updated or not;
in response to determining that the input parameter information or the output result information of the target model is updated, replacing the pre-stored input parameter information or the pre-stored output result information of the target model with the updated input parameter information or the updated output result information of the target model.
5. The information storage method according to any one of claims 1 to 4, wherein the model server is further communicatively connected to a model calling client; and
the method further comprises the following steps:
responding to a received model calling request which is sent by the model calling client and contains the name of the model to be called, inquiring the input parameter information of the model to be called, and returning the inquired input parameter information to the model calling client;
receiving input parameters sent by the model calling client, inputting the input parameters to the model to be called, obtaining an output result corresponding to the input parameters, and returning the output result to the model calling client.
6. An information storage apparatus for a model server, wherein the model server is respectively connected with a management server and a cloud server in communication, the management server is connected with the cloud server in communication, the management server is used for storing model information, the cloud server is used for storing a Predictive Model Markup Language (PMML) file of a model, the apparatus comprises:
a first determination unit configured to periodically determine whether there is an update in the model information stored in the management server;
the analysis unit is configured to respond to the determination that the model information is updated, analyze the updated model information and determine that an updated model exists;
the second determining unit is configured to use the determined model as a target model and determine whether a PMML file of the target model is stored locally;
a storage unit configured to download and store the PMML file of the target model from the cloud server in response to determining that the PMML file of the target model is not locally stored.
7. The information storage device of claim 6, wherein the storage unit is further configured to:
and in response to determining that the PMML file of the target model is not stored locally, downloading the PMML file of the target model from the cloud server, and storing the PMML file of the target model into a dictionary container of a memory in a key-value pair mode by taking the name of the target model as a key and the content in the PMML file of the target model as a value.
8. The information storage device of claim 6, wherein the model information comprises: name of the model, version number, input parameter information, and output result information.
9. The information storage device of claim 8, wherein the device further comprises:
a third determining unit configured to determine whether there is an update in the input parameter information and the output result information of the target model, respectively;
the replacing unit is configured to replace the pre-stored input parameter information or output result information of the target model with the updated input parameter information or output result information of the target model in response to the fact that the input parameter information or output result information of the target model is updated.
10. The information storage device of any of claims 6-9, wherein the model server is further communicatively coupled to a model invoking client; and
the device further comprises:
the query unit is configured to respond to a received model calling request which is sent by the model calling client and contains the name of the model to be called, query the input parameter information of the model to be called, and return the queried input parameter information to the model calling client;
and the input unit is configured to receive the input parameters sent by the model calling client, input the input parameters to the model to be called, obtain an output result corresponding to the input parameters, and return the output result to the model calling client.
11. A server, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201710606581.7A 2017-07-24 2017-07-24 Information storage method and device Active CN109298831B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710606581.7A CN109298831B (en) 2017-07-24 2017-07-24 Information storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710606581.7A CN109298831B (en) 2017-07-24 2017-07-24 Information storage method and device

Publications (2)

Publication Number Publication Date
CN109298831A CN109298831A (en) 2019-02-01
CN109298831B true CN109298831B (en) 2021-05-25

Family

ID=65167079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710606581.7A Active CN109298831B (en) 2017-07-24 2017-07-24 Information storage method and device

Country Status (1)

Country Link
CN (1) CN109298831B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114765771A (en) * 2021-01-08 2022-07-19 展讯通信(上海)有限公司 Model updating method and device, storage medium, terminal and network side equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523246A (en) * 2011-11-23 2012-06-27 陈刚 Cloud computation treating system and method
CN102855131A (en) * 2011-06-30 2013-01-02 国际商业机器公司 Device and method for software configuration management
CN105446995A (en) * 2014-07-14 2016-03-30 富士通株式会社 Estimated data updating time method and device, data integration method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070174290A1 (en) * 2006-01-19 2007-07-26 International Business Machines Corporation System and architecture for enterprise-scale, parallel data mining

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855131A (en) * 2011-06-30 2013-01-02 国际商业机器公司 Device and method for software configuration management
CN102523246A (en) * 2011-11-23 2012-06-27 陈刚 Cloud computation treating system and method
CN105446995A (en) * 2014-07-14 2016-03-30 富士通株式会社 Estimated data updating time method and device, data integration method and device

Also Published As

Publication number Publication date
CN109298831A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
CN107316083B (en) Method and apparatus for updating deep learning model
US20190325074A1 (en) Application programing interface document generator
CN109359194B (en) Method and apparatus for predicting information categories
CN109766127B (en) Method for updating application version information
CN111061956A (en) Method and apparatus for generating information
CN109766148B (en) Method and apparatus for processing interface method calls
CN110515944B (en) Data storage method based on distributed database, storage medium and electronic equipment
CN112015747B (en) Data uploading method and device
CN110781658A (en) Resume analysis method and device, electronic equipment and storage medium
CN114579107A (en) Data processing method, device, equipment and medium
CN107347093B (en) Configuration method and device for distributed server system
CN116431520A (en) Test scene determination method, device, electronic equipment and storage medium
CN111338944A (en) Remote Procedure Call (RPC) interface test method, device, medium and equipment
CN109409419B (en) Method and apparatus for processing data
CN109298831B (en) Information storage method and device
CN111787041B (en) Method and device for processing data
CN110990350B (en) Log analysis method and device
CN109144864B (en) Method and device for testing window
CN110110032B (en) Method and device for updating index file
US8813044B2 (en) Dynamic optimization of mobile services
CN111767290B (en) Method and apparatus for updating user portraits
CN109408716B (en) Method and device for pushing information
CN112131379A (en) Method, device, electronic equipment and storage medium for identifying problem category
CN109254973A (en) Method and device for more new information
CN113420010B (en) Database management method, device, electronic equipment and storage medium

Legal Events

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