CN112069549B - Method and system for downloading picture when Bootstrap-table plug-in exports table - Google Patents

Method and system for downloading picture when Bootstrap-table plug-in exports table Download PDF

Info

Publication number
CN112069549B
CN112069549B CN202010878309.6A CN202010878309A CN112069549B CN 112069549 B CN112069549 B CN 112069549B CN 202010878309 A CN202010878309 A CN 202010878309A CN 112069549 B CN112069549 B CN 112069549B
Authority
CN
China
Prior art keywords
picture
bootstrap
location information
plug
exports
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010878309.6A
Other languages
Chinese (zh)
Other versions
CN112069549A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010878309.6A priority Critical patent/CN112069549B/en
Publication of CN112069549A publication Critical patent/CN112069549A/en
Application granted granted Critical
Publication of CN112069549B publication Critical patent/CN112069549B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本发明提供了一种在Bootstrap‑table插件导出表格时图片下载方法及系统,本发明通过在Bootstrap‑table插件上传表格时,通过将图片的位置信息写入像素中,并将图片使用MD5散列函数生成校验码,并与位置信息生成二次校验码,在图片下载时,通过提取图片中包含的位置信息,并生成图片的二次校验码,与表格中的校验码进行比对,从而完成一致性校验,防止图片在上传和下载过程中因为其他原因导致的图片被篡改或导出位置错误等问题,提升表格数据准确度,很大程度上为开发人员减少了工作量,加快开发效率,给开发人员的工作带来了很大的便利。

Figure 202010878309

The present invention provides a method and system for downloading pictures when the Bootstrap-table plug-in exports a table. In the present invention, when the Bootstrap-table plug-in uploads the table, the position information of the picture is written into the pixels, and the picture is hashed using MD5. The function generates a check code, and generates a secondary check code with the location information. When the picture is downloaded, it extracts the location information contained in the picture and generates the secondary check code of the picture, which is compared with the check code in the table. Yes, in order to complete the consistency check, prevent the pictures from being tampered with or export the wrong location due to other reasons during the upload and download process, improve the accuracy of table data, and greatly reduce the workload for developers, Speeding up development efficiency brings great convenience to the work of developers.

Figure 202010878309

Description

一种在Bootstrap-table插件导出表格时图片下载方法及 系统A method and system for downloading pictures when the Bootstrap-table plug-in exports a table

技术领域technical field

本发明涉及表格处理技术领域,特别是一种在Bootstrap-table插件导出表格时图片下载方法及系统。The invention relates to the technical field of table processing, in particular to a method and system for downloading pictures when a Bootstrap-table plug-in exports a table.

背景技术Background technique

随着互联网技术的发展,开发人员在开发项目的过程中擅于利用Bootstrap-table插件,从而减少很多工作量。Bootstrap-table插件既轻量级又功能丰富,可减少开发人员的开发时间,大大提高工作效率,但随着开发人员需求的新增时,Bootstrap-table插件对于一些需求不支持,例如在导出表格中的数据时,无法导出表中的图片,这时就会增加开发人员的工作量。With the development of Internet technology, developers are good at using Bootstrap-table plugins in the process of developing projects, thereby reducing a lot of workload. The Bootstrap-table plug-in is both lightweight and feature-rich, which can reduce the development time of developers and greatly improve work efficiency. However, as the needs of developers increase, the Bootstrap-table plug-in does not support some requirements, such as exporting tables. When the data in the table cannot be exported, the pictures in the table cannot be exported, which will increase the workload of developers.

Bootstrap-table插件可实现查询、分页、排序、复选框、设置显示列、国际化处理等功能,目前技术导出数据对于图片的到处,经常会由于其他原因导致的图片被篡改或导出位置错误等问题。因此,需要一种表格图片导出方法以解决上述问题。The Bootstrap-table plug-in can implement functions such as query, paging, sorting, checkboxes, setting display columns, internationalization, etc. At present, the data exported by the current technology is everywhere in the picture, and the picture is often tampered with or the wrong export location due to other reasons, etc. question. Therefore, there is a need for a table image export method to solve the above problems.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种在Bootstrap-table插件导出表格时图片下载方法及系统,旨在解决现有技术中导出图片时图片被篡改或导出位置错误的问题,实现避免表格数据丢失,提升数据准确性。The purpose of the present invention is to provide a method and system for downloading pictures when the Bootstrap-table plug-in exports a table, which aims to solve the problem that the picture is tampered with or the wrong export position when exporting the picture in the prior art, so as to avoid the loss of table data and improve the data. accuracy.

为达到上述技术目的,本发明提供了一种在Bootstrap-table插件导出表格时图片下载方法,所述方法包括以下操作:In order to achieve the above technical purpose, the present invention provides a method for downloading pictures when the Bootstrap-table plug-in exports a table. The method includes the following operations:

在Bootstrap-table插件上传表格时,获取图片的位置信息,并将图片的位置信息写入图片像素中;When the Bootstrap-table plugin uploads the table, the location information of the image is obtained, and the location information of the image is written into the image pixels;

将图片转换为byte流数据,使用MD5散列函数生成校验码,并与位置信息再次进行MD5校验,生成二次校验码,将二次校验码存储于表格中;Convert the image into byte stream data, use the MD5 hash function to generate a check code, and perform MD5 check again with the location information to generate a secondary check code, and store the secondary check code in a table;

使用Bootstrap-table插件导出表格数据时,下载图片,对图片生成MD5校验码,提取图片像素中的位置信息,并与图片MD5校验码再次生成二次校验码,与表格中存储的二次校验码进行比对,如一致则完成下载,并保存至表格相应位置处。When using the Bootstrap-table plugin to export table data, download the picture, generate the MD5 check code for the picture, extract the position information in the picture pixels, and generate the secondary check code again with the MD5 check code of the picture, which is the same as the second check code stored in the table. Compare the check codes, and if they are consistent, complete the download and save it to the corresponding position of the table.

优选地,所述将图片的位置信息写入图片像素中具体为:Preferably, the writing of the position information of the picture into the picture pixels is specifically:

将图片的位置信息转为二进制字符串;Convert the location information of the image to a binary string;

根据二进制字符串每个字符的奇偶性,将对应像素RGB值进行加1或不变,使像素RGB值的奇偶性与字符串中字符的奇偶性相同。According to the parity of each character of the binary string, the RGB value of the corresponding pixel is incremented by 1 or unchanged, so that the parity of the RGB value of the pixel is the same as the parity of the characters in the string.

优选地,所述位置信息按照UTF-8编码进行二进制字符串的转换。Preferably, the location information is converted into binary strings according to UTF-8 encoding.

本发明还提供了一种在Bootstrap-table插件导出表格时图片下载系统,所述系统包括:The present invention also provides a picture download system when the Bootstrap-table plug-in exports a table, the system comprising:

图片位置信息写入模块,用于在Bootstrap-table插件上传表格时,获取图片的位置信息,并将图片的位置信息写入图片像素中;The picture location information writing module is used to obtain the location information of the picture when the Bootstrap-table plugin uploads the table, and write the location information of the picture into the picture pixels;

二次校验码生成模块,用于将图片转换为byte流数据,使用MD5散列函数生成校验码,并与位置信息再次进行MD5校验,生成二次校验码,将二次校验码存储于表格中;The secondary verification code generation module is used to convert the image into byte stream data, use the MD5 hash function to generate the verification code, and perform MD5 verification with the location information again to generate the secondary verification code, and the secondary verification code will be generated. The code is stored in the table;

一致性校验模块,用于使用Bootstrap-table插件导出表格数据时,下载图片,对图片生成MD5校验码,提取图片像素中的位置信息,并与图片MD5校验码再次生成二次校验码,与表格中存储的二次校验码进行比对,如一致则完成下载,并保存至表格相应位置处。Consistency check module, used to download the image, generate MD5 check code for the image, extract the position information in the image pixel, and generate the secondary check again with the image MD5 check code when exporting table data using the Bootstrap-table plug-in The code is compared with the secondary check code stored in the table. If it is consistent, the download is completed and saved to the corresponding position of the table.

优选地,所述图片位置信息写入模块包括:Preferably, the picture location information writing module includes:

二进制字符串转换单元,用于将图片的位置信息转为二进制字符串;The binary string conversion unit is used to convert the position information of the picture into a binary string;

像素值修改单元,用于根据二进制字符串每个字符的奇偶性,将对应像素RGB值进行加1或不变,使像素RGB值的奇偶性与字符串中字符的奇偶性相同。The pixel value modification unit is used to increase the RGB value of the corresponding pixel by 1 or keep it unchanged according to the parity of each character of the binary string, so that the parity of the pixel RGB value is the same as the parity of the characters in the string.

