Powerpoint identification method and device, electronic equipment and storage medium
By extracting multi-dimensional features and using page type recognition model, the problem of inaccurate page type recognition in the existing technology is solved, and more accurate and general page type recognition is achieved, which improves the effect of automatic beautification.
Patent Information
- Application Number
- CN202411034599.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2024-12-10
Smart Images

Figure CN119107664A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically, to a method and device for identifying a presentation, an electronic device, and a storage medium. Background Art
[0002] With the development of editing software, users have put forward higher requirements for software functions, hoping that the software has the function of automatically beautifying slide pages (hereinafter referred to as pages). In order to better support this function, it is necessary to identify the page type of the presentation page, and determine the beautification strategy according to the page type during beautification to perform targeted beautification processing. Usually, the user determines the type of the page and selects the beautification strategy corresponding to the page. This process requires user participation and is not user-friendly and convenient. Therefore, it is necessary to provide a more accurate and universal solution for identifying the type of presentation page. Summary of the invention
[0003] An object of the embodiments of the present disclosure is to provide a method and apparatus for identifying a presentation, an electronic device, and a storage medium, which can accurately identify the type of a page of a presentation and have better versatility.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for identifying a presentation is provided.
[0005] The presentation is identified by:
[0006] Obtaining a target page in a presentation, wherein the target page is any page in the presentation;
[0007] Extracting structural features of the target page and extracting content features of the target page;
[0008] The structural features of the target page and the content features of the target page are input into a page type recognition model, and the type of the target page is recognized by the page type recognition model.
[0009] Optionally, the page type recognition model includes a classification network and at least one fully connected network; identifying the type of the target page through the page type recognition model includes: splicing the structural features of the target page and the content features of the target page into a feature matrix of the target page through the fully connected network, and performing vector processing on the feature matrix of the target page to obtain an intermediate vector; performing classification processing on the intermediate vector through the classification network to obtain the type of the target page.
[0010] Optionally, before inputting the structural features of the target page and the content features of the target page into the page type recognition model, the method also includes: extracting image features of the target page; inputting the structural features of the target page and the content features of the target page into the page type recognition model includes: inputting the structural features of the target page, the content features of the target page and the image features of the target page into the page type recognition model.
[0011] Optionally, extracting the image features of the target page includes: converting the target page into a first picture; performing grayscale processing on the first picture to obtain a second picture; performing compression processing on the second picture to obtain a third picture; inputting the third picture into a pre-trained picture feature extraction model, and extracting features of the third picture as image features of the target page.
[0012] Optionally, extracting the content features of the target page includes: arranging all the text in the target page into a first sequence; inputting the first sequence into a pre-trained twin neural network, and extracting features of the first sequence as the content features of the target page.
[0013] Optionally, before inputting the structural features of the target page and the content features of the target page into the page type recognition model, the method also includes: extracting the file name features of the target page; inputting the structural features of the target page and the content features of the target page into the page type recognition model includes: inputting the structural features of the target page, the content features of the target page and the file name features of the target page into the page type recognition model.
[0014] Optionally, extracting the file name features of the target page includes: arranging all characters in the file name of the presentation into a second sequence; inputting the second sequence into a pre-trained twin neural network, and extracting features of the second sequence as the file name features of the target page.
[0015] Optionally, extracting the structural features of the target page includes: parsing the target page to determine a first structural feature value of the target page and a second structural feature value of the target page; the first structural feature value of the target page represents the number of preset structures contained in the target page; the second structural feature value of the target page represents the average area of the preset structures contained in the target page; and using the first structural feature value of the target page and the second structural feature value of the target page as the structural features of the target page.
[0016] Optionally, before inputting the structural features of the target page and the content features of the target page into the page type recognition model, the method also includes: extracting page attribute features of the target page; the inputting the structural features of the target page and the content features of the target page into the page type recognition model includes: inputting the structural features of the target page, the content features of the target page and the page attribute features of the target page into the page type recognition model.
[0017] Optionally, extracting the page attribute characteristics of the target page includes: extracting the font size of the characters in the target page as the font size attribute characteristic value of the target page; detecting whether the target page contains preset keywords, and determining the keyword attribute characteristic value of the target page according to the detection result; determining the homepage attribute characteristic value of the target page according to whether the target page is the first page of the presentation; determining the last page attribute characteristic value of the target page according to whether the target page is the last page of the presentation; and using the font size attribute characteristic value of the target page, the keyword attribute characteristic value of the target page, the homepage attribute characteristic value of the target page and the last page attribute characteristic value of the target page as the page attribute characteristics of the target page.
[0018] According to a second aspect of an embodiment of the present disclosure, a device for identifying a presentation is provided.
[0019] The presentation's identification devices include:
[0020] An acquisition module, used for acquiring a target page in a presentation, wherein the target page is any page in the presentation;
[0021] A first extraction module, used to extract structural features of the target page;
[0022] A second extraction module, used to extract content features of the target page;
[0023] The identification module is used to input the structural features of the target page and the content features of the target page into a page type identification model, and identify the type of the target page through the page type identification model.
[0024] Optionally, the page type recognition model includes a classification network and at least one fully connected network; identifying the type of the target page through the page type recognition model includes: splicing the structural features of the target page and the content features of the target page into a feature matrix of the target page through the fully connected network, and performing vector processing on the feature matrix of the target page to obtain an intermediate vector; performing classification processing on the intermediate vector through the classification network to obtain the type of the target page.
[0025] Optionally, the presentation recognition device further includes a third extraction module. The third extraction module is used to extract the image features of the target page. The recognition module is specifically used to input the structural features of the target page, the content features of the target page and the image features of the target page into a page type recognition model, and recognize the type of the target page through the page type recognition model.
[0026] Optionally, extracting the image features of the target page includes: converting the target page into a first picture; performing grayscale processing on the first picture to obtain a second picture; performing compression processing on the second picture to obtain a third picture; inputting the third picture into a pre-trained picture feature extraction model, and extracting features of the third picture as image features of the target page.
[0027] Optionally, extracting the content features of the target page includes: arranging all the text in the target page into a first sequence; inputting the first sequence into a pre-trained twin neural network, and extracting features of the first sequence as the content features of the target page.
[0028] Optionally, the presentation recognition device further includes a fourth extraction module. The fourth extraction module is used to extract the file name features of the target page. The recognition module is specifically used to input the structural features of the target page, the content features of the target page and the file name features of the target page into a page type recognition model, and recognize the type of the target page through the page type recognition model.
[0029] Optionally, extracting the file name features of the target page includes: arranging all characters in the file name of the presentation into a second sequence; inputting the second sequence into a pre-trained twin neural network, and extracting features of the second sequence as the file name features of the target page.
[0030] Optionally, extracting the structural features of the target page includes: parsing the target page to determine a first structural feature value of the target page and a second structural feature value of the target page; the first structural feature value of the target page represents the number of preset structures contained in the target page; the second structural feature value of the target page represents the average area of the preset structures contained in the target page; and using the first structural feature value of the target page and the second structural feature value of the target page as the structural features of the target page.
[0031] Optionally, the presentation recognition device further includes a fifth extraction module. The fifth extraction module is used to extract the page attribute features of the target page. The recognition module is specifically used to input the structural features of the target page, the content features of the target page and the page attribute features of the target page into a page type recognition model, and recognize the type of the target page through the page type recognition model.
[0032] Optionally, extracting the page attribute characteristics of the target page includes: extracting the font size of the characters in the target page as the font size attribute characteristic value of the target page; detecting whether the target page contains preset keywords, and determining the keyword attribute characteristic value of the target page according to the detection result; determining the homepage attribute characteristic value of the target page according to whether the target page is the first page of the presentation; determining the last page attribute characteristic value of the target page according to whether the target page is the last page of the presentation; and using the font size attribute characteristic value of the target page, the keyword attribute characteristic value of the target page, the homepage attribute characteristic value of the target page and the last page attribute characteristic value of the target page as the page attribute characteristics of the target page.
[0033] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, which includes a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement any one of the methods described in the first aspect of the present disclosure.
[0034] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method described in any one of the first aspects of the present disclosure is implemented.
[0035] The method and device, electronic device and storage medium for identifying the file page type of the disclosed embodiment extract the structural features and content features of the target page of the presentation, input the structural features and content features of the target page into the page type recognition model, and identify the type of the target page through the page type recognition model. This method utilizes the features of the target page in multiple dimensions and uses a pre-trained page type recognition model for recognition, so that the final recognition result is more accurate and can be applied to different file business scenarios.
[0036] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.
[0038] Figure 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure;
[0039] Figure 2 is a schematic diagram of a method for identifying a presentation according to an embodiment of the present disclosure;
[0040] Figure 3 is a schematic diagram of a twin neural network model of an embodiment of the present disclosure;
[0041] Figure 4 It is a schematic diagram of a presentation recognition device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0043] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0044] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0045] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0046] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0047] <Hardware Configuration>
[0048] Figure 1 The electronic device can be used to implement the method for identifying the file page type of the embodiment of the present disclosure.
[0049] The electronic device 1000 may be a smart phone, a portable computer, a desktop computer, a tablet computer, a server, etc., which is not limited here. The electronic device 1000 may be installed with an intelligent operating system (such as Windows, Linux, Android, IOS, etc.) and document editing software.
[0050] The electronic device 1000 may include, but is not limited to, a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and the like. Among them, the processor 1100 may be a central processing unit CPU, a graphics processing unit GPU, a microprocessor MCU, and the like, and is used to execute a computer program / instruction, which may be written in an instruction set of an architecture such as x86, Arm, RISC, MIPS, SSE, and the like. The memory 1200 may include, for example, a ROM (read-only memory), a RAM (random access memory), a non-volatile memory such as a hard disk, and the like. The interface device 1300 may include, for example, a USB interface, a serial interface, a parallel interface, and the like. The communication device 1400 may, for example, be capable of wired communication using an optical fiber or a cable, or wireless communication, and may specifically include WiFi communication, Bluetooth communication, 2G / 3G / 4G / 5G communication, and the like. The display device 1500 may be, for example, a liquid crystal display screen, a touch display screen, and the like. The input device 1600 may, for example, include a touch screen, a keyboard, a somatosensory input, and the like. The speaker 1700 is used to output audio signals. The microphone 1800 is used to collect audio signals.
[0051] As used in the embodiment of the present disclosure, the memory 1200 of the electronic device 1000 is used to store a computer program / instruction, which is used to control the processor 1100 to operate to implement the method for recognizing a presentation according to the embodiment of the present disclosure. A technician can design the computer program / instruction according to the scheme disclosed in the present disclosure. How the computer program / instruction controls the processor to operate is well known in the art, so it will not be described in detail here.
[0052] It should be understood by those skilled in the art that although Figure 1 , multiple devices of the electronic device 1000 are shown; however, the electronic device 1000 of the embodiment of the present disclosure may only involve some of the devices, for example, only the processor 1100 and the memory 1200.
[0053] <Method of identifying presentations>
[0054] See also Figure 2 As shown, the embodiment of the present disclosure provides a method for identifying a presentation, including steps S202-S206.
[0055] Step S202: Obtain a target page in the presentation, wherein the target page is any page in the presentation.
[0056] Step S204: extracting structural features of the target page and extracting content features of the target page.
[0057] Step S206: Input the structural features of the target page and the content features of the target page into a page type recognition model, and identify the type of the target page through the page type recognition model.
[0058] A presentation can include one or more pages. In one example, the types of pages in a presentation can include a cover page, a body page, an end page, and sometimes a table of contents page and a chapter page. In a presentation with multiple pages, the first page is usually the cover page, and the last page is the end page.
[0059] The presentation recognition method of the embodiment of the present disclosure is used to identify the type of a target page in a presentation, for example, to identify whether the target page is a cover page, a table of contents page, a chapter page, a body page, or an ending page.
[0060] In this embodiment, the structural features and content features of the target page of the presentation are extracted, and the structural features and content features of the target page are input into the page type recognition model, and the type of the target page is recognized by the page type recognition model. This method utilizes the characteristics of the target page in multiple dimensions, and uses the pre-trained page type recognition model for recognition, so that the final recognition result is more accurate and can be applied to different file business scenarios.
[0061] In one example, in addition to extracting the structural features and content features of the target page, other features of the target page may also be extracted. Extracting other features of the target page may include extracting one or more of the file name features of the target page, the page attribute features of the target page, and the image features of the target page. When extracting the structural features, content features, and other features of the target page, in step S206, all the extracted features of the target page are input into the page type recognition model, and the type of the target page is recognized by the page type recognition model.
[0062] In this embodiment, in addition to extracting the structural features and content features of the target page of the presentation, one or more of the file name features, page attribute features, and image features of the target page are also extracted, and all of these features of the target page are input into the type recognition model, and the type of the target page is recognized by the page type recognition model. Since the features of the target page acquired by the page recognition model are more comprehensive, the recognition result is more accurate and reliable.
[0063] The following describes how to extract the structural features of the target page. In one example, extracting the structural features of the target page may include steps S302 to S304.
[0064] Step S302: parse the target page to determine a first structural feature value and a second structural feature value of the target page.
[0065] In the page of the presentation, there may be preset structures, such as text boxes, pictures, combinations, graphics, etc. Among them, "combination" can be an overall structure formed by the combination of multiple structures, for example, an overall structure composed of a text box and a graphic, or an overall structure composed of a text box and a text box. "Graphic" can refer to a graphic generated in the page using the graphic generation function provided by the editing software. "Picture" can refer to a picture inserted into the page.
[0066] The first structural characteristic value of the target page represents the number of preset structures contained in the target page. The second structural characteristic value of the target page represents the average area of the preset structures contained in the target page. For example, for the preset structure of "text box", the first structural characteristic value represents the number of text boxes contained in the target page, and the second structural characteristic value represents the average area of the text boxes contained in the target page. The area of each preset structure can be determined by the product of the width and height of the preset structure.
[0067] Step S304: taking the first structural feature value of the target page and the second structural feature value of the target page as the structural feature of the target page.
[0068] Serial number Structural features form 1 The number of text boxes in the target page Numeric 2 The average area of text boxes in the target page Numeric 3 The number of images in the target page Numeric 4 The average size of the images on the target page Numeric 5 The number of combinations in the target page Numeric 6 Average area of the combination in the target page Numeric 7 The number of graphics in the target page Numeric 8 The average area of graphics in the target page Numeric
[0069] Table 1
[0070] As shown in Table 1, if text box, picture, combination, and graphic are used as preset structures, the structural features of the target page include the 8 features in Table 1, and the structural features are all in numerical form.
[0071] In one example, extracting the structural features of the target page may include steps S306 to S312.
[0072] Step S306: parse each page in the presentation to determine a first structural feature value and a second structural feature value of each page. The first structural feature value of the page represents the number of preset structures contained in the page. The second structural feature value of the page represents the average area of the preset structures contained in the page.
[0073] Step S308: normalize the first structural feature value of each page in the presentation to obtain the normalized first structural feature value of each page.
[0074] Step S310: normalize the second structural feature value of each page in the presentation to obtain the normalized second structural feature value of each page.
[0075] Step S312: taking the normalized first structural feature value and the normalized second structural feature value of each page as the corresponding structural feature of each page.
[0076] In this way, the structural features of the target page can be obtained. In this example, the first structural feature values corresponding to the same structure of each page of the presentation are obtained, and the first structural feature values corresponding to the structure of each page are normalized to obtain the normalized first structural feature values corresponding to the structure of each page. The purpose of normalization here is to limit the numerical range of the first structural feature values to [0,1]. And, the second structural feature values corresponding to the same structure of each page of the presentation are obtained, and the second structural feature values corresponding to the structure of each page are normalized to obtain the normalized second structural feature values corresponding to the structure of each page. The purpose of normalization here is to limit the numerical range of the second structural feature values to [0,1].
[0077] In one example, the following formula is used for normalization:
[0078]
[0079] When the first structural feature values corresponding to the same structure of each page in the presentation are normalized using Formula 1, min(X) represents the smallest value of the first structural feature values corresponding to the structure of all pages in the presentation, max(X) represents the largest value of the first structural feature values corresponding to the structure of all pages in the presentation, and x is the first structural feature value corresponding to the structure of a specific page in the presentation. It is the normalized first structural feature value corresponding to the structure of the specific page.
[0080] When the second structural feature values corresponding to the same structure of each page in the presentation are normalized using Formula 1, min(X) represents the smallest value of the second structural feature values corresponding to the structure of all pages in the presentation, max(X) represents the largest value of the second structural feature values corresponding to the structure of all pages in the presentation, and x is the second structural feature value corresponding to the structure of a specific page in the presentation. It is the normalized second structural feature value corresponding to the structure of the specific page.
[0081] For example, for the structural feature "text box", its corresponding first structural feature value is "the number of text boxes in the page", and its corresponding second structural feature value is "the average area of text boxes in the page". The presentation has 4 pages in total. The number of text boxes in the first page is 1, the number of text boxes in the second page is 2, the number of text boxes in the third page is 3, and the number of text boxes in the fourth page is 1. Then, among the first structural feature values corresponding to "text box" of each page of the presentation, min(X) is 1 and max(X) is 3.
[0082] For the "text box" structure:
[0083] The normalized first structural feature value of the first page is:
[0084] The normalized first structural feature value of the second page is:
[0085] The normalized first structural eigenvalue of the third page is:
[0086] The normalized first structural eigenvalue of the fourth page is:
[0087] If a text box, a picture, a combination, or a graphic is used as a preset structure, the multiple first structural feature values and the multiple second structural feature values in Table 1 are normalized respectively to obtain the normalized first structural feature values and second structural feature values of the target page as the structural features of the target page.
[0088] For pages of the same type in different presentations, the normalized first structural feature values corresponding to the same structure are relatively similar, and the normalized second structural feature values corresponding to the same structure are relatively similar. In other words, the normalized first structural feature values and the normalized second structural feature values are more meaningful for identifying the type of the page. In the embodiment of the present disclosure, the type of the target page is identified using the normalized first structural feature values and the normalized second structural feature values, so that the identification result is more accurate and reliable, and can be applied to different file business scenarios.
[0089] The following describes how to extract the content features of the target page. In one example, extracting the content features of the target page may include steps S402 to S404.
[0090] Step S402: Arrange all the characters in the target page into a first sequence.
[0091] In one example, all the texts on the target page are arranged into a first sequence according to the original text order. In one example, if the target page contains multiple text boxes, the texts in these text boxes are sorted according to the conventional reading habit order (for example, from top to bottom, from left to right), so that all the texts on the target page are arranged into a first sequence.
[0092] Step S404: input the first sequence into a pre-trained twin neural network, and extract features of the first sequence as content features of the target page.
[0093] See also Figure 3 The twin neural network model shown includes a first decoder, a second decoder and a similarity calculation module. The first sequence is input into the first decoder or the second decoder to extract the features of the first sequence.
[0094] The following describes how to train the initial twin neural network model to obtain the above-mentioned pre-trained twin neural network. Obtain training data, each of which includes a similar first text and a second text. During training, the first text is input into the first decoder, and the second text is input into the second decoder. The feature vector of the first text is extracted from the first text by the first decoder, and the feature vector of the second text is extracted from the second text by the second decoder. The first decoder and the second decoder share weight parameters during the extraction process. The similarity calculation module calculates the similarity between the feature vector of the extracted first text and the feature vector of the second text, for example, the cosine similarity between the feature vector of the extracted first text and the feature vector of the second text is calculated. Since the first text and the second text are similar, the similarity between the feature vector of the extracted first text and the feature vector of the second text should be very high in theory. By using a large amount of training data to train the model, the similarity between the feature vector of the first text extracted by the model and the feature vector of the second text is stabilized above the preset threshold, indicating that the model can correctly understand the text content, and then the training of the model is terminated to obtain the above-mentioned pre-trained twin neural network.
[0095] In the same presentation, different types of pages have obvious differences in structural features. For example, for a presentation, the number of text boxes on its cover page is less and the average area of the picture is larger than that on its main text page. For example, for a presentation, there is no picture on its cover page but there is a combination of multiple graphics and the average area of the combination is larger than that on its main text page. In addition, the structural features of different types of pages of a presentation are affected by the content features of the page. For example, if the content of a page is a detailed introduction to household products, the number of pictures on the page will be greater, and the probability that the page is a main text page is higher. It has been found through research that although different types of pages in the same presentation have obvious differences in structural features, there is no unique specific rule, and there is a correlation between the structural features and content features of the page, and both are also affected by the page type. Based on this, in the embodiment of the present disclosure, the structural features and content features of the target page are input into the page type recognition model together, and the type of the target page is identified by the page type recognition model, so that the final recognition result is more accurate and can be applied to different file business scenarios.
[0096] The following describes how to extract the file name features of the target page. In one example, extracting the file name features of the target page may include steps S502 to S504.
[0097] Step S502: Arrange all the characters in the presentation document file name into a second sequence.
[0098] In one example, all the characters in the file name of the presentation are arranged into a second sequence according to the original order of the characters.
[0099] Step S504: input the second sequence into a pre-trained twin neural network, and extract features of the second sequence as file name features of the target page.
[0100] Step S504 is similar to step S404. Please refer to the relevant content of step S404, which will not be repeated here.
[0101] The file name of a presentation reflects the application scenario of the presentation. The structural and content features of different types of pages of a presentation are affected by the file business scenario of the presentation document, that is, by the file name. For example, if the name of the presentation is "Simple Drawing Course", the cover page and the text page of the presentation will have more "graphic" structures, and the text page will have words such as "line", "shape", and "concept".
[0102] Based on this, in the embodiment of the present disclosure, the structural features, content features and file name features of the target page are input into the page type recognition model together, and the type of the target page is recognized by the page type recognition model. Since the features of the target page acquired by the page recognition model are more comprehensive, the recognition result is more accurate and reliable, and can be applied to different file business scenarios.
[0103] The following describes how to extract the page attribute features of the target page. In one example, extracting the page attribute features of the target page may include steps S602 to S610.
[0104] Step S602: extract the font size of the characters in the target page as the font size attribute feature value of the target page.
[0105] In one example, the font size attribute characteristic value of the target page includes a maximum font size attribute characteristic value and a minimum font size attribute characteristic value. The maximum font size of the text in the target page is extracted as the maximum font size attribute characteristic value of the target page, and the minimum font size of the text in the target page is extracted as the minimum font size attribute characteristic value of the target page.
[0106] Step S604: Detect whether the target page contains preset keywords, and determine the keyword attribute feature value of the target page according to the detection result.
[0107] After analyzing a large number of presentations, we found that pages of the same type often have the same keywords. For example, the directory page usually has the keyword "directory"; the end page usually has the keyword "thank you".
[0108] If the target page contains the preset keyword, the keyword attribute characteristic value of the target page for the preset keyword is "1", and if the target page does not contain the preset keyword, the keyword attribute characteristic value of the target page for the preset keyword is "0".
[0109] Assuming that there are multiple preset keywords, for each preset keyword, the keyword attribute feature value of the target page for the preset keyword is determined separately. For example, the preset keywords include "catalog" and "thank you", if the target page contains "catalog" but does not contain "thank you", then the keyword attribute feature value corresponding to "catalog" is "1", and the keyword attribute feature value corresponding to "thank you" is "0".
[0110] Step S606: Determine the homepage attribute feature value of the target page according to whether the target page is the first page of the presentation.
[0111] If the target page is the first page of the presentation, the homepage attribute characteristic value of the target page is "1", and if the target page is not the first page of the presentation, the homepage attribute characteristic value of the target page is "0".
[0112] Step S608: Determine the last page attribute characteristic value of the target page according to whether the target page is the last page of the presentation.
[0113] If the target page is the last page of the presentation, the last page attribute characteristic value of the target page is "1", and if the target page is not the last page of the presentation, the last page attribute characteristic value of the target page is "0".
[0114] Step S610: taking the target page's font size attribute feature value, the target page's keyword attribute feature value, the target page's homepage attribute feature value, and the target page's last page attribute feature value as the target page's page attribute feature.
[0115] In one example, extracting the page attribute features of the target page may also include extracting the total number of words in all text boxes in the target page and the average number of words in the text boxes in the target page, and taking the total number of words in all text boxes in the target page and the average number of words in the text boxes in the target page as page attribute features of the target page.
[0116] Serial number Page attribute characteristics form 1 Maximum font size attribute characteristics Numeric 2 Minimum font size attribute characteristics Numeric 3 Attribute characteristics corresponding to the preset keyword "directory" Numeric 4 Attribute characteristics corresponding to the preset keyword "thank you" Numeric 5 Home page attribute characteristics Numeric 6 Last page attribute characteristics Numeric 7 Total number of words in all text boxes Numeric 8 Average number of words in a text box Numeric
[0117] Table 2
[0118] In one example, as shown in Table 2, the extracted page attribute features include 8 features corresponding to Table 2, and the page attribute features are all in numerical form.
[0119] In one example, extracting the page attribute features of the target page may include steps S612 to S628.
[0120] Step S612: extract the font size of the characters in each page of the presentation as the font size attribute feature value of each page.
[0121] Step S614: Detect whether each page of the presentation contains preset keywords, and determine the keyword attribute feature value of each page according to the detection result.
[0122] Step S616: Determine the homepage attribute feature value of each page according to whether each page of the presentation is the first page of the presentation.
[0123] Step S618: Determine the last page attribute feature value of each page according to whether each page of the presentation is the last page of the presentation.
[0124] Step S620: normalize the font size attribute feature value of each page in the presentation to obtain the normalized font size attribute feature value of each page.
[0125] Step S622: normalize the keyword attribute feature value of each page in the presentation to obtain the normalized keyword attribute feature value of each page.
[0126] Step S624: normalize the homepage attribute feature value of each page in the presentation to obtain the normalized homepage attribute feature value of each page.
[0127] Step S626: normalize the last page attribute feature value of each page in the presentation to obtain the normalized last page attribute feature value of each page.
[0128] Step S628: The normalized font size attribute feature value, the normalized keyword attribute feature value, the normalized home page attribute feature value and the normalized last page attribute feature value of each page are used as the corresponding page attribute features of each page.
[0129] In this example, the same page attribute feature of each page of the presentation is obtained, and the feature values of the same page attribute feature of each page are normalized to obtain the normalized page attribute feature value of each page. The purpose of normalization is to limit the value range of the page attribute feature value to between [0,1]. The normalization method is similar to the normalization method of the structural feature value mentioned above, which will not be repeated here.
[0130] There is a correlation between the page attribute features of the pages of a presentation and the type of the pages. For example, the cover page is the first page of a presentation, and both the maximum and minimum font sizes are relatively large. Based on this, in the disclosed embodiment, the structural features, content features, and page attribute features of the target page are input into a page type recognition model together, and the type of the target page is identified by the page type recognition model. Since the features of the target page acquired by the page recognition model are more comprehensive, the recognition result is more accurate and reliable, and can be applied to different file business scenarios.
[0131] For the same type of pages in different presentations, the normalized page attribute feature values corresponding to the same page attributes are relatively similar, that is, the normalized page attribute feature values are more meaningful for identifying the type of page. In the disclosed embodiment, the type of the target page is identified using the normalized page attribute feature values, so that the identification result is more accurate and reliable, and can be applied to different file business scenarios.
[0132] The following describes how to extract the image features of the target page. In one example, extracting the image features of the target page may include steps S702 to S708.
[0133] Step S702: Convert the target page into a first image.
[0134] In one example, the target page can be converted into the first image by storing the target page in an image format. In one example, the target page can be converted into the first image by using a format conversion software tool. For example, the target page can be converted into the first image in a format such as "JPG", "PNG", "GIF", etc.
[0135] Step S704: grayscale the first image to obtain a second image, where the second image is a grayscale image.
[0136] A color image is composed of three different components (red, green, blue, i.e., R component, G component, and B component), which is called a three-channel image. When extracting features from a color image, the three channels need to be processed in sequence, which will result in a large amount of computation and time overhead. In order to increase the processing speed, the first image is processed into a grayscale image.
[0137] In image processing, the grayscale conversion of an image is to convert a color image composed of RGB three-channel data into a grayscale image composed of single-channel data. In one example, the average value method is used to process a color image into a grayscale image, that is, for each pixel in the image, the average value of the three channel components of the pixel is calculated as the grayscale value of the pixel. In another example, the weighted average method is used to process a color image into a grayscale image, that is, for each pixel in the image, the weighted average value of the three channel components of the pixel is calculated as the grayscale value of the pixel.
[0138] Step S706: compress the second image to obtain a third image.
[0139] In one example, the second image is compressed to a preset pixel size to obtain a third image.
[0140] Step S708: input the third image into a pre-trained image feature extraction model, and extract features of the third image as image features of the target page.
[0141] The feature extraction process of the image feature extraction model for an image is to regard an image as a pixel value matrix composed of pixel values (hereinafter referred to as "image matrix"), analyze the image matrix to obtain the features of the image matrix, and use the features of the image matrix as the image features of the image. In the embodiment of the present disclosure, the image matrix of the third image is a matrix composed of the grayscale values of each pixel point of the third image.
[0142] In an example, the image feature extraction model includes a convolutional network and a pooling network. The convolutional network is used to perform a convolution operation on the image matrix of the third image to obtain a feature matrix, and then the feature matrix is pooled through the pooling network. The pooled feature matrix becomes smaller while retaining important key information. The pooled feature matrix is used as the feature of the third image, that is, as the image feature of the target page.
[0143] The image features of a presentation page are a type of page feature, and there is a certain correlation between the line structure and color matching composition of the page and the type of the page. For example, in the same presentation, the color matching of the cover page and the end page may be simpler. Based on this, in the embodiment of the present disclosure, the structural features, content features, and image features of the target page are input into the page type recognition model together, and the type of the target page is identified by the page type recognition model. Since the features of the target page acquired by the page recognition model are more comprehensive, the recognition result is more accurate and reliable, and can be applied to different file business scenarios.
[0144] The following describes how to identify the type of the target page through the page type identification model.
[0145] The page type recognition model includes a classification network and at least one fully connected network. In the case of extracting only the structural features and content features of the target page, identifying the type of the target page through the page type recognition model may include steps S2062 to S2064.
[0146] Step S2062: The structural features of the target page and the content features of the target page are concatenated into a feature matrix of the target page through a fully connected network, and vector processing is performed on the feature matrix of the target page to obtain an intermediate vector.
[0147] The fully connected network arranges the extracted features of the target page in a preset order and splices them into a feature matrix. For example, the extracted features are spliced into a feature matrix in the order of the serial numbers in Table 3.
[0148]
[0149]
[0150] Table 3
[0151] In the disclosed embodiment, the fully connected network performs vector processing on the feature matrix of the target page, which may be performing convolution processing on the feature matrix of the target page to obtain an intermediate vector.
[0152] Step S2064: classify the intermediate vector through a classification network to obtain the type of the target page.
[0153] In the embodiment of the present disclosure, the classification network may be a softmax classifier, and the intermediate vector is classified by the softmax classifier to obtain the probability that the target page belongs to each type.
[0154] When the structural features, content features and other features of the target page are extracted, all the extracted features of the target page are input into a page type recognition model, and the type of the target page is identified by the page type recognition model, which may include steps S2066 to S2068.
[0155] Step S2066: The extracted features of the target page are spliced into a feature matrix of the target page through a fully connected network, and vector processing is performed on the feature matrix of the target page to obtain an intermediate vector.
[0156] Step S2068: Classify the intermediate vector through a classification network to obtain the type of the target page.
[0157] Step S2066 and step S2068 are similar to step S2062 and step S2064. Please refer to the relevant content of step S2062 and step S2064, which will not be repeated here.
[0158] In this embodiment, in addition to extracting the structural features and content features of the target page of the presentation, one or more of the file name features, page attribute features, and image features of the target page are also extracted, and all of these features of the target page are input into the type recognition model, and the type of the target page is recognized by the page type recognition model. Since the features of the target page acquired by the page recognition model are more comprehensive, the recognition result is more accurate and reliable.
[0159] The following describes how to train the initial recognition model to obtain the above-mentioned pre-trained page type recognition model.
[0160] Get a sample presentation and manually annotate each page of the sample presentation with a page type label. For each page in the sample presentation, extract the features of the page according to the above-mentioned feature extraction method. Take the features extracted from a page as a sample data, and use the page type label of the page as supervision to train the recognition model. The optimizer used in the training process is Adam, the loss function is categorical_crossentropy, and the iteration stopping strategy adopts the EarlyStopping strategy, that is, if the cross entropy loss value does not decrease within 10 iteration cycles, the training is terminated to obtain the above-mentioned pre-trained page type recognition model.
[0161] The method for identifying the file page type of the embodiment of the present disclosure extracts the structural features and content features of the target page of the presentation, inputs the structural features and content features of the target page into the page type recognition model, and identifies the type of the target page through the page type recognition model. This method utilizes the characteristics of the target page in multiple dimensions, and uses a pre-trained page type recognition model for recognition, so that the final recognition result is more accurate and can be applied to different file business scenarios.
[0162] <Presentation recognition device>
[0163] According to a second aspect of an embodiment of the present disclosure, a device for identifying a presentation is provided.
[0164] See also Figure 4 As shown, the presentation recognition device 20 includes the following modules:
[0165] The acquisition module 21 is used to acquire a target page in the presentation, wherein the target page is any page in the presentation.
[0166] The extraction module 22 is used to extract the structural features of the target page and extract the content features of the target page.
[0167] The identification module 23 is used to input the structural features of the target page and the content features of the target page into the page type identification model, and identify the type of the target page through the page type identification model.
[0168] Optionally, the page type recognition model includes a classification network and at least one fully connected network; identifying the type of the target page through the page type recognition model includes: splicing the structural features of the target page and the content features of the target page into a feature matrix of the target page through the fully connected network, and performing vector processing on the feature matrix of the target page to obtain an intermediate vector; performing classification processing on the intermediate vector through the classification network to obtain the type of the target page.
[0169] Optionally, the presentation recognition device further includes a third extraction module. The third extraction module is used to extract the image features of the target page. The recognition module is specifically used to input the structural features of the target page, the content features of the target page and the image features of the target page into a page type recognition model, and recognize the type of the target page through the page type recognition model.
[0170] Optionally, extracting the image features of the target page includes: converting the target page into a first picture; performing grayscale processing on the first picture to obtain a second picture; performing compression processing on the second picture to obtain a third picture; inputting the third picture into a pre-trained picture feature extraction model, and extracting features of the third picture as image features of the target page.
[0171] Optionally, extracting the content features of the target page includes: arranging all the text in the target page into a first sequence; inputting the first sequence into a pre-trained twin neural network, and extracting features of the first sequence as the content features of the target page.
[0172] Optionally, the presentation recognition device further includes a fourth extraction module. The fourth extraction module is used to extract the file name features of the target page. The recognition module is specifically used to input the structural features of the target page, the content features of the target page and the file name features of the target page into a page type recognition model, and recognize the type of the target page through the page type recognition model.
[0173] Optionally, extracting the file name features of the target page includes: arranging all characters in the file name of the presentation into a second sequence; inputting the second sequence into a pre-trained twin neural network, and extracting features of the second sequence as the file name features of the target page.
[0174] Optionally, extracting the structural features of the target page includes: parsing the target page to determine a first structural feature value of the target page and a second structural feature value of the target page; the first structural feature value of the target page represents the number of preset structures contained in the target page; the second structural feature value of the target page represents the average area of the preset structures contained in the target page; and using the first structural feature value of the target page and the second structural feature value of the target page as the structural features of the target page.
[0175] Optionally, the presentation recognition device further includes a fifth extraction module. The fifth extraction module is used to extract the page attribute features of the target page. The recognition module is specifically used to input the structural features of the target page, the content features of the target page and the page attribute features of the target page into a page type recognition model, and recognize the type of the target page through the page type recognition model.
[0176] Optionally, extracting the page attribute characteristics of the target page includes: extracting the font size of the characters in the target page as the font size attribute characteristic value of the target page; detecting whether the target page contains preset keywords, and determining the keyword attribute characteristic value of the target page according to the detection result; determining the homepage attribute characteristic value of the target page according to whether the target page is the first page of the presentation; determining the last page attribute characteristic value of the target page according to whether the target page is the last page of the presentation; and using the font size attribute characteristic value of the target page, the keyword attribute characteristic value of the target page, the homepage attribute characteristic value of the target page and the last page attribute characteristic value of the target page as the page attribute characteristics of the target page.
[0177] <Electronic equipment>
[0178] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, which includes a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the presentation recognition method disclosed in any of the above embodiments.
[0179] <Computer Readable Storage Medium>
[0180] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for recognizing a presentation document disclosed in any of the aforementioned embodiments is implemented.
[0181] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the server embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0182] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0183] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0184] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0185] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0186] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0187] Various aspects of the present invention are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0188] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0189] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0190] The flowchart and block diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and a part of a module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0191] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A method for identifying a presentation, characterized in that: include: Train the initial recognition model to obtain a page type recognition model; Obtaining a target page in a presentation, wherein the target page is any page in the presentation; Extracting structural features of the target page and extracting content features of the target page; The structural features of the target page and the content features of the target page are input into the page type recognition model, and the type of the target page is recognized by the page type recognition model.
2. The method according to claim 1, characterized in that The initial recognition model is trained to obtain a page type recognition model, including: Obtaining a sample presentation, wherein the sample presentation is marked with a page type label; For each page in the sample presentation, extract page features; The page features are used as sample data and the page type labels marked on the corresponding pages are used as supervision to train the initial recognition model and obtain a page type recognition model.
3. The method according to claim 1, characterized in that The training of the initial recognition model to obtain a page type recognition model includes: Obtain the cross entropy loss value during the initial recognition model training process; When the cross entropy loss value does not decrease within at least 10 iteration cycles, the training is terminated, and the initial recognition model after the training is used as the page type recognition model.
4. The method according to claim 2, characterized in that: The page features include one or more of the following: structural features of the pages in said sample presentation; Content characteristics of the pages in the sample presentation; the image characteristics of the pages in the sample presentation; file name characteristics of pages in the sample presentation; Page property characteristics of the pages in the sample presentation.
5. The method according to claim 2, characterized in that: When the page features include structural features, the page features are extracted for each page in the sample presentation, including: Analyze each page separately to determine a first structural characteristic value and a second structural characteristic value of each page, wherein the first structural characteristic value represents the number of preset structures contained in the page, and the second structural characteristic value represents the average area of the preset structures contained in the page; Normalizing the first structural feature value of each page to obtain a normalized first structural feature value of each page; Normalizing the second structural feature value of each page to obtain a normalized second structural feature value of each page; The normalized first structural feature value and the normalized second structural feature value of each page are used as the structural feature of each corresponding page.
6. The method according to claim 5, characterized in that The normalization process is performed using the following formula: Wherein, min(X) represents the smallest value of the first structural feature value or the second structural feature value corresponding to the structure in all pages, max(X) represents the largest value of the first structural feature value or the second structural feature value corresponding to the structure in all pages, and x is the first structural feature value or the second structural feature value corresponding to the structure of a specific page. It is the normalized first structural feature value or the second structural feature value corresponding to the structure of the specific page.
7. The method according to claim 2, characterized in that When the page features include page attribute features, the page features are extracted for each page in the sample presentation, including: Extract the font size of the characters in each page as the font size attribute feature value of each page; Detect whether each page contains preset keywords, and determine the keyword attribute feature value of each page according to the detection result; Determine the homepage attribute feature value of each page according to whether each page is the first page of the presentation; Determine the last page attribute feature value of each page according to whether each page is the last page of the presentation; Normalizing the font size attribute characteristic value of each page to obtain a normalized font size attribute characteristic value of each page; Normalizing the keyword attribute feature value of each page to obtain the normalized keyword attribute feature value of each page; Normalizing the homepage attribute feature value of each page to obtain the normalized homepage attribute feature value of each page; Normalizing the last page attribute characteristic value of each page to obtain the normalized last page attribute characteristic value of each page; The normalized font size attribute feature value, the normalized keyword attribute feature value, the normalized home page attribute feature value and the normalized last page attribute feature value of each page are used as the corresponding page attribute features of each page.
8. The method according to claim 2, characterized in that: When the page features include image features, the page features are extracted for each page in the sample presentation, including: Converting the page into a first picture; Performing grayscale processing on the first image to obtain a second image; compressing the second picture to obtain a third picture; The third image is input into a pre-trained image feature extraction model, and features of the third image are extracted as image features of the page in the sample presentation.
9. The method according to claim 2, characterized in that: When the page features include content features, the page features are extracted for each page in the sample presentation, including: Arrange all the text on the page into a first sequence; The first sequence is input into a pre-trained twin neural network, and features of the first sequence are extracted as content features of the pages in the sample presentation.
10. The method according to claim 2, characterized in that When the page feature includes a file name feature, the page feature is extracted for each page in the sample presentation, including: Arrange all the words in the file name of the sample presentation into a second sequence; The second sequence is input into a pre-trained twin neural network, and features of the second sequence are extracted as file name features of the pages in the sample presentation.
11. The method according to claim 2, characterized in that When the page features include structural features, the page features are extracted for each page in the sample presentation, including: Parsing the page to determine a first structural characteristic value of the page and a second structural characteristic value of the page; the first structural characteristic value of the page represents the number of preset structures contained in the page; the second structural characteristic value of the page represents the average area of the preset structures contained in the page; The first structural feature value of the page and the second structural feature value of the page are used as the structural feature of the page.
12. The method according to claim 2, characterized in that: When the page features include page attribute features, the page features are extracted for each page in the sample presentation, including: Extracting the font size of the characters in the page as a font size attribute feature value of the page; Detecting whether the page contains preset keywords, and determining the keyword attribute feature value of the page according to the detection result; Determining a homepage attribute feature value of the page according to whether the page is the first page of the sample presentation; Determining a last page attribute feature value of the page according to whether the page is the last page of the sample presentation; The font size attribute feature value, the keyword attribute feature value, the home page attribute feature value and the last page attribute feature value of the page are used as page attribute features of the page.
13. The method according to any one of claims 1 to 12, characterized in that: The page type recognition model includes a classification network and at least one fully connected network; The identifying the type of the target page by using the page type identification model includes: splicing the structural features of the target page and the content features of the target page into a feature matrix of the target page through the fully connected network, and performing vector processing on the feature matrix of the target page to obtain an intermediate vector; The intermediate vector is classified by the classification network to obtain the type of the target page.
14. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 13.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
