CN115842673A - Method and device for updating local authority information of client - Google Patents

Method and device for updating local authority information of client Download PDF

Info

Publication number
CN115842673A
CN115842673A CN202211485196.9A CN202211485196A CN115842673A CN 115842673 A CN115842673 A CN 115842673A CN 202211485196 A CN202211485196 A CN 202211485196A CN 115842673 A CN115842673 A CN 115842673A
Authority
CN
China
Prior art keywords
client
server
communication connection
user
authority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211485196.9A
Other languages
Chinese (zh)
Inventor
杨旭东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202211485196.9A priority Critical patent/CN115842673A/en
Publication of CN115842673A publication Critical patent/CN115842673A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the specification provides a method and a device for updating local authority information of a client. The cache server is arranged between the client and the server and used for caching page content according to the user permission group and processing a page request from the client. In the method, a server establishes communication connection with a client, wherein the communication connection does not pass through a cache server and is used for direct communication between the server and the client; the server responds to the user permission update aiming at the client and sends the updated user permission to the client through communication connection; and the client updates the local user authority information according to the received user authority.

Description

Method and device for updating local authority information of client
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a method and a device for updating local authority information of a client.
Background
Varnish is a caching server applied between a client and a server, and the Varnish can cache page contents of the server. In addition, varnish can also be used as a reverse proxy, and when a client sends a page request, the page request is sent to the Varnish instead of being directly sent to a server. And the Varnish feeds back the requested page content to the client according to the page request.
Under the Varnish-based caching mechanism, all page requests from the client for page browsing are processed through Varnish, and especially under the condition of large concurrency, the pressure of a server can be greatly reduced.
Disclosure of Invention
In view of the foregoing, embodiments of the present specification provide a method and an apparatus for updating local authority information of a client. According to the technical scheme of the embodiment of the specification, under the condition that the cache server is arranged between the client and the server, the local user authority of the client can be updated according to the updated user authority in the server through the established communication connection between the server and the client, so that the user authorities of the client and the server are kept consistent.
According to an aspect of the embodiments of the present specification, there is provided a method for updating local authority information of a client, where a cache server is disposed between the client and the server, and the cache server is configured to cache page content according to a user authority group and process a page request from the client, the method including: the server establishes communication connection with the client, wherein the communication connection does not pass through the cache server and is used for direct communication between the server and the client; the server responds to the user authority update aiming at the client and sends the updated user authority to the client through the communication connection; and the client updates local user authority information according to the received user authority.
According to another aspect of the embodiments of the present specification, there is also provided a method for updating local authority information of a client, where the method is performed by a server, a cache server is disposed between the server and the client, and the cache server is configured to cache page content according to a user authority group and process a page request from the client, and the method includes: establishing a communication connection with the client, wherein the communication connection does not pass through the cache server and is used for direct communication between the server and the client; and responding to the user permission update aiming at the client, and sending the updated user permission to the client through the communication connection so that the client updates local user permission information according to the received user permission.
According to another aspect of the embodiments of the present specification, there is also provided a method for updating local authority information of a client, where the method is performed by the client, and a cache server is disposed between the client and the server, and is configured to cache page content according to a user authority group and process a page request from the client, and the method includes: establishing a communication connection with the server, wherein the communication connection does not pass through the cache server and is used for direct communication between the server and the client; receiving, over the communication connection, an updated user right sent by the server in response to the user right update for the client; and updating the local user authority information according to the received user authority.
According to another aspect of the embodiments of the present specification, there is also provided an apparatus for updating local authority information of a client, where the apparatus is applied to a server, a cache server is disposed between the server and the client, and the cache server is configured to cache page content according to a user authority group and process a page request from the client, and the apparatus includes: a communication connection establishing unit that establishes a communication connection with the client, wherein the communication connection does not pass through the cache server and is used for direct communication between the server and the client; and the information sending unit responds to the user authority update aiming at the client and sends the updated user authority to the client through the communication connection so that the client updates the local user authority information according to the received user authority.
According to another aspect of the embodiments of the present specification, there is also provided an apparatus for updating local authority information of a client, where the apparatus is applied to a client, a cache server is disposed between the client and a server, and the cache server is configured to cache page content according to a user authority group and process a page request from the client, and the apparatus includes: a communication connection establishing unit, configured to establish a communication connection with the server, where the communication connection does not pass through the cache server and is used for direct communication between the server and the client; an information receiving unit that receives the updated user right sent by the server in response to the user right update for the client through the communication connection; and the information updating unit is used for updating the local user authority information according to the received user authority.
According to another aspect of embodiments herein, there is also provided an electronic device, including: at least one processor, a memory coupled to the at least one processor, and a computer program stored on the memory, the at least one processor executing the computer program to implement a method for updating local rights information of a client as described in any of the above.
According to another aspect of embodiments of the present specification, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method for updating local rights information of a client as described above.
According to another aspect of embodiments of the present specification, there is also provided a computer program product, including a computer program, which when executed by a processor implements the method for updating local rights information of a client as described in any one of the above.
Drawings
A further understanding of the nature and advantages of the contents of the embodiments of the present specification may be realized by reference to the following drawings. In the drawings, similar components or features may have the same reference numerals.
Fig. 1 is a schematic diagram illustrating an example of an application scenario of a server and a client according to an embodiment of the present specification.
Fig. 2 is a schematic diagram illustrating another example of an application scenario of a server and a client according to an embodiment of the present specification.
Fig. 3 is a flowchart illustrating an example of a method for updating local rights information of a client according to an embodiment of the present specification.
Fig. 4 is a flowchart illustrating another example of a method for updating local rights information of a client according to an embodiment of the present description.
Fig. 5 is a flowchart illustrating another example of a method for updating local rights information of a client according to an embodiment of the present specification.
Fig. 6 is a block diagram illustrating an example of an apparatus for updating local rights information of a client according to an embodiment of the present specification.
Fig. 7 is a block diagram illustrating an example of an apparatus for updating local rights information of a client according to an embodiment of the present specification.
Fig. 8 is a block diagram illustrating an electronic device for implementing a local rights information updating method of a client according to an embodiment of the present specification.
Fig. 9 is a block diagram illustrating an electronic device for implementing a local rights information updating method of a client according to an embodiment of the present specification.
Detailed Description
The subject matter described herein will be discussed with reference to example embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and thereby implement the subject matter described herein, and are not intended to limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements discussed without departing from the scope of the embodiments of the disclosure. Various examples may omit, substitute, or add various procedures or components as needed. In addition, features described with respect to some examples may also be combined in other examples.
As used herein, the term "include" and its variants mean open-ended terms, meaning "including but not limited to. The term "based on" means "based at least in part on". The terms "one embodiment" and "an embodiment" mean "at least one embodiment". The term "another embodiment" means "at least one other embodiment". The terms "first," "second," and the like may refer to different or the same object. Other definitions, whether explicit or implicit, may be included below. The definition of a term is consistent throughout the specification unless the context clearly dictates otherwise.
Varnish is a caching server applied between a client and a server, and the Varnish can cache page contents of the server. In addition, varnish can also be used as a reverse proxy, and when a client sends a page request, the page request is sent to the Varnish instead of being directly sent to a server. And the Varnish feeds back the requested page content to the client according to the page request.
Under the Varnish-based caching mechanism, all page requests of page browsing from a client are processed through the Varnish, and especially under the condition of large concurrency, the pressure of a server can be greatly reduced.
However, after the server updates the user permission, only the database and the interface which can be updated synchronously exist, and the local user permission of the corresponding client cannot be updated, so that the original user permission which is sent when the client requests the cache server for the web page content and is still not updated is sent, and the cache server feeds back the web page content which is also not updated to the client according to the original user permission.
In view of the foregoing, the present specification provides a method and an apparatus for updating local authority information of a client. In the method, a cache server is arranged between a client and a server, the cache server is used for caching page content according to a user permission group and processing a page request from the client, and the server establishes communication connection with the client, wherein the communication connection does not pass through the cache server and is used for direct communication between the server and the client; the server responds to the user permission update aiming at the client and sends the updated user permission to the client through communication connection; and the client updates the local user authority information according to the received user authority. According to the technical scheme of the embodiment of the specification, under the condition that the cache server is arranged between the client and the server, the local user authority of the client can be updated according to the updated user authority in the server through the established communication connection between the server and the client, so that the user authorities of the client and the server are kept consistent.
The following describes in detail a method and an apparatus for updating local rights information of a client according to an embodiment of the present disclosure with reference to the drawings.
Fig. 1 shows a schematic diagram of an example 100 of an application scenario of a server and a client according to an embodiment of the present description.
As shown in fig. 1, a cache server may be disposed between the client and the server, and in one example, the cache server may include Varnish or the like. In embodiments of the present description, a cache server may be used to provide a page caching proxy service, i.e., a page content cache that may be provided by a server to a client. In one caching approach, the cache server may store the page content in packets. The grouping basis can be user authority, the user authorities corresponding to different groups can be different, and users with the same user authority can see the same page content, so that the users with the same user authority can belong to the same group. For example, the user right may include a general user, an administrator, a version owner, and the like, wherein the general user only has a browsing right for the page content, and the administrator user has a browsing and editing right for the page content.
In the application scenario of the server and the client, the cache server can also be used as a reverse proxy. When a client requests to browse a page, the client can send a page request to the cache server. The cache server retrieves the requested page content from the cache and sends it to the client so that the client can access the requested page.
In one approach of the reverse proxy, the cache server may cache page content in groups according to user permissions, and the page request sent by the client includes the user permissions of the requested users. After receiving the page request, the cache server can determine a user permission group in the cache corresponding to the user permission of the requesting user, acquire the requested page content from the determined user permission group, and feed the page content back to the client.
Fig. 2 shows a schematic diagram of another example 200 of an application scenario of a server and a client according to an embodiment of the present specification.
As shown in fig. 2, the cache server may include a plurality of caches, such as cache 1, cache 2, and cache 3, each of which may serve as a user right group, and each of which is used to store page contents with different user rights. A first routing device may be disposed between the cache server and the client, and the first routing device is configured to distribute the page request sent by the client. After receiving the page request sent by the client, the first routing device may distribute the page request to a corresponding cache in the cache server according to the user permission in the page request.
In addition, a second routing device may be disposed between the cache server and the server, and the second routing device may be applied to a service layer, and is configured to route information of the service layer. In one example, the first routing device and the second routing device may each comprise Nginx, or the like.
In one example, embodiments of the present specification can be applied in the application scenario of MediaWiki. The functionality provided by embodiments of the present description may be implemented via plug-ins that may be applied to various Wiki projects, wiki websites, and home pages based on MediaWiki, among others.
Fig. 3 shows a flowchart of an example 300 of a method for updating local rights information of a client according to an embodiment of the present description.
As shown in fig. 3, at 310, a server may establish a communication connection with a client.
In this embodiment of the present specification, a communication connection between the server and the client may not pass through the cache server, and may be used for direct communication between the server and the client, where the communication connection may include WebSocket and the like, and the present specification takes WebSocket as an example for description. In one way of establishing a communication connection, a one-to-one Socket long-link communication pipe may be established with the client through a binding listening Socket.
In one example, the server may establish a communication connection with the client in response to a login operation of the client. The login interface of the client does not need a cache server for caching, so the login operation of the client can directly communicate with the server without passing through the cache server. When the client performs login operation, the server can establish communication connection with the client.
In another example, after the client logs in, when the client performs other operations without going through the cache server, the client may also communicate directly with the server, so that the server may establish a communication connection with the client.
In this specification, the server may establish a communication connection with each client, so that each client may correspond to one communication connection.
In one example, after the server establishes a communication connection with the client, the server may determine a connection identification for the established communication connection. The communication connection corresponds to the connection identifier one by one, and the connection identifiers corresponding to different communication connections are different. The connection identification of the respective communication connection can be used to distinguish it from other communication connections.
In addition, the connection identifiers may also correspond to the clients one to one, and the connection identifiers corresponding to different clients may be different. Thus, the connection identifications may also be used to associate communication connections with clients, each connection identification may uniquely represent a communication connection and a client, respectively.
In one example, the client has a user identification, and the user identification of each client may uniquely represent the client. The User Identification may include UID (User Identification) and the like. In this example, the connection identification of each communication connection may be used to associate the communication connection with the user identification of the connected client.
In one example, the connection identification of each communication connection may be derived from a user identification of the client to which the communication is connected.
In one way of determining the connection identifier, after the communication connection between the server and the client is established, the client may send the local user identifier to the server through the communication connection, so that the server may obtain the user identifier of the client connected to the communication connection. The server may then determine the user identity as a connection identity for the communication connection. By the determination mode, the user identification can be directly used as the connection identification of the communication connection, so that the communication connection can be more intuitively associated with the client.
In another determination manner of the connection identifier, after obtaining the user identifier of the client connected to the communication connection, the server may perform calculation processing on the user identifier to obtain a corresponding connection identifier. The calculation method may obtain a unique connection identifier from the input user identifier, and the calculation method applied may include a hash algorithm and the like. For example, the user identifier is hashed to obtain a unique hash value, which can be used as a unique connection identifier.
In one example, after establishing the communication connection between the server and the client, the communication connection may be maintained normal for a specified period of time, such that direct communication between the server and the client over the communication connection is enabled for the specified period of time. In addition, the communication connection can be kept normal all the time, so that the server and the client can always perform direct communication through the communication connection.
In this example, the server may perform heartbeat detection on the communication connection at specified intervals to determine that the communication connection is normal. The specified duration can be set by a user, for example, heartbeat detection can be performed every 3 minutes.
When performing heartbeat detection, the server may send a heartbeat packet to the client through the communication connection, where the heartbeat packet may include information such as a user identifier of the client, a connection identifier of the communication connection, and a sending time. After receiving the heartbeat packet, the client may return a fixed message to the server through the communication connection, where the fixed message may be a predefined message, and for example, may include a user identifier or any identifier of the client. After receiving the fixed information sent by the client, the server can determine that the communication connection is normal.
The heartbeat detection may be performed by running a heartbeat detection script set in the server. After establishing the communication connection, the server may notify the heartbeat detection script to record the communication connection, and the recording mode may include recording a connection identifier of the communication connection.
After establishing the communication connection, the server may send the updated user permissions to the client over the communication connection in response to the user permissions update for the client at 320.
In the embodiment of the present specification, the user right of the client may be modified, for example, the user may be a station leader or other user who is given modification right can modify the user right. When the user with the modification authority performs the user authority modification operation, the modified user authority information may be sent to the server, where the modified user authority information may include the user authority before modification, the user authority after modification, and the like. The server may update the stored user permission accordingly according to the modified user permission information, for example, if an ordinary user is upgraded to an administrator user, the user permission corresponding to the user identifier updated by the server is the permission of the administrator user. And when the server is updated, the user rights at the database, each interface and the like are correspondingly updated.
In addition, the server may send the updated user permissions to the client over the communication connection. And the user to which the updated user authority belongs, the user associated with the connection identifier of the communication connection and the user represented by the user identifier of the client all point to the same user.
In one example, the server may establish a plurality of communication connections, each communication connection corresponding to a connection identifier for distinguishing from other communication connections, which may be derived from a user identifier of a connected client.
The server may determine, in response to the user right update for the client, a user identifier corresponding to the updated user right, where the user identifier may point to the client that needs to update the user right. Then, the server can determine a communication connection for connecting the client corresponding to the user identification from the plurality of established communication connections according to the user identification.
In one determination manner, when the connection identifier of each communication connection is the user identifier of the connected client, the server may screen out a communication connection corresponding to the determined user identifier from the plurality of communication connections.
After determining the communication connection, the server may send the updated user permission to the connected client via the determined communication connection.
After the client receives the user right sent by the client, the client may update the local user right information according to the received user right at 330.
In this embodiment of the present specification, the locally stored user right information is used to characterize the user right that the client has, and the user rights are different, and the content of the page accessed when requesting to access the page may be different.
The client may override the old user permissions local to the client with the new user permissions received, which may allow the client to request pages with the new user permissions. In one updating method, the client may update the cookie in the local browser according to the received new user permission, so that in the subsequent page request, the browser may request the page by using the new cookie.
In one example, after the client updates the local user right information, the client has a new user right after the update. Therefore, when the page is requested, the page request carrying the updated user authority information can be sent to the cache server. The cache server can determine the user authority according to the user authority information in the page request, then determine the user authority group matched with the user authority in different user authority groups, acquire the corresponding page content from the determined user authority group, and feed back the acquired page content to the client, so that the client can display the page content.
According to the technical scheme of the embodiment of the specification, under the condition that the cache server is arranged between the client and the server, the local user authority of the client can be updated according to the updated user authority in the server through the established communication connection between the server and the client, so that the user authorities of the client and the server are kept consistent. Therefore, when the client requests the page, the page can be requested by the new user authority, and the page corresponding to the new user authority can be successfully accessed.
Fig. 4 shows a flowchart of another example 400 of a method for updating local rights information of a client according to an embodiment of the present description. The example shown in fig. 4 may be performed by a server, between which a cache server is disposed, the cache server being configured to cache page contents according to a user right group and process a page request from a client.
As shown in fig. 4, at 410, a communication connection may be established with the client. Wherein, the communication connection can be used for direct communication between the server and the client without passing through the cache server.
At 420, in response to the user right update for the client, the updated user right may be sent to the client over the communication connection, so that the client updates the local user right information according to the received user right.
In one example, the server may determine a connection identification for the communication connection, which may be used to associate the communication connection with a user identification of the client.
In one example, a server may receive a locally stored user identification sent by a client over a communication connection; and determining the user identity as a connection identity of the communication connection.
In one example, in response to a user right update for a client, a user identification corresponding to the updated user right may be determined; determining a communication connection for connecting a client corresponding to the user identifier from the plurality of established communication connections according to the user identifier; and sending the updated user right to the connected client through the determined communication connection.
In one example, the server performs heartbeat detection on the communication connection every specified time interval to determine that the communication connection is normal.
In one example, the server may establish a communication connection with the client in response to a login operation of the client.
Fig. 5 shows a flowchart of another example 500 of a method for updating local rights information of a client according to an embodiment of the present description. The example shown in fig. 5 may be performed by a client, and a cache server is disposed between the client and the server, and is used for caching page content according to a user permission group and processing a page request from the client.
As shown in fig. 5, at 510, a communication connection may be established with a server. Wherein the communication connection does not pass through the caching server and is used for direct communication between the server and the client.
At 520, the updated user permissions sent by the server in response to the user permission update for the client may be received over the communication connection.
At 530, local user rights information is updated based on the received user rights.
In one example, the client may send a local user identification to the server over the communication connection, so that the server may determine the user identification as the connection identification of the communication connection.
In one example, the client may perform heartbeat detection on the communication connection with the server at a specified interval to determine that the communication connection is normal.
In one example, the client may send a page request carrying updated user permission information to the cache server; and receiving page content corresponding to the user permission information returned by the cache server according to the user permission information in the page request.
Fig. 6 is a block diagram illustrating an example of an apparatus (information updating apparatus 600) for updating local right information of a client according to an embodiment of the present specification.
The information updating apparatus 600 may be applied to a server, between which a cache server is disposed, for caching page content according to a user right group and processing a page request from a client. The information updating apparatus 600 includes: a communication connection establishing unit 610 and an information transmitting unit 620.
The communication connection establishing unit 610 may be configured to establish a communication connection with the client, where the communication connection does not pass through the caching server and is used for direct communication between the server and the client.
The information sending unit 620 may be configured to respond to the user right update for the client, and send the updated user right to the client through the communication connection, so that the client updates the local user right information according to the received user right.
In one example, the communication connection establishing unit 610 may be further configured to: a connection identity is determined for the communication connection, which may be used to associate the communication connection with a user identity of the client.
In one example, the communication connection establishing unit 610 may be further configured to: receiving a locally stored user identifier sent by a client through communication connection; and determining the user identity as a connection identity of the communication connection.
In one example, the information sending unit 620 may be further configured to: in response to a user right update for the client, a user identifier corresponding to the updated user right may be determined; determining a communication connection for connecting a client corresponding to the user identifier from the plurality of established communication connections according to the user identifier; and sending the updated user right to the connected client through the determined communication connection.
In one example, the information updating apparatus 600 may further include: a heartbeat detection unit, which may be configured to: and carrying out heartbeat detection on the communication connection at a specified time interval so as to determine that the communication connection is normal.
In one example, the communication connection establishing unit 610 may be further configured to: and responding to the login operation of the client, and establishing communication connection with the client.
Fig. 7 is a block diagram illustrating an example of an apparatus (information updating apparatus 700) for updating local right information of a client according to an embodiment of the present specification.
The information updating apparatus 700 may be applied to a client, and a cache server is disposed between the client and the server, and is configured to cache page content according to a user permission group and process a page request from the client. The information updating apparatus 700 includes: a communication connection establishing unit 710, an information receiving unit 720, and an information updating unit 730.
The communication connection establishing unit 710 may be configured to establish a communication connection with the server, where the communication connection does not pass through the caching server and is used for direct communication between the server and the client.
The information receiving unit 720 may be configured to receive the updated user right transmitted by the server in response to the user right update for the client through the communication connection.
The information updating unit 730 may be configured to update the local user authority information according to the received user authority.
In one example, the information updating apparatus 700 may further include: an information transmitting unit, which may be configured to: the local subscriber identity is transmitted to the server via the communication connection, so that the server can determine the subscriber identity as a connection identity of the communication connection.
In one example, the information updating apparatus 700 may further include: a heartbeat detection unit, which may be configured to: and carrying out heartbeat detection on the communication connection at a specified time interval with the server so as to determine that the communication connection is normal.
In one example, the information transmitting unit may be configured to: and sending the page request carrying the updated user permission information to a cache server. The information receiving unit 720 may be further configured to: and receiving page content corresponding to the user permission information returned by the cache server according to the user permission information in the page request.
Embodiments of a method and an apparatus for updating local rights information of a client according to an embodiment of the present specification are described above with reference to fig. 1 to 7.
The device for updating the local authority information of the client in the embodiments of the present specification may be implemented by hardware, or may be implemented by software, or a combination of hardware and software. The software implementation is taken as an example, and is formed by reading corresponding computer program instructions in the storage into the memory for operation through the processor of the device where the software implementation is located as a logical means. In the embodiment of the present specification, the means for updating the local authority information of the client may be implemented by an electronic device, for example.
Fig. 8 shows a block diagram of an electronic device 800 for implementing a local rights information updating method of a client according to an embodiment of the present specification.
As shown in fig. 8, electronic device 800 may include at least one processor 810, storage (e.g., non-volatile storage) 820, memory 830, and communication interface 840, and the at least one processor 810, storage 820, memory 830, and communication interface 840 are coupled together via a bus 850. The at least one processor 810 executes at least one computer-readable instruction (i.e., the elements described above as being implemented in software) stored or encoded in memory.
In one embodiment, computer-executable instructions are stored in the memory that, when executed, cause the at least one processor 810 to: establishing communication connection with a client, wherein the communication connection does not pass through a cache server and is used for direct communication between the server and the client; and responding to the user permission update aiming at the client, and sending the updated user permission to the client through communication connection so that the client updates the local user permission information according to the received user permission.
Fig. 9 illustrates a block diagram of an electronic device 900 for implementing a local rights information updating method of a client according to an embodiment of the present specification.
As shown in fig. 9, the electronic device 900 may include at least one processor 910, a storage (e.g., non-volatile storage) 920, a memory 930, and a communication interface 940, and the at least one processor 910, the storage 920, the memory 930, and the communication interface 940 are connected together via a bus 950. The at least one processor 910 executes at least one computer-readable instruction (i.e., the elements described above as being implemented in software) stored or encoded in memory.
In one embodiment, computer-executable instructions are stored in the memory that, when executed, cause the at least one processor 910 to: establishing a communication connection with a server, wherein the communication connection does not pass through a cache server and is used for direct communication between the server and a client; receiving, by the server, the updated user permissions sent in response to the user permission update for the client over the communication connection; and updating the local user authority information according to the received user authority.
It should be appreciated that the computer-executable instructions stored in the memory, when executed, cause the at least one processor 810 or processor 910 to perform the various operations and functions described above in connection with fig. 1-7 in the various embodiments of the present description.
According to one embodiment, a program product, such as a machine-readable medium, is provided. A machine-readable medium may have instructions (i.e., elements described above as being implemented in software) that, when executed by a machine, cause the machine to perform various operations and functions described above in connection with fig. 1-7 in the various embodiments of the present specification.
Specifically, a system or apparatus may be provided which is provided with a readable storage medium on which software program code implementing the functions of any of the above embodiments is stored, and which causes a computer or processor of the system or apparatus to read out and execute the instructions stored in the readable storage medium.
In this case, the program code itself read from the readable medium can realize the functions of any of the above-described embodiments, and thus the machine-readable code and the readable storage medium storing the machine-readable code form part of the present invention.
Computer program code required for the operation of various portions of the present specification may be written in any one or more programming languages, including an object oriented programming language such as Java, scala, smalltalk, eiffel, JADE, emerald, C + +, C #, VB, NET, python, and the like, a conventional programming language such as C, visual Basic 2003, perl, COBOL2002, PHP, and ABAP, a dynamic programming language such as Python, ruby, and Groovy, or other programming languages. The program code may execute on the user's computer, or on the user's computer as a stand-alone software package, or partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any network format, such as a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet), or in a cloud computing environment, or as a service, such as a software as a service (SaaS).
Examples of the readable storage medium include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-Rs, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs), magnetic tapes, nonvolatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer or from the cloud via a communications network.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Not all steps and elements in the above flows and system structure diagrams are necessary, and some steps or elements may be omitted according to actual needs. The execution order of the steps is not fixed, and can be determined as required. The apparatus structures described in the above embodiments may be physical structures or logical structures, that is, some units may be implemented by the same physical entity, or some units may be implemented by a plurality of physical entities, or some units may be implemented by some components in a plurality of independent devices.
The term "exemplary" used throughout this specification means "serving as an example, instance, or illustration," and does not mean "preferred" or "advantageous" over other embodiments. The detailed description includes specific details for the purpose of providing an understanding of the described technology. However, the techniques may be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form in order to avoid obscuring the concepts of the described embodiments.
Alternative embodiments of the present disclosure are described in detail above with reference to the drawings, however, the embodiments of the present disclosure are not limited to the specific details of the embodiments, and within the technical idea of the embodiments of the present disclosure, many simple modifications may be made to the technical solution of the embodiments of the present disclosure, and these simple modifications all belong to the protection scope of the embodiments of the present disclosure.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the scope of the disclosure. Thus, the description is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (14)

