CN112560402A - Model training method and device and electronic equipment - Google Patents

Model training method and device and electronic equipment Download PDF

Info

Publication number
CN112560402A
CN112560402A CN202011583008.7A CN202011583008A CN112560402A CN 112560402 A CN112560402 A CN 112560402A CN 202011583008 A CN202011583008 A CN 202011583008A CN 112560402 A CN112560402 A CN 112560402A
Authority
CN
China
Prior art keywords
document
target
model
training
picture
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
CN202011583008.7A
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011583008.7A priority Critical patent/CN112560402A/en
Publication of CN112560402A publication Critical patent/CN112560402A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application discloses a model training method, a model training device and electronic equipment, and relates to the technical field of format conversion and the like in computer technology. The specific implementation scheme is as follows: establishing an initial model, wherein the initial model is used for determining a document to be converted into a picture; training the initial model according to the document attribute parameters of the training document set and the document labels of the training document set to obtain a target model; the document attribute parameters include at least one of: document format, document content element number, document layout complexity and document downloading times. The initial document model is trained by utilizing the document attribute parameters of the training document set and the document labels of the training document set, and the document attribute parameters of the training document set for training can adopt at least one parameter of document format, document content element quantity, document typesetting complexity and document downloading times, so that the performance of the target model obtained by training can be improved, and the accuracy of the target model for screening the document of the picture to be converted can be improved.

Description

