CN114745190B - Page processing method and device, storage medium and electronic equipment - Google Patents

Page processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114745190B
CN114745190B CN202210427260.1A CN202210427260A CN114745190B CN 114745190 B CN114745190 B CN 114745190B CN 202210427260 A CN202210427260 A CN 202210427260A CN 114745190 B CN114745190 B CN 114745190B
Authority
CN
China
Prior art keywords
encryption
page
field
parameters
link address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210427260.1A
Other languages
Chinese (zh)
Other versions
CN114745190A (en
Inventor
邱涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yidu Cloud Beijing Technology Co Ltd
Original Assignee
Yidu Cloud Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yidu Cloud Beijing Technology Co Ltd filed Critical Yidu Cloud Beijing Technology Co Ltd
Priority to CN202210427260.1A priority Critical patent/CN114745190B/en
Publication of CN114745190A publication Critical patent/CN114745190A/en
Application granted granted Critical
Publication of CN114745190B publication Critical patent/CN114745190B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Abstract

The disclosure provides a page processing method, a page processing device, a storage medium and electronic equipment, and relates to the technical field of computers. The page processing method comprises the following steps: when a target page is loaded, if a page route link address is determined to be encrypted through a first hook function of a route manager, acquiring an encryption state of the page route link address; in the first hook function, redirecting field parameters of an encryption field in the page routing link address into encryption parameters corresponding to the encryption field according to the encryption state; and if the encryption parameters are determined to be required to be decrypted, decrypting the encryption parameters in a second hook function of the routing manager to obtain decryption parameters, and processing the target page according to the decryption parameters. According to the technical scheme, the number of times of encryption and decryption operations is reduced, and the processing efficiency of the back-end server can be improved.

Description

Page processing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a page processing method, a page processing apparatus, a computer readable storage medium, and an electronic device.
Background
In order to ensure the safety, the page links are required to be encrypted and then rendered when the page is accessed in a loading way.
In the related art, the encryption process may be performed using the back-end interface. The interface is needed for processing as long as the encryption is carried out, and the encrypted data is transmitted to the interface for decryption after the page is loaded. Specifically, decryption is required when encrypting a link and accessing a page, decryption of an interface is required when loading, jumping and refreshing a page, and a front end needs to wait for a request result of the interface to acquire data.
In the above manner, when the interface is used for encryption processing, since all information needs to be encrypted and decrypted by using the back-end interface, the flexibility is poor, the processing pressure of the back-end interface is increased, the processing efficiency is reduced, and the original logic of the code is possibly affected, so that the display of the page is affected.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure provides a page processing method and apparatus, a computer readable storage medium, and an electronic device, so as to overcome, at least to some extent, the problem of low encryption efficiency in the related art.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to one aspect of the present disclosure, there is provided a page processing method including: when a target page is loaded, if a page route link address is determined to be encrypted through a first hook function of a route manager, acquiring an encryption state of the page route link address; in the first hook function, redirecting field parameters of an encryption field in the page routing link address into encryption parameters corresponding to the encryption field according to the encryption state; and if the encryption parameters are determined to be required to be decrypted, decrypting the encryption parameters in a second hook function of the routing manager to obtain decryption parameters, and processing the target page according to the decryption parameters.
In an exemplary embodiment of the present disclosure, the determining, by the first hook function of the routing manager, that the page routing link address needs to be encrypted includes: in the first hook function, if the returned information of the identification information of the through-page routing link address is determined to be the first information, it is determined that the through-page routing link address needs to be encrypted.
In an exemplary embodiment of the disclosure, the obtaining the encryption status of the page routing link address includes: if the encryption field exists in the page route link address and the encryption field can be successfully decrypted, determining that the page route link address is an encrypted field; and if the encryption field does not exist in the page route link address or the encryption field cannot be successfully decrypted, determining that the page route link address is a non-encryption field.
In an exemplary embodiment of the present disclosure, the redirecting, according to the encryption status, a field parameter of an encryption field in the page routing link address to an encryption parameter corresponding to the encryption field includes: if the encryption state is an encrypted field, determining a field parameter of the encrypted field as the encryption parameter; and if the encryption state is a non-encryption field, encrypting field parameters of the encryption field in the first hook function according to the encryption attribute information to obtain encryption parameters, and replacing the field parameters with the encryption parameters.
In an exemplary embodiment of the present disclosure, encrypting, in the first hook function, field parameters of the encrypted field according to encryption attribute information to obtain encryption parameters includes: and encrypting the field parameters of the encryption field according to the encryption time and the encryption algorithm in the encryption attribute information to obtain the encryption parameters.
In one exemplary embodiment of the present disclosure, the encryption opportunity includes an encryption start opportunity and an encryption end opportunity.
In an exemplary embodiment of the present disclosure, the method further comprises: and if the target page is a single page, keeping the display information of the target page fixed.
According to an aspect of the present disclosure, there is provided a page processing apparatus including: the state determining module is used for determining that the page route link address needs to be encrypted through a first hook function of the route manager when the target page is loaded, and obtaining the encryption state of the page route link address; the encryption module is used for redirecting field parameters of an encryption field in the page routing link address to encryption parameters corresponding to the encryption field according to the encryption state in the first hook function; and the decryption module is used for decrypting the encryption parameter in the second hook function of the routing manager to obtain the decryption parameter if the encryption parameter is determined to be required to be decrypted, and processing the target page according to the decryption parameter.
According to one aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the page processing method of any one of the above.
According to one aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the page processing method of any of the above via execution of the executable instructions.
The page processing method, the page processing device, the computer readable storage medium and the electronic equipment provided by the embodiment of the disclosure realize link encryption through the first hook function of the route manager and perform link decryption through the second hook function of the route manager. On the one hand, only the encryption and decryption judgment, the encryption link and the decryption link are needed through the first hook function and the second hook function, the original logic of the code is not needed to be modified, the operation steps are reduced, and the influence on the page is avoided. On the other hand, the page route link address is encrypted and decrypted through the first hook function and the second hook function of the route manager, the function of the back-end server can be realized through the front end, the times of encryption and decryption operations are reduced, the processing pressure of the back-end server is reduced, and the processing efficiency of the back-end server can be further improved. On the other hand, the first hook function and the second hook function are used for encrypting and decrypting, so that the problem that all information can be encrypted and decrypted at the same time can be avoided, the information quantity of encryption and decryption is reduced, and the flexibility of encryption and decryption is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely some embodiments of the present disclosure and that other drawings may be derived from these drawings without undue effort.
Fig. 1 schematically illustrates a system architecture diagram for implementing a page processing method according to an embodiment of the present disclosure.
Fig. 2 schematically illustrates a schematic diagram of a page processing method in an embodiment of the disclosure.
Fig. 3 schematically illustrates a flow chart of determining encryption status in an embodiment of the present disclosure.
Fig. 4 schematically illustrates a flow chart for determining encryption parameters in an embodiment of the disclosure.
Fig. 5 schematically illustrates a specific schematic diagram of processing a link address in an embodiment of the disclosure.
Fig. 6 schematically illustrates a structural diagram of a routing manager plug-in an embodiment of the present disclosure.
Fig. 7 schematically shows a block diagram of a page processing apparatus in an embodiment of the present disclosure.
Fig. 8 schematically illustrates a block diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the aspects of the disclosure may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The embodiment of the disclosure provides a page processing method. Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include a client 101, a network 102, and a server 103. The client can be an intelligent terminal such as an intelligent mobile phone, a computer, a tablet personal computer intelligent sound box and the like, and can be accessed through a link. Network 102 is the medium used to provide communication links between clients 101 and servers 103. The network 102 may include various connection types, such as a wired communication link, a wireless communication link, etc., and in the embodiments of the present disclosure, the network 102 between the client 101 and the server 103 may be a wired communication link, for example, a communication link may be provided through a serial port connection, or a wireless communication link, and a communication link may be provided through a wireless network. The server 103 may be a server having a computing function or a client, for example, a terminal device having a computing function such as a portable computer, a desktop computer, a smart phone, or the like, for processing data or links or the like transmitted from the client.
In the embodiment of the disclosure, a client 101 obtains a page route link address, encrypts the page route link address in a first hook function of a route manager based on a route manager plug-in installed on the client to obtain an encryption parameter, and redirects a field parameter of an encryption field in the page route link address according to the encryption parameter. Further, the redirected page route link address is sent to a server to acquire data corresponding to the page route link address, and the data is returned to the client. Decrypting the encryption parameters in the page route link address in a second hook function of the route manager to obtain decryption parameters, loading the target page according to the decryption parameters, and rendering the target page.
It should be noted that, the page processing method provided by the embodiment of the present disclosure may be completely executed by the routing manager plug-in, and since the routing manager plug-in may be installed in the client, the page processing method provided by the embodiment of the present disclosure may also be considered to be executed by the client.
Based on the system architecture, the embodiment of the disclosure provides a page processing method, which is applied to a route manager plug-in installed on a client, and is used for realizing page processing through a front-end interface provided by the route manager plug-in. Referring to fig. 2, the page processing method includes steps S210 to S230, which are described in detail as follows:
in step S210, when the target page is loaded, if it is determined that the page routing link address needs to be encrypted through the first hook function of the routing manager, the encryption state of the page routing link address is obtained.
In the embodiment of the disclosure, the target page refers to a browser page to be loaded. The route manager may be various types of route managers, such as vue-router. The route manager may be applied to a front-end generic framework. The front-end generic framework may be a progressive framework for building a user interface, which may be a vue framework when the routing manager is vue-router. In the embodiment of the disclosure, a routing manager plug-in can be provided, and the routing manager plug-in can be applied to all general scenes using vue-router front-end plug-ins, namely, the scenes using vue frameworks and using vue-router routing plug-ins and needing page routing link address encryption, and can be accessed. The page route link address refers to the route link address URL (Uniform Resource Locator) of the web site page.
At the time of route hopping, authority judgment or other operations need to be performed, and thus a hook function of the route manager needs to be used. The hook function is mainly a function defined by performing special processing when a route is changed. The routing manager may include a plurality of hook functions therein, and for the routing manager in the embodiments of the present disclosure, the example in which the plurality of hook functions includes a first hook function and a second hook function is described. The first hook function may be a before Each function and the second hook function may be an after Each function. The first hook function before jump may be performed once every time each route changes. The second hook function afterEach may be executed after the jump. The first hook function and the second hook function execute encryption and decryption processing at the timing when the corresponding page has not been entered and the initialization page has not been rendered, respectively.
Based on this, after the first hook function is determined, it is possible to determine whether the page route link address needs encryption in the first hook function, and to perform processing according to the determination result. If the judgment result is that the page route link address needs to be encrypted, continuing to acquire the encryption state of the page route link address so as to execute the subsequent operation. If the judgment result is that the page route link address does not need to be encrypted, ending the whole flow. Specifically, whether the page routing link address needs encryption or not may be determined according to the return information of the identification information contained in the page routing link address. The identification information may be rule/single. The return information refers to a return value of the identification information for the configuration function. The configuration function may be, for example, a close function.
For example, the configuration may be performed in the first hook function by a function close method, and if the close method is configured that if the identification information "rule/single" exists in the URL of the page routing link address, whether the page routing link address needs to be encrypted may be further determined according to the return information of the identification information. If the page routing link address has identification information and the return information is the first information, the page routing link address is required to be encrypted. If the page routing link address has the identification information and the return information is the second information, the page routing link address is indicated not to be encrypted. The first information may be a flag, and the second information may be a true. Specifically, if the return information of if (window. Location. Href. Include) is flag, which indicates that encryption is not turned off, i.e., encryption is determined to be needed.
Further, if it is determined that the page routing link address needs to be encrypted, an encryption state of the page routing link address is obtained to determine whether the page routing link address is capable of being encrypted. The encryption status may be in both the case of an encrypted field or a non-encrypted field. The encryption state of the page routing link address can be determined according to the encryption field in the page routing link address and the decryption state of the encryption field. The encrypted field indicates that the page route link address has been encrypted, and the unencrypted field indicates that the page route link address has not been encrypted. The decryption state is used to describe whether the encryption field can be decrypted successfully, and may specifically include decryption success and decryption failure. The decryption state here may be determined from the result of decryption of the encrypted field. The decryption method for obtaining the decryption result is used to determine whether the encryption field can be successfully encrypted, and the decryption method may be a default decryption method, and may be the same as or different from the decryption method performed in the second hook function, which is not limited herein. On the basis, the encryption field in the page route link address can be decrypted once, so that whether the page route link address can be decrypted successfully or not can be judged according to a decryption result. If the decryption result is the same as the encryption field, it means that the encryption field in the page route link address can be successfully decrypted. If the decryption result is different from the encryption field, the decryption failure of the encryption field in the page route link address is indicated.
A flow chart of determining the encryption status is schematically shown in fig. 3, and referring to fig. 3, determining the encryption status mainly comprises the steps of:
in step S310, it is determined whether an encryption field exists in the page route link address; if yes, go to step S320; if not, go to step S340.
In step S320, it is determined whether the encrypted field can be successfully decrypted; if yes, go to step S330; if not, go to step S340.
In step S330, the encryption status of the page route link address is determined to be an encrypted field.
In step S340, it is determined that the encryption status of the page route link address is an unencrypted field.
In the embodiment of the disclosure, if the encryption field exists in the page routing link address and the encryption field can be successfully decrypted, the page routing link address can be determined to be the encrypted field. That is, the page route link address can be regarded as an encrypted field only if the conditions that the encrypted field exists and decryption is successful are satisfied at the same time. If the encryption field does not exist in the page route link address or the encryption field fails to decrypt, the page route link address can be determined to be an unencrypted field. That is, it can be said that the page route link address is a non-encrypted field, if any one of the conditions that the encryption field does not exist in the page route link address or that the encryption field exists in the page route link address but the decryption of the encryption field is not successful is satisfied.
Next, with continued reference to fig. 2, in step S220, in the first hook function, a field parameter of an encryption field in the page route link address is redirected to an encryption parameter corresponding to the encryption field according to the encryption status.
In the disclosed embodiment, the field parameters of the encryption field refer to the current parameters of the encryption field, i.e., the parameter values before encryption using the encryption algorithm in the first hook function. The field parameters may be encrypted parameters or non-encrypted parameters and may be determined according to encryption status. Specifically, if the encryption status of the page routing link address is an encrypted field, the field parameter is an encrypted parameter. If the encryption state of the page route link address is an unencrypted field, the field parameter is an unencrypted parameter. The redirected encryption parameter refers to a parameter value after encrypting the field parameter. Since the encryption status may be divided into an encrypted field and a non-encrypted field, the encryption parameter may be determined according to a pre-existing encrypted field, or may be determined according to an encryption process composed of an encryption opportunity and an encryption algorithm in the first hook function. It should be noted that, for the non-encrypted field, encryption may be continued; for the encrypted field, no further encryption is required.
A flow chart for determining encryption parameters is schematically shown in fig. 4, and with reference to fig. 4, mainly comprises the following steps:
in step S410, if the encryption status is an encrypted field, determining a field parameter of the encrypted field as the encryption parameter;
in step S420, if the encryption status is the non-encryption field, encrypting the field parameter according to the encryption attribute information in the first hook function to obtain an encryption parameter, and redirecting the field parameter of the page routing link address to be the encryption parameter.
In the embodiment of the disclosure, if the encryption status is an encrypted field, the field parameters in the page routing link address do not need to be encrypted again, so that the encryption parameters can be the same as the field parameters in this case, i.e. the field parameters in the page routing link address can be kept unchanged.
If the encryption state is a non-encryption field, the encryption attribute information can be obtained in the first hook function, and the field parameters of the encryption field in the page routing link address are encrypted through the encryption attribute information to obtain corresponding encryption parameters. The encryption attribute information may be any information capable of describing the encryption condition, and specifically, the encryption attribute information may include encryption timing and encryption algorithm, and may include other types of information. The encryption timing is used to specify the timing at which encryption is required, for example, to specify at which page encryption is performed, and when encryption is started, when decryption is ended, and so on. The encryption occasions include an encryption start occasion and an encryption end occasion. The encryption start timing and the encryption end timing can be specifically configured according to the actual application scenario. For example, it may be determined whether the page needs to be encrypted when the page is entered. For example, for page a and page B, page a may jump to page B. When the page a jumps to the page B, the page B may determine whether the page B needs to be encrypted according to the encryption opportunity configured in the first hook function of the page B. It should be noted that, the encryption timing and the encryption algorithm may be configured according to the actual application scenario and stored in the first hook function. The actual application scenes are different, and the encryption time and the encryption algorithm can be the same or different.
The encryption algorithm may be any type of encryption algorithm as long as encryption operation can be implemented. The encryption algorithm may include, for example, but is not limited to, a symmetric encryption algorithm, an asymmetric encryption algorithm, a hash algorithm, and the like. The encryption algorithm may be a default encryption algorithm in the first hook function, or may be a custom encryption algorithm configured according to an actual application scenario, which is not limited herein specifically. The encryption parameters may be determined according to encryption algorithms, which differ for the field parameters of the same encryption field, as well as the corresponding encryption parameters. For example, the encryption opportunity of the scene 1 is opportunity 1, and the encryption algorithm is a symmetric encryption algorithm; the encryption time of the scene 2 is time 2, and the encryption algorithm is an asymmetric encryption algorithm.
Further, after encrypting the field parameters according to the encryption algorithm to obtain the encryption parameters, the encryption parameters may be redirected to the page routing link address. The redirection refers to replacing field parameters in the page routing link address by encryption parameters corresponding to the encryption fields, and regenerating the page routing link address to refresh the page routing link address.
For example, if the target page is entered, the page routing link address is "rule/single", where the corresponding encryption field is ydencryptekey, and the field parameter of the encryption field may be a=1, for example. Further, if the encryption state of the page routing link address is a non-encryption field, in the first hook function, encryption attribute information may be used to encrypt field parameters of the encryption field, so as to obtain an encryption parameter B corresponding to the encryption field. It should be noted that the encryption parameter may be different from the field parameter, and the specific value of the encryption parameter is determined according to the encryption algorithm. After the encryption parameter B is obtained, the encryption parameter B is used to replace the field parameter a=1 of the encryption field in the page routing link address, and the page routing link address is updated according to the generated encryption parameter.
Specifically, if the link is "rule/single", the corresponding parameter (encrypted field) is ydencryptekey, and the parameters carried by the key belong to encrypted parameters, based on which URL links for displaying actual scenes can be obtained, for example:
192.168.216.36/rule/singleydEncryptKey=eyJydWxISWQIOm51bGwsl...
it should be noted that, for a single page, the display information of the target page may be kept unchanged. A single page refers to an application that has only one main page in which the browser initially loads all of the necessary public resources html, js, css, all of the page content being contained in the main page. The single page jump only refreshes local resources and the common resources only need to be loaded once. The page jump is not carried out in the single page operation process, and the content of the html is changed. Keeping the display information of the target page fixed may be understood as not flashing the target page to the user. Flicker herein refers to the display information at the time of page refresh, i.e., no page jump is visible to the user. Based on the method, the field parameters of the page route link address can be redirected through the encryption parameters, the non-inductive refreshing of the target page is realized, and the influence on the display performance of the front-end page in the related technology is avoided.
In the embodiment of the disclosure, the field parameters of the encryption field are encrypted by the encryption time contained in the encryption attribute information, so that the time for opening the encryption and closing the encryption can be definitely configured, the problem that the whole link address in the related art needs to be encrypted is avoided, and the flexibility of encryption processing is improved. Because the encryption process can be limited according to the encryption time, instead of encrypting all information, the data volume required to be processed during encryption is reduced, and the encryption efficiency and flexibility are improved.
With continued reference to fig. 2, in step S230, if it is determined that the encryption parameter needs to be decrypted, the encryption parameter is decrypted in the second hook function of the routing manager to obtain a decryption parameter, and the target page is processed according to the decryption parameter.
In the disclosed embodiments, the decrypting step may be performed in a second hook function of the routing manager. First, a parameter of the second hook function may be determined, where the parameter may be a jump parameter to, and the jump parameter to is used to represent a routing object to be jumped. It may further be determined in the second hook function whether the encryption parameters that are skipped to the routing object need decryption. If decryption is required, the encryption parameters can be decrypted in the second hook function of the routing manager to obtain decryption parameters, and the target page is processed according to the decryption parameters. The decryption parameters may be determined according to a decryption algorithm, which may be in one-to-one correspondence with the encryption algorithm. It should be noted that the decryption parameter may be the same as the field parameter. When the decryption parameters are the same as the field parameters, the success of decryption can be determined; when the decryption parameter is different from the field parameter, a decryption failure may be determined.
Specifically, if the encryption parameter needs to be decrypted and can be decrypted successfully, the encryption parameter is modified into the original parameter represented by the field parameter, the page can acquire the original function represented by the field parameter without modification, and the acquisition of the field parameter can be performed by using the original function this.
It should be added that the above steps S210 to S230 may be performed by the routing manager plug-in. The routing manager plug-in may be installed in the client. Based on this, according to the configuration of the route manager plug-in, if it is detected that the route manager plug-in is introduced in the client through the mean. Js, the route manager plug-in can be injected into the Vue instance through the Vue. Use () method. The routing manager plug-in can open encryption and close encryption according to a close function configured in a first hook function of the routing manager to determine encryption time, encrypt field parameters in a page routing link address of a target page according to a configured encryption algorithm or a default encryption algorithm in the encryption time, decrypt the encryption parameters in a second hook function, and render the target page according to the decryption parameters. It should be noted that the second hook function can only be executed after the first hook function.
A flow chart of processing a link address is schematically shown in fig. 5, and referring to fig. 3, the method mainly comprises the following steps:
in step S510, the page enters.
In step S520, it is determined in the first hook function whether the page route link address needs encryption; if yes, go to step S530. If not, go to step S560.
In step S530, it is determined whether the page route link address is encrypted. If yes, go to step S550. If not, go to step S540.
In step S540, the parameter encryption is performed, and the page address parameter is revised as the encryption parameter.
In step S550, the encrypted parameters are decrypted and restored into the parameters of the routing manager.
In step S560, page rendering is performed.
In the embodiment of the present disclosure, referring to fig. 6, if a routing manager plug-in 602 installed on a client 601 determines that a page routing link address needs to be encrypted in a first hook function 603 of a routing manager, an encryption state of the page routing link address is obtained; in the first hook function, if the encryption status is a non-encryption field, encrypting field parameters of the encryption field 604 according to the encryption attribute information to obtain encryption parameters 605, and redirecting the field parameters of the encryption field in the page routing link address to the encryption parameters corresponding to the encryption field; if it is determined that the encryption parameter needs to be decrypted, in the second hook function 606 of the routing manager, the encryption parameter is decrypted to obtain a decryption parameter, the decryption parameter is identical to the encryption field, and the target page is processed according to the decryption parameter.
For example, if there is a string of browser address bar links, the links may be represented as: http:// localhost 8080/listpage=5 & username=Zhang San & idno= 11112222, where the three parameters at the link address are page, username and idno, respectively. In the related art, if encryption is used, the back-end interface is required to process the encryption, and then the encrypted data is transferred to the interface for decryption after the page is loaded. Based on the routing manager plug-in the embodiment of the disclosure, encryption can be performed only through the front end, and no interface is needed for implementation.
The technical scheme of the embodiment of the disclosure is applied on the basis of using a Vue front end frame and a routing manager Vue-router, and the parameter encryption and decryption of the browser page address are performed by providing a routing manager plug-in to use the front end without an interface to participate in encryption and decryption, so that the link address URL parameter of the browser address bar is a string of encryption parameters when in use, and an encryption and decryption method can be freely configured to limit a user to randomly change and view sensitive parameters in the address bar, thereby ensuring the security of the sensitive parameters. The front-end plug-in is only needed to carry out encryption processing without using a server interface, so that any operation in the related art is avoided from needing decryption, decryption times are reduced, calculation pressure of a server is reduced, front-end development of a server back-end is not needed, and cost is reduced. Because the encryption process can be controlled by the encryption starting time and the encryption ending time in the first hook function, the needed page can be encrypted, the processes that the link address of the whole site is needed to be encrypted and all information is encrypted at the same level are avoided, the flexibility and pertinence of the encryption process are improved, and the openness is improved. Furthermore, for the user, as long as parameter judgment and encryption and decryption judgment configuration are carried out, no other influence is caused on the page, front-end encryption cost-free configuration is realized, original code logic is not influenced, and stability and reliability are improved.
In an embodiment of the present disclosure, there is also provided a page processing apparatus, referring to fig. 7, the page processing apparatus 700 mainly includes the following modules:
the state determining module 701 is configured to determine, when the target page is loaded, that the page routing link address needs to be encrypted through a first hook function of the routing manager, and obtain an encryption state of the page routing link address;
an encryption module 702, configured to redirect, in the first hook function, a field parameter of an encryption field in the page routing link address to an encryption parameter corresponding to the encryption field according to the encryption state;
and the decryption module 703 is configured to decrypt the encryption parameter in the second hook function of the routing manager to obtain a decryption parameter if it is determined that the encryption parameter needs to be decrypted, and process the target page according to the decryption parameter.
In one exemplary embodiment of the present disclosure, an encryption module includes: and the encryption judging module is used for determining that the page routing link address needs to be encrypted if the return information of the identification information of the page routing link address is determined to be the first information in the first hook function.
In one exemplary embodiment of the present disclosure, the state determination module includes: the first determining module is used for determining that the page route link address is an encrypted field if the encrypted field exists in the page route link address and the encrypted field can be successfully decrypted; and the second determining module is used for determining that the page route link address is a non-encryption field if the encryption field does not exist in the page route link address or the encryption field cannot be successfully decrypted.
In one exemplary embodiment of the present disclosure, an encryption module includes: the first encryption module is used for determining field parameters of the encrypted field as the encryption parameters if the encryption state is the encrypted field; and the second encryption module is used for encrypting the field parameters of the encryption field in the first hook function according to the encryption attribute information to obtain encryption parameters if the encryption state is a non-encryption field, and replacing the field parameters with the encryption parameters.
In one exemplary embodiment of the present disclosure, the second encryption module includes: and the encryption control module is used for encrypting the field parameters of the encryption field according to the encryption time and the encryption algorithm in the encryption attribute information to obtain the encryption parameters.
In one exemplary embodiment of the present disclosure, the encryption opportunity includes an encryption start opportunity and an encryption end opportunity.
In an exemplary embodiment of the present disclosure, the apparatus further comprises: and the display information control module is used for keeping the display information of the target page unchanged if the target page is a single page.
In addition, the specific details of each part in the above page processing apparatus are already described in detail in the embodiments of the page processing method part, and the details not disclosed may refer to the embodiments of the method part, so that they will not be described in detail.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Furthermore, although the steps of the methods in the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in that particular order or that all illustrated steps be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform, etc.
In an embodiment of the disclosure, an electronic device capable of implementing the above method is also provided.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to such an embodiment of the present disclosure is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of embodiments of the present disclosure in any way.
As shown in fig. 8, the electronic device 800 is embodied in the form of a general purpose computing device. Components of electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting the different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
Wherein the storage unit stores program code that is executable by the processing unit 810 such that the processing unit 810 performs steps according to various exemplary embodiments of the present disclosure described in the above section of the present specification. For example, the processing unit 810 may perform the steps as shown in fig. 2.
The storage unit 820 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 8201 and/or cache memory 8202, and may further include Read Only Memory (ROM) 8203.
Storage unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 830 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration interface, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 800, and/or any device (e.g., router, modem, etc.) that enables the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 850. Also, electronic device 800 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 over bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 800, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
In an embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification. In some possible implementations, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
A program product for implementing the above-described method according to an embodiment of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A page processing method applied to a routing manager plug-in installed on a client, for implementing page processing through a front-end interface provided by the routing manager plug-in, comprising:
When a target page is loaded, if a page route link address is determined to be encrypted through a first hook function of a route manager, acquiring an encryption state of the page route link address;
in the first hook function, redirecting field parameters of an encryption field in the page routing link address to encryption parameters corresponding to the encryption field according to the encryption state, including: if the encryption state is an encrypted field, determining a field parameter of the encrypted field as the encryption parameter; if the encryption state is a non-encryption field, encrypting field parameters of the encryption field in the first hook function according to encryption time and an encryption algorithm in encryption attribute information to obtain the encryption parameters, and replacing the field parameters with the encryption parameters;
and if the encryption parameters are determined to be required to be decrypted, decrypting the encryption parameters in a second hook function of the routing manager to obtain decryption parameters, and processing the target page according to the decryption parameters.
2. The method according to claim 1, wherein the determining, by the first hook function of the routing manager, that the page routing link address needs to be encrypted, includes:
In the first hook function, if the return information of the identification information of the page route link address is determined to be the first information, it is determined that the page route link address needs to be encrypted.
3. The page processing method according to claim 1, wherein the obtaining the encryption status of the page routing link address includes:
if the encryption field exists in the page route link address and the encryption field can be successfully decrypted, determining that the page route link address is an encrypted field;
and if the encryption field does not exist in the page route link address or the encryption field cannot be successfully decrypted, determining that the page route link address is a non-encryption field.
4. The page processing method according to claim 1, wherein the encryption opportunity includes an encryption start opportunity and an encryption end opportunity.
5. The page processing method according to claim 1, characterized in that the method further comprises:
and if the target page is a single page, keeping the display information of the target page fixed.
6. A page processing apparatus applied to a routing manager plug-in installed on a client for implementing page processing through a front-end interface provided by the routing manager plug-in, comprising:
The state determining module is used for determining that the page route link address needs to be encrypted through a first hook function of the route manager when the target page is loaded, and obtaining the encryption state of the page route link address;
the encryption module is used for redirecting field parameters of an encryption field in the page routing link address to encryption parameters corresponding to the encryption field according to the encryption state in the first hook function;
the decryption module is used for decrypting the encryption parameter in the second hook function of the routing manager to obtain a decryption parameter if the encryption parameter is determined to be required to be decrypted, and processing the target page according to the decryption parameter;
the encryption module includes: the first encryption module is used for determining field parameters of the encrypted field as the encryption parameters if the encryption state is the encrypted field; and the second encryption module is used for encrypting the field parameters of the encryption field in the first hook function according to the encryption time and the encryption algorithm in the encryption attribute information to obtain the encryption parameters if the encryption state is a non-encryption field, and replacing the field parameters with the encryption parameters.
7. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the page processing method of any of claims 1-5.
8. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the page processing method of any of claims 1-5 via execution of the executable instructions.
CN202210427260.1A 2022-04-21 2022-04-21 Page processing method and device, storage medium and electronic equipment Active CN114745190B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210427260.1A CN114745190B (en) 2022-04-21 2022-04-21 Page processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210427260.1A CN114745190B (en) 2022-04-21 2022-04-21 Page processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114745190A CN114745190A (en) 2022-07-12
CN114745190B true CN114745190B (en) 2024-01-16

Family

ID=82283634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210427260.1A Active CN114745190B (en) 2022-04-21 2022-04-21 Page processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114745190B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750741A (en) * 2019-10-18 2020-02-04 深圳市比量科技传媒有限公司 Webpage link skipping processing method, computer device and storage medium
CN111859226A (en) * 2020-08-05 2020-10-30 杭州安恒信息技术股份有限公司 Page jump method, device and related equipment
CN112000331A (en) * 2020-08-07 2020-11-27 北京三快在线科技有限公司 Page rendering method and device, electronic equipment and storage medium
CN114238811A (en) * 2021-12-13 2022-03-25 中国平安财产保险股份有限公司 Page loading method, page request response method, device, equipment and medium
CN114282233A (en) * 2021-11-25 2022-04-05 上海浦东发展银行股份有限公司 WEB performance optimization method and device, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8250357B2 (en) * 2000-09-13 2012-08-21 Fortinet, Inc. Tunnel interface for securing traffic over a network
SE0101295D0 (en) * 2001-04-10 2001-04-10 Ericsson Telefon Ab L M A method and network for delivering streaming data
US8700894B2 (en) * 2007-10-17 2014-04-15 Pitney Bowes Inc. Method and system for securing routing information of a communication using identity-based encryption scheme

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750741A (en) * 2019-10-18 2020-02-04 深圳市比量科技传媒有限公司 Webpage link skipping processing method, computer device and storage medium
CN111859226A (en) * 2020-08-05 2020-10-30 杭州安恒信息技术股份有限公司 Page jump method, device and related equipment
CN112000331A (en) * 2020-08-07 2020-11-27 北京三快在线科技有限公司 Page rendering method and device, electronic equipment and storage medium
CN114282233A (en) * 2021-11-25 2022-04-05 上海浦东发展银行股份有限公司 WEB performance optimization method and device, computer equipment and storage medium
CN114238811A (en) * 2021-12-13 2022-03-25 中国平安财产保险股份有限公司 Page loading method, page request response method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于区块链与代理重加密的数据共享方案;李莉;曾庆贤;文义红;王士成;;信息网络安全(08);全文 *

Also Published As

Publication number Publication date
CN114745190A (en) 2022-07-12

Similar Documents

Publication Publication Date Title
US11520912B2 (en) Methods, media, apparatuses and computing devices of user data authorization based on blockchain
US8910277B1 (en) Process-based domain isolation
CN110414268A (en) Access control method, device, equipment and storage medium
US8613106B2 (en) Reducing the value of a browser fingerprint
CN111258602B (en) Information updating method and device
US11838281B1 (en) Secure authentication of devices
CN109800557B (en) Block chain-based integrated processing method, device, server, equipment and medium
CN111163095A (en) Network attack analysis method, network attack analysis device, computing device, and medium
CN112612977A (en) Page display method, system, device, equipment and storage medium
CN111400760B (en) Method, device, server and storage medium for web application to access database
CN113746882A (en) User session information storage method and device and electronic equipment
CN114598481A (en) Authorization authentication method, device, electronic equipment and storage medium
CN114978605A (en) Page access method and device, electronic equipment and storage medium
CN113569229B (en) Synchronous login method and device, storage medium and electronic equipment
CN114697304B (en) Gray release method, system, device, equipment and storage medium
CN112968899B (en) Method and equipment for encrypted communication
CN105391673B (en) Safety access method and device
KR102262480B1 (en) Hash-based dynamic constraint on information resources
CN114745190B (en) Page processing method and device, storage medium and electronic equipment
KR20180090060A (en) Internet of Things Security Module
US9794255B2 (en) Communication terminal and communication processing method
CN113613044B (en) Video playing method and device, storage medium and electronic equipment
US11431727B2 (en) Security of code between code generator and compiler
CN116010740A (en) Data file updating method and device of browser, electronic equipment and storage medium
CN109462604B (en) Data transmission method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant