CN115048915A - 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
CN115048915A
CN115048915A CN202210985917.6A CN202210985917A CN115048915A CN 115048915 A CN115048915 A CN 115048915A CN 202210985917 A CN202210985917 A CN 202210985917A CN 115048915 A CN115048915 A CN 115048915A
Authority
CN
China
Prior art keywords
image
new image
region
pixel value
file
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.)
Granted
Application number
CN202210985917.6A
Other languages
Chinese (zh)
Other versions
CN115048915B (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 transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Supply And Distribution Of Alternating Current (AREA)
  • Editing Of Facsimile Originals (AREA)

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 content in the file sub-region; 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 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 system for power files based on an operating platform.

背景技术Background technique

随着现代化电力企业的快速发展,需要制作大量的电力报告来展示发展状况,一般来说,电力报告中会有文字展示区域和图片展示区域,直观的像用户展示电力发展数据。With the rapid development of modern power enterprises, it is necessary to produce a large number of power reports to display the development status. Generally speaking, there will be text display areas and picture display areas in the power reports, which can intuitively display power development data to users.

现有技术中,制作好的电力报告会上传到服务器,用户可以以网页的形式查看电力报告,用户需要对电力调研报告进行修改时,会按照个人习惯插入内容,导致新插入的数据会与原始数据格式不一,使得被修改后的电力报告较为混乱。In the prior art, the prepared electricity report will be uploaded to the server, and the user can view the electricity report in the form of a web page. When the user needs to modify the electricity research report, the content will be inserted according to personal habits, resulting in the newly inserted data will be different from the original data. The data formats vary, making the revised power reports confusing.

因此,如何在用户对电力报告进行编辑后对格式和内容进行相适应调整,使得插入的数据符合电力报告的板式要求成为了急需解决的问题。Therefore, how to adapt the format and content after editing the power report by the user, so that the inserted data meets the panel requirements of the power report, has become an urgent problem to be solved.

发明内容SUMMARY OF THE INVENTION

本发明克服现有技术的缺点,提供一种基于操作平台的电力文件的数据处理方法及系统,可以在用户对在线电力报告进行编辑后对格式和内容进行相适应调整,使得插入的数据符合电力报告的板式要求。The present invention overcomes the shortcomings of the prior art, and provides a data processing method and system for power files based on an operating platform, which can adjust the format and content after the user edits the online power report, so that the inserted data conforms to the power Slab requirements for the report.

为了解决以上技术问题,本发明的技术方案如下:In order to solve the above technical problems, the technical scheme of the present invention is as follows:

本发明实施例提供一种基于操作平台的电力文件的数据处理方法,所述管理驾驶舱包括显示设备和编辑装置,所述显示设备包括显示区域和可编辑区域,通过以下步骤进行电力报告可视化编辑,包括:An embodiment of the present invention provides a data processing method for a power file based on an operation platform, the management cockpit includes a display device and an editing device, the display device includes a display area and an editable area, and the power report is visually edited through the following steps ,include:

S1、根据用户的选择将相应的在线电力报告在显示设备中进行显示,对在线电力报告进行解析处理,得到在线电力报告的至少一个文件子区域;S1. Display the corresponding online power report on the display device according to the user's selection, and perform parsing processing on the online power report to obtain at least one file sub-area of the online power report;

S2、确定用户选择的文件子区域,提取所述文件子区域内的可编辑内容,在所述可编辑区域内建立富文本编辑区域;S2, determine the file sub-region selected by the user, extract the editable content in the file sub-region, and establish a rich text editing region in the editable region;

S3、通过编辑装置基于富文本编辑软件对所述可编辑内容进行编辑修改,得到修改后内容,根据所述文件子区域的板式规格和/或相邻文件子区域的内容格式对修改后内容进行调整,得到调整后内容;S3. Editing and modifying the editable content based on rich text editing software by an editing device to obtain the modified content, and performing the modification on the modified content according to the board specification of the file sub-region and/or the content format of the adjacent file sub-region Adjust, get the adjusted content;

S4、基于预设比例对所述显示区域进行分区处理得到第一显示区域和第二显示区域,将所述调整后内容在在线电力报告中同步修改后通过第一显示区域显示,通过第二显示区域对所编辑的文件子区域进行显示;S4. Perform partition processing on the display area based on a preset ratio to obtain a first display area and a second display area, and synchronously modify the adjusted content in the online power report to display it in the first display area, and display it through the second display area. The area displays the sub-area of the edited file;

S5、在接收到用户输入的第一确认信息后,将修改后的在线电力报告作为最终在线电力报告,结束对电力报告可视化编辑。S5. After receiving the first confirmation information input by the user, take the modified online power report as the final online power report, and end the visual editing of the power report.

进一步的,所述S1包括:Further, the S1 includes:

获取所述在线电力报告所对应的初始模板,所述初始模板包括至少一个初始区域,所述初始区域包括文字编辑区域或图片编辑区域中的任意一种或多种;acquiring an initial template corresponding to the online power report, the initial template includes at least one initial area, and the initial area includes any one or more of a text editing area or a picture editing area;

基于所述初始模板与初始区域的对应关系对在线电力报告进行解析处理,得到与所述初始区域对应的文件子区域;Perform parsing processing on the online power report based on the corresponding relationship between the initial template and the initial area, to obtain a file sub-area corresponding to the initial area;

确定每个文件子区域的轮廓像素点,根据轮廓像素点的第一像素值、轮廓像素点相邻像素点的第二像素值进行计算,得到用于显示的第三像素值;Determine the contour pixel point of each file sub-region, calculate according to the first pixel value of the contour pixel point, the second pixel value of the adjacent pixel point of the contour pixel point, and obtain the third pixel value for display;

控制每个文件子区域的轮廓像素点按照所述第三像素值进行显示。The outline pixels of each file sub-area are controlled to be displayed according to the third pixel value.

进一步的,所述确定每个文件子区域的轮廓像素点,根据轮廓像素点的第一像素值、轮廓像素点相邻像素点的第二像素值进行计算,得到用于显示的第三像素值,包括:Further, the determination of the outline pixel points of each file sub-region is calculated according to the first pixel value of the outline pixel point and the second pixel value of the adjacent pixel points of the outline pixel point to obtain the third pixel value for display. ,include:

若判断所述第一像素值与所述第二像素值的差值的绝对值大于等于预设像素值,则将所述第一像素值作为用于显示的第三像素值;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, the first pixel value is used as the third pixel value for display;

若判断所述第一像素值与所述第二像素值的差值的绝对值小于预设像素值,则根据所述第二像素值确定轮廓像素点的像素值的变化趋势;If it is determined that the absolute value of the difference between the first pixel value and the second pixel value is smaller than the preset pixel value, determining the change trend of the pixel value of the contour pixel point 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 decreasing trend, subtracting a preset pixel value from the first pixel value to obtain a third pixel value;

将所计算得到的第三像素值作为替换先前第一像素值、用于进行显示的第三像素值。The calculated third pixel value is used as the third pixel value for displaying instead 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 less than a preset pixel value, then determine the change trend of the pixel value of the contour pixel point according to the second pixel value. ,include:

若所述第二像素值小于等于预设像素值,则确定轮廓像素点的像素值的变化趋势为增大趋势;If the second pixel value is less than or equal to the preset pixel value, it is determined that the change trend of the pixel value of the contour pixel point is an increasing trend;

若所述第二像素值大于预设像素值,则确定轮廓像素点的像素值的变化趋势为减小趋势。If the second pixel value is greater than the preset pixel value, it is determined that the change trend of the pixel value of the contour pixel point is a decreasing trend.

进一步的,还包括:Further, it also includes:

统计与第一像素值相同的第三像素值的像素点数量得到第一数量,统计与第一像素值不相同的第三像素值的像素点数量得到第二数量;Counting the number of pixels of the third pixel value that is the same as the first pixel value to obtain the first number, and counting the number of pixels of the third pixel value that is different from the first pixel value to obtain the second number;

根据所述第一数量、第二数量得到像素值变化比例,若所述像素值变化比例大于预设比例,则选取第一预设像素值和第二预设像素值;The pixel value change ratio is obtained according to the first quantity and the second quantity, and if the pixel value change ratio is greater than a preset ratio, the first preset pixel value and the second preset pixel value are selected;

控制所述轮廓像素点分别按照所述第一预设像素值和第二预设像素值,交替显示预设时间段。The contour pixels are controlled to alternately display preset time periods according to the first preset pixel value and the second preset pixel value respectively.

进一步的,所述S3包括:Further, the S3 includes:

若所述初始区域为图片编辑区域,则根据用户操作删除可编辑内容中的历史图像,并添加新图像;If the initial area is a picture editing area, delete the historical image in the editable content according to the user operation, and add a new image;

获取文件子区域的板式规格,所述板式规格包括形状规格和/或尺寸规格;Obtaining the sheet specification of the document sub-area, the sheet specification including the shape specification and/or the size specification;

若判断新图像的图像形状与文件子区域的形状规格不相同,则对文件子区域相邻的其他文件子区域的内容格式进行获取,得到参考形状规格,所述参考形状规格为调整形状或不调整形状中的一个;If it is determined that the image shape of the new image is not the same as the shape specification of the file sub-region, the content formats of other file sub-regions adjacent to the file sub-region are acquired to obtain a reference shape specification, where the reference shape specification is to adjust the shape or not Adjust one of the shapes;

若所述参考形状规格为调整形状,则以文件子区域的形状规格对新图像显示,将新图像与文件子区域融合,使得所展示的新图像与文件子区域融合为相同形状,得到为图像的调整后内容;If the reference shape specification is the adjusted shape, the new image is displayed with the shape specification of the file sub-region, and the new image is fused with the file sub-region, so that the displayed new image and the file sub-region are fused into the same shape, and an image is obtained. The adjusted content of ;

若所述参考形状规格为不调整形状,则根据所述文件子区域的尺寸规格对所述新图像的图像尺寸进行调整,将新图像与文件子区域融合,此时新图像和文件子区域为不同的形状,得到为图像的调整后内容。If the reference shape specification is not to adjust the shape, the image size of the new image is adjusted according to the size specification of the file sub-area, and the new image and the file sub-area are fused. At this time, the new image and the file sub-area are: Different shapes are obtained for the adjusted content of the image.

进一步的,所述若所述参考形状规格为调整形状,则以文件子区域的形状规格对新图像显示,将新图像与文件子区域融合,使得所展示的新图像与文件子区域融合为相同形状,包括:Further, if the reference shape specification is to adjust the shape, the new image is displayed with the shape specification of the file sub-region, and the new image is fused with the file sub-region, so that the displayed new image and the file sub-region are fused to be the same. shapes, including:

选中新图像的图像中心点,以及选中文件子区域的区域中心点;Select the image center point of the new image, and the area center point of the selected file sub-area;

基于所述图像中心点和区域中心点,将所述新图像与文件子区域进行叠加设置得到融合中心点,根据所述融合中心点建立坐标系;Based on the image center point and the area center point, the new image and the file sub-region are superimposed and set to obtain a fusion center point, and a coordinate system is established according to the fusion center point;

获取新图像中每个图像像素点的图像坐标值,以及文件子区域中每个区域像素点的区域坐标值;Obtain the image coordinate value of each image pixel in the new image, and the area coordinate value of each area pixel in the sub-area of the file;

将图像坐标值与区域坐标值进行比对,对新图像的图像尺寸进行调整得到第一目标尺寸,将第一目标尺寸的新图像与文件子区域根据融合中心点进行融合,使得所展示的新图像与文件子区域融合为相同形状。Compare the image coordinate value with the area coordinate value, adjust the image size of the new image to obtain the first target size, and fuse 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 The image and file sub-areas are blended into the same shape.

进一步的,所述将图像坐标值与区域坐标值进行比对,对新图像的图像尺寸进行调整得到第一目标尺寸,将第一目标尺寸的新图像与文件子区域根据融合中心点进行融合,使得所展示的新图像与文件子区域融合为相同形状,包括:Further, the image coordinate value is compared with the area coordinate value, the image size of the new image is adjusted to obtain the first target size, and the new image of the first target size and the file sub-area are fused according to the fusion center point, Makes the displayed new image blend into the same shape as the document sub-area, including:

若判断图像坐标值的坐标未完全包括区域坐标值的坐标,则获取未完全包括区域坐标值的所有坐标得到第一坐标数量,根据所述第一坐标数量确定所述新图像的第一放大倍数;If it is determined that the coordinates of the image coordinate values do not completely include the coordinates of the area coordinate values, obtain all coordinates that do not completely include the area coordinate values to obtain the first coordinate number, and determine the first magnification of the new image according to the first coordinate number ;

根据所述第一放大倍数对新图像放大处理,提取放大处理后新图像中每个图像像素点的图像坐标值;Enlarging the new image according to the first magnification, and extracting the image coordinate value of each image pixel in the new image after the enlarging process;

将放大处理后的图像坐标值再次与区域坐标值进行比对,若判断新图像放大后的图像坐标值的坐标完全包括区域坐标值的坐标,则不再对新图像进行放大处理,将此时新图像的尺寸作为第一目标尺寸。Compare the enlarged image coordinate value with the area coordinate value again. If it is judged that the coordinate value of the enlarged image coordinate value of the new image completely includes the coordinate value of the area coordinate value, then the enlargement processing of the new image will not be performed. The size of the new image is used 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 regional coordinate values, then obtain all the coordinates that do not completely include the regional coordinate values to obtain the first coordinate number, and determine the new image according to the first coordinate number. the first magnification, including:

获取文件子区域内像素点的第一总数量;Get the first total number of pixels in the sub-region of the file;

根据所述第一坐标数量、第一总数量、放大权重值进行计算得到所述新图像的第一放大倍数,通过以下公式计算第一放大倍数,The first magnification of the new image is obtained by calculation according to the first coordinate number, the first total number, and the magnification weight value, and the first magnification is calculated by the following formula:

Figure DEST_PATH_IMAGE001
Figure DEST_PATH_IMAGE001

其中,

Figure 494454DEST_PATH_IMAGE002
为第一放大倍数,
Figure DEST_PATH_IMAGE003
为第一坐标数量,
Figure 403505DEST_PATH_IMAGE004
为第一总数量,
Figure DEST_PATH_IMAGE005
为放大权重值。in,
Figure 494454DEST_PATH_IMAGE002
is the first magnification,
Figure DEST_PATH_IMAGE003
is the first coordinate number,
Figure 403505DEST_PATH_IMAGE004
is the first total quantity,
Figure DEST_PATH_IMAGE005
is the amplification weight value.

进一步的,所述将图像坐标值与区域坐标值进行比对,对新图像的图像尺寸进行调整得到第一目标尺寸,将第一目标尺寸的新图像与文件子区域根据融合中心点进行融合,使得所展示的新图像与文件子区域融合为相同形状,包括:Further, the image coordinate value is compared with the area coordinate value, the image size of the new image is adjusted to obtain the first target size, and the new image of the first target size and the file sub-area are fused according to the fusion center point, Makes the displayed new image blend into the same shape as the document sub-area, including:

若判断图像坐标值的坐标完全包括区域坐标值的坐标,则获取图像坐标值中未完全包括区域坐标值的所有图像坐标值,得到第二坐标数量,根据所述第二坐标数量确定所述新图像的第一缩小倍数;If it is determined that the coordinates of the image coordinate values completely include the coordinates of the area coordinate values, acquire all the image coordinate values that do not completely include the area coordinate values in the image coordinate values, obtain the second coordinate number, and determine the new coordinate value according to the second coordinate number. the first reduction factor of the image;

根据所述第一缩小倍数对新图像缩小处理,提取缩小处理后新图像中每个图像像素点的图像坐标值;Reduce the new image according to the first reduction factor, and extract the image coordinate value of each image pixel in the new image after the reduction process;

将缩小处理后的图像坐标值再次与区域坐标值进行比对,若判断新图像缩小后的图像坐标值的坐标完全包括区域坐标值的坐标,则再次获取图像坐标值中未与坐标完全包括区域坐标值对应的所有图像坐标值,得到第三坐标数量,根据所述第三坐标数量确定所述新图像的第二缩小倍数;Compare the reduced image coordinate value with the area coordinate value again. If it is judged that the coordinate value of the reduced image coordinate value of the new image completely includes the coordinate value of the area coordinate value, then obtain again the image coordinate value that does not completely include the area with the coordinates. All the image coordinate values corresponding to the coordinate values, obtain the third coordinate quantity, and determine the second reduction factor of the new image according to the third coordinate quantity;

持续将缩小处理后的图像坐标值与区域坐标值进行比对,直至缩小处理后新图像的图像坐标值的坐标不完全包括区域坐标值的坐标,将本次缩小前的新图像的图像尺寸作为第一目标尺寸。Continue to compare the image coordinate value after the reduction process with the area coordinate value, until the coordinate value of the image coordinate value of the new image after the reduction process does not completely include the coordinate value of the area coordinate value, and use the image size of the new image before this reduction as the image size. The first target size.

进一步的,所述若判断图像坐标值的坐标完全包括区域坐标值的坐标,则获取图像坐标值中未与坐标完全包括区域坐标值对应的所有图像坐标值,得到第二坐标数量,根据所述第二坐标数量确定所述新图像的第一缩小倍数,包括:Further, if it is determined that the coordinates of the image coordinate value completely include the coordinates of the regional coordinate value, then obtain all the image coordinate values corresponding to the coordinates that do not completely include the regional coordinate value in the image coordinate value, and obtain the second coordinate number, according to the The second number of coordinates determines the first reduction factor of the new image, including:

获取新图像内图像像素点的第二总数量;Get the second total number of image pixels in the new image;

根据所述第二坐标数量、第二总数量、缩小权重值进行计算得到所述新图像的第一缩小倍数,通过以下公式计算第一缩小倍数,The first reduction factor of the new image is obtained by calculation according to the second coordinate number, the second total number, and the reduction weight value, and the first reduction factor is calculated by the following formula:

Figure 630349DEST_PATH_IMAGE006
Figure 630349DEST_PATH_IMAGE006

其中,

Figure DEST_PATH_IMAGE007
为第一缩小倍数,
Figure 890429DEST_PATH_IMAGE008
为第二坐标数量,
Figure DEST_PATH_IMAGE009
为第二总数量,
Figure 234823DEST_PATH_IMAGE010
为缩小权重值。in,
Figure DEST_PATH_IMAGE007
is the first reduction factor,
Figure 890429DEST_PATH_IMAGE008
is the second coordinate number,
Figure DEST_PATH_IMAGE009
is the second total quantity,
Figure 234823DEST_PATH_IMAGE010
to reduce the weight value.

进一步的,所述若所述参考形状规格为不调整形状,则根据所述文件子区域的尺寸规格对所述新图像的图像尺寸进行调整,将新图像与文件子区域融合,此时新图像和文件子区域为不同的形状,得到为图像的调整后内容,包括:Further, if the reference shape specification is not to adjust the shape, the image size of the new image is adjusted according to the size specification of the file sub-region, and the new image is fused with the file sub-region. and file sub-areas of different shapes, resulting in the adjusted content of the image, including:

选中新图像的图像中心点,以及选中文件子区域的区域中心点;Select the image center point of the new image, and the area center point of the selected file sub-area;

基于所述图像中心点和区域中心点,将所述新图像与文件子区域进行叠加设置得到融合中心点;Based on the image center point and the area center point, the new image and the file sub-area are superimposed and set to obtain a fusion center point;

若所述新图像的尺寸在所有维度上分别小于文件子区域的尺寸,则将所述新图像和文件子区域融合;If the size of the new image is smaller than the size of the file sub-region in all dimensions, the new image and the file sub-region are fused;

若所述新图像的尺寸在任意一个维度上大于文件子区域的尺寸,则根据新图像的尺寸与文件子区域的尺寸的差值得到第二缩小倍数,通过以下公式计算第三缩小倍数,If the size of the new image is larger than the size of the file sub-region in any dimension, the second reduction factor is obtained according to the difference between the size of the new image and the size of the file sub-region, and the third reduction factor is calculated by the following formula:

Figure 732800DEST_PATH_IMAGE012
Figure 732800DEST_PATH_IMAGE012

其中,

Figure DEST_PATH_IMAGE013
为第三缩小倍数,
Figure 910972DEST_PATH_IMAGE014
为新图像的尺寸,
Figure DEST_PATH_IMAGE015
为文件子区域的尺寸,
Figure 127189DEST_PATH_IMAGE016
为缩小系数值;in,
Figure DEST_PATH_IMAGE013
is the third reduction factor,
Figure 910972DEST_PATH_IMAGE014
is the size of the new image,
Figure DEST_PATH_IMAGE015
is the size of the file sub-area,
Figure 127189DEST_PATH_IMAGE016
is the reduction factor value;

基于所述缩小倍数对新图像进行缩小处后,将缩小处理后的新图像与文件子区域融合。After the new image is reduced based on the reduction factor, the reduced new image is fused 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, the new image and the file sub-region are fused, including:

若所述新图像的尺寸在所有维度上分别小于文件子区域的尺寸,则输出第一反馈信息;If the size of the new image is smaller than the size of the file sub-region in all dimensions, output the first feedback information;

若接收到用户的第二确认信息,则将所述新图像和文件子区域融合;If the second confirmation information from the user is received, the new image is merged with the file sub-region;

若接收到用户的第二放大倍数,则根据所述第二放大倍数对所述新图像放大处理,在判断放大处理后的新图像的尺寸在所有维度上分别小于文件子区域的尺寸,则将所述新图像和文件子区域融合。If the user's second magnification is received, the new image is enlarged according to the second magnification, and after judging that the size of the enlarged new image is smaller than the size of the file sub-area in all dimensions, the The new image and document sub-regions are fused.

进一步的,所述S3包括:Further, the S3 includes:

若所述初始区域为文字编辑区域,则根据用户操作删除可编辑内容中的历史文字,并添加新文字得到修改后内容;If the initial area is a text editing area, delete the historical text in the editable content according to the user operation, and add new text to obtain the modified content;

获取相邻文件子区域的内容格式,将所述内容格式中对应的文字大小和文字样式作为参考文字大小和参考文字样式;Obtain the content format of the adjacent file sub-region, and use the corresponding text size and text style in the content format as the reference text size and reference text style;

将所述修改后内容中的新文字,按照所述参考文字大小和参考文字样式进行调整,得到为文字的调整后内容。The new text in the modified content is adjusted according to the size of the reference text and the style of the reference text to obtain the adjusted content as text.

本发明实施例提供一种基于操作平台的电力文件的数据处理系统,包括显示设备和编辑装置,所述显示设备包括显示区域和可编辑区域,通过以下模块进行电力报告可视化编辑,包括:An embodiment of the present invention provides a data processing system for power files based on an operating platform, including a display device and an editing device, the display device includes a display area and an editable area, and the following modules are used to perform visual editing of power reports, including:

解析模块,用于根据用户的选择将相应的在线电力报告在显示设备中进行显示,对在线电力报告进行解析处理,得到在线电力报告的至少一个文件子区域;a parsing module, configured to display the corresponding online power report on the display device according to the user's selection, perform parsing processing on the online power report, and obtain at least one file sub-area of the online power report;

提取模块,用于确定用户选择的文件子区域,提取所述文件子区域内的可编辑内容,在所述可编辑区域内建立富文本编辑区域;an extraction module, configured to determine the file sub-region selected by the user, extract the editable content in the file sub-region, and establish a rich text editing region in the editable region;

修改模块,用于通过编辑装置基于富文本编辑软件对所述可编辑内容进行编辑修改,得到修改后内容,根据所述文件子区域的板式规格和/或相邻文件子区域的内容格式对修改后内容进行调整,得到调整后内容;A modification module, used for editing and modifying the editable content based on rich text editing software by an editing device, to obtain the modified content, and modifying the content according to the board specification of the file sub-region and/or the content format of the adjacent file sub-region After adjusting the content, get the adjusted content;

处理模块,用于基于预设比例对所述显示区域进行分区处理得到第一显示区域和第二显示区域,将所述调整后内容在在线电力报告中同步修改后通过第一显示区域显示,通过第二显示区域对所编辑的文件子区域进行显示;The processing module is configured to perform partition processing on the display area based on a preset ratio to obtain a first display area and a second display area, and display the adjusted content through the first display area after synchronously modifying the online power report, and display it through the first display area. The second display area displays the edited file sub-area;

确认模块,用于在接收到用户输入的第一确认信息后,将修改后的在线电力报告作为最终在线电力报告,结束对电力报告可视化编辑。The confirmation module is configured to use the modified online power report as the final online power report after receiving the first confirmation information input by the user, and end the visual editing of the power report.

本发明的有益效果是:The beneficial effects of the present invention are:

(1)本发明在对在线电力报告进行编辑的过程中,会对在线电力报告解析得到多个可供用户编辑的文件子区域,然后通过编辑装置对文件子区域内的内容进行编辑,得到编辑的内容;其中,为了使得内容符合在线电力报告的文件子区域的板式规格和/或相邻文件子区域的内容格式,本方案会按照不同的情况对插入的内容进行不同的调整,使得调整后的内容文件子区域的板式规格和/或相邻文件子区域的内容格式相对应,保证在线电力报告的查看时的一致性;(1) In the process of editing the online power report, the present invention analyzes the online power report to obtain a plurality of file sub-regions that can be edited by the user, and then edits the content in the file sub-region through the editing device to obtain the edited file. content; wherein, in order to make the content conform to the panel specification of the file sub-region of the online power report and/or the content format of the adjacent file sub-region, this solution will make different adjustments to the inserted content according to different situations, so that after the adjustment The board specifications of the content file sub-area of the corresponding file and/or the content format of the adjacent file sub-area correspond to ensure the consistency when viewing the online power report;

(2)本发明在对在线电力报告解析后,为了提高轮廓的对比度,会基于轮廓像素点的第一像素值、轮廓像素点相邻像素点的第二像素值进行计算,得到用于显示的第三像素值,以第三像素值来让轮廓变的清晰,本发明对轮廓的显示颜色进行了调整,增加了轮廓显示的对比度,更直观的供用户在编辑过程中参考,提高用户在编辑过程中的准确性。此外,本方案考虑到对轮廓的显示颜色进行调整后,可能会导致轮廓显示为灰度值种类较多的,可能会影响用户编辑,会在一定条件下,按照第一预设像素值和第二预设像素值控制轮廓像素点交替显示,来更为直观的向用户展示轮廓的线条;(2) After analyzing the online power report, in order to improve the contrast of the outline, the present invention will calculate based on the first pixel value of the outline pixel point and the second pixel value of the adjacent pixel points of the outline pixel point to obtain the display value. The third pixel value is used to make the contour clearer. The present invention adjusts the display color of the contour, increases the contrast of the contour display, is more intuitive for the user to refer to in the editing process, and improves the user's ability in editing. accuracy in the process. In addition, this solution takes into account that after adjusting the display color of the outline, the outline may be displayed as a variety of gray values, which may affect the user's editing. Under certain conditions, according to the first preset pixel value and the first preset pixel value. Two preset pixel values control the alternate display of outline pixels to more intuitively show the outline lines to the user;

(3)本发明为了使得添加的新图像匹配文件子区域,分为了两种情况,一种是需要对新图像的形状进行调整,另一种是不需要对新图像的形状进行调整;针对需要对新图像的形状进行调整的情况,本方案又提供的新图像的放大和缩小方案,其中会计算放大倍数和缩小倍数,来供服务器多次自动放大或缩小处理,在使得新图像的尺寸是最为合适的情况下,使新图像的失真率最小;另外,本方案针对不调整形状的实施例与需要调整形状的实施例不同,调整形状是对新图像的形状进行了改变,因此需要利用服务器来一点点调整,以达到所需的准确的新图像;而针对于不调整形状实施例,人为介入调整即可以实现所需要的新图像,无需服务器一点点调整,减少服务器的数据处理量。(3) In the present invention, in order to make the added new image match the sub-area of the file, it is divided into two cases, one is that the shape of the new image needs to be adjusted, and the other is that the shape of the new image does not need to be adjusted; In the case of adjusting the shape of the new image, this solution also provides a new image enlargement and reduction solution, in which the enlargement and reduction factors are calculated for the server to automatically enlarge or reduce for many times, so that the size of the new image is In the most suitable case, the distortion rate of the new image is minimized; in addition, this solution is different from the embodiment that does not need to adjust the shape for the embodiment that needs to adjust the shape. Adjusting the shape changes the shape of the new image, so it needs to use the server. A little adjustment is needed to achieve the required accurate new image; and for the embodiment without shape adjustment, the required new image can be achieved by human intervention adjustment, without the need for a little adjustment by the server, reducing the data processing volume of the server.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1为本发明提供的一种场景示意图;1 is a schematic diagram of a scenario provided by the present invention;

图2为基于操作平台的电力文件的数据处理方法的示意图;Fig. 2 is the schematic diagram of the data processing method of the power file based on the operation platform;

图3为本发明提供的第一种新图像与文件子区域的示意图;3 is a schematic diagram of the first new image and file sub-region provided by the present invention;

图4为本发明提供的第二种新图像与文件子区域的示意图;4 is a schematic diagram of a second new image and file sub-region provided by the present invention;

图5为本发明提供的第三种新图像与文件子区域的示意图;5 is a schematic diagram of a third new image and file sub-region provided by the present invention;

图6为本发明提供的第四种新图像与文件子区域的示意图;6 is a schematic diagram of the fourth new image and file sub-region provided by the present invention;

图7为本发明提供的第五种新图像与文件子区域的示意图;7 is a schematic diagram of the fifth new image and file sub-region provided by the present invention;

图8为基于操作平台的电力文件的数据处理系统的示意图。FIG. 8 is a schematic diagram of a data processing system based on a power file of an operating platform.

具体实施方式Detailed ways

为使本发明的内容更容易被清楚地理解,下面根据具体实施方式并结合附图,对本发明作出进一步详细的说明。In order to make the content of the present invention easier to understand clearly, the present invention will be further described in detail below according to specific embodiments and in conjunction with the accompanying drawings.

参见图1,是本发明实施例提供的一种场景示意图,显示设备1可以是液晶显示器,具体可以是大型的液晶显示器,显示设备1包括显示区域和可编辑区域,可以理解的是,显示区域用于显示在线电力报告,可编辑区域供用户基于编辑装置来编辑在线电力报告;编辑装置2例如可以是键盘、鼠标等输入数据的设备。Referring to FIG. 1, it is a schematic diagram of a scenario provided by an embodiment of the present invention. The display device 1 may be a liquid crystal display, specifically a large liquid crystal display, and the display device 1 includes a display area and an editable area. It can be understood that the display area For displaying the online power report, the editable area is for the user to edit the online power report based on the editing device; the editing device 2 can be, for example, a device for inputting data such as a keyboard and a mouse.

本发明实施例提供一种基于操作平台的电力文件的数据处理方法,通过以下步骤进行电力报告可视化编辑,包括步骤S1-S5,参见图2,具体如下:An embodiment of the present invention provides a data processing method for a power file based on an operation platform. The following steps are used to visually edit a power report, including steps S1-S5, see FIG. 2, and the details are as follows:

S1、将用户在网页中任意选择的一个在线电力报告显示在所述显示设备中,对在线电力报告进行解析处理,得到在线电力报告的至少一个文件子区域。S1. Display an online power report arbitrarily selected by the user in the web page on the display device, and perform parsing processing on the online power report to obtain at least one file sub-area of the online power report.

用户可以在网页中任意选择的一个需要编辑的在线电力报告,在需要对电力报告进行编辑时,本方案会先对在线电力报告进行解析,得到在线电力报告的至少一个文件子区域,然后对文件子区域内的内容进行编辑操作。The user can arbitrarily select an online power report that needs to be edited in the web page. When the power report needs to be edited, the solution will first parse the online power report to obtain at least one file sub-area of the online power report, and then analyze the file. Edit the content in the sub-area.

在一些实施例中,所述S1包括S11- S14:In some embodiments, the S1 includes S11-S14:

S11,获取所述在线电力报告所对应的初始模板,所述初始模板包括至少一个初始区域,所述初始区域包括文字编辑区域或图片编辑区域中的任意一种或多种。S11: Acquire an initial template corresponding to the online power report, where the initial template includes at least one initial area, and the initial area includes any one or more of a text editing area or a picture editing area.

需要说明的是,本方案中的在线电力报告都是基于一个初始模板建立的,同一类型的在线电力报告所对应的初始模板可以是相同的。It should be noted that the online power reports in this solution are all established based on an initial template, and the initial templates corresponding to the same type of online power reports may be the same.

本方案需要对在线电力报告进行编辑时,会首先确定在线电力报告所对应的初始模板,然后利用初始模板来对在线电力报告进行解析处理,得到所需要的内容。When the online power report needs to be edited in this scheme, the initial template corresponding to the online power report will be determined first, and then the initial template will be used to parse and process the online power report to obtain the required content.

S12,基于所述初始模板与初始区域的对应关系对在线电力报告进行解析处理,得到与所述初始区域对应的文件子区域。S12: Perform parsing processing on the online power report based on the corresponding relationship between the initial template and the initial area, to obtain a file sub-area corresponding to the initial area.

本方案中的初始模板包括至少一个初始区域,每个初始区域对应文字编辑区域或图片编辑区域中的任意一种或多种。可以理解的是,在线电力报告一般包括文字区域和图片区域,本方案会利用初始区域来对在线电力报告进行解析,得到与初始区域对应的文件子区域。The initial template in this solution includes at least one initial area, and each initial area corresponds to any one or more of a text editing area or a picture editing area. It can be understood that the online power report generally includes a text area and a picture area, and this solution will use the initial area to parse the online power report to obtain a file sub-area corresponding to the initial area.

S13,确定每个文件子区域的轮廓像素点,根据轮廓像素点的第一像素值、轮廓像素点相邻像素点的第二像素值进行计算,得到用于显示的第三像素值,其中第一像素值、第二像素值以及第三像素值可以指的是像素点的灰度值。S13: Determine the contour pixel points of each file sub-region, and perform calculation according to the first pixel value of the contour pixel point and the second pixel value of the adjacent pixel points of the contour pixel point to obtain a third pixel value for display, wherein the third pixel value is obtained. The one pixel value, the second pixel value and the third pixel value may refer to the gray value of the pixel point.

本方案在得到文件子区域后,每个文件子区域都有对应的轮廓,可以理解的是,在线电力报告所展示的内容较多,背景颜色可能也是灰度值种类较多的,当文件子区域的底板颜色或者区域颜色与轮廓的颜色一致或者接近时,就会导致轮廓清晰度不够,或者轮廓会以断断续续的形式展现,无法给用户提供一个明晰的轮廓参考,后续用户在编辑文件子区域内的内容时,可能会出现编辑不准确的现象,本方案为了解决上述问题,会基于轮廓像素点的第一像素值、轮廓像素点相邻像素点的第二像素值进行计算,得到用于显示的第三像素值,以第三像素值来让轮廓变的清晰。After the file sub-areas are obtained in this scheme, each file sub-area has a corresponding outline. It can be understood that the online power report displays a lot of content, and the background color may also have a variety of gray values. When the color of the bottom plate of the area or the color of the area is the same as or close to the color of the outline, the outline will not be clear enough, or the outline will be displayed intermittently, which cannot provide a clear outline reference for the user. Inaccurate editing may occur when the content of the The displayed third pixel value is used to make the outline clearer.

在一些实施例中,所述S13包括S131- S135:In some embodiments, the S13 includes S131-S135:

S131,若判断所述第一像素值与所述第二像素值的差值的绝对值大于等于预设像素值,则将所述第一像素值作为用于显示的第三像素值。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, use the first pixel value as a third pixel value for display.

可以理解的是,本方案会先得到第一像素值与第二像素值的差值,如果差值大于等于预设像素值,说明轮廓的颜色与轮廓相邻区域的颜色差别较大,此时,本方案直接将第一像素值作为用于显示的第三像素值即可,例如预设像素值为127,此时第一像素值可以是1、第二像素值可以是130,此时的第一像素值与第二像素值之间的颜色明暗对比较大,即第一像素值和第二像素值之间的灰度相差较大,方便用户对图像轮廓的区分。It can be understood that this scheme will first obtain the difference between the first pixel value and the second pixel value. If the difference is greater than or equal to the preset pixel value, it means that the color of the contour is quite different from the color of the adjacent area of the contour. , this solution can directly use the first pixel value as the third pixel value for display. For example, the preset pixel value is 127. At this time, the first pixel value can be 1, and the second pixel value can be 130. At this time, the The color contrast between the first pixel value and the second pixel value is relatively large, that is, the grayscale 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 another example, the color corresponding to the first pixel value is black, the color corresponding to the second pixel value is white, and the difference between black and white is large. In this solution, the black pixel value can be directly used as the displayed third pixel value.

S132,若判断所述第一像素值与所述第二像素值的差值的绝对值小于预设像素值,则根据所述第二像素值确定轮廓像素点的像素值的变化趋势。S132 , 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, determine the change trend of the pixel value of the contour pixel point according to the second pixel value.

可以理解的是,如果差值小等于预设像素值,说明轮廓的颜色与文件子区域和轮廓相邻区域的颜色差别较小,此时,本方案会基于第二像素值确定轮廓像素点的像素值的变化趋势。例如预设像素值为127,此时第一像素值可以是120、第二像素值可以是130,此时的第一像素值与第二像素值之间的颜色明暗对比较小,即第一像素值和第二像素值之间的灰度相差较小,不方便用户对图像轮廓的区分。It can be understood that if the difference is less than or equal to the preset pixel value, it means that the color of the outline is slightly different from the color of the sub-area of the file and the adjacent area of the outline. At this time, this scheme will determine the outline pixel value based on the second pixel value Variation trend of pixel values. For example, the preset pixel value is 127, the first pixel value may be 120, and the second pixel value may be 130. At this time, the color contrast between the first pixel value and the second pixel value is small, that is, the first pixel value The grayscale difference between the pixel value and the second pixel value is small, which is inconvenient for the user to distinguish the contour of the image.

例如,第一像素值对应的颜色为深灰色,第二像素值对应的为黑色,为深灰色和黑色的区别度较小,本方案会基于第一像素值(对应深灰色)确定轮廓像素点的像素值的变化趋势,此时第一像素值和第二像素值的灰度较为接近。For example, the color corresponding to the first pixel value is dark gray, and the color corresponding to the second pixel value is black, and the difference between dark gray and black is small. This solution will determine the outline pixels based on the first pixel value (corresponding to dark gray). The change trend of the pixel value of , at this time, the grayscale of the first pixel value and the second pixel value are relatively close.

在一些实施例中,S132(若判断所述第一像素值与所述第二像素值的差值的绝对值小于预设像素值,则根据所述第二像素值确定轮廓像素点的像素值的变化趋势)包括:In some embodiments, S132 (if it is determined that the absolute value of the difference between the first pixel value and the second pixel value is less than a preset pixel value, then determine the pixel value of the contour pixel point according to the second pixel value trends) include:

若所述第二像素值小于等于预设像素值,则确定轮廓像素点的像素值的变化趋势为增大趋势。其中,预设像素值例如是255的一半左右,具体例如是127。示例性的,第二像素值的灰度值为80(可以是通过像素点的R值加G值加B值除以3得到),预设像素值的灰度值为127,则此时轮廓像素点的像素值的变化趋势为增大趋势,即需要增大第一像素值的灰度值,来增加第一像素值与第二像素值之间的差异。If the second pixel value is less than or equal to the preset pixel value, it is determined that the change trend of the pixel value of the contour pixel point is an increasing trend. The preset pixel value is, for example, about half of 255, for example, 127. Exemplarily, the grayscale value of the second pixel value is 80 (which can be obtained by dividing the R value of the pixel point, the G value, and the B value by 3), and the grayscale value of the preset pixel value is 127. At this time, the contour The change trend of the pixel value of the pixel point is an increasing trend, 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.

若所述第二像素值大于预设像素值,则确定轮廓像素点的像素值的变化趋势为减小趋势。例如,第二像素值例如是灰度值为180,预设像素值例如是127,则此时轮廓像素点的像素值的变化趋势为减小趋势,即需要降低第一像素值的灰度值,来增加第一像素值与第二像素值之间的差异。If the second pixel value is greater than the preset pixel value, it is determined that the change trend of the pixel value of the contour pixel point is a decreasing trend. For example, the second pixel value is, for example, the gray value of 180, and the preset pixel value is, for example, 127, then the change trend of the pixel value of the contour pixel point is a decreasing trend, that is, the gray value of the first pixel value needs to be reduced , to increase the difference between the first pixel value and the second pixel value.

S133,若所述变化趋势为增大趋势,则将所述第一像素值加预设像素值得到第三像素值。S133 , if the change trend is an increasing trend, add the first pixel value to a preset pixel value to obtain a third pixel value.

可以理解的是,本方案会将第一像素值加预设像素值(灰度值)得到第三像素值,例如增大前的第一像素值为80、第二像素值为55,第一像素值增大后、即可以是207(灰度值80加灰度值127),然后以第三像素值来显示对应的轮廓,增大轮廓的区分度。该种方式即可以实现,在相邻的两个像素点的灰度值较为接近,都是暗色(小于127),此时本发明会对其中的第一像素值进行调整,将其调亮,进而使得轮廓像素点与其相邻的像素点之间的对比增大,对相应的像素点由暗变亮。It can be understood that in this solution, the first pixel value will be added to the preset pixel value (gray value) to obtain the third pixel value. For example, the first pixel value before the increase is 80, the second pixel value is 55, and the first pixel value is 55. After the pixel value is increased, that is, it can be 207 (gray value 80 plus gray value 127), and then the corresponding contour is displayed with the third pixel value to increase the distinguishing degree of the contour. In this way, it can be realized that the grayscale values of two adjacent pixels are relatively close, and both are dark (less than 127). Then, the contrast between the contour pixel and its adjacent pixels is increased, and the corresponding pixels are changed from dark to bright.

S134,若所述变化趋势为减小趋势,则将所述第一像素值减预设像素值得到第三像素值。例如减小前的第一像素值为197、第二像素值为180,第一像素值减小后即可以是70(灰度值197减灰度值127),然后以第三像素值来显示对应的轮廓,增大轮廓的区分度。该种方式即可以实现,在相邻的两个像素点的灰度值较为接近,都是亮色(大于127),此时本发明会对其中的第一像素值进行调整,将其调暗,进而使得轮廓像素点与其相邻的像素点之间的对比增大,对相应的像素点由亮变暗。S134 , if the change trend is a decreasing trend, subtract 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, after the first pixel value is reduced, it can be 70 (gray value 197 minus gray value 127), and then the third pixel value is used to display Corresponding contours, increase the distinction of contours. In this way, it can be realized that the gray values of two adjacent pixels are relatively close, and both are bright colors (greater than 127). Then, the contrast between the contour pixel and its adjacent pixels is increased, and the corresponding pixels are changed from bright to dark.

S135,将所计算得到的第三像素值作为替换先前第一像素值、用于进行显示的第三像素值。S135, using the calculated third pixel value as a third pixel value for displaying instead of the previous first pixel value.

S14,控制每个文件子区域的轮廓像素点按照所述第三像素值进行显示。S14: Control the outline pixels of each file sub-region to display according to the third pixel value.

可以理解的是,在得到第三像素值后,控制每个文件子区域的轮廓像素点按照第三像素值进行显示即可,可以给用户提供清晰的轮廓界限的参考。本方案通过上述实施例来对轮廓的显示颜色进行了调整,增加了轮廓显示的对比度,更直观地供用户在编辑过程中参考,提高用户在编辑过程中的准确性。It can be understood that, after obtaining the third pixel value, the outline pixels of each file sub-region can be controlled to be displayed according to the third pixel value, which can provide the user with a clear reference of outline boundaries. In this solution, the display color of the outline is adjusted through the above-mentioned embodiment, the contrast of outline display is increased, and the user can refer to it more intuitively in the editing process, thereby improving the accuracy of the user in the editing process.

本方案考虑到对轮廓的显示颜色进行调整后,可能会导致轮廓显示为灰度值种类较多的,可能会影响用户编辑、查看,因此在上述实施例的基础上,本方案还包括:This solution considers that after adjusting the display color of the outline, the outline may be displayed as a variety of gray values, which may affect the user's editing and viewing. Therefore, on the basis of the above embodiment, this solution also includes:

统计与第一像素值相同的第三像素值的像素点数量得到第一数量,统计与第一像素值不相同的第三像素值的像素点数量得到第二数量。本方案会统计得到与第一像素值相同的第三像素值的像素点数量,以及与第一像素值不相同的第三像素值的像素点数量。The first number is obtained by counting the number of pixel points of the third pixel value that is the same as the first pixel value, and the second number is obtained by counting the number of pixel points of the third pixel value that is different from the first pixel value. In this solution, the number of pixel points of the third pixel value that is the same as the first pixel value and the number of pixel points of the third pixel value that is different from the first pixel value are obtained by statistics.

根据所述第一数量、第二数量得到像素值变化比例,若所述像素值变化比例大于预设比例,则选取第一预设像素值和第二预设像素值。本方案会计算出第一数量和第二数量的像素值变化比例,如果像素值变化比例大于预设比例,说明轮廓的显示颜色被调整的较多,可能是以灰度值种类较多的形式展现的,此时,本方案会选取第一预设像素值和第二预设像素值,其中,第一预设像素值可以是白色所对应的像素值,第二预设像素值可以是黑色所对应的像素值。The pixel value change ratio is obtained according to the first number and the second number, and if the pixel value change ratio is greater than a preset ratio, the first preset pixel value and the second preset pixel value are selected. This solution will calculate the ratio of pixel value change between the first number and the second number. If the pixel value change ratio is greater than the preset ratio, it means that the display color of the outline has been adjusted more, which may be displayed in the form of more gray value types. At this time, the solution will select the first preset pixel value and the second preset pixel value, wherein the first preset pixel value may be the pixel value corresponding to white, and the second preset pixel value may be black. corresponding pixel value.

控制所述轮廓像素点分别按照所述第一预设像素值和第二预设像素值,交替显示预设时间段。本方案会按照第一预设像素值和第二预设像素值控制轮廓像素点进行频闪,例如可以是1S显示白色,1S显示黑色,交替显示,来直观的向用户展示轮廓的线条。The contour pixels are controlled to alternately display preset time periods according to the first preset pixel value and the second preset pixel value respectively. In this solution, the outline pixels are controlled to perform stroboscopic flashing according to the first preset pixel value and the second preset pixel value. For example, 1S displays white, 1S displays black, and alternately displays the outline lines to the user intuitively.

S2、确定用户选择的文件子区域,提取所述文件子区域内的可编辑内容,在所述可编辑区域内建立富文本编辑区域。S2. Determine the file sub-region selected by the user, extract the editable content in the file sub-region, and establish a rich text editing region in the editable region.

用户想要对其中一个文件子区域内的内容进行编辑时,可以基于编辑装置选择对应的文件子区域,服务器会提取文件子区域内的可编辑内容,在可编辑区域内建立富文本编辑区域。When the user wants to edit the content in one of the file sub-regions, he can select the corresponding file sub-region based on the editing device, and the server will extract the editable content in the file sub-region and create a rich text editing region in the editable region.

其中,富文本编辑区域是供用户编辑数据的区域,用户可以基于富文本编辑软件对富文本编辑区域内的内容进行编辑,富文本编辑软件是一种可内嵌于浏览器,所见即所得的文本编辑器,此处为现有技术,不再赘述。Among them, the rich text editing area is an area for users to edit data. Users can edit the content in the rich text editing area based on rich text editing software. The text editor of , which is the prior art here, and will not be repeated here.

S3、通过编辑装置基于富文本编辑软件对所述可编辑内容进行编辑修改,得到修改后内容,根据所述文件子区域的板式规格和/或相邻文件子区域的内容格式对修改后内容进行调整,得到调整后内容。S3. Editing and modifying the editable content based on rich text editing software by an editing device to obtain the modified content, and performing the modification on the modified content according to the board specification of the file sub-region and/or the content format of the adjacent file sub-region Adjust, get adjusted content.

可以理解的是,本方案可以利用编辑装置基于富文本编辑软件对所述可编辑内容进行编辑修改,其中,富文本编辑软件为现有技术,在此不再赘述。It can be understood that, in this solution, an editing device can be used to edit and modify the editable content based on rich text editing software, wherein the rich text editing software is in the prior art, and details are not repeated here.

由于用户输入的数据与文件子区域的原始内容可能不匹配,例如文字的字体、大小不一,图片的形状和尺寸也与文件子区域不匹配,因此本方案在得到修改后内容后,会根据文件子区域的板式规格和/或相邻文件子区域的内容格式对修改后内容进行调整,得到调整后内容。Because the data input by the user may not match the original content of the file sub-area, for example, the font and size of the text are different, and the shape and size of the picture also do not match the file sub-area. The board size of the file sub-region and/or the content format of the adjacent file sub-region adjust the modified content to obtain the adjusted content.

本方案针对初始区域是图片编辑区域和初始区域是文字编辑区域的不同,各布局了不同的实施方式,具体如下:According to the difference that the initial area is a picture editing area and the initial area is a text editing area, each layout has different implementations, as follows:

针对初始区域为图片编辑区域的情况:For the case where the initial area is the image editing area:

在一些实施例中,所述S3包括S31- S35:In some embodiments, the S3 includes S31-S35:

S31,若所述初始区域为图片编辑区域,则根据用户操作删除可编辑内容中的历史图像,并添加新图像。S31 , if the initial area is a picture editing area, delete a historical image in the editable content according to a user operation, and add a new image.

可以理解的是,用户想要向在线电力报告内插入新图像时,本方案会先将可编辑内容中的历史图像删除,然后把新图像添加进去。It can be understood that when the user wants to insert a new image into the online power report, the solution will first delete the historical image in the editable content, and then add the new image.

S32,获取文件子区域的板式规格,所述板式规格包括形状规格和/或尺寸规格。S32 , obtain the board specification of the file sub-area, where the board specification includes shape specification and/or size specification.

本方案为了使得添加的新图像匹配文件子区域,会得到文件子区域的形状规格和/或尺寸规格,从而较为准确的对新图像进行自动调整,使新图像的形状规格和/或尺寸规格与文件子区域相适应。In this solution, in order to make the added new image match the file sub-region, the shape specification and/or size specification of the file sub-region will be obtained, so that the new image can be automatically adjusted more accurately, so that the shape specification and/or size specification of the new image is the same as that of the file sub-region. The file sub-area is adapted.

S33,若判断新图像的图像形状与文件子区域的形状规格不相同,则对文件子区域相邻的其他文件子区域的内容格式进行获取,得到参考形状规格,所述参考形状规格为调整形状或不调整形状中的一个。S33, if it is determined that the image shape of the new image is not the same as the shape specification of the file sub-region, then acquire the content formats of other file sub-regions adjacent to the file sub-region to obtain a reference shape specification, where the reference shape specification is the adjusted shape Or not adjust one of the shapes.

示例性的,新图像的图像形状为圆形,文件子区域的形状为方形,那么新图像的图像形状与文件子区域的形状规格不相同,此时本方案会得到文件子区域相邻的其他文件子区域的内容格式,进而得到参考形状规格,来判断新图像的形状是否需要进行调整,如果需要进行调整,那么参考形状规格为调整形状,如果不需要进行形状的调整,那么参考形状规格为不调整形状。Exemplarily, the image shape of the new image is a circle, and the shape of the file sub-region is square, then the image shape of the new image is different from the shape specification of the file sub-region. The content format of the sub-area of the file, and then the reference shape specification is obtained to determine whether the shape of the new image needs to be adjusted. If it needs to be adjusted, the reference shape specification is to adjust the shape. Does not adjust the shape.

S34,若所述参考形状规格为调整形状,则以文件子区域的形状规格对新图像显示,将新图像与文件子区域融合,使得所展示的新图像与文件子区域融合为相同形状,得到为图像的调整后内容。S34, if the reference shape specification is an adjusted shape, display the new image with the shape specification of the file sub-region, and fuse 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, obtaining The adjusted content for the image.

可以理解的是,在参考形状规格为调整形状时,本方案会以文件子区域的形状规格对新图像显示,然后将新图像与文件子区域融合,使得所展示的新图像与文件子区域融合为相同形状,得到为图像的调整后内容。It can be understood that when the reference shape specification is to adjust the shape, this solution will display the new image with the shape specification of the file sub-area, and then fuse the new image with the file sub-area, so that the displayed new image is fused with the file sub-area. For the same shape, get the adjusted content of the image.

在一些实施例中,S34(所述若所述参考形状规格为调整形状,则以文件子区域的形状规格对新图像显示,将新图像与文件子区域融合,使得所展示的新图像与文件子区域融合为相同形状)包括S341- S344:In some embodiments, S34 (if the reference shape specification is an adjusted shape, display the new image with the shape specification of the document sub-area, and fuse the new image with the document sub-area, so that the displayed new image and the document are subregions fused into the same shape) including S341-S344:

S341,选中新图像的图像中心点,以及选中文件子区域的区域中心点。S341, select the image center point of the new image and the area center point of the selected file sub-area.

S342,基于所述图像中心点和区域中心点,将所述新图像与文件子区域进行叠加设置得到融合中心点,根据所述融合中心点建立坐标系。S342, based on the image center point and the area center point, superimpose the new image and the file sub-region to obtain a fusion center point, and establish a coordinate system according to the fusion center point.

首先,本方案会确定新图像的图像中心点以及文件子区域的区域中心点,然后利用图像中心点和图像中心点进行融合得到融合中心点,并在融合中心点建立坐标系。First, this scheme will determine the image center point of the new image and the regional center point of the file sub-area, then use the image center point and the image center point to fuse to obtain the fusion center point, and establish a coordinate system at the fusion center point.

S343,获取新图像中每个图像像素点的图像坐标值,以及文件子区域中每个区域像素点的区域坐标值。S343: Acquire the image coordinate value of each image pixel in the new image, and the regional coordinate value of each regional pixel in the file sub-area.

本方案以新图像为圆形,以文件子区域为方形进行阐述,图像坐标值即为新图像中像素点所对于的图像坐标值,区域坐标值即为文件子区域中每个像素点的坐标值。This solution takes the new image as a circle and the file sub-area as a square. The image coordinate value is the image coordinate value corresponding to the pixel in the new image, and the area coordinate value is the coordinate of each pixel in the file sub-area. value.

S344,将图像坐标值与区域坐标值进行比对,对新图像的图像尺寸进行调整得到第一目标尺寸,将第一目标尺寸的新图像与文件子区域根据融合中心点进行融合,使得所展示的新图像与文件子区域融合为相同形状。S344, compare the image coordinate value with the area coordinate value, adjust the image size of the new image to obtain the first target size, and fuse the new image of the first target size with the file sub-region according to the fusion center point, so that the displayed The new image is blended into the same shape as the file sub-area.

本方案会将图像坐标值与区域坐标值进行比对,然后对新图像的图像尺寸进行调整得到第一目标尺寸,将第一目标尺寸的新图像与文件子区域根据融合中心点进行融合,使得所展示的新图像与文件子区域融合为相同形状。This scheme will compare the image coordinate value with the area coordinate value, then adjust the image size of the new image to obtain the first target size, and fuse the new image of the first target size with the file sub-area according to the fusion center point, so that The new image shown is fused to the same shape as the document sub-area.

第一种情况,需要对新图像进行放大处理:In the first case, the new image needs to be enlarged:

在一些实施例中,S344(所述将图像坐标值与区域坐标值进行比对,对新图像的图像尺寸进行调整得到第一目标尺寸,将第一目标尺寸的新图像与文件子区域根据融合中心点进行融合,使得所展示的新图像与文件子区域融合为相同形状)包括A1-A3:In some embodiments, S344 (the image coordinate value is compared with the area coordinate value, the image size of the new image is adjusted to obtain the first target size, and the new image of the first target size is fused with the file sub-region according to the The center point is fused so that the new image displayed is fused into the same shape as the document sub-region) including A1-A3:

A1,若判断图像坐标值的坐标未完全包括区域坐标值的坐标,则获取未完全包括区域坐标值的所有坐标得到第一坐标数量,根据所述第一坐标数量确定所述新图像的第一放大倍数。A1, if it is judged that the coordinates of the image coordinate values do not completely include the coordinates of the area coordinate values, obtain all the coordinates that do not completely include the area coordinate values to obtain the first coordinate number, and determine the first coordinate number of the new image according to the first coordinate number. gain.

可以理解的是,如果图像坐标值的坐标未完全包括区域坐标值的坐标,此时获取未完全包括区域坐标值的所有坐标得到第一坐标数量,根据所述第一坐标数量确定所述新图像的第一放大倍数。可以理解的是,第一坐标数量越大,对应的第一放大倍数就越大。It can be understood that, if the coordinates of the image coordinate values do not completely include the coordinates of the area coordinate values, at this time, obtain all the coordinates that do not completely include the area coordinate values to obtain the first coordinate number, and determine the new image according to the first coordinate number. the first magnification. It can be understood that, the greater the number of the first coordinates, the greater the corresponding first magnification.

示例性的,参见图3,新图像为圆形,文件子区域为方形,方形的四个角落所对应的区域坐标值的坐标是没有被图像坐标值的坐标包括的,四个角落的面积越大,则对应的第一坐标数量也就越多,说明新图像需要放大的就越大,对应的第一放大倍数就越大。Exemplarily, referring to Figure 3, the new image is a circle, the file sub-area is a square, and the coordinates of the area coordinate values corresponding to the four corners of the square are not included in the coordinates of the image coordinate values. The larger the number of corresponding first coordinates, the larger the new image needs to be enlarged, and the larger the corresponding first magnification.

A2,根据所述第一放大倍数对新图像放大处理,提取放大处理后新图像中每个图像像素点的图像坐标值。A2: Enlarge the new image according to the first magnification, and extract the image coordinate value of each image pixel in the new image after the enlarging process.

本方案在得到第一放大倍数后,会利用第一放大倍数对新图像放大处理,在放大后,会再次提取放大处理后新图像中每个图像像素点的图像坐标值。After obtaining the first magnification, the scheme will use the first magnification to enlarge the new image, and after the enlargement, the image coordinate value of each image pixel in the enlarged new image will be extracted again.

A3,将放大处理后的图像坐标值再次与区域坐标值进行比对,若判断新图像放大后的图像坐标值的坐标完全包括区域坐标值的坐标,则不再对新图像进行放大处理,将此时新图像的尺寸作为第一目标尺寸。A3: Compare the enlarged image coordinate value with the regional coordinate value again. If it is judged that the coordinate of the enlarged image coordinate value of the new image completely includes the coordinate of the regional coordinate value, then the new image will not be enlarged, and the new image will not be enlarged. The size of the new image at this time serves as the first target size.

本方案会利用第一放大倍数对新图像放大处理,在放大后,会再次提取放大处理后新图像中每个图像像素点的图像坐标值,将放大处理后的图像坐标值再次与区域坐标值进行比对,如果判断新图像放大后的图像坐标值的坐标完全包括区域坐标值的坐标,则不再对新图像进行放大处理,将此时新图像的尺寸作为第一目标尺寸。This scheme will use the first magnification factor to enlarge the new image. After the enlargement, the image coordinate value of each image pixel in the new image after the enlargement processing will be extracted again, and the enlarged image coordinate value will be re-matched with the regional coordinate value. For comparison, if it is determined that the coordinates of the enlarged image coordinate value of the new image completely include the coordinates of the region coordinate value, the new image is not enlarged, and the size of the new image at this time is taken as the first target size.

需要说明的是,本方案的服务器会经过多次自动放大处理,并在每次放大处理后,与上一次图像进行再次比对,直至找到新图像放大后的图像坐标值的坐标完全包括区域坐标值的坐标,则不再对新图像进行放大处理,将此时新图像的尺寸是最为合适的尺寸,同时,可以使得新图像的失真率最小。It should be noted that the server of this solution will undergo multiple automatic magnification processes, and after each magnification process, it will be compared with the previous image again, until the coordinates of the magnified image coordinate value of the new image are found, which completely includes the area coordinates. If the coordinate of the value is set, the new image will not be enlarged, and the size of the new image at this time is the most appropriate size, and at the same time, the distortion rate of the new image can be minimized.

其中,所述若判断图像坐标值的坐标未完全包括区域坐标值的坐标,则获取未完全包括区域坐标值的所有坐标得到第一坐标数量,根据所述第一坐标数量确定所述新图像的第一放大倍数,包括:Wherein, if it is judged that the coordinates of the image coordinate values do not completely include the coordinates of the area coordinate values, obtain all the coordinates that do not completely include the area coordinate values to obtain the first coordinate number, and determine the new image according to the first coordinate number. The first magnification, including:

获取文件子区域内像素点的第一总数量;Get the first total number of pixels in the sub-region of the file;

根据所述第一坐标数量、第一总数量、放大权重值进行计算得到所述新图像的第一放大倍数,通过以下公式计算第一放大倍数,The first magnification of the new image is obtained by calculation according to the first coordinate number, the first total number, and the magnification weight value, and the first magnification is calculated by the following formula:

Figure DEST_PATH_IMAGE017
Figure DEST_PATH_IMAGE017

其中,

Figure 275274DEST_PATH_IMAGE018
为第一放大倍数,
Figure DEST_PATH_IMAGE019
为第一坐标数量,
Figure 17971DEST_PATH_IMAGE020
为第一总数量,
Figure 226098DEST_PATH_IMAGE005
为放大权重值。in,
Figure 275274DEST_PATH_IMAGE018
is the first magnification,
Figure DEST_PATH_IMAGE019
is the first coordinate number,
Figure 17971DEST_PATH_IMAGE020
is the first total quantity,
Figure 226098DEST_PATH_IMAGE005
is the amplification weight value.

上述公式中,第一坐标数量

Figure 664033DEST_PATH_IMAGE003
越大,
Figure DEST_PATH_IMAGE021
就越大,对应的第一放大倍数也就越大,从而对新图像放大较大倍数。In the above formula, the first coordinate number
Figure 664033DEST_PATH_IMAGE003
the bigger the
Figure DEST_PATH_IMAGE021
The larger the corresponding first magnification, the larger the magnification of the new image.

需要说明的是,本方案会经过第一放大倍数的计算,来以较为合适的幅度快速对新图像递进放大,得到最终的新图像。It should be noted that, in this solution, the new image is rapidly and progressively enlarged with a suitable amplitude through the calculation of the first magnification factor to obtain the final new image.

第二种情况,需要对新图像缩小处理:In the second case, the new image needs to be reduced:

在一些实施例中,S344(所述将图像坐标值与区域坐标值进行比对,对新图像的图像尺寸进行调整得到第一目标尺寸,将第一目标尺寸的新图像与文件子区域根据融合中心点进行融合,使得所展示的新图像与文件子区域融合为相同形状)包括B1-B4:In some embodiments, S344 (the image coordinate value is compared with the area coordinate value, the image size of the new image is adjusted to obtain the first target size, and the new image of the first target size is fused with the file sub-region according to the The center point is fused so that the new image displayed is fused to the same shape as the document sub-region) including B1-B4:

B1,若判断图像坐标值的坐标完全包括区域坐标值的坐标,则获取图像坐标值中未完全包括区域坐标值的所有图像坐标值,得到第二坐标数量,根据所述第二坐标数量确定所述新图像的第一缩小倍数。B1, if it is judged that the coordinates of the image coordinate values completely include the coordinates of the area coordinate values, obtain all image coordinate values that do not completely include the area coordinate values in the image coordinate values, obtain the second coordinate number, and determine the number of the second coordinates according to the second coordinate number. Describe the first reduction factor for the new image.

可以理解的是,如果图像坐标值的坐标完全包括区域坐标值的坐标,此时获取未完全包括区域坐标值的所有图像坐标值,得到第二坐标数量,根据第二坐标数量确定新图像的第一缩小倍数。可以理解的是,第二坐标数量越大,对应的第一缩小倍数就越大。It can be understood that, if the coordinates of the image coordinate values completely include the coordinates of the area coordinate values, at this time, all image coordinate values that do not completely include the area coordinate values are obtained, the second coordinate number is obtained, and the first coordinate value of the new image is determined according to the second coordinate number. A zoom factor. It can be understood that, the greater the number of the second coordinates, the greater the corresponding first reduction factor.

示例性的,参见图4,新图像为圆形,文件子区域为方形,圆形完全包括方形,图中,方形与圆形之间的面积所对应的坐标数量,即为图像坐标值中未完全包括区域坐标值的所有图像坐标值的第二坐标数量,可以理解的是,该面积越大,则对应的第二坐标数量也就越多,说明新图像需要缩小的就越小,对应的第一缩小倍数就越大。Exemplarily, referring to Figure 4, the new image is a circle, the file sub-area is a square, and the circle completely includes the square. The second coordinate number of all image coordinate values that completely includes the area coordinate value. It can be understood that the larger the area, the greater the corresponding second coordinate number, indicating that the new image needs to be reduced smaller, and the corresponding The first reduction factor is larger.

其中,所述若判断图像坐标值的坐标完全包括区域坐标值的坐标,则获取图像坐标值中未与坐标完全包括区域坐标值对应的所有图像坐标值,得到第二坐标数量,根据所述第二坐标数量确定所述新图像的第一缩小倍数,包括:Wherein, if it is determined that the coordinates of the image coordinate values completely include the coordinates of the regional coordinate values, then obtain all image coordinate values in the image coordinate values that are not corresponding to the coordinates completely including the regional coordinate values, and obtain the second coordinate quantity, according to the first coordinate value. The number of two coordinates determines the first reduction factor of the new image, including:

获取新图像内图像像素点的第二总数量;Get the second total number of image pixels in the new image;

根据所述第二坐标数量、第二总数量 、缩小权重值进行计算得到所述新图像的第一缩小倍数,通过以下公式计算第一缩小倍数,The first reduction factor of the new image is obtained by calculating according to the second coordinate number, the second total number and the reduction weight value, and the first reduction factor is calculated by the following formula:

Figure 615808DEST_PATH_IMAGE006
Figure 615808DEST_PATH_IMAGE006

其中,

Figure 88378DEST_PATH_IMAGE007
为第一缩小倍数,
Figure 342773DEST_PATH_IMAGE008
为第二坐标数量,
Figure 268004DEST_PATH_IMAGE009
为第二总数量,
Figure 757891DEST_PATH_IMAGE010
为缩小权重值。in,
Figure 88378DEST_PATH_IMAGE007
is the first reduction factor,
Figure 342773DEST_PATH_IMAGE008
is the second coordinate number,
Figure 268004DEST_PATH_IMAGE009
is the second total quantity,
Figure 757891DEST_PATH_IMAGE010
to reduce the weight value.

上述公式中,第二坐标数量

Figure 84967DEST_PATH_IMAGE022
越大,
Figure DEST_PATH_IMAGE023
就越大,对应的第一缩小倍数
Figure 634897DEST_PATH_IMAGE007
也就越大,从而对新图像缩小较大倍数。In the above formula, the second coordinate number
Figure 84967DEST_PATH_IMAGE022
the bigger the
Figure DEST_PATH_IMAGE023
The larger, the corresponding first reduction factor
Figure 634897DEST_PATH_IMAGE007
The larger it is, the larger the new image will be reduced by a larger factor.

B2,根据所述第一缩小倍数对新图像缩小处理,提取缩小处理后新图像中每个图像像素点的图像坐标值。B2, perform a reduction process on the new image according to the first reduction factor, and extract the image coordinate value of each image pixel in the new image after the reduction process.

本方案在得到第一缩小倍数后,会利用第一缩小倍数对新图像缩小处理,在缩小后,会再次提取缩小处理后新图像中每个图像像素点的图像坐标值。In this solution, after obtaining the first reduction factor, the new image will be reduced by the first reduction factor, and after reduction, the image coordinate value of each image pixel in the new image after the reduction process will be extracted again.

B3,将缩小处理后的图像坐标值再次与区域坐标值进行比对,若判断新图像缩小后的图像坐标值的坐标完全包括区域坐标值的坐标,则再次获取图像坐标值中未与坐标完全包括区域坐标值对应的所有图像坐标值,得到第三坐标数量,根据所述第三坐标数量确定所述新图像的第二缩小倍数。B3, compare the reduced image coordinate value with the area coordinate value again, if it is judged that the coordinate value of the reduced image coordinate value of the new image completely includes the coordinate of the area coordinate value, then obtain again the image coordinate value that is not completely the same as the coordinate value Including all image coordinate values corresponding to the area coordinate values, a third coordinate quantity is obtained, and a second reduction factor of the new image is determined according to the third coordinate quantity.

本方案在缩小后,会再次提取缩小处理后新图像中每个图像像素点的图像坐标值,将缩小处理后的图像坐标值再次与区域坐标值进行比对,如果判断新图像缩小后的图像坐标值的坐标还是完全包括区域坐标值的坐标,则相同原理再次计算得到第三坐标数量,根据第三坐标数量确定新图像的第二缩小倍数。After the scheme is reduced, the image coordinate value of each image pixel in the new image after the reduction processing will be extracted again, and the coordinate value of the reduced image will be compared with the regional coordinate value again. If the coordinates of the coordinate values still fully include the coordinates of the regional coordinate values, the third coordinate quantity is calculated again according to the same principle, and the second reduction factor of the new image is determined according to the third coordinate quantity.

B4,持续将缩小处理后的图像坐标值与区域坐标值进行比对,直至缩小处理后新图像的图像坐标值的坐标不完全包括区域坐标值的坐标,将本次缩小前的新图像的图像尺寸作为第一目标尺寸。B4: Continue to compare the image coordinate value after the reduction process with the area coordinate value until the coordinates of the image coordinate value of the new image after the reduction process do not completely include the coordinate value of the area coordinate value, and compare the image of the new image before this reduction. size as the first target size.

本方案在得到第二缩小倍数后,将缩小处理后的图像坐标值与区域坐标值进行比对,直至缩小处理后新图像的图像坐标值的坐标不完全包括区域坐标值的坐标,将本次缩小前的新图像的图像尺寸作为第一目标尺寸。In this scheme, after the second reduction factor is obtained, the coordinate values of the image after the reduction process are compared with the coordinate values of the area, until the coordinates of the image coordinate values of the new image after the reduction process do not completely include the coordinates of the area coordinate values. The image size of the new image before reduction is used as the first target size.

示例性的,参见图5,图5中缩小处理后新图像的图像坐标值的坐标不完全包括区域坐标值的坐标,那么本方案会将图5所对应图像的缩小前的新图像的图像尺寸作为第一目标尺寸。Exemplarily, referring to FIG. 5 , the coordinates of the image coordinate values of the new image after the reduction process in FIG. 5 do not completely include the coordinates of the regional coordinate values, so this solution will reduce the image size of the new image corresponding to FIG. 5 before the reduction. as the first target size.

可以理解的是,图5所对应的图像是指圆形恰好缩小到了与方形有交叉区域的程度,而对应其缩小前的新图像所对应的缩小程度,恰好是与方形未有交叉区域的程度,因此,前一图像是最佳图像,本方案可以在得到所需图像尺寸的情况下,将图像放大缩小过程中的失真率降到最低。It can be understood that the image corresponding to Figure 5 means that the circle is just reduced to the extent that it has an intersecting area with the square, and the corresponding reduction degree of the new image before the reduction is exactly the extent that there is no intersection with the square. , therefore, the previous image is the best image, and this scheme can minimize the distortion rate in the process of image enlargement and reduction under the condition of obtaining the required image size.

需要说明的是,在上述实施例中对新图像的尺寸调整好之后,可以将文件子区域外的多余的部分裁剪掉,对新图像的形状进行改变,然后将裁剪后的部分作为填充到文件子区域内的内容即可。It should be noted that, after the size of the new image is adjusted in the above-mentioned embodiment, the redundant part outside the sub-region of the file can be cropped, the shape of the new image can be changed, and then the cropped part can be used as padding in the file. content in the sub-area.

S35,若所述参考形状规格为不调整形状,则根据所述文件子区域的尺寸规格对所述新图像的图像尺寸进行调整,将新图像与文件子区域融合,此时新图像和文件子区域为不同的形状,得到为图像的调整后内容。S35, if the reference shape specification is not to adjust the shape, adjust the image size of the new image according to the size specification of the file sub-region, and fuse the new image with the file sub-region. The regions are of different shapes, resulting in the adjusted content of the image.

可以理解的是,如果参考形状规格为不调整形状,那么不需要对新图像的形状进行调整,只需要对新图像的图像尺寸进行调整即可,本方案在对图像尺寸进行调整后,将新图像与文件子区域融合,此时新图像和文件子区域为不同的形状,得到为图像的调整后内容。It can be understood that if the reference shape specification is not to adjust the shape, then 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. The image is merged with the file sub-region, and the new image and the file sub-region are in different shapes, resulting in the adjusted content of the image.

在一些实施例中,S35(所述若所述参考形状规格为不调整形状,则根据所述文件子区域的尺寸规格对所述新图像的图像尺寸进行调整,将新图像与文件子区域融合,此时新图像和文件子区域为不同的形状,得到为图像的调整后内容)包括S351- S355:In some embodiments, S35 (if the reference shape specification is not to adjust the shape, adjust the image size of the new image according to the size specification of the file sub-region, and fuse the new image with the file sub-region , at this time the new image and file sub-areas are of different shapes, and the adjusted content of the image is obtained) including S351-S355:

S351,选中新图像的图像中心点,以及选中文件子区域的区域中心点。S351, select the image center point of the new image and the area center point of the selected file sub-area.

S352,基于所述图像中心点和区域中心点,将所述新图像与文件子区域进行叠加设置得到融合中心点。S352, based on the image center point and the region center point, superimpose the new image and the file sub-region to obtain a fusion center point.

首先,本方案会确定新图像的图像中心点以及文件子区域的区域中心点,然后利用图像中心点和图像中心点进行融合得到融合中心点,并在融合中心点建立坐标系。First, this scheme will determine the image center point of the new image and the regional center point of the file sub-area, then use the image center point and the image center point to fuse to obtain the fusion center point, and establish a coordinate system at the fusion center point.

S353,若所述新图像的尺寸在所有维度上分别小于文件子区域的尺寸,则将所述新图像和文件子区域融合。S353, if the size of the new image is smaller than the size of the file sub-region in all dimensions, respectively, fuse the new image and the file sub-region.

其中,所有维度可以是指长度维度和宽度维度,可以理解的是,参见图6,图6所对应的新图像的尺寸在长度维度和宽度维度上均分别小于文件子区域的尺寸,此时可以直接将新图像和文件子区域融合。Among them, all dimensions may refer to the length dimension and the width dimension. It can be understood that, referring to FIG. 6 , the size of the new image corresponding to FIG. 6 is smaller than the size of the file sub-region in the length dimension and the width dimension, respectively. Directly fuse new images and file sub-regions.

在一些实施例中,S353(所述若所述新图像的尺寸在所有维度上分别小于文件子区域的尺寸,则将所述新图像和文件子区域融合)包括:In some embodiments, S353 (if the size of the new image is smaller than the size of the file sub-region in all dimensions, then fuse the new image and the file sub-region) comprising:

若所述新图像的尺寸在所有维度上分别小于文件子区域的尺寸,则输出第一反馈信息。可以理解的是,本方案会在新图像的尺寸在所有维度上分别小于文件子区域的尺寸时,生成第一反馈信息展示给用户。If the size of the new image is smaller than the size of the file sub-region in all dimensions, first feedback information is output. It can be understood that, in this solution, when the size of the new image is smaller than the size of the file sub-region in all dimensions, the first feedback information is generated and displayed to the user.

若接收到用户的第二确认信息,则将所述新图像和文件子区域融合。可以理解的是,如果接收到用户的第二确认信息,说明用户觉得新图像的尺寸是可以的,那么服务器可以直接将新图像和文件子区域融合。If the second confirmation information from the user is received, the new image is merged with the file sub-region. It can be understood that, if the second confirmation information from the user is received, indicating that the user thinks that the size of the new image is acceptable, the server can directly merge the new image with the file sub-region.

若接收到用户的第二放大倍数,则根据所述第二放大倍数对所述新图像放大处理,在判断放大处理后的新图像的尺寸在所有维度上分别小于文件子区域的尺寸,则将所述新图像和文件子区域融合。可以理解的是,如果说用户觉得此时新图像的尺寸过小,那么可以输入第二放大倍数,服务器在接收到用户的第二放大倍数后,服务器会根据第二放大倍数对新图像进行放大处理。If the user's second magnification is received, the new image is enlarged according to the second magnification, and after judging that the size of the enlarged new image is smaller than the size of the file sub-area in all dimensions, the The new image and document sub-regions are fused. It is understandable that if the user thinks that the size of the new image is too small at this time, he can enter a second magnification factor. After the server receives the user's second magnification factor, the server will enlarge the new image according to the second magnification factor. deal with.

S354,若所述新图像的尺寸在任意一个维度上大于文件子区域的尺寸,则根据新图像的尺寸与文件子区域的尺寸的差值得到第二缩小倍数,通过以下公式计算第三缩小倍数,S354, if the size of the new image is larger than the size of the file sub-region in any dimension, obtain a second reduction factor according to the difference between the size of the new image and the size of the file sub-region, and calculate the third reduction factor by the following formula ,

Figure 47424DEST_PATH_IMAGE024
Figure 47424DEST_PATH_IMAGE024

其中,

Figure DEST_PATH_IMAGE025
为第三缩小倍数,
Figure 229750DEST_PATH_IMAGE026
为新图像的尺寸,
Figure DEST_PATH_IMAGE027
为文件子区域的尺寸,
Figure 676912DEST_PATH_IMAGE028
为缩小系数值。in,
Figure DEST_PATH_IMAGE025
is the third reduction factor,
Figure 229750DEST_PATH_IMAGE026
is the size of the new image,
Figure DEST_PATH_IMAGE027
is the size of the file sub-area,
Figure 676912DEST_PATH_IMAGE028
is the reduction factor value.

参见图7,图7所对应的新图像的尺寸在虽然在宽度维度上大于文件子区域的宽度,但是在长度维度上小于文件子区域的尺寸,此时新图像无法放入到文件子区域中,因此需要对新图像进行缩小处理,本方案在对新图像进行缩小处理时,会计算出第三缩小倍数。Referring to Figure 7, although the size of the new image corresponding to Figure 7 is larger than the width of the file sub-region in the width dimension, it is smaller than the size of the file sub-region in the length dimension, and the new image cannot be placed in the file sub-region at this time. , so the new image needs to be reduced. In this solution, the third reduction factor will be calculated when the new image is reduced.

上述公式中,新图像的尺寸(例如新图像的直径)与文件子区域的尺寸(例如宽度尺寸)的差值越大,得到的第二缩小倍数就会越大,对新图像的调整幅度也会越大。In the above formula, the larger the difference between the size of the new image (such as the diameter of the new image) and the size of the sub-area of the file (such as the width size), the greater the obtained second reduction factor, and the adjustment range of the new image is also will be bigger.

S355,基于所述缩小倍数对新图像进行缩小处后,将缩小处理后的新图像与文件子区域融合。S355 , after reducing the new image based on the reduction factor, fuse the reduced new image with the file sub-region.

可以理解的是,在以缩小倍数对新图像进行缩小处后,将缩小处理后的新图像与文件子区域融合即可。It can be understood that, after the new image is reduced by the reduction factor, the reduced new image can be merged with the file sub-region.

需要说明的是,本实施例(不调整形状)与上述实施例(调整形状)不同之处在于,调整形状是对新图像的形状进行了改变,因此需要利用服务器来一点点调整,以达到所需的准确的新图像;而针对于不调整形状实施例,人为介入调整即可以实现所需要的新图像,无需服务器一点点调整,减少服务器的数据处理量。It should be noted that the difference between this embodiment (without adjusting the shape) and the above-mentioned embodiment (adjusting the shape) is that the shape adjustment is to change the shape of the new image, so the server needs to be adjusted little by little to achieve the desired For the embodiment without adjusting the shape, the required new image can be realized by manual intervention adjustment, and the server does not need a little adjustment, which reduces the data processing volume of the server.

针对初始区域为文字编辑区域的情况:For the case where the initial area is the text editing area:

在另一些实施例中,所述S3包括:In other embodiments, the S3 includes:

若所述初始区域为文字编辑区域,则根据用户操作对可编辑内容中的历史文字删除,并添加新文字得到修改后内容。可以理解的是,首先,本方案会将可编辑内容中的历史文字删除,然后添加新文字得到修改后内容。If the initial area is a text editing area, the historical text in the editable content is deleted according to the user operation, and new text is added to obtain the modified content. It is understandable that, first of all, this solution will delete the historical text in the editable content, and then add new text to obtain the modified content.

获取相邻文件子区域的内容格式,将所述内容格式中对应的文字大小和文字样式作为参考文字大小和参考文字样式。Obtain the content format of the adjacent file sub-region, and use the corresponding text size and text style in the content format as the reference text size and reference text style.

将所述修改后内容中的新文字,按照所述参考文字大小和参考文字样式进行调整,得到为文字的调整后内容。The new text in the modified content is adjusted according to the size of the reference text and the style of the reference text to obtain the adjusted content as text.

可以理解的是,本方案会参考相邻文件子区域的内容格式,然后将内容格式中对应的文字大小和文字样式作为参考文字大小和参考文字样式,对修改后内容中的新文字进行调整,得到文字的调整后内容。It is understandable that this solution will refer to the content format of the adjacent file sub-area, and then use the corresponding text size and text style in the content format as the reference text size and reference text style, and adjust the new text in the modified content. Get the adjusted content of the text.

S4、基于预设比例对所述显示区域进行分区处理得到第一显示区域和第二显示区域,将所述调整后内容在在线电力报告中同步修改后通过第一显示区域显示,通过第二显示区域对所编辑的文件子区域进行显示。S4. Perform partition processing on the display area based on a preset ratio to obtain a first display area and a second display area, and synchronously modify the adjusted content in the online power report to display it in the first display area, and display it through the second display area. The area displays the edited sub-area of the file.

本方案会以预设比例(例如二分之一)对显示区域进行分区处理得到第一显示区域和第二显示区域,然后将调整后内容在在线电力报告中同步修改后通过第一显示区域显示,通过第二显示区域对所编辑的文件子区域进行显示。In this solution, the display area will be partitioned at a preset ratio (for example, one-half) to obtain the first display area and the second display area, and then the adjusted content will be synchronously modified in the online power report and displayed through the first display area , 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-area through the second display area, so that the edited content is more prominent and the user's accuracy in the editing process is improved.

S5、在接收到用户输入的第一确认信息后,将修改后的在线电力报告作为最终在线电力报告,结束对电力报告可视化编辑。S5. After receiving the first confirmation information input by the user, take the modified online power report as the final online power report, and end the visual editing of the power report.

用户在编辑完成后,可以输入第一确认信息,服务器在接收到用户输入的第一确认信息后,将修改后的在线电力报告作为最终在线电力报告,结束对在线电力报告可视化编辑。After editing, the user can input the first confirmation information. After receiving the first confirmation information input by the user, the server takes the modified online power report as the final online power report, and ends the visual editing of the online power report.

为了实现本发明提供的一种基于操作平台的电力文件的数据处理方法,本发明一种基于操作平台的电力文件的数据处理系统,参见图8,通过以下模块进行电力报告可视化编辑,包括:In order to realize a data processing method for power files based on an operation platform provided by the present invention, a data processing system for power files based on an operation platform of the present invention, referring to FIG. 8 , performs visual editing of power reports through the following modules, including:

解析模块,用于根据用户的选择将相应的在线电力报告在显示设备中进行显示,对在线电力报告进行解析处理,得到在线电力报告的至少一个文件子区域;a parsing module, configured to display the corresponding online power report on the display device according to the user's selection, perform parsing processing on the online power report, and obtain at least one file sub-area of the online power report;

提取模块,用于确定用户选择的文件子区域,提取所述文件子区域内的可编辑内容,在所述可编辑区域内建立富文本编辑区域;an extraction module, configured to determine the file sub-region selected by the user, extract the editable content in the file sub-region, and establish a rich text editing region in the editable region;

修改模块,用于通过编辑装置基于富文本编辑软件对所述可编辑内容进行编辑修改,得到修改后内容,根据所述文件子区域的板式规格和/或相邻文件子区域的内容格式对修改后内容进行调整,得到调整后内容;A modification module, used for editing and modifying the editable content based on rich text editing software by an editing device, to obtain the modified content, and modifying the content according to the board specification of the file sub-region and/or the content format of the adjacent file sub-region After adjusting the content, get the adjusted content;

处理模块,用于基于预设比例对所述显示区域进行分区处理得到第一显示区域和第二显示区域,将所述调整后内容在在线电力报告中同步修改后通过第一显示区域显示,通过第二显示区域对所编辑的文件子区域进行显示;The processing module is configured to perform partition processing on the display area based on a preset ratio to obtain a first display area and a second display area, and display the adjusted content through the first display area after synchronously modifying the online power report, and display it through the first display area. The second display area displays the edited file sub-area;

确认模块,用于在接收到用户输入的第一确认信息后,将修改后的在线电力报告作为最终在线电力报告,结束对电力报告可视化编辑。The confirmation module is configured to use the modified online power report as the final online power report after receiving the first confirmation information input by the user, and end the visual editing of the power report.

除上述实施例外,本发明还可以有其他实施方式;凡采用等同替换或等效变换形成的技术方案,均落在本发明要求的保护范围。In addition to the above-mentioned embodiments, the present invention may also have other embodiments; all technical solutions formed by equivalent replacement or equivalent transformation fall within the protection scope of the present invention.

Claims (15)

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 the corresponding online power report in a display device according to the selection of a user, and analyzing the online power report to obtain at least one file sub-region 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-region and/or the content format of the adjacent file sub-region to obtain adjusted content;
s4, performing 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 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.
2. The data processing method for power files based on an operating platform according to claim 1,
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.
3. The data processing method for power files based on an operating platform according to claim 2,
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.
4. The data processing method for power files based on an operating platform according to claim 3,
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.
5. The data processing method for the power file based on the operating platform as claimed in claim 3, 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 preset time periods according to the first preset pixel value and the second preset pixel value respectively.
6. The data processing method for power files based on an operating platform according to claim 2,
the S3 includes:
if the initial area is a picture editing area, deleting a historical image in 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 subregion, acquiring the content format of other file subregions adjacent to the file subregion 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 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.
7. The data processing method for power files based on an operating platform according to claim 6,
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 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.
8. The data processing method for power files based on an operating platform according to claim 7,
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 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.
9. The data processing method for power files based on an operating platform according to claim 8,
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 104355DEST_PATH_IMAGE001
wherein,
Figure 103404DEST_PATH_IMAGE002
is the first magnification factor and is the second magnification factor,
Figure 905925DEST_PATH_IMAGE003
in order to be the first number of coordinates,
Figure 306819DEST_PATH_IMAGE004
in the first total number, the number of the first,
Figure 556666DEST_PATH_IMAGE005
to amplify the weight value.
10. The data processing method of the power file based on the operating platform according to claim 7, wherein the 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 sub-region according to the fusion center point, so that the displayed new image and the file sub-region are fused into the same shape, comprises:
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.
11. The data processing method for power files based on an operating platform according to claim 10,
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 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 275967DEST_PATH_IMAGE006
wherein,
Figure 112205DEST_PATH_IMAGE007
is the first reduction multiple of the first size,
Figure 275595DEST_PATH_IMAGE008
in order to be the second number of coordinates,
Figure 445413DEST_PATH_IMAGE009
in order to be the second total number,
Figure 513994DEST_PATH_IMAGE010
to reduce the weight value.
12. The data processing method for power files based on an operating platform according to claim 6,
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 different in shape 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 386878DEST_PATH_IMAGE011
wherein,
Figure 827612DEST_PATH_IMAGE012
is the third reduction multiple of the first reduction factor,
Figure 302150DEST_PATH_IMAGE013
for the size of the new image to be,
Figure 107295DEST_PATH_IMAGE014
is the size of a sub-area of the file,
Figure 206707DEST_PATH_IMAGE015
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.
13. The data processing method for power files based on an operating platform according to claim 12,
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 smaller than that of the file sub-region in all dimensions.
14. The data processing method for power files based on an operating platform according to claim 2,
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-region 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 style to obtain the adjusted content of the characters.
15. 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, 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 sub-area and/or the content format of the adjacent file sub-area 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.
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 true CN115048915A (en) 2022-09-13
CN115048915B 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 (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004068368A1 (en) * 2003-01-31 2004-08-12 Canon Kabushiki Kaisha Image processing method, system, program, program storage medium and information processing apparatus
CN1745381A (en) * 2003-01-31 2006-03-08 佳能株式会社 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
CN109299446A (en) * 2018-08-03 2019-02-01 新华三大数据技术有限公司 Report-generating method and device
CN109948510A (en) * 2019-03-14 2019-06-28 北京易道博识科技有限公司 A kind of file and picture example dividing method and device
CN110019860A (en) * 2017-12-04 2019-07-16 天津三星电子有限公司 A kind of processing method and electronic equipment of multimedia file
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
CN111488104A (en) * 2020-04-16 2020-08-04 维沃移动通信有限公司 Font editing method and electronic equipment
CN111553137A (en) * 2020-03-30 2020-08-18 平安医疗健康管理股份有限公司 Report generation method and device, storage medium and computer equipment
CN112017195A (en) * 2020-08-26 2020-12-01 上海三维工程建设咨询有限公司 Intelligent integrated monitoring system applied to urban rail transit
CN112989782A (en) * 2021-04-22 2021-06-18 北京三维天地科技股份有限公司 Method for automatic template configuration and report generation
CN113076814A (en) * 2021-03-15 2021-07-06 腾讯科技(深圳)有限公司 Text area determination method, device, equipment and readable storage medium
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
CN113744830A (en) * 2021-08-20 2021-12-03 海南视联大健康智慧医疗科技有限公司 Report generation method and device, electronic equipment and storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1745381A (en) * 2003-01-31 2006-03-08 佳能株式会社 Image processing method, system, program, program storage medium and information processing apparatus
WO2004068368A1 (en) * 2003-01-31 2004-08-12 Canon Kabushiki Kaisha 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
CN109299446A (en) * 2018-08-03 2019-02-01 新华三大数据技术有限公司 Report-generating method and device
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
CN109948510A (en) * 2019-03-14 2019-06-28 北京易道博识科技有限公司 A kind of file and picture example dividing 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
CN111553137A (en) * 2020-03-30 2020-08-18 平安医疗健康管理股份有限公司 Report generation method and device, storage medium and computer equipment
CN111488104A (en) * 2020-04-16 2020-08-04 维沃移动通信有限公司 Font editing method and electronic equipment
CN112017195A (en) * 2020-08-26 2020-12-01 上海三维工程建设咨询有限公司 Intelligent integrated monitoring system applied to urban rail transit
CN113076814A (en) * 2021-03-15 2021-07-06 腾讯科技(深圳)有限公司 Text area determination method, device, equipment and readable storage medium
CN112989782A (en) * 2021-04-22 2021-06-18 北京三维天地科技股份有限公司 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

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
COCO: "联合编辑文档 你来定规矩", 《电脑迷》 *
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)》 *
小T: "文档我做主 调配由我定", 《电脑迷》 *
景天虎 马小龙 刘均利 莫时旭: "Word文档中AutoCAD数据格式图形显示效果的高效编辑研究", 《图学学报》 *

Also Published As

Publication number Publication date
CN115048915B (en) 2022-11-01

Similar Documents

Publication Publication Date Title
JP4572669B2 (en) Layout rule generation system, layout system, layout rule generation method, and layout rule generation program
US8139257B2 (en) Document editing apparatus, image forming apparatus, document editing method, and computer program product
US7561722B2 (en) System and method for interactive document layout
US8572512B2 (en) Electronic document location indication and navigation method, system and program
CN109254760A (en) A kind of method of picture scaling
CN102572461B (en) DIMENSIONAL IMAGE EDITING DEVICE and 3-D view edit methods
CN105830014B (en) Determine that image scaled resets the factor
CN111859490A (en) Parameterization arrangement method for tire sidewall fonts
CN115048915B (en) Data processing method and system of electric power file based on operation platform
JPH09147131A (en) Image layout device having cutting function of image parts
US20150248774A1 (en) Image processing apparatus and method, image processing system, and non-transitory computer readable medium
CN102445984A (en) Voice drawing system and method thereof
CN112802157B (en) Picture editing method, device, electronic equipment and storage medium
WO2001059604A1 (en) Method for determining line leading in accordance with traditional japanese practices
US20210090312A1 (en) Image processing apparatus, image processing method, image processing program, and recording medium storing image processing program
US8988423B2 (en) Electronic album generating apparatus, stereoscopic image pasting apparatus, and methods and programs for controlling operation of same
US7296227B2 (en) Determining line leading in accordance with traditional Japanese practices
CN113297645B (en) Jewelry form generation method, system, terminal equipment and storage medium
JPH04222063A (en) Data generating device and method for graphic scaling up/down by the device
JP2001202392A (en) Cad system
CN116466952B (en) Control visual effect element adjusting method and device, electronic equipment and storage medium
CN114758348A (en) Graphic processing method, device and equipment
CN116057620B (en) Data processing system
JPH10232916A (en) Image editing device and method, and medium recording program
JPH09305599A (en) Layout processor

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