Page access method and device, equipment, storage medium and program product
By parsing the user access token and the page request access address, combined with the pre-built user access permission list, the user access permissions are updated in real time, which solves the problem of overprivileged access in the existing technology and improves the security of page access.
Patent Information
- Application Number
- CN202411145647.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-13
AI Technical Summary
In the Internet front-end page access technology, the prior art is difficult to update the user access rights in real time when judging whether the user access token is authorized, resulting in the possibility of overprivileged access.
By obtaining page access requests, parsing user access tokens and page request access addresses, determining user access rights identification, and controlling users to page access based on the pre-built user access rights list, real-time updates and overprivileged access to user access rights can be achieved. interception.
It effectively avoids overprivileged access, ensures the security of page access and the timeliness of permission management.
Smart Images

Figure CN119128859A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a page access method, device, equipment, storage medium and program product. Background Art
[0002] In the field of Internet front-end page access technology, the demand for page access to different Internet systems or different business systems by different users has increased dramatically. In a complex network security environment, unauthorized access is very likely to occur. Therefore, the management of user page access rights is one of the important links that affect normal page access and access security.
[0003] In the prior art, when accessing a page, a method of judging whether the user's access token is authorized is usually used to determine whether the user has access rights. This method results in low security for user access to the page, and unauthorized access may occur if the user's access rights are not updated in a timely manner. Summary of the invention
[0004] The present invention provides a page access method, device, equipment, storage medium and program product to update the user's access rights in real time to avoid unauthorized access.
[0005] According to one aspect of the present invention, a page access method is provided, comprising:
[0006] Obtain a page access request, perform request parsing on the page access request, and obtain a user access token and a page request access address;
[0007] Determine, based on the user access token, a user access permission identifier of a target user to which the page access request belongs;
[0008] According to the user access permission identifier, based on a pre-built user access permission list, a user access permission address of the target user is determined; the user access permission list stores a mapping relationship between at least one page access permission identifier and a page access permission address;
[0009] According to the page request access address and based on the user access permission address, the target user is controlled to access the page.
[0010] According to another aspect of the present invention, there is provided a page access device, comprising:
[0011] An access request acquisition module is used to acquire a page access request, perform request parsing on the page access request, and obtain a user access token and a page request access address;
[0012] An access rights identification determination module, used to determine the user access rights identification of the target user to which the page access request belongs according to the user access token;
[0013] an access permission address determination module, configured to determine the user access permission address of the target user according to the user access permission identifier and based on a pre-built user access permission list; the user access permission list stores a mapping relationship between at least one page access permission identifier and a page access permission address;
[0014] The control module is used to control the target user to access the page based on the page request access address and the user access permission address.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the page access method described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page access method described in any embodiment of the present invention when executed.
[0020] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the page access method described in any embodiment of the present invention is implemented.
[0021] The technical solution of the embodiment of the present invention obtains a user access token and a page request access address according to the user's access request, and determines the user access permission identifier of the target user according to the user access token. According to the user access permission identifier, the user access permission address of the target user is determined based on a pre-built user access permission list, and the user access permission list stores a mapping relationship between at least one page access permission identifier and a page access permission address. According to the page request access address and the user access permission address, the target user is controlled to perform page access. In this technical solution, all pages that need to update access permissions can be obtained according to the pre-established mapping relationship between the page access permission identifier and the page access permission address. It is also possible to implement real-time updating of user access permissions and automatically intercept unauthorized access by users.
[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 is a flow chart of a page access method provided according to the first embodiment of the present invention;
[0025] Figure 2 is a flow chart of a page access method provided according to Embodiment 2 of the present invention;
[0026] Figure 3 is a structural diagram of a page access device provided according to Embodiment 3 of the present invention;
[0027] Figure 4 It is a schematic diagram of the structure of an electronic device for implementing the page access method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1 A flowchart of a page access method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where the user's page access request is subjected to permission verification and unauthorized access is automatically intercepted. The method can be executed by a page access device, which can be implemented in the form of hardware and / or software. Figure 1 As shown, the method includes:
[0032] S110: Obtain a page access request, parse the page access request, and obtain a user access token and a page request access address.
[0033] Among them, the page access request is a request to access the target page, which can be initiated by a user with page access requirements. The user access token is a credential for identity information verification and access rights pre-set for the user, which is used to characterize the uniqueness of the user identity. The page request access address is the page address corresponding to the target page requested by the page access request.
[0034] Specifically, when a page access request for a target page initiated by a user is obtained, for example, the request may be to open a front-end browser page, or to request to obtain back-end online resources, etc., the page access request is parsed to obtain the user access token and the page request access address of the user to which the page access request belongs.
[0035] S120: Determine, according to the user access token, a user access permission identifier of a target user to which the page access request belongs.
[0036] The target user may be a user who initiates a page access request; and the user access permission identifier may be used to represent the access permission that the user has for the page.
[0037] It should be noted that the page access permissions of users can be pre-allocated according to actual needs, and the page access permissions of different users can be the same or different.
[0038] Optionally, according to the user access token, the target access permission identifier of the target user to which the page access request belongs is determined, including: performing token permission verification on the user access token to obtain the token permission verification result; if the token permission verification result passes, obtaining a token permission identifier relationship comparison table; the token permission identifier relationship comparison table stores a mapping relationship between a reference access token and a reference access permission identifier of at least one reference user; according to the user access token of the target user, based on the token permission identifier relationship comparison table, the target access permission identifier corresponding to the target access token is determined. Among them, the reference access token is an access token set in advance when assigning access permissions to the user, and the reference access permission identifier is used to represent all access permissions assigned in advance to the user.
[0039] Among them, the token permission verification of the user access token can specifically be the verification of the user login identity authority. Exemplarily, it can be determined whether the user access token is in the preset access token whitelist. If so, it can indicate that the token permission verification has passed; if not, it can indicate that the token permission verification has failed. If the token permission verification passes, the user access permission identifier of the target user is determined; if the token permission verification fails, the relevant prompt information that the token verification has failed is sent to the target user.
[0040] Among them, the token permission identification relationship comparison table can be pre-constructed by relevant technical personnel, and is used to characterize the mapping relationship between the reference access token and the reference permission identification of at least one reference user. For example, the reference access permission identification corresponding to the reference access token token1 of reference user A can be identification a, identification b and identification c; the reference access permission identification corresponding to the user access token token2 of reference user B can be identification c, identification d, identification e and identification f.
[0041] Based on the token permission identification relationship comparison table, the user access permission identification corresponding to the user access token of the target user is searched. For example, if the user access token of the target user is token1, continuing the above example, the user access permission identification of the target user is identification a, identification b and identification c, which is not specifically limited in this embodiment.
[0042] S130. Determine the user access permission address of the target user according to the user access permission identifier and based on a pre-built user access permission list; the user access permission list stores a mapping relationship between at least one page access permission identifier and a page access permission address.
[0043] The user access permission address is the page address corresponding to the target page to which the user has access permission. The page access permission identifier can be used to represent the access permission required for the user to access the page, and can be pre-assigned to the user and recorded in the user access token. The page access permission address is the corresponding page address of the page to which the user has access permission, and there is a mapping relationship between it and the page access permission identifier.
[0044] The user access permission list may be preset by relevant technical personnel. For example, the user access permission list may be as shown in Table 1:
[0045] Table 1:
[0046] Page access permission flag Page access rights address a Address 01 b Address 02 ... ...
[0047] For example, continuing with the above example, if the target user's user access permission identifier is determined to be identifier a, the target user's user access permission identifier address can be determined to be address 01 by querying the user access permission list; if the target user's user access permission identifier is determined to be identifier b, the target user's user access permission identifier address can be determined to be address 02 by querying the user access permission list.
[0048] Specifically, the target user's user access permission address can be determined based on the target user's page access permission, and based on the user permission comparison table, the page address of the target page that the target user has access permission to is determined. This implements real-time verification of the user's page access permission to avoid unauthorized access by the user.
[0049] S140. According to the page request access address and based on the user access permission address, control the target user to access the page.
[0050] Among them, controlling the target user to access a page can specifically be, when the user has a page access demand, controlling the target user to access the page according to the page address corresponding to the access demand page and the page address of the target page to which the user has access rights. For example, if the access demand page is to open a front-end browser page, the target user can be controlled to enter the browser page, or the target user can be denied to enter the browser page. This embodiment does not impose any specific restrictions on this.
[0051] Specifically, the page address of the target page to which the target user has access rights can be compared with the page address corresponding to the access request page to obtain a comparison result. According to the comparison result, the target user is controlled to access the page; if the comparison result is the same, it means that the target user has the page request access rights; if the comparison result is different, it means that the target user does not have the page request access rights.
[0052] Optionally, according to the page request access address and based on the user access permission address, the target user is controlled to access the page, including: if there is a user access permission address that is the same as the page request access address, then the target user has the page request access permission; or, if there is no user access permission address that is the same as the page request access address, then the target user does not have the page request access permission.
[0053] The technical solution of the embodiment of the present invention obtains a user access token and a page request access address according to the user's access request, and determines the user access permission identifier of the target user according to the user access token. According to the user access permission identifier, the user access permission address of the target user is determined based on a pre-built user access permission list, and the user access permission list stores a mapping relationship between at least one page access permission identifier and a page access permission address. According to the page request access address and the user access permission address, the target user is controlled to perform page access. In this technical solution, all pages that need to update access permissions can be obtained according to the pre-established mapping relationship between the page access permission identifier and the page access permission address. Real-time updating of user access permissions can be achieved, and unauthorized access by users can be automatically intercepted.
[0054] Embodiment 2
[0055] Figure 2 This is a flow chart of a page access method provided in the second embodiment of the present invention. Based on the above embodiment, this embodiment further optimizes the above page access method.
[0056] Furthermore, before the step of "obtaining a page access request, parsing the page access request, and obtaining a user access token and a page request access address", add the step of "obtaining an interface configuration file, and determining whether the file type of the interface configuration file is a preset file type; if so, extracting the file content of the interface configuration file to obtain a button call function; determining a first calling page associated with the button call function, and determining a first page permission address corresponding to the first calling page; generating a first page access permission identifier for the first page permission address, and establishing a mapping relationship between the first page permission address and the first page access permission identifier; generating a user access permission list including a mapping relationship between at least one page permission address and a page access permission identifier." to improve the method for generating a user access permission list.
[0057] It should be noted that for the parts not described in detail in the embodiments of the present invention, reference can be made to the descriptions of other embodiments. Figure 2 As shown, the method comprises the following specific steps:
[0058] S210: Obtain an interface configuration file, and determine whether the file type of the interface configuration file is a preset file type.
[0059] The interface configuration file is a file for storing resource information configuration, and the program or script stored therein contains at least one function call function.
[0060] Among them, the preset file type can be pre-set by relevant technical personnel according to actual needs. Specifically, the preset file type is the vue file (Vue file, extended file) type
[0061] S220: If yes, extract the file content of the interface configuration file to obtain the button calling function.
[0062] The button calling function is a function that calls the button function in the created page, and is usually represented by Button() in the HTML (HyperText Markup Language) front-end page. For example, when the front-end browser page opening operation is executed, the button calling function is called, the opening operation is executed, and its state is marked as "open state".
[0063] Exemplarily, if the file type of the interface configuration file is a preset file type, the file content of the interface configuration file is extracted to obtain the button call function; if the file type of the interface configuration file is not a preset file type, the interface configuration file is continuously monitored to obtain the interface configuration file.
[0064] S230: Determine a first calling page associated with the button calling function, and determine a first page authority address corresponding to the first calling page.
[0065] The first calling page may be a page for calling a button to call a function. The page address corresponding to the first calling page is the first page authority address.
[0066] S240: Generate a first page access permission identifier for the first page access permission address, and establish a mapping relationship between the first page access permission address and the first page access permission identifier, wherein the first page access permission identifier can be used to represent the access permission required for the user to access the first page.
[0067] Optionally, generating a first page access permission identifier of a first page permission address includes: determining a first file name of a page file to which the first calling page belongs, and performing hash coding on the first file name to obtain a page code; and using the page code as a first page access permission identifier of the first page permission address of the first calling page. The first file name can be specifically used to represent a page file name of a first-level page.
[0068] The hash code may be a data conversion of the input text content and an output of a hash value with a fixed size. The first file name conversion method may also be a hash function or a unique identifier generation algorithm, which is not specifically limited in this embodiment.
[0069] Specifically, the first file name of the first calling page in the page file is determined, and the first page file name is hash-coded to obtain a page code with a fixed numerical value, and the page code is used as the first page access permission identifier of the first calling page.
[0070] In an optional scheme of the present embodiment, it can be combined with one or more optional schemes of the present embodiment. Optionally, after extracting the content of the file content of the interface configuration file to obtain the button call function, it also includes: determining whether there is a click action function that calls the button call function; if so, determining a second call page that has an association with the click action function, and determining a second page permission address corresponding to the second call page; determining a second file name of the file to which the second call page belongs; generating a page access permission identifier of the second page permission address based on the second file name and the click action function, and establishing a mapping relationship between the second page permission address and the second page access permission identifier.
[0071] The click action function may be a function for calling a button call function to perform page operation actions such as page opening. The second call page may be a page obtained by calling the click action function. The page address corresponding to the second call page is the second page authority address.
[0072] Specifically, when the acquired file content may also include a click action function that calls a button function, a second calling page associated with the click action function may be determined based on the click action function corresponding to the button calling function. The corresponding second page permission address is acquired based on the determined second calling page, a page access permission identifier of the second page permission address is generated, and a mapping relationship between the second page permission address and the second page permission identifier is established.
[0073] The second page permission identifier may be determined by hashing the page file name of the second page, and concatenating the hashed string with the function name or function code of the click action function to obtain the second page permission identifier. The function code may be obtained by hashing the click action function, or by calculating the summary value of the click action function.
[0074] S250: Generate a user access permission list including a mapping relationship between at least one page permission address and a page access permission identifier.
[0075] In a specific implementation, the user access permission list may further include a parent permission identifier of the page access permission identifier, and the user access permission list may also be as shown in Table 2.
[0076] Table 2:
[0077]
[0078]
[0079] It should be noted that the user access rights list is not limited to the list structure shown in Table 1 and Table 2, that is, the mapping relationship between the first page permission address and the first page access rights identifier, the mapping relationship between the second page permission address and the second page access rights identifier, and the mapping relationship between the third page permission address and the third page access rights identifier, wherein the mapping relationship between other page permission addresses and page access rights identifiers can also be added according to actual needs, and this embodiment does not limit this. In the technical solution of this embodiment, by extracting the content of the interface configuration file, the button call function can be obtained, the first call page can be determined, and the mapping relationship between the first page permission address corresponding to the first call page and the first page access rights identifier is generated; when it is determined that there is a click action function that calls the button function, the second call page can be determined, and the mapping relationship between the second page permission address corresponding to the second call page and the second page access rights identifier is generated to form a user access rights list, realize automatic scanning and adding of the call page corresponding to the interface configuration file with access rights, and realize automatic interception of user unauthorized access.
[0080] It should also be noted that an embodiment of the present invention discloses a method for constructing a user access permission list, which is used to represent the mapping relationship between a page permission address and a page access permission identifier. As another optional method for representing the mapping relationship between a page permission address and a page access permission identifier in an embodiment of the present invention, a user access permission association tree may also be constructed. By extracting the content of the interface configuration file, a button call function is obtained, a first calling page associated with the button call function is determined, a first page access permission identifier of a first page permission address is generated, and a mapping relationship between the first page permission address and the page access permission identifier is established, thereby generating a user access permission association tree including a mapping relationship between at least one page permission address and a page access permission identifier.
[0081] S260: Obtain a page access request, parse the page access request, and obtain a user access token and a page request access address.
[0082] S270: Determine, according to the user access token, a user access permission identifier of the target user to which the page access request belongs.
[0083] S280. Determine the user access permission address of the target user according to the user access permission identifier and based on a pre-built user access permission list; the user access permission list stores a mapping relationship between at least one page access permission identifier and a page access permission address.
[0084] S290: According to the page request access address, based on the user access permission address, control the target user to access the page, wherein the user access permission address may be a permission address pre-assigned to the user for the page corresponding to the page access request.
[0085] The technical solution of the embodiment of the present invention obtains a button calling function by extracting the file content of an interface configuration file of a preset file type. It is determined that the button calling function has an associated calling page, and a mapping relationship between a page permission address and a page access permission identifier is established to generate a user access permission list. It is possible to obtain all pages that need to update access permissions, and establish a mapping relationship between page access permissions and page access permission addresses. Furthermore, it is also possible to implement real-time updating of the user's page access permissions, thereby solving the problem of unauthorized access that may occur when the user accesses a page.
[0086] Embodiment 3
[0087] Figure 3 This is a schematic diagram of the structure of a page access device provided by Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:
[0088] The access request acquisition module 310 is used to acquire a page access request, perform request parsing on the page access request, and obtain a user access token and a page request access address.
[0089] The access permission identification determination module 320 is used to determine the user access permission identification of the target user to which the page access request belongs according to the user access token.
[0090] The access permission address determination module 330 is used to determine the user access permission address of the target user according to the user access permission identifier and based on a pre-built user access permission list; the user access permission list stores a mapping relationship between at least one page access permission identifier and a page access permission address.
[0091] The control module 340 is used to control the target user to access the page according to the page request access address and based on the user access permission address.
[0092] Optionally, the access authority identification determination module 320 is specifically configured to:
[0093] Performing token authority verification on the user access token to obtain a token authority verification result;
[0094] If the token authority verification result passes, a token authority identification relationship comparison table is obtained; the token authority identification relationship comparison table stores a mapping relationship between a reference access token and a reference access authority identification of at least one reference user;
[0095] According to the user access token of the target user and based on the token authority identifier relationship comparison table, a target access authority identifier corresponding to the target access token is determined.
[0096] The device further includes: an access permission list construction module 350, which is used to:
[0097] Obtain an interface configuration file, and determine whether the file type of the interface configuration file is a preset file type;
[0098] If yes, extract the content of the interface configuration file to obtain the button calling function;
[0099] Determine a first calling page associated with the button calling function, and determine a first page authority address corresponding to the first calling page;
[0100] Generate a first page access permission identifier for the first page access permission address, and establish a mapping relationship between the first page access permission address and the first page access permission identifier;
[0101] A user access permission list including a mapping relationship between at least one page permission address and a page access permission identifier is generated.
[0102] Optionally, the access permission list construction module 350 is specifically used to:
[0103] Determine a first file name of a page file to which the first calling page belongs, and perform hash coding on the first file name to obtain a page code;
[0104] The page code is used as the first page access authority identifier of the first page access authority address of the calling page.
[0105] Furthermore, the access permission list construction module 350 is further configured to:
[0106] Determine whether there is a click action function that calls the button call function;
[0107] If yes, determining a second calling page associated with the click action function, and determining a second page authority address corresponding to the second calling page;
[0108] Determine a second file name of the file to which the second calling page belongs;
[0109] A page access permission identifier of the second page access permission address is generated according to the second file name and the click action function, and a mapping relationship between the second page access permission address and the second page access permission identifier is established.
[0110] Optionally, the page access module 340 is specifically used to:
[0111] If there is a user access permission address that is the same as the page request access address, then the target user has the page request access permission; or,
[0112] If there is no user access permission address that is the same as the page request access address, then the target user does not have the page request access permission.
[0113] The page access device provided in the embodiment of the present invention can execute the page access method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0114] Embodiment 4
[0115] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0116] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0117] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0118] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a page access method.
[0119] In some embodiments, the page access method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the page access method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the page access method in any other appropriate manner (e.g., by means of firmware).
[0120] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0121] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0122] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0123] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0124] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0125] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0126] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0127] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A page access method, characterized in that: include: Obtain a page access request, perform request parsing on the page access request, and obtain a user access token and a page request access address; Determine, based on the user access token, a user access permission identifier of a target user to which the page access request belongs; Determine the user access permission address of the target user according to the user access permission identifier and based on a pre-built user access permission list; The user permission access list stores a mapping relationship between at least one page permission access identifier and a page permission access address; According to the page request access address and based on the user access permission address, the target user is controlled to access the page.
2. The page access method according to claim 1, characterized in that: Determining the user access permission identifier of the target user to which the page access request belongs according to the user access token includes: Performing token authority verification on the user access token to obtain a token authority verification result; If the token authority verification result passes, a token authority identification relationship comparison table is obtained; the token authority identification relationship comparison table stores a mapping relationship between a reference access token and a reference access authority identification of at least one reference user; According to the user access token of the target user, based on the token authority identifier relationship comparison table, the user access authority identifier corresponding to the target access token is determined.
3. The page access method according to claim 1, characterized in that: The list of user access rights list is constructed as follows: Obtain an interface configuration file, and determine whether the file type of the interface configuration file is a preset file type; If yes, extract the content of the interface configuration file to obtain the button calling function; Determine a first calling page associated with the button calling function, and determine a first page authority address corresponding to the first calling page; Generate a first page access permission identifier for the first page access permission address, and establish a mapping relationship between the first page access permission address and the first page access permission identifier; A user access permission list including a mapping relationship between at least one page permission address and a page access permission identifier is generated.
4. The page access method according to claim 3, characterized in that: The step of generating the first page access permission identifier of the first page access permission address includes: Determine a first file name of a page file to which the first calling page belongs, and perform hash coding on the first file name to obtain a page code; The page code is used as the first page access authority identifier of the first page access authority address of the first calling page.
5. The page access method according to claim 3, characterized in that: After extracting the content of the interface configuration file to obtain the button calling function, the method further includes: Determine whether there is a click action function that calls the button call function; If yes, determining a second calling page associated with the click action function, and determining a second page authority address corresponding to the second calling page; Determine a second file name of the file to which the second calling page belongs; A page access permission identifier of the second page access permission address is generated according to the second file name and the click action function, and a mapping relationship between the second page access permission address and the second page access permission identifier is established.
6. The page access method according to claim 1, characterized in that: The controlling the target user to access the page based on the user access permission address according to the page request access address includes: If there is a user access permission address that is the same as the page request access address, then the target user has the page request access permission; or, If there is no user access permission address that is the same as the page request access address, then the target user does not have the page request access permission.
7. A page access device, characterized in that: include: An access request acquisition module is used to acquire a page access request, perform request parsing on the page access request, and obtain a user access token and a page request access address; An access rights identification determination module, used to determine the user access rights identification of the target user to which the page access request belongs according to the user access token; an access permission address determination module, configured to determine the user access permission address of the target user according to the user access permission identifier and based on a pre-built user access permission list; the user access permission list stores a mapping relationship between at least one page access permission identifier and a page access permission address; The control module is used to control the target user to access the page based on the page request access address and the user access permission address.
8. 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 a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the page access method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the page access method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the page access method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Micro-service access method, device and equipment and storage medium
CN112615849A
Page data processing method, device and system, equipment and medium
CN114254236A
Authority management method and device, equipment and medium
CN114978601A
Trusted internet identity
US20090178123A1
