WO2022100413A1 - 数据处理方法和装置 - Google Patents

数据处理方法和装置 Download PDF

Info

Publication number
WO2022100413A1
WO2022100413A1 PCT/CN2021/125721 CN2021125721W WO2022100413A1 WO 2022100413 A1 WO2022100413 A1 WO 2022100413A1 CN 2021125721 W CN2021125721 W CN 2021125721W WO 2022100413 A1 WO2022100413 A1 WO 2022100413A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
data set
text
model
container type
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.)
Ceased
Application number
PCT/CN2021/125721
Other languages
English (en)
French (fr)
Inventor
张娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to US18/252,647 priority Critical patent/US20250078551A1/en
Publication of WO2022100413A1 publication Critical patent/WO2022100413A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/414Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/158Segmentation of character regions using character size, text spacings or pitch estimation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/19147Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/416Extracting the logical structure, e.g. chapters, sections or page numbers; Identifying elements of the document, e.g. authors

Definitions

  • the embodiments of the present application relate to the field of computer technology, in particular to the field of image recognition technology, and in particular, to a data processing method and apparatus.
  • the floor construction of dynamic pages generally adopts the template configuration method. Users can publish a complete online activity page by selecting a template that meets their needs in the template list area, and then customize the configuration style, data and other information.
  • the source of the template can be the JSON (JavaScript Object Notation, JS Object Notation) file stored locally in the front-end project. The developer performs floor rendering according to the JSON string. Different templates need to create different files for template data storage.
  • the present application provides a data processing method, apparatus, device and storage medium.
  • a data processing method comprising: in response to receiving a page image, annotating the page image, and generating respective image sets corresponding to the annotated data, wherein each image set includes: The first image set used to identify the container type, the second image set used to identify text information, and the third image set used to detect image elements, the page image is generated based on the page template;
  • the image recognition model generates a container type data set corresponding to the first image set, a text data set corresponding to the second image set, and an image element data set corresponding to the third image set, wherein the image recognition model is used to represent the first image set.
  • labeling the page image to generate each image set corresponding to the labeling data includes: labeling the page image to obtain labeling data corresponding to the page image; inputting the labeling data into the location determination model to generate the labeling data corresponding to the page image.
  • the image recognition model is trained by obtaining a training sample set, wherein the training samples in the training sample set include a first image set for recognizing container types and a second image set for recognizing text information , a third image set for detecting image elements, a container type data set corresponding to the first image set, a text data set corresponding to the second image set, and an image element data set corresponding to the third image set; using deep learning method, using the first image set, the second image set and the third image set included in the training samples in the training sample set as input data, and using the container type data set corresponding to the first image set and the text data corresponding to the second image set
  • the set and the image element data set corresponding to the third image set are used as the expected output data, and the image recognition model is obtained by training.
  • the image recognition model includes a container type recognition sub-model, a text recognition sub-model and an element recognition sub-model; each image set is input into the trained image recognition model to generate container type data corresponding to the first image set set, a text data set corresponding to the second image set, and an image element data set corresponding to the third image set, including: inputting the first image set into the container type recognition sub-model, and generating a container type corresponding to the first image set data set, wherein the container type identification sub-model is used to represent the container type determination for each image in the first image set; the second image set is input into the text identification sub-model, and a text data set corresponding to the second image set is generated, wherein , the text recognition sub-model is used to characterize the text detection and text recognition of each image in the second image set; the third image set is input into the element recognition sub-model, and the image element data set corresponding to the third image set is generated, wherein the element The recognition sub-model is used to characterize the detection and recognition of
  • the text recognition sub-model includes a feature extraction sub-model and a text sequence extraction sub-model; the second image set is input into the text recognition sub-model, and the text data set corresponding to the second image set is generated, including: The second image set is input into the feature extraction sub-model, and each feature matrix corresponding to the second image set is obtained, wherein the feature extraction sub-model is constructed based on the convolutional neural network; each feature matrix is input into the text sequence extraction sub-model, and the corresponding feature matrix is obtained.
  • Text sequences corresponding to each feature matrix wherein the text sequence extraction sub-model is constructed based on a recurrent neural network; based on each text sequence, text information corresponding to each text sequence is determined, and a text data set corresponding to each text information is generated.
  • the image recognition model and/or the container type recognition sub-model is constructed based on a deep residual network model.
  • the method before converting the container type data set, the text data set and the image element data set based on the template information of the page to generate the template data set corresponding to the page image, the method further includes: converting the container type data set, The text data set and the image element data set are corrected to obtain the corrected container type data set, text data set and image element data set, wherein the correction is used to characterize the image position, image order and image based on each image in each image set Repeated analysis results, reordering data in container type dataset, text dataset and image element dataset.
  • the correction is done based on a combined process of image scaling, image grayscale, image enhancement, image noise reduction, and image edge detection on each image in the respective image sets.
  • the method before rectifying the container type data set, text data set and image element data set to obtain the corrected container type data set, text data set and image element data set, the method further includes: calibrating each image set Perform content recognition to obtain a first data set corresponding to the first image set, a second data set corresponding to the second image set, and a third data set corresponding to the third image set; according to the first data set, the second data set The comparison results of the container type data set, the third data set and the container type data set, text data set and image element data set, modify the data in the container type data set, text data set and image element data set to obtain the revised container type datasets, text datasets, and image element datasets.
  • the method further includes: generating and displaying a template interface corresponding to the template data set based on the template data set; and/or, optimizing the design scheme of the page template based on the template data set.
  • a data processing device comprising: an annotation unit configured to, in response to receiving a page image, annotate the page image, and generate respective image sets corresponding to the annotation data, wherein, Each image set includes: a first image set for identifying the container type, a second image set for identifying text information, and a third image set for detecting image elements, and the page image is generated based on the page template; be configured to input each image set into the image recognition model obtained by training, and generate a container type data set corresponding to the first image set, a text data set corresponding to the second image set, and an image element data set corresponding to the third image set , wherein the image recognition model is used to characterize container type determination for each image in the first image set, text detection and text recognition for each image in the second image set, and image element detection and recognition for each image in the third image set; conversion; The unit is configured to convert the container type data set, the text data set and the image element data set based on the
  • the labeling unit includes: a labeling module configured to label a page image to obtain labeling data corresponding to the page image; a location generating module configured to input the labeling data into the location determination model, and generate a The location information of each block corresponding to the annotation data, wherein the location determination model is obtained by training the historical related data of the annotation data; the determination module is configured to determine each image set corresponding to the annotation data based on the location information of each block.
  • the image recognition model in the generating unit is obtained by training with the following modules: an acquisition module, configured to acquire a training sample set, wherein the training samples in the training sample set include a first image set used to identify the container type, A second image set for identifying text information, a third image set for detecting image elements, a container type data set corresponding to the first image set, a text data set corresponding to the second image set, and a third image set corresponding to the The corresponding image element data set; the training module is configured to use the deep learning method to use the first image set, the second image set and the third image set included in the training samples in the training sample set as input data, and use the first image set with the first image set.
  • the corresponding container type data set, the text data set corresponding to the second image set, and the image element data set corresponding to the third image set are used as expected output data, and an image recognition model is obtained by training.
  • the image recognition model in the generation unit includes a container type recognition sub-model, a text recognition sub-model and an element recognition sub-model;
  • the generation unit includes: a first generation module configured to input the first set of images to The container type identification sub-model generates a container type data set corresponding to the first image set, wherein the container type identification sub-model is used to represent the container type determination for each image in the first image set;
  • the second generation module is configured to The second image set is input into the text recognition sub-model, and a text data set corresponding to the second image set is generated, wherein the text recognition sub-model is used to characterize the text detection and text recognition of each image in the second image set;
  • the third generation module is configured to input the third image set into the element identification sub-model, and generate the image element data set corresponding to the third image set, wherein the element identification sub-model is used to represent the image element detection and detection of each image in the third image set. identify.
  • the text recognition sub-model in the second generation module includes a feature extraction sub-model and a text sequence extraction sub-model;
  • the second generation module includes: a feature extraction sub-module configured to input the second set of images to The feature extraction sub-model obtains each feature matrix corresponding to the second image set, wherein the feature extraction sub-model is constructed based on the convolutional neural network;
  • the text extraction sub-module is configured to input each feature matrix into the text sequence extraction sub-model , obtain the text sequence corresponding to each feature matrix, wherein, the text sequence extraction sub-model is constructed based on the recurrent neural network;
  • the determination sub-module is configured to determine the text information corresponding to each text sequence based on each text sequence, and generate and Text dataset corresponding to each text information.
  • the image recognition model in the generation unit and/or the container type recognition sub-model in the generation unit is constructed based on a deep residual network model.
  • the apparatus further includes: a rectification unit configured to rectify the container type data set, the text data set and the image element data set to obtain the rectified container type data set, the text data set and the image element data set , where rectification is used to characterize the results of the analysis based on the image position, image order, and image repeatability of each image in each image set, reordering the data in the container type dataset, text dataset, and image element dataset.
  • a rectification unit configured to rectify the container type data set, the text data set and the image element data set to obtain the rectified container type data set, the text data set and the image element data set , where rectification is used to characterize the results of the analysis based on the image position, image order, and image repeatability of each image in each image set, reordering the data in the container type dataset, text dataset, and image element dataset.
  • the rectification in the rectification unit is performed based on a combined process of image scaling, image grayscale, image enhancement, image noise reduction, and image edge detection for each image in the respective image sets.
  • the apparatus further includes: an identification unit configured to perform content identification on each image set to obtain a first data set corresponding to the first image set, a second data set corresponding to the second image set, and a A third data set corresponding to the third image set; a correction unit, configured to compare the first data set, the second data set and the third data set with the container type data set, the text data set and the image element data set according to the comparison results , revise the data in the container type data set, text data set and image element data set to obtain the revised container type data set, text data set and image element data set.
  • an identification unit configured to perform content identification on each image set to obtain a first data set corresponding to the first image set, a second data set corresponding to the second image set, and a A third data set corresponding to the third image set
  • a correction unit configured to compare the first data set, the second data set and the third data set with the container type data set, the text data set and the image element data set according to the comparison results , revise the data in the
  • the apparatus further includes: a display unit, configured to generate and display a template interface corresponding to the template data set based on the template data set; and/or an optimization unit, configured to optimize the page based on the template data set Template design.
  • an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor.
  • the at least one processor executes to enable the at least one processor to perform a method as described in any implementation of the first aspect.
  • the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method described in any implementation manner of the first aspect .
  • annotate the page image in response to receiving a page image, annotate the page image, generate each image set corresponding to the annotated data, input each image set into an image recognition model obtained by training, and generate a corresponding image set corresponding to the first image set.
  • Text detection and text recognition are performed on each image in the second image set, and image element detection and recognition are performed on each image in the third image set.
  • the container type data set, text data set and image element data set are converted to generate Template data set corresponding to the page image, upload the template data set, use image recognition technology, convert the page image into template data, and store the template data in the content distribution network by uploading the data, avoiding the need for templates in the prior art.
  • the number of files increases, the number of files increases linearly, which solves the problems of poor reusability of JSON files and high maintenance costs in the process of page building in the prior art. Accurate positioning of template data and efficient online template creation are realized, freeing the hands of maintenance personnel.
  • the template data set is directly generated by image recognition technology, which saves system development resources and maintenance costs, and improves the flexibility of template construction.
  • FIG. 1 is a schematic diagram of a first embodiment of a data processing method according to the present application.
  • FIG. 2 is a scene diagram in which the data processing method according to the embodiment of the present application can be implemented
  • FIG. 3 is a schematic diagram of a second embodiment of a data processing method according to the present application.
  • FIG. 4 is a schematic structural diagram of an embodiment of a data processing apparatus according to the present application.
  • FIG. 5 is a block diagram of an electronic device used to implement the data processing method of the embodiment of the present application.
  • FIG. 1 shows a schematic diagram 100 of a first embodiment of a data processing method according to the present application.
  • the data processing method includes the following steps:
  • Step 101 in response to receiving the page image, annotate the page image, and generate each image set corresponding to the annotated data.
  • the page image when the execution body (for example, a server or an intelligent terminal) receives a page image through a wired connection or a wireless connection, the page image can be annotated by means of a page crawler, and each image corresponding to the annotated data can be generated. set.
  • the respective image sets may include a first image set for identifying container types, a second image set for identifying textual information, and a third image set for detecting image elements.
  • Page images can be generated based on page templates. Templates can be generated based on floor building of dynamic pages, and image sets can intersect, contain or be the same. Templates are the basic unit for building dynamic pages. The floor display of dynamic pages can be completed by configuring templates. The same template can be reused multiple times on the page.
  • wireless connection methods may include but are not limited to 3G, 4G, 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection currently known or developed in the future connection method.
  • Step 102 Input each image set into the image recognition model obtained by training, and generate a container type data set corresponding to the first image set, a text data set corresponding to the second image set, and image element data corresponding to the third image set set.
  • the execution subject may input each image set into the image recognition model obtained by training, and generate a container type data set corresponding to the first image set, a text data set corresponding to the second image set, and a third image data set corresponding to the first image set.
  • the image recognition model is used to characterize container type determination for each image in the first image set, text detection and text recognition for each image in the second image set, and image element detection and recognition for each image in the third image set.
  • the image recognition model is trained from historical related data of each image set.
  • the image recognition model is obtained by training in the following manner: acquiring a training sample set, wherein the training samples in the training sample set include a first image set used to identify container types, a first image set used to identify text information two image sets, a third image set for detecting image elements, a container type data set corresponding to the first image set, a text data set corresponding to the second image set, and an image element data set corresponding to the third image set;
  • the first image set, the second image set and the third image set included in the training samples in the training sample set are used as input data
  • the container type data set corresponding to the first image set and the container type data set corresponding to the second image set are used as input data.
  • the text data set and the image element data set corresponding to the third image set are used as the expected output data, and the image recognition model is obtained by training.
  • Step 103 based on the template information of the page, convert the container type data set, the text data set and the image element data set, generate a template data set corresponding to the page image, and upload the template data set.
  • the execution body can use the data conversion method to convert the container type data set, text data set and image element data set based on the template information of the page, generate a template data set corresponding to the page image, and upload the template data set.
  • the transformation transforms container-type datasets, text datasets, and image-element datasets based on specific language structures, such as converting container-type datasets, text datasets, and image-element datasets into domain-specific language (DSL) , realize data unification, and upload the unified data to Content Delivery Network (CDN) for content storage, so as to update and maintain through the visual construction interface.
  • DSL domain-specific language
  • the data processing method 200 of this embodiment runs in the service platform 201 .
  • the service platform 201 receives the page image, it annotates the page image to generate each image set 202 corresponding to the labeled data, and then the service platform 201 inputs each image set into the image recognition model obtained by training, and generates a set of images corresponding to the first image set.
  • the corresponding container type data set, the text data set corresponding to the second image set, and the image element data set 203 corresponding to the third image set then the service platform 201 based on the template information of the page, Convert with the image element data set, generate a template data set corresponding to the page image, and upload the template data set 204 .
  • each image set includes: a first image set for identifying container types, a second image set for identifying text information, and a third image set for detecting image elements, and the page image is generated based on a page template.
  • the image recognition model is used to characterize container type determination for each image in the first image set, text detection and text recognition for each image in the second image set, and image element detection and recognition for each image in the third image set.
  • the data processing method provided by the above-mentioned embodiments of the present application adopts, in response to receiving a page image, annotates the page image, generates each image set corresponding to the annotated data, inputs each image set into the image recognition model obtained by training, and generates a A container type data set corresponding to the first image set, a text data set corresponding to the second image set, and an image element data set corresponding to the third image set, wherein the image recognition model is used to represent the image recognition model in the first image set.
  • Container type determination, text detection and text recognition for each image in the second image set, image element detection and recognition for each image in the third image set, based on page template information, container type data set, text data set and image elements Convert the data set to generate a template data set corresponding to the page image, upload the template data set, use the image recognition technology to convert the page image into template data, and store the template data in the content distribution network by uploading the data, avoiding existing problems.
  • the template demand increases, the number of files increases linearly, which solves the problems of poor reusability of JSON files and high maintenance costs in the page building process in the prior art. Accurate positioning of template data and efficient online template creation are realized, freeing the hands of maintenance personnel.
  • the template data set is directly generated by image recognition technology, which saves system development resources and maintenance costs, and improves the flexibility of template construction.
  • FIG. 300 a schematic diagram 300 of a second embodiment of a data processing method is shown.
  • the flow of the method includes the following steps:
  • Step 301 in response to receiving the page image, annotate the page image, and generate each image set corresponding to the annotated data.
  • annotating a page image to generate each image set corresponding to the annotation data includes: annotating the page image to obtain the annotation data corresponding to the page image; inputting the annotation data To the location determination model, the location information of each block corresponding to the annotation data is generated, wherein the location determination model is obtained by training the historical related data of the annotation data; based on the location information of each block, each image set corresponding to the annotation data is determined .
  • the location determination model can use the readability of the content analysis algorithm to calculate the most likely block location information according to the different weights of the labeled data. Using this method, the positioning of the effective block can achieve a more accurate effect.
  • Step 302 Input the first image set into the container type recognition sub-model, generate a container type data set corresponding to the first image set, input the second image set into the text recognition sub-model, and generate text corresponding to the second image set Data set, the third image set is input into the element recognition sub-model, and the image element data set corresponding to the third image set is generated.
  • the image recognition model may include a container type recognition sub-model, a text recognition sub-model, and an element recognition sub-model.
  • the execution body can input the first image set into the container type recognition sub-model, generate a container type data set corresponding to the first image set, input the second image set into the text recognition sub-model, and generate text corresponding to the second image set Data set, the third image set is input into the element recognition sub-model, and the image element data set corresponding to the third image set is generated.
  • the container type recognition sub-model is used to characterize the container type determination of each image in the first image set
  • the text recognition sub-model is used to characterize the text detection and text recognition of each image in the second image set
  • the element recognition sub-model is used to represent the first image set.
  • Each image in the three-image set is subjected to image element detection and recognition.
  • the image recognition model and the container type recognition sub-model are constructed based on the deep residual network model.
  • Deep residual network (ResNet) is used to solve the obvious degradation problem of neural network performance with the increase of depth.
  • the text recognition sub-model includes a feature extraction sub-model and a text sequence extraction sub-model; the second image set is input into the text recognition sub-model to generate text corresponding to the second image set
  • the data set includes: inputting the second image set into the feature extraction sub-model to obtain each feature matrix corresponding to the second image set, wherein the feature extraction sub-model is constructed based on the convolutional neural network; inputting each feature matrix into the text
  • the sequence extraction sub-model obtains the text sequence corresponding to each feature matrix, wherein the text sequence extraction sub-model is constructed based on the recurrent neural network; based on each text sequence, the text information corresponding to each text sequence is determined, and the text information corresponding to each text sequence is generated.
  • the corresponding text dataset includes a feature extraction sub-model and a text sequence extraction sub-model; the second image set is input into the text recognition sub-model to generate text corresponding to the second image set
  • the data set includes: inputting the second image set into the feature extraction sub-model to obtain each feature matrix
  • the text recognition uses the convolutional neural network CNN algorithm for feature extraction. Through the pooling operation, the image rotation and local subtle changes are overcome, and then the recurrent neural network RNN is used to predict the label segmentation and model the changes in the time series. , to transmit the serialized message, and finally use the sequence loss function (Connectionist Temporal Classification, CTC loss) as the objective function optimization.
  • CTC loss is a loss function in the sequence labeling problem, which is mainly used to deal with the input and output label alignment problem in the sequence labeling problem.
  • Step 303 Correct the container type data set, text data set and image element data set to obtain the corrected container type data set, text data set and image element data set.
  • the execution subject can correct the container type data set, text data set and image element data set, and obtain the corrected container type data set, text data set and image element data set. Correction is used to characterize the results of the analysis based on the image position, image order, and image repeatability of each image in the various image sets, reordering the data in the container type dataset, text dataset, and image element dataset. By detecting and correcting the data after positioning and identification, the accuracy of the data is improved.
  • the execution subject can measure the image elements in the respective image sets based on the morphological transformation method to obtain the outline information of the element frame; use the position correction method to correct the outline information of the element frame; Aligning the contour information of the corrected element frame, wherein the alignment represents aligning the abscissa and/or ordinate of the element frame; reordering the aligned element frame to obtain a sorting
  • the latter container type dataset, text dataset and image element dataset.
  • the correction is performed based on a combination of image scaling, image grayscale, image enhancement, image noise reduction, and image edge detection for each image in each image set. It should be noted that the above-mentioned various image processing methods are well-known technologies that are widely researched and applied at present, and are not repeated here. The combined use and parameter setting of the correction formula are obtained by the developers through practice, which improves the efficiency and accuracy of the system.
  • the container type data set, text data set and image element data set before correcting the container type data set, text data set and image element data set to obtain the corrected container type data set, text data set and image element data set, It also includes: performing content recognition on each image set through a content recognition method to obtain a first data set corresponding to the first image set, a second data set corresponding to the second image set, and a third image set corresponding to the third image set. Data set; according to the comparison results of the first data set, the second data set and the third data set with the container type data set, text data set and image element data set, compare the container type data set, text data set and image element data set.
  • the centralized data is corrected to obtain the corrected container type dataset, text dataset and image element dataset.
  • Step 304 based on the template information of the page, convert the container type data set, the text data set and the image element data set, generate a template data set corresponding to the page image, and upload the template data set.
  • the method further includes: based on the template data set, generating and displaying a template interface corresponding to the template data set. It realizes the cross-front-end application of building fast and flexible active templates.
  • the method further includes: optimizing the design scheme of the page template based on the template data set. Realize the online configuration ability of template production by mixing and matching template styles and template data, realize the ability to provide better template solutions for existing online pages, and further improve the conversion rate of products.
  • steps 301 and 304 are basically the same as the operations of steps 101 and 103 in the embodiment shown in FIG. 1 , and details are not repeated here.
  • the schematic diagram 300 of the data processing method in this embodiment adopts the method of inputting the first image set into the container type identification sub-model, and generates a data corresponding to the first image set.
  • the container type data set of Image element data set correct the container type data set, text data set and image element data set to obtain the corrected container type data set, text data set and image element data set, and obtain the container type data set, text data set and image element data set based on different models respectively.
  • Text datasets and image element datasets make data processing more accurate and pertinent. Residual network design models are used to solve the problem of model disappearance and improve the accuracy of model training.
  • the present application provides an embodiment of a data processing apparatus.
  • the apparatus embodiment corresponds to the method embodiment shown in FIG. 1 .
  • the apparatus Specifically, it can be applied to various electronic devices.
  • the data processing apparatus 400 of this embodiment includes: a labeling unit 401, a generating unit 402 and a converting unit 403, wherein the labeling unit is configured to label the page image in response to receiving the page image, and generate Each image set corresponding to the labeling data, wherein each image set includes: a first image set used to identify container types, a second image set used to identify text information, and a third image set used to detect image elements.
  • the image is generated based on the page template; the generating unit is configured to input each image set into the image recognition model obtained by training, and generate a container type data set corresponding to the first image set, a text data set corresponding to the second image set, and The image element data set corresponding to the third image set, wherein the image recognition model is used to represent the container type determination for each image in the first image set, the text detection and text recognition for each image in the second image set, and the third image set.
  • the image elements are detected and identified in a centralized manner; the conversion unit is configured to convert the container type data set, text data set and image element data set based on the template information of the page, and generate a template data set corresponding to the page image, and Upload template datasets, where the transform transforms container type datasets, text datasets, and image element datasets based on specific language constructs.
  • the labeling unit includes: a labeling module configured to label a page image to obtain labeling data corresponding to the page image; a location generating module configured to input the labeling data To the location determination model, the location information of each block corresponding to the marked data is generated, wherein the location determination model is obtained by training the historically related data of the marked data; the determination module is configured to determine and label based on the location information of each block Each image set corresponding to the data.
  • the image recognition model in the generating unit is obtained by training with the following modules: an acquisition module, configured to acquire a training sample set, wherein the training samples in the training sample set include a container for identifying a container Type first image set, second image set for identifying text information, third image set for detecting image elements, container type data set corresponding to the first image set, text data corresponding to the second image set set and the image element data set corresponding to the third image set; the training module is configured to use the deep learning method to use the first image set, the second image set and the third image set included in the training samples in the training sample set as input data , using the container type data set corresponding to the first image set, the text data set corresponding to the second image set, and the image element data set corresponding to the third image set as expected output data, and training to obtain an image recognition model.
  • an acquisition module configured to acquire a training sample set, wherein the training samples in the training sample set include a container for identifying a container Type first image set, second image set for identifying text information, third
  • the image recognition model in the generation unit includes a container type recognition sub-model, a text recognition sub-model, and an element recognition sub-model;
  • the generation unit includes: a first generation module configured to The first image set is input into the container type identification sub-model, and a container type data set corresponding to the first image set is generated, wherein the container type identification sub-model is used to represent the container type determination for each image in the first image set;
  • the second The generation module is configured to input the second image set into the text recognition sub-model, and generate a text data set corresponding to the second image set, wherein the text recognition sub-model is used to characterize the text detection and detection of each image in the second image set.
  • a third generation module configured to input the third image set into the element identification sub-model, and generate an image element data set corresponding to the third image set, wherein the element identification sub-model is used to characterize the third image set
  • Each image is subjected to image element detection and recognition.
  • the text recognition sub-model in the second generation module includes a feature extraction sub-model and a text sequence extraction sub-model;
  • the second generation module includes: a feature extraction sub-module, which is configured to The second image set is input into the feature extraction sub-model, and each feature matrix corresponding to the second image set is obtained, wherein the feature extraction sub-model is constructed based on the convolutional neural network;
  • the text extraction sub-module is configured to Input into the character sequence extraction sub-model, and obtain character sequences corresponding to each feature matrix, wherein the character sequence extraction sub-model is constructed based on a recurrent neural network;
  • the determination sub-module is configured to determine the correspondence with each character sequence based on each character sequence text information, and generate a text data set corresponding to each text information.
  • the image recognition model in the generation unit and/or the container type recognition sub-model in the generation unit is constructed based on the deep residual network model.
  • the apparatus further includes: a correction unit, configured to correct the container type data set, the text data set and the image element data set to obtain the corrected container type data set, text data set, and image element data set. datasets and image element datasets, where corrections are used to characterize the results of the analysis based on image position, image order, and image repeatability for each image in the respective image sets, and the container type datasets, text datasets, and image element datasets Data is reordered.
  • a correction unit configured to correct the container type data set, the text data set and the image element data set to obtain the corrected container type data set, text data set, and image element data set.
  • the correction in the correction unit is completed based on the combined processing of image scaling, image grayscale, image enhancement, image noise reduction and image edge detection for each image in each image set .
  • the apparatus further includes: an identification unit configured to perform content identification on each image set to obtain a first data set corresponding to the first image set and a first data set corresponding to the second image set The second data set and the third data set corresponding to the third image set; the correction unit is configured to be based on the first data set, the second data set and the third data set and the container type data set, the text data set and the image According to the comparison result of the element data set, the data in the container type data set, text data set and image element data set are corrected to obtain the revised container type data set, text data set and image element data set.
  • the apparatus further includes: a display unit, configured to generate and display a template interface corresponding to the template data set based on the template data set; and/or an optimization unit, configured to Based on the template data set, optimize the design scheme of the page template.
  • the present application further provides an electronic device and a readable storage medium.
  • FIG. 5 it is a block diagram of an electronic device according to the data processing method of the embodiment 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, mainframe computers, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the application described and/or claimed herein.
  • the electronic device includes: one or more processors 501, a memory 502, and interfaces for connecting various components, including a high-speed interface and a low-speed interface.
  • the various components are interconnected using different buses and may be mounted on a common motherboard or otherwise as desired.
  • the processor may process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface.
  • multiple processors and/or multiple buses may be used with multiple memories and multiple memories, if desired.
  • multiple electronic devices may be connected, each providing some of the necessary operations (eg, as a server array, a group of blade servers, or a multiprocessor system).
  • a processor 501 is taken as an example in FIG. 5 .
  • the memory 502 is the non-transitory computer-readable storage medium provided by the present application.
  • the memory stores instructions executable by at least one processor, so that the at least one processor executes the data processing method provided by the present application.
  • the non-transitory computer-readable storage medium of the present application stores computer instructions for causing the computer to execute the data processing method provided by the present application.
  • the memory 502 can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the data processing methods in the embodiments of the present application (for example, appendix).
  • the processor 501 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions and modules stored in the memory 502, ie, implements the data processing methods in the above method embodiments.
  • the memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the data processing electronic device, and the like. Additionally, memory 502 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 502 may optionally include memory located remotely from processor 501 that may be connected to the data processing electronics via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the electronic device of the data processing method may further include: an input device 503 and an output device 504 .
  • the processor 501 , the memory 502 , the input device 503 and the output device 504 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 5 .
  • Input device 503 may receive input numerical or character information, and generate key signal input related to user settings and functional control of data processing electronics, such as a touch screen, keypad, mouse, trackpad, touchpad, pointing stick, an or Multiple input devices such as mouse buttons, trackballs, joysticks, etc.
  • the output device 504 may include a display device, auxiliary lighting devices (eg, LEDs), haptic feedback devices (eg, vibration motors), and the like.
  • the display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
  • Various implementations of the systems and techniques described herein can be implemented in digital electronic circuitry, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor that The processor, which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.
  • the processor which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.
  • machine-readable medium and “computer-readable medium” refer to any computer program product, apparatus, and/or apparatus for providing machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memories, programmable logic devices (PLDs), including machine-readable media that receive machine instructions as machine-readable signals.
  • machine-readable signal refers to any signal used to provide machine instructions and/or data to a programmable processor.
  • the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer.
  • a display device eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and pointing device eg, a mouse or trackball
  • Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.
  • the systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user's computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
  • the components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
  • a computer system can include clients and servers.
  • Clients and servers are generally remote from each other and usually interact through a communication network.
  • the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
  • the technical solution according to the embodiment of the present application adopts, in response to receiving the page image, annotating the page image, generating each image set corresponding to the annotated data, inputting each image set into the image recognition model obtained by training, and generating the first image corresponding to the first image.
  • Convert generate a template data set corresponding to the page image, upload the template data set, use the image recognition technology to convert the page image into template data, and store the template data in the content distribution network by uploading the data, avoiding the conventional technology.
  • the number of files increases linearly, which solves the problems of poor reusability of JSON files and high maintenance costs in the process of page building in the prior art.
  • Accurate positioning of template data and efficient online template creation are realized, freeing the hands of maintenance personnel.
  • the template data set is directly generated by image recognition technology, which saves system development resources and maintenance costs, and improves the flexibility of template construction.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Molecular Biology (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Biophysics (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Image Analysis (AREA)
  • Character Discrimination (AREA)

Abstract

本申请公开了数据处理方法和装置,具体实现方案为:响应于接收到页面图像,对页面图像进行标注,生成与标注数据对应的各个图像集,各个图像集包括:用于识别容器类型的第一图像集、用于识别文本信息的第二图像集和用于检测图像元素的第三图像集,页面图像基于页面模板而生成;将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集;基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集并上传。该方案利用图像识别技术,将页面图像转化为模板数据,实现了模板数据的精准定位。

Description

数据处理方法和装置
本专利申请要求于2020年11月12提交的、申请号为202011261210.8、发明名称为“数据处理方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。
技术领域
本申请的实施例涉及计算机技术领域,具体涉及图像识别技术领域,尤其涉及数据处理方法和装置。
背景技术
随着网络的快速发展,人们通过浏览网页的形式交互访问各类网站的行为越来越普遍,因而对页面搭建的要求越来越高。目前动态页面的楼层搭建一般采用模板配置方式,用户通过在模板列表区选择符合需求的模板,再自定义配置样式、数据等信息,从而发布一个完整的线上活动页面。模板来源可以为前端项目本地存储的JSON(JavaScript Object Notation,JS对象简谱)文件,开发人员根据JSON串进行楼层渲染,不同的模板需要创建不同的文件进行模板数据存储。
发明内容
本申请提供了一种数据处理方法、装置、设备以及存储介质。
根据本申请的第一方面,提供了一种数据处理方法,该方法包括:响应于接收到页面图像,对页面图像进行标注,生成与标注数据对应的各个图像集,其中,各个图像集包括:用于识别容器类型的第一图像集、用于识别文本信息的第二图像集和用于检测图像元素的第三图像集,页面图像基于页面模板而生成;将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集,其中,图像识别模型用于表征对 第一图像集中各个图像进行容器类型判定、对第二图像集中各个图像进行文字检测和文本识别、对第三图像集中各个图像进行图像元素检测和识别;基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集,并上传模板数据集,其中,转换基于特定语言结构对容器类型数据集、文本数据集和图像元素数据集进行转换。
在一些实施例中,对页面图像进行标注,生成与标注数据对应的各个图像集,包括:对页面图像进行标注,得到与页面图像对应的标注数据;将标注数据输入至位置确定模型,生成与标注数据对应的各个区块的位置信息,其中,位置确定模型由标注数据的历史相关数据训练得到;基于各个区块的位置信息,确定与标注数据对应的各个图像集。
在一些实施例中,图像识别模型通过如下方式训练得到:获取训练样本集,其中,训练样本集中的训练样本包括用于识别容器类型的第一图像集、用于识别文本信息的第二图像集、用于检测图像元素的第三图像集、与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集;利用深度学习方法,将训练样本集中训练样本包括的第一图像集、第二图像集和第三图像集作为输入数据,将与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集作为期望输出数据,训练得到图像识别模型。
在一些实施例中,图像识别模型包括容器类型识别子模型、文本识别子模型和元素识别子模型;将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集,包括:将第一图像集输入至容器类型识别子模型,生成与第一图像集对应的容器类型数据集,其中,容器类型识别子模型用于表征对第一图像集中各个图像进行容器类型判定;将第二图像集输入至文本识别子模型,生成与第二图像集对应的文本数据集,其中,文本识别子模型用于表征对第二图像集中各个图像进行文字检测和文本识别;将第三图像集输入至元素识别子模型,生成与第三图像集 对应的图像元素数据集,其中,元素识别子模型用于表征对第三图像集中各个图像进行图像元素检测和识别。
在一些实施例中,文本识别子模型包括特征提取子模型和文字序列提取子模型;将第二图像集输入至文本识别子模型,生成与第二图像集对应的文本数据集,包括:将第二图像集输入至特征提取子模型,得到与第二图像集对应的各个特征矩阵,其中,特征提取子模型基于卷积神经网络而构建;将各个特征矩阵输入至文字序列提取子模型,得到与各个特征矩阵对应的文字序列,其中,文字序列提取子模型基于递归神经网络而构建;基于各个文字序列,确定与各个文字序列对应的文本信息,并生成与各个文本信息对应的文本数据集。
在一些实施例中,图像识别模型和/或容器类型识别子模型基于深度残差网络模型而构建。
在一些实施例中,在基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集之前,还包括:对容器类型数据集、文本数据集和图像元素数据集进行矫正,得到矫正后的容器类型数据集、文本数据集和图像元素数据集,其中,矫正用于表征基于各个图像集中每个图像的图像位置、图像顺序和图像重复性的分析结果,将容器类型数据集、文本数据集和图像元素数据集中的数据进行重新排序。
在一些实施例中,矫正基于对各个图像集中每个图像进行图像缩放、图像灰度化、图像增强、图像降噪和图像边缘检测的组合处理而完成。
在一些实施例中,在对容器类型数据集、文本数据集和图像元素数据集进行矫正,得到矫正后的容器类型数据集、文本数据集和图像元素数据集之前,还包括:对各个图像集进行内容识别,得到与第一图像集对应的第一数据集、与第二图像集对应的第二数据集和与第三图像集对应的第三数据集;根据第一数据集、第二数据集和第三数据集与容器类型数据集、文本数据集和图像元素数据集的比对结果,对容器类型数据集、文本数据集和图像元素数据集中的数据进行修正,得到修正后的容器类型数据集、文本数据集和图像元素数据集。
在一些实施例中,方法还包括:基于模板数据集,生成与模板数据集对应的模板界面并展示;和/或,基于模板数据集,优化页面模板的设计方案。
根据本申请的第二方面,提供了一种数据处理装置,装置包括:标注单元,被配置成响应于接收到页面图像,对页面图像进行标注,生成与标注数据对应的各个图像集,其中,各个图像集包括:用于识别容器类型的第一图像集、用于识别文本信息的第二图像集和用于检测图像元素的第三图像集,页面图像基于页面模板而生成;生成单元,被配置成将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集,其中,图像识别模型用于表征对第一图像集中各个图像进行容器类型判定、对第二图像集中各个图像进行文字检测和文本识别、对第三图像集中各个图像进行图像元素检测和识别;转换单元,被配置成基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集,并上传模板数据集,其中,转换基于特定语言结构对容器类型数据集、文本数据集和图像元素数据集进行转换。
在一些实施例中,标注单元,包括:标注模块,被配置成对页面图像进行标注,得到与页面图像对应的标注数据;位置生成模块,被配置成将标注数据输入至位置确定模型,生成与标注数据对应的各个区块的位置信息,其中,位置确定模型由标注数据的历史相关数据训练得到;确定模块,被配置成基于各个区块的位置信息,确定与标注数据对应的各个图像集。
在一些实施例中,生成单元中的图像识别模型利用如下模块训练得到:获取模块,被配置成获取训练样本集,其中,训练样本集中的训练样本包括用于识别容器类型的第一图像集、用于识别文本信息的第二图像集、用于检测图像元素的第三图像集、与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集;训练模块,被配置成利用深度学习方法,将训练样本集中训练样本包括的第一图像集、第二图像集和第三图像集作为输入数据,将与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应 的图像元素数据集作为期望输出数据,训练得到图像识别模型。
在一些实施例中,生成单元中的图像识别模型包括容器类型识别子模型、文本识别子模型和元素识别子模型;生成单元,包括:第一生成模块,被配置成将第一图像集输入至容器类型识别子模型,生成与第一图像集对应的容器类型数据集,其中,容器类型识别子模型用于表征对第一图像集中各个图像进行容器类型判定;第二生成模块,被配置成将第二图像集输入至文本识别子模型,生成与第二图像集对应的文本数据集,其中,文本识别子模型用于表征对第二图像集中各个图像进行文字检测和文本识别;第三生成模块,被配置成将第三图像集输入至元素识别子模型,生成与第三图像集对应的图像元素数据集,其中,元素识别子模型用于表征对第三图像集中各个图像进行图像元素检测和识别。
在一些实施例中,第二生成模块中的文本识别子模型包括特征提取子模型和文字序列提取子模型;第二生成模块,包括:特征提取子模块,被配置成将第二图像集输入至特征提取子模型,得到与第二图像集对应的各个特征矩阵,其中,特征提取子模型基于卷积神经网络而构建;文字提取子模块,被配置成将各个特征矩阵输入至文字序列提取子模型,得到与各个特征矩阵对应的文字序列,其中,文字序列提取子模型基于递归神经网络而构建;确定子模块,被配置成基于各个文字序列,确定与各个文字序列对应的文本信息,并生成与各个文本信息对应的文本数据集。
在一些实施例中,生成单元中的图像识别模型和/或生成单元中的容器类型识别子模型基于深度残差网络模型而构建。
在一些实施例中,装置还包括:矫正单元,被配置成对容器类型数据集、文本数据集和图像元素数据集进行矫正,得到矫正后的容器类型数据集、文本数据集和图像元素数据集,其中,矫正用于表征基于各个图像集中每个图像的图像位置、图像顺序和图像重复性的分析结果,将容器类型数据集、文本数据集和图像元素数据集中的数据进行重新排序。
在一些实施例中,矫正单元中的矫正基于对各个图像集中每个图像进行图像缩放、图像灰度化、图像增强、图像降噪和图像边缘检测的组合处理而完成。
在一些实施例中,装置还包括:识别单元,被配置成对各个图像集进行内容识别,得到与第一图像集对应的第一数据集、与第二图像集对应的第二数据集和与第三图像集对应的第三数据集;修正单元,被配置成根据第一数据集、第二数据集和第三数据集与容器类型数据集、文本数据集和图像元素数据集的比对结果,对容器类型数据集、文本数据集和图像元素数据集中的数据进行修正,得到修正后的容器类型数据集、文本数据集和图像元素数据集。
在一些实施例中,装置还包括:展示单元,被配置成基于模板数据集,生成与模板数据集对应的模板界面并展示;和/或,优化单元,被配置成基于模板数据集,优化页面模板的设计方案。
根据本申请的第三方面,提供了一种电子设备,包括:至少一个处理器;以及与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行如第一方面中任一实现方式描述的方法。
根据本申请的第四方面,本申请提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,计算机指令用于使计算机执行如第一方面中任一实现方式描述的方法。
根据本申请的技术采用响应于接收到页面图像,对页面图像进行标注,生成与标注数据对应的各个图像集,将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集,其中,图像识别模型用于表征对第一图像集中各个图像进行容器类型判定、对第二图像集中各个图像进行文字检测和文本识别、对第三图像集中各个图像进行图像元素检测和识别,基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集,并上传模板数据集,利用图像识别技术,将页面图像转化为模板数据并通过上传数据将模板数据存储于内容分发网络,避免了现有技术中随着模板需求增多,文件数量线性递增的情况,解决了现有技术中JSON文件复用性差、在页面搭建过程中维护成本过高的问题。实现了模板数据的精准定位以及高效的模板线上化,解放了维护人员的双手。通过图像识别技术直接生成模板 数据集,节省了系统的开发资源和维护成本,提高了模板搭建的灵活性。
应当理解,本部分所描述的内容并非旨在标识本申请的实施例的关键或重要特征,也不用于限制本申请的范围。本申请的其它特征将通过以下的说明书而变得容易理解。
附图说明
附图用于更好地理解本方案,不构成对本申请的限定。
图1是根据本申请的数据处理方法的第一实施例的示意图;
图2是可以实现本申请实施例的数据处理方法的场景图;
图3是根据本申请的数据处理方法的第二实施例的示意图;
图4是根据本申请的数据处理装置的一个实施例的结构示意图;
图5是用来实现本申请实施例的数据处理方法的电子设备的框图。
具体实施方式
以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1示出了根据本申请的数据处理方法的第一实施例的示意图100。该数据处理方法,包括以下步骤:
步骤101,响应于接收到页面图像,对页面图像进行标注,生成与标注数据对应的各个图像集。
在本实施例中,当执行主体(例如服务器或智能终端)通过有线连接或无线连接的方式接收到页面图像时,可以通过页面爬虫的方式对页面图像进行标注,生成与标注数据对应的各个图像集。各个图像集可以包括:用于识别容器类型的第一图像集、用于识别文本信息的第二图像集和用于检测图像元素的第三图像集。页面图像可以基于页面模板而生成。模板可 以基于动态页面的楼层搭建而生成,图像集可以相互交叉、包含或相同。模板作为搭建动态页面的基本单位,通过配置模板可以完成动态页面楼层展示,同一模板可以在页面复用多次。需要指出的是,上述无线连接方式可以包括但不限于3G、4G、5G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。
步骤102,将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集。
在本实施例中,执行主体可以将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集。图像识别模型用于表征对第一图像集中各个图像进行容器类型判定、对第二图像集中各个图像进行文字检测和文本识别、对第三图像集中各个图像进行图像元素检测和识别。所述图像识别模型由各个图像集的历史相关数据训练得到。
在一些可选的实现方式中,图像识别模型通过如下方式训练得到:获取训练样本集,其中,训练样本集中的训练样本包括用于识别容器类型的第一图像集、用于识别文本信息的第二图像集、用于检测图像元素的第三图像集、与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集;利用深度学习方法,将训练样本集中训练样本包括的第一图像集、第二图像集和第三图像集作为输入数据,将与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集作为期望输出数据,训练得到图像识别模型。利用深度学习技术进行模型训练,使模型预测更加准确而全面。
步骤103,基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集,并上传模板数据集。
在本实施例中,执行主体可以基于页面的模板信息,利用数据转换方法对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页 面图像对应的模板数据集,并上传模板数据集。转换基于特定语言结构对容器类型数据集、文本数据集和图像元素数据集进行转换,例如将容器类型数据集、文本数据集和图像元素数据集转化为领域特定语言(Domain-specific language,DSL),实现数据统一化,并统一后的数据上传内容发布网络(Content Delivery Network,CDN)进行内容存储,以便通过可视化搭建界面进行更新和维护。
需要说明的是,技术人员可以根据实际需求,自行设定上述图像识别模型的模型结构,本公开的实施例对此不做限定。
继续参见图2,本实施例的数据处理方法200运行于服务平台201中。当服务平台201接收到页面图像后,对页面图像进行标注,生成与标注数据对应的各个图像集202,然后服务平台201将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集203,接着服务平台201基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集,并上传模板数据集204。其中,各个图像集包括:用于识别容器类型的第一图像集、用于识别文本信息的第二图像集和用于检测图像元素的第三图像集,页面图像基于页面模板而生成。图像识别模型用于表征对第一图像集中各个图像进行容器类型判定、对第二图像集中各个图像进行文字检测和文本识别、对第三图像集中各个图像进行图像元素检测和识别。
本申请的上述实施例提供的数据处理方法采用响应于接收到页面图像,对页面图像进行标注,生成与标注数据对应的各个图像集,将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集,其中,图像识别模型用于表征对第一图像集中各个图像进行容器类型判定、对第二图像集中各个图像进行文字检测和文本识别、对第三图像集中各个图像进行图像元素检测和识别,基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集,并上传模板数据集,利用图像识别技术,将页面图像转化为模板数据并通过上传数据将模板数据存储于内容分发网络,避免了现 有技术中随着模板需求增多,文件数量线性递增的情况,解决了现有技术中JSON文件复用性差、在页面搭建过程中维护成本过高的问题。实现了模板数据的精准定位以及高效的模板线上化,解放了维护人员的双手。通过图像识别技术直接生成模板数据集,节省了系统的开发资源和维护成本,提高了模板搭建的灵活性。
进一步参考图3,其示出了数据处理方法的第二实施例的示意图300。该方法的流程包括以下步骤:
步骤301,响应于接收到页面图像,对页面图像进行标注,生成与标注数据对应的各个图像集。
在本实施例的一些可选的实现方式中,对页面图像进行标注,生成与标注数据对应的各个图像集,包括:对页面图像进行标注,得到与页面图像对应的标注数据;将标注数据输入至位置确定模型,生成与标注数据对应的各个区块的位置信息,其中,位置确定模型由标注数据的历史相关数据训练得到;基于各个区块的位置信息,确定与标注数据对应的各个图像集。位置确定模型可以为利用内容分析算法readability,根据标注数据权重的不同计算最有可能的区块位置信息。利用此方法使有效区块的定位达到更为精准的效果。
步骤302,将第一图像集输入至容器类型识别子模型,生成与第一图像集对应的容器类型数据集,将第二图像集输入至文本识别子模型,生成与第二图像集对应的文本数据集,将第三图像集输入至元素识别子模型,生成与第三图像集对应的图像元素数据集。
在本实施中,图像识别模型可以包括容器类型识别子模型、文本识别子模型和元素识别子模型。执行主体可以将第一图像集输入至容器类型识别子模型,生成与第一图像集对应的容器类型数据集,将第二图像集输入至文本识别子模型,生成与第二图像集对应的文本数据集,将第三图像集输入至元素识别子模型,生成与第三图像集对应的图像元素数据集。容器类型识别子模型用于表征对第一图像集中各个图像进行容器类型判定,文本识别子模型用于表征对第二图像集中各个图像进行文字检测和文本识别,元素识别子模型用于表征对第三图像集中各个图像进行图像元素检测 和识别。图像识别模型和容器类型识别子模型基于深度残差网络模型而构建。深度残差网络(Deep residual network,ResNet)用于解决神经网络性能随着深度的增加出现明显的退化问题。
在本实施例的一些可选的实现方式中,文本识别子模型包括特征提取子模型和文字序列提取子模型;将第二图像集输入至文本识别子模型,生成与第二图像集对应的文本数据集,包括:将第二图像集输入至特征提取子模型,得到与第二图像集对应的各个特征矩阵,其中,特征提取子模型基于卷积神经网络而构建;将各个特征矩阵输入至文字序列提取子模型,得到与各个特征矩阵对应的文字序列,其中,文字序列提取子模型基于递归神经网络而构建;基于各个文字序列,确定与各个文字序列对应的文本信息,并生成与各个文本信息对应的文本数据集。文本识别采用卷积神经网络CNN算法进行特征提取,通过池化操作,克服了图像旋转和局部的细微变化,再根据递归神经网络RNN进行预测标签分部,对时间序列上的的变化进行建模,以此传递序列化消息,最后利用序列损失函数(Connectionist Temporal Classification,CTC loss)作为目标函数优化。CTC loss为序列标注问题中的一种损失函数,主要用于处理序列标注问题中的输入与输出标签对齐问题。
步骤303,对容器类型数据集、文本数据集和图像元素数据集进行矫正,得到矫正后的容器类型数据集、文本数据集和图像元素数据集。
在本实施中,执行主体可以对容器类型数据集、文本数据集和图像元素数据集进行矫正,得到矫正后的容器类型数据集、文本数据集和图像元素数据集。矫正用于表征基于各个图像集中每个图像的图像位置、图像顺序和图像重复性的分析结果,将容器类型数据集、文本数据集和图像元素数据集中的数据进行重新排序。通过对定位及识别后的数据进行检测和矫正,提高了数据的精准度。
进一步举例说明,执行主体可以基于形态学变换方法,对所述各个图像集中的图像元素进行测量,得到所述元素框的轮廓信息;利用位置矫正方法,对所述元素框的轮廓信息进行矫正;对矫正后的所述元素框的轮廓信息进行对齐,其中,所述对齐表征对所述元素框的横坐标和/或纵坐标进 行对齐;对对齐后的所述元素框进行重新排序,得到排序后的容器类型数据集、文本数据集和图像元素数据集。
在本实施例的一些可选的实现方式中,矫正基于对各个图像集中每个图像进行图像缩放、图像灰度化、图像增强、图像降噪和图像边缘检测的组合处理而完成。需要说明的是,上述各种图像处理方法是目前广泛研究和应用的公知技术,在此不再赘述。矫正公式的组合使用及参数设定是开发人员经实践得出的,提高了系统效率和精准度。
在本实施例的一些可选的实现方式中,在对容器类型数据集、文本数据集和图像元素数据集进行矫正,得到矫正后的容器类型数据集、文本数据集和图像元素数据集之前,还包括:通过内容识别方法,对各个图像集进行内容识别,得到与第一图像集对应的第一数据集、与第二图像集对应的第二数据集和与第三图像集对应的第三数据集;根据第一数据集、第二数据集和第三数据集与容器类型数据集、文本数据集和图像元素数据集的比对结果,对容器类型数据集、文本数据集和图像元素数据集中的数据进行修正,得到修正后的容器类型数据集、文本数据集和图像元素数据集。通过获取传统图像处理结果,利用深度检测结果与传统图像处理结果相结合的方式对数据进行多次修正,提高了数据精度。
步骤304,基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集,并上传模板数据集。
在本实施例的一些可选的实现方式中,方法还包括:基于模板数据集,生成与模板数据集对应的模板界面并展示。实现了搭建快速、灵活地活动模板的跨前端应用。
在本实施例的一些可选的实现方式中,方法还包括:基于模板数据集,优化页面模板的设计方案。实现将模板样式和模板数据进行混搭组合的模板生产线上化配置能力,实现为现有的线上页面提供更优模板方案的能力,进一步提高商品转化率。
在本实施例中,步骤301和304的具体操作与图1所示的实施例中的步骤101和103的操作基本相同,在此不再赘述。
从图3中可以看出,与图1对应的实施例相比,本实施例中的数据处理方法的示意图300采用将第一图像集输入至容器类型识别子模型,生成与第一图像集对应的容器类型数据集,将第二图像集输入至文本识别子模型,生成与第二图像集对应的文本数据集,将第三图像集输入至元素识别子模型,生成与第三图像集对应的图像元素数据集,对容器类型数据集、文本数据集和图像元素数据集进行矫正,得到矫正后的容器类型数据集、文本数据集和图像元素数据集,基于不同模型分别得到容器类型数据集、文本数据集和图像元素数据集,使数据处理更为精准而富有针对性,采用残差网络设计模型解决模型剃度消失问题,提高了模型训练的精度。
进一步参考图4,作为对上述图1~3所示方法的实现,本申请提供了一种数据处理装置的一个实施例,该装置实施例与图1所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图4所示,本实施例的数据处理装置400包括:标注单元401、生成单元402和转换单元403,其中,标注单元,被配置成响应于接收到页面图像,对页面图像进行标注,生成与标注数据对应的各个图像集,其中,各个图像集包括:用于识别容器类型的第一图像集、用于识别文本信息的第二图像集和用于检测图像元素的第三图像集,页面图像基于页面模板而生成;生成单元,被配置成将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集,其中,图像识别模型用于表征对第一图像集中各个图像进行容器类型判定、对第二图像集中各个图像进行文字检测和文本识别、对第三图像集中各个图像进行图像元素检测和识别;转换单元,被配置成基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集,并上传模板数据集,其中,转换基于特定语言结构对容器类型数据集、文本数据集和图像元素数据集进行转换。
在本实施例中,数据处理装置400的标注单元401、生成单元402和转换单元403的具体处理及其所带来的技术效果可分别参考图1对应的实施例中的步骤101到步骤103的相关说明,在此不再赘述。
在本实施例的一些可选的实现方式中,标注单元,包括:标注模块,被配置成对页面图像进行标注,得到与页面图像对应的标注数据;位置生成模块,被配置成将标注数据输入至位置确定模型,生成与标注数据对应的各个区块的位置信息,其中,位置确定模型由标注数据的历史相关数据训练得到;确定模块,被配置成基于各个区块的位置信息,确定与标注数据对应的各个图像集。
在本实施例的一些可选的实现方式中,生成单元中的图像识别模型利用如下模块训练得到:获取模块,被配置成获取训练样本集,其中,训练样本集中的训练样本包括用于识别容器类型的第一图像集、用于识别文本信息的第二图像集、用于检测图像元素的第三图像集、与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集;训练模块,被配置成利用深度学习方法,将训练样本集中训练样本包括的第一图像集、第二图像集和第三图像集作为输入数据,将与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集作为期望输出数据,训练得到图像识别模型。
在本实施例的一些可选的实现方式中,生成单元中的图像识别模型包括容器类型识别子模型、文本识别子模型和元素识别子模型;生成单元,包括:第一生成模块,被配置成将第一图像集输入至容器类型识别子模型,生成与第一图像集对应的容器类型数据集,其中,容器类型识别子模型用于表征对第一图像集中各个图像进行容器类型判定;第二生成模块,被配置成将第二图像集输入至文本识别子模型,生成与第二图像集对应的文本数据集,其中,文本识别子模型用于表征对第二图像集中各个图像进行文字检测和文本识别;第三生成模块,被配置成将第三图像集输入至元素识别子模型,生成与第三图像集对应的图像元素数据集,其中,元素识别子模型用于表征对第三图像集中各个图像进行图像元素检测和识别。
在本实施例的一些可选的实现方式中,第二生成模块中的文本识别子模型包括特征提取子模型和文字序列提取子模型;第二生成模块,包括:特征提取子模块,被配置成将第二图像集输入至特征提取子模型,得到与 第二图像集对应的各个特征矩阵,其中,特征提取子模型基于卷积神经网络而构建;文字提取子模块,被配置成将各个特征矩阵输入至文字序列提取子模型,得到与各个特征矩阵对应的文字序列,其中,文字序列提取子模型基于递归神经网络而构建;确定子模块,被配置成基于各个文字序列,确定与各个文字序列对应的文本信息,并生成与各个文本信息对应的文本数据集。
在本实施例的一些可选的实现方式中,生成单元中的图像识别模型和/或生成单元中的容器类型识别子模型基于深度残差网络模型而构建。
在本实施例的一些可选的实现方式中,装置还包括:矫正单元,被配置成对容器类型数据集、文本数据集和图像元素数据集进行矫正,得到矫正后的容器类型数据集、文本数据集和图像元素数据集,其中,矫正用于表征基于各个图像集中每个图像的图像位置、图像顺序和图像重复性的分析结果,将容器类型数据集、文本数据集和图像元素数据集中的数据进行重新排序。
在本实施例的一些可选的实现方式中,矫正单元中的矫正基于对各个图像集中每个图像进行图像缩放、图像灰度化、图像增强、图像降噪和图像边缘检测的组合处理而完成。
在本实施例的一些可选的实现方式中,装置还包括:识别单元,被配置成对各个图像集进行内容识别,得到与第一图像集对应的第一数据集、与第二图像集对应的第二数据集和与第三图像集对应的第三数据集;修正单元,被配置成根据第一数据集、第二数据集和第三数据集与容器类型数据集、文本数据集和图像元素数据集的比对结果,对容器类型数据集、文本数据集和图像元素数据集中的数据进行修正,得到修正后的容器类型数据集、文本数据集和图像元素数据集。
在本实施例的一些可选的实现方式中,装置还包括:展示单元,被配置成基于模板数据集,生成与模板数据集对应的模板界面并展示;和/或,优化单元,被配置成基于模板数据集,优化页面模板的设计方案。
根据本申请的实施例,本申请还提供了一种电子设备和一种可读存储介质。
如图5所示,是根据本申请实施例的数据处理方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。
如图5所示,该电子设备包括:一个或多个处理器501、存储器502,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图5中以一个处理器501为例。
存储器502即为本申请所提供的非瞬时计算机可读存储介质。其中,存储器存储有可由至少一个处理器执行的指令,以使至少一个处理器执行本申请所提供的数据处理方法。本申请的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本申请所提供的数据处理方法。
存储器502作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本申请实施例中的数据处理方法对应的程序指令/模块(例如,附图4所示的标注单元401、生成单元402和转换单元403)。处理器501通过运行存储在存储器502中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的数据处理方法。
存储器502可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据 数据处理电子设备的使用所创建的数据等。此外,存储器502可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器502可选包括相对于处理器501远程设置的存储器,这些远程存储器可以通过网络连接至数据处理电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
数据处理方法的电子设备还可以包括:输入装置503和输出装置504。处理器501、存储器502、输入装置503和输出装置504可以通过总线或者其他方式连接,图5中以通过总线连接为例。
输入装置503可接收输入的数字或字符信息,以及产生与数据处理电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置504可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机 器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。
根据本申请实施例的技术方案采用响应于接收到页面图像,对页面图像进行标注,生成与标注数据对应的各个图像集,将各个图像集输入至训练得到的图像识别模型,生成与第一图像集对应的容器类型数据集、与第二图像集对应的文本数据集和与第三图像集对应的图像元素数据集,其中,图像识别模型用于表征对第一图像集中各个图像进行容器类型判定、对第二图像集中各个图像进行文字检测和文本识别、对第三图像集中各个图像进行图像元素检测和识别,基于页面的模板信息,对容器类型数据集、文本数据集和图像元素数据集进行转换,生成与页面图像对应的模板数据集,并上传模板数据集,利用图像识别技术,将页面图像转化为模板数据并通 过上传数据将模板数据存储于内容分发网络,避免了现有技术中随着模板需求增多,文件数量线性递增的情况,解决了现有技术中JSON文件复用性差、在页面搭建过程中维护成本过高的问题。实现了模板数据的精准定位以及高效的模板线上化,解放了维护人员的双手。通过图像识别技术直接生成模板数据集,节省了系统的开发资源和维护成本,提高了模板搭建的灵活性。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。

Claims (22)

  1. 一种数据处理方法,所述方法包括:
    响应于接收到页面图像,对所述页面图像进行标注,生成与所述标注数据对应的各个图像集,其中,所述各个图像集包括:用于识别容器类型的第一图像集、用于识别文本信息的第二图像集和用于检测图像元素的第三图像集,所述页面图像基于页面模板而生成;
    将各个图像集输入至训练得到的图像识别模型,生成与所述第一图像集对应的容器类型数据集、与所述第二图像集对应的文本数据集和与所述第三图像集对应的图像元素数据集,其中,所述图像识别模型用于表征对所述第一图像集中各个图像进行容器类型判定、对所述第二图像集中各个图像进行文字检测和文本识别、对所述第三图像集中各个图像进行图像元素检测和识别;
    基于所述页面的模板信息,对所述容器类型数据集、所述文本数据集和所述图像元素数据集进行转换,生成与所述页面图像对应的模板数据集,并上传所述模板数据集,其中,所述转换基于特定语言结构对所述容器类型数据集、所述文本数据集和所述图像元素数据集进行转换。
  2. 根据权利要求1所述方法,其中,所述对所述页面图像进行标注,生成与所述标注数据对应的各个图像集,包括:
    对所述页面图像进行标注,得到与所述页面图像对应的标注数据;
    将所述标注数据输入至位置确定模型,生成与所述标注数据对应的各个区块的位置信息,其中,所述位置确定模型由所述标注数据的历史相关数据训练得到;
    基于所述各个区块的位置信息,确定与所述标注数据对应的各个图像集。
  3. 根据权利要求1-2任一项所述的方法,其中,所述图像识别 模型通过如下方式训练得到:
    获取训练样本集,其中,所述训练样本集中的训练样本包括用于识别容器类型的第一图像集、用于识别文本信息的第二图像集、用于检测图像元素的第三图像集、与所述第一图像集对应的容器类型数据集、与所述第二图像集对应的文本数据集和与所述第三图像集对应的图像元素数据集;
    利用深度学习方法,将所述训练样本集中训练样本包括的所述第一图像集、所述第二图像集和所述第三图像集作为输入数据,将与所述第一图像集对应的容器类型数据集、与所述第二图像集对应的文本数据集和与所述第三图像集对应的图像元素数据集作为期望输出数据,训练得到图像识别模型。
  4. 根据权利要求1-3任一项所述的方法,其中,所述图像识别模型包括容器类型识别子模型、文本识别子模型和元素识别子模型;所述将各个图像集输入至训练得到的图像识别模型,生成与所述第一图像集对应的容器类型数据集、与所述第二图像集对应的文本数据集和与所述第三图像集对应的图像元素数据集,包括:
    将所述第一图像集输入至所述容器类型识别子模型,生成与所述第一图像集对应的容器类型数据集,其中,所述容器类型识别子模型用于表征对所述第一图像集中各个图像进行容器类型判定;
    将所述第二图像集输入至所述文本识别子模型,生成与所述第二图像集对应的文本数据集,其中,所述文本识别子模型用于表征对所述第二图像集中各个图像进行文字检测和文本识别;
    将所述第三图像集输入至所述元素识别子模型,生成与所述第三图像集对应的图像元素数据集,其中,所述元素识别子模型用于表征对所述第三图像集中各个图像进行图像元素检测和识别。
  5. 根据权利要求4所述的方法,其中,所述文本识别子模型包括特征提取子模型和文字序列提取子模型;所述将所述第二图像集输入至所述文本识别子模型,生成与所述第二图像集对应的文本数 据集,包括:
    将所述第二图像集输入至所述特征提取子模型,得到与所述第二图像集对应的各个特征矩阵,其中,所述特征提取子模型基于卷积神经网络而构建;
    将各个特征矩阵输入至所述文字序列提取子模型,得到与所述各个特征矩阵对应的文字序列,其中,所述文字序列提取子模型基于递归神经网络而构建;
    基于各个所述文字序列,确定与各个所述文字序列对应的文本信息,并生成与各个所述文本信息对应的文本数据集。
  6. 根据权利要求4所述的方法,其中,所述图像识别模型和/或所述容器类型识别子模型基于深度残差网络模型而构建。
  7. 根据权利要求1-6任一项所述的方法,其中,在所述基于所述页面的模板信息,对所述容器类型数据集、所述文本数据集和所述图像元素数据集进行转换,生成与所述页面图像对应的模板数据集之前,还包括:
    对所述容器类型数据集、所述文本数据集和所述图像元素数据集进行矫正,得到所述矫正后的所述容器类型数据集、所述文本数据集和所述图像元素数据集,其中,所述矫正用于表征基于各个图像集中每个图像的图像位置、图像顺序和图像重复性的分析结果,将所述容器类型数据集、所述文本数据集和所述图像元素数据集中的数据进行重新排序。
  8. 根据权利要求7所述的方法,其中,所述矫正基于对各个图像集中每个图像进行图像缩放、图像灰度化、图像增强、图像降噪和图像边缘检测的组合处理而完成。
  9. 根据权利要求7-8任一项所述的方法,其中,在所述对所述容器类型数据集、所述文本数据集和所述图像元素数据集进行矫正, 得到所述矫正后的所述容器类型数据集、所述文本数据集和所述图像元素数据集之前,还包括:
    对各个图像集进行内容识别,得到与所述第一图像集对应的第一数据集、与所述第二图像集对应的第二数据集和与所述第三图像集对应的第三数据集;
    根据所述第一数据集、所述第二数据集和所述第三数据集与所述容器类型数据集、所述文本数据集和所述图像元素数据集的比对结果,对所述容器类型数据集、所述文本数据集和所述图像元素数据集中的数据进行修正,得到修正后的所述容器类型数据集、所述文本数据集和所述图像元素数据集。
  10. 根据权利要求1-9任一项所述的方法,还包括:
    基于所述模板数据集,生成与所述模板数据集对应的模板界面并展示;和/或,
    基于所述模板数据集,优化所述页面模板的设计方案。
  11. 一种数据处理装置,所述装置包括:
    标注单元,被配置成响应于接收到页面图像,对所述页面图像进行标注,生成与所述标注数据对应的各个图像集,其中,所述各个图像集包括:用于识别容器类型的第一图像集、用于识别文本信息的第二图像集和用于检测图像元素的第三图像集,所述页面图像基于页面模板而生成;
    生成单元,被配置成将各个图像集输入至训练得到的图像识别模型,生成与所述第一图像集对应的容器类型数据集、与所述第二图像集对应的文本数据集和与所述第三图像集对应的图像元素数据集,其中,所述图像识别模型用于表征对所述第一图像集中各个图像进行容器类型判定、对所述第二图像集中各个图像进行文字检测和文本识别、对所述第三图像集中各个图像进行图像元素检测和识别;
    转换单元,被配置成基于所述页面的模板信息,对所述容器类 型数据集、所述文本数据集和所述图像元素数据集进行转换,生成与所述页面图像对应的模板数据集,并上传所述模板数据集,其中,所述转换基于特定语言结构对所述容器类型数据集、所述文本数据集和所述图像元素数据集进行转换。
  12. 根据权利要求11所述装置,其中,所述标注单元,包括:
    标注模块,被配置成对所述页面图像进行标注,得到与所述页面图像对应的标注数据;
    位置生成模块,被配置成将所述标注数据输入至位置确定模型,生成与所述标注数据对应的各个区块的位置信息,其中,所述位置确定模型由所述标注数据的历史相关数据训练得到;
    确定模块,被配置成基于所述各个区块的位置信息,确定与所述标注数据对应的各个图像集。
  13. 根据权利要求11-12任一项所述的装置,其中,所述生成单元中的所述图像识别模型利用如下模块训练得到:
    获取模块,被配置成获取训练样本集,其中,所述训练样本集中的训练样本包括用于识别容器类型的第一图像集、用于识别文本信息的第二图像集、用于检测图像元素的第三图像集、与所述第一图像集对应的容器类型数据集、与所述第二图像集对应的文本数据集和与所述第三图像集对应的图像元素数据集;
    训练模块,被配置成利用深度学习方法,将所述训练样本集中训练样本包括的所述第一图像集、所述第二图像集和所述第三图像集作为输入数据,将与所述第一图像集对应的容器类型数据集、与所述第二图像集对应的文本数据集和与所述第三图像集对应的图像元素数据集作为期望输出数据,训练得到图像识别模型。
  14. 根据权利要求11-13任一项所述的装置,其中,所述生成单元中的所述图像识别模型包括容器类型识别子模型、文本识别子模型和元素识别子模型;所述生成单元,包括:
    第一生成模块,被配置成将所述第一图像集输入至所述容器类型识别子模型,生成与所述第一图像集对应的容器类型数据集,其中,所述容器类型识别子模型用于表征对所述第一图像集中各个图像进行容器类型判定;
    第二生成模块,被配置成将所述第二图像集输入至所述文本识别子模型,生成与所述第二图像集对应的文本数据集,其中,所述文本识别子模型用于表征对所述第二图像集中各个图像进行文字检测和文本识别;
    第三生成模块,被配置成将所述第三图像集输入至所述元素识别子模型,生成与所述第三图像集对应的图像元素数据集,其中,所述元素识别子模型用于表征对所述第三图像集中各个图像进行图像元素检测和识别。
  15. 根据权利要求14所述的装置,其中,所述第二生成模块中的所述文本识别子模型包括特征提取子模型和文字序列提取子模型;所述第二生成模块,包括:
    特征提取子模块,被配置成将所述第二图像集输入至所述特征提取子模型,得到与所述第二图像集对应的各个特征矩阵,其中,所述特征提取子模型基于卷积神经网络而构建;
    文字提取子模块,被配置成将各个特征矩阵输入至所述文字序列提取子模型,得到与所述各个特征矩阵对应的文字序列,其中,所述文字序列提取子模型基于递归神经网络而构建;
    确定子模块,被配置成基于各个所述文字序列,确定与各个所述文字序列对应的文本信息,并生成与各个所述文本信息对应的文本数据集。
  16. 根据权利要求14所述的装置,其中,所述生成单元中的所述图像识别模型和/或所述生成单元中的所述容器类型识别子模型基于深度残差网络模型而构建。
  17. 根据权利要求11-16任一项所述的装置,还包括:
    矫正单元,被配置成对所述容器类型数据集、所述文本数据集和所述图像元素数据集进行矫正,得到所述矫正后的所述容器类型数据集、所述文本数据集和所述图像元素数据集,其中,所述矫正用于表征基于各个图像集中每个图像的图像位置、图像顺序和图像重复性的分析结果,将所述容器类型数据集、所述文本数据集和所述图像元素数据集中的数据进行重新排序。
  18. 根据权利要求17所述的装置,其中,所述矫正单元中的所述矫正基于对各个图像集中每个图像进行图像缩放、图像灰度化、图像增强、图像降噪和图像边缘检测的组合处理而完成。
  19. 根据权利要求17-18任一项所述的装置,还包括:
    识别单元,被配置成对各个图像集进行内容识别,得到与所述第一图像集对应的第一数据集、与所述第二图像集对应的第二数据集和与所述第三图像集对应的第三数据集;
    修正单元,被配置成根据所述第一数据集、所述第二数据集和所述第三数据集与所述容器类型数据集、所述文本数据集和所述图像元素数据集的比对结果,对所述容器类型数据集、所述文本数据集和所述图像元素数据集中的数据进行修正,得到修正后的所述容器类型数据集、所述文本数据集和所述图像元素数据集。
  20. 根据权利要求11-19任一项所述的装置,还包括:
    展示单元,被配置成基于所述模板数据集,生成与所述模板数据集对应的模板界面并展示;和/或,
    优化单元,被配置成基于所述模板数据集,优化所述页面模板的设计方案。
  21. 一种电子设备,其特征在于,包括:
    至少一个处理器;以及
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-10中任一项所述的方法。
  22. 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,所述计算机指令用于使所述计算机执行权利要求1-10中任一项所述的方法。
PCT/CN2021/125721 2020-11-12 2021-10-22 数据处理方法和装置 Ceased WO2022100413A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/252,647 US20250078551A1 (en) 2020-11-12 2021-10-22 Data Processing Method and Apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011261210.8 2020-11-12
CN202011261210.8A CN113822272B (zh) 2020-11-12 2020-11-12 数据处理方法和装置

Publications (1)

Publication Number Publication Date
WO2022100413A1 true WO2022100413A1 (zh) 2022-05-19

Family

ID=78924803

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/125721 Ceased WO2022100413A1 (zh) 2020-11-12 2021-10-22 数据处理方法和装置

Country Status (3)

Country Link
US (1) US20250078551A1 (zh)
CN (1) CN113822272B (zh)
WO (1) WO2022100413A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114821616B (zh) * 2022-04-24 2024-10-11 支付宝(杭州)信息技术有限公司 页面表征模型训练的方法、装置及计算设备
CN115098092A (zh) * 2022-06-27 2022-09-23 京东科技信息技术有限公司 一种页面生成方法、装置、设备和存储介质
CN115221523B (zh) * 2022-09-20 2022-12-27 支付宝(杭州)信息技术有限公司 数据处理方法、装置及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100284623A1 (en) * 2009-05-07 2010-11-11 Chen Francine R System and method for identifying document genres
US20120163707A1 (en) * 2010-12-28 2012-06-28 Microsoft Corporation Matching text to images
CN108563488A (zh) * 2018-01-05 2018-09-21 新华三云计算技术有限公司 模型训练方法及装置、构建容器镜像的方法及装置
US20180300653A1 (en) * 2017-04-18 2018-10-18 Distributed Systems, Inc. Distributed Machine Learning System

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464905B (zh) * 2009-01-08 2011-03-23 中国科学院计算技术研究所 一种网页信息抽取的系统及方法
CN103544176B (zh) * 2012-07-13 2018-08-10 百度在线网络技术(北京)有限公司 用于生成多个页面所对应的页面结构模板的方法和设备
CN105373567B (zh) * 2014-09-01 2019-12-20 北京奇虎科技有限公司 页面生成方法及客户端
CN104537339B (zh) * 2014-12-19 2018-04-10 汉王科技股份有限公司 信息识别方法和信息识别系统
CN106503211B (zh) * 2016-11-03 2019-12-17 福州大学 面向信息发布类网站的移动版自动生成的方法
US20180157386A1 (en) * 2016-12-05 2018-06-07 Jiawen Su System and Method for detection, exploration, and interaction of graphic application interface
CN109388759B (zh) * 2017-08-02 2023-01-31 阿里巴巴集团控股有限公司 一种网页界面构建方法和系统、数据处理方法
US20190065613A1 (en) * 2017-08-28 2019-02-28 Go Daddy Operating Company, LLC Generating a website from digital image metadata
CN110209977B (zh) * 2018-02-11 2024-04-12 北京京东尚科信息技术有限公司 用于生成网页的方法和装置
CN109783094A (zh) * 2018-12-15 2019-05-21 深圳壹账通智能科技有限公司 前端页面生成方法、装置、计算机设备及存储介质
CN111552903A (zh) * 2020-04-09 2020-08-18 深圳壹账通智能科技有限公司 基于html模板的页面生成方法、装置和计算机设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100284623A1 (en) * 2009-05-07 2010-11-11 Chen Francine R System and method for identifying document genres
US20120163707A1 (en) * 2010-12-28 2012-06-28 Microsoft Corporation Matching text to images
US20180300653A1 (en) * 2017-04-18 2018-10-18 Distributed Systems, Inc. Distributed Machine Learning System
CN108563488A (zh) * 2018-01-05 2018-09-21 新华三云计算技术有限公司 模型训练方法及装置、构建容器镜像的方法及装置

Also Published As

Publication number Publication date
US20250078551A1 (en) 2025-03-06
CN113822272A (zh) 2021-12-21
CN113822272B (zh) 2025-02-21

Similar Documents

Publication Publication Date Title
JP7230081B2 (ja) 帳票画像認識方法および装置、電子機器、記憶媒体並びにコンピュータプログラム
CN111259671B (zh) 文本实体的语义描述处理方法、装置及设备
CN112560912B (zh) 分类模型的训练方法、装置、电子设备和存储介质
US20210390428A1 (en) Method, apparatus, device and storage medium for training model
US12032906B2 (en) Method, apparatus and device for quality control and storage medium
CN111783760B (zh) 文字识别的方法、装置、电子设备及计算机可读存储介质
CN112541332B (zh) 表单信息抽取方法、装置、电子设备及存储介质
CN112036509A (zh) 用于训练图像识别模型的方法和装置
CN111339759B (zh) 领域要素识别模型训练方法、装置及电子设备
CN111626202A (zh) 用于识别视频的方法及装置
CN111582477B (zh) 神经网络模型的训练方法和装置
CN112837466B (zh) 票据识别方法、装置、设备以及存储介质
CN111507355B (zh) 一种字符识别方法、装置、设备和存储介质
CN111695518A (zh) 结构化文档信息标注的方法、装置及电子设备
WO2022100413A1 (zh) 数据处理方法和装置
CN112001169A (zh) 文本纠错的方法、装置、电子设备和可读存储介质
CN109408058B (zh) 基于机器学习的前端辅助开发方法和装置
CN111611468B (zh) 页面交互方法、装置和电子设备
CN111611366B (zh) 意图识别优化处理方法、装置、设备及存储介质
CN111241838B (zh) 文本实体的语义关系处理方法、装置及设备
CN112149741B (zh) 图像识别模型的训练方法、装置、电子设备及存储介质
CN112507090B (zh) 用于输出信息的方法、装置、设备和存储介质
US20210224476A1 (en) Method and apparatus for describing image, electronic device and storage medium
CN111611990A (zh) 用于识别图像中表格的方法和装置
CN111563541A (zh) 图像检测模型的训练方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21890940

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18252647

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21890940

Country of ref document: EP

Kind code of ref document: A1

WWP Wipo information: published in national office

Ref document number: 18252647

Country of ref document: US