Movatterモバイル変換


[0]ホーム

URL:


CN114491480A - A web page anti-counterfeiting verification method, device, terminal device and storage medium - Google Patents

A web page anti-counterfeiting verification method, device, terminal device and storage medium
Download PDF

Info

Publication number
CN114491480A
CN114491480ACN202111574386.3ACN202111574386ACN114491480ACN 114491480 ACN114491480 ACN 114491480ACN 202111574386 ACN202111574386 ACN 202111574386ACN 114491480 ACN114491480 ACN 114491480A
Authority
CN
China
Prior art keywords
information
verification
counterfeiting
webpage
interface
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.)
Pending
Application number
CN202111574386.3A
Other languages
Chinese (zh)
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp LtdfiledCriticalChina Telecom Corp Ltd
Priority to CN202111574386.3ApriorityCriticalpatent/CN114491480A/en
Publication of CN114491480ApublicationCriticalpatent/CN114491480A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the invention provides a webpage anti-counterfeiting verification method, a device, terminal equipment and a storage medium, wherein the method comprises the following steps: receiving display information sent by a client, wherein the display information at least comprises anti-counterfeiting information and display webpage information; the display information is obtained from the web server by the client; determining first verification information according to the anti-counterfeiting information; performing hash operation on the displayed webpage information to determine second verification information; if the first verification information is the same as the second verification information, a verification passing instruction is returned to the client so that the client displays a page corresponding to the displayed webpage information, anti-counterfeiting information is added to the webpage before the webpage is released, when the client accesses the webpage, verification is carried out according to the webpage display information and the anti-counterfeiting information, and if the verification is passed, the webpage is displayed on the client, so that the webpage display safety is improved.

Description

Translated fromChinese
一种网页防伪验证方法、装置、终端设备和存储介质A web page anti-counterfeiting verification method, device, terminal device and storage medium

技术领域technical field

本发明涉及互联网技术领域,特别是涉及一种网页防伪验证方法、装置、终端设备和存储介质。The present invention relates to the field of Internet technology, in particular to a web page anti-counterfeiting verification method, device, terminal device and storage medium.

背景技术Background technique

随着互联网技术的不断发展,各种应用程序也越来越多,越来越多的用户通过手机或平板电脑上安装的应用程序来进行购物、查看新闻或办理一些业务,例如在登录应用程序办理业务时,会跳转到应用程序内嵌的超文本标记语言(HyperText MarkupLanguage,HTML)网页上进行金额结算,在加载HTML页面时容易发生伪造篡改等网络攻击,如何提高在应用程序内加载网页的安全性是目前急需解决的问题。With the continuous development of Internet technology, there are more and more applications, and more and more users use the applications installed on their mobile phones or tablet computers to shop, check news or do some business, such as logging in to the application. When handling business, it will jump to the HyperText Markup Language (HTML) webpage embedded in the application to settle the amount. When loading HTML pages, network attacks such as forgery and tampering are prone to occur. How to improve the loading of webpages in the application Security is an urgent problem that needs to be solved at present.

发明内容SUMMARY OF THE INVENTION

鉴于上述问题,提出了本发明实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种网页防伪验证方法、装置、终端设备和存储介质。In view of the above problems, the embodiments of the present invention are proposed to provide a web page anti-counterfeiting verification method, apparatus, terminal device and storage medium that overcome the above problems or at least partially solve the above problems.

第一个方面,本发明实施例提供一种网页防伪验证方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a web page anti-counterfeiting verification method, the method includes:

接收客户端发送的显示信息,其中,所述显示信息至少包括防伪信息和显示网页信息;其中,所述显示信息是客户端从web服务器上获取的;Receive display information sent by the client, wherein the display information includes at least anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from the web server;

根据所述防伪信息,确定第一验证信息;determining the first verification information according to the anti-counterfeiting information;

对所述显示网页信息进行哈希运算,确定第二验证信息;performing a hash operation on the displayed webpage information to determine the second verification information;

若所述第一验证信息与所述第二验证信息相同,则向客户端返回验证通过指令,以使所述客户端显示与所述显示网页信息对应的页面。If the first verification information is the same as the second verification information, a verification pass instruction is returned to the client, so that the client displays a page corresponding to the displayed webpage information.

可选地,所述根据所述防伪信息,确定第一验证信息,包括:Optionally, the determining the first verification information according to the anti-counterfeiting information includes:

对所述防伪信息进行解析,得到与所述防伪信息对应的字节加密信息;Parsing the anti-counterfeiting information to obtain byte encrypted information corresponding to the anti-counterfeiting information;

采用预先设置的第一解密密钥对所述字节加密信息进行解密,得到第一文件验证信息和第一接口验证信息。The byte encrypted information is decrypted by using the preset first decryption key to obtain the first file verification information and the first interface verification information.

可选地,所述显示网页信息至少包括资源文件和接口信息,所述对所述显示网页信息进行哈希运算,确定第二验证信息,包括:Optionally, the displayed web page information includes at least resource files and interface information, and the performing a hash operation on the displayed web page information to determine the second verification information includes:

对一个或多个所述第一资源文件分别进行哈希运算,得到一个或多个第一哈希值;Hash operation is performed on one or more of the first resource files, respectively, to obtain one or more first hash values;

采用第二加密密钥对所述一个或多个第一哈希值进行加密,得到第二文件验证信息;Encrypting the one or more first hash values with a second encryption key to obtain second file verification information;

对一个或多个所述第一接口信息进行哈希运算,得到一个或多个第二哈希值;Perform a hash operation on one or more of the first interface information to obtain one or more second hash values;

采用第三加密密钥对所述一个或多个第二哈希值进行加密,得到第二接口验证信息。The one or more second hash values are encrypted by using the third encryption key to obtain second interface verification information.

可选地,所述若所述第一验证信息与所述第二验证信息相同,则向客户端返回验证通过指令,包括:Optionally, if the first verification information is the same as the second verification information, returning a verification pass instruction to the client, including:

若所述第一文件验证信息和第二文件验证信息相同,且所述第一接口验证信息和所述第二接口验证信息相同,则向客户端返回验证通过指令。If the first file verification information and the second file verification information are the same, and the first interface verification information and the second interface verification information are the same, a verification pass instruction is returned to the client.

可选地,所述方法还包括:Optionally, the method further includes:

接收web服务器发送的预发布网页的页面信息,其中,所述页面信息包括第二资源文件和第二接口信息;receiving page information of a pre-published web page sent by a web server, wherein the page information includes a second resource file and second interface information;

根据所述第二资源文件和所述第二接口信息,确定所述防伪信息;determining the anti-counterfeiting information according to the second resource file and the second interface information;

将所述防伪信息加载到所述页面信息中,并将所述加载了防伪信息的页面信息发送至web服务器,以使所述web服务器进行页面正式发布。The anti-counterfeiting information is loaded into the page information, and the page information loaded with the anti-counterfeiting information is sent to a web server, so that the web server can officially publish the page.

可选地,所述根据所述第二资源文件和所述第二接口信息,确定所述防伪信息,包括:Optionally, the determining the anti-counterfeiting information according to the second resource file and the second interface information includes:

根据一个或多个所述第二资源文件,确定与所述第二资源文件对应的文件加载信息;Determine, according to one or more of the second resource files, file loading information corresponding to the second resource files;

根据一个或多个所述第二接口信息,确定与所述第二接口信息对应的接口加载信息;determining, according to one or more pieces of the second interface information, interface loading information corresponding to the second interface information;

