Method for providing page, related device and computer program product
By using device history access information to generate invisible device identification identifiers during server rendering, the security and stability of device identification identifiers during SSR are solved, and higher security and stability are achieved.
Patent Information
- Application Number
- CN202411315781.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-27
AI Technical Summary
During the server-side rendering (SSR), how to ensure the security and stability of device identification identification and prevent forgery and improper acquisition, especially when the device rendering capabilities are low.
By using the service identity and history access fields of the device in historical access, the device is generated and configured to be invisible to the target device content, it increases the difficulty of forgery, improves security quality, and reduces data security risks.
It effectively improves the security and stability of the page provided by the SSR method, prevents the device identification identification logo from being improperly acquired, and enhances data security.
Smart Images

Figure CN119202439A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for providing pages, an electronic device, a computer-readable medium, and a computer program product. Background Art
[0002] With the development of society, Internet technology is also improving day by day. In this context, in order to improve the response speed and presentation effect when providing pages to users, server-side rendering technology came into being.
[0003] Server-Side Rendering (SSR) can generate a complete Hypertext Markup Language (HTML) page on the server side and send it to the terminal device used by the user, so that the user can directly obtain and present the page content based on the HTML page. This method can effectively improve the response speed of the page and relax the rendering capability requirements of the user's device, especially when the rendering capability of the user's device is low, it can still provide users with high-quality page rendering effects.
[0004] However, considering that the SSR process requires interaction and collaboration between different devices, how to ensure security and stability during the SSR process is worthy of attention and an urgent need. Summary of the invention
[0005] Various aspects of the present application provide a method, apparatus, electronic device, computer-readable storage medium, and computer program product for providing a page, which can utilize the business identity identifier and historical access field of the device in historical accesses to generate a device identification identifier corresponding to the device, thereby increasing the difficulty of forging the device identification identifier and improving the security quality of the device identification identifier. It is also possible to prevent the device identification identifier from being improperly obtained on the device side and reduce data security risks by configuring the device identification identifier to be invisible to the device content. Thus, the security and stability of the process of providing pages based on the SSR method can be improved.
[0006] One aspect of the present application provides a method for providing a page, comprising: in response to a target device sending an access request for a target component with a device identification identifier, determining a historical business identity identifier and a historical access field used to generate the device identification identifier, wherein the device identification identifier is configured to be invisible to the target device content; in response to the business identity identifier and access field corresponding to the device identification identifier matching the historical business identity identifier and the historical access field, providing the target device with a page obtained by local rendering of the target component.
[0007] On the other hand, the present application provides an apparatus for providing a page, comprising: a historical information acquisition module, configured to send a device identification identifier in response to an access request from a target device to a target component, and determine a historical business identity identifier and a historical access field for generating the device identification identifier, wherein the device identification identifier is configured to be invisible to the target device content, and the page is obtained by local rendering; and a page providing module, configured to provide the target device with a page obtained by local rendering of the target component in response to the business identity identifier and access field corresponding to the device identification identifier matching the historical business identity identifier and the historical access field.
[0008] Another aspect of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for providing a page as provided above.
[0009] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the method for providing a page as provided above.
[0010] In another aspect of the present application, a computer program product includes a computer program having computer program instructions stored thereon. When the computer program is executed by a processor, the method for providing a page as provided above can be implemented.
[0011] In the solution provided by the embodiment of the present application, in response to the target device sending a device identification identifier for an access request to the target component, a historical business identity identifier and a historical access field for generating the device identification identifier are determined, wherein the device identification identifier is configured to be invisible to the target device content; in response to the business identity identifier and access field corresponding to the device identification identifier matching the historical business identity identifier and the historical access field, a page obtained by local rendering of the target component is provided to the target device. In this way, the business identity identifier and the historical access field of the device in the historical access can be used to generate a device identification identifier corresponding to the device, thereby increasing the difficulty of forging the device identification identifier and improving the security quality of the device identification identifier. It is also possible to avoid the device identification identifier from being improperly obtained on the device side and reduce data security risks by configuring the device identification identifier to be invisible to the device content. As a result, the security and stability of the process of providing pages based on the SSR method can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0013] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0014] Figure 1 A schematic diagram of a process of providing a page provided in an embodiment of the present application;
[0015] Figure 2 A schematic diagram of a process for generating a device identification mark provided in an embodiment of the present application;
[0016] Figure 3 A schematic diagram of a process of providing a page in an application scenario provided by another embodiment of the present application;
[0017] Figure 4 A schematic diagram of the structure of an apparatus for providing a page provided in an embodiment of the present application;
[0018] Figure 5 The present invention is a schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiment of the present application.
[0019] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0021] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0022] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0023] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0024] As discussed above, how to ensure security and stability is worthy of attention and urgent need.
[0025] In some solutions, when providing services based on SSR, verification and authorization rules based on prior communication will be selected. After generating an identification token that can be recognized by the server and terminal devices, verification and authorization will be performed based on the identification token provided by the terminal device. Access to the server can only be controlled by trusted terminal devices, ensuring security and stability.
[0026] However, in this way, there is a certain risk of tampering with the identification mark. For example, the identification mark of the terminal device may be improperly modified or stolen by the server unexpectedly, which has a negative impact on the security and stability of the SSR process.
[0027] In this regard, an embodiment of the present application provides a method for providing a page, which method responds to a target device sending a device identification identifier in response to an access request for a target component, determines a historical business identity identifier and a historical access field for generating the device identification identifier, wherein the device identification identifier is configured to be invisible to the target device content; in response to the business identity identifier and access field corresponding to the device identification identifier matching the historical business identity identifier and the historical access field, provides the target device with a page obtained by local rendering of the target component. In this way, the business identity identifier and the historical access field of the device in the historical access can be used to generate a device identification identifier corresponding to the device, thereby increasing the difficulty of forging the device identification identifier and improving the security quality of the device identification identifier. It is also possible to avoid the device identification identifier from being improperly obtained on the device side and reduce data security risks by configuring the device identification identifier to be invisible to the device content. As a result, the security and stability of the process of providing pages based on the SSR method can be improved.
[0028] In actual scenarios, the execution subject of the method can usually be a network device for implementing SSR. Network devices include but are not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0029] In some scenarios, the execution subject may also be a device formed by integrating a user device and a network device through a network. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. For example, the user device is used to determine whether to provide a page, and if it is determined to provide the page, the network device is used to actually render and provide the page.
[0030] When the execution subject is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.
[0031] It should be understood that in the technical solutions involved in this application, the acquisition, storage, use, processing, transportation, provision and disclosure of user personal information (such as business identity identifiers, access fields, etc. involved in this application later) are in compliance with the relevant laws and regulations and do not violate public order and good morals.
[0032] Figure 1 A process 100 for providing a page provided in an embodiment of the present application is shown. The process 100 includes at least the following processing steps:
[0033] (Step) S101, in response to receiving an access request from a target device to a target component, detecting whether a device identification identifier is sent in response to the access request.
[0034] For ease of understanding, the description is given with the execution subject being a server for implementing SSR (or, in the SSR process, a server embodied as a server on the service side).
[0035] In an embodiment of the present application, a user may use the terminal device as a target device and send an access request for a target component to an execution subject to request the execution subject to provide a page of the target component to the target device in an SSR manner.
[0036] In some embodiments, the component (e.g., the target component) may be a single page application (SPA). SPA can implement page switching by dynamically loading content without refreshing the entire page. Thus, SPA allows users to obtain required functions and content separately or update them according to their needs, without the overhead of reloading a complete page (e.g., a complete page including multiple components) for each user operation, which can provide a smooth user experience while reducing the rendering consumption of the execution entity.
[0037] Accordingly, when the execution subject receives an access request from the target device for the target component, it can detect whether the target device sends a device identification in response to the access request. The device identification corresponds to the target device and can be generated locally by the execution subject.
[0038] In some embodiments, the execution subject may generate a device identification corresponding to the target device based on the business identification of the component pointed to by the target device in the historical access and the historical access field used in the historical access. Then, the execution subject sends and issues the device identification to the target device so that the target device can use the device identification to "declare its identity".
[0039] It should be understood that the device identification mark is configured to be invisible to the target device content, thereby preventing the device identification mark from being tampered with on the target device side. For example, the device identification mark can be configured to be invisible to the target device in terms of detailed content and modification authority.
[0040] In some embodiments, the device identification identifier can be encrypted in the execution subject, for example, based on the Data Encryption Standard (DES), the Triple Data Encryption Algorithm (3DES), the Advanced Encryption Standard (AES), or the hash encryption algorithm. Accordingly, the decryption key for the device identification identifier can be configured only on the execution subject side to achieve the effect that the "device identification identifier" is invisible to the target device. Accordingly, the execution subject and the target device can choose to communicate using the encrypted device identification identifier to ensure the security of the device identification identifier.
[0041] Accordingly, the target device can be communicated and configured in advance to be instructed and controlled. When the target device sends an access request, if the target device has a device identification identifier that is locally maintained and issued, the device identification identifier is associated with the access request and provided to the execution entity.
[0042] As discussed above, the device identification can be generated based on the historical access behavior of the target device. The execution subject can generate the device identification based on the historical business identity of the historical component pointed to in the historical access of the target device (for example, the component id of the historical SPA used to report the source of the component in a buried point manner, which can represent the corresponding SPA based on the Referer mapping) and the historical access field.
[0043] In some embodiments, information, files, etc. with the ability to identify a device generated during the communication between the device and the execution subject can be selected as the device identification identifier. Thereby, the efficiency of generating the device identification identifier can be improved. For example, the Webid generated during the communication between the device and the execution subject can be used as the device identification identifier of the device. Webid is a JSON Web token, which is an open standard for securely transmitting information in network applications. Webid can be understood as a session identifier generated when a user visits a page for the first time, and can be used by the user to track and verify the user's access behavior to the page.
[0044] In some embodiments, the historical access field includes a request header field of the target device and / or a request routing field of the target device. For example, the request header field may be information of a user agent (UA) used by the target device when communicating with the execution subject. For example, the request routing field may be routing information (e.g., static routing parameters, dynamic routing parameters, etc.) used by the target device when communicating with the execution subject.
[0045] Accordingly, the execution entity may choose to load the component id, request header field and request routing field of the target device of the historical SPA into the Webid (or one of the request header field and the request routing field) to combine and finally obtain the device identification corresponding to the target device.
[0046] Therefore, the combination of WebID and information about the communication process pointing to the target device is used to enrich and complicate the information used to indicate and identify the device, increase the information included in the device identification, improve the quality of the device identification, and increase the "difficulty of tampering".
[0047] As an alternative or in addition, in the process of combining the WebID to obtain the device identification, the internal parameters of the cookie can also be combined therein to further enrich the information content of the device identification.
[0048] Accordingly, as discussed above, the target device can be instructed or controlled through prior communication with the execution entity or default configuration. When the target device sends an access request, if a device identification identifier is locally maintained and issued to the target device, the device identification identifier is associated with the access request and provided to the execution entity to indicate that the device has the "authority" to request access to the page.
[0049] Next, if the execution subject determines that the target device sends a device identification identifier in response to the access request to the target component, S102 is executed.
[0050] S102, determining a historical service identity identifier and a historical access field for generating a device identification identifier.
[0051] In an embodiment of the present application, if the execution subject determines based on S102 that the target device sends a device identification in the access request for the target component, the historical business identity and historical access fields for generating the device identification can be obtained. For example, in the case where the device identification is generated by the execution subject and sent to the target device, the execution subject can obtain the historical business identity and historical access fields referenced and used when generating the device identification based on local information storage or historical logs.
[0052] S103, in response to the business identity identifier and the access field corresponding to the device identification identifier matching the historical business identity identifier and the historical access field, providing a page obtained by local rendering of the target component to the target device.
[0053] In an embodiment of the present application, based on the above S102, the execution subject can compare the historical business identity and historical access fields used to generate the device identification after determining them with the information recorded in the device identification sent by the target device for the access request of the target component. For example, in the example of directly loading the UA information, request routing field, etc. to the Webid to obtain the device identification, the execution subject can directly compare whether the component id, UA information, request routing field, etc. of the SPA of the target device determined this time match the component id, UA information, request routing field, etc. of the SPA used to generate the Webid recorded locally.
[0054] In some embodiments, based on the difference in authorization security, the execution subject can be configured with different standards for determining "matching". For example, in a scenario with higher security requirements, the execution subject can be configured to determine that all parameters used to generate the device identification mark are the same, that is, "exactly the same", and it is considered that "the two are matched". For another example, in a scenario where the security requirements are lower than the above scenario, the execution subject can be configured to determine that the number of "exactly the same" parameters used to generate the device identification mark is greater than or equal to the number of items threshold, and it is considered that "the two are matched", without the need for all parameters to be "exactly the same".
[0055] Correspondingly, if a "match" is determined, it is determined that the target device's request can pass the "verification" and can be "authorized" to access and obtain the page rendered locally by the target component. That is, if the verification is passed, the execution subject can render the SPA page locally and provide it to the target device for use.
[0056] Then, the method for providing a page provided by the present application, in response to the target device sending a device identification identifier for an access request for a target component, determines a historical business identity identifier and a historical access field for generating the device identification identifier, wherein the device identification identifier is configured to be invisible to the target device content; in response to the business identity identifier and access field corresponding to the device identification identifier matching the historical business identity identifier and the historical access field, provides the target device with a page obtained by local rendering of the target component. In this way, the business identity identifier and the historical access field of the device in the historical access can be used to generate a device identification identifier corresponding to the device, thereby increasing the difficulty of forging the device identification identifier and improving the security quality of the device identification identifier. It is also possible to avoid the device identification identifier from being improperly obtained on the device side and reduce data security risks by configuring the device identification identifier to be invisible to the device content. Thus, the security and stability of the process of providing pages based on the SSR method can be improved.
[0057] In some embodiments, as discussed above, the executing entity may choose to generate a device identification identifier and then send and distribute the device identification identifier to the (target) device so that the device can use the device identification identifier to "identify itself", request authorization, and obtain a page of a component rendered locally by the executing entity.
[0058] Accordingly, the device identification identifier may be generated by the execution subject after the execution subject communicates with the device in advance and requests the device for the historical service identification identifier and the historical access field.
[0059] In some embodiments, in order to reduce the communication with the device and improve the communication efficiency, the execution subject may also choose to generate a device identification for the device when it is first detected that the device has not been sent and issued. For example, the configuration device may be configured to send an access request for the target component to the execution subject in the absence of a device identification.
[0060] In such a case, if the executing entity detects that the target device does not send a device identification identifier in response to an access request to the target component, that is, for example, in the above S101, the executing entity detects that the target device does not send a device identification identifier in response to an access request to the target component, it "actually" chooses to generate a device identification identifier for the (target) device.
[0061] For example, the execution subject can generate the device identification of the device based on the business identity and access fields related to the current access request and behavior, without collecting the historical access behavior of the device, and without pre-communication with the device. This can not only improve the efficiency of generating device identification, but also reduce the need to obtain communication and historical access behavior of the device.
[0062] Alternatively or additionally, after generating the device identification, the execution subject may also maintain the generation record accordingly as discussed above. Subsequently, the execution subject may generate a device identification for the device based on the generation record only when it is determined that the device has not been generated or there is no valid device identification (for example, when the device identification has never been issued to the device, or the issued device identifications are invalid, it is generated for the device). This avoids incorrectly identifying the "first visit" and causing repeated generation of device identifications.
[0063] It should be understood that the meaning of "first visit" in practice can include both the first communication and visit between the device and the execution subject, and the first communication and visit between the device and the execution subject after all the device identification identifiers that have been issued have expired. This application is not intended to limit this.
[0064] For this, please continue to refer to Figure 2 . Figure 2 A schematic diagram of a process 200 for generating a device identification mark provided in an embodiment of the present application. For example, the process 200 may be executed when it is determined in the above S101 that the target device does not send a device identification mark in the access request for the target component. The process 200 specifically includes:
[0065] S201, obtaining an access field of a target device.
[0066] Specifically, as discussed above, the execution subject may obtain the access fields (eg, the UA information discussed above, the request routing field, etc.) used by the target device in this access.
[0067] S202: Generate a device identification for the target device based on the business identity and access field of the target component.
[0068] Specifically, the execution entity can use the associated Webid generated by the target device during this visit as the "base", similar to what is discussed above, and load the component ID of the requested target component, UA information, request routing field, etc. into the Webid to generate a device identification identifier for the target device.
[0069] In some embodiments, when executing this step, the execution subject may also first determine whether the target device is a trusted device based on the access field determined in S201 above.
[0070] For example, the execution subject can determine whether the target device is "trusted" (for example, the probability of the target device's access to the local area causing a security risk is less than or equal to a predetermined probability threshold) by judging whether its UA information, request routing field, etc. are included in a predetermined "white list" or recorded in a "black list". This method can avoid generating device identification marks for untrusted devices, thereby ensuring the local security of the execution subject while avoiding the erroneous generation of device identification marks and causing waste of resources.
[0071] Accordingly, if the execution subject can determine that the target device is a trusted device based on the access field, then choose to execute this step to generate a device identification for the target device based on the business identity of the target component and the access field. As a result, the execution subject will verify the credibility of the device before generating the device identification, avoiding providing access and SSR services to untrusted devices.
[0072] S203, providing a page obtained by local rendering for the target component to the target device, and using the page to provide a device identification identifier.
[0073] Specifically, for the "first visit" of the target device, the execution subject may choose to obtain a page of the target component through local rendering, and then use the page to provide a device identification mark to the target device.
[0074] In some embodiments, when using a page to provide a device identification identifier, the execution subject may choose to first perform rendering locally on the target component to obtain a hypertext markup language file (ie, HTML file) of the page as a rendering result.
[0075] Then, an execution script corresponding to the device identification is generated. For example, the execution subject may encapsulate the sending action of the device identification into a specific execution script (for example, a JavaScript).
[0076] Next, the execution script is embedded in the hypertext markup language file to obtain the embedded hypertext markup language file.
[0077] Finally, the embedded HTML file is provided to the target device.
[0078] Therefore, the execution subject can use the execution script embedded in the HTML file to send the device identification to the target device, so that the target device can only obtain the device identification after actually executing and reading the page sent this time. Therefore, by not directly exposing the device identification, the device identification is prevented from being directly intercepted, and the communication security of the device identification is increased.
[0079] In some embodiments, the execution subject may also determine the access track of the target device based on a set of upload behaviors of the device identification of the target device. For example, the execution subject may record the access request corresponding to the device identification sent by the target device and the component corresponding to the access request.
[0080] Then, based on generating access traces for these components, an access behavior model of the target device is determined.
[0081] Then, the execution subject may classify the target device based on the analysis of the access behavior model. For example, it may determine whether the target device is a device of a preset type. In some embodiments, the preset type may be a device type that the execution subject refuses to access and refuses to provide pages.
[0082] Accordingly, the execution entity may maintain one or more preset access behavior models in advance, so as to classify the target device by comparing the access behavior model of the target device with the one or more preset access behavior models.
[0083] For example, the execution subject may compare the similarity between the access behavior model of the target device and one or more preset access behavior models. If the execution subject determines that the similarity between the access behavior model of the target device and the preset access behavior model is greater than or equal to a similarity threshold, the target device may be determined to be of a preset type. Thus, the target device is denied access and the page is denied to the target device to ensure security.
[0084] In some embodiments, the execution subject may choose to set the device type of each device to be a non-preset type by default, or in other words, to be non-preset type, so as to allow device access as much as possible. Then, based on the access track of each device, a corresponding access behavior model is generated for analysis.
[0085] Accordingly, if the similarity between the device's access behavior model and the preset access behavior model is greater than or equal to the similarity threshold, the executing entity may choose to invalidate the device identification of the device and update the device type of the device to the preset type to deny access to the target device and refuse to provide pages for the target device to ensure security.
[0086] Accordingly, in some embodiments, if the execution subject receives an access request from the target device to the target component, the execution subject may also first choose to determine whether the device type of the target device is a preset type.
[0087] If the execution subject determines that the target device is not of the preset type, it then determines whether the access request is associated with a device identification, thereby ensuring the local security of the execution subject.
[0088] On the basis of any of the above embodiments, in order to ensure data security, the device identification is also maintained with an effective time interval. That is, the device identification can only actually take effect during the effective time interval, or in other words, the execution subject will only allow the "valid" device identification to pass the verification. Accordingly, when the execution subject receives the device identification when the reception time exceeds the effective time interval, the device identification is actually invalid and cannot actually take effect (or, when the duration of the device identification does not meet the effective time interval, the device identification is invalid).
[0089] Accordingly, before detecting whether the access request is sent with a device identification identifier, the execution subject may first select to detect whether the local reception time of the device identification identifier is within the effective time interval corresponding to the device identification identifier. If the local reception time is within the effective time interval corresponding to the device identification identifier, the execution subject further selects to determine the historical service identity identifier and historical access field used to generate the device identification identifier.
[0090] For example, as an alternative or in addition, during the execution of S101, the execution subject may first select to send a device identification in response to the target device's access request for the target component, and detect whether the local reception time of the device identification is within the effective time interval corresponding to the device identification; then, in response to the local reception time being within the effective time interval corresponding to the device identification, the execution subject further selects to determine the historical business identity and historical access field used to generate the device identification. In this way, the desired purpose of S101 is fully achieved.
[0091] Therefore, by setting the "effective time interval", the "validity period" of the device identification is configured to improve the security of the device identification.
[0092] To deepen understanding, this application also provides a specific implementation solution in combination with a specific application scenario, for which please refer to the figure. Figure 3 A process 300 for providing a page provided by another embodiment of the present application is shown.
[0093] In the process 300 , the server 320 may be used as an executor of providing pages to provide SSR for the (terminal) device 310 .
[0094] Specifically, please refer to Figure 3 .
[0095] First, the device 310 may execute S301 to send an access request 311 to the server 320 for the component 321. Exemplarily, before this step is executed, the device 310 is not configured with a device identification by the server 320, so the device 310 only sends the access request 311 alone during the execution of S301.
[0096] Accordingly, when receiving the access request 311 , the server 320 executes S302 to detect whether (the device 310 ) has sent a device identification in response to the access request 311 .
[0097] Next, when the server 320 determines that no device identification is sent for the access request 311, S303 is executed to generate a page 322 of the component 321 rendered locally, and to generate a device identification 323 for the device 310. For example, the device identification 323 for the device 310 is generated based on the business identity and access field of the component 321. The process of this part can refer to the process discussed above, and will not be repeated here.
[0098] Then, the server 320 may execute S304 to send and provide the page 322 and the device identification 323 to the device 310 .
[0099] Subsequently, the device 310 may “identify” itself with the device identification 323 .
[0100] For example, when the subsequent device 310 desires to access the component 331 and uses the server 320 to provide the page 332 of the component 331 in SSR mode, the device 310 may execute S305 to send an access request 341 and a device identification 323 for the component 331 to the server 320 .
[0101] Accordingly, when it is determined that the device identification identifier 323 matches (exemplarily, the server 320 can determine that the device identification identifier 323 matches based on a comparison result that the content corresponding to the device identification identifier 323 obtained this time is "exactly the same" as the business identity identifier and access field referenced by the above-mentioned device identification identifier 323), execute S306, perform local rendering, and generate a page 332 of the locally rendered component 331.
[0102] Then, the server 320 executes S307 to provide the page 332 to the device 310 to complete the SSR process of the page 332 .
[0103] The present application also provides a device for providing a page, the structure of which is as follows: Figure 4 The device 400 shown. The device 400 includes: a historical information acquisition module 410, configured to send a device identification in response to an access request for a target component from a target device, determine a historical business identity and a historical access field for generating a device identification, wherein the device identification is configured to be invisible to the target device content, and the page is obtained by local rendering; a page providing module 420, configured to provide a page obtained by local rendering of the target component to the target device in response to the business identity and access field corresponding to the device identification matching the historical business identity and historical access field.
[0104] In some embodiments, the device 400 also includes: an access field acquisition module, configured to acquire the access field of the target device in response to the target device's access request for the target component without sending a device identification identifier; an identification identifier generation module, configured to generate a device identification identifier for the target device based on the business identity identifier and access field of the target component; a page and device identification identifier providing module, configured to provide the target device with a page obtained by local rendering for the target component, and use the page to provide a device identification identifier.
[0105] In some embodiments, the access field includes a request header field of the target device and / or a request routing field of the target device.
[0106] In some embodiments, a page and device identification identifier providing module includes: a local rendering sub-module, configured to perform rendering locally on a target component to obtain a hypertext markup language file of the page as a rendering result; a script generation sub-module, configured to generate an execution script corresponding to the device identification identifier; a script embedding sub-module, configured to embed the execution script into the hypertext markup language file to obtain the embedded hypertext markup language file; and a page and device identification identifier providing sub-module, configured to provide the embedded hypertext markup language file to the target device.
[0107] In some embodiments, the identification generating module is further configured to, in response to determining that the target device is a trusted device based on the access field, generate a device identification for the target device based on the business identity of the target component and the access field.
[0108] In some embodiments, the apparatus 400 further includes: a device type detection module, configured to determine whether the device type of the target device is a preset type in response to receiving an access request from the target device to the target component; and a device identification identifier recognition module, configured to determine whether the access request is associated with a device identification identifier in response to the device type not being a preset type.
[0109] In some embodiments, the apparatus 400 further includes: an access trajectory determination module, configured to determine the access trajectory of the target device based on a set of upload behaviors of the device identification identifier of the target device; an access behavior model determination module, configured to determine the access behavior model of the target device based on the access trajectory; and a device type update module, configured to invalidate the device identification identifier and update the device type of the target device to a preset type in response to the similarity between the access behavior model and a preset access behavior model being greater than or equal to a similarity threshold.
[0110] In some embodiments, the device identification identifier is also maintained with an effective time interval, and the historical information acquisition module includes: an effective time detection submodule, configured to respond to the target device sending a device identification identifier with an access request for the target component, and detect whether the local reception time of the device identification identifier is within the effective time interval corresponding to the device identification identifier; a historical information acquisition submodule, configured to determine the historical business identity identifier and historical access field used to generate the device identification identifier in response to the local reception time being within the effective time interval corresponding to the device identification identifier.
[0111] Based on the same inventive concept, an electronic device, a readable storage medium and a computer program product are also provided in an embodiment of the present application. The method corresponding to the electronic device may be the method for providing a page in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.
[0112] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0113] Figure 5 The structure of an electronic device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the electronic device 500 includes a central processing unit (CPU, Central Processing Unit) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 502 or the program loaded from the storage part 508 to the random access memory (RAM, Random Access Memory) 503. In RAM 503, various programs and data required for system operation are also stored. CPU 501, ROM 502 and RAM 503 are connected to each other through bus 504. Input / output (I / O, Input / Output) interface 505 is also connected to bus 504.
[0114] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 508 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet.
[0115] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 501, the above functions defined in the method of the present application are executed.
[0116] Another embodiment of the present application further provides a computer-readable storage medium and a computer program product, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application.
[0117] Specifically, the present embodiment can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, systems, devices or devices including but not limited to electricity, magnetism, light, electromagnetic, infrared, or semiconductors, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0118] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0119] The program code embodied on the computer 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.
[0120] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0121] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0122] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0123] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules and units is only a logical function division. There may be other division methods in actual implementation. For example, with units as an example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] In addition, each functional module or unit in each embodiment of the present application may be integrated into one processing module or unit, or each module or unit may exist physically separately, or two or more units may be integrated into one module or unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules or units.
[0126] The above-mentioned integrated modules and units implemented in the form of software function modules and units can be stored in a computer-readable storage medium. The above-mentioned software function modules and units are stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
[0128] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A method for providing a page, characterized in that: include: In response to a target device sending a device identification in an access request for a target component, determining a historical business identity and a historical access field for generating the device identification, wherein the device identification is configured to be invisible to the target device content; In response to the business identity identifier and the access field corresponding to the device identification identifier matching the historical business identity identifier and the historical access field, a page obtained by locally rendering the target component is provided to the target device.
2. The method according to claim 1, characterized in that Also includes: In response to an access request of the target device for the target component not sending the device identification identifier, acquiring an access field of the target device; Generate a device identification for the target device based on the business identity of the target component and the access field; A page obtained by local rendering for the target component is provided to the target device, and the device identification identifier is provided by using the page.
3. The method according to claim 2, characterized in that The access field includes a request header field of the target device and / or a request routing field of the target device.
4. The method according to claim 2, characterized in that: The providing the target device with a page obtained by local rendering for the target component, and using the page to provide the device identification identifier, includes: Rendering is performed locally on the target component to obtain a hypertext markup language file of a page as a rendering result; Generate an execution script corresponding to the device identification identifier; Embedding the execution script into the hypertext markup language file to obtain an embedded hypertext markup language file; The embedded hypertext markup language document is provided to the target device.
5. The method according to claim 2, characterized in that: The generating a device identification for the target device based on the service identification of the target component and the access field includes: In response to determining that the target device is a trusted device based on the access field, a device identification for the target device is generated based on the business identity of the target component and the access field.
6. The method according to claim 1, characterized in that Also includes: In response to receiving an access request from the target device to the target component, determining whether a device type of the target device is a preset type; In response to the device type not being the preset type, determining whether the access request is associated with the device identification.
7. The method according to claim 6, characterized in that Also includes: Determine an access track of the target device based on a set of upload behaviors of the device identification identifier of the target device; Based on the access trace, determining an access behavior model of the target device; In response to the similarity between the access behavior model and the preset access behavior model being greater than or equal to a similarity threshold, the device identification identifier is invalidated, and the device type of the target device is updated to the preset type.
8. The method according to any one of claims 1 to 7, characterized in that The device identification identifier is also maintained with an effective time interval, the device identification identifier is sent in response to the access request of the target device to the target component, and the historical business identity identifier and the historical access field used to generate the device identification identifier are determined, including: In response to a target device sending a device identification identifier in an access request for a target component, detecting whether a local reception time of the device identification identifier is within an effective time interval corresponding to the device identification identifier; In response to the local receiving time being within the effective time interval corresponding to the device identification, a historical service identity and a historical access field used to generate the device identification are determined.
9. A device for providing a page, characterized in that: include: A historical information acquisition module, configured to determine a historical business identity and a historical access field for generating the device identification in response to a target device sending a device identification in response to an access request for a target component from the target device, wherein the device identification is configured to be invisible to the target device content; The page providing module is configured to provide the target device with a page obtained by locally rendering the target component in response to the business identity identifier and access field corresponding to the device identification identifier matching the historical business identity identifier and the historical access field.
10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
11. A computer readable medium, characterized in that Computer program instructions are stored thereon, and the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Identity authentication method and equipment and server
CN103607284A
Device identification determination method and device, server, and storage medium
CN109543462A
Page presentation method and device, electronic equipment and storage medium
CN114329298A
Access control method and system for device identifier
CN118611877A
Method of using a sender-selected audio security feature for authenticating access over a network
US20070204042A1