1. A method for updating local authority information of a client, wherein a cache server is arranged between the client and the server, the cache server is used for caching page content according to a user authority group and processing page requests from the client,
the method comprises the following steps:
the server establishes communication connection with the client, wherein the communication connection does not pass through the cache server and is used for direct communication between the server and the client;
the server responds to the user authority update aiming at the client and sends the updated user authority to the client through the communication connection; and
and the client updates local user authority information according to the received user authority.
2. The method of claim 1, wherein after the server establishes the communication connection with the client, the method further comprises:
and the server determines a connection identifier for the communication connection, wherein the connection identifier is used for associating the communication connection with the user identifier of the client.
3. The method of claim 2, wherein the server determining a connection identification for the communication connection comprises:
the client side sends the local user identification to the server through the communication connection; and
and the server determines the user identification as the connection identification of the communication connection.
4. The method of claim 1, wherein the server, in response to the user right update for the client, sending the updated user right to the client over the communication connection comprises:
the server responds to the user authority update aiming at the client and determines the user identification corresponding to the updated user authority;
the server determines a communication connection for connecting a client corresponding to the user identifier from the plurality of established communication connections according to the user identifier; and
and the server sends the updated user authority to the connected client through the determined communication connection.
5. The method of claim 1, wherein after the server establishes the communication connection with the client, the method further comprises:
and the server performs heartbeat detection on the communication connection at every interval of specified duration so as to determine that the communication connection is normal.
6. The method of claim 1, wherein the server establishing a communication connection with the client comprises:
and the server responds to the login operation of the client and establishes communication connection with the client.
7. The method of claim 1, further comprising:
the client sends the page request carrying the updated user permission information to the cache server; and
and the cache server returns the page content corresponding to the user permission information to the client according to the user permission information in the page request.
8. A method for updating local authority information of a client, wherein the method is executed by a server, a cache server is arranged between the server and the client, the cache server is used for caching page content according to a user authority group and processing page requests from the client,
the method comprises the following steps:
establishing a communication connection with the client, wherein the communication connection does not pass through the cache server and is used for direct communication between the server and the client; and
and responding to the user permission update aiming at the client, and sending the updated user permission to the client through the communication connection so that the client updates the local user permission information according to the received user permission.
9. A method for updating local authority information of a client, wherein the method is executed by the client, a cache server is arranged between the client and the server, the cache server is used for caching page content according to a user authority group and processing page requests from the client,
the method comprises the following steps:
establishing a communication connection with the server, wherein the communication connection does not pass through the cache server and is used for direct communication between the server and the client;
receiving, over the communication connection, the updated user permissions sent by the server in response to the user permission update for the client; and
and updating the local user authority information according to the received user authority.
10. A device for updating local authority information of a client, wherein the device is applied to a server, a cache server is arranged between the server and the client, the cache server is used for caching page content according to a user authority group and processing a page request from the client,
the device comprises:
a communication connection establishing unit that establishes a communication connection with the client, wherein the communication connection does not pass through the cache server and is used for direct communication between the server and the client; and
and the information sending unit responds to the user authority update aiming at the client and sends the updated user authority to the client through the communication connection so that the client updates the local user authority information according to the received user authority.
11. A device for updating local authority information of a client, wherein the device is applied to the client, a cache server is arranged between the client and the server and used for caching page content according to a user authority group and processing a page request from the client,
the device comprises:
a communication connection establishing unit, configured to establish a communication connection with the server, where the communication connection does not pass through the cache server and is used for direct communication between the server and the client;
an information receiving unit that receives the updated user right sent by the server in response to the user right update for the client through the communication connection; and
and the information updating unit is used for updating the local user authority information according to the received user authority.
12. An electronic device, comprising: at least one processor, a memory coupled with the at least one processor, and a computer program stored on the memory, the at least one processor executing the computer program to implement the method of claim 8 or 9.
13. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to claim 8 or 9.
14. A computer program product comprising a computer program which, when executed by a processor, implements the method of claim 8 or 9.
CN202211485196.9A 2022-11-24 2022-11-24 Method and device for updating local authority information of client Pending CN115842673A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211485196.9A CN115842673A (en) 2022-11-24 2022-11-24 Method and device for updating local authority information of client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211485196.9A CN115842673A (en) 2022-11-24 2022-11-24 Method and device for updating local authority information of client