采用第一加密密钥对所述文件加载信息和所述接口加载信息进行非对称加密,得到加密后的验证数据;其中,所述第一加密密钥与所述第一解密密钥对应;Asymmetric encryption is performed on the file loading information and the interface loading information by using a first encryption key to obtain encrypted verification data; wherein, the first encryption key corresponds to the first decryption key;

对所述加密后的验证数据进行字节处理,得到字节加密信息;Perform byte processing on the encrypted verification data to obtain byte encryption information;

将所述字节加密信息加载在图片中,得到包含有字节加密信息的图片;Loading the byte encryption information into the picture to obtain a picture containing the byte encryption information;

将所述图片确定为所述防伪信息。The picture is determined as the anti-counterfeiting information.

可选地,所述根据一个或多个所述第二资源文件,确定与所述第二资源文件对应的文件加载信息,包括:Optionally, determining the file loading information corresponding to the second resource file according to one or more of the second resource files includes:

对一个或多个所述第二资源文件分别进行哈希运算,得到一个或多个第三哈希值;Hash operation is performed on one or more of the second resource files, respectively, to obtain one or more third hash values;

采用所述第二加密密钥对所述一个或多个第三哈希值进行非对称加密,得到文件加载信息;Using the second encryption key to perform asymmetric encryption on the one or more third hash values to obtain file loading information;

相对应地,所述根据一个或多个所述第二接口信息,确定与所述第二接口信息对应的接口加载信息,包括:Correspondingly, determining the interface loading information corresponding to the second interface information according to one or more of the second interface information includes:

对一个或多个所述第二接口信息进行哈希运算,得到一个或多个第四哈希值;Perform a hash operation on one or more of the second interface information to obtain one or more fourth hash values;

采用所述第三加密密钥对所述一个或多个第四哈希值进行加密,得到接口加载信息。The one or more fourth hash values are encrypted by using the third encryption key to obtain interface loading information.

第二个方面,本发明实施例提供一种网页防伪验证装置,所述装置包括:In a second aspect, an embodiment of the present invention provides a webpage anti-counterfeiting verification device, the device includes:

接收模块,用于接收客户端发送的显示信息,其中,所述显示信息至少包括防伪信息和显示网页信息;其中,所述显示信息是客户端从web服务器上获取的;a receiving module, configured to receive display information sent by the client, wherein the display information includes at least anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from the web server;

第一确定模块,用于根据所述防伪信息,确定第一验证信息;a first determining module, configured to determine first verification information according to the anti-counterfeiting information;

第二确定模块,用于对所述显示网页信息进行哈希运算,确定第二验证信息;a second determining module, configured to perform a hash operation on the displayed webpage information to determine the second verification information;

验证模块,用于若所述第一验证信息与所述第二验证信息相同,则向客户端返回验证通过指令,以使所述客户端显示与所述显示网页信息对应的页面。A verification module, configured to return a verification pass instruction to the client if the first verification information is the same as the second verification information, so that the client displays a page corresponding to the displayed webpage information.

可选地,所述第一确定模块用于:Optionally, the first determining module is used for:

对所述防伪信息进行解析,得到与所述防伪信息对应的字节加密信息;Parsing the anti-counterfeiting information to obtain byte encrypted information corresponding to the anti-counterfeiting information;

采用预先设置的第一解密密钥对所述字节加密信息进行解密,得到第一文件验证信息和第一接口验证信息。The byte encrypted information is decrypted by using the preset first decryption key to obtain the first file verification information and the first interface verification information.

可选地,所述显示网页信息至少包括资源文件和接口信息,所述第二确定模块用于:Optionally, the displayed webpage information includes at least resource files and interface information, and the second determining module is used for:

对一个或多个所述第一资源文件分别进行哈希运算,得到一个或多个第一哈希值;Hash operation is performed on one or more of the first resource files, respectively, to obtain one or more first hash values;

采用第二加密密钥对所述一个或多个第一哈希值进行加密,得到第二文件验证信息;Encrypting the one or more first hash values with a second encryption key to obtain second file verification information;

对一个或多个所述第一接口信息进行哈希运算,得到一个或多个第二哈希值;Perform a hash operation on one or more of the first interface information to obtain one or more second hash values;

采用第三加密密钥对所述一个或多个第二哈希值进行加密,得到第二接口验证信息。The one or more second hash values are encrypted by using the third encryption key to obtain second interface verification information.

可选地,所述验证模块用于:Optionally, the verification module is used to:

若所述第一文件验证信息和第二文件验证信息相同,且所述第一接口验证信息和所述第二接口验证信息相同,则向客户端返回验证通过指令。If the first file verification information and the second file verification information are the same, and the first interface verification information and the second interface verification information are the same, a verification pass instruction is returned to the client.

可选地,所述装置还包括加载模块,所述加载模块用于:Optionally, the apparatus further includes a loading module, and the loading module is used for:

接收web服务器发送的预发布网页的页面信息,其中,所述页面信息包括第二资源文件和第二接口信息;receiving page information of a pre-published web page sent by a web server, wherein the page information includes a second resource file and second interface information;

根据所述第二资源文件和所述第二接口信息,确定所述防伪信息;determining the anti-counterfeiting information according to the second resource file and the second interface information;

将所述防伪信息加载到所述页面信息中,并将所述加载了防伪信息的页面信息发送至web服务器,以使所述web服务器进行页面正式发布。The anti-counterfeiting information is loaded into the page information, and the page information loaded with the anti-counterfeiting information is sent to a web server, so that the web server can officially publish the page.

可选地,所述加载模块用于:Optionally, the loading module is used to:

根据一个或多个所述第二资源文件,确定与所述第二资源文件对应的文件加载信息;Determine, according to one or more of the second resource files, file loading information corresponding to the second resource files;

根据一个或多个所述第二接口信息,确定与所述第二接口信息对应的接口加载信息;determining, according to one or more pieces of the second interface information, interface loading information corresponding to the second interface information;

采用第一加密密钥对所述文件加载信息和所述接口加载信息进行非对称加密,得到加密后的验证数据;其中,所述第一加密密钥与所述第一解密密钥对应;Asymmetric encryption is performed on the file loading information and the interface loading information by using a first encryption key to obtain encrypted verification data; wherein, the first encryption key corresponds to the first decryption key;

对所述加密后的验证数据进行字节处理,得到字节加密信息;Perform byte processing on the encrypted verification data to obtain byte encryption information;

将所述字节加密信息加载在图片中,得到包含有字节加密信息的图片;Loading the byte encryption information into the picture to obtain a picture containing the byte encryption information;

将所述图片确定为所述防伪信息。The picture is determined as the anti-counterfeiting information.

可选地,所述加载模块,具体用于:Optionally, the loading module is specifically used for:

对一个或多个所述第二资源文件分别进行哈希运算,得到一个或多个第三哈希值;Hash operation is performed on one or more of the second resource files, respectively, to obtain one or more third hash values;

采用所述第二加密密钥对所述一个或多个第三哈希值进行非对称加密,得到文件加载信息;Using the second encryption key to perform asymmetric encryption on the one or more third hash values to obtain file loading information;

对一个或多个所述第二接口信息进行哈希运算,得到一个或多个第四哈希值;Perform a hash operation on one or more of the second interface information to obtain one or more fourth hash values;

采用所述第三加密密钥对所述一个或多个第四哈希值进行加密,得到接口加载信息。The one or more fourth hash values are encrypted by using the third encryption key to obtain interface loading information.

第三个方面,本发明实施例提供一种终端设备,包括:至少一个处理器和存储器;In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and a memory;

所述存储器存储计算机程序;所述至少一个处理器执行所述存储器存储的计算机程序,以实现第一个方面提供的网页防伪验证方法。The memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the web page anti-counterfeiting verification method provided by the first aspect.

第四个方面,本发明实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,所述计算机程序被执行时实现第一个方面提供的网页防伪验证方法。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the webpage anti-counterfeiting verification method provided in the first aspect is implemented.

本发明实施例包括以下优点:The embodiments of the present invention include the following advantages:

本发明实施例提供的网页防伪验证方法、装置、终端设备和存储介质,通过接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;根据防伪信息,确定第一验证信息;对显示网页信息进行哈希运算,确定第二验证信息;若第一验证信息与第二验证信息相同,则向客户端返回验证通过指令,以使客户端显示与显示网页信息对应的页面,通过在网页发布前,在网页上增加防伪信息,当客户端访问该网页时,根据网页显示信息与防伪信息进行验证,若通过验证,则在客户端上显示网页,从而提高网页显示的安全性。The webpage anti-counterfeiting verification method, device, terminal device, and storage medium provided by the embodiments of the present invention receive display information sent by the client, wherein the display information includes at least anti-counterfeiting information and display webpage information; Obtained from the server; determine the first verification information according to the anti-counterfeiting information; perform a hash operation on the displayed webpage information to determine the second verification information; if the first verification information is the same as the second verification information, return a verification pass instruction to the client , so that the client can display the page corresponding to the displayed webpage information, by adding anti-counterfeiting information on the webpage before the webpage is published, when the client accesses the webpage, it will verify according to the webpage display information and anti-counterfeiting information. Display web pages on the client, thereby improving the security of web page display.

附图说明Description of drawings

图1是本发明的一种网页防伪验证方法实施例的步骤流程图;1 is a flow chart of steps of an embodiment of a webpage anti-counterfeiting verification method according to the present invention;

图2是本发明的另一种网页防伪验证方法实施例的步骤流程图;2 is a flow chart of steps of another embodiment of a webpage anti-counterfeiting verification method of the present invention;

图3是本发明的再一种网页防伪验证方法实施例的步骤流程图;3 is a flow chart of steps of another embodiment of a webpage anti-counterfeiting verification method according to the present invention;

图4是本发明的又一种网页防伪验证方法实施例的步骤流程图;4 is a flow chart of steps of another embodiment of a webpage anti-counterfeiting verification method according to the present invention;

图5是本发明的一种网页防伪验证装置实施例的结构框图;5 is a structural block diagram of an embodiment of a webpage anti-counterfeiting verification device according to the present invention;

图6是本发明的一种终端设备的结构示意图。FIG. 6 is a schematic structural diagram of a terminal device according to the present invention.

具体实施方式Detailed ways

为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more clearly understood, the present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments.

本发明一实施例提供一种网页防伪验证方法,用于对应用程序中内嵌的网页进行防伪验证。本实施例的执行主体为网页防伪验证装置,设置在防伪服务器上。An embodiment of the present invention provides a web page anti-counterfeiting verification method, which is used to perform anti-counterfeiting verification on a webpage embedded in an application program. The execution body of this embodiment is a webpage anti-counterfeiting verification device, which is set on the anti-counterfeiting server.

参照图1,示出了本发明的一种网页防伪验证方法实施例的步骤流程图,该方法具体可以包括如下步骤:Referring to FIG. 1, there is shown a flow chart of steps of an embodiment of a webpage anti-counterfeiting verification method of the present invention. The method may specifically include the following steps:

S101、接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;S101. Receive display information sent by a client, wherein the display information includes at least anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from a web server;

具体地,在客户端上安装有应用程序,用户想要访问应用程序内嵌的网页,用户可以点击应用程序内网页的访问信息,客户端向web服务器发送页面请求,web服务器向客户端返回与访问信息对应的显示信息,该显示信息包括显示页面信息和防伪信息,客户端上的应用程序根据显示信息进行网页的页面显示,同时,客户端将该显示信息发送至防伪服务器,防伪服务器用于对显示信息进行验证。Specifically, an application is installed on the client, the user wants to access the webpage embedded in the application, the user can click the access information of the webpage in the application, the client sends a page request to the web server, and the web server returns the The display information corresponding to the access information, the display information includes display page information and anti-counterfeiting information. The application on the client displays the page of the webpage according to the display information. At the same time, the client sends the display information to the anti-counterfeiting server, and the anti-counterfeiting server is used for Verify the displayed information.

S102、根据防伪信息,确定第一验证信息;S102, determining first verification information according to the anti-counterfeiting information;

具体地,防伪服务器对防伪信息进行处理,得到与防伪信息对应的字节加密信息;采用预先设置的第一解密密钥对字节加密信息进行解密,得到第一验证信息;Specifically, the anti-counterfeiting server processes the anti-counterfeiting information to obtain byte encrypted information corresponding to the anti-counterfeiting information; decrypts the byte encrypted information using a preset first decryption key to obtain the first verification information;

S103、对显示网页信息进行哈希运算,确定第二验证信息;S103, performing a hash operation on the displayed webpage information to determine the second verification information;

具体地,防伪服务器对显示信息中的显示页面信息进行哈希运算,并采用非对称加密密钥进行加密,得到第二验证信息。Specifically, the anti-counterfeiting server performs a hash operation on the display page information in the display information, and encrypts it with an asymmetric encryption key to obtain the second verification information.

S104、若第一验证信息与第二验证信息相同,则向客户端返回验证通过指令,以使客户端显示与显示网页信息对应的页面。S104. If the first verification information is the same as the second verification information, return a verification pass instruction to the client, so that the client displays a page corresponding to the displayed webpage information.

具体地,防伪服务器对第一验证信息和第二验证信息进行比较,若第一验证信息和第二验证信息相同,说明该显示信息通过验证,这时,防伪服务器向客户端发送验证通过指令,客户端在接收到验证通过指令后,一直显示与显示网页信息对应的页面;Specifically, the anti-counterfeiting server compares the first verification information and the second verification information. If the first verification information and the second verification information are the same, it means that the displayed information has passed the verification. At this time, the anti-counterfeiting server sends a verification pass instruction to the client. After the client receives the verification pass instruction, it always displays the page corresponding to the displayed web page information;

若防伪服务器判断第一验证信息和第二验证信息不相同,说明显示信息未通过验证,防伪服务器向客户端发送验证未通过指令,客户端在接收到验证未通过指令后,关闭已经加载了的页面。If the anti-counterfeiting server judges that the first verification information and the second verification information are different, it means that the displayed information has not passed the verification, and the anti-counterfeiting server sends the verification failed instruction to the client. page.

本发明实施例提供的网页防伪验证方法,通过接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;根据防伪信息,确定第一验证信息;对显示网页信息进行哈希运算,确定第二验证信息;若第一验证信息与第二验证信息相同,则向客户端返回验证通过指令,以使客户端显示与显示网页信息对应的页面,通过在网页发布前,在网页上增加防伪信息,当客户端访问该网页时,根据网页显示信息与防伪信息进行验证,若通过验证,则在客户端上显示网页,从而提高网页显示的安全性。The webpage anti-counterfeiting verification method provided by the embodiment of the present invention receives display information sent by the client, wherein the display information includes at least anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from the web server; according to the anti-counterfeiting information , determine the first verification information; perform a hash operation on the displayed web page information to determine the second verification information; if the first verification information is the same as the second verification information, return the verification pass instruction to the client, so that the client can display and display The page corresponding to the webpage information, by adding anti-counterfeiting information on the webpage before the webpage is published, when the client accesses the webpage, it is verified according to the information displayed on the webpage and the anti-counterfeiting information. If the verification is passed, the webpage is displayed on the client, thereby Improve the security of web page display.