优选地,所述位置信息按照UTF-8编码进行二进制字符串的转换。Preferably, the location information is converted into binary strings according to UTF-8 encoding.

本发明还提供了一种在Bootstrap-table插件导出表格时图片下载设备,包括:The present invention also provides a picture download device when the Bootstrap-table plug-in exports the table, including:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序,以实现所述的在Bootstrap-table插件导出表格时图片下载方法。The processor is configured to execute the computer program to implement the image download method when the Bootstrap-table plug-in exports a table.

本发明还提供了一种可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现所述的在Bootstrap-table插件导出表格时图片下载方法。The present invention also provides a readable storage medium for storing a computer program, wherein, when the computer program is executed by the processor, the method for downloading pictures when the Bootstrap-table plug-in exports a table is implemented.

发明内容中提供的效果仅仅是实施例的效果,而不是发明所有的全部效果,上述技术方案中的一个技术方案具有如下优点或有益效果:The effects provided in the summary of the invention are only the effects of the embodiments, rather than all the effects of the invention. One of the above technical solutions has the following advantages or beneficial effects:

与现有技术相比,本发明通过在Bootstrap-table插件上传表格时,通过将图片的位置信息写入像素中,并将图片使用MD5散列函数生成校验码,并与位置信息生成二次校验码,在图片下载时,通过提取图片中包含的位置信息,并生成图片的二次校验码,与表格中的校验码进行比对,从而完成一致性校验,防止图片在上传和下载过程中因为其他原因导致的图片被篡改或导出位置错误等问题,提升表格数据准确度,很大程度上为开发人员减少了工作量,加快开发效率,给开发人员的工作带来了很大的便利。Compared with the prior art, in the present invention, when the Bootstrap-table plug-in uploads the table, the position information of the picture is written into the pixels, and the picture is generated using the MD5 hash function to generate a check code, and the position information is generated twice. Check code, when the picture is downloaded, the location information contained in the picture is extracted, and the secondary check code of the picture is generated, which is compared with the check code in the table to complete the consistency check and prevent the picture from uploading. It can improve the accuracy of table data, greatly reduce the workload for developers, speed up development efficiency, and bring great benefits to the work of developers. Great convenience.

附图说明Description of drawings

图1为本发明实施例中所提供的一种在Bootstrap-table插件导出表格时图片下载方法流程图;1 is a flowchart of a method for downloading pictures when the Bootstrap-table plug-in exports a table provided in an embodiment of the present invention;

图2为本发明实施例中所提供的一种在Bootstrap-table插件导出表格时图片下载系统框图。FIG. 2 is a block diagram of a system for downloading pictures when a Bootstrap-table plug-in exports a table according to an embodiment of the present invention.

具体实施方式Detailed ways

为了能清楚说明本方案的技术特点,下面通过具体实施方式,并结合其附图,对本发明进行详细阐述。下文的公开提供了许多不同的实施例或例子用来实现本发明的不同结构。为了简化本发明的公开,下文中对特定例子的部件和设置进行描述。此外,本发明可以在不同例子中重复参考数字和/或字母。这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施例和/或设置之间的关系。应当注意,在附图中所图示的部件不一定按比例绘制。本发明省略了对公知组件和处理技术及工艺的描述以避免不必要地限制本发明。In order to clearly illustrate the technical features of the solution, the present invention will be described in detail below through specific embodiments and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the invention. In order to simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in different instances. This repetition is for the purpose of simplicity and clarity and does not in itself indicate a relationship between the various embodiments and/or arrangements discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and processes are omitted from the present invention to avoid unnecessarily limiting the present invention.

下面结合附图对本发明实施例所提供的一种在Bootstrap-table插件导出表格时图片下载方法及系统进行详细说明。A method and system for downloading pictures when a Bootstrap-table plug-in exports a table provided by the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

如图1所示,本发明公开了一种在Bootstrap-table插件导出表格时图片下载方法,所述方法包括以下操作:As shown in FIG. 1 , the present invention discloses a method for downloading pictures when the Bootstrap-table plugin exports a table. The method includes the following operations:

在Bootstrap-table插件上传表格时,获取图片的位置信息,并将图片的位置信息写入图片像素中;When the Bootstrap-table plugin uploads the table, the location information of the image is obtained, and the location information of the image is written into the image pixels;

将图片转换为byte流数据,使用MD5散列函数生成校验码,并与位置信息再次进行MD5校验,生成二次校验码,将二次校验码存储于表格中;Convert the image into byte stream data, use the MD5 hash function to generate a check code, and perform MD5 check again with the location information to generate a secondary check code, and store the secondary check code in a table;

使用Bootstrap-table插件导出表格数据时,下载图片,对图片生成MD5校验码,提取图片像素中的位置信息,并与图片MD5校验码再次生成二次校验码,与表格中存储的二次校验码进行比对,如一致则完成下载,并保存至表格相应位置处。When using the Bootstrap-table plugin to export table data, download the picture, generate the MD5 check code for the picture, extract the position information in the picture pixels, and generate the secondary check code again with the MD5 check code of the picture, which is the same as the second check code stored in the table. Compare the check codes, and if they are consistent, complete the download and save it to the corresponding position of the table.

在Bootstrap-table插件上传图片时,通过图片转换机制将其转换为可以唯一标识此图片的编码,通过将图片转换为byte类型,再生成特定编码MD5,并将此编码保存在文档存储区,方便后续各种需求的校验。When the Bootstrap-table plugin uploads an image, it is converted into a code that can uniquely identify the image through the image conversion mechanism. By converting the image to byte type, a specific code MD5 is generated, and the code is saved in the document storage area, which is convenient Follow-up verification of various requirements.

对于图片的位置信息,将其写入图片的像素中,具体过程如下:For the position information of the picture, write it into the pixels of the picture, the specific process is as follows:

将图片的位置信息按照UTF-8编码转为二进制串,由于位置信息内容较少,且格式固定,因此选择图片前N个像素值,例如前三个像素RGB的值为(222,111,23)、(222,10,23)、(1,58,40),每个像素的RGB值要么为偶数要么为奇数,因此,将这些像素转换为二进制,偶数为0,奇数为1,即为011001100。而对于位置信息的二进制字符串,将像素依次进行修改。例如位置信息的二进制字符串中第一个字符为1,则第一个像素的R值,原本为偶数222,在此基础上只要将其加1即可变为奇数。以此类推,将位置信息的二进制字符串全部写入N个像素中,这种修改既保存了位置信息,也不会对图片的识别度有太大的改变。Convert the position information of the picture into a binary string according to UTF-8 encoding. Since the content of the position information is small and the format is fixed, select the first N pixel values of the picture, for example, the first three pixels RGB values are (222, 111, 23 ), (222, 10, 23), (1, 58, 40), the RGB value of each pixel is either even or odd, therefore, converting these pixels to binary, the even number is 0, and the odd number is 1, which is 011001100. For the binary string of position information, the pixels are modified in sequence. For example, if the first character in the binary string of the position information is 1, the R value of the first pixel is originally an even number of 222. On this basis, it can be changed to an odd number by adding 1 to it. By analogy, the binary strings of the position information are all written into N pixels. This modification not only saves the position information, but also does not greatly change the recognition degree of the picture.

在将图片位置信息写入图片后,将图片转换为byte流数据,使用MD5散列函数生成校验码。针对图片的位置信息,将位置信息与首次生成的校验码一起再次进行MD5校验,生成二次校验码,并将二次校验码连同图片本身存储于表格中。After the picture location information is written into the picture, the picture is converted into byte stream data, and the MD5 hash function is used to generate the check code. For the location information of the picture, perform MD5 verification again on the location information and the check code generated for the first time, generate a secondary check code, and store the secondary check code together with the picture itself in a table.

在使用Bootstrap-table插件导出表格数据时,检测表格是否包含图片,如果存在图片,触发图片下载功能,下载图片后,对图片中前N个像素存储的位置信息进行提取,根据前N个像素RGB值确定二进制字符串,并将其转换为位置信息。在获得位置信息后进行MD5校验,通过对图片生成MD5校验码,并与位置信息再次生成二次校验码,与表格中存储的二次校验码进行比对,若比对一致,则说明表格中图片完整无篡改,可进行下载操作,并根据位置信息,将下载的图片存放于表格相应的位置处。When using the Bootstrap-table plugin to export table data, check whether the table contains pictures. If there are pictures, trigger the picture download function. After downloading the pictures, extract the location information stored in the first N pixels in the picture, according to the first N pixels RGB The value determines the binary string and converts it to positional information. After obtaining the location information, perform MD5 verification, generate an MD5 verification code for the picture, and generate a secondary verification code with the location information again, and compare it with the secondary verification code stored in the table. If the comparison is consistent, It means that the pictures in the table are complete without tampering, and the download operation can be performed, and the downloaded pictures are stored in the corresponding position of the table according to the location information.