Publications (1)

Publication Number Publication Date
CN115842673A true CN115842673A (en) 2023-03-24

Family

ID=85577314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211485196.9A Pending CN115842673A (en) 2022-11-24 2022-11-24 Method and device for updating local authority information of client

Country Status (1)

Country Link
CN (1) CN115842673A (en)

Similar Documents

Publication Publication Date Title
JP7222036B2 (en) Model training system and method and storage medium
CN108810006B (en) Resource access method, device, equipment and storage medium
US10880287B2 (en) Out of box experience application API integration
CN103023918B (en) The mthods, systems and devices logged in are provided for multiple network services are unified
US20140122684A1 (en) Early access to user-specific data for behavior prediction
CN107948203A (en) A kind of container login method, application server, system and storage medium
KR20160083930A (en) Method and system for determining whether a terminal logging into a website is a mobile terminal
CN108289098B (en) Authority management method and device of distributed file system, server and medium
WO2015143855A1 (en) Method, apparatus and system for accessing data resources
US9015817B2 (en) Resilient and restorable dynamic device identification
CN111241555B (en) Access method and device for simulating user login, computer equipment and storage medium
US11163499B2 (en) Method, apparatus and system for controlling mounting of file system
US10659443B2 (en) Methods and apparatus for obtaining a scoped token
CN110708335A (en) Access authentication method and device and terminal equipment
US10951510B2 (en) Communication device and communication method
CN108429785A (en) A kind of generation method, reptile recognition methods and the device of reptile identification encryption string
CN108737398B (en) Processing method and device of trust system, computer equipment and storage medium
JP5179298B2 (en) Access authorization system, access control server, and business process execution system
CN114268462A (en) Asset information changing method, server, client and storage medium
CN111083093A (en) Method and device for calling terminal capability
CN114301678B (en) Data access method and device, electronic equipment and storage medium
US11075922B2 (en) Decentralized method of tracking user login status
CN111294337A (en) Token-based authentication method and device
CN112818371A (en) Resource access control method, system, device, equipment and medium
CN111881397A (en) Method and system for adding access control to static page

Legal Events

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