本发明又一实施例对上述实施例提供的网页防伪验证方法做进一步补充说明。Another embodiment of the present invention provides further supplementary descriptions of the web page anti-counterfeiting verification method provided by the foregoing embodiment.

如图2所示,示出了本发明的另一种网页防伪验证方法实施例的步骤流程图,该网页防伪验证方法包括:As shown in FIG. 2, it shows a flowchart of the steps of another embodiment of a webpage anti-counterfeiting verification method of the present invention, and the webpage anti-counterfeiting verification method includes:

S201、接收web服务器发送的预发布网页的页面信息,其中,页面信息包括第二资源文件和第二接口信息;S201. Receive page information of a pre-published web page sent by a web server, where the page information includes a second resource file and second interface information;

具体地,在手机端的应用程序上加载网页时,需要现在web服务器上进行网页发布,这样,手机端的应用程序才可以访问内嵌的网页。Specifically, when a web page is loaded on an application on the mobile phone, the web page needs to be published on the web server, so that the application on the mobile phone can access the embedded web page.

web服务器将预发布的显示页面的页面信息发送至防伪服务器,其中,页面信息包括第二资源文件和第二接口信息,第二资源文件中包含显示该页面的所有的资源文件,第二资源文件包括显示页面的图片、文本、代码等文件,第二接口信息包括所有接口类URL(Uniform Resource Locator,统一资源定位器)地址。The web server sends the page information of the pre-published display page to the anti-counterfeiting server, wherein the page information includes a second resource file and second interface information, the second resource file includes all resource files for displaying the page, and the second resource file Including pictures, texts, codes and other files of the display page, and the second interface information includes all interface class URL (Uniform Resource Locator, Uniform Resource Locator) addresses.

S202、根据第二资源文件和第二接口信息,确定防伪信息;S202, determining anti-counterfeiting information according to the second resource file and the second interface information;

具体包括:防伪服务器分别对第二资源文件和第二接口信息进行哈希运算和加密,得到防伪信息。具体包括:Specifically, the anti-counterfeiting server performs hash operation and encryption on the second resource file and the second interface information, respectively, to obtain anti-counterfeiting information. Specifically include:

步骤A1、根据一个或多个第二资源文件,确定与第二资源文件对应的文件加载信息;Step A1, according to one or more second resource files, determine the file loading information corresponding to the second resource file;

防伪服务器接收到的第二资源文件可能是一个,也可能是多个,多个是指两个以及两个以上,防伪服务器对一个或多个第二资源文件分别进行哈希运算,得到一个或多个第三哈希值;采用第二加密密钥对一个或多个第三哈希值进行非对称加密,得到文件加载信息;The second resource file received by the anti-counterfeiting server may be one or multiple, and multiple refers to two or more. The anti-counterfeiting server performs hash operation on one or more second resource files respectively, and obtains one or more A plurality of third hash values; using the second encryption key to asymmetrically encrypt one or more third hash values to obtain file loading information;

示例性地,若有5个资源文件,对5各个资源文件分别进行哈希运算,得到5个哈希值,并将5个哈希值确定为一个哈希元组A,例如:[1f4c,duae,19vh,20PC,102cc];然后再采用第二加密密钥对前面的哈希元组A进行非对称加密,得到文件加载信息;Exemplarily, if there are 5 resource files, perform a hash operation on each of the 5 resource files to obtain 5 hash values, and determine the 5 hash values as a hash tuple A, for example: [1f4c, duae, 19vh, 20PC, 102cc]; then use the second encryption key to asymmetrically encrypt the preceding hash tuple A to obtain file loading information;

步骤A2、根据一个或多个第二接口信息,确定与第二接口信息对应的接口加载信息;Step A2: Determine interface loading information corresponding to the second interface information according to one or more second interface information;

具体地,防伪服务器还需要对所有的接口类的URL地址进行哈希运算,即对一个或多个第二接口信息进行哈希运算,得到一个或多个第四哈希值;Specifically, the anti-counterfeiting server also needs to perform a hash operation on the URL addresses of all interface classes, that is, perform a hash operation on one or more second interface information to obtain one or more fourth hash values;

采用第三加密密钥对一个或多个第四哈希值进行加密,得到接口加载信息。The one or more fourth hash values are encrypted with the third encryption key to obtain the interface loading information.

示例性地,防伪服务器对5个接口类URL地址进行哈希运算,得到5个哈希值,将5个哈希值确定为一个哈希元组B,例如:[8iel,uils,765k,887s,281m]。然后再采用第三加密密钥对哈希元组内的哈希值进行非对称加密,得到接口加载信息。Exemplarily, the anti-counterfeiting server performs hash operation on 5 interface class URL addresses, obtains 5 hash values, and determines the 5 hash values as a hash tuple B, for example: [8iel,uils,765k,887s , 281m]. Then, the third encryption key is used to asymmetrically encrypt the hash value in the hash tuple to obtain the interface loading information.

步骤A3、采用第一加密密钥对文件加载信息和接口加载信息进行非对称加密,得到加密后的验证数据;其中,第一加密密钥与第一解密密钥对应;Step A3, using the first encryption key to asymmetrically encrypt the file loading information and the interface loading information to obtain encrypted verification data; wherein the first encryption key corresponds to the first decryption key;

具体地,防伪服务器再采用第一加密密钥对所有的文件加载信息和接口加载信息进行非对称加密,得到加密后的验证数据。Specifically, the anti-counterfeiting server then uses the first encryption key to asymmetrically encrypt all the file loading information and the interface loading information to obtain encrypted verification data.

步骤A4、对加密后的验证数据进行字节处理,得到字节加密信息;Step A4, performing byte processing on the encrypted verification data to obtain byte encryption information;

具体地,防伪服务器对加密后的验证数据进行字节处理,成为16进制数组,保存于一个新生成的图片当中,为了在页面上不显示该防伪信息,则将这个图片的透明度设定为0,即完全透明。也可以直接将16进制的数组直接加载在图片中,在本发明实施例中不做具体限定。Specifically, the anti-counterfeiting server performs byte processing on the encrypted verification data to form a hexadecimal array, which is stored in a newly generated picture. In order not to display the anti-counterfeiting information on the page, the transparency of the picture is set to 0, i.e. completely transparent. The hexadecimal array may also be directly loaded into the picture, which is not specifically limited in this embodiment of the present invention.

步骤A5、将字节加密信息加载在图片中,得到包含有字节加密信息的图片;Step A5, the byte encryption information is loaded in the picture, obtains the picture that contains the byte encryption information;

将该16进制的字节数据加载在图片中,得到包含有字节加密信息的图片,该图片即为防伪信息。The hexadecimal byte data is loaded into the picture to obtain a picture containing byte encryption information, and the picture is anti-counterfeiting information.

步骤A6、将图片确定为防伪信息。Step A6: Determine the picture as anti-counterfeiting information.

S203、将防伪信息加载到页面信息中,并将加载了防伪信息的页面信息发送至web服务器,以使web服务器进行页面正式发布。S203: Load the anti-counterfeiting information into the page information, and send the page information loaded with the anti-counterfeiting information to the web server, so that the web server can officially publish the page.