本发明实施例通过在Bootstrap-table插件上传表格时,通过将图片的位置信息写入像素中,并将图片使用MD5散列函数生成校验码,并与位置信息生成二次校验码,在图片下载时,通过提取图片中包含的位置信息,并生成图片的二次校验码,与表格中的校验码进行比对,从而完成一致性校验,防止图片在上传和下载过程中因为其他原因导致的图片被篡改或导出位置错误等问题,提高表格准确性。In the embodiment of the present invention, when the Bootstrap-table plug-in uploads the table, the position information of the picture is written into the pixels, and the picture is generated using the MD5 hash function to generate a check code, and the second check code is generated with the position information. When the image is downloaded, the location information contained in the image is extracted, and the secondary verification code of the image is generated, which is compared with the verification code in the table, so as to complete the consistency check and prevent the image from being damaged during the uploading and downloading process. If the picture is tampered with or the wrong export location caused by other reasons, the accuracy of the form will be improved.

如图2所示,本发明实施例还公开了一种在Bootstrap-table插件导出表格时图片下载系统,所述系统包括:As shown in FIG. 2 , an embodiment of the present invention further discloses a system for downloading pictures when the Bootstrap-table plug-in exports a table, and the system includes:

图片位置信息写入模块,用于在Bootstrap-table插件上传表格时,获取图片的位置信息,并将图片的位置信息写入图片像素中;The picture location information writing module is used to obtain the location information of the picture when the Bootstrap-table plugin uploads the table, and write the location information of the picture into the picture pixels;

二次校验码生成模块,用于将图片转换为byte流数据,使用MD5散列函数生成校验码,并与位置信息再次进行MD5校验,生成二次校验码,将二次校验码存储于表格中;The secondary verification code generation module is used to convert the image into byte stream data, use the MD5 hash function to generate the verification code, and perform MD5 verification with the location information again to generate the secondary verification code, and the secondary verification code will be generated. The code is stored in the table;

一致性校验模块,用于使用Bootstrap-table插件导出表格数据时,下载图片,对图片生成MD5校验码,提取图片像素中的位置信息,并与图片MD5校验码再次生成二次校验码,与表格中存储的二次校验码进行比对,如一致则完成下载,并保存至表格相应位置处。Consistency check module, used to download the image, generate MD5 check code for the image, extract the position information in the image pixel, and generate the secondary check again with the image MD5 check code when exporting table data using the Bootstrap-table plug-in The code is compared with the secondary check code stored in the table. If it is consistent, the download is completed and saved to the corresponding position of the table.

在Bootstrap-table插件上传图片时,通过图片转换机制将其转换为可以唯一标识此图片的编码,通过将图片转换为byte类型,再生成特定编码MD5,并将此编码保存在文档存储区,方便后续各种需求的校验。When the Bootstrap-table plugin uploads an image, it is converted into a code that can uniquely identify the image through the image conversion mechanism. By converting the image to byte type, a specific code MD5 is generated, and the code is saved in the document storage area, which is convenient Follow-up verification of various requirements.

对于图片的位置信息,将其写入图片的像素中,具体过程如下:For the position information of the picture, write it into the pixels of the picture, the specific process is as follows:

将图片的位置信息按照UTF-8编码转为二进制串,由于位置信息内容较少,且格式固定,因此选择图片前N个像素值,例如前三个像素RGB的值为(222,111,23)、(222,10,23)、(1,58,40),每个像素的RGB值要么为偶数要么为奇数,因此,将这些像素转换为二进制,偶数为0,奇数为1,即为011001100。而对于位置信息的二进制字符串,将像素依次进行修改。例如位置信息的二进制字符串中第一个字符为1,则第一个像素的R值,原本为偶数222,在此基础上只要将其加1即可变为奇数。以此类推,将位置信息的二进制字符串全部写入N个像素中,这种修改既保存了位置信息,也不会对图片的识别度有太大的改变。Convert the position information of the picture into a binary string according to UTF-8 encoding. Since the content of the position information is small and the format is fixed, select the first N pixel values of the picture, for example, the first three pixels RGB values are (222, 111, 23 ), (222, 10, 23), (1, 58, 40), the RGB value of each pixel is either even or odd, therefore, converting these pixels to binary, the even number is 0, and the odd number is 1, which is 011001100. For the binary string of position information, the pixels are modified in sequence. For example, if the first character in the binary string of the position information is 1, the R value of the first pixel is originally an even number of 222. On this basis, it can be changed to an odd number by adding 1 to it. By analogy, the binary strings of the position information are all written into N pixels. This modification not only saves the position information, but also does not greatly change the recognition degree of the picture.

在将图片位置信息写入图片后,将图片转换为byte流数据,使用MD5散列函数生成校验码。针对图片的位置信息,将位置信息与首次生成的校验码一起再次进行MD5校验,生成二次校验码,并将二次校验码连同图片本身存储于表格中。After the picture location information is written into the picture, the picture is converted into byte stream data, and the MD5 hash function is used to generate the check code. For the location information of the picture, perform MD5 verification again on the location information and the check code generated for the first time, generate a secondary check code, and store the secondary check code together with the picture itself in a table.

在使用Bootstrap-table插件导出表格数据时,检测表格是否包含图片,如果存在图片,触发图片下载功能,下载图片后,对图片中前N个像素存储的位置信息进行提取,根据前N个像素RGB值确定二进制字符串,并将其转换为位置信息。在获得位置信息后进行MD5校验,通过对图片生成MD5校验码,并与位置信息再次生成二次校验码,与表格中存储的二次校验码进行比对,若比对一致,则说明表格中图片完整无篡改,可进行下载操作,并根据位置信息,将下载的图片存放于表格相应的位置处。When using the Bootstrap-table plugin to export table data, check whether the table contains pictures. If there are pictures, trigger the picture download function. After downloading the pictures, extract the location information stored in the first N pixels in the picture, according to the first N pixels RGB The value determines the binary string and converts it to positional information. After obtaining the location information, perform MD5 verification, generate an MD5 verification code for the picture, and generate a secondary verification code with the location information again, and compare it with the secondary verification code stored in the table. If the comparison is consistent, It means that the pictures in the table are complete without tampering, and the download operation can be performed, and the downloaded pictures are stored in the corresponding position of the table according to the location information.

本发明实施例还公开了一种在Bootstrap-table插件导出表格时图片下载设备,包括:The embodiment of the present invention also discloses a picture downloading device when the Bootstrap-table plug-in exports the table, including:

存储器,用于存储计算机程序;memory for storing computer programs;

处理器,用于执行所述计算机程序,以实现所述的在Bootstrap-table插件导出表格时图片下载方法。The processor is configured to execute the computer program to implement the image download method when the Bootstrap-table plug-in exports a table.

本发明实施例还公开了一种可读存储介质,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现所述的在Bootstrap-table插件导出表格时图片下载方法。The embodiment of the present invention also discloses a readable storage medium for storing a computer program, wherein when the computer program is executed by the processor, the image downloading method when the Bootstrap-table plug-in exports a table is implemented.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.

Claims (6)

1.一种在Bootstrap-table插件导出表格时图片下载方法,其特征在于,所述方法包括以下操作:1. a picture downloading method when Bootstrap-table plug-in exports a table, it is characterised in that the method comprises the following operations: 在Bootstrap-table插件上传表格时,获取图片的位置信息,并将图片的位置信息写入图片像素中;所述将图片的位置信息写入图片像素中具体为:将图片的位置信息转为二进制字符串;根据二进制字符串每个字符的奇偶性,将对应像素RGB值进行加1或不变,使像素RGB值的奇偶性与字符串中字符的奇偶性相同,将位置信息写入图片前N个像素中;When the Bootstrap-table plugin uploads the table, the location information of the picture is obtained, and the location information of the picture is written into the picture pixels; the writing of the location information of the picture into the picture pixels is specifically: converting the location information of the picture into binary String; according to the parity of each character of the binary string, the RGB value of the corresponding pixel is added by 1 or unchanged, so that the parity of the pixel RGB value is the same as the parity of the characters in the string, and the position information is written before the picture. in N pixels; 将图片转换为byte流数据,使用MD5散列函数生成校验码,并与位置信息再次进行MD5校验,生成二次校验码,将二次校验码存储于表格中;Convert the image into byte stream data, use the MD5 hash function to generate a check code, and perform MD5 check again with the location information to generate a secondary check code, and store the secondary check code in a table; 使用Bootstrap-table插件导出表格数据时,下载图片,对图片生成MD5校验码,根据图片前N个像素值提取图片像素中的位置信息,并与图片MD5校验码再次生成二次校验码,与表格中存储的二次校验码进行比对,如一致则完成下载,并保存至表格相应位置处。When using the Bootstrap-table plugin to export table data, download the picture, generate an MD5 check code for the picture, extract the position information in the picture pixels according to the first N pixel values of the picture, and generate a secondary check code with the picture MD5 check code again. , compare it with the secondary verification code stored in the table, if it is consistent, complete the download and save it to the corresponding position of the table. 2.根据权利要求1所述的一种在Bootstrap-table插件导出表格时图片下载方法,其特征在于,所述位置信息按照UTF-8编码进行二进制字符串的转换。2 . The method for downloading pictures when the Bootstrap-table plug-in exports a table according to claim 1 , wherein the location information is converted into binary strings according to UTF-8 encoding. 3 . 3.一种在Bootstrap-table插件导出表格时图片下载系统,其特征在于,所述系统包括:3. a picture download system when Bootstrap-table plug-in exports a table, it is characterized in that, described system comprises: 图片位置信息写入模块,用于在Bootstrap-table插件上传表格时,获取图片的位置信息,并将图片的位置信息写入图片像素中;所述将图片的位置信息写入图片像素中具体为:将图片的位置信息转为二进制字符串;根据二进制字符串每个字符的奇偶性,将对应像素RGB值进行加1或不变,使像素RGB值的奇偶性与字符串中字符的奇偶性相同,将位置信息写入图片前N个像素中;The picture location information writing module is used to obtain the location information of the picture when the Bootstrap-table plugin uploads the table, and write the location information of the picture into the picture pixels; the writing the location information of the picture into the picture pixels is specifically: : Convert the position information of the picture into a binary string; according to the parity of each character in the binary string, add 1 or keep the RGB value of the corresponding pixel, so that the parity of the RGB value of the pixel is the same as the parity of the characters in the string The same, write the position information into the first N pixels of the picture; 二次校验码生成模块,用于将图片转换为byte流数据,使用MD5散列函数生成校验码,并与位置信息再次进行MD5校验,生成二次校验码,将二次校验码存储于表格中;The secondary verification code generation module is used to convert the image into byte stream data, use the MD5 hash function to generate the verification code, and perform MD5 verification with the location information again to generate the secondary verification code, and the secondary verification code will be generated. The code is stored in the table; 一致性校验模块,用于使用Bootstrap-table插件导出表格数据时,下载图片,对图片生成MD5校验码,根据图片前N个像素值提取图片像素中的位置信息,并与图片MD5校验码再次生成二次校验码,与表格中存储的二次校验码进行比对,如一致则完成下载,并保存至表格相应位置处。The consistency check module is used to download the picture when exporting the table data using the Bootstrap-table plug-in, generate the MD5 check code for the picture, extract the position information in the picture pixels according to the first N pixel values of the picture, and verify with the picture MD5 The code generates the secondary verification code again, and compares it with the secondary verification code stored in the table. If it is consistent, the download is completed and saved to the corresponding position of the table. 4.根据权利要求3所述的一种在Bootstrap-table插件导出表格时图片下载系统,其特征在于,所述位置信息按照UTF-8编码进行二进制字符串的转换。4 . The system for downloading pictures when the Bootstrap-table plug-in exports a table according to claim 3 , wherein the location information is converted into binary strings according to UTF-8 encoding. 5 . 5.一种在Bootstrap-table插件导出表格时图片下载设备,其特征在于,包括:5. a picture download device when Bootstrap-table plug-in exports a table, it is characterized in that, comprise: 存储器,用于存储计算机程序;memory for storing computer programs; 处理器,用于执行所述计算机程序,以实现根据权利要求1或2所述的在Bootstrap-table插件导出表格时图片下载方法。The processor is configured to execute the computer program to implement the method for downloading pictures when the Bootstrap-table plug-in exports a table according to claim 1 or 2. 6.一种可读存储介质,其特征在于,用于保存计算机程序,其中,所述计算机程序被处理器执行时实现根据权利要求1或2所述的在Bootstrap-table插件导出表格时图片下载方法。6. A readable storage medium, characterized in that it is used for saving a computer program, wherein, when the computer program is executed by the processor, the image download according to claim 1 or 2 is realized when the Bootstrap-table plug-in exports a table method.
CN202010878309.6A 2020-08-27 2020-08-27 Method and system for downloading picture when Bootstrap-table plug-in exports table Active CN112069549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010878309.6A CN112069549B (en) 2020-08-27 2020-08-27 Method and system for downloading picture when Bootstrap-table plug-in exports table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010878309.6A CN112069549B (en) 2020-08-27 2020-08-27 Method and system for downloading picture when Bootstrap-table plug-in exports table

Publications (2)

Publication Number Publication Date
CN112069549A CN112069549A (en) 2020-12-11
CN112069549B true CN112069549B (en) 2022-06-10

Family

ID=73659444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010878309.6A Active CN112069549B (en) 2020-08-27 2020-08-27 Method and system for downloading picture when Bootstrap-table plug-in exports table

Country Status (1)

Country Link
CN (1) CN112069549B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733514A (en) * 2021-01-21 2021-04-30 浪潮卓数大数据产业发展有限公司 Method for exporting picture downloading in excel by Bootstrap table

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072095A (en) * 2007-03-30 2007-11-14 腾讯科技(深圳)有限公司 Control method and device for file downloading
CN107563245A (en) * 2017-08-24 2018-01-09 广东欧珀移动通信有限公司 Graphic code generation and verification method, device, terminal, and readable storage medium
CN108537009A (en) * 2017-03-03 2018-09-14 绍兴读图网络科技有限公司 A kind of method and system of picture download and legal verification

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072095A (en) * 2007-03-30 2007-11-14 腾讯科技(深圳)有限公司 Control method and device for file downloading
CN108537009A (en) * 2017-03-03 2018-09-14 绍兴读图网络科技有限公司 A kind of method and system of picture download and legal verification
CN107563245A (en) * 2017-08-24 2018-01-09 广东欧珀移动通信有限公司 Graphic code generation and verification method, device, terminal, and readable storage medium

Also Published As

Publication number Publication date
CN112069549A (en) 2020-12-11

Similar Documents

Publication Publication Date Title
US9940744B2 (en) Remote font management
US10366315B1 (en) Generating a quick response (QR) grid associated with a digital document
CN110941655B (en) A data format conversion method and device
CN110096541B (en) Method and device for data exchange between databases
US8718374B2 (en) Method and apparatus for accessing an electronic resource based upon a hand-drawn indicator
CN108664546B (en) XML data structure conversion method and device
CN103226510B (en) Resolve the method and apparatus of vmcore file
CN110474836A (en) A kind of email template generation method, calculates equipment and medium at device
CN112069549B (en) Method and system for downloading picture when Bootstrap-table plug-in exports table
CN107632921A (en) A kind of method and system that server info is shown by Quick Response Code
WO2020015220A1 (en) Method and apparatus for downloading data based on pdf document, and storage medium and terminal
CN111125008B (en) Dynamic repairing method and system of abnormal inode and related components
WO2015010386A1 (en) Document format conversion device and document format conversion method
CN111562907A (en) Conversion method and system of user-defined interface data
CN108153530B (en) Byte code optimization method and device, storage medium, processor and terminal
CN102063415B (en) Method and system for embedding single-byte fonts in PDF (Portable Document Format) file
CN102063416B (en) Method and system for embedding double-byte fonts into PDF file
CN102855602B (en) Picture processing method and picture processing device
CN108959411B (en) Processing method, device and equipment of ETL (extract transform and load) task
CN117453221A (en) Low code conversion method, device, readable storage medium and equipment
CN105279247A (en) Expression library generation method and device
CN111158805B (en) Delphi software source language translation system, method, equipment and medium
US20230214577A1 (en) Character string transmission method and device, computer, and readable storage medium
CN103491414B (en) Method and device for processing character and set top box
CN109948123B (en) Image merging method and device

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