CN115048915B - Data processing method and system of electric power file based on operation platform - Google Patents

Data processing method and system of electric power file based on operation platform Download PDF

Info

Publication number
CN115048915B
CN115048915B CN202210985917.6A CN202210985917A CN115048915B CN 115048915 B CN115048915 B CN 115048915B CN 202210985917 A CN202210985917 A CN 202210985917A CN 115048915 B CN115048915 B CN 115048915B
Authority
CN
China
Prior art keywords
image
new image
region
file
pixel value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210985917.6A
Other languages
Chinese (zh)
Other versions
CN115048915A (en
Inventor
裘华东
胡若云
马亮
侯素颖
丁麒
孙钢
王庆娟
周永佳
严华江
胡瑛俊
景伟强
肖涛
林少娃
徐永进
陈思浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Zhejiang Electric Power Co Ltd
Marketing Service Center of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
State Grid Zhejiang Electric Power Co Ltd
Marketing Service Center of State Grid Zhejiang Electric Power 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 State Grid Zhejiang Electric Power Co Ltd, Marketing Service Center of State Grid Zhejiang Electric Power Co Ltd filed Critical State Grid Zhejiang Electric Power Co Ltd
Priority to CN202210985917.6A priority Critical patent/CN115048915B/en
Publication of CN115048915A publication Critical patent/CN115048915A/en
Application granted granted Critical
Publication of CN115048915B publication Critical patent/CN115048915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/418Document matching, e.g. of document images
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Abstract

The invention discloses a data processing method and a data processing system of an electric power file based on an operation platform, wherein the data processing method comprises the following steps: analyzing the online power report to obtain at least one file subregion of the online power report; extracting editable contents in the sub-area of the file; editing and modifying the editable content through an editing device based on rich text editing software to obtain modified content, and adjusting the modified content according to the plate-type specification of the file sub-region and/or the content format of the adjacent file sub-region to obtain adjusted content; the method comprises the steps that partition processing is conducted on a display area based on a preset proportion to obtain a first display area and a second display area, adjusted contents are displayed through the first display area after being synchronously modified in a power report, and edited file sub-areas are displayed through the second display area; and after first confirmation information input by a user is received, taking the modified online power report as a final online power report.

Description

Data processing method and system of electric power file based on operation platform
Technical Field
The invention relates to the technical field of data processing, in particular to a data processing method and a data processing system of an electric power file based on an operation platform.
Background
With the rapid development of modern power enterprises, a large number of power reports need to be made to show development conditions, generally speaking, the power reports have text display areas and picture display areas, and users can visually display power development data.
In the prior art, the prepared power report can be uploaded to a server, a user can check the power report in a webpage mode, and when the user needs to modify the power investigation report, the user can insert contents according to personal habits, so that newly inserted data can be different from an original data format, and the modified power report is relatively disordered.
Therefore, it is a problem that needs to be solved urgently how to make the inserted data conform to the plate-type requirement of the power report by adaptively adjusting the format and the content after the power report is edited by the user.
Disclosure of Invention
The invention overcomes the defects of the prior art and provides a data processing method and a data processing system of an electric power file based on an operation platform, which can adaptively adjust the format and the content after a user edits an online electric power report, so that the inserted data meets the plate-type requirements of the electric power report.
In order to solve the technical problems, the technical scheme of the invention is as follows:
the embodiment of the invention provides a data processing method of an electric power file based on an operation platform, wherein a management cockpit comprises a display device and an editing device, the display device comprises a display area and an editable area, and the electric power report is visually edited by the following steps of:
s1, displaying a corresponding online power report in display equipment according to the selection of a user, and analyzing the online power report to obtain at least one file subregion of the online power report;
s2, determining a file sub-region selected by a user, extracting editable contents in the file sub-region, and establishing a rich text editing region in the editable region;
s3, editing and modifying the editable content through an editing device based on rich text editing software to obtain modified content, and adjusting the modified content according to the plate type specification of the file sub-area and/or the content format of the adjacent file sub-area to obtain adjusted content;
s4, partitioning the display area based on a preset proportion to obtain a first display area and a second display area, displaying the adjusted content in the online power report after synchronous modification through the first display area, and displaying the edited file sub-area through the second display area;
and S5, after the first confirmation information input by the user is received, taking the modified online power report as a final online power report, and finishing the visual editing of the power report.
Further, the S1 includes:
acquiring an initial template corresponding to the online power report, wherein the initial template comprises at least one initial area, and the initial area comprises any one or more of a text editing area or a picture editing area;
analyzing the online power report based on the corresponding relation between the initial template and the initial area to obtain a file sub-area corresponding to the initial area;
determining a contour pixel point of each file subregion, and calculating according to a first pixel value of the contour pixel point and a second pixel value of an adjacent pixel point of the contour pixel point to obtain a third pixel value for displaying;
and controlling the contour pixel points of each file sub-region to be displayed according to the third pixel value.
Further, the determining of the contour pixel point of each file subregion calculates according to the first pixel value of the contour pixel point and the second pixel value of the adjacent pixel point of the contour pixel point to obtain a third pixel value for displaying, and includes:
if the absolute value of the difference value between the first pixel value and the second pixel value is judged to be larger than or equal to a preset pixel value, taking the first pixel value as a third pixel value for displaying;
if the absolute value of the difference value between the first pixel value and the second pixel value is smaller than a preset pixel value, determining the change trend of the pixel values of the contour pixel points according to the second pixel value;
if the change trend is an increasing trend, adding a preset pixel value to the first pixel value to obtain a third pixel value;
if the change trend is a reduction trend, subtracting a preset pixel value from the first pixel value to obtain a third pixel value;
and taking the calculated third pixel value as a third pixel value for displaying in place of the previous first pixel value.
Further, if it is determined that the absolute value of the difference between the first pixel value and the second pixel value is smaller than a preset pixel value, determining a variation trend of the pixel values of the contour pixel points according to the second pixel value, including:
if the second pixel value is smaller than or equal to a preset pixel value, determining that the change trend of the pixel values of the contour pixel points is an increasing trend;
and if the second pixel value is larger than the preset pixel value, determining the change trend of the pixel values of the contour pixel points to be a reduction trend.
Further, the method also comprises the following steps:
counting the number of pixel points of a third pixel value which is the same as the first pixel value to obtain a first number, and counting the number of pixel points of the third pixel value which is different from the first pixel value to obtain a second number;
obtaining a pixel value change ratio according to the first quantity and the second quantity, and selecting a first preset pixel value and a second preset pixel value if the pixel value change ratio is greater than a preset ratio;
and controlling the contour pixel points to alternately display preset time periods according to the first preset pixel value and the second preset pixel value respectively.
Further, the S3 includes:
if the initial area is a picture editing area, deleting a history image in the editable content according to user operation, and adding a new image;
acquiring plate type specifications of file subareas, wherein the plate type specifications comprise shape specifications and/or size specifications;
if the image shape of the new image is judged to be different from the shape specification of the file subarea, acquiring the content format of other file subareas adjacent to the file subarea to obtain a reference shape specification, wherein the reference shape specification is one of an adjusted shape or an unadjusted shape;
if the reference shape specification is the adjusted shape, displaying a new image according to the shape specification of the file sub-region, fusing the new image with the file sub-region, fusing the displayed new image and the file sub-region into the same shape, and obtaining the adjusted content of the image;
and if the reference shape specification is an irregular shape, adjusting the image size of the new image according to the size specification of the file sub-region, fusing the new image and the file sub-region, and obtaining the adjusted content of the image, wherein the new image and the file sub-region are in different shapes.
Further, if the reference shape specification is an adjusted shape, displaying a new image according to the shape specification of the file sub-region, and fusing the new image with the file sub-region, so that the displayed new image and the file sub-region are fused into the same shape, including:
selecting an image center point of the new image and selecting a region center point of the file sub-region;
based on the image central point and the area central point, overlapping the new image and the file sub-area to obtain a fusion central point, and establishing a coordinate system according to the fusion central point;
acquiring an image coordinate value of each image pixel point in a new image and a region coordinate value of each region pixel point in a file sub-region;
and comparing the image coordinate values with the region coordinate values, adjusting the image size of the new image to obtain a first target size, and fusing the new image of the first target size with the file subregion according to the fusion central point to fuse the displayed new image and the file subregion into the same shape.
Further, the comparing the image coordinate value with the region coordinate value, adjusting the image size of the new image to obtain the first target size, and fusing the new image of the first target size with the file sub-region according to the fusion central point, so that the displayed new image and the file sub-region are fused into the same shape, includes:
if the coordinates of the image coordinate values do not completely comprise the coordinates of the area coordinate values, acquiring all the coordinates which do not completely comprise the area coordinate values to obtain a first coordinate quantity, and determining a first magnification factor of the new image according to the first coordinate quantity;
amplifying the new image according to the first amplification factor, and extracting the image coordinate value of each image pixel point in the amplified new image;
and comparing the enlarged image coordinate value with the region coordinate value again, and if the coordinates of the enlarged image coordinate value of the new image completely comprise the coordinates of the region coordinate value, not enlarging the new image and taking the size of the new image as the first target size.
Further, if it is determined that the coordinates of the image coordinate values do not completely include the coordinates of the area coordinate values, acquiring all the coordinates that do not completely include the area coordinate values to obtain a first coordinate number, and determining a first magnification factor of the new image according to the first coordinate number, including:
acquiring a first total number of pixel points in a file subregion;
calculating a first magnification factor of the new image according to the first coordinate quantity, the first total quantity and the magnification weight value, calculating the first magnification factor by the following formula,
Figure DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 494454DEST_PATH_IMAGE002
is the first magnification factor and is the second magnification factor,
Figure 100002_DEST_PATH_IMAGE003
is a first number of coordinates of the first image,
Figure 403505DEST_PATH_IMAGE004
in the first total number, the number of the first,
Figure 100002_DEST_PATH_IMAGE005
to amplify the weight value.
Further, the comparing the image coordinate value with the area coordinate value, adjusting the image size of the new image to obtain the first target size, and fusing the new image of the first target size with the file sub-area according to the fusion center point, so that the displayed new image and the file sub-area are fused into the same shape, including:
if the coordinates of the image coordinate values completely comprise the coordinates of the area coordinate values, acquiring all the image coordinate values which do not completely comprise the area coordinate values in the image coordinate values to obtain a second coordinate number, and determining a first reduction multiple of the new image according to the second coordinate number;
reducing the new image according to the first reduction multiple, and extracting the image coordinate value of each image pixel point in the new image after reduction;
comparing the reduced image coordinate values with the region coordinate values again, if the coordinates of the image coordinate values of the reduced new image completely comprise the coordinates of the region coordinate values, obtaining all image coordinate values which do not correspond to the coordinates completely comprising the region coordinate values in the image coordinate values again to obtain a third coordinate number, and determining a second reduction multiple of the new image according to the third coordinate number;
and continuously comparing the image coordinate values after the reduction processing with the region coordinate values until the coordinates of the image coordinate values of the new image after the reduction processing do not completely include the coordinates of the region coordinate values, and taking the image size of the new image before the reduction as the first target size.
Further, if it is determined that the coordinates of the image coordinate values completely include the coordinates of the area coordinate values, acquiring all image coordinate values in the image coordinate values that do not correspond to the coordinates of the area coordinate values completely included, obtaining a second coordinate quantity, and determining a first reduction multiple of the new image according to the second coordinate quantity, where the method includes:
acquiring a second total number of image pixel points in the new image;
calculating a first reduction multiple of the new image according to the second coordinate number, the second total number and the reduction weight value, calculating the first reduction multiple by the following formula,
Figure 630349DEST_PATH_IMAGE006
wherein the content of the first and second substances,
Figure 100002_DEST_PATH_IMAGE007
is the first reduction multiple of the first size,
Figure 890429DEST_PATH_IMAGE008
in order to be the second number of coordinates,
Figure 100002_DEST_PATH_IMAGE009
in order to be the second total number,
Figure 234823DEST_PATH_IMAGE010
to reduce the weight value.
Further, if the reference shape specification is an irregular shape, adjusting the image size of the new image according to the size specification of the file sub-region, fusing the new image and the file sub-region, and obtaining the adjusted content of the image, where the new image and the file sub-region have different shapes, includes:
selecting an image center point of the new image and selecting a region center point of the file sub-region;
based on the image central point and the area central point, overlapping the new image and the file sub-area to obtain a fusion central point;
if the size of the new image is smaller than the size of the file sub-region in all dimensions, fusing the new image and the file sub-region;
if the size of the new image is larger than the size of the file sub-region in any dimension, obtaining a second reduction multiple according to the difference value between the size of the new image and the size of the file sub-region, calculating a third reduction multiple through the following formula,
Figure 732800DEST_PATH_IMAGE012
wherein the content of the first and second substances,
Figure 100002_DEST_PATH_IMAGE013
is the third reduction multiple of the first reduction factor,
Figure 910972DEST_PATH_IMAGE014
in order to be the size of the new image,
Figure 100002_DEST_PATH_IMAGE015
is the size of a sub-area of the file,
Figure 127189DEST_PATH_IMAGE016
to reduce the coefficient value;
and after the new image is reduced based on the reduction multiple, fusing the reduced new image with the file sub-region.
Further, if the size of the new image is smaller than the size of the file sub-region in all dimensions, respectively, fusing the new image and the file sub-region, including:
if the size of the new image is smaller than the size of the file sub-region in all dimensions respectively, outputting first feedback information;
if second confirmation information of the user is received, fusing the new image and the file sub-region;
and if a second magnification factor of the user is received, amplifying the new image according to the second magnification factor, and fusing the new image and the file sub-region when the size of the amplified new image is judged to be respectively smaller than the size of the file sub-region in all dimensions.
Further, the S3 includes:
if the initial area is a character editing area, deleting the historical characters in the editable content according to the user operation, and adding new characters to obtain the modified content;
acquiring a content format of a sub-area of an adjacent file, and taking a corresponding character size and a character style in the content format as a reference character size and a reference character style;
and adjusting the new characters in the modified content according to the size of the reference characters and the reference character patterns to obtain the adjusted content of the characters.
The embodiment of the invention provides a data processing system of an electric power file based on an operation platform, which comprises a display device and an editing device, wherein the display device comprises a display area and an editable area, and the electric power report is visually edited through the following modules, wherein the data processing system comprises:
the analysis module is used for displaying the corresponding online power report in the display equipment according to the selection of the user, and analyzing the online power report to obtain at least one file subregion of the online power report;
the extracting module is used for determining a file sub-region selected by a user, extracting editable contents in the file sub-region and establishing a rich text editing region in the editable region;
the modification module is used for editing and modifying the editable content through an editing device based on rich text editing software to obtain modified content, and adjusting the modified content according to the plate-type specification of the file subarea and/or the content format of the adjacent file subarea to obtain adjusted content;
the processing module is used for carrying out partition processing on the display area based on a preset proportion to obtain a first display area and a second display area, displaying the adjusted content in the online power report after synchronous modification through the first display area, and displaying the edited file sub-area through the second display area;
and the confirmation module is used for taking the modified online power report as a final online power report after receiving the first confirmation information input by the user, and finishing the visual editing of the power report.
The beneficial effects of the invention are:
(1) In the process of editing the online power report, the online power report is analyzed to obtain a plurality of file sub-regions which can be edited by users, and then the contents in the file sub-regions are edited by an editing device to obtain edited contents; in order to enable the content to conform to the plate-type specification of the file sub-area of the online power report and/or the content format of the adjacent file sub-area, the inserted content is adjusted differently according to different conditions, so that the plate-type specification of the content file sub-area and/or the content format of the adjacent file sub-area after adjustment are corresponding to each other, and the consistency of the online power report during viewing is ensured;
(2) After the online power report is analyzed, in order to improve the contrast of the contour, the third pixel value for displaying is obtained by calculating based on the first pixel value of the contour pixel point and the second pixel value of the adjacent pixel point of the contour pixel point, and the contour is made to be clear by the third pixel value. In addition, the method and the device consider that after the display color of the outline is adjusted, the outline can be displayed in a plurality of gray value types, the editing of a user can be influenced, and the alternate display of the outline pixel points can be controlled according to the first preset pixel value and the second preset pixel value under a certain condition, so that the outline can be displayed to the user more intuitively;
(3) In order to enable the added new image to be matched with the file sub-region, the method is divided into two conditions, wherein one condition is that the shape of the new image needs to be adjusted, and the other condition is that the shape of the new image does not need to be adjusted; aiming at the condition that the shape of a new image needs to be adjusted, the scheme also provides an amplification and reduction scheme of the new image, wherein the amplification factor and the reduction factor are calculated for the server to automatically amplify or reduce for multiple times, and the distortion rate of the new image is minimized under the condition that the size of the new image is most suitable; in addition, the scheme is different from the embodiment needing to adjust the shape aiming at the embodiment without adjusting the shape, the shape is adjusted by changing the shape of a new image, and therefore the server needs to be used for carrying out point-by-point adjustment to achieve the required accurate new image; aiming at the embodiment without adjusting the shape, the required new image can be realized by artificial intervention adjustment without little adjustment of the server, so that the data processing amount of the server is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic view of a scenario provided by the present invention;
FIG. 2 is a schematic diagram of a data processing method for an operating platform-based power file;
FIG. 3 is a diagram illustrating a first new image and a file sub-region provided in the present invention;
FIG. 4 is a diagram illustrating a second new image and a file sub-region provided in the present invention;
FIG. 5 is a diagram illustrating a third new image and a file sub-region provided in the present invention;
FIG. 6 is a diagram illustrating a fourth new image and a file sub-region provided by the present invention;
FIG. 7 is a diagram illustrating a fifth new image and a file sub-region provided in the present invention;
FIG. 8 is a schematic diagram of a data processing system based on an operating platform power file.
Detailed Description
In order that the present invention may be more readily and clearly understood, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings.
Referring to fig. 1, which is a schematic view of a scene provided in an embodiment of the present invention, a display device 1 may be a liquid crystal display, and specifically may be a large-sized liquid crystal display, where the display device 1 includes a display area and an editable area, it can be understood that the display area is used for displaying an online power report, and the editable area is used for a user to edit the online power report based on an editing apparatus; the editing apparatus 2 may be a device for inputting data, such as a keyboard and a mouse.
The embodiment of the invention provides a data processing method of an electric power file based on an operation platform, which is used for performing electric power report visual editing through the following steps of S1-S5, referring to FIG. 2, specifically as follows:
s1, displaying one online power report selected by a user in a webpage in the display equipment, and analyzing the online power report to obtain at least one file sub-area of the online power report.
When the power report needs to be edited, the scheme firstly analyzes the online power report to obtain at least one file sub-region of the online power report, and then edits the content in the file sub-region.
In some embodiments, the S1 includes S11-S14:
s11, obtaining an initial template corresponding to the online power report, wherein the initial template comprises at least one initial area, and the initial area comprises any one or more of a text editing area or a picture editing area.
It should be noted that, the online power reports in the present solution are all established based on one initial template, and the initial templates corresponding to the online power reports of the same type may be the same.
When the online power report needs to be edited, the initial template corresponding to the online power report is determined first, and then the online power report is analyzed by using the initial template to obtain the required content.
And S12, analyzing the online power report based on the corresponding relation between the initial template and the initial region to obtain a file sub-region corresponding to the initial region.
The initial template in the scheme comprises at least one initial area, and each initial area corresponds to any one or more of a character editing area or a picture editing area. It can be understood that the online power report generally includes a text region and a picture region, and the present solution may use the initial region to parse the online power report to obtain a file sub-region corresponding to the initial region.
S13, determining a contour pixel point of each file sub-region, and calculating according to a first pixel value of the contour pixel point and a second pixel value of an adjacent pixel point of the contour pixel point to obtain a third pixel value for displaying, wherein the first pixel value, the second pixel value and the third pixel value can refer to a gray value of the pixel point.
After the file sub-regions are obtained, each file sub-region has a corresponding outline, it can be understood that the content displayed by the online power report is more, the background color may also be of a larger variety of gray values, when the bottom plate color or the region color of the file sub-region is consistent with or close to the color of the outline, the outline definition is not sufficient, or the outline can be displayed in an intermittent manner, a clear outline reference cannot be provided for a user, and when a subsequent user edits the content in the file sub-region, the editing may be inaccurate.
In some embodiments, the S13 includes S131-S135:
s131, if it is determined that the absolute value of the difference between the first pixel value and the second pixel value is greater than or equal to a preset pixel value, taking the first pixel value as a third pixel value for displaying.
It can be understood that, according to the present disclosure, a difference value between the first pixel value and the second pixel value is obtained first, and if the difference value is greater than or equal to the preset pixel value, it is indicated that the color of the contour is different from the color of the neighboring area of the contour, at this time, the present disclosure directly uses the first pixel value as the third pixel value for displaying, for example, the preset pixel value is 127, at this time, the first pixel value may be 1, the second pixel value may be 130, at this time, the color contrast between the first pixel value and the second pixel value is relatively large, that is, the gray level difference between the first pixel value and the second pixel value is relatively large, which is convenient for the user to distinguish the contour of the image.
For example, the color corresponding to the first pixel value may be black, the color corresponding to the second pixel value may be white, and the degree of distinction between black and white may be large.
And S132, if the absolute value of the difference value between the first pixel value and the second pixel value is judged to be smaller than a preset pixel value, determining the change trend of the pixel values of the contour pixel points according to the second pixel value.
It can be understood that, if the difference value is less than or equal to the preset pixel value, it is indicated that the difference between the color of the outline and the colors of the file sub-region and the adjacent region of the outline is small, and at this time, the variation trend of the pixel value of the outline pixel point is determined based on the second pixel value. For example, the preset pixel value is 127, the first pixel value may be 120, the second pixel value may be 130, and the color contrast between the first pixel value and the second pixel value is small, that is, the gray level difference between the first pixel value and the second pixel value is small, which is inconvenient for a user to distinguish the image contour.
For example, the color corresponding to the first pixel value is dark gray, the color corresponding to the second pixel value is black, and the difference between the dark gray and the black is small.
In some embodiments, the step S132 (determining a variation trend of the pixel values of the contour pixel according to the second pixel value if the absolute value of the difference between the first pixel value and the second pixel value is smaller than a predetermined pixel value) includes:
and if the second pixel value is less than or equal to the preset pixel value, determining that the change trend of the pixel values of the contour pixel points is an increasing trend. The predetermined pixel value is about half 255, for example, and 127 is a specific example. For example, the gray value of the second pixel value is 80 (which may be obtained by dividing the R value plus the G value plus the B value by 3) and the gray value of the preset pixel value is 127, and the change trend of the pixel value of the contour pixel point is an increasing trend at this time, that is, the gray value of the first pixel value needs to be increased to increase the difference between the first pixel value and the second pixel value.
And if the second pixel value is larger than the preset pixel value, determining the change trend of the pixel values of the contour pixel points to be a reduction trend. For example, if the second pixel value is, for example, a gray scale value of 180, and the predetermined pixel value is, for example, 127, the change trend of the pixel values of the contour pixel points is a decreasing trend, i.e., the gray scale value of the first pixel value needs to be decreased to increase the difference between the first pixel value and the second pixel value.
And S133, if the change trend is an increasing trend, adding a preset pixel value to the first pixel value to obtain a third pixel value.
It can be understood that, in the present embodiment, the first pixel value is added to a predetermined pixel value (gray scale value) to obtain a third pixel value, for example, the first pixel value before the increase is 80, the second pixel value is 55, the first pixel value after the increase is 207 (gray scale value 80 plus gray scale value 127), and then the third pixel value is used to display the corresponding contour, so as to increase the distinction degree of the contour. The method can be realized, the gray values of two adjacent pixel points are relatively close and are dark (less than 127), at the moment, the method can adjust the first pixel value and brighten the first pixel value, so that the contrast between the outline pixel point and the adjacent pixel point is increased, and the corresponding pixel point is brightened from dark.
And S134, if the change trend is a reduction trend, subtracting a preset pixel value from the first pixel value to obtain a third pixel value. For example, the first pixel value before reduction is 197, the second pixel value is 180, the first pixel value after reduction may be 70 (gray value 197 minus gray value 127), and then the corresponding contour is displayed by the third pixel value, so as to increase the discrimination of the contour. The method can be realized, the gray values of two adjacent pixel points are relatively close and are both bright (larger than 127), at the moment, the method can adjust the first pixel value and dim the first pixel value, so that the contrast between the outline pixel point and the adjacent pixel point is increased, and the corresponding pixel point is lightened or darkened.
S135, the calculated third pixel value is used as the third pixel value for displaying in place of the previous first pixel value.
And S14, controlling the contour pixel points of each file subregion to be displayed according to the third pixel value.
It can be understood that after the third pixel value is obtained, the contour pixel point of each file sub-region is controlled to be displayed according to the third pixel value, and clear reference of the contour boundary can be provided for a user. According to the scheme, the display color of the outline is adjusted through the embodiment, the contrast of the outline display is increased, the user can refer to the outline display more intuitively in the editing process, and the accuracy of the user in the editing process is improved.
In view of the fact that the display color of the outline may be adjusted to result in the display of the outline with more types of gray values, which may affect the editing and viewing of the user, on the basis of the above embodiment, the method further includes:
and counting the number of pixel points of a third pixel value which is the same as the first pixel value to obtain a first number, and counting the number of pixel points of the third pixel value which is different from the first pixel value to obtain a second number. The scheme can count the number of the pixel points of the third pixel value which is the same as the first pixel value and the number of the pixel points of the third pixel value which is different from the first pixel value.
And obtaining a pixel value change ratio according to the first quantity and the second quantity, and selecting a first preset pixel value and a second preset pixel value if the pixel value change ratio is greater than a preset ratio. According to the scheme, the pixel value change ratios of the first quantity and the second quantity are calculated, if the pixel value change ratios are larger than the preset ratios, the fact that the display colors of the outlines are adjusted more and are possibly displayed in a mode of more gray value types is shown, at the moment, the scheme selects a first preset pixel value and a second preset pixel value, wherein the first preset pixel value can be a pixel value corresponding to white, and the second preset pixel value can be a pixel value corresponding to black.
And controlling the contour pixel points to alternately display preset time periods according to the first preset pixel value and the second preset pixel value respectively. According to the scheme, the contour pixel points are controlled to carry out stroboflash according to the first preset pixel value and the second preset pixel value, for example, the stroboflash can be carried out by displaying white in 1S mode, displaying black in 1S mode, displaying alternately, and visually displaying lines of the contours to a user.
S2, determining a file sub-area selected by a user, extracting editable contents in the file sub-area, and establishing a rich text editing area in the editable area.
When a user wants to edit the content in one of the file sub-regions, the corresponding file sub-region can be selected based on the editing device, and the server extracts the editable content in the file sub-region and establishes the rich text editing region in the editable region.
The rich text editing area is an area for a user to edit data, the user can edit the content in the rich text editing area based on rich text editing software, and the rich text editing software is a text editor which can be embedded in a browser and can be obtained by what you see, and is referred to as the prior art and is not described any more.
And S3, editing and modifying the editable content through an editing device based on rich text editing software to obtain modified content, and adjusting the modified content according to the plate-type specification of the file sub-area and/or the content format of the adjacent file sub-area to obtain adjusted content.
It can be understood that, in the present scheme, the editable content can be edited and modified by using an editing apparatus based on rich text editing software, where the rich text editing software is the prior art and is not described herein again.
Because the data input by the user may not match the original content of the file sub-region, for example, the font and size of the characters are different, and the shape and size of the picture also do not match the file sub-region, the modified content can be adjusted according to the plate-type specification of the file sub-region and/or the content format of the adjacent file sub-region after the modified content is obtained, so as to obtain the adjusted content.
Aiming at the difference that the initial area is the picture editing area and the initial area is the character editing area, the scheme has different layout implementation modes, and specifically comprises the following steps:
for the case where the initial region is a picture editing region:
in some embodiments, said S3 comprises S31-S35:
and S31, if the initial area is the picture editing area, deleting the historical image in the editable content according to the user operation, and adding a new image.
It will be appreciated that when a user wants to insert a new image into an online power report, the present scheme will first delete the historical images in the editable content and then add the new image.
S32, acquiring plate type specifications of the file subareas, wherein the plate type specifications comprise shape specifications and/or size specifications.
According to the method and the device, in order to enable the added new image to be matched with the file sub-region, the shape specification and/or the size specification of the file sub-region can be obtained, so that the new image can be automatically adjusted accurately, and the shape specification and/or the size specification of the new image can be adapted to the file sub-region.
And S33, if the image shape of the new image is judged to be different from the shape specification of the file sub-region, acquiring the content format of other file sub-regions adjacent to the file sub-region to obtain a reference shape specification, wherein the reference shape specification is one of an adjusted shape or an unadjusted shape.
For example, the shape of the image of the new image is a circle, and the shape of the file sub-region is a square, so that the shape specification of the image of the new image is different from the shape specification of the file sub-region, and at this time, the content format of other file sub-regions adjacent to the file sub-region is obtained, and then the reference shape specification is obtained to determine whether the shape of the new image needs to be adjusted, if the adjustment needs to be performed, the reference shape specification is the adjusted shape, and if the adjustment of the shape does not need to be performed, the reference shape specification is the unadjusted shape.
And S34, if the reference shape specification is the adjusted shape, displaying a new image according to the shape specification of the file sub-region, and fusing the new image and the file sub-region to form a new image with the same shape as the file sub-region, so as to obtain the adjusted content of the image.
It can be understood that, when the reference shape specification is the adjusted shape, the scheme displays a new image according to the shape specification of the file sub-region, and then fuses the new image with the file sub-region, so that the displayed new image and the file sub-region are fused into the same shape, and the adjusted content of the image is obtained.
In some embodiments, S34 (which displays the new image with the shape specification of the file sub-region if the reference shape specification is an adjusted shape, fuses the new image with the file sub-region such that the displayed new image fuses with the file sub-region in the same shape) includes S341-S344:
s341, selecting the image center point of the new image and the area center point of the selected file sub-area.
And S342, overlapping the new image and the file sub-region based on the image central point and the region central point to obtain a fusion central point, and establishing a coordinate system according to the fusion central point.
Firstly, the scheme determines the image center point of a new image and the area center point of a file sub-area, then the image center point and the image center point are fused to obtain a fusion center point, and a coordinate system is established at the fusion center point.
S343, obtaining the image coordinate value of each image pixel point in the new image and the area coordinate value of each area pixel point in the file sub-area.
According to the scheme, the new image is taken as a circle, the file subareas are taken as squares for explanation, the image coordinate values are the image coordinate values corresponding to the pixel points in the new image, and the area coordinate values are the coordinate values of each pixel point in the file subareas.
And S344, comparing the image coordinate values with the area coordinate values, adjusting the image size of the new image to obtain a first target size, and fusing the new image with the file sub-area according to the fusion central point to fuse the displayed new image and the file sub-area into the same shape.
According to the scheme, the image coordinate values and the area coordinate values are compared, then the image size of the new image is adjusted to obtain the first target size, the new image with the first target size and the file subarea are fused according to the fusion central point, and the displayed new image and the file subarea are fused into the same shape.
In the first case, a new image needs to be magnified:
in some embodiments, S344 (comparing the image coordinate values with the region coordinate values, adjusting the image size of the new image to obtain a first target size, and fusing the new image of the first target size with the sub-region of the file according to the fusion center point, so that the displayed new image and the sub-region of the file are fused into the same shape) includes A1 to A3:
a1, if the coordinates of the image coordinate values do not completely include the coordinates of the area coordinate values, acquiring all the coordinates which do not completely include the area coordinate values to obtain a first coordinate quantity, and determining a first magnification factor of the new image according to the first coordinate quantity.
It is to be understood that, if the coordinates of the image coordinate values do not completely include the coordinates of the area coordinate values, all the coordinates not completely including the area coordinate values are acquired at this time to obtain a first coordinate number, and the first magnification of the new image is determined according to the first coordinate number. It is understood that the larger the number of first coordinates, the larger the corresponding first magnification.
For example, referring to fig. 3, the new image is a circle, the file sub-region is a square, the coordinates of the region coordinate values corresponding to the four corners of the square are not included by the coordinates of the image coordinate values, and the larger the area of the four corners is, the larger the number of the corresponding first coordinates is, which indicates that the larger the new image needs to be enlarged, the larger the corresponding first enlargement factor is.
And A2, amplifying the new image according to the first amplification factor, and extracting the image coordinate value of each image pixel point in the amplified new image.
According to the scheme, after the first magnification factor is obtained, the first magnification factor is utilized to amplify a new image, and after the new image is amplified, the image coordinate value of each image pixel point in the new image after amplification is extracted again.
And A3, comparing the image coordinate value after the amplification treatment with the region coordinate value again, and if the coordinate of the image coordinate value after the new image amplification is judged to completely comprise the coordinate of the region coordinate value, not amplifying the new image and taking the size of the new image at the moment as a first target size.
According to the scheme, the new image is amplified by the first amplification factor, after amplification, the image coordinate value of each image pixel point in the amplified new image is extracted again, the amplified image coordinate value is compared with the region coordinate value again, if the coordinates of the image coordinate value of the amplified new image completely comprise the coordinates of the region coordinate value, the new image is not amplified any more, and the size of the new image at the moment is taken as the first target size.
It should be noted that, the server in this embodiment may perform automatic amplification processing for multiple times, and perform comparison with the previous image after each amplification processing, until the coordinates of the coordinate values of the image after the new image is amplified completely include the coordinates of the area coordinate values, the server does not perform amplification processing on the new image any more, the size of the new image at this time is the most appropriate size, and meanwhile, the distortion rate of the new image may be minimized.
Wherein, if it is determined that the coordinates of the image coordinate values do not completely include the coordinates of the area coordinate values, acquiring all the coordinates that do not completely include the area coordinate values to obtain a first coordinate number, and determining a first magnification factor of the new image according to the first coordinate number, includes:
acquiring a first total number of pixel points in a file subregion;
calculating to obtain a first magnification factor of the new image according to the first coordinate quantity, the first total quantity and the magnification weight value, calculating the first magnification factor by the following formula,
Figure 100002_DEST_PATH_IMAGE017
wherein, the first and the second end of the pipe are connected with each other,
Figure 275274DEST_PATH_IMAGE018
is the first magnification factor and is the second magnification factor,
Figure DEST_PATH_IMAGE019
in order to be the first number of coordinates,
Figure 17971DEST_PATH_IMAGE020
is the first number of the total number,
Figure 226098DEST_PATH_IMAGE005
to amplify the weight value.
In the above formula, the number of the first coordinates
Figure 664033DEST_PATH_IMAGE003
The larger the size of the hole is,
Figure DEST_PATH_IMAGE021
the larger the corresponding first magnification factor, and thus the larger the magnification factor for the new image.
It should be noted that, in the present scheme, the new image is rapidly and progressively amplified at a proper amplitude through the calculation of the first amplification factor, so as to obtain the final new image.
In the second case, the new image reduction processing is required:
in some embodiments, S344 (comparing the image coordinate values with the region coordinate values, adjusting the image size of the new image to obtain a first target size, and fusing the new image of the first target size with the sub-region of the file according to the fusion center point, so that the displayed new image and the sub-region of the file are fused into the same shape) includes B1 to B4:
b1, if the coordinates of the image coordinate values completely comprise the coordinates of the area coordinate values, acquiring all the image coordinate values which do not completely comprise the area coordinate values in the image coordinate values to obtain a second coordinate number, and determining a first reduction multiple of the new image according to the second coordinate number.
It can be understood that, if the coordinates of the image coordinate values completely include the coordinates of the area coordinate values, all the image coordinate values not completely including the area coordinate values are acquired at this time, the second coordinate number is obtained, and the first reduction factor of the new image is determined according to the second coordinate number. It is understood that the larger the number of second coordinates, the larger the corresponding first reduction factor.
For example, referring to fig. 4, the new image is a circle, the file sub-region is a square, the circle completely includes the square, and in the drawing, the number of coordinates corresponding to the area between the square and the circle, that is, the number of second coordinates of all image coordinate values that do not completely include the region coordinate value in the image coordinate values, it can be understood that the larger the area is, the more the number of corresponding second coordinates is, the smaller the new image needs to be reduced, and the larger the corresponding first reduction factor is.
Wherein, if it is determined that the coordinates of the image coordinate values completely include the coordinates of the area coordinate values, acquiring all image coordinate values in the image coordinate values that do not correspond to the coordinates that completely include the area coordinate values, obtaining a second coordinate number, and determining a first reduction multiple of the new image according to the second coordinate number, includes:
acquiring a second total number of image pixel points in the new image;
calculating according to the second coordinate number, the second total number and the reduction weight value to obtain a first reduction multiple of the new image, calculating the first reduction multiple by the following formula,
Figure 615808DEST_PATH_IMAGE006
wherein the content of the first and second substances,
Figure 88378DEST_PATH_IMAGE007
is the first reduction multiple of the first size,
Figure 342773DEST_PATH_IMAGE008
in order to be the second number of coordinates,
Figure 268004DEST_PATH_IMAGE009
in order to be the second total number,
Figure 757891DEST_PATH_IMAGE010
to reduce the weight value.
Number of second coordinates in the above formula
Figure 84967DEST_PATH_IMAGE022
The larger the size of the tube is,
Figure DEST_PATH_IMAGE023
the larger the corresponding first reduction factor
Figure 634897DEST_PATH_IMAGE007
The larger the image, the larger the magnification of the new image.
And B2, reducing the new image according to the first reduction multiple, and extracting the image coordinate value of each image pixel point in the new image after reduction.
According to the scheme, after the first reduction multiple is obtained, the new image is reduced by the first reduction multiple, and after the new image is reduced, the image coordinate value of each image pixel point in the new image after the reduction processing is extracted again.
And B3, comparing the image coordinate values after the reduction processing with the region coordinate values again, if the image coordinate values after the reduction processing of the new image completely comprise the coordinates of the region coordinate values, obtaining all the image coordinate values which do not completely comprise the region coordinate values in the image coordinate values again to obtain a third coordinate number, and determining a second reduction multiple of the new image according to the third coordinate number.
According to the scheme, after the image is reduced, the image coordinate value of each image pixel point in the new image after the reduction processing is extracted again, the image coordinate value after the reduction processing is compared with the region coordinate value again, if the coordinate of the image coordinate value after the new image is reduced is judged to be the coordinate completely including the region coordinate value, the third coordinate quantity is obtained through calculation again on the same principle, and the second reduction multiple of the new image is determined according to the third coordinate quantity.
And B4, continuously comparing the image coordinate values after the reduction processing with the region coordinate values until the coordinates of the image coordinate values of the new image after the reduction processing do not completely include the coordinates of the region coordinate values, and taking the image size of the new image before the reduction as a first target size.
According to the scheme, after the second reduction multiple is obtained, the image coordinate value after the reduction processing is compared with the region coordinate value until the coordinate of the image coordinate value of the new image after the reduction processing does not completely comprise the coordinate of the region coordinate value, and the image size of the new image before the reduction at this time is used as the first target size.
For example, referring to fig. 5, if the coordinates of the image coordinate values of the new image after the reduction processing in fig. 5 do not completely include the coordinates of the area coordinate values, the present embodiment may use the image size of the new image before the reduction of the image corresponding to fig. 5 as the first target size.
It should be understood that the image corresponding to fig. 5 refers to a circle reduced to a degree just like the intersection region of the square, and the reduced degree corresponding to the new image before the reduction is just like the intersection region of the square, so that the previous image is the best image, and the scheme can minimize the distortion rate during the image enlargement and reduction process under the condition of obtaining the required image size.
In the above embodiment, after the new image is resized, the extra portion outside the document sub-area may be cut out, the shape of the new image may be changed, and the cut out portion may be used as the content filled in the document sub-area.
And S35, if the reference shape specification is an irregular shape, adjusting the image size of the new image according to the size specification of the file sub-region, fusing the new image and the file sub-region, and obtaining the adjusted content of the image, wherein the new image and the file sub-region are in different shapes.
It can be understood that if the reference shape specification is an irregular shape, the shape of the new image does not need to be adjusted, but only the image size of the new image needs to be adjusted.
In some embodiments, S35 (if the reference shape specification is an irregular shape, then adjusting the image size of the new image according to the size specification of the file sub-region, and fusing the new image with the file sub-region, where the new image and the file sub-region are different shapes to obtain the adjusted content of the image) includes S351-S355:
s351, selecting the image center point of the new image and selecting the area center point of the file sub-area.
And S352, based on the image central point and the area central point, overlapping the new image and the file sub-area to obtain a fusion central point.
Firstly, the scheme determines the image center point of a new image and the area center point of a file sub-area, then utilizes the image center point and the image center point to carry out fusion to obtain a fusion center point, and establishes a coordinate system at the fusion center point.
And S353, if the size of the new image is smaller than that of the file sub-region in all dimensions, fusing the new image and the file sub-region.
All dimensions may refer to a length dimension and a width dimension, and it can be understood that, referring to fig. 6, the sizes of the new image corresponding to fig. 6 are respectively smaller than the sizes of the file sub-regions in the length dimension and the width dimension, and at this time, the new image and the file sub-regions may be directly merged.
In some embodiments, S353 (said fusing the new image and the file sub-region if the size of the new image is smaller than the size of the file sub-region in all dimensions, respectively) comprises:
and if the size of the new image is smaller than the size of the file sub-area in all dimensions, outputting first feedback information. It can be understood that the present solution generates the first feedback information to be displayed to the user when the size of the new image is smaller than the size of the file sub-region in all dimensions, respectively.
And if second confirmation information of the user is received, fusing the new image and the file sub-region. It will be appreciated that if second confirmation information is received from the user indicating that the user feels that the new image is of a size that is acceptable, the server may directly merge the new image with the sub-region of the file.
And if a second magnification factor of the user is received, amplifying the new image according to the second magnification factor, and fusing the new image and the file sub-region when the size of the amplified new image is judged to be smaller than that of the file sub-region in all dimensions. It will be appreciated that if the user is said to feel that the size of the new image is too small, a second magnification factor may be entered, and the server may magnify the new image according to the second magnification factor after receiving the second magnification factor of the user.
S354, if the size of the new image is larger than the size of the file sub-region in any dimension, obtaining a second reduction multiple according to the difference value between the size of the new image and the size of the file sub-region, calculating a third reduction multiple through the following formula,
Figure 47424DEST_PATH_IMAGE024
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE025
is a third reduction multiple of the number of the first and second lens groups,
Figure 229750DEST_PATH_IMAGE026
for the size of the new image to be,
Figure DEST_PATH_IMAGE027
is the size of a sub-area of the file,
Figure 676912DEST_PATH_IMAGE028
to reduce the coefficient value.
Referring to fig. 7, although the size of the new image corresponding to fig. 7 is larger than the width of the file sub-region in the width dimension, but is smaller than the size of the file sub-region in the length dimension, at this time, the new image cannot be placed in the file sub-region, and therefore, the new image needs to be reduced.
In the above formula, the larger the difference between the size of the new image (for example, the diameter of the new image) and the size of the sub-area of the file (for example, the width dimension), the larger the second reduction factor is obtained, and the larger the adjustment range for the new image is.
And S355, after the new image is reduced based on the reduction multiple, fusing the new image after the reduction processing with the file sub-region.
It is understood that after the new image is reduced by the reduction factor, the new image after the reduction process is merged with the file sub-region.
It should be noted that the present embodiment (not adjusting the shape) is different from the above embodiment (adjusting the shape) in that the adjusted shape is the shape of the new image is changed, so that the server needs to adjust the new image little by little to achieve the required accurate new image; aiming at the embodiment without adjusting the shape, the required new image can be realized by artificial intervention adjustment without little adjustment of the server, so that the data processing amount of the server is reduced.
For the case where the initial region is a text editing region:
in other embodiments, the S3 comprises:
and if the initial area is a character editing area, deleting the historical characters in the editable content according to the user operation, and adding new characters to obtain the modified content. It can be understood that, first, the present solution deletes the history words in the editable content, and then adds new words to obtain the modified content.
And acquiring a content format of the adjacent file sub-region, and taking the corresponding character size and character style in the content format as a reference character size and a reference character style.
And adjusting the new characters in the modified content according to the size of the reference characters and the reference character style to obtain the adjusted content of the characters.
It can be understood that, according to the scheme, the content format of the adjacent file sub-region is referred to, then the corresponding character size and character style in the content format are used as the reference character size and the reference character style, and the new characters in the modified content are adjusted to obtain the adjusted content of the characters.
And S4, partitioning the display area based on a preset proportion to obtain a first display area and a second display area, displaying the adjusted content in the online power report after synchronous modification through the first display area, and displaying the edited file sub-area through the second display area.
According to the scheme, the display area is partitioned according to a preset proportion (for example, one half) to obtain a first display area and a second display area, then the adjusted content is displayed through the first display area after being synchronously modified in the online power report, and the edited file sub-area is displayed through the second display area.
It can be understood that the user can highlight the edited file sub-region through the second display region, so that the edited content is more prominent, and the accuracy of the user in the editing process is improved.
And S5, after the first confirmation information input by the user is received, taking the modified online power report as a final online power report, and finishing the visual editing of the power report.
After the user finishes editing, the server receives the first confirmation information input by the user, takes the modified online power report as a final online power report, and finishes the visual editing of the online power report.
In order to implement the data processing method of the power file based on the operation platform provided by the present invention, referring to fig. 8, the data processing system of the power file based on the operation platform performs the visual editing of the power report through the following modules, including:
the analysis module is used for displaying the corresponding online power report in the display equipment according to the selection of the user, and analyzing the online power report to obtain at least one file subregion of the online power report;
the extraction module is used for determining a file sub-region selected by a user, extracting editable contents in the file sub-region and establishing a rich text editing region in the editable region;
the modification module is used for editing and modifying the editable content through an editing device based on rich text editing software to obtain modified content, and adjusting the modified content according to the plate-type specification of the file subarea and/or the content format of the adjacent file subarea to obtain adjusted content;
the processing module is used for carrying out partition processing on the display area based on a preset proportion to obtain a first display area and a second display area, displaying the adjusted content in the online power report after synchronous modification through the first display area, and displaying the edited file sub-area through the second display area;
and the confirmation module is used for taking the modified online power report as a final online power report after receiving the first confirmation information input by the user, and finishing the visual editing of the power report.
In addition to the above embodiments, the present invention may have other embodiments; all technical solutions formed by adopting equivalent substitutions or equivalent transformations fall within the protection scope of the claims of the present invention.

Claims (14)

1. The data processing method of the power file based on the operation platform is characterized by comprising a display device and an editing device, wherein the display device comprises a display area and an editable area, and power report visual editing is performed through the following steps of:
s1, displaying a corresponding online power report in display equipment according to selection of a user, and analyzing the online power report to obtain at least one file subregion of the online power report;
s2, determining a file sub-region selected by a user, extracting editable contents in the file sub-region, and establishing a rich text editing region in the editable region;
s3, editing and modifying the editable content through an editing device based on rich text editing software to obtain modified content, and adjusting the modified content according to the plate type specification of the file sub-area and/or the content format of the adjacent file sub-area to obtain adjusted content;
s4, partitioning the display area based on a preset proportion to obtain a first display area and a second display area, displaying the adjusted content in the online power report after synchronous modification through the first display area, and displaying the edited file sub-area through the second display area;
s5, after first confirmation information input by a user is received, taking the modified online power report as a final online power report, and finishing the visual editing of the power report;
the S1 comprises:
acquiring an initial template corresponding to the online power report, wherein the initial template comprises at least one initial area, and the initial area comprises any one or more of a text editing area or a picture editing area;
analyzing the online power report based on the corresponding relation between the initial template and the initial area to obtain a file sub-area corresponding to the initial area;
determining a contour pixel point of each file subregion, and calculating according to a first pixel value of the contour pixel point and a second pixel value of an adjacent pixel point of the contour pixel point to obtain a third pixel value for displaying;
and controlling the contour pixel points of each file sub-region to be displayed according to the third pixel value.
2. The data processing method of the power file based on the operation platform according to claim 1,
the determining of the contour pixel point of each file subregion is performed according to the first pixel value of the contour pixel point and the second pixel value of the adjacent pixel point of the contour pixel point, so as to obtain a third pixel value for displaying, and the method comprises the following steps:
if the absolute value of the difference value between the first pixel value and the second pixel value is judged to be larger than or equal to a preset pixel value, taking the first pixel value as a third pixel value for displaying;
if the absolute value of the difference value between the first pixel value and the second pixel value is smaller than a preset pixel value, determining the change trend of the pixel values of the contour pixel points according to the second pixel value;
if the change trend is an increasing trend, adding a preset pixel value to the first pixel value to obtain a third pixel value;
if the change trend is a reduction trend, subtracting a preset pixel value from the first pixel value to obtain a third pixel value;
and taking the calculated third pixel value as a third pixel value for displaying in place of the previous first pixel value.
3. The data processing method for power files based on an operating platform according to claim 2,
if the absolute value of the difference value between the first pixel value and the second pixel value is smaller than a preset pixel value, determining the variation trend of the pixel values of the contour pixel points according to the second pixel value, including:
if the second pixel value is smaller than or equal to a preset pixel value, determining the change trend of the pixel values of the contour pixel points to be an increasing trend;
and if the second pixel value is larger than the preset pixel value, determining the change trend of the pixel values of the contour pixel points to be a reduction trend.
4. The data processing method for the power file based on the operating platform as claimed in claim 2, further comprising:
counting the number of pixel points of a third pixel value which is the same as the first pixel value to obtain a first number, and counting the number of pixel points of the third pixel value which is different from the first pixel value to obtain a second number;
obtaining a pixel value change ratio according to the first quantity and the second quantity, and selecting a first preset pixel value and a second preset pixel value if the pixel value change ratio is greater than a preset ratio;
and controlling the contour pixel points to alternately display a preset time period according to the first preset pixel value and the second preset pixel value respectively.
5. The data processing method for power files based on an operating platform according to claim 1,
the S3 comprises the following steps:
if the initial area is a picture editing area, deleting a history image in the editable content according to user operation, and adding a new image;
acquiring plate type specifications of file subregions, wherein the plate type specifications comprise shape specifications and/or size specifications;
if the image shape of the new image is judged to be different from the shape specification of the file subarea, acquiring the content format of other file subareas adjacent to the file subarea to obtain a reference shape specification, wherein the reference shape specification is one of an adjusted shape or an unadjusted shape;
if the reference shape specification is the adjusted shape, displaying a new image according to the shape specification of the file sub-region, and fusing the new image and the file sub-region to ensure that the displayed new image and the file sub-region are fused into the same shape to obtain the adjusted content of the image;
and if the reference shape specification is the irregular shape, adjusting the image size of the new image according to the size specification of the file sub-region, fusing the new image and the file sub-region, wherein the new image and the file sub-region have different shapes at the moment, and obtaining the adjusted content of the image.
6. The data processing method for power files based on an operating platform according to claim 5,
if the reference shape specification is an adjusted shape, displaying a new image according to the shape specification of the file sub-region, and fusing the new image and the file sub-region to fuse the displayed new image and the file sub-region into the same shape, including:
selecting an image center point of a new image and selecting an area center point of a file sub-area;
based on the image central point and the area central point, overlapping the new image and the file sub-area to obtain a fusion central point, and establishing a coordinate system according to the fusion central point;
acquiring an image coordinate value of each image pixel point in a new image and a region coordinate value of each region pixel point in a file sub-region;
and comparing the image coordinate values with the region coordinate values, adjusting the image size of the new image to obtain a first target size, and fusing the new image of the first target size with the file subregion according to the fusion central point to fuse the displayed new image and the file subregion into the same shape.
7. The data processing method for power files based on an operating platform according to claim 6,
the method for comparing the image coordinate value with the region coordinate value, adjusting the image size of a new image to obtain a first target size, and fusing the new image with the file subarea of the first target size according to the fusion central point to fuse the displayed new image and the file subarea into the same shape includes the following steps:
if the coordinate of the image coordinate value does not completely comprise the coordinate of the area coordinate value, acquiring all coordinates which do not completely comprise the area coordinate value to obtain a first coordinate quantity, and determining a first magnification factor of the new image according to the first coordinate quantity;
amplifying the new image according to the first amplification factor, and extracting the image coordinate value of each image pixel point in the amplified new image;
and comparing the enlarged image coordinate value with the region coordinate value again, and if the coordinates of the enlarged image coordinate value of the new image completely comprise the coordinates of the region coordinate value, not enlarging the new image and taking the size of the new image as the first target size.
8. The data processing method for power files based on an operating platform according to claim 7,
if the coordinates of the image coordinate values do not completely include the coordinates of the area coordinate values, acquiring all the coordinates which do not completely include the area coordinate values to obtain a first coordinate quantity, and determining a first magnification factor of the new image according to the first coordinate quantity, wherein the steps of:
acquiring a first total number of pixel points in a file subregion;
calculating to obtain a first magnification factor of the new image according to the first coordinate quantity, the first total quantity and the magnification weight value, calculating the first magnification factor by the following formula,
Figure 86590DEST_PATH_IMAGE002
wherein, the first magnification is the first magnification,
Figure DEST_PATH_IMAGE003
in order to be the first number of coordinates,
Figure 426567DEST_PATH_IMAGE004
in the first total number, the number of the first,
Figure DEST_PATH_IMAGE005
to amplify the weight value.
9. The data processing method for power files based on an operating platform according to claim 6,
the method for fusing the displayed new image and the file subregion into the same shape comprises the following steps of comparing the image coordinate values with the region coordinate values, adjusting the image size of the new image to obtain a first target size, fusing the new image of the first target size with the file subregion according to a fusion central point, and fusing the displayed new image and the file subregion into the same shape:
if the coordinates of the image coordinate values completely comprise the coordinates of the area coordinate values, acquiring all the image coordinate values which do not completely comprise the area coordinate values in the image coordinate values to obtain a second coordinate number, and determining a first reduction multiple of the new image according to the second coordinate number;
reducing the new image according to the first reduction multiple, and extracting the image coordinate value of each image pixel point in the new image after reduction;
comparing the reduced image coordinate values with the region coordinate values again, if the coordinates of the image coordinate values after the new image reduction completely comprise the coordinates of the region coordinate values, obtaining all image coordinate values which do not correspond to the coordinates completely comprising the region coordinate values in the image coordinate values again to obtain a third coordinate number, and determining a second reduction multiple of the new image according to the third coordinate number;
and continuously comparing the image coordinate values after the reduction processing with the region coordinate values until the coordinates of the image coordinate values of the new image after the reduction processing do not completely include the coordinates of the region coordinate values, and taking the image size of the new image before the reduction as the first target size.
10. The data processing method for power files based on an operating platform according to claim 9,
if the coordinates of the image coordinate values completely comprise the coordinates of the area coordinate values, all the image coordinate values which do not correspond to the coordinates completely comprising the area coordinate values in the image coordinate values are obtained, a second coordinate quantity is obtained, and a first reduction multiple of the new image is determined according to the second coordinate quantity, wherein the method comprises the following steps:
acquiring a second total number of image pixel points in the new image;
calculating a first reduction multiple of the new image according to the second coordinate number, the second total number and the reduction weight value, calculating the first reduction multiple by the following formula,
Figure DEST_PATH_IMAGE007
wherein the content of the first and second substances,
Figure 959966DEST_PATH_IMAGE008
is the first reduction multiple of the first size,
Figure DEST_PATH_IMAGE009
in order to be the second number of coordinates,
Figure 683071DEST_PATH_IMAGE010
in order to provide a second total number of,
Figure DEST_PATH_IMAGE011
to reduce the weight value.
11. The data processing method for power files based on an operating platform according to claim 5,
if the reference shape specification is an irregular shape, adjusting the image size of the new image according to the size specification of the file sub-region, fusing the new image with the file sub-region, and obtaining the adjusted content of the image, wherein the new image and the file sub-region are in different shapes at the moment, and the method comprises the following steps:
selecting an image center point of the new image and selecting a region center point of the file sub-region;
based on the image central point and the area central point, overlapping the new image and the file sub-area to obtain a fusion central point;
if the size of the new image is smaller than the size of the file sub-region in all dimensions, fusing the new image and the file sub-region;
if the size of the new image is larger than the size of the file sub-region in any dimension, obtaining a second reduction multiple according to the difference value between the size of the new image and the size of the file sub-region, calculating a third reduction multiple through the following formula,
Figure DEST_PATH_IMAGE013
wherein the content of the first and second substances,
Figure 44914DEST_PATH_IMAGE014
is a third reduction multiple of the number of the first and second lens groups,
Figure DEST_PATH_IMAGE015
in order to be the size of the new image,
Figure 428228DEST_PATH_IMAGE016
is the size of a sub-area of the file,
Figure DEST_PATH_IMAGE017
to reduce the coefficient value;
and after the new image is reduced based on the reduction multiple, fusing the reduced new image with the file sub-region.
12. The data processing method for power files based on an operating platform according to claim 11,
if the size of the new image is smaller than the size of the file sub-region in all dimensions, fusing the new image and the file sub-region, including:
if the size of the new image is smaller than the size of the file sub-region in all dimensions respectively, outputting first feedback information;
if second confirmation information of the user is received, fusing the new image and the file sub-region;
and if a second magnification factor of the user is received, amplifying the new image according to the second magnification factor, and fusing the new image and the file sub-region when the size of the amplified new image is judged to be respectively smaller than the size of the file sub-region in all dimensions.
13. The data processing method for power files based on an operating platform according to claim 1,
the S3 comprises the following steps:
if the initial area is a character editing area, deleting the historical characters in the editable content according to the user operation, and adding new characters to obtain the modified content;
acquiring a content format of a sub-area of an adjacent file, and taking a corresponding character size and a character style in the content format as a reference character size and a reference character style;
and adjusting the new characters in the modified content according to the size of the reference characters and the reference character patterns to obtain the adjusted content of the characters.
14. The data processing system of the power file based on the operation platform is characterized by comprising a display device and an editing device, wherein the display device comprises a display area and an editable area, and power report visual editing is performed through the following modules, and the data processing system comprises:
the analysis module is used for displaying the corresponding online power report in the display equipment according to the selection of the user, and analyzing the online power report to obtain at least one file sub-area of the online power report;
the extraction module is used for determining a file sub-region selected by a user, extracting editable contents in the file sub-region and establishing a rich text editing region in the editable region;
the modification module is used for editing and modifying the editable content through an editing device based on rich text editing software to obtain modified content, and adjusting the modified content according to the plate-type specification of the file subarea and/or the content format of the adjacent file subarea to obtain adjusted content;
the processing module is used for carrying out partition processing on the display area based on a preset proportion to obtain a first display area and a second display area, displaying the adjusted content in the online power report after synchronous modification through the first display area, and displaying the edited file sub-area through the second display area;
the confirmation module is used for taking the modified online power report as a final online power report after receiving first confirmation information input by a user and finishing the visual editing of the power report;
the parsing module is configured to:
acquiring an initial template corresponding to the online power report, wherein the initial template comprises at least one initial area, and the initial area comprises any one or more of a text editing area or a picture editing area;
analyzing the online power report based on the corresponding relation between the initial template and the initial area to obtain a file sub-area corresponding to the initial area;
determining a contour pixel point of each file subregion, and calculating according to a first pixel value of the contour pixel point and a second pixel value of an adjacent pixel point of the contour pixel point to obtain a third pixel value for displaying;
and controlling the contour pixel points of each file sub-region to be displayed according to the third pixel value.
CN202210985917.6A 2022-08-17 2022-08-17 Data processing method and system of electric power file based on operation platform Active CN115048915B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210985917.6A CN115048915B (en) 2022-08-17 2022-08-17 Data processing method and system of electric power file based on operation platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210985917.6A CN115048915B (en) 2022-08-17 2022-08-17 Data processing method and system of electric power file based on operation platform

Publications (2)

Publication Number Publication Date
CN115048915A CN115048915A (en) 2022-09-13
CN115048915B true CN115048915B (en) 2022-11-01

Family

ID=83168312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210985917.6A Active CN115048915B (en) 2022-08-17 2022-08-17 Data processing method and system of electric power file based on operation platform

Country Status (1)

Country Link
CN (1) CN115048915B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2578988A (en) * 2018-09-19 2020-06-03 Imagical LLC Automated text layout, color and other stylization on an image or video, and the tracking and application of user color preferences
CN112017195A (en) * 2020-08-26 2020-12-01 上海三维工程建设咨询有限公司 Intelligent integrated monitoring system applied to urban rail transit

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4251629B2 (en) * 2003-01-31 2009-04-08 キヤノン株式会社 Image processing system, information processing apparatus, control method, computer program, and computer-readable storage medium
CN100501728C (en) * 2003-01-31 2009-06-17 佳能株式会社 Image processing method, system, program, program storage medium and information processing apparatus
CN107656941A (en) * 2016-07-26 2018-02-02 阿里巴巴集团控股有限公司 Document analysis method, apparatus and editor
CN110019860A (en) * 2017-12-04 2019-07-16 天津三星电子有限公司 A kind of processing method and electronic equipment of multimedia file
CN109299446B (en) * 2018-08-03 2022-08-12 新华三大数据技术有限公司 Report generation method and device
CN109948510B (en) * 2019-03-14 2021-06-11 北京易道博识科技有限公司 Document image instance segmentation method and device
WO2021169502A1 (en) * 2020-02-27 2021-09-02 Changsha Pixel Code Technology Co. Ltd A pixel image as well as its processing method and application system
CN111553137B (en) * 2020-03-30 2023-03-21 深圳平安医疗健康科技服务有限公司 Report generation method and device, storage medium and computer equipment
CN111488104B (en) * 2020-04-16 2021-10-12 维沃移动通信有限公司 Font editing method and electronic equipment
CN113076814B (en) * 2021-03-15 2022-02-25 腾讯科技(深圳)有限公司 Text area determination method, device, equipment and readable storage medium
CN112989782B (en) * 2021-04-22 2021-08-27 北京三维天地科技股份有限公司 Method for automatic template configuration and report generation
CN113744830A (en) * 2021-08-20 2021-12-03 海南视联大健康智慧医疗科技有限公司 Report generation method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2578988A (en) * 2018-09-19 2020-06-03 Imagical LLC Automated text layout, color and other stylization on an image or video, and the tracking and application of user color preferences
CN112017195A (en) * 2020-08-26 2020-12-01 上海三维工程建设咨询有限公司 Intelligent integrated monitoring system applied to urban rail transit

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Toshiki Honda ; Kohei Mukaiyama ; Takeharu Shirai ; Tetsushi Ohki ; .Ransomware Detection Considering User"s Document Editing.《2018 IEEE 32nd International Conference on Advanced Information Networking and Applications (AINA)》.2018,第907-914页. *
Word文档中AutoCAD数据格式图形显示效果的高效编辑研究;景天虎 马小龙 刘均利 莫时旭;《图学学报》;20151015;第36卷(第5期);第811-818页 *
文档我做主 调配由我定;小t;《电脑迷》;20101201(第23期);全文 *
联合编辑文档 你来定规矩;Coco;《电脑迷》;20130401(第04期);全文 *

Also Published As

Publication number Publication date
CN115048915A (en) 2022-09-13

Similar Documents

Publication Publication Date Title
US7561722B2 (en) System and method for interactive document layout
US7356202B2 (en) Image processing apparatus, an image processing method, and a computer readable medium having recorded thereon a processing program for permitting a computer to perform image processing routines
EP0441359A2 (en) Method of and apparatus for extracting image contour data
CN115098084A (en) Non-coding form design and drawing method
CN109893852B (en) Interface information processing method and device
JP2003030673A (en) Image layout evaluation method, image layout evaluation system and image layout evaluation processing program
EP1431921A2 (en) Image layout processing apparatus, method, and program
CN115188349B (en) Method and system for editing user-defined content of mobile variable traffic information board
CN115048915B (en) Data processing method and system of electric power file based on operation platform
EP1271921B1 (en) Picture editing
US7079702B2 (en) Image processing method and apparatus for judging image condition and correcting image
US5027420A (en) Method and apparatus for generating patterns with a user preference learning function
CN110248147B (en) Image display method and device
JP6006560B2 (en) Web content color creation support method and web content color creation support device
US5302967A (en) Figure processing apparatus and method aided by display with ruled lines
CN115964037B (en) Engineering data visualization low-code configuration method and system
US10789735B2 (en) Intelligent systems and methods for producing a dynamic color combination for a design output
CN112580123B (en) Liang Tuyuan editing method, liang Tuyuan editing device, electronic equipment and readable storage medium
US20170091969A1 (en) WHATIF ONE-PAGE MULTI-Y AXIS GRAPHING SYSTEM for automated optimization and sensitivity analysis
JP2004157927A (en) Creating system for business form input, creating program and creating method
KR102064367B1 (en) Image tagging device and method thereof
CN114879960A (en) Page chart position self-adaptive adjusting method, system, equipment and medium
JPS6349978A (en) Character processing system
JPH08335245A (en) Document reader
JP3117982B2 (en) Document processing apparatus and method

Legal Events

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