具体地,防伪服务器将防伪信息加载在页面信息中,将加载了防伪信息的页面信息发送至web服务器在接收到该页面信息后,根据该加载了防伪信息的页面信息进行正式发布,这样,客户端就可以访问应用程序中内嵌的网页。Specifically, the anti-counterfeiting server loads the anti-counterfeiting information in the page information, and sends the page information loaded with the anti-counterfeiting information to the web server. The client can access the web pages embedded in the application.

S204、接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;S204. Receive display information sent by the client, where the display information at least includes anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from the web server;

具体的,在实际应用中,用户想要访问应用程序内嵌的网页,用户可以点击应用程序内网页的访问信息,客户端向web服务器发送页面请求,web服务器向客户端返回与访问信息对应的显示信息,该显示信息包括显示页面信息和防伪信息,客户端上的应用程序根据显示信息进行网页的页面显示,同时,客户端将该显示信息发送至防伪服务器,防伪服务器用于对显示信息进行验证。Specifically, in practical applications, if a user wants to access a web page embedded in the application, the user can click the access information of the web page in the application, the client sends a page request to the web server, and the web server returns the corresponding access information to the client. Display information, the display information includes display page information and anti-counterfeiting information. The application on the client displays the page of the webpage according to the display information. At the same time, the client sends the display information to the anti-counterfeiting server, and the anti-counterfeiting server is used to perform the display information. verify.

在此过程中,防伪服务器遍历客户端发送的显示信息中的显示页面信息,对该显示页面信息进行验证。In this process, the anti-counterfeiting server traverses the display page information in the display information sent by the client, and verifies the display page information.

示例性地,防伪服务器在生成防伪信息的时候,采用的是10个资源文件和10个URL地址信息,得到的防伪信息,但是,在实际页面访问时,防伪服务器接收到的显示页面信息包括8个资源文件和8个URL地址信息,在此过程中,防伪服务器只对这8个资源文件和8个URL地址信息进行哈希运算和加密,得到第二验证信息,然后对防伪信息进行处理,得到第一验证信息,然后对第一验证信息和第二验证信息进行比较。也就是说,在生成防伪信息的时候是全部的资源文件和URL地址信息,而在实际页面访问的过程中,可能是全部的资源文件和URL地址信息,也可能是部分的资源文件和URL地址信息,在本发明实施例中不做具体限定。Exemplarily, when the anti-counterfeiting server generates the anti-counterfeiting information, it uses 10 resource files and 10 URL address information to obtain the anti-counterfeiting information. However, when the actual page is accessed, the displayed page information received by the anti-counterfeiting server includes 8 In this process, the anti-counterfeiting server only performs hash operation and encryption on these 8 resource files and 8 URL address information to obtain the second verification information, and then processes the anti-counterfeiting information. The first verification information is obtained, and then the first verification information and the second verification information are compared. That is to say, when the anti-counterfeiting information is generated, it is all resource files and URL address information, and in the process of actual page access, it may be all resource files and URL address information, or some resource files and URL addresses. information, which is not specifically limited in this embodiment of the present invention.

S205、对防伪信息进行解析,得到与防伪信息对应的字节加密信息;S205, parse the anti-counterfeiting information to obtain byte encrypted information corresponding to the anti-counterfeiting information;

S206、采用预先设置的第一解密密钥对字节加密信息进行解密,得到第一文件验证信息和第一接口验证信息。S206: Decrypt the byte encrypted information by using the preset first decryption key to obtain the first file verification information and the first interface verification information.

S207、对一个或多个第一资源文件分别进行哈希运算,得到一个或多个第一哈希值;S207, respectively performing hash operation on one or more first resource files to obtain one or more first hash values;

S208、采用第二加密密钥对一个或多个第一哈希值进行加密,得到第二文件验证信息;S208, encrypting one or more first hash values with a second encryption key to obtain second file verification information;

S209、对一个或多个第一接口信息进行哈希运算,得到一个或多个第二哈希值;S209, performing a hash operation on one or more first interface information to obtain one or more second hash values;

S210、采用第三加密密钥对一个或多个第二哈希值进行加密,得到第二接口验证信息。S210. Encrypt one or more second hash values with a third encryption key to obtain second interface verification information.

S211、若第一文件验证信息和第二文件验证信息相同,且第一接口验证信息和第二接口验证信息相同,则向客户端返回验证通过指令。S211. If the verification information of the first file and the verification information of the second file are the same, and the verification information of the first interface and the verification information of the second interface are the same, return a verification pass instruction to the client.

图3是本发明的再一种网页防伪验证方法实施例的步骤流程图,本发明实施例应用于手机的应用程序APP内嵌网页的防伪识别场景,该网页防伪验证方法包括:3 is a flow chart of steps of another embodiment of a webpage anti-counterfeiting verification method according to the present invention. The embodiment of the present invention is applied to an anti-counterfeiting identification scene of a webpage embedded in an application program APP of a mobile phone. The webpage anti-counterfeiting verification method includes:

1.WEB服务器页面发布前先进行预发布。1. The web server page should be pre-published before publishing.

2.防伪服务器对预发布页面进行增加防伪信息的操作,然后将加载了防伪信息的页面发送至web服务器。2. The anti-counterfeiting server performs the operation of adding anti-counterfeiting information to the pre-release page, and then sends the page loaded with the anti-counterfeiting information to the web server.

3.WEB服务器对加载了防伪信息的页面进行正式发布。3. The WEB server officially publishes the page loaded with anti-counterfeiting information.

4.手机端的APP端用户向web服务器发起页面访问,web服务器向手机APP端返回页面信息。4. The APP user on the mobile phone initiates a page visit to the web server, and the web server returns the page information to the mobile APP.

5.手机端的APP端将该页面信息发送至防伪服务器进行验证,若验证成功,则防伪服务器向手机端APP端返回验证成功指令,则手机端的APP内的内嵌网页正常加载,若验证失败,则防伪服务器向手机端APP端返回验证失败指令,则手机端的APP内的内嵌网页关闭已经加载的页面。5. The APP on the mobile phone sends the page information to the anti-counterfeiting server for verification. If the verification is successful, the anti-counterfeiting server returns a verification success command to the APP on the mobile phone, and the embedded webpage in the APP on the mobile phone loads normally. If the verification fails, Then, the anti-counterfeiting server returns a verification failure instruction to the APP on the mobile phone, and the embedded web page in the APP on the mobile phone closes the loaded page.

本发明实施例通过对所有资源文件和接口url信息进行哈希计算,并生成防伪指纹,并且加密存储于图片中,不会将签名信息泄露到网页代码中,具有更强的安全性。The embodiment of the present invention has stronger security by performing hash calculation on all resource files and interface url information, generating anti-counterfeiting fingerprints, and encrypting them and storing them in pictures without leaking signature information into webpage codes.

图4是本发明的又一种网页防伪验证方法实施例的步骤流程图,本发明实施例中防伪服务器包括防伪指纹生成装置,防伪指纹验证装置几个部分组成。4 is a flow chart of steps of another embodiment of a webpage anti-counterfeiting verification method of the present invention. In the embodiment of the present invention, the anti-counterfeiting server includes an anti-counterfeiting fingerprint generating device and an anti-counterfeiting fingerprint verification device.

1.指纹生成装置:1. Fingerprint generation device:

指纹生成装置主要负责生成页面防伪指纹,并将指纹植入网页,以便后续验证使用。The fingerprint generating device is mainly responsible for generating page anti-counterfeiting fingerprints, and implanting the fingerprints into web pages for subsequent verification and use.

