CN109426651A - The method and device of file conversion - Google Patents

The method and device of file conversion Download PDF

Info

Publication number
CN109426651A
CN109426651A CN201710470415.9A CN201710470415A CN109426651A CN 109426651 A CN109426651 A CN 109426651A CN 201710470415 A CN201710470415 A CN 201710470415A CN 109426651 A CN109426651 A CN 109426651A
Authority
CN
China
Prior art keywords
file
frame structure
pmml
serializing
processing
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
CN201710470415.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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710470415.9A priority Critical patent/CN109426651A/en
Publication of CN109426651A publication Critical patent/CN109426651A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure is directed to a kind of method and devices of file conversion, for realizing training pattern is used offline on mobile terminals.The described method includes: the first file of the training pattern of the first frame structure to be converted to the second file of the training pattern of the second frame structure in the environment of the operating system of computer;Wherein, the first frame structure is the frame structure suitable for computer operating system, and the second frame structure is the frame structure suitable for mobile terminal operating system;Serializing processing is carried out to second file, the serializing file that obtains that treated.

Description

The method and device of file conversion
Technical field
This disclosure relates to communicate and computer disposal field more particularly to file conversion method and device.
Background technique
With the development of electronic technology, mobile terminal is commonly used.But mobile terminal is still not so good as computer hair Open up mature, especially in terms of model training.The algorithm and model environment of certain model trainings can be applied on computers, But it cannot run on mobile terminals.This allows for mobile terminal cannot use these models offline.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provides a kind of method and device of file conversion.
According to the first aspect of the embodiments of the present disclosure, a kind of method of file conversion is provided, comprising:
In the environment of the operating system of computer, the first file of the training pattern of the first frame structure is converted to Second file of the training pattern of two frame structures;Wherein, the first frame structure is the frame suitable for computer operating system Structure, the second frame structure are the frame structure suitable for mobile terminal operating system;
Serializing processing is carried out to second file, the serializing file that obtains that treated.
The technical scheme provided by this disclosed embodiment can include the following benefits: the present embodiment, which realizes, to be calculated Training pattern under machine environment is converted to the training pattern suitable for mobile terminal environment, so that mobile terminal can be in off-line state It is lower to use the training pattern, reduce the dependence to cloud service.
In one embodiment, the first frame structure is the frame structure of spark format, and the second frame structure is pmml lattice The frame structure of formula;First file is binary file, and the second file is pmml file;
First file of the training pattern by the first frame structure is converted to the training pattern of the second frame structure Second file, comprising:
By pmml conversion method or jpmml-sparkml conversion method, by the binary system of the training pattern of spark format File is converted to the pmml file of the training pattern of pmml format.
The technical scheme provided by this disclosed embodiment can include the following benefits: the present embodiment realizes spark The training pattern of format to pmml format training pattern conversion, the training pattern of pmml format can be in the environment of mobile terminal Lower operation.
In one embodiment, described that serializing processing is carried out to second file, the serializing text that obtains that treated Part, comprising:
By jpmml-model processing method, serializing processing is carried out to the pmml file, the sequence that obtains that treated Change file.
The technical scheme provided by this disclosed embodiment can include the following benefits: the present embodiment is realized to described Pmml file carries out serializing processing, to store training pattern in the terminal.
In one embodiment, the method also includes:
Under the operating system environment of mobile terminal, unserializing processing is carried out to the serializing file, is obtained described Second file;
Load second file.
The technical scheme provided by this disclosed embodiment can include the following benefits: the present embodiment is realized to described It serializes file and carries out unserializing processing, obtain second file;Load second file.After load, mobile terminal In other application can access the training pattern, realize offline access, reduce the dependence to cloud service.
In one embodiment, the second frame structure is the frame structure of pmml format;Second file is pmml file;
It is described that unserializing processing is carried out to the serializing file, comprising:
By jpmml-model processing method, unserializing processing is carried out to the serializing file.
Load second file, comprising:
By jpmml-evaluator method, the pmml file is loaded.
The technical scheme provided by this disclosed embodiment can include the following benefits: the present embodiment is realized in movement The training pattern of pmml format is run in terminal.
According to the second aspect of an embodiment of the present disclosure, a kind of device of file conversion is provided, comprising:
Conversion module, in the environment of the operating system of computer, by the of the training pattern of the first frame structure One file is converted to the second file of the training pattern of the second frame structure;Wherein, the first frame structure is suitable for computer The frame structure of operating system, the second frame structure are the frame structure suitable for mobile terminal operating system;
Processing module is serialized, for carrying out serializing processing to second file, the serializing text that obtains that treated Part.
In one embodiment, the first frame structure is the frame structure of spark format, and the second frame structure is pmml lattice The frame structure of formula;First file is binary file, and the second file is pmml file;
The conversion module includes:
Transform subblock, for passing through pmml conversion method or jpmml-sparkml conversion method, by spark format The binary file of training pattern is converted to the pmml file of the training pattern of pmml format.
In one embodiment, the serializing processing module includes:
Serializing processing submodule, for being serialized to the pmml file by jpmml-model processing method Processing, the serializing file that obtains that treated.
In one embodiment, described device further include:
Unserializing processing module, for being carried out to the serializing file under the operating system environment of mobile terminal Unserializing processing, obtains second file;
Loading module, for loading second file.
In one embodiment, the second frame structure is the frame structure of pmml format;Second file is pmml file;
The unserializing processing module includes:
Unserializing handles submodule, for carrying out to the serializing file anti-by jpmml-model processing method Serializing processing.
The loading module includes:
Submodule is loaded, for loading the pmml file by jpmml-evaluator method.
According to the third aspect of an embodiment of the present disclosure, a kind of device of file conversion is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
In the environment of the operating system of computer, the first file of the training pattern of the first frame structure is converted to Second file of the training pattern of two frame structures;Wherein, the first frame structure is the frame suitable for computer operating system Structure, the second frame structure are the frame structure suitable for mobile terminal operating system;
Serializing processing is carried out to second file, the serializing file that obtains that treated.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of the method for file conversion shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of the method for file conversion shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of the method for file conversion shown according to an exemplary embodiment.
Fig. 4 is a kind of flow chart of the method for file conversion shown according to an exemplary embodiment.
Fig. 5 is a kind of block diagram of the device of file conversion shown according to an exemplary embodiment.
Fig. 6 is a kind of block diagram of conversion module shown according to an exemplary embodiment.
Fig. 7 is a kind of block diagram for serializing processing module shown according to an exemplary embodiment.
Fig. 8 is a kind of block diagram of the device of file conversion shown according to an exemplary embodiment.
Fig. 9 is a kind of block diagram of unserializing processing module shown according to an exemplary embodiment.
Figure 10 is a kind of block diagram of loading module shown according to an exemplary embodiment.
Figure 11 is a kind of block diagram of device shown according to an exemplary embodiment.
Figure 12 is a kind of block diagram of device shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
In the related technology, equipment development is more and more intelligent.Wherein many intelligent decisions need the support of big data.It is based on Big data carries out model training, carries out intelligent decision using training pattern.Currently, training pattern is run on the server.Service Device can provide model algorithm and model framework abundant.Demand is sent to server when carrying out intelligent decision by mobile terminal, Server by utilizing training pattern carries out intelligent decision, and the result of decision is fed back to mobile terminal.If network environment is poor, move Dynamic terminal will not can be carried out intelligent decision.Training pattern on server can not be run on mobile terminals.
To solve the above problems, the present embodiment, which is converted to the training pattern for being suitable for computer environment, is suitable for movement eventually The training pattern in end ring border.Mobile terminal can carry out intelligent decision using local training pattern, realize offline intelligent decision, subtract Few dependence to cloud range.
Fig. 1 is a kind of flow chart of the method for file conversion shown according to an exemplary embodiment, as shown in Figure 1, should Method can be realized by equipment such as computers, comprising the following steps:
In a step 101, in the environment of the operating system of computer, by the first of the training pattern of the first frame structure File is converted to the second file of the training pattern of the second frame structure;Wherein, the first frame structure is to grasp suitable for computer Make the frame structure of system, the second frame structure is the frame structure suitable for mobile terminal operating system.
In a step 102, serializing processing is carried out to second file, the serializing file that obtains that treated.
Computer is different from the operating system of mobile terminal, and translation and compiling environment is also different, therefore, the training under computer environment Model can not be run under mobile terminal environment.The present embodiment realize the training pattern under computer environment is converted to it is applicable It reduces and cloud is taken so that mobile terminal can use the training pattern under off-line state in the training pattern of mobile terminal environment The dependence of business.
Treated, and serializing file is suitable for store on mobile terminal, the operating system access reconciliation of terminal easy to remove Analysis.
In one embodiment, the first frame structure is a kind of spark (PC cluster suitable for running on the server Environment) format frame structure, the second frame structure is the frame structure of pmml (oracle model label prophesy) format;First text Part is binary file, and the second file is pmml file;
The step 101 includes: step A1.
In step A1, pass through pmml conversion method or jpmml (the pmml application programming interfaces based on Java)- Sparkml (machine learning based on Spark) conversion method, the binary file of the training pattern of spark format is converted to The pmml file of the training pattern of pmml format.
The present embodiment realize the training pattern of spark format to pmml format training pattern conversion, pmml format Training pattern can be run in the environment of mobile terminal.
In one embodiment, the step 102 includes: step A2.
In step A2, by jpmml-model processing method, serializing processing is carried out to the pmml file, is obtained Treated serializes file.
The present embodiment, which is realized, carries out serializing processing to the pmml file, to store trained mould in the terminal Type.
In one embodiment, the method also includes step B1- step B2.
In step bl is determined, under the operating system environment of mobile terminal, the serializing file is carried out at unserializing Reason, obtains second file.
In step B2, second file is loaded.
The present embodiment, which is realized, carries out unserializing processing to the serializing file, obtains second file;Load Second file.After load, the other application in mobile terminal can access the training pattern, realize offline access, reduce Dependence to cloud service.
In one embodiment, the second frame structure is the frame structure of pmml format;Second file is pmml file;
The step B1 includes: step B11.
In step B11, by jpmml-model (model) processing method, antitone sequence is carried out to the serializing file Change processing.
The step B2 includes: step B21.
In step B21, by jpmml-evaluator (evaluation program) method, the pmml file is loaded.
The present embodiment realizes the training pattern for running pmml format in the terminal.
Realization process is discussed in detail below by several embodiments.
Fig. 2 is a kind of flow chart of the method for file conversion shown according to an exemplary embodiment, as shown in Fig. 2, should Method can be realized by equipment such as computers, comprising the following steps:
In step 201, in the environment of the operating system of computer, pass through pmml conversion method or jpmml- The binary file of the training pattern of spark format is converted to the training pattern of pmml format by sparkml conversion method Pmml file.
In step 202, by jpmml-model processing method, serializing processing is carried out to the pmml file, is obtained Treated serializes file.Serializing file is storable on mobile terminal.
Fig. 3 is a kind of flow chart of the method for file conversion shown according to an exemplary embodiment, as shown in figure 3, should Method can be realized by equipment such as computer and mobile terminals, comprising the following steps:
In step 301, in the environment of the operating system of computer, by the first of the training pattern of the first frame structure File is converted to the second file of the training pattern of the second frame structure;Wherein, the first frame structure is to grasp suitable for computer Make the frame structure of system, the second frame structure is the frame structure suitable for mobile terminal operating system.
In step 302, serializing processing is carried out to second file, the serializing file that obtains that treated.
In step 303, under the operating system environment of mobile terminal, the serializing file is carried out at unserializing Reason, obtains second file.
In step 304, second file is loaded.
Fig. 4 is a kind of flow chart of the method for file conversion shown according to an exemplary embodiment, as shown in figure 4, should Method can be realized by equipment such as computers, comprising the following steps:
In step 401, in the environment of the operating system of computer, pass through pmml conversion method or jpmml- The binary file of the training pattern of spark format is converted to the training pattern of pmml format by sparkml conversion method Pmml file.
In step 402, by jpmml-model processing method, serializing processing is carried out to the pmml file, is obtained Treated serializes file.Serializing file is storable on mobile terminal.
In step 403, by jpmml-model processing method, unserializing processing is carried out to the serializing file.
In step 404, by jpmml-evaluator method, the pmml file is loaded.
Above-described embodiment can carry out various combinations according to actual needs.
By the realization process described above for having understood file conversion, which is realized by computer, below for equipment Internal structure and function be introduced.
Fig. 5 is a kind of schematic device of file conversion shown according to an exemplary embodiment.Referring to Fig. 5, the device It include: conversion module 501 and serializing processing module 502.
Conversion module 501, in the environment of the operating system of computer, by the training pattern of the first frame structure First file is converted to the second file of the training pattern of the second frame structure;Wherein, the first frame structure is suitable for calculating The frame structure of machine operating system, the second frame structure are the frame structure suitable for mobile terminal operating system.
Processing module 502 is serialized, for carrying out serializing processing to second file, the serializing that obtains that treated File.
In one embodiment, the first frame structure is the frame structure of spark format, and the second frame structure is pmml lattice The frame structure of formula;First file is binary file, and the second file is pmml file;
As shown in fig. 6, the conversion module 501 includes: transform subblock 601.
Transform subblock 601, for passing through pmml conversion method or jpmml-sparkml conversion method, by spark format Training pattern binary file be converted to pmml format training pattern pmml file.
In one embodiment, as shown in fig. 7, the serializing processing module 502 includes: serializing processing submodule 701。
Serializing processing submodule 701, for carrying out sequence to the pmml file by jpmml-model processing method Columnization processing, the serializing file that obtains that treated.
In one embodiment, as shown in figure 8, described device further include: unserializing processing module 801 and loading module 802。
Unserializing processing module 801, under the operating system environment of mobile terminal, to the serializing file into The processing of row unserializing, obtains second file.
Loading module 802, for loading second file.
In one embodiment, the second frame structure is the frame structure of pmml format;Second file is pmml file;
As shown in figure 9, the unserializing processing module 801 includes: unserializing processing submodule 901.
Unserializing handles submodule 901, for by jpmml-model processing method, to the serializing file into The processing of row unserializing.
As shown in Figure 10, the loading module 802 includes: load submodule 1001.
Submodule 1001 is loaded, for loading the pmml file by jpmml-evaluator method.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Figure 11 is a kind of block diagram of device 1100 for file conversion shown according to an exemplary embodiment.For example, Device 1100 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc..
Referring to Fig.1 1, device 1100 may include following one or more components: processing component 1102, memory 1104, Power supply module 1106, multimedia component 1108, audio component 1110, the interface 1112 of input/output (I/O), sensor module 1114 and communication component 1116.
The integrated operation of the usual control device 1100 of processing component 1102, such as with display, telephone call, data communication, Camera operation and record operate associated operation.Processing component 1102 may include one or more processors 1120 to execute Instruction, to perform all or part of the steps of the methods described above.In addition, processing component 1102 may include one or more moulds Block, convenient for the interaction between processing component 1102 and other assemblies.For example, processing component 1102 may include multi-media module, To facilitate the interaction between multimedia component 1108 and processing component 1102.
Memory 1104 is configured as storing various types of data to support the operation in device 1100.These data Example includes the instruction of any application or method for operating on device 1100, contact data, telephone book data, Message, picture, video etc..Memory 1104 can by any kind of volatibility or non-volatile memory device or they Combination is realized, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), it is erasable can Program read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory Reservoir, disk or CD.
Power supply module 1106 provides power supply for the various assemblies of device 1100.Power supply module 1106 may include power management System, one or more power supplys and other with for device 1100 generate, manage, and distribute the associated component of power supply.
Multimedia component 1108 includes the screen of one output interface of offer between described device 1100 and user.? In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, Screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes that one or more touch passes Sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding is dynamic The boundary of work, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more Media component 1108 includes a front camera and/or rear camera.When device 1100 is in operation mode, as shot mould When formula or video mode, front camera and/or rear camera can receive external multi-medium data.Each preposition camera shooting Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 1110 is configured as output and/or input audio signal.For example, audio component 1110 includes a wheat Gram wind (MIC), when device 1100 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone quilt It is configured to receive external audio signal.The received audio signal can be further stored in memory 1104 or via communication Component 1116 is sent.In some embodiments, audio component 1110 further includes a loudspeaker, is used for output audio signal.
I/O interface 1112 provides interface, above-mentioned peripheral interface module between processing component 1102 and peripheral interface module It can be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and Locking press button.
Sensor module 1114 includes one or more sensors, and the state for providing various aspects for device 1100 is commented Estimate.For example, sensor module 1114 can detecte the state that opens/closes of device 1100, the relative positioning of component, such as institute The display and keypad that component is device 1100 are stated, sensor module 1114 can be with detection device 1100 or device 1100 The position change of one component, the existence or non-existence that user contacts with device 1100,1100 orientation of device or acceleration/deceleration and The temperature change of device 1100.Sensor module 1114 may include proximity sensor, be configured in not any object It is detected the presence of nearby objects when reason contact.Sensor module 1114 can also include optical sensor, as CMOS or ccd image are passed Sensor, for being used in imaging applications.In some embodiments, which can also include acceleration sensing Device, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 1116 is configured to facilitate the communication of wired or wireless way between device 1100 and other equipment.Dress The wireless network based on communication standard, such as WiFi can be accessed by setting 1100,2G or 3G or their combination.It is exemplary at one In embodiment, communication component 1116 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel Information.In one exemplary embodiment, the communication component 1116 further includes near-field communication (NFC) module, to promote short distance Communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band can be based in NFC module (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 1100 can be by one or more application specific integrated circuit (ASIC), number Signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 1104 of instruction, above-metioned instruction can be executed by the processor 1120 of device 1100 to complete the above method.Example Such as, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, soft Disk and optical data storage devices etc..
A kind of device of file conversion, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
In the environment of the operating system of computer, the first file of the training pattern of the first frame structure is converted to Second file of the training pattern of two frame structures;Wherein, the first frame structure is the frame suitable for computer operating system Structure, the second frame structure are the frame structure suitable for mobile terminal operating system;
Serializing processing is carried out to second file, the serializing file that obtains that treated.
The processor can be additionally configured to:
First frame structure is the frame structure of spark format, and the second frame structure is the frame structure of pmml format;The One file is binary file, and the second file is pmml file;
First file of the training pattern by the first frame structure is converted to the training pattern of the second frame structure Second file, comprising:
By pmml conversion method or jpmml-sparkml conversion method, by the binary system of the training pattern of spark format File is converted to the pmml file of the training pattern of pmml format.
The processor can be additionally configured to:
It is described that serializing processing is carried out to second file, the serializing file that obtains that treated, comprising:
By jpmml-model processing method, serializing processing is carried out to the pmml file, the sequence that obtains that treated Change file.
The processor can be additionally configured to:
The method also includes:
Under the operating system environment of mobile terminal, unserializing processing is carried out to the serializing file, is obtained described Second file;
Load second file.
The processor can be additionally configured to:
Second frame structure is the frame structure of pmml format;Second file is pmml file;
It is described that unserializing processing is carried out to the serializing file, comprising:
By jpmml-model processing method, unserializing processing is carried out to the serializing file.
Load second file, comprising:
By jpmml-evaluator method, the pmml file is loaded.
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of mobile terminal When device executes, so that a kind of method that mobile terminal is able to carry out file conversion, which comprises
In the environment of the operating system of computer, the first file of the training pattern of the first frame structure is converted to Second file of the training pattern of two frame structures;Wherein, the first frame structure is the frame suitable for computer operating system Structure, the second frame structure are the frame structure suitable for mobile terminal operating system;
Serializing processing is carried out to second file, the serializing file that obtains that treated.
Instruction in the storage medium can also include:
First frame structure is the frame structure of spark format, and the second frame structure is the frame structure of pmml format;The One file is binary file, and the second file is pmml file;
First file of the training pattern by the first frame structure is converted to the training pattern of the second frame structure Second file, comprising:
By pmml conversion method or jpmml-sparkml conversion method, by the binary system of the training pattern of spark format File is converted to the pmml file of the training pattern of pmml format.
Instruction in the storage medium can also include:
It is described that serializing processing is carried out to second file, the serializing file that obtains that treated, comprising:
By jpmml-model processing method, serializing processing is carried out to the pmml file, the sequence that obtains that treated Change file.
Instruction in the storage medium can also include:
The method also includes:
Under the operating system environment of mobile terminal, unserializing processing is carried out to the serializing file, is obtained described Second file;
Load second file.
Instruction in the storage medium can also include:
Second frame structure is the frame structure of pmml format;Second file is pmml file;
It is described that unserializing processing is carried out to the serializing file, comprising:
By jpmml-model processing method, unserializing processing is carried out to the serializing file.
Load second file, comprising:
By jpmml-evaluator method, the pmml file is loaded.
Figure 12 is a kind of block diagram of device 1200 for file conversion shown according to an exemplary embodiment.For example, Device 1200 may be provided as a computer.Referring to Fig.1 2, it further comprises one that device 1200, which includes processing component 1222, A or multiple processors, and the memory resource as representated by memory 1232, can be by processing component 1222 for storing The instruction of execution, such as application program.The application program stored in memory 1232 may include one or more every One corresponds to the module of one group of instruction.In addition, processing component 1222 is configured as executing instruction, to execute above method file Conversion.
Device 1200 can also include that a power supply module 1226 be configured as the power management of executive device 1200, and one Wired or wireless network interface 1250 is configured as device 1200 being connected to network and input and output (I/O) interface 1258.Device 1200 can be operated based on the operating system for being stored in memory 1232, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (11)

1. a kind of method of file conversion characterized by comprising
In the environment of the operating system of computer, the first file of the training pattern of the first frame structure is converted into the second frame Second file of the training pattern of frame structure;Wherein, the first frame structure is the frame structure suitable for computer operating system, Second frame structure is the frame structure suitable for mobile terminal operating system;
Serializing processing is carried out to second file, the serializing file that obtains that treated.
2. the method for file conversion according to claim 1, which is characterized in that the first frame structure is spark format Frame structure, the second frame structure are the frame structure of pmml format;First file is binary file, and the second file is pmml File;
First file of the training pattern by the first frame structure is converted to the second of the training pattern of the second frame structure File, comprising:
By pmml conversion method or jpmml-sparkml conversion method, by the binary file of the training pattern of spark format Be converted to the pmml file of the training pattern of pmml format.
3. the method for file conversion according to claim 2, which is characterized in that described to carry out sequence to second file Change processing, the serializing file that obtains that treated, comprising:
By jpmml-model processing method, serializing processing is carried out to the pmml file, the serializing text that obtains that treated Part.
4. the method for file conversion according to claim 1, which is characterized in that the method also includes:
Under the operating system environment of mobile terminal, unserializing processing is carried out to the serializing file, obtains described second File;
Load second file.
5. the method for file conversion according to claim 4, which is characterized in that the second frame structure is the frame of pmml format Frame structure;Second file is pmml file;
It is described that unserializing processing is carried out to the serializing file, comprising:
By jpmml-model processing method, unserializing processing is carried out to the serializing file.
Load second file, comprising:
By jpmml-evaluator method, the pmml file is loaded.
6. a kind of device of file conversion characterized by comprising
Conversion module, in the environment of the operating system of computer, by the first text of the training pattern of the first frame structure Part is converted to the second file of the training pattern of the second frame structure;Wherein, the first frame structure is suitable for computer operation The frame structure of system, the second frame structure are the frame structure suitable for mobile terminal operating system;
Processing module is serialized, for carrying out serializing processing to second file, the serializing file that obtains that treated.
7. the device of file conversion according to claim 6, which is characterized in that the first frame structure is spark format Frame structure, the second frame structure are the frame structure of pmml format;First file is binary file, and the second file is pmml File;
The conversion module includes:
Transform subblock, for passing through pmml conversion method or jpmml-sparkml conversion method, by the training of spark format The binary file of model is converted to the pmml file of the training pattern of pmml format.
8. the device of file according to claim 7 conversion, which is characterized in that the serializing processing module includes:
Serializing processing submodule, for being carried out at serializing to the pmml file by jpmml-model processing method Reason, the serializing file that obtains that treated.
9. the device of file conversion according to claim 6, which is characterized in that described device further include:
Unserializing processing module, for carrying out inverted sequence to the serializing file under the operating system environment of mobile terminal Columnization processing, obtains second file;
Loading module, for loading second file.
10. the device of file conversion according to claim 9, which is characterized in that the second frame structure is pmml format Frame structure;Second file is pmml file;
The unserializing processing module includes:
Unserializing handles submodule, for carrying out antitone sequence to the serializing file by jpmml-model processing method Change processing.
The loading module includes:
Submodule is loaded, for loading the pmml file by jpmml-evaluator method.
11. a kind of device of file conversion characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
In the environment of the operating system of computer, the first file of the training pattern of the first frame structure is converted into the second frame Second file of the training pattern of frame structure;Wherein, the first frame structure is the frame structure suitable for computer operating system, Second frame structure is the frame structure suitable for mobile terminal operating system;
Serializing processing is carried out to second file, the serializing file that obtains that treated.
CN201710470415.9A 2017-06-20 2017-06-20 The method and device of file conversion Pending CN109426651A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710470415.9A CN109426651A (en) 2017-06-20 2017-06-20 The method and device of file conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710470415.9A CN109426651A (en) 2017-06-20 2017-06-20 The method and device of file conversion

Publications (1)

Publication Number Publication Date
CN109426651A true CN109426651A (en) 2019-03-05

Family

ID=65497057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710470415.9A Pending CN109426651A (en) 2017-06-20 2017-06-20 The method and device of file conversion

Country Status (1)

Country Link
CN (1) CN109426651A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546791A (en) * 2011-12-30 2012-07-04 南京师范大学 Distributed service system and method based on state machine-interaction event model
US8566008B2 (en) * 2008-06-19 2013-10-22 Toyota Jidosha Kabushiki Kaisha Control device for internal combustion engine
CN104572763A (en) * 2013-10-25 2015-04-29 西安群丰电子信息科技有限公司 Method for object transferring in distributed computing system
CN105516305A (en) * 2015-12-07 2016-04-20 国云科技股份有限公司 Method for carrying out efficient cross-domain file uploading based on binary mode
CN105681333A (en) * 2016-02-24 2016-06-15 携程计算机技术(上海)有限公司 Binary-system-based network data transmission method and system
CN106022483A (en) * 2016-05-11 2016-10-12 星环信息科技(上海)有限公司 Method and equipment for conversion between machine learning models

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8566008B2 (en) * 2008-06-19 2013-10-22 Toyota Jidosha Kabushiki Kaisha Control device for internal combustion engine
CN102546791A (en) * 2011-12-30 2012-07-04 南京师范大学 Distributed service system and method based on state machine-interaction event model
CN104572763A (en) * 2013-10-25 2015-04-29 西安群丰电子信息科技有限公司 Method for object transferring in distributed computing system
CN105516305A (en) * 2015-12-07 2016-04-20 国云科技股份有限公司 Method for carrying out efficient cross-domain file uploading based on binary mode
CN105681333A (en) * 2016-02-24 2016-06-15 携程计算机技术(上海)有限公司 Binary-system-based network data transmission method and system
CN106022483A (en) * 2016-05-11 2016-10-12 星环信息科技(上海)有限公司 Method and equipment for conversion between machine learning models

Similar Documents

Publication Publication Date Title
CN104408402B (en) Face identification method and device
CN109389162B (en) Sample image screening technique and device, electronic equipment and storage medium
CN109658927A (en) Wake-up processing method, device and the management equipment of smart machine
CN106202330A (en) The determination methods of junk information and device
CN107463903B (en) Face key point positioning method and device
CN104899610A (en) Picture classification method and device
CN108038102A (en) Recommendation method, apparatus, terminal and the storage medium of facial expression image
CN105824955B (en) Short message clustering method and device
CN107704190B (en) Gesture recognition method and device, terminal and storage medium
CN109600303A (en) Content share method, device and storage medium
CN106096009A (en) Method for generating message and device
CN111984347A (en) Interaction processing method, device, equipment and storage medium
CN113065591B (en) Target detection method and device, electronic equipment and storage medium
CN107529699A (en) Control method of electronic device and device
CN109039877A (en) A kind of method, apparatus, electronic equipment and storage medium showing unread message quantity
CN111988493A (en) Interaction processing method, device, equipment and storage medium
CN109409414B (en) Sample image determines method and apparatus, electronic equipment and storage medium
CN106021072A (en) Information display method and device
CN104850592B (en) The method and apparatus for generating model file
WO2020077522A1 (en) Method for identifying environment scene, chip, and terminal
CN105956513A (en) Method and device for executing reaction action
CN105551047A (en) Picture content detecting method and device
CN106228077B (en) It handles image and shows the method, apparatus and terminal of image
CN105469411B (en) For the method, apparatus and terminal of detection image clarity
CN107402756A (en) For drawing the method, apparatus and terminal of the page

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190305

RJ01 Rejection of invention patent application after publication