Model training method and device and electronic equipment
Technical Field
The present application relates to the field of format conversion in computer technologies, and in particular, to a model training method and apparatus, and an electronic device.
Background
With the development of the trend of mobile office, the requirement of browsing documents on mobile terminals is becoming more common. The document is transcoded through a server of a mobile terminal reader, the mobile terminal loads the transcoded data of the document for display, and a user can check the document content and the like through the mobile terminal.
At present, there are two main transcoding methods for a document, that is, a server of a reader transcodes the document into format Xreader (a reader can support dot matrix fonts of any size, html (HyperText Markup Language) reading, code conversion and the like) data or streaming rtcs (Real-Time Component description) data, and the transcoded data is transmitted to a mobile terminal for display.
Disclosure of Invention
The application provides a model training method and device and electronic equipment.
In a first aspect, an embodiment of the present application provides a model training method, including:
establishing an initial model, wherein the initial model is used for determining a document to be converted into a picture;
training the initial model according to the document attribute parameters of a training document set and the document labels of the training document set to obtain a target model;
wherein the document attribute parameters include at least one of:
a document format;
number of document content elements;
document layout complexity;
the number of times the document was downloaded.
In the model training method of this embodiment, an initial model may be established first, and then the initial model may be trained by using the document attribute parameters of the training document set and the document tags of the training document set, so as to obtain a target model. The initial model is used for determining a document to be converted into a picture, namely screening the document to be processed in a picture conversion mode, the initial document model is trained by utilizing the document attribute parameters of the training document set and the document labels of the training document set, and the document attribute parameters of the training document set for training can adopt at least one parameter of document format, document content element number, document typesetting complexity and document downloading times, so that the performance of the target model obtained by training can be improved, and the accuracy of the target model obtained by training for screening the document of the picture to be converted can be improved.
In a second aspect, an embodiment of the present application provides a model training apparatus, including:
the model creating module is used for establishing an initial model, and the initial model is used for determining a document to be converted into a picture;
the training module is used for training the initial model according to the document attribute parameters of a training document set and the document labels of the training document set to obtain a target model;
wherein the document attribute parameters include at least one of:
a document format;
number of document content elements;
document layout complexity;
the number of times the document was downloaded.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the model training methods provided by the embodiments of the present application.
In a fourth aspect, an embodiment of the present application further provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a model training method provided by embodiments of the present application.
In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program that, when being executed by a processor, implements the model training method provided by the embodiments of the present application.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a schematic flow chart diagram of a model training method according to an embodiment provided herein;
FIG. 2 is a second schematic flowchart of a model training method according to an embodiment of the present application;
FIG. 3 is a third schematic flowchart of a model training method according to an embodiment of the present disclosure;
FIG. 4 is one of the block diagrams of a model training apparatus according to an embodiment provided herein;
FIG. 5 is a second block diagram of a model training apparatus according to an embodiment of the present disclosure;
FIG. 6 is a block diagram of an electronic device for implementing a model training method according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, according to an embodiment of the present application, the present application provides a model training method, the method including:
step S101: and establishing an initial model, wherein the initial model is used for determining the document to be converted into the picture.
The method can be applied to electronic equipment, and optionally, the electronic equipment can be a background server of a reader in terminal equipment (for example, a mobile terminal and the like). It is understood that the initial model is a document screening model or a document classification model, and the like, and can be used for screening documents needing to be converted into pictures.
Step S102: and training the initial model according to the document attribute parameters of the training document set and the document labels of the training document set to obtain a target model.
The training document set includes a plurality of training documents, each training document has corresponding document attribute parameters, each training document has corresponding document tags (which may be understood as real document tags of the training documents), and the document tags of the documents may be used to indicate the category of the documents, for example, may indicate that the documents are documents that need to be converted into pictures, that is, documents that need to be converted into pictures, or indicate that the documents are documents that do not need to be converted into pictures, that is, documents that are not to be converted into pictures. For example, if the document tag of a document is 1, it indicates that the document belongs to a document that needs to be converted into a picture, and if the document tag of the document is 0, it indicates that the document belongs to a document that does not need to be converted into a picture.
The document attribute parameters of the training document set include document attribute parameters of a plurality of training documents, and the document tags of the training document set include document tags of the plurality of training documents. The inputs to the initial model may include document attribute parameters of a training document set and document tags of the training document set, and the outputs of the initial model include predicted document tags of the training document set. The initial model includes a plurality of model parameters, which may include, but are not limited to, at least one of a weight parameter of a document format, a weight parameter of the number of document content elements, a weight parameter of document layout complexity, and a weight parameter of document download times, for example, and the model training process is an adjustment process for continuously updating the model parameters.
The model training method can be used for document reading or viewing scenes and the like, namely the trained target model can be used for document reading or viewing scenes and the like.
The document attribute parameters comprise at least one of document format, document content element number, document typesetting complexity and document downloading times.
The document format is one of variables affecting the transcoding processing mode, and the document library can support multiple document formats by analyzing the document library, for example, the document library can support at least 17 document formats currently. Different document formats affect whether the document is suitable for being converted into a result of a picture, for example, an Xmind format document cannot support traditional transcoding rendering into format Xreader data or streaming rtcs data, and is more suitable for automatic image conversion processing.
The content elements of the documents have diversity, that is, different documents can contain different content elements, and the variety and the number of the content elements directly influence the transcoding processing mode and the transcoding success rate. For example, a word document, which includes a physical formula question, may contain a variety of content elements such as text, pictures, artistic words, formulas, and special characters. The higher the types of content elements contained in the document are, the lower the transcoding success rate of the traditional transcoding mode is, the more easily the page is read to generate messy codes, and the more suitable the document is to be converted into picture processing.
The typesetting complexity of different documents directly influences the transcoding processing mode of the documents, and the higher the typesetting complexity of the documents, the more suitable the documents are for the image conversion processing. It should be noted that the more typesetting manners that are used in a document, the greater the complexity, for example, there are text and pictures in the document, the text is typeset in the first typesetting manner, the pictures are typeset in a surrounding or embedding manner, there are two typesetting manners in the document, if one part of the text in the document adopts the third typesetting manner, the other part adopts the fourth typesetting manner, and the pictures are typeset in a surrounding or embedding manner, there are three rice typesetting manners in the document, and the complexity is higher than the complexity including the two typesetting manners.
And historical download times of different documents can be obtained through historical data. The more times of downloading the document by the user, the better the experience of the document after transcoding is shown, and the lower the downloading times is, the more suitable the image conversion processing is, because the experience effect after transcoding is not in accordance with the expectation.
Therefore, the initial model is trained through at least one parameter of the document format, the number of document content elements, the document typesetting complexity and the document downloading times of the training text current set, the performance of the trained target model can be improved, and the accuracy of the target model for screening the document to be converted into the picture can be improved.
In the model training method of this embodiment, an initial model may be established first, and then the initial model may be trained by using the document attribute parameters of the training document set and the document tags of the training document set, so as to obtain a target model. The initial model is used for determining a document to be converted into a picture, namely screening the document to be processed in a picture conversion mode, the initial document model is trained by utilizing the document attribute parameters of the training document set and the document labels of the training document set, and the document attribute parameters of the training document set for training can adopt at least one parameter of document format, document content element number, document typesetting complexity and document downloading times, so that the performance of the target model obtained by training can be improved, and the accuracy of the target model obtained by training for screening the document of the picture to be converted can be improved. Meanwhile, according to the embodiment of the application, the same transcoding mode is not required to be performed on each different document by adopting the existing transcoding mode, the target model for determining the document to be converted into the picture can be obtained through training, namely the document to be converted into the picture can be determined through the target model, the effect of converting the subsequent document to be converted into the picture can be improved, and the condition of messy codes is reduced. And obtaining the target model through the model training method of the embodiment, determining the document of the picture to be converted through the target model, and developing independent readers for different document formats is not needed, so that the research and development cost is reduced, and the compatibility is improved. And determining the document to be converted into the picture through the target model, namely screening the document to be converted into the picture, and subsequently performing image conversion processing on the document, so that the situation that code mess easily occurs when transcoding the document into format Xreader data or streaming rtcs data can be reduced, the transcoding accuracy can be improved through the image conversion processing, and the document reading experience of a user is improved.
In an embodiment, training the initial model to obtain the target model may further include:
acquiring a first document and acquiring document attribute parameters of the first document; inputting the document attribute parameters of the first document into a target model, and outputting the document tag of the first document through the target model; and in the case that the document tag of the first document indicates that the first document is a document needing to be converted into a picture (namely, a document to be converted into a picture), converting the first document into the first picture.
That is, in the case that the document tag of the first document indicates that the first document is a document that needs to be converted into a picture, it indicates that the first document is suitable for the image conversion processing, and the first document is converted into the first picture. It should be noted that the first document may be a document in an actual application scenario, for example, the first document may be a document in an actual document reading or viewing scenario, and the like.
That is, outputting the document tag of the first document through the target model may be understood as performing classification identification on the first document, and identifying whether the first document is a document that needs to be converted into a picture, where the document tag of the first document may be used to indicate whether the first document is a document that needs to be converted into a picture, that is, the document tag of the first document may indicate that the first document is a document that needs to be converted into a picture (i.e., a document that needs to be converted into a picture) or indicate that the first document is not a document that needs to be converted into a picture (i.e., a document that does not need to be converted into.
In this embodiment, when the first document is determined to be a document to be converted into a picture by the target model, the first document may be subjected to image conversion processing to obtain the first picture, that is, the first document may be processed in an image conversion manner, which may reduce a situation that transcoding the first document into format Xreader data or streaming rtcs data may easily cause a messy code, and may improve transcoding accuracy by performing image conversion processing on the first document, display the first picture of the first document, and a user may view the first picture of the first document, that is, view the content of the first document, and may improve a user's experience of reading the document.
In one embodiment, after obtaining the target model, the method further includes: determining a target document from the set of test documents using a target model; testing the target document to obtain a first downloading frequency of the target document under the condition that the target document is subjected to image conversion processing and a second downloading frequency of the target document under the condition that the target document is processed in a first transcoding mode; and comparing the first download times with the second download times to determine a test result. That is, in this embodiment, a model training method is provided, including:
step S201: and establishing an initial model, wherein the initial model is used for determining the document to be converted into the picture.
Step S202: and training the initial model according to the document attribute parameters of the training document set and the document labels of the training document set to obtain a target model.
Steps S201 to S202 correspond to steps S101 to S102 one to one, and are not described herein again.
Step S203: a target document is determined from the set of test documents using a target model.
The target document may be understood as a document to be converted into a picture, which is screened from the test document set by the target model, that is, a document to be converted into a picture, which is screened from the test document set, and the number of the documents may be multiple. The test document set includes a plurality of test documents, and it should be noted that the test document set may be the same as or different from the training document set.
Step S204: and testing the target document to obtain a first downloading frequency of the target document under the condition that the target document is subjected to image conversion processing, and a second downloading frequency of the target document under the condition that the target document is processed in a first transcoding mode.
And testing the target documents screened from the test document set by the target model. Under the scene that a user reads a document, data of a target document are output in different transcoding modes through experiments, and the download times (namely the first download times and the second download times) of a batch of homogeneous users, which are respectively displayed in a picture conversion mode and displayed in a first transcoding mode (namely a traditional transcoding mode, for example, transcoding is format Xreader data or streaming rtcs data) are counted, so that the document which is most suitable for picture conversion processing is found. For example, for the same group of users, under the condition that the document format, the number of document content elements, and the layout complexity are not changed, the group a users read the document contents displayed in the conventional transcoding manner, and the group B users read the document contents displayed in the image conversion manner, so that the first download times of the group a users to the first document and the second download times of the group B users to the first document can be obtained through statistics. As an example, the above-mentioned testing of the target document may be an A/B testing of the target document.
Step S205: and comparing the first download times with the second download times to determine a test result.
And comparing and observing the downloading times of the batch of target documents under different transcoding modes by the user, and determining the test result of the target model. The test result may include that the test is passed or not passed, for example, if the first download number is greater than the second download number, the download condition after transcoding the target document by the graph transformation method is better than the download condition after transcoding by the conventional transcoding method, the target document is more suitable for graph transformation processing, so that the download amount of the user can be increased, the reading experience of the user can be provided, and the like. Therefore, the test can be determined to pass under the condition that the first downloading frequency is greater than the second downloading frequency, the test can be determined not to pass under the condition that the first downloading frequency is less than or equal to the second downloading frequency, the target model can be further updated, and the like, so that the accuracy of screening the document to be converted into the picture by the target model is improved.
In one embodiment, after the testing the target document to obtain a first download time of the target document in the case of the target document being subjected to the graph transformation processing and a second download time of the target document in the case of the target document being processed by the first transcoding manner, the method further includes:
and updating the target model based on the real label of the target document and the first downloading times.
The test document set is input into the target model, the prediction document tag of each test document in the test document set can be output through the target model, the category of the test document can be indicated, and therefore the target document to be converted into the picture can be determined. However, each test document has a corresponding real label, i.e. a real category, and there may be a test document in which the real label and the predicted label are inconsistent in a plurality of test documents, which indicates that the document label predicted by the target model by the test document is inaccurate. In addition, the target document is a document determined by the target model to be converted into a picture, but if the first download frequency after the target document is displayed in a graph turning mode is smaller through the test process, the target document is predicted to be a document needing to be converted into a picture, but the first download frequency after the target document passes the graph turning is smaller, the user experiences no good picture after the graph turning, and the target document is not considered to be the document needing to be converted into the picture. Thus, in this embodiment, the target model can be updated through the real tag of the target document and the first download time, that is, the model parameters of the target model are updated, so as to improve the performance of the target model, and improve the accuracy of determining the document by the target model.
In one embodiment, after the training of the initial model and the obtaining of the target model, the method further includes: receiving correction information input by a user; and updating the target model according to the correction information.
Training the initial model according to the document attribute parameters of the training document set and the document tags of the training document set to obtain a target model, outputting the predicted document tags of the training document set obtained through the model in the training process, and allowing a user to check the predicted document tags of the training document set, so that the user can manually determine which type of document has a better tag prediction effect and which type of document has a poorer tag prediction effect, and manually feed back relevant information for the target model, therefore, on the basis of the model parameters of the target model, the model parameters of the target model can be updated by combining manual evaluation, namely receiving the modification information fed back by the user (for example, the modification information of at least one parameter in the model parameters and the like), updating the model parameters of the target model, realizing the updating of the target model, and improving the accuracy of the updated target model for determining the document suitable for turning, the determined document suitable for image conversion can obtain better reading experience, benefits and the like.
It should be noted that, the correction information input by the user is received; updating the target model according to the revision information may be a step of further updating the model after updating the target model based on the real tags of the target document and the first download times.
The process of the above method is described below with a specific example. As shown in fig. 3, the process is as follows:
first, an initial model for screening a document suitable for a turning chart is established based on basic fields of the document (such as document format, document content element number, document layout complexity, document downloading times and the like).
Then, the initial document is trained based on the historical document data (i.e., the training text set), resulting in the target model.
Secondly, testing the target document determined by the target model in an A/B testing mode, determining a testing result, and updating the model parameters of the target model according to the first downloading times of the target document obtained in the testing process after being processed in a graph transferring mode and the real label of the target document.
Furthermore, the model parameters of the target model may be further updated in conjunction with manual evaluation.
In practical application, a first document can be obtained, document attribute parameters of the first document are extracted, the document attribute parameters are input into an updated target model, if the first document is determined to be a document to be converted into a picture through the target model, the first document is subjected to image conversion processing to obtain a first picture, and the picture suitable for image conversion can be automatically subjected to image conversion processing. The first picture of the first document can be transmitted to the mobile terminal and displayed, so that a user can view the first picture at the mobile terminal, the document content of the first document can be viewed, and the first document can be downloaded subsequently.
By the scheme of the embodiment of the application, the problem of disordered typesetting codes of the document reading page (for example, a formula in the original content of the document is changed into a word pattern after transcoding) at the mobile terminal can be solved, and the special format documents such as Xmind, Cad and the like are compatible through image conversion processing. The target document to be converted into the picture is determined through the target model, and the picture is automatically converted through the machine, so that the reading experience and the payment rate of a user at the mobile terminal can be effectively improved, and the labor cost for researching and developing various readers can be reduced.
As shown in fig. 4, the present application further provides a model training apparatus 400 according to an embodiment of the present application, the apparatus 400 including:
a model creating module 401, configured to create an initial model, where the initial model is used to determine a document to be converted into a picture;
a training module 402, configured to train the initial model according to the document attribute parameters of the training document set and the document tags of the training document set, to obtain a target model;
wherein the document attribute parameters include at least one of:
a document format;
number of document content elements;
document layout complexity;
the number of times the document was downloaded.
In one embodiment, the apparatus further comprises:
the acquisition module is used for acquiring a first document and acquiring document attribute parameters of the first document;
the label output module is used for inputting the document attribute parameters of the first document into the target model and outputting the document label of the first document through the target model;
the image conversion module is used for converting the first document into the first picture under the condition that the document tag of the first document indicates that the first document is a document needing to be converted into the picture.
As shown in fig. 5, in one embodiment, the apparatus 400 further comprises:
a first determining module 403, configured to determine a target document from the test document set by using a target model;
the testing module 404 is configured to test the target document to obtain a first download time of the target document when the target document is subjected to graph transformation processing, and a second download time of the target document when the target document is processed in a first transcoding manner;
the second determining module 405 is configured to compare the first download times with the second download times to determine a test result.
In one embodiment, the apparatus further comprises:
and the first updating module is used for updating the target model based on the real label and the first downloading times of the target document.
In one embodiment, the apparatus further comprises:
the receiving module is used for receiving correction information input by a user;
and the second updating module is used for updating the target model according to the correction information.
The model training device of each embodiment is a device for implementing the model training method of each embodiment, and has corresponding technical features and technical effects, which are not described herein again.
There is also provided, in accordance with an embodiment of the present application, an electronic device, a readable storage medium, and a computer program product.
A non-transitory computer readable storage medium of an embodiment of the present application stores computer instructions for causing a computer to perform a model training method provided herein.
The computer program product of the embodiments of the present application includes a computer program, and the computer program is used for making a computer execute the model training method provided by the embodiments of the present application.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 606 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 606 such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the various methods and processes described above, such as the model training method. For example, in some embodiments, the model training method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 606. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM603 and executed by the computing unit 601, one or more steps of the model training method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the model training method in any other suitable manner (e.g., by means of firmware). Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (11)

1. A method of model training, the method comprising:
establishing an initial model, wherein the initial model is used for determining a document to be converted into a picture;
training the initial model according to the document attribute parameters of a training document set and the document labels of the training document set to obtain a target model;
wherein the document attribute parameters include at least one of:
a document format;
number of document content elements;
document layout complexity;
the number of times the document was downloaded.
2. The method of claim 1, wherein after obtaining the target model, further comprising:
determining a target document from a set of test documents using the target model;
testing the target document to obtain a first downloading frequency of the target document under the condition that the target document is subjected to image conversion processing and a second downloading frequency of the target document under the condition that the target document is processed in a first transcoding mode;
and comparing the first downloading times with the second downloading times to determine a test result.
3. The method of claim 2, wherein the testing the target document to obtain a first number of downloads of the target document if the target document is subjected to a graph transformation process and a second number of downloads of the target document if the target document is subjected to a first transcoding process, further comprises:
and updating the target model based on the real label of the target document and the first downloading times.
4. The method of claim 2, wherein the training of the initial model to obtain the target model further comprises:
receiving correction information input by a user;
and updating the target model according to the correction information.
5. A model training apparatus, the apparatus comprising:
the model creating module is used for establishing an initial model, and the initial model is used for determining a document to be converted into a picture;
the training module is used for training the initial model according to the document attribute parameters of a training document set and the document labels of the training document set to obtain a target model;
wherein the document attribute parameters include at least one of:
a document format;
number of document content elements;
document layout complexity;
the number of times the document was downloaded.
6. The apparatus of claim 5, wherein the apparatus further comprises:
a first determination module for determining a target document from a set of test documents using the target model;
the test module is used for testing the target document to obtain a first downloading frequency of the target document under the condition that the target document is subjected to image conversion processing and a second downloading frequency of the target document under the condition that the target document is processed in a first transcoding mode;
and the second determining module is used for comparing the first downloading times with the second downloading times to determine a test result.
7. The apparatus of claim 6, wherein the apparatus further comprises:
and the first updating module is used for updating the target model based on the real label of the target document and the first downloading times.
8. The apparatus of claim 6, wherein the apparatus further comprises:
the receiving module is used for receiving correction information input by a user;
and the second updating module is used for updating the target model according to the correction information.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the model training method of any of claims 1-4.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the model training method of any one of claims 1-4.
11. A computer program product comprising a computer program which, when executed by a processor, implements a model training method according to any one of claims 1-4.
CN202011583008.7A 2020-12-28 2020-12-28 Model training method and device and electronic equipment Pending CN112560402A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011583008.7A CN112560402A (en) 2020-12-28 2020-12-28 Model training method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011583008.7A CN112560402A (en) 2020-12-28 2020-12-28 Model training method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112560402A true CN112560402A (en) 2021-03-26

Family

ID=75032429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011583008.7A Pending CN112560402A (en) 2020-12-28 2020-12-28 Model training method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112560402A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104514A (en) * 2019-12-23 2020-05-05 北京百度网讯科技有限公司 Method and device for training document label model
CN112100362A (en) * 2020-09-11 2020-12-18 北京百度网讯科技有限公司 Document format recommendation model training method and device and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104514A (en) * 2019-12-23 2020-05-05 北京百度网讯科技有限公司 Method and device for training document label model
CN112100362A (en) * 2020-09-11 2020-12-18 北京百度网讯科技有限公司 Document format recommendation model training method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN103959281A (en) Method for associating third party content with online document signing
US20120236004A1 (en) Information output apparatus and information output method and recording medium
CN113382083B (en) Webpage screenshot method and device
CN113808231A (en) Information processing method and device, image rendering method and device, and electronic device
CN111143505A (en) Document processing method, device, medium and electronic equipment
CN113538450B (en) Method and device for generating image
CN112839185B (en) Method, apparatus, device and medium for processing image
CN116954450A (en) Screenshot method and device for front-end webpage, storage medium and terminal
CN112560402A (en) Model training method and device and electronic equipment
CN114882313B (en) Method, device, electronic equipment and storage medium for generating image annotation information
CN115756461A (en) Annotation template generation method, image identification method and device and electronic equipment
CN113343133B (en) Display page generation method, related device and computer program product
CN115643468A (en) Poster generation method and device, electronic equipment and storage medium
CN114254585A (en) Font generation method and device, electronic equipment and storage medium
CN115114556A (en) Method and device for creating page
CN113438428B (en) Method, apparatus, device and computer-readable storage medium for automated video generation
CN114912046A (en) Method and device for generating page
CN116955740A (en) Document browsing method, device, equipment and storage medium
CN115422272A (en) Graphical structured data identification method, device, equipment and storage medium
CN114780885A (en) Webpage generation method and device, electronic equipment, storage medium and product
CN113705155A (en) Manuscript paper thumbnail generation method, device, equipment, medium and program product
CN113672223A (en) Data display method, device, equipment and storage medium
CN112596833A (en) Webpage screenshot generating method, device, equipment and storage medium
CN118113393A (en) Page generation method, page generation device, electronic equipment and computer readable storage medium
CN115147845A (en) Character segmentation method, training method of character segmentation model and related equipment

Legal Events

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