防伪指纹的生成规则如下:The generation rules of anti-counterfeiting fingerprints are as follows:

1)所有资源文件进行哈希运算,得出一个哈希元组A,例如:[1f4c,duae,…,20PC,102cc]1) All resource files are hashed to get a hash tuple A, for example: [1f4c,duae,…,20PC,102cc]

将以上哈希元组通过加密key1(第二加密密钥)进行非对称加密。The above hash tuple is asymmetrically encrypted by encryption key1 (the second encryption key).

2)对所有接口类uri地址进行哈希运算,得出一个哈希元组B,例如:[8iel,uils,…,887s,281m]2) Hash all interface class uri addresses to get a hash tuple B, for example: [8iel,uils,…,887s,281m]

将以上哈希元组通过加密key2(第三加密密钥)进行非对称加密。The above hash tuple is asymmetrically encrypted by encryption key2 (third encryption key).

3)将以上2个元组信息通过加密key3即第一加密密钥进行加密并进行byte处理成为16进制数组,保存于一个新生成的图片当中,将这个图片的alpha值设定为0,即完全透明。3) Encrypt the above 2 tuple information through encryption key3, that is, the first encryption key, and perform byte processing into a hexadecimal array, save it in a newly generated image, and set the alpha value of this image to 0, i.e. completely transparent.

将图片插入到预发布页面底部。Insert the image at the bottom of the pre-release page.

2.防伪指纹验证装置2. Anti-counterfeiting fingerprint verification device

当APP端访问到页面后,将页面底部保存有指纹信息的图片回传给防伪服务器的访问验证装置,同时将图片中包括的接口类URL地址、资源文件哈希值等信息一同发送给验证装置。When the APP side accesses the page, it sends the picture with the fingerprint information at the bottom of the page back to the access verification device of the anti-counterfeiting server, and sends the interface URL address, resource file hash value and other information included in the picture to the verification device together. .

防伪服务器验证装置接收到以上信息后的处理流程:The processing flow after the anti-counterfeiting server verification device receives the above information:

1)将图片中即防伪信息的16进制数据提取出来,通过非对称解密key3还原为2个元组信息,获得2个加密的哈希元组A,B。1) Extract the hexadecimal data of the anti-counterfeiting information in the picture, restore it to 2 tuple information through asymmetric decryption key3, and obtain 2 encrypted hash tuples A, B.

2)遍历APP传回的所有资源文件哈希值,并通过key1进行非对称加密,然后去加密哈希元组A中进行比较,如果则继续,否则终止。2) Traverse all the resource file hash values returned by the APP, perform asymmetric encryption through key1, and then go to the encrypted hash tuple A for comparison, if it continues, otherwise terminate.

3)遍历APP传回的所有接口类uri地址进行哈希计算,并通过key2进行非对称加密然后去加密哈希元组B中进行比较,如果则继续,否则终止。3) Traverse all interface class uri addresses returned by APP for hash calculation, perform asymmetric encryption through key2, and then compare in encrypted hash tuple B, if it continues, otherwise terminate.

4)如果2、3步骤中有任一个发生了终止,则验证失败,否则验证成功。4) If any one of steps 2 and 3 is terminated, the verification fails, otherwise the verification succeeds.

需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。It should be noted that, for the sake of simple description, the method embodiments are described as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequences, because According to embodiments of the present invention, certain steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

本发明实施例提供的网页防伪验证方法,通过接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;根据防伪信息,确定第一验证信息;对显示网页信息进行哈希运算,确定第二验证信息;若第一验证信息与第二验证信息相同,则向客户端返回验证通过指令,以使客户端显示与显示网页信息对应的页面,通过在网页发布前,在网页上增加防伪信息,当客户端访问该网页时,根据网页显示信息与防伪信息进行验证,若通过验证,则在客户端上显示网页,从而提高网页显示的安全性。The webpage anti-counterfeiting verification method provided by the embodiment of the present invention receives display information sent by the client, wherein the display information includes at least anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from the web server; according to the anti-counterfeiting information , determine the first verification information; perform a hash operation on the displayed web page information to determine the second verification information; if the first verification information is the same as the second verification information, return the verification pass instruction to the client, so that the client can display and display The page corresponding to the webpage information, by adding anti-counterfeiting information on the webpage before the webpage is published, when the client accesses the webpage, it is verified according to the information displayed on the webpage and the anti-counterfeiting information. If the verification is passed, the webpage is displayed on the client, thereby Improve the security of web page display.

本发明另一实施例提供一种网页防伪验证装置,用于执行上述实施例提供的网页防伪验证方法。Another embodiment of the present invention provides a webpage anti-counterfeiting verification device, which is used for executing the webpage anti-counterfeiting verification method provided by the above embodiment.

参照图5,示出了本发明的一种网页防伪验证装置实施例的结构框图,该装置具体可以包括如下模块:接收模块501、第一确定模块502、第二确定模块503和验证模块504,其中:Referring to FIG. 5 , a structural block diagram of an embodiment of a webpage anti-counterfeiting verification device of the present invention is shown. The device may specifically include the following modules: a receivingmodule 501, a first determiningmodule 502, a second determiningmodule 503, and averification module 504, in:

接收模块501用于接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;The receivingmodule 501 is configured to receive display information sent by the client, wherein the display information includes at least anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from the web server;

第一确定模块502用于根据防伪信息,确定第一验证信息;The first determiningmodule 502 is configured to determine the first verification information according to the anti-counterfeiting information;

第二确定模块503用于对显示网页信息进行哈希运算,确定第二验证信息;The second determiningmodule 503 is configured to perform a hash operation on the displayed webpage information to determine the second verification information;

验证模块504用于若第一验证信息与第二验证信息相同,则向客户端返回验证通过指令,以使客户端显示与显示网页信息对应的页面。Theverification module 504 is configured to return a verification pass instruction to the client if the first verification information is the same as the second verification information, so that the client displays a page corresponding to the displayed webpage information.

本发明实施例提供的网页防伪验证装置,通过接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;根据防伪信息,确定第一验证信息;对显示网页信息进行哈希运算,确定第二验证信息;若第一验证信息与第二验证信息相同,则向客户端返回验证通过指令,以使客户端显示与显示网页信息对应的页面,通过在网页发布前,在网页上增加防伪信息,当客户端访问该网页时,根据网页显示信息与防伪信息进行验证,若通过验证,则在客户端上显示网页,从而提高网页显示的安全性。The webpage anti-counterfeiting verification device provided by the embodiment of the present invention receives the display information sent by the client, wherein the display information includes at least anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from the web server; according to the anti-counterfeiting information , determine the first verification information; perform a hash operation on the displayed web page information to determine the second verification information; if the first verification information is the same as the second verification information, return the verification pass instruction to the client, so that the client can display and display The page corresponding to the webpage information, by adding anti-counterfeiting information on the webpage before the webpage is published, when the client accesses the webpage, it is verified according to the information displayed on the webpage and the anti-counterfeiting information. If the verification is passed, the webpage is displayed on the client, thereby Improve the security of web page display.

本发明又一实施例对上述实施例提供的网页防伪验证装置做进一步补充说明。Yet another embodiment of the present invention further supplements the description of the webpage anti-counterfeiting verification device provided by the above embodiment.

可选地,第一确定模块用于:Optionally, the first determining module is used for:

对防伪信息进行解析,得到与防伪信息对应的字节加密信息;Analyze the anti-counterfeiting information to obtain byte encrypted information corresponding to the anti-counterfeiting information;

