+

HK1120960A1 - Method and system for securely displaying data in web page - Google Patents

Method and system for securely displaying data in web page Download PDF

Info

Publication number
HK1120960A1
HK1120960A1 HK08113828.3A HK08113828A HK1120960A1 HK 1120960 A1 HK1120960 A1 HK 1120960A1 HK 08113828 A HK08113828 A HK 08113828A HK 1120960 A1 HK1120960 A1 HK 1120960A1
Authority
HK
Hong Kong
Prior art keywords
target
file
data
client
target data
Prior art date
Application number
HK08113828.3A
Other languages
Chinese (zh)
Other versions
HK1120960B (en
Inventor
杨争
刘加伟
窦蕾
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of HK1120960A1 publication Critical patent/HK1120960A1/en
Publication of HK1120960B publication Critical patent/HK1120960B/en

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention discloses a method for safely displaying data in the web page and a system thereof. The method comprises the following procedures: receiving the access request of a client terminal by a server; obtaining the target data from the source data corresponding with the access; transmitting the web page file corresponding with the access request to the client terminal; generating atarget file with the target data according to the prearranged regulation; and transmitting the target file to the client terminal. In this way, the problem of being easily used of the data in the webpage by a third party caused by the considerable analysis of the data in the web page by an automatic machine caused by that the data is especially easy to be obtained from the third party as the display of the data in the web page with a text format in the existing technique is avoided.

Description

Method and system for safely displaying data in webpage
Technical Field
The invention relates to a data display technology in the field of data processing, in particular to a method and a system for safely displaying data in a webpage.
Background
In the world, the life of people has changed greatly by using internet-based applications, the most important of which is to change the way in which people acquire information, and at present, it is common practice to create a WEB page file using a Hypertext Markup Language (HTML) Language and store the file in a WEB server, and when a user needs to acquire information of a file, an access request is sent to the WEB server through a browser, and the WEB server sends a corresponding WEB page file to the browser after receiving the request. Further, in order to meet the needs of business applications, improve the efficiency of information transmission and shorten the user access time, the web server usually stores a large amount of data in a database, such as various articles, news, and the like, and after receiving an access request, the web server obtains corresponding data from the database to generate a web page file according to a predetermined format, and then sends the file to a user browser.
However, in the above process, since most of the data included in the web page file obtained by the user browser is in a text format, the web page file is very easy to be analyzed by a third party and the data therein is obtained, and this problem becomes more prominent with the advent of the automaton. The so-called automaton automatically acquires a web document from a network by using a computer program and parses the document, so that a large amount of data contained in the web document is acquired by a third party in a short time. Particularly, when sensitive data, such as contact information and address information of a user, are contained in a webpage file, if the information is analyzed by an automaton and is maliciously used by others after being acquired, the information can have a very adverse effect on the parties of the information. Therefore, if the above problems are not solved, the normal development of network applications will be seriously affected.
Disclosure of Invention
The invention aims to provide a method and a device for safely displaying data in a webpage, which are used for solving the problems that in the prior art, the data is very easy to be analyzed and obtained by a third party due to the fact that the webpage data is displayed in a text format, and further the webpage data can be analyzed in a large amount by an automaton, so that the data in the webpage is easy to be utilized by the third party.
In order to solve the problems, the invention discloses a method for safely displaying data in a webpage, which comprises the following steps:
the server receives an access request of a client;
acquiring target data from source data corresponding to the access request;
sending the webpage file corresponding to the access request to a client;
generating the target data into a target file according to a preset rule;
and sending the target file to a client.
After the sending of the webpage file to the client, before the sending of the target file to the client, the method further includes: the server receives a target file downloading request sent by a client, and the target file generation is to generate a target file from target data corresponding to the downloading request.
Preferably, the sending the web page file to the client further includes: and sending the encrypted target data to a client, wherein a target file downloading request received by the server comprises the encrypted target data, and the target file generation is to decrypt the target data and generate the target file according to a preset rule.
Preferably, the sending the web page file to the client further includes: sending a target data identification corresponding to the target data to a client,
the method further comprises the following steps: and establishing a mapping relation between a target data identifier and target data, wherein a target file downloading request sent by the receiving client comprises the target data identifier, and the target file generation is to acquire the target data corresponding to the target data identifier according to the mapping relation to generate a target file.
Preferably, the target file downloading requests of the sending the webpage file to the client and the receiving client are respectively completed by different servers.
Preferably, the target file is generated and stored in a cache, and if a target file download request is received, whether the target file corresponding to the download request exists in the cache is judged, and if so, the target file is obtained and sent to the client.
Preferably, the method further comprises the following steps: and judging whether the source of the target file downloading request is consistent with a preset value or not, and if not, rejecting the request.
Preferably, the format of the object file includes, but is not limited to, a picture or a video.
The invention also discloses a method for safely displaying the data in the webpage, which comprises the following steps:
the server receives an access request of a client;
acquiring target data from source data corresponding to the access request;
generating the target data into a target file according to a preset rule;
and simultaneously sending the webpage file and the target file corresponding to the access request to the client.
In order to solve the above problem, the present invention also discloses a device for safely displaying data in a web page, comprising:
the access request unit is used for receiving an access request of a client;
the target data generating unit is used for acquiring target data from source data corresponding to the access request;
the target file generating unit is used for generating a target file from the target data according to a preset rule;
and the interface unit is used for sending the webpage file corresponding to the access request to a client and sending the target file to the client.
Preferably, the apparatus further comprises:
a download request receiving unit, configured to receive a target file download request sent by a client;
the target file generation unit acquires target data corresponding to the target file download request to generate a target file.
Preferably, the apparatus further comprises:
an encryption unit configured to encrypt target data;
a decryption unit configured to decrypt the encrypted target data;
the interface unit further includes a target data transmitting unit for transmitting the target data encrypted by the encrypting unit to the client,
the download request received by the download request receiving unit comprises the encrypted target data, and the target data is decrypted by the decryption unit and then generated into a target file according to a preset rule by the target file generation unit.
Preferably, the interface unit further includes:
the data identification sending unit is used for sending the target data identification corresponding to the target data to the client;
the device further comprises: the storage unit is used for storing the mapping relation between the target data identification and the target data;
the target file download request received by the download request receiving unit comprises a target data identifier, and the target file generating unit acquires the target data corresponding to the target data identifier from the storage unit to generate the target file.
Preferably, the method further comprises the following steps: the cache unit is used for storing the generated target file; and the cache checking unit is used for checking whether the target file downloading request received by the downloading request unit has a corresponding target file in the cache unit or not, and if so, sending the target file to the client through the interface unit.
Preferably, the method further comprises the following steps: and the checking unit is used for judging whether the source of the target file downloading request is consistent with a preset value or not, and if not, rejecting the request.
Preferably, the format of the object file includes, but is not limited to, a picture or a video.
According to an embodiment of the present invention, the following technical effects are achieved:
after receiving the access request of the client, the server of the invention does not directly send the data back to the client in a text format, but first obtains the source data corresponding to the access request to generate the target data, then generates the target file according to the rule by the target data, and then sends the target file and the corresponding webpage file back to the client. Therefore, the webpage browsed by the client is formed by combining the webpage file and the target file, and the data in the webpage is displayed in the format of the target file, so that the webpage is very difficult to analyze and extract, and the problem that the webpage file is easy to analyze in the prior art, particularly the webpage data is easy to obtain by a third party due to the fact that the webpage file is analyzed by an automaton in a large quantity is solved.
The web server sends the encrypted target data or the target data identifier to the client, and the client sends a target file downloading request to the server to obtain the target file after receiving the target data or the target data identifier. In the process, the client can send a target file downloading request to other servers, so that the load of the original web server can be reduced, and the speed of acquiring the webpage data by the client is improved.
The generated target file is stored in the cache, and after a new downloading request is received, if the corresponding target file exists in the cache, the file is directly obtained and sent to the client, so that the target data security is ensured, the speed of obtaining the target file by the client is further improved, and the use experience of a user is improved.
After receiving the target file downloading request, the invention checks whether the source of the request is legal, namely whether the source is consistent with the preset downloading source, if not, the invention refuses to download the target file.
Drawings
FIG. 1 is a flow chart of the steps of an example one of the methods of the present invention;
FIG. 2 is a flow chart of the steps of example two of the method of the present invention;
FIG. 3 is a flow chart of the steps of an example three of the method of the present invention;
FIG. 4 is a block diagram of an embodiment of the apparatus of the present invention;
fig. 5 is a block diagram of another structure of the apparatus of the present invention.
Detailed Description
In the prior art, it is the most common practice for data to be displayed in text format in web pages, because, for most network applications, the core of its operation is the database. The text format data is the most important component of the database, such as the news and articles that are most common on the web page, and the supply and demand information and contact information of both parties in the transaction in the e-commerce. However, these data are also made extremely accessible to the user or third parties when they are displayed directly in the user's browser. When an automaton is utilized to parse a web page of a certain website, acquire data therein, and even use the data maliciously, it may have a very adverse effect on a party or a user. After receiving the access request of the client, the web server of the invention does not directly send the data back to the client in a text format, but generates the source data in the webpage file into a target file, and then sends the target file and the corresponding webpage file back to the client. In this way, the web page browsed by the client is composed of the target file and the web page file, and the data in the web page is displayed in the format of the target file, so that the problems are avoided because the parsing of the target file and the data extraction become very difficult. The client may be a browser for browsing web pages, such as IE, firefox, etc., or may be software or other tools with corresponding functions, and hereinafter, the browser is taken as an example for description.
The method for displaying data in the webpage is based on the http Protocol, the access request received by the web server is generally an http (Hypertext Transfer Protocol) request, and certainly, the possibility of adopting other protocols is not excluded. The web page file obtained by the client accessing the web server is generally an html file, but the web page file may also be in other file formats, such as asp or jsp, and hereinafter, the html file is taken as an example for description. For a better understanding of the invention, the http protocol and its principles are briefly described below:
first, to browse a web page, a URL (Uniform Resource Locator) is required to be entered in an address bar of a browser. This is similar to each house having a house number address, and each web page has an Internet address. When a URL is entered in the browser's address bar or a hyperlink is clicked, the URL identifies the address to be browsed. The browser extracts the webpage codes of the website on the Web server through an HTTP protocol and translates the webpage codes into a webpage. Therefore, it is necessary to first introduce the URL components, for example: http:// www.microsoft.com/china/index. Its meaning is as follows:
http://: com server is informed to display Web page representing hypertext transfer protocol;
2, www: represents a Web server;
com/: this is the domain name of the server storing the web page, or the name of the site server;
china/: as a subdirectory on the server, as if we's folder;
htm, index: htm is one HTML file (web page) in the folder.
As is known, the basic protocol of the Internet is the TCP/IP protocol, however, at the top of the TCP/IP model is the application layer (application layer), which contains all the higher layer protocols. The high-level protocol has: file transfer protocol FTP, email transfer protocol SMTP, domain name system service DNS, network news transfer protocol NNTP, HTTP protocol, and the like.
The HTTP protocol is a transport protocol for transferring hypertext from a web server to a local browser. It not only ensures that a computer transmits a hypertext document correctly and quickly, but also determines which part of the transmitted document and which part of the content is displayed first (e.g., text before graphics), etc.
How http works is described next.
Over the Internet, HTTP communication typically occurs over TCP/IP connections. The default port is TCP80, but other ports are also available. But this does not presage the HTTP protocol to be over the Internet or other protocol of other networks. HTTP only predicts a reliable transmission.
The information exchange process based on the client/server mode of the HTTP protocol is divided into four processes: establishing connection, sending request information, sending response information and closing connection. When a client requests a file from a server, a TCP connection is established first, after the TCP connection is completed, the client sends a URL to the server, the server searches for a corresponding file according to the URL, the file is found and then sent to the client from the established TCP channel, and the TCP connection is removed after the file is sent. When another file is to be found, the above process needs to be repeated.
In addition to storing HTML files and corresponding data, any one of the web servers also has an HTTP resident program for responding to user requests. When a start file is entered using the browser or a hyperlink is clicked, the browser sends an HTTP request to the server, which is directed to the URL specified by the IP address. The resident program receives the request and returns the requested file after performing the necessary operations. In this process, data sent and received over a network has been divided into one or more packets (packets), each packet comprising: data to be transmitted; control information, i.e., tells the network how to handle the packet. TCP/IP determines the format of each packet. Finally, the browser combines the individual packets into what we see as a web page.
In the first embodiment of the method for safely displaying the webpage data, the web server generates target data from source data in an html file, generates a target file from the target data according to a preset rule, and then sends the target file and a corresponding html file to a browser. In the browser of the user, the target file and the html file form a complete webpage together.
The flow of securely displaying web page data in the first embodiment is shown in fig. 1.
In step S110, the web server receives an http request from the client.
And step S120, the web server acquires target data from the source data corresponding to the http request.
The source data is the data required to be displayed in the html file acquired by the http request. The Html file and its corresponding source data have, but are not limited to, the following two correspondences in the web server:
one is that the source data packets are stored in html files on the web server, i.e. static web pages. In this case, after receiving the http request from the client, the web server obtains the source data from the corresponding html file to generate the target data, and then regenerates the html file without the source data into a new html file.
Another correspondence is that the html file stored in the web server is only a frame, and the file does not contain source data to be displayed, for example, the html file only contains a file header, a file trailer, or some format information. And after receiving an access request of the client, the web server acquires source data corresponding to the request from a database or a file to generate a new html file according to a format defined by the html file. In this case, after receiving the http request from the client, the web server of the present invention directly obtains the source data corresponding to the request from the database or the file to generate the target data.
In the invention, the source data needing to be safely displayed in the webpage is called target data. The target data may be all source data in the html file, or some part of the target data, such as contact information or other sensitive information of the user.
And step S130, generating a target file from the target data according to a preset rule.
The purpose of generating the target file is to improve the security of data and to prevent the data from being maliciously analyzed and utilized. The format of the object file can be determined by those skilled in the art according to the security requirements of the person who carries out the present invention. For example, it may be a picture, a video, a flash, or a file format defined by the user himself. The preset rule is a rule for generating the file, and the rule is different according to different file formats. It should be noted that although the format of the target file can be set by itself, the target file should conform to the protocol and specification of the browser as much as possible, so that the file can be correctly displayed in the browser of the user.
And step S140, sending the html file to the browser.
The html file may contain format information, structure information, or some unimportant source data of the file.
Step S150, sending the target file to the browser.
In the above steps S140 and S150, the present invention is not limited to what manner and what sequence are used to send the html file and the target file. For example, in this example, the html file and the target file are sequentially sent in sequence, but in another embodiment of the present invention, the html file and the target file may be sent to the client together as long as they conform to the corresponding transmission protocol and specification.
In the second embodiment of the method for safely displaying the webpage data, the web server encrypts the target data and sends the encrypted target data to the browser, and the browser sends the target data to the designated server to acquire the corresponding target file. In the invention, the response of the http request of the user, the generation of the target file and the sending of the target file to the browser can be finished by the same server or two or more servers respectively. If the generation of the target file is completed by the independent server, the load of the original web server can be reduced, the efficiency of user access is improved, and the access time is shortened.
FIG. 2 is a flowchart of a method for securely displaying web page data according to an embodiment two. Next, a description will be given taking an object file as an example with reference to fig. 2.
Step S210, the web server receives the http request sent by the client, and obtains the source data corresponding to the html file corresponding to the request to generate the target data.
Step S220, the target data is encrypted.
The encryption algorithm can adopt a symmetric encryption algorithm or an asymmetric encryption algorithm, such as an MD5 algorithm and the like.
And step S230, sending the target data and the html file to the browser of the user.
And appointing the address of the target file acquired by the browser in the html file sent to the browser of the user, namely the position of the target file server. The address of the specified target file can be obtained by a method in an http protocol, for example, the following codes are contained in an html file:
(ii) http:// render. china. microsoft. com/member/contact _ info _ image. dock ═ target data encryption string/>
Wherein render.
In step S240, the browser sends a target file download request to the specified target file server.
When the browser verifies that the html file contains a code similar to < imgsrc ═ http:// render:// library @// microsoft. com// member/contact _ info _ image. dock ═ target data encryption string >, a request is sent to the target file server (render. china. microsoft. com) to obtain the corresponding target file, the sent request including the target data encryption string.
In step S250, the target file server checks whether the source of the target file download request is legal, and if not, rejects the request.
This step is an optional step. The target file server may determine whether the source of the download request is legal according to the value of referrer in the target file download request. The referrer comprises a http request source, for example, a web server A, a web server B and a link code U are existed, the link code U is a link pointing to the web server A, when a user directly clicks the link code U on a website corresponding to the web server A, the request is sent to the web server A, and the referrer value of the request is the web server A; if the website corresponding to the web server B also contains the link code U, the user clicks the link code U on the website to send a request to the web server A, and the referrer value of the request is the web server B; if the user enters the link code U directly in the browser address bar, the web server a will consider the referrer value of the request to be null. According to the method, the target file server verifies whether the referrer value of the target file downloading request comes from a legal address, if not, the request is rejected, and if so, the following steps are executed. Therefore, the target file is prevented from being illegally acquired, and the data security is further improved.
In step S260, the target file server decrypts the target data and generates a target file according to a preset rule.
In this example, the format of the target file is a picture, so the target file server decrypts the received target data to generate the picture.
Step S270, the target file is stored in the cache.
This step is an optional step. The generated target file is stored in the cache of the target file server, if a new target file downloading request is received, whether the target file exists in the cache is firstly inquired, and if the target file exists, the file is directly obtained from the cache without generating the file again. Therefore, resources consumed by the target file server for generating the pictures are reduced, and the time for the browser to acquire the target files is shortened.
Step S280, sending the target file to the browser.
And sending the generated picture back to the browser, wherein the picture and the original html file form a complete webpage.
Because the data is displayed in the picture format, if the automaton wants to analyze the picture and extract the data in the picture, the data is difficult to extract, and the safety of the data in the html file is effectively guaranteed.
In the third embodiment of the method for safely displaying data in a webpage, after receiving an http request sent by a client, a web server sends a target data identifier corresponding to the request to the client, the client sends a target file downloading request to a specified target file server, the target file server obtains corresponding target data according to the target data identifier contained in the request information to generate a target file, and then the target file is sent back to the client.
The difference between the third embodiment and the second embodiment is that the web server only sends the html file and the corresponding target data identifier back to the browser after receiving the request of the browser, but not all the target data. The browser sends a file downloading request containing a target data identifier to a specified target file server, and the target file server obtains target data corresponding to the target data identifier from a database or a corresponding file to generate a target file and sends the file back to the browser. Please refer to the first embodiment or the second embodiment for details of the present embodiment.
The flow of the method for securely displaying webpage data in the third embodiment is shown in fig. 3.
Step S310, the web server receives the http request sent by the browser, and sends the html file corresponding to the request and the target data identifier corresponding to the html file back to the browser.
The target data identification may be contained in an html file sent back to the browser or may be sent separately.
In step S320, the browser sends a target file download request to a target file server specified in the html file.
In this step, the target file download request sent by the browser includes the target data identifier.
In step S330, the target file server obtains the target data corresponding to the target data identifier according to the download request.
The mapping relation between the target data identification and the target data is stored in the target file server. For example, the storage may be performed by a database, a file, or the like. And after receiving the downloading request, acquiring a target data identifier from the request, and then querying a database or a file to acquire corresponding target data.
And step S340, generating a target file according to the target data according to the rule.
Step S350, sending the target file back to the browser.
In this example, the target data is only sent back to the browser in the form of the target file, and compared with the first embodiment, the web server does not need to send the target data to the browser, and the browser does not need to send the target data to the target file server, so that the data traffic in the network is reduced, and the loads of the web server and the browser are also reduced. Of course, the methods described in the above embodiments are all feasible for the present invention, and the implementation manner of the present invention can be determined by those skilled in the art, and the present invention is not limited to the methods.
The method for safely displaying the webpage data is introduced above, and the method of the invention is further described in detail below with reference to specific application environments.
In the following example, the web server provides an e-commerce platform for the user, and on the website, the user can publish his/her supply and demand information and contact information, and also view the information of others. In order to avoid the adverse effect on the user caused by the malicious analysis of the user contact information by a third party or an automaton, the method of the invention improves the safety of the user contact information in the webpage. In this example, the picture is still used as the target file; the target file server is a picture server; the domain name of the web server iswww.ABB.com(ii) a The picture server has a domain name ofwww.render.ABB.com. If the information of a certain user needs to be checked on the website, the specific process is as follows:
step A1, click a link in the browser to view information for a user.
E.g. clicking on a linkhttp://ABB.com/user/130.htmlThe browser then sends an http request to the web server, which requires the viewing user ID to be 130.
Step a2, the web server receives the request, querying the database for user information with ID 130. And encrypting the user contact information to generate a target data encryption string.
The encryption algorithm uses MD5 and base64, for example, before encryption of the user's contact information:
telephone @ fax @ mobile phone @ timestamp
86-0351-8306900@86@13118047777@70301045
After encryption:
wO6mm2lDaYPBIUclKaF5NI%2FUn9Vpd8c1ZB8e5G6TyZt26QXWyropGg%3D%3D
step A3: the web server sends the encrypted string of target data back to the browser.
The web server sends the html code corresponding to the http request in the step a2 back to the browser, wherein the code related to the target data encryption string:
<img src=”http://render.ABB.com/member/contact_nfo_image.docid=wO6mm2lDaYPBIUclKaF5NI%2FUn9Vpd8c1ZB8e5G6TyZt26QXWyropGg%3D%3D”/>
step a4, the browser receives the information returned by the web server, and sends a request to the picture server corresponding to render.
When the browser finds that the received html code contains the code < img src ═ plus >, the browser automatically sends a request for obtaining pictures to the server to which the code points. It can be easily seen that the request includes the encrypted string of the target data
wO6mm2lDaYPBIUclKaF5NI%2FUn9Vpd8c1ZB8e5G6TyZt26QXWyropGg%3D%3D。
Step A5, the picture server decrypts the contact way of the user information according to the parameter value of cid in the request, namely the target data encryption string: 86-0351-8306900@86@13068047777@70301045, and then outputting the character string to the specified position of the blank picture by taking the default blank picture as the background to generate a new picture.
In addition, before generating the picture, the picture server judges whether the source of the request is legal or not according to the refer value of the request, and if the source of the request is illegal, the picture server refuses to return any picture.
Step A6, the picture server establishes the association between the picture url and the actual picture in the cache by taking the url of the request corresponding to the picture as the key value, if the url of the sent request can not find the corresponding picture in the cache, the picture is generated, the association between the url and the picture is established, and when the same url request exists next time, the picture is found through the corresponding relationship. If the time of storing a certain picture in the cache exceeds the set time and is not accessed, the picture can be deleted from the cache.
Step A7, the picture is returned to the browser for display.
The method for securely displaying webpage data according to the present invention is described above with reference to the specific embodiments, and referring to the above description related to the present invention, as shown in fig. 4, the method for securely displaying webpage data according to the present invention is an apparatus for securely displaying webpage data, the apparatus comprising:
an access request unit 401, configured to receive an access request of a client; a target data generating unit 402, configured to obtain target data from source data corresponding to the access request; a target file generating unit 403, configured to generate a target file from target data according to a preset rule; the interface unit 404 is configured to send the webpage file corresponding to the access request to the client, and send the target file to the client.
FIG. 5 is a block diagram of another apparatus for securely displaying web page data according to the present invention. The method comprises the following steps: an access request unit 501, configured to receive an access request of a client; a target data generating unit 502, configured to obtain target data from source data corresponding to the access request; a target file generating unit 503, configured to generate a target file from the target data according to a preset rule; an interface unit 504, configured to send the web page file corresponding to the access request to a client, and send the target file to the client; a download request receiving unit 505, configured to receive a target file download request sent by a client; the target file generation unit acquires target data corresponding to the target file download request to generate a target file.
An encryption unit 506 for encrypting the target data; a decryption unit 507 for decrypting the encrypted target data; the interface unit further includes a target data sending unit 5041, configured to send the target data encrypted by the encryption unit to the client, where the download request received by the download request receiving unit includes the encrypted target data, and the target data is decrypted by the decryption unit and then generated into a target file according to a preset rule by the target file generating unit.
Further comprising: a cache unit 508 for storing the generated target file; the cache checking unit 509 is configured to check whether the target file download request received by the download requesting unit has a corresponding target file in the cache unit, and if yes, send the target file to the browser through the interface unit.
Further comprising: a checking unit 510, configured to determine whether a source of the target file download request is consistent with a predetermined value, and if not, reject the request.
Firstly, after receiving an http request sent by a client, obtaining a corresponding html file, simultaneously obtaining source data corresponding to the html file to generate target data, and encrypting the target data by an encryption unit. And the interface unit sends the html file to the client, and the target data sending unit sends the encrypted target data to the client. After the download request receiving unit receives the target file download request sent by the client, the decryption unit decrypts the target data contained in the request information, and the target file generation unit generates the decrypted target data into a target file according to a preset rule. And finally, the interface unit sends the target file to the client. And if the cache checking unit checks that the target file download request received by the download request unit has a corresponding target file in the cache unit, the target file is directly sent to the client through the interface unit. In addition, when the download request receiving unit receives the target file download request every time, the checking unit checks whether the source of the request is legal or not, and if the source of the request is illegal, the request is rejected, so that the safety of data in the webpage is further improved.
FIG. 6 is a block diagram of another device for securely displaying web page data according to the present invention. Compared with the device shown in fig. 4, the device further comprises: the data identification sending unit is used for sending the target data identification corresponding to the target data to the client; the storage unit is used for storing the mapping relation between the target data identification and the target data; the target file download request received by the download request receiving unit comprises a target data identifier, and the target file generating unit acquires the target data corresponding to the target data identifier from the storage unit to generate the target file.
Compared with the device shown in fig. 5, the most important difference is that the device does not need to send the target data to the client after receiving the http request of the client, but only sends the target data identifier to the client by the data identifier sending unit, and the client sends the target file downloading request according to the target data identifier. After the download request receiving unit receives the download request containing the target data identification, the target data generating unit obtains the corresponding target data from the storage unit, then the target file generating unit generates the target file according to the preset rule with the target data, and finally the interface unit sends the target file to the client.
It should be noted that, the units included in the two apparatuses shown in fig. 5 and fig. 6 are not only combined, and those skilled in the art may combine the units arbitrarily as needed when implementing the present invention, which is not limited to this, as long as the purpose of the present invention can be achieved, for example, a verification unit may be added to the apparatus shown in fig. 6 to verify whether the source of the target file download request is legal or not.
The method and the device for safely displaying the webpage variety data provided by the invention are introduced in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (16)

1. A method for securely displaying data in a web page, comprising the steps of:
the server receives an access request of a client;
acquiring target data from source data corresponding to the access request, wherein the target data are as follows: source data needing to be safely displayed in a webpage;
sending the webpage file corresponding to the access request to a client;
generating the target data into a target file according to a preset rule;
and sending the target file to a client.
2. The method of claim 1, wherein after sending the web page file to the client, before sending the target file to the client, further comprises: the server receives a target file downloading request sent by a client, and the target file generation is to generate a target file from target data corresponding to the downloading request.
3. The method of claim 2, wherein sending the web page file to the client further comprises: and sending the encrypted target data to a client, wherein a target file downloading request received by the server comprises the encrypted target data, and the target file generation is to decrypt the target data and generate the target file according to a preset rule.
4. The method of claim 2, wherein sending the web page file to the client further comprises: sending a target data identification corresponding to the target data to a client,
the method further comprises the following steps: and establishing a mapping relation between a target data identifier and target data, wherein a target file downloading request sent by the receiving client comprises the target data identifier, and the target file generation is to acquire the target data corresponding to the target data identifier according to the mapping relation to generate a target file.
5. The method of any of claims 2 to 4, wherein the sending of the web page file to the client and the receiving of the target file download request from the client are performed by different servers, respectively.
6. The method of claim 5, wherein the target file is generated and stored in a cache,
and if so, acquiring the target file and sending the target file to the client.
7. The method of claim 6, further comprising:
and judging whether the source of the target file downloading request is consistent with a preset value or not, and if not, rejecting the request.
8. The method of claim 1, wherein the format of the object file includes, but is not limited to, pictures or video.
9. A method for securely displaying data in a web page, comprising the steps of:
the server receives an access request of a client;
acquiring target data from source data corresponding to the access request, wherein the target data are as follows: source data needing to be safely displayed in a webpage;
generating the target data into a target file according to a preset rule;
and simultaneously sending the webpage file and the target file corresponding to the access request to the client.
10. An apparatus for securely displaying data in a web page, comprising:
the access request unit is used for receiving an access request of a client;
a target data generating unit, configured to obtain target data from source data corresponding to the access request, where the target data is: source data needing to be safely displayed in a webpage;
the target file generating unit is used for generating a target file from the target data according to a preset rule;
and the interface unit is used for sending the webpage file corresponding to the access request to a client and sending the target file to the client.
11. The apparatus of claim 10, further comprising:
a download request receiving unit, configured to receive a target file download request sent by a client;
the target file generation unit acquires target data corresponding to the target file download request to generate a target file.
12. The apparatus of claim 11, further comprising:
an encryption unit configured to encrypt target data;
a decryption unit configured to decrypt the encrypted target data;
the interface unit further includes a target data transmitting unit for transmitting the target data encrypted by the encrypting unit to the client,
the download request received by the download request receiving unit comprises the encrypted target data, and the target data is decrypted by the decryption unit and then generated into a target file according to a preset rule by the target file generation unit.
13. The apparatus of claim 11, wherein the interface unit further comprises:
the data identification sending unit is used for sending the target data identification corresponding to the target data to the client;
the device further comprises: the storage unit is used for storing the mapping relation between the target data identification and the target data;
the target file download request received by the download request receiving unit comprises a target data identifier, and the target file generating unit acquires the target data corresponding to the target data identifier from the storage unit to generate the target file.
14. The apparatus of any one of claims 11 to 13, further comprising:
the cache unit is used for storing the generated target file;
and the cache checking unit is used for checking whether the target file downloading request received by the downloading request unit has a corresponding target file in the cache unit or not, and if so, sending the target file to the client through the interface unit.
15. The apparatus of claim 14, further comprising:
and the checking unit is used for judging whether the source of the target file downloading request is consistent with a preset value or not, and if not, rejecting the request.
16. The apparatus of claim 10, wherein the format of the object file includes, but is not limited to, pictures or video.
HK08113828.3A 2008-12-19 Method and system for securely displaying data in web page HK1120960B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007100873544A CN101267299B (en) 2007-03-14 2007-03-14 A method and system for securely display data on the webpage

Publications (2)

Publication Number Publication Date
HK1120960A1 true HK1120960A1 (en) 2009-04-09
HK1120960B HK1120960B (en) 2011-01-28

Family

ID=

Also Published As

Publication number Publication date
CN101267299B (en) 2010-11-03
CN101267299A (en) 2008-09-17

Similar Documents

Publication Publication Date Title
CN101267299B (en) A method and system for securely display data on the webpage
US9684628B2 (en) Mechanism for inserting trustworthy parameters into AJAX via server-side proxy
US8819109B1 (en) Data network communication using identifiers mappable to resource locators
CN107341160B (en) Crawler intercepting method and device
CA2732540C (en) Methods for optimizing a web content proxy server and devices thereof
US8572691B2 (en) Selecting a web service from a service registry based on audit and compliance qualities
US8819253B2 (en) Network message generation for automated authentication
US7533419B2 (en) Human interactive proof service
CN100544289C (en) Be mapped to its system and method with encrypting the HTTPS network packet through the copy of deciphering
US20060075122A1 (en) Method and system for managing cookies according to a privacy policy
US9311281B2 (en) Methods for facilitating web page image hotspots and devices thereof
CN107016074B (en) Webpage loading method and device
CN107959660A (en) A kind of static file access method and device based on Nginx
CN104283903A (en) Downloading method for files and device thereof
CN108200040A (en) Mobile client exempts from method, system, browser and the mobile terminal of close login
WO2015176321A1 (en) Information sharing method and device
JP4789100B2 (en) E-mail transmission system
CN107026828B (en) Anti-stealing-link method based on Internet cache and Internet cache
JPH10107843A (en) Method and device for transmitting electronic data signal
TW200805972A (en) Context based navigation
CN114285669B (en) Watermark embedding method for embedded application system plug-in
TW201121275A (en) Cookie processing device, cookie processing method, cookie processing program, cookie processing system and information communication system
JP2006039794A (en) File management system
HK1120960B (en) Method and system for securely displaying data in web page
JP2001350677A (en) Communication monitoring and inspection system using meta information, communication monitoring and inspection method, and recording medium recording these methods

Legal Events

Date Code Title Description
PC Patent ceased (i.e. patent has lapsed due to the failure to pay the renewal fee)

Effective date: 20210314

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载