Online reading processing method, device and equipment in public network environment and medium
Patent Information
- Application Number
- CN202311241402.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-09-22
AI Technical Summary
[0006]本申请提供一种公网环境下的在线阅读处理方法、装置、设备及介质,用以解决相关技术中的在线阅读方式在公网中被监听并重放或重新构造请求被攻击,以及无法应对部分加载多次读取场景的问题,实现可以用于部分加载多次读取场景,以避免其他人使用同样的网络地址即可访问到文件内容,也避免请求在公网中被监听并重放或重新构造请求以达到攻击的技术效果
[0038]本申请提供的公网环境下的在线阅读处理方法、装置、设备及介质,该方法通过响应于用户的首次阅读请求,获取用户的用户标识、首次访问权限标识,以及待阅读文件的文件标识;根据用户标识、首次访问权限标识和待阅读文件的文件标识,在文件阅读界面展示待阅读文件的首页内容,并返回与用户对应的增量访问权限标识给客户端;响应于用户的增量阅读请求,获取用户的用户标识、增量访问权限标识,以及当前阅读文件的文件标识和指定阅读位置;根据用户标识、增量访问权限标识、当前阅读文件的文件标识和指定阅读位置,在文件阅读界面展示指定阅读位置的文件内容。
Smart Images

Figure CN117201160B_ABST
Abstract
Description
Technical Field
[0001] This application relates to computer technology, and in particular to an online reading processing method, apparatus, device, and medium in a public network environment. Background Technology
[0002] Currently, reading very long documents online has become a popular practice in the cloud computing era. In online reading scenarios, users do not need to download the file to their local machine, nor do they need to install readers for various file types. Instead, they directly use the server-side reading service to read the file stream, parse and convert the currently read portion into an H5 page, and transmit it to the user's browser for rendering and display.
[0003] In this model, the problem that needs to be addressed is: how to prevent unauthorized access to files in a public network environment? Currently, the most common solutions are:
[0004] Option 1: Use HTTPS to encrypt all messages on both the requester and responder. The drawback of Option 1 is that while HTTPS encrypts all request and response content, it cannot prevent replay attacks.
[0005] Option 2: After the service provider verifies the current user's identity and permissions, it dynamically generates a permission token. This token can only be used once. If an attacker learns the request URL rules and constructs their own request, the service provider cannot identify and block the forged request to read file content. The drawback of Option 2 is that the token can only be used once, and while it is generally suitable for file download scenarios, it cannot handle scenarios involving multiple reads of partially loaded content. Summary of the Invention
[0006] This application provides an online reading processing method, apparatus, device, and medium in a public network environment to solve the problems in related technologies where online reading methods are subject to attacks such as being monitored, replayed, or reconstructed in the public network, and the inability to handle scenarios involving partial loading and multiple readings. It enables the use of methods for scenarios involving partial loading and multiple readings, thereby preventing others from accessing file content using the same network address and preventing requests from being monitored, replayed, or reconstructed in the public network to achieve the technical effect of attacks.
[0007] On the one hand, this application provides an online reading processing method in a public network environment, the method comprising:
[0008] In response to a user's first reading request, the system obtains the user's user identifier, the first access permission identifier, and the file identifier of the file to be read.
[0009] Based on the user identifier, the initial access permission identifier, and the file identifier of the file to be read, the first page content of the file to be read is displayed on the file reading interface, and the incremental access permission identifier corresponding to the user is returned to the client;
[0010] In response to the user's incremental reading request, obtain the user's user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position;
[0011] Based on the user identifier, the incremental access permission identifier, the file identifier of the currently read file, and the specified reading position, the file content at the specified reading position is displayed on the file reading interface.
[0012] In an optional embodiment, before obtaining the user's user identifier, the first access permission identifier, and the file identifier of the file to be read, the method further includes:
[0013] In response to the user's request to confirm reading permissions, determine the user's user identifier and the file identifier of the file to be read;
[0014] If it is determined that the user has access rights to the file to be read based on the user identifier and the file identifier, then an initial access permission identifier corresponding to the user is generated;
[0015] The initial access permission identifier is returned to the client so that the user can request to read the file for the first time based on the initial access permission identifier.
[0016] In an optional embodiment, while or after the file content at the specified reading position is displayed on the file reading interface, the method further includes:
[0017] Generate the next incremental access permission identifier corresponding to the user;
[0018] The next incremental access permission identifier is returned to the client so that the user can request incremental reading of the currently read file based on the next incremental access permission identifier.
[0019] In one optional embodiment, based on the user identifier, the initial access permission identifier, and the file identifier of the file to be read, the first page content of the file to be read is displayed on the file reading interface, and an incremental access permission identifier corresponding to the user is returned to the client, including:
[0020] Verify whether the initial access permission identifier and the cache access permission identifier are consistent;
[0021] If the initial access permission identifier matches the cache access permission identifier, then the file reading interface is determined based on the user identifier, and the homepage content of the file to be read is obtained based on the file identifier of the file to be read.
[0022] The file reading interface displays the first page content of the file to be read and generates an incremental access permission identifier corresponding to the user.
[0023] Return the incremental access permission identifier corresponding to the user to the client.
[0024] In an optional embodiment, the method further includes:
[0025] In response to the completion of the first reading request, it is determined that the first access permission identifier has expired;
[0026] Upon completion of the incremental read request, the incremental access permission identifier is determined to be invalid.
[0027] In an optional embodiment, the method further includes:
[0028] In response to the expiration time configured for the first access permission identifier being reached, the first access permission identifier is determined to be invalid;
[0029] In response to the expiration time configured for the incremental access permission identifier being reached, the incremental access permission identifier is determined to be invalid.
[0030] On the other hand, this application provides an online reading processing device in a public network environment, the device comprising:
[0031] The first acquisition module is used to acquire the user's user identifier, first access permission identifier, and file identifier of the file to be read in response to the user's first reading request;
[0032] The first display module is used to display the homepage content of the file to be read on the file reading interface based on the user identifier, the initial access permission identifier, and the file identifier of the file to be read, and return the incremental access permission identifier corresponding to the user to the client;
[0033] The second acquisition module is used to acquire the user's user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position in response to the user's incremental reading request;
[0034] The second display module is used to display the file content at the specified reading position on the file reading interface based on the user identifier, the incremental access permission identifier, the file identifier of the currently read file, and the specified reading position.
[0035] On the other hand, this application provides an electronic device, including: a processor and a memory connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement any of the methods described above.
[0036] On the other hand, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement any of the methods described above.
[0037] On the other hand, this application provides a computer program product, including a computer program that, when executed by a processor, implements any of the methods described above.
[0038] The online reading processing method, apparatus, device, and medium provided in this application for a public network environment include the following steps: In response to a user's initial reading request, the method obtains the user's user identifier, initial access permission identifier, and file identifier of the file to be read; based on the user identifier, initial access permission identifier, and file identifier of the file to be read, it displays the first page content of the file to be read on the file reading interface and returns an incremental access permission identifier corresponding to the user to the client; in response to a user's incremental reading request, the method obtains the user's user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position; based on the user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position, it displays the file content at the specified reading position on the file reading interface.
[0039] By adopting the above embodiments, the problems of online reading methods in related technologies being monitored and replayed or reconstructed on the public network, and being unable to cope with scenarios of partial loading and multiple readings can be solved. This enables the use of partial loading and multiple reading scenarios to prevent others from accessing the file content using the same network address, and also to prevent requests from being monitored and replayed or reconstructed on the public network to achieve the technical effect of attack. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0041] Figure 1 This is a flowchart illustrating an online reading processing method in a public network environment provided in an embodiment of this application;
[0042] Figure 2 A flowchart illustrating an optional online reading processing method in a public network environment provided in this application embodiment;
[0043] Figure 3 A flowchart illustrating an optional online reading processing method in a public network environment provided in this application embodiment;
[0044] Figure 4 A flowchart illustrating an optional online reading processing method in a public network environment provided in this application embodiment;
[0045] Figure 5 A flowchart illustrating an optional online reading processing method in a public network environment provided in this application embodiment;
[0046] Figure 6 A structural block diagram of an online reading processing device in a public network environment provided in this application embodiment;
[0047] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0048] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0049] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0050] First, let me explain the terms used in this application:
[0051] Access identifier: In computer science and cryptography, it is a symbol or mark used to represent a specific entity. It can be a string of characters, numbers, or other data types, used for identity verification, access control, security authentication, etc.
[0052] HTML5, or H5 for short, is a language for describing web content. HTML5 is the next-generation standard for the internet, a language for building and presenting internet content, and is considered one of the core technologies of the internet.
[0053] Currently, reading very long documents online has become a popular practice in the cloud computing era. In online reading scenarios, users do not need to download the file to their local machine, nor do they need to install readers for various file types. Instead, they directly use the server-side reading service to read the file stream, parse and convert the currently read portion into an H5 page, and transmit it to the user's browser for rendering and display.
[0054] In this model, the problem that needs to be addressed is: how to prevent unauthorized access to files in a public network environment? Currently, a common solution is:
[0055] Option 1: Use HTTPS to encrypt all messages on both the requester and responder. The drawback of Option 1 is that while HTTPS encrypts all request and response content, it cannot prevent replay attacks.
[0056] Option 2: After the service provider verifies the current user's identity and permissions, it dynamically generates a permission token. This token can only be used once. If an attacker learns the request URL rules and constructs their own request, the service provider will be unable to identify and block the forged request to read file content.
[0057] The drawback of this second approach is that the token can only be used once, and it is generally suitable for file download scenarios. However, this approach cannot handle scenarios involving multiple reads of partially loaded data.
[0058] The online reading processing method provided in this application for a public network environment aims to solve the aforementioned technical problems of existing technologies. It aims to limit attackers from launching replay attacks and from constructing URLs to forge file read requests; simultaneously, it supports scenarios involving partial loading and multiple readings of the same file.
[0059] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0060] Figure 1 This is a flowchart illustrating an online reading processing method in a public network environment provided in an embodiment of this application. Figure 1 As shown, the method includes:
[0061] S101, in response to the user's first reading request, obtain the user's user identifier, first access permission identifier, and file identifier of the file to be read.
[0062] S102, based on the user identifier, the initial access permission identifier, and the file identifier of the file to be read, display the homepage content of the file to be read on the file reading interface, and return the incremental access permission identifier corresponding to the user to the client.
[0063] S103, in response to the incremental reading request from the aforementioned user, obtain the user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position of the aforementioned user.
[0064] S104. Based on the user identifier, the incremental access permission identifier, the file identifier of the currently read file, and the specified reading position, display the file content at the specified reading position on the file reading interface.
[0065] Optionally, the online reading processing method provided in this application embodiment can be specifically used in online reading scenarios in a public network environment, that is, it can support partial loading operations during the online reading process and effectively control file security.
[0066] For example, in this embodiment of the application, when a user sends an online reading request through the client's front-end page, it is first determined whether the online reading request is the first reading request. If so, in response to the user's first reading request, the user's user identifier (user ID, the current user's login information), first access permission identifier (first access token1), and the file identifier of the file to be read (file ID, i.e., determining which specific file needs to be read) are obtained.
[0067] Next, based on the initial access permission identifier, the user ID and file ID are verified on the backend server to determine if the current user has permission to read the file. In some cases, permission information may not be present in the reader, requiring calls to other modules or services for confirmation. Once this service confirms that the current user has the necessary permissions, it returns a basic reader page, i.e., the file reading interface, to display the first page content of the file to be read, and returns the incremental access permission identifier corresponding to the user to the client.
[0068] Furthermore, in this embodiment, an incremental access permission identifier token2 corresponding to the aforementioned user can be generated and returned to the client simultaneously. Once the first reading request is completed, token1 immediately becomes invalid and is used to respond to subsequent incremental reading requests from the aforementioned user, incrementally fetching file information. In this way, when the user reads a large file, too much data will not be returned at once, or even exhaust the memory of the server or client.
[0069] Optionally, in response to the user's incremental reading request, the system obtains the user's identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position. This allows for partial reading and rendering of the file, directly displaying the file content at the specified reading position on the file reading interface. When the user reads in the file reading interface, they can scroll up and down. During page scrolling, an incremental reading request is invoked to retrieve the file content of the new page. This requires the current token N. After this request is completed, token N immediately becomes invalid, and token (N+1) is generated for the next incremental file content reading request.
[0070] Using the embodiments of this application, there is no need to repeatedly verify whether the user has permission to read the file. As long as the corresponding incremental access permission identifier is passed, and the current user's login information and the file ID of the currently read file can be matched, it means that the user's request has passed the permission verification and is allowed to view the content of the currently read file. The next step is to return the data of the currently rendered part and the next incremental access permission identifier to be used for the next reading.
[0071] By adopting the embodiments of this application, the need for attackers to guess or exhaustively enumerate a certain access permission token can be minimized, thereby increasing the security of the current reading service.
[0072] The online reading processing method, apparatus, device, and medium provided in this application for a public network environment, in response to a user's initial reading request, obtains the user's user identifier, initial access permission identifier, and file identifier of the file to be read; based on the user identifier, initial access permission identifier, and file identifier of the file to be read, displays the first page content of the file to be read on the file reading interface, and returns the incremental access permission identifier corresponding to the user to the client; in response to a user's incremental reading request, obtains the user's user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position; based on the user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position, displays the file content at the specified reading position on the file reading interface.
[0073] By adopting the above embodiments, the problems of online reading methods in related technologies being monitored and replayed or reconstructed on the public network, and being unable to cope with scenarios of partial loading and multiple readings can be solved. This enables the use of partial loading and multiple reading scenarios to prevent others from accessing the file content using the same network address, and also to prevent requests from being monitored and replayed or reconstructed on the public network to achieve the technical effect of attack.
[0074] In one alternative embodiment, Figure 2A flowchart illustrating an optional online reading processing method in a public network environment, as provided in this application embodiment, is shown below. Figure 2 As shown, before obtaining the user's identifier, initial access permission identifier, and file identifier of the file to be read, the above method further includes:
[0075] S201, in response to the aforementioned user's request to confirm reading permissions, determine the user's identifier and the file identifier of the file to be read.
[0076] S202, if it is determined that the user has access rights to the file to be read based on the user identifier and the file identifier, then an initial access permission identifier corresponding to the user is generated.
[0077] S203, return the initial access permission identifier to the client so that the user can request to read the file to be read for the first time based on the initial access permission identifier.
[0078] Optionally, in the embodiments of this application, such as Figure 3 As shown, the backend server can include a set of application servers and a set of reading servers. The application servers are responsible for receiving and processing user reading permission confirmation requests. Based on the user identifier and the file identifier, they determine whether the user has access rights to the file to be read, and then generate an initial access permission identifier corresponding to the user. The reading servers are used to store the binding relationships between various access permission identifiers (e.g., initial access permission identifiers). For example, the specific binding relationship is: initial access permission identifier -> (user ID, file ID). When a user requests to read the file for the first time based on the initial access permission identifier, the initial access permission identifier token1 is used to determine whether the current user can access the file.
[0079] In one alternative embodiment, Figure 4 This is a flowchart illustrating an optional online reading method in a public network environment, provided as an embodiment of this application. While displaying the file content at the specified reading location on the file reading interface, or as... Figure 4 After displaying the file content at the specified reading location on the file reading interface, the method further includes:
[0080] S301, Generate the next incremental access permission identifier corresponding to the above user.
[0081] S302, return the next incremental access permission identifier to the client so that the user can request incremental reading of the currently read file based on the next incremental access permission identifier.
[0082] In this embodiment of the application, the reading service includes two main services: one is reading a file for the first time, and the other is reading a file by appending parts.
[0083] For example, while or after the file content at the specified reading position is displayed on the file reading interface (i.e., while or after appending to a file), the reading server can generate a next incremental access permission identifier corresponding to the user and return this identifier to the client. This allows the user to request incremental reading of the currently read file based on the next incremental access permission identifier. This step can be repeated until the user finishes reading or the entire currently read file has been read.
[0084] In one alternative embodiment, Figure 5 A flowchart illustrating an optional online reading processing method in a public network environment, as provided in this application embodiment, is shown below. Figure 5 As shown, based on the aforementioned user identifier, the aforementioned initial access permission identifier, and the aforementioned file identifier of the file to be read, the first page content of the file to be read is displayed on the file reading interface, and the incremental access permission identifier corresponding to the aforementioned user is returned to the client, including:
[0085] S401, verify whether the above-mentioned initial access permission identifier is consistent with the cache access permission identifier.
[0086] S402, if the verification of the first access permission identifier is consistent with the cache access permission identifier, then determine the file reading interface based on the user identifier, and obtain the homepage content of the file to be read based on the file identifier of the file to be read.
[0087] S403, Display the homepage content of the file to be read on the file reading interface and generate an incremental access permission identifier corresponding to the user.
[0088] S404 returns the incremental access permission identifier corresponding to the above user to the client.
[0089] Optionally, in this embodiment, when a user reads a file for the first time, the system first verifies whether the initial access permission identifier and the cached access permission identifier are consistent. If the initial access permission identifier token1 sent by the user on the client is inconsistent with the cached access permission identifier, it indicates that the current request is illegal, and the user is refused access to the file. If the initial access permission identifier and the cached access permission identifier are consistent, the system determines the file reading interface based on the user identifier and obtains the homepage content of the file to be read based on the file identifier of the file to be read. The system displays the homepage content of the file to be read on the file reading interface, generates an incremental access permission identifier corresponding to the user, and returns the incremental access permission identifier corresponding to the user to the client.
[0090] In an optional embodiment, the method further includes:
[0091] In response to the completion of the aforementioned first-time reading request, it is determined that the aforementioned first-time access permission identifier has expired;
[0092] Upon completion of the aforementioned incremental read request, the aforementioned incremental access permission identifier is determined to be invalid.
[0093] In an optional embodiment, the method further includes:
[0094] In response to the expiration time configured for the aforementioned initial access permission identifier, it is determined that the aforementioned initial access permission identifier has expired;
[0095] In response to the expiration time of the incremental access permission identifier as configured above, the incremental access permission identifier is determined to be invalid.
[0096] As can be seen, in this embodiment of the application, both the initial access permission identifier and the subsequent incremental access permission identifier can be configured with an expiration period. If they are not used within the expiration period, or if they are completed in response to the corresponding reading request, both the initial access permission identifier and the subsequent incremental access permission identifier will expire and become invalid, so as to ensure data security as much as possible.
[0097] In this embodiment, permission verification is performed only once when the user first triggers the file to be read. It is not necessary to repeatedly verify whether the user has permission to read the file. Furthermore, the user's access permission token is updated each time the file is read, which increases the difficulty of brute-force attacks by attackers and enhances security.
[0098] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0099] According to one or more embodiments of this application, an online reading processing device in a public network environment is provided. Figure 6 A structural block diagram of an online reading processing device in a public network environment provided in this application embodiment is shown below. Figure 6 As shown, the above-mentioned device includes:
[0100] The first acquisition module 601 is used to acquire the user's user identifier, first access permission identifier, and file identifier of the file to be read in response to the user's first reading request;
[0101] The first display module 602 is used to display the homepage content of the file to be read on the file reading interface according to the user identifier, the initial access permission identifier and the file identifier of the file to be read, and return the incremental access permission identifier corresponding to the user to the client.
[0102] The second acquisition module 603 is used to respond to the incremental reading request of the user and acquire the user's user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position.
[0103] The second display module 604 is used to display the file content at the specified reading position on the file reading interface based on the user identifier, the incremental access permission identifier, the file identifier of the currently read file, and the specified reading position.
[0104] According to one or more embodiments of this application, the above-described apparatus further includes:
[0105] The determination module is used to determine the user's user identifier and the file identifier of the file to be read in response to the aforementioned user's request for confirmation of reading permission.
[0106] The first generation module is used to generate an initial access permission identifier corresponding to the user if it is determined from the user identifier and the file identifier that the user has access permission to the file to be read.
[0107] The first return module is used to return the aforementioned initial access permission identifier to the client, so that the user can request to read the aforementioned file for the first time based on the aforementioned initial access permission identifier.
[0108] According to one or more embodiments of this application, the above-described apparatus further includes:
[0109] The second generation module is used to generate the next incremental access permission identifier corresponding to the above users;
[0110] The second return module is used to return the next incremental access permission identifier to the client, so that the user can request incremental reading of the currently read file based on the next incremental access permission identifier.
[0111] In one optional embodiment, the first display module includes:
[0112] The verification unit is used to verify whether the aforementioned initial access permission identifier is consistent with the cache access permission identifier;
[0113] The determining unit is configured to determine the file reading interface based on the user identifier if the verification shows that the first access permission identifier is consistent with the cache access permission identifier, and to obtain the homepage content of the file to be read based on the file identifier of the file to be read.
[0114] The generation unit is used to display the homepage content of the file to be read on the file reading interface and generate an incremental access permission identifier corresponding to the user.
[0115] The return unit is used to return the incremental access permission identifier corresponding to the above user to the client.
[0116] In an exemplary embodiment, this application also provides an electronic device, including: a processor, and a memory connected to the processor;
[0117] The aforementioned memory stores instructions executed by the computer;
[0118] The processor executes computer execution instructions stored in the memory to implement any of the methods described above.
[0119] In an exemplary embodiment, this application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described above.
[0120] In an exemplary embodiment, this application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the methods described above.
[0121] To implement the above embodiments, this application also provides an electronic device. (See reference...) Figure 7The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of this application. The electronic device 700 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, messaging devices, game consoles, medical devices, fitness equipment, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0122] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0123] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0124] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this application.
[0125] It should be noted that the computer-readable medium described above in this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer 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), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution device or apparatus. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution device or apparatus. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0126] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0127] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0128] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0130] The units described in the embodiments of this application can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0131] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0132] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution apparatus or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor device or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, 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), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0133] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0134] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for processing online reading in a public network environment, characterized in that, The method includes: In response to a user's first reading request, the system obtains the user's user identifier, the first access permission identifier, and the file identifier of the file to be read. Based on the user identifier, the initial access permission identifier, and the file identifier of the file to be read, the first page content of the file to be read is displayed on the file reading interface, and the incremental access permission identifier corresponding to the user is returned to the client; in response to the completion of the initial reading request, the initial access permission identifier is determined to be invalid. In response to the user's incremental reading request, the system obtains the user's user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position; wherein, when the user is reading in the file reading interface, an incremental reading request is invoked to obtain the file content of the new page when the user turns the page; Based on the user identifier, the incremental access permission identifier, the file identifier of the currently read file, and the specified reading position, the file content at the specified reading position is displayed on the file reading interface; in response to the completion of the incremental reading request, the incremental access permission identifier is determined to be invalid. While displaying the file content at the specified reading position on the file reading interface, a next incremental access permission identifier corresponding to the user is generated; The next incremental access permission identifier is returned to the client so that the user can request incremental reading of the currently read file based on the next incremental access permission identifier.
2. The method according to claim 1, characterized in that, Before obtaining the user's user identifier, initial access permission identifier, and file identifier of the file to be read, the method further includes: In response to the user's request to confirm reading permissions, determine the user's user identifier and the file identifier of the file to be read; If it is determined that the user has access rights to the file to be read based on the user identifier and the file identifier, then an initial access permission identifier corresponding to the user is generated; The initial access permission identifier is returned to the client so that the user can request to read the file for the first time based on the initial access permission identifier.
3. The method according to claim 1, characterized in that, Based on the user identifier, the initial access permission identifier, and the file identifier of the file to be read, the first page content of the file to be read is displayed on the file reading interface, and the incremental access permission identifier corresponding to the user is returned to the client, including: Verify whether the initial access permission identifier and the cache access permission identifier are consistent; If the initial access permission identifier matches the cache access permission identifier, then the file reading interface is determined based on the user identifier, and the homepage content of the file to be read is obtained based on the file identifier of the file to be read. The file reading interface displays the first page content of the file to be read and generates an incremental access permission identifier corresponding to the user. Return the incremental access permission identifier corresponding to the user to the client.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to the expiration time configured for the first access permission identifier being reached, the first access permission identifier is determined to be invalid; In response to the expiration time configured for the incremental access permission identifier being reached, the incremental access permission identifier is determined to be invalid.
5. An online reading processing device in a public network environment, characterized in that, The device includes: The first acquisition module is used to acquire the user's user identifier, first access permission identifier, and file identifier of the file to be read in response to the user's first reading request; The first display module is used to display the homepage content of the file to be read on the file reading interface according to the user identifier, the initial access permission identifier, and the file identifier of the file to be read, and return the incremental access permission identifier corresponding to the user to the client; in response to the completion of the first reading request, it determines that the initial access permission identifier has expired; The second acquisition module is used to respond to the user's incremental reading request by acquiring the user's user identifier, incremental access permission identifier, file identifier of the currently read file, and specified reading position; wherein, when the user is reading in the file reading interface, the incremental reading request is invoked to obtain the file content of the new page when the user turns the page; The second display module is used to display the file content at the specified reading position on the file reading interface based on the user identifier, the incremental access permission identifier, the file identifier of the currently read file, and the specified reading position; and to determine that the incremental access permission identifier has expired in response to the completion of the incremental reading request. The second display module is further configured to generate a next incremental access permission identifier corresponding to the user while or after displaying the file content at the specified reading position on the file reading interface; and return the next incremental access permission identifier to the client so that the user can request incremental reading of the currently reading file based on the next incremental access permission identifier.
6. An electronic device, characterized in that, include: A processor, and a memory connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 4.
8. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Electronic document reading method and system
CN106161387A
H5 non-login user session tracking method
CN110933078A