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 PDFInfo
- 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
- position information
- check code
- plug
- secondary check
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 230000006870 function Effects 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 abstract description 6
- 238000011161 development Methods 0.000 abstract description 4
- 238000009795 derivation Methods 0.000 abstract description 3
- 238000012795 verification Methods 0.000 description 20
- 230000000694 effects Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting 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
The invention provides a method and a system for downloading pictures when a Bootstrap-table plug-in exports a table, when the Bootstrap-table plug-in uploads the table, position information of the pictures is written into pixels, the pictures generate check codes by using an MD5 hash function, secondary check codes are generated by the check codes and the position information, when the pictures are downloaded, the position information contained in the pictures is extracted, the secondary check codes of the pictures are generated and compared with the check codes in the table, so that consistency check is completed, the problems of picture tampering or position error derivation and the like caused by other reasons in the uploading and downloading processes of the pictures are prevented, the data accuracy of the table is improved, the workload of developers is reduced to a great extent, the development efficiency is accelerated, and great convenience is brought to the developers.
Description
Technical Field
The invention relates to the technical field of table processing, in particular to a method and a system for downloading pictures when a Bootstrap-table plug-in exports a table.
Background
With the development of internet technology, developers are good at utilizing Bootstrap-table plug-ins in the process of developing projects, thereby reducing much workload. The Bootstrap-table plug-in is light in weight and rich in functions, development time of developers can be reduced, and work efficiency is greatly improved.
The Bootstrap-table plug-in can realize functions such as inquiry, paging, sorting, check box, setting display column, international processing and the like, and in the prior art, the problem that the picture is falsified or the position of exporting is wrong and the like due to other reasons is often caused everywhere of the picture when exporting data. Therefore, a table picture derivation method is needed to solve the above problems.
Disclosure of Invention
The invention aims to provide a picture downloading method and a picture downloading system when a Bootstrap-table plug-in exports a table, which aim to solve the problems that pictures are falsified or the exporting position is wrong when the pictures are exported in the prior art, avoid the loss of table data and improve the data accuracy.
In order to achieve the technical purpose, the invention provides a picture downloading method when a Bootstrap-table plug-in exports a table, which comprises the following operations:
when the Bootstrap-table plug-in uploads the table, acquiring the position information of the picture, and writing the position information of the picture into the picture pixel;
converting the pictures into byte stream data, generating a check code by using an MD5 hash function, verifying the check code with the position information again by using an MD5 to generate a secondary check code, and storing the secondary check code in a table;
when the Bootstrap-table plug-in is used for exporting the table data, the picture is downloaded, the MD5 check code is generated for the picture, the position information in the picture pixel is extracted, the secondary check code is generated again with the picture MD5 check code, the secondary check code is compared with the secondary check code stored in the table, if the position information is consistent with the secondary check code, the downloading is completed, and the secondary check code is stored to the corresponding position of the table.
Preferably, the writing of the position information of the picture into the picture pixels specifically includes:
converting the position information of the picture into a binary character string;
and adding 1 or not to the corresponding pixel RGB value according to the parity of each character in the binary character string, so that the parity of the pixel RGB value is the same as that of the character in the character string.
Preferably, the position information is converted into a binary string according to UTF-8 encoding.
The invention also provides a picture downloading system when the Bootstrap-table plug-in exports the table, the system comprises:
the picture position information writing module is used for acquiring the position information of the picture when the Bootstrap-table plug-in uploads the table and writing the position information of the picture into the picture pixel;
the secondary check code generation module is used for converting the pictures into byte stream data, generating check codes by using an MD5 hash function, carrying out MD5 check on the check codes and the position information again, generating secondary check codes and storing the secondary check codes in the table;
and the consistency check module is used for downloading the picture when the Bootstrap-table plug-in is used for exporting the table data, generating an MD5 check code for the picture, extracting the position information in the picture pixel, generating a secondary check code again with the picture MD5 check code, comparing the secondary check code with the secondary check code stored in the table, finishing downloading if the secondary check code is consistent with the secondary check code stored in the table, and storing the secondary check code to the corresponding position of the table.
Preferably, the picture position information writing module includes:
a binary character string converting unit for converting the position information of the picture into a binary character string;
and the pixel value modifying unit is used for adding 1 or not to the corresponding pixel RGB value according to the parity of each character of the binary character string, so that the parity of the pixel RGB value is the same as the parity of the character in the character string.
Preferably, the position information is converted into a binary string according to UTF-8 encoding.
The invention also provides a device for downloading the picture when the Bootstrap-table plug-in exports the table, which comprises:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the picture downloading method when the Bootstrap-table plug-in exports the table.
The invention also provides a readable storage medium for storing a computer program, wherein the computer program realizes the picture downloading method when the Bootstrap-table plug-in exports the table when being executed by a processor.
The effect provided in the summary of the invention is only the effect of the embodiment, not all the effects of the invention, and one of the above technical solutions has the following advantages or beneficial effects:
compared with the prior art, when the Bootstrap-table plug-in uploads the table, the position information of the picture is written into the pixel, the picture generates the check code by using the MD5 hash function, the secondary check code is generated with the position information, when the picture is downloaded, the position information contained in the picture is extracted, the secondary check code of the picture is generated and is compared with the check code in the table, so that consistency check is completed, the problems that the picture is tampered or the position is exported and the like due to other reasons in the uploading and downloading processes are solved, the accuracy of the data of the table is improved, the workload of developers is reduced to a great extent, the development efficiency is accelerated, and great convenience is brought to the work of the developers.
Drawings
Fig. 1 is a flowchart of a method for downloading a picture when a boottrap-table plug-in exports a table according to an embodiment of the present invention;
fig. 2 is a block diagram of a system for downloading pictures when a boottrap-table plug-in exports a table according to an embodiment of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. 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 the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations 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 procedures are omitted so as to not unnecessarily limit the invention.
The following describes in detail a method and a system for downloading pictures when a boottrap-table plug-in exports a table, according to an embodiment of the present invention, with reference to the accompanying drawings.
As shown in fig. 1, the present invention discloses a method for downloading pictures when a boottrap-table plug-in exports a table, the method comprising the following operations:
when the Bootstrap-table plug-in uploads a table, acquiring the position information of a picture, and writing the position information of the picture into a picture pixel;
converting the pictures into byte stream data, generating a check code by using an MD5 hash function, verifying the check code with the position information again by using an MD5 to generate a secondary check code, and storing the secondary check code in a table;
when the Bootstrap-table plug-in is used for exporting the table data, the picture is downloaded, the MD5 check code is generated for the picture, the position information in the picture pixel is extracted, the secondary check code is generated again with the picture MD5 check code, the secondary check code is compared with the secondary check code stored in the table, if the position information is consistent with the secondary check code, the downloading is completed, and the secondary check code is stored to the corresponding position of the table.
When the Bootstrap-table plug-in unit uploads the picture, the picture is converted into a code which can uniquely identify the picture through a picture conversion mechanism, the picture is converted into a byte type, a specific code MD5 is generated, and the code is stored in a document storage area, so that the subsequent verification of various requirements is facilitated.
For the position information of the picture, writing the position information into the pixels of the picture, the specific process is as follows:
the position information of the picture is encoded and converted into a binary string according to UTF-8, because the position information content is less and the format is fixed, the first N pixel values of the picture are selected, for example, the RGB values of the first three pixels are (222, 111, 23), (222, 10, 23), (1, 58, 40), and the RGB value of each pixel is either even or odd, so that the pixels are converted into binary, the even number is 0, and the odd number is 1, that is 011001100. While for a 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 even 222, and on the basis, it can be changed into an odd number by adding 1. By analogy, the binary character string of the position information is completely written into N pixels, and the modification not only saves the position information, but also does not change the identification degree of the picture too much.
After the picture location information is written to the picture, the picture is converted to byte stream data, and a check code is generated using the MD5 hash function. And for the position information of the picture, performing MD5 verification on the position information and the verification code generated for the first time again to generate a secondary verification code, and storing the secondary verification code and the picture in the table.
When the Bootstrap-table plug-in is used for exporting table data, whether a table contains a picture is detected, if the picture exists, a picture downloading function is triggered, after the picture is downloaded, position information stored by the first N pixels in the picture is extracted, a binary string is determined according to RGB values of the first N pixels, and the binary string is converted into the position information. And performing MD5 verification after the position information is obtained, generating an MD5 verification code for the picture, generating a secondary verification code again with the position information, comparing the secondary verification code with the secondary verification code stored in the table, if the comparison is consistent, indicating that the picture in the table is complete and has no tampering, performing downloading operation, and storing the downloaded picture at a corresponding position of the table according to the position information.
According to the embodiment of the invention, when the Bootstrap-table plug-in uploads the table, the position information of the picture is written into the pixel, the picture generates the check code by using the MD5 hash function, the secondary check code is generated with the position information, when the picture is downloaded, the position information contained in the picture is extracted, the secondary check code of the picture is generated and compared with the check code in the table, so that the consistency check is completed, the problems of picture tampering or position error derivation and the like caused by other reasons in the uploading and downloading processes of the picture are prevented, and the accuracy of the table is improved.
As shown in fig. 2, an embodiment of the present invention further discloses a system for downloading a picture when a boottrap-table plug-in exports a table, where the system includes:
the picture position information writing module is used for acquiring the position information of the picture when the Bootstrap-table plug-in uploads the table and writing the position information of the picture into the picture pixel;
the secondary check code generation module is used for converting the pictures into byte stream data, generating check codes by using an MD5 hash function, carrying out MD5 check on the check codes and the position information again, generating secondary check codes and storing the secondary check codes in the table;
and the consistency check module is used for downloading the picture when the Bootstrap-table plug-in is used for exporting the table data, generating an MD5 check code for the picture, extracting the position information in the picture pixel, generating a secondary check code again with the picture MD5 check code, comparing the secondary check code with the secondary check code stored in the table, finishing downloading if the secondary check code is consistent with the secondary check code stored in the table, and storing the secondary check code to the corresponding position of the table.
When the Bootstrap-table plug-in unit uploads the picture, the picture is converted into a code which can uniquely identify the picture through a picture conversion mechanism, the picture is converted into a byte type, a specific code MD5 is generated, and the code is stored in a document storage area, so that the subsequent verification of various requirements is facilitated.
For the position information of the picture, writing the position information into the pixels of the picture, the specific process is as follows:
the position information of the picture is encoded and converted into a binary string according to UTF-8, because the position information content is less and the format is fixed, the first N pixel values of the picture are selected, for example, the RGB values of the first three pixels are (222, 111, 23), (222, 10, 23), (1, 58, 40), and the RGB value of each pixel is either even or odd, so that the pixels are converted into binary, the even number is 0, and the odd number is 1, that is 011001100. While for a 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 even 222, and on the basis, it can be changed into an odd number by adding 1. By analogy, the binary character string of the position information is completely written into N pixels, and the modification not only saves the position information, but also does not change the identification degree of the picture too much.
After the picture location information is written to the picture, the picture is converted to byte stream data, and a check code is generated using the MD5 hash function. And for the position information of the picture, performing MD5 verification on the position information and the verification code generated for the first time again to generate a secondary verification code, and storing the secondary verification code and the picture in the table.
When the Bootstrap-table plug-in is used for exporting table data, whether a table contains a picture is detected, if the picture exists, a picture downloading function is triggered, after the picture is downloaded, position information stored by the first N pixels in the picture is extracted, a binary string is determined according to RGB values of the first N pixels, and the binary string is converted into the position information. And performing MD5 verification after the position information is obtained, generating an MD5 verification code for the picture, generating a secondary verification code again with the position information, comparing the secondary verification code with the secondary verification code stored in the table, if the comparison is consistent, indicating that the picture in the table is complete and has no tampering, performing downloading operation, and storing the downloaded picture at a corresponding position of the table according to the position information.
The embodiment of the invention also discloses a device for downloading the picture when the Bootstrap-table plug-in exports the table, which comprises the following steps:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the picture downloading method when the Bootstrap-table plug-in exports the table.
The embodiment of the invention also discloses a readable storage medium for storing the computer program, wherein the computer program realizes the picture downloading method when the Bootstrap-table plug-in exports the table when being executed by the processor.
The above description is intended to be illustrative of the preferred embodiment of the present invention and should not be taken as limiting the invention, but rather, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention.
Claims (6)
1. A method for picture downloading when a boottrap-table plug-in exports a table, the method comprising the operations of:
when the Bootstrap-table plug-in uploads the table, acquiring the position information of the picture, and writing the position information of the picture into the picture pixel; the writing of the position information of the picture into the picture pixels specifically includes: converting the position information of the picture into a binary character string; adding 1 or not to the corresponding pixel RGB value according to the parity of each character of the binary character string to ensure that the parity of the pixel RGB value is the same as that of the character in the character string, and writing the position information into the first N pixels of the picture;
converting the pictures into byte stream data, generating a check code by using an MD5 hash function, verifying the check code with the position information again by using an MD5 to generate a secondary check code, and storing the secondary check code in a table;
when the Bootstrap-table plug-in is used for exporting the table data, the picture is downloaded, the MD5 check code is generated for the picture, the position information in the picture pixel is extracted according to the front N pixel values of the picture, the secondary check code is generated again with the picture MD5 check code, the secondary check code is compared with the secondary check code stored in the table, if the secondary check code is consistent with the secondary check code, the downloading is completed, and the secondary check code is stored to the corresponding position of the table.
2. The picture downloading method when the boottrap-table plug-in exports the table according to claim 1, wherein the location information is converted into binary strings according to UTF-8 coding.
3. A picture download system when a boottrap-table plug-in exports a table, the system comprising:
the picture position information writing module is used for acquiring the position information of the picture when the Bootstrap-table plug-in uploads the table and writing the position information of the picture into the picture pixel; the writing of the position information of the picture into the picture pixels specifically includes: converting the position information of the picture into a binary character string; adding 1 or not to the corresponding pixel RGB value according to the parity of each character of the binary character string to ensure that the parity of the pixel RGB value is the same as that of the character in the character string, and writing the position information into the first N pixels of the picture;
the secondary check code generation module is used for converting the pictures into byte stream data, generating check codes by using an MD5 hash function, carrying out MD5 check on the check codes and the position information again, generating secondary check codes and storing the secondary check codes in the table;
and the consistency check module is used for downloading the picture when the Bootstrap-table plug-in is used for exporting the table data, generating an MD5 check code for the picture, extracting the position information in the picture pixels according to the front N pixel values of the picture, generating a secondary check code again with the picture MD5 check code, comparing the secondary check code with the secondary check code stored in the table, finishing downloading if the secondary check code is consistent, and storing the secondary check code to the corresponding position of the table.
4. A picture download system when a boottrap-table plug-in exports a table according to claim 3, characterized in that said location information is converted into binary strings according to UTF-8 coding.
5. A picture download device when a boottrap-table plug-in exports a table, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the method of picture downloading when a boottrap-table plug-in exports a table according to claim 1 or 2.
6. A readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the picture download method when a boottrap-table plug-in exports a table according to claim 1 or 2.
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)
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)
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 | 广东欧珀移动通信有限公司 | The generation of graphic code and method of calibration, device and terminal, readable storage medium storing program for executing |
CN108537009A (en) * | 2017-03-03 | 2018-09-14 | 绍兴读图网络科技有限公司 | A kind of method and system of picture download and legal verification |
-
2020
- 2020-08-27 CN CN202010878309.6A patent/CN112069549B/en active Active
Patent Citations (3)
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 | 广东欧珀移动通信有限公司 | The generation of graphic code and method of calibration, device and terminal, readable storage medium storing program for executing |
Also Published As
Publication number | Publication date |
---|---|
CN112069549A (en) | 2020-12-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104185845B (en) | For the system and method for the binary representation for providing webpage | |
CN111736840A (en) | Compiling method and running method of applet, storage medium and electronic equipment | |
US8849726B2 (en) | Information processing apparatus and control method for the same | |
CN109753968A (en) | Generation method, device, equipment and the medium of character recognition model | |
CN110597591B (en) | Interface multi-language implementation method and device of embedded equipment and storage medium | |
WO2021175053A1 (en) | Method and apparatus for executing functional module in virtual machine | |
CN112417515B (en) | Configuration software protocol processing method and system | |
CN111611788B (en) | Data processing method and device, electronic equipment and storage medium | |
CN112069549B (en) | Method and system for downloading picture when Bootstrap-table plug-in exports table | |
JP2012085274A (en) | Computer-implemented method of encoding text on matrix code symbol, computer-implemented method of decoding matrix code symbol, encoder for encoding text on matrix code symbol, and decoder for decoding matrix code symbol | |
CN102063416B (en) | Method and system for embedding double-byte fonts into PDF file | |
CN102063415B (en) | Method and system for embedding single-byte fonts in PDF (Portable Document Format) file | |
US20150278162A1 (en) | Retention of content in converted documents | |
CN102855602B (en) | Picture processing method and picture processing device | |
CN109509467B (en) | Code generation method and device | |
CN109992293B (en) | Method and device for assembling Android system component version information | |
CN111078529A (en) | Client write-in module testing method and device and electronic equipment | |
CN111460436B (en) | Unstructured data operation method and system based on blockchain | |
CN113886244A (en) | Sql statement testing method and device, electronic equipment and readable storage medium | |
CN110781185B (en) | Text file content pixelation conversion and restoration method | |
CN113360930A (en) | Encryption method for realizing front-end and back-end character dissimilarity and processing terminal | |
CN112748930A (en) | Compilation detection method, device, equipment and storage medium | |
CN112947938B (en) | File conversion method and device, electronic equipment and storage medium | |
CN104517143B (en) | For code coding, decoded method and apparatus and code coding/decoding system | |
CN112527753B (en) | DNS analysis record lossless compression method and device, electronic equipment and storage medium |
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 |