采用预先设置的第一解密密钥对字节加密信息进行解密,得到第一文件验证信息和第一接口验证信息。The byte encrypted information is decrypted by using the preset first decryption key to obtain the first file verification information and the first interface verification information.

可选地,显示网页信息至少包括资源文件和接口信息,第二确定模块用于:Optionally, the displayed webpage information includes at least resource files and interface information, and the second determining module is used for:

对一个或多个第一资源文件分别进行哈希运算,得到一个或多个第一哈希值;Hash operation is performed on one or more first resource files respectively to obtain one or more first hash values;

采用第二加密密钥对一个或多个第一哈希值进行加密,得到第二文件验证信息;Encrypt one or more first hash values with a second encryption key to obtain second file verification information;

对一个或多个第一接口信息进行哈希运算,得到一个或多个第二哈希值;Perform a hash operation on one or more first interface information to obtain one or more second hash values;

采用第三加密密钥对一个或多个第二哈希值进行加密,得到第二接口验证信息。The one or more second hash values are encrypted with the third encryption key to obtain the second interface verification information.

可选地,验证模块用于:Optionally, the validation module is used to:

若第一文件验证信息和第二文件验证信息相同,且第一接口验证信息和第二接口验证信息相同,则向客户端返回验证通过指令。If the verification information of the first file and the verification information of the second file are the same, and the verification information of the first interface and the verification information of the second interface are the same, a verification passing instruction is returned to the client.

可选地,装置还包括加载模块,加载模块用于:Optionally, the apparatus further includes a loading module, and the loading module is used for:

接收web服务器发送的预发布网页的页面信息,其中,页面信息包括第二资源文件和第二接口信息;receiving the page information of the pre-published web page sent by the web server, wherein the page information includes the second resource file and the second interface information;

根据第二资源文件和第二接口信息,确定防伪信息;Determine anti-counterfeiting information according to the second resource file and the second interface information;

将防伪信息加载到页面信息中,并将加载了防伪信息的页面信息发送至web服务器,以使web服务器进行页面正式发布。The anti-counterfeiting information is loaded into the page information, and the page information loaded with the anti-counterfeiting information is sent to the web server, so that the web server can officially publish the page.

可选地,加载模块用于:Optionally, load modules are used to:

根据一个或多个第二资源文件,确定与第二资源文件对应的文件加载信息;Determine, according to one or more second resource files, file loading information corresponding to the second resource files;

根据一个或多个第二接口信息,确定与第二接口信息对应的接口加载信息;determining, according to one or more pieces of second interface information, interface loading information corresponding to the second interface information;

采用第一加密密钥对文件加载信息和接口加载信息进行非对称加密,得到加密后的验证数据;其中,第一加密密钥与第一解密密钥对应;The first encryption key is used to asymmetrically encrypt the file loading information and the interface loading information to obtain encrypted verification data; wherein the first encryption key corresponds to the first decryption key;

对加密后的验证数据进行字节处理,得到字节加密信息;Perform byte processing on the encrypted verification data to obtain byte encrypted information;

将字节加密信息加载在图片中,得到包含有字节加密信息的图片;Load the byte encryption information into the picture to get the picture containing the byte encryption information;

将图片确定为防伪信息。Identify pictures as anti-counterfeiting information.

可选地,加载模块,具体用于:Optionally, load modules, specifically for:

对一个或多个第二资源文件分别进行哈希运算,得到一个或多个第三哈希值;Hash operation is performed on one or more second resource files respectively to obtain one or more third hash values;

采用第二加密密钥对一个或多个第三哈希值进行非对称加密,得到文件加载信息;Asymmetric encryption is performed on one or more third hash values using the second encryption key to obtain file loading information;

对一个或多个第二接口信息进行哈希运算,得到一个或多个第四哈希值;Perform a hash operation on one or more second interface information to obtain one or more fourth hash values;

采用第三加密密钥对一个或多个第四哈希值进行加密,得到接口加载信息。The one or more fourth hash values are encrypted with the third encryption key to obtain the interface loading information.

需要说明的是,本实施例中各可实施的方式可以单独实施,也可以在不冲突的情况下以任意组合方式结合实施本申请不做限定。It should be noted that, each implementable manner in this embodiment may be implemented independently, or may be implemented in combination in any combination under the condition of no conflict, which is not limited in this application.

对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the apparatus embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for related parts.

本发明实施例提供的网页防伪验证装置,通过接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;根据防伪信息,确定第一验证信息;对显示网页信息进行哈希运算,确定第二验证信息;若第一验证信息与第二验证信息相同,则向客户端返回验证通过指令,以使客户端显示与显示网页信息对应的页面,通过在网页发布前,在网页上增加防伪信息,当客户端访问该网页时,根据网页显示信息与防伪信息进行验证,若通过验证,则在客户端上显示网页,从而提高网页显示的安全性。The webpage anti-counterfeiting verification device provided by the embodiment of the present invention receives the display information sent by the client, wherein the display information includes at least anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from the web server; according to the anti-counterfeiting information , determine the first verification information; perform a hash operation on the displayed web page information to determine the second verification information; if the first verification information is the same as the second verification information, return the verification pass instruction to the client, so that the client can display and display The page corresponding to the webpage information, by adding anti-counterfeiting information on the webpage before the webpage is published, when the client accesses the webpage, it is verified according to the information displayed on the webpage and the anti-counterfeiting information. If the verification is passed, the webpage is displayed on the client, thereby Improve the security of web page display.

本发明再一实施例提供一种终端设备,用于执行上述实施例提供的网页防伪验证方法。Still another embodiment of the present invention provides a terminal device, which is configured to execute the webpage anti-counterfeiting verification method provided by the above embodiment.

图6是本发明的一种终端设备的结构示意图,如图6所示,该终端设备包括:至少一个处理器601和存储器602;FIG. 6 is a schematic structural diagram of a terminal device according to the present invention. As shown in FIG. 6 , the terminal device includes: at least oneprocessor 601 and amemory 602;

存储器存储计算机程序;至少一个处理器执行存储器存储的计算机程序,以实现上述实施例提供的网页防伪验证方法。The memory stores a computer program; at least one processor executes the computer program stored in the memory to implement the web page anti-counterfeiting verification method provided by the foregoing embodiments.

本实施例提供的终端设备,通过接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;根据防伪信息,确定第一验证信息;对显示网页信息进行哈希运算,确定第二验证信息;若第一验证信息与第二验证信息相同,则向客户端返回验证通过指令,以使客户端显示与显示网页信息对应的页面,通过在网页发布前,在网页上增加防伪信息,当客户端访问该网页时,根据网页显示信息与防伪信息进行验证,若通过验证,则在客户端上显示网页,从而提高网页显示的安全性。The terminal device provided in this embodiment receives the display information sent by the client, wherein the display information includes at least anti-counterfeiting information and displayed webpage information; wherein, the display information is obtained by the client from the web server; according to the anti-counterfeiting information, determine the first 1. Verification information; perform hash operation on the displayed webpage information to determine the second verification information; if the first verification information is the same as the second verification information, return a verification pass instruction to the client, so that the client display corresponds to the displayed webpage information By adding anti-counterfeiting information on the webpage before the webpage is published, when the client accesses the webpage, it will verify the information displayed on the webpage and the anti-counterfeiting information. If the verification is passed, the webpage will be displayed on the client, thereby improving the display of the webpage. security.

本申请又一实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,计算机程序被执行时实现上述任一实施例提供的网页防伪验证方法。Another embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the webpage anti-counterfeiting verification method provided by any of the foregoing embodiments is implemented.

根据本实施例的计算机可读存储介质,通过接收客户端发送的显示信息,其中,显示信息至少包括防伪信息和显示网页信息;其中,显示信息是客户端从web服务器上获取的;根据防伪信息,确定第一验证信息;对显示网页信息进行哈希运算,确定第二验证信息;若第一验证信息与第二验证信息相同,则向客户端返回验证通过指令,以使客户端显示与显示网页信息对应的页面,通过在网页发布前,在网页上增加防伪信息,当客户端访问该网页时,根据网页显示信息与防伪信息进行验证,若通过验证,则在客户端上显示网页,从而提高网页显示的安全性。According to the computer-readable storage medium of this embodiment, the display information sent by the client is received, wherein the display information includes at least anti-counterfeiting information and display webpage information; wherein, the display information is obtained by the client from the web server; according to the anti-counterfeiting information , determine the first verification information; perform a hash operation on the displayed web page information to determine the second verification information; if the first verification information is the same as the second verification information, return the verification pass instruction to the client, so that the client can display and display The page corresponding to the webpage information, by adding anti-counterfeiting information on the webpage before the webpage is published, when the client accesses the webpage, it is verified according to the information displayed on the webpage and the anti-counterfeiting information. If the verification is passed, the webpage is displayed on the client, thereby Improve the security of web page display.

本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments may be referred to each other.

本领域内的技术人员应明白,本发明实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。It should be understood by those skilled in the art that the embodiments of the embodiments of the present invention may be provided as a method, an apparatus, or a computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media having computer-usable program code embodied therein, including but not limited to disk storage, CD-ROM, optical storage, and the like.

本发明实施例是参照根据本发明实施例的方法、电子设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理电子设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理电子设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present invention are described with reference to flowcharts and/or block diagrams of methods, electronic devices (systems), and computer program products according to embodiments of the present invention. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing electronic device to produce a machine that causes the instructions to be executed by the processor of the computer or other programmable data processing electronic device Means are created for implementing the functions specified in the flow or flows of the flowcharts and/or the blocks or blocks of the block diagrams.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理电子设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing electronics to operate in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the The instruction means implement the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

这些计算机程序指令也可装载到计算机或其他可编程数据处理电子设备上,使得在计算机或其他可编程电子设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程电子设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing electronic device to cause a series of operational steps to be performed on the computer or other programmable electronic device to produce a computer-implemented process that is executed on the computer or other programmable electronic device The instructions executed on the above provide steps for implementing the functions specified in the flowchart or blocks and/or the block or blocks of the block diagrams.

尽管已描述了本发明实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所有变更和修改。Although preferred embodiments of the embodiments of the present invention have been described, additional changes and modifications to these embodiments may be made by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the embodiments of the present invention.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者电子设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者电子设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者电子设备中还存在另外的相同要素。Finally, it should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or that there is any such actual relationship or sequence between operations. Furthermore, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or electronic device that includes a list of elements includes not only those elements, but also a non-exclusive list of elements. or other elements inherent in such a process, method, article or electronic device. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article, or electronic device that includes the element.

以上对本发明所提供的一种网页防伪验证方法和一种网页防伪验证装置,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A web page anti-counterfeiting verification method and a web page anti-counterfeiting verification device provided by the present invention have been introduced in detail above. The principles and implementations of the present invention are described with specific examples in this paper. In order to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, this specification The contents should not be construed as limiting the present invention.

Claims (10)

CN202111574386.3A2021-12-212021-12-21 A web page anti-counterfeiting verification method, device, terminal device and storage mediumPendingCN114491480A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111574386.3ACN114491480A (en)2021-12-212021-12-21 A web page anti-counterfeiting verification method, device, terminal device and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111574386.3ACN114491480A (en)2021-12-212021-12-21 A web page anti-counterfeiting verification method, device, terminal device and storage medium

Publications (1)

Publication NumberPublication Date
CN114491480Atrue CN114491480A (en)2022-05-13

Family

ID=81494547

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111574386.3APendingCN114491480A (en)2021-12-212021-12-21 A web page anti-counterfeiting verification method, device, terminal device and storage medium

Country Status (1)

CountryLink
CN (1)CN114491480A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115001765A (en)*2022-05-242022-09-02北京得间科技有限公司Page resource loading and verifying method and computing equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103873493A (en)*2012-12-102014-06-18腾讯科技(深圳)有限公司Method, device and system for page information verification
CN105337946A (en)*2014-08-132016-02-17阿里巴巴集团控股有限公司Webpage forgery prevention verification method and device
CN106161411A (en)*2015-04-272016-11-23阿里巴巴集团控股有限公司A kind of webpage verification using data-hiding technology method and device
CN107493250A (en)*2016-06-122017-12-19阿里巴巴集团控股有限公司A kind of method that web-page requests are authenticated, client and server
CN109729100A (en)*2019-03-122019-05-07Oppo广东移动通信有限公司Webpage data hijacking monitoring method and device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103873493A (en)*2012-12-102014-06-18腾讯科技(深圳)有限公司Method, device and system for page information verification
CN105337946A (en)*2014-08-132016-02-17阿里巴巴集团控股有限公司Webpage forgery prevention verification method and device
CN106161411A (en)*2015-04-272016-11-23阿里巴巴集团控股有限公司A kind of webpage verification using data-hiding technology method and device
CN107493250A (en)*2016-06-122017-12-19阿里巴巴集团控股有限公司A kind of method that web-page requests are authenticated, client and server
CN109729100A (en)*2019-03-122019-05-07Oppo广东移动通信有限公司Webpage data hijacking monitoring method and device and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115001765A (en)*2022-05-242022-09-02北京得间科技有限公司Page resource loading and verifying method and computing equipment
CN115001765B (en)*2022-05-242024-08-06北京得间科技有限公司Page resource loading and verifying method and computing device

Similar Documents

PublicationPublication DateTitle
JP7510928B2 (en) Computer-implemented system and method for enabling access to data stored on a blockchain
CN113015974B (en) Verifiable consent for privacy protection
WO2020055926A2 (en)Establishing provenance of digital assets using blockchain system
JP7583108B2 (en) Anonymous event proofs with group signatures
WO2015101561A1 (en)Method and system for providing transparent trusted computing
US8887290B1 (en)Method and system for content protection for a browser based content viewer
JP7077425B2 (en) Checking the display of third-party content on client devices
CN102664874B (en)A kind of method and system for secure logging in
JP7319380B2 (en) Protect browser cookies
CN106330817A (en)Webpage access method, device and terminal
CN118202350A (en) Detect and prevent inconsistent use of Cross-Site Request Forgery mitigation features
CN103971059B (en)Cookie local storage and usage method
JP2023519121A (en) Web application reliability verification
US20060047662A1 (en)Capability support for web transactions
CN114491480A (en) A web page anti-counterfeiting verification method, device, terminal device and storage medium
JP7286004B2 (en) Protecting the integrity of communications from client devices
JP2012515384A (en) How to secure gadget access to your library
US12445455B2 (en)Securing browser cookies
EP4365763B1 (en)Certified copy paste
CN116348874B (en) Method, system, and medium for secure attribution using authentication tokens
CN117176383A (en)Website anti-acquisition method and system based on script operation detection
CN115499132A (en)Block chain-based authentication method and device, electronic equipment and storage medium
JP2012142022A (en)Method and system to enable out-of-band tracking of digital distribution and to be performed by computer

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp