CN117785822A - Document locking method, device, equipment and storage medium - Google Patents

Document locking method, device, equipment and storage medium Download PDF

Info

Publication number
CN117785822A
CN117785822A CN202311816406.2A CN202311816406A CN117785822A CN 117785822 A CN117785822 A CN 117785822A CN 202311816406 A CN202311816406 A CN 202311816406A CN 117785822 A CN117785822 A CN 117785822A
Authority
CN
China
Prior art keywords
document
access token
request
assertion
server
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
CN202311816406.2A
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.)
Shanghai Eisoo Information Technology Co Ltd
Original Assignee
Shanghai Eisoo Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Eisoo Information Technology Co Ltd filed Critical Shanghai Eisoo Information Technology Co Ltd
Priority to CN202311816406.2A priority Critical patent/CN117785822A/en
Publication of CN117785822A publication Critical patent/CN117785822A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a document locking method, a device, equipment and a storage medium. The method comprises the following steps: sending an assertion request to a server so that the server determines assertion according to the identification information of the multi-user online editor carried by the assertion request; receiving an assertion sent by a server, and sending an access token request and the assertion to the server so that the server generates an access token according to the access token request and the assertion; receiving an access token sent by a server, wherein the access token carries identification information and user information of a multi-user online editor; according to the technical scheme of the invention, the effect that other editing tools cannot edit the document in the process that one or more users use the multi-user online editor can be achieved.

Description

Document locking method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a document locking method, a device, equipment and a storage medium.
Background
Multiple users in the AnyShare system have editing rights to the same document. A user with editing authority can initiate a request for editing the document to a server through a client. When a user wants to edit a document, but does not want to edit other people, a client corresponding to the user sends a document lock request to a server, and after the server receives the document lock request, the server analyzes access token information in the document lock request to obtain user information, so that the user becomes a locker of the document.
Because the current document locking scheme only enables one user to become a document locker, when the first user uses the multi-user online editor to edit a document, if the first user becomes the document locker, the later user enters the multi-user online editor to edit, the situation of failure in storage occurs, and the multi-user online editor is not available.
Disclosure of Invention
The embodiment of the invention provides a document locking method, a device, equipment and a storage medium, which can solve the problem that the multi-user online editor is unavailable because the existing multi-user online editor can only enable one user to be a locker of a document, and further causes the situation that other users enter the multi-user online editor to edit, and other editing tools cannot edit the document in the process of using the multi-user online editor by one or more users.
According to an aspect of the present invention, there is provided a document locking method including:
sending an assertion request to a server so that the server determines assertion according to the identification information of the multi-user online editor carried by the assertion request;
receiving an assertion sent by a server, and sending an access token request and the assertion to the server so that the server generates an access token according to the access token request and the assertion;
receiving an access token sent by a server, wherein the access token carries identification information and user information of a multi-user online editor;
and sending a document locking request to the server according to the access token, so that the server locks the document to be locked according to the document identification to be locked carried by the document locking request and the access token.
According to another aspect of the present invention, there is provided a document locking method including:
receiving an assertion request sent by a client, wherein the assertion request carries identification information of a multi-user online editor;
determining assertion according to the identification information of the multi-user online editor;
receiving an access token request and assertion sent by a client, and generating an access token according to the access token request and assertion;
The access token is sent to a client, wherein the access token carries identification information and user information of a multi-user online editor;
and receiving a document locking request sent by the client, and locking the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
According to another aspect of the present invention, there is provided a document locking apparatus including:
the system comprises an assertion request sending module, an assertion request sending module and a server, wherein the assertion request sending module is used for sending an assertion request to the server so that the server can determine assertion according to the identification information of the multi-user online editor carried by the assertion request;
the assertion receiving module is used for receiving the assertion sent by the server and sending the access token request and the assertion to the server so that the server generates an access token according to the access token request and the assertion;
the access token receiving module is used for receiving the access token sent by the server, wherein the access token carries the identification information and the user information of the multi-user online editor;
and the document locking request sending module is used for sending a document locking request to the server according to the access token so that the server locks the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
According to another aspect of the present invention, there is provided a document locking apparatus including:
the system comprises an assertion request receiving module, an assertion request sending module and an assertion request sending module, wherein the assertion request carries identification information of a multi-user online editor;
the assertion determining module is used for determining assertion according to the identification information of the multi-user online editor;
the access token generation module is used for receiving an access token request and an assertion sent by the client and generating an access token according to the access token request and the assertion;
the access token sending module is used for sending the access token to the client, wherein the access token carries identification information and user information of the multi-user online editor;
the document locking request receiving module is used for receiving a document locking request sent by the client and locking the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the document locking method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the document locking method according to any one of the embodiments of the present invention when executed.
According to the embodiment of the invention, the assertion request is sent to the server, so that the server determines assertion according to the identification information of the multi-user online editor carried by the assertion request; receiving an assertion sent by a server, and sending an access token request and the assertion to the server so that the server generates an access token according to the access token request and the assertion; receiving an access token sent by a server, wherein the access token carries identification information and user information of a multi-user online editor; according to the access token, a document locking request is sent to the server, so that the server locks the document to be locked according to the document identification to be locked and the access token carried by the document locking request, the problem that the storage failure condition occurs when other users enter the multi-user online editor for editing and the multi-user online editor is not available is solved, and the effect that the other editing tools cannot edit the document in the process that one or more users use the multi-user online editor is achieved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method of document locking in an embodiment of the invention;
FIG. 2 is a flow chart of another document locking method in an embodiment of the invention;
FIG. 3 is a schematic diagram of an access token transmission flow in an embodiment of the invention;
FIG. 4 is a schematic view of a document locking apparatus in an embodiment of the present invention;
FIG. 5 is a schematic view of another document locking apparatus in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
Example 1
Fig. 1 is a flowchart of a document locking method provided in an embodiment of the present invention, where the embodiment is applicable to a document locking situation, and the method may be performed by a document locking device in the embodiment of the present invention, where the device may be implemented in a software and/or hardware manner, as shown in fig. 1, and the method specifically includes the following steps:
s110, sending an assertion request to the server so that the server can determine assertion according to the identification information of the multi-user online editor carried by the assertion request.
The assertion request carries identification information of a multi-user online editor deployed on the client. The multi-person online editor can be an Office multi-person online editor or other multi-person online editors, for example, a WPS multi-person online editing tool or a third party multi-person online editing tool. The assertion is a piece of structured and cryptographically protected information.
Specifically, the client sends an assertion request to the server, and the server determines assertion according to the identification information of the multi-user online editor carried by the assertion request. For example, the server stores in advance the assertion provided by the assertion provider and the identification information of the multi-person online editor corresponding to the assertion, the client sends an assertion request to the server, and the server queries to obtain the assertion corresponding to the identification information of the multi-person online editor according to the identification information of the multi-person online editor carried by the assertion request sent by the client.
And S120, receiving the assertion sent by the server, and sending the access token request and the assertion to the server so that the server generates the access token according to the access token request and the assertion.
Wherein the access token is issued by the server to the client indicating that the client has been granted the same rights as the resource owner. Also, the authorization code includes information included in the access token including an agent, a user, and an authorization scope.
Specifically, the access token acquisition procedure may be: the client redirects the resource owner to the server. Then, the resource owner authenticates to the server, the authentication is successful, and the server returns the authorization code to the client. The client sends the received authorization code to the server in exchange for the access token. The usage scenario of this mode is typically that the client runs on a Web server or on the user's computer, which is the most secure and flexible. Wherein the resource owner is a person accessing the resource under his control using the client software. In the analytical system the resource owners are users.
Specifically, the server determines the assertion according to the identification information of the multi-user online editor carried by the assertion request, the server sends the assertion to the client, the client receives the assertion sent by the server and sends the access token request and the assertion to the server, so that the server generates an access token according to the access token request and the assertion.
Note that the authorized license type of AnyShare newly supports the assert license type of oauth2.0, also called assert mode. The assert license type is the first official extended license type issued by the OAuth working group. Under this license type, the client will get an assertion, which is used to trade the authorization server for the access token. In embodiments of the present invention, the assertion may be some authenticated document, such as a coupon or license. So long as the trust authority ensures the authenticity of the claims, the contents of the document are trusted to be authentic. In the AnyShare system, the multiplayer online editor takes the assertion and requests the access token from the server.
S130, receiving an access token sent by a server, wherein the access token carries identification information and user information of the multi-user online editor.
Wherein the user information includes a user identification. And S140, sending a document locking request to the server according to the access token so that the server locks the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
Specifically, a document locking request is sent to a server according to an access token, so that the mode of the server for locking the document to be locked according to the document to be locked identifier carried by the document locking request and the access token can be as follows: when a user enters the multi-person online editor, the client sends a document locking request to the server according to the access token, and the server determines the multi-person online editor as a locker of the document.
If the multi-user online editor is always in use by a user, the locker of the document is always the multi-user online editor. Therefore, other editing tools such as a Web client, a synchronous disk and the like cannot edit the document, and the influence on users in the multi-user online editor is avoided.
In the embodiment of the invention, the server is used for carrying out identity authentication on the resource owner and the client, so that the resource owner authorizes the client and issues the access token for the client.
Optionally, the method further comprises:
Sending a document editing request to a server according to an access token, so that the server generates feedback information according to a document identifier carried by the document editing request, the identifier information of the multi-user online editor and user information;
and receiving feedback information sent by the server, and editing the document corresponding to the document identification.
Specifically, the method for sending the document editing request to the server according to the access token, so that the server generates feedback information according to the document identifier carried by the document editing request, the identifier information of the multi-user online editor and the user information may be as follows: the method comprises the steps that a client sends a document editing request to a server according to an access token, after the server receives the document editing request, the server judges whether a document corresponding to the document identification is locked by other clients according to the document identification carried by the document editing request, identification information of a multi-user online editor and user information, and if the document is not locked by other clients, feedback information is generated according to the document identification carried by the document editing request, the identification information of the multi-user online editor and the user information.
Specifically, the method for receiving the feedback information sent by the server and editing the document corresponding to the document identifier may be: if the feedback information received by the client and sent by the server is readable and writable, editing the document corresponding to the document identifier.
Optionally, if the feedback information sent by the server is readable and unwritable, the client opens the document corresponding to the document identifier in a read-only manner. In one specific example, a multi-person online editor can only open in a read-only manner if a document has been initially locked by a Web client, a synchronization disk, etc.
Optionally, the method further comprises:
when all users exit the multi-user online editor, a document lock release instruction is sent to a server, so that the server releases the document to be released according to the identification information of the document to be released, which is carried by the document lock release instruction.
When a user enters the multi-person online editor, the client sends a document locking request to the server according to the access token, and the server determines the multi-person online editor as a locker of the document. If the multi-person online editor is always in use by a user, the locker of the document is always the multi-person online editor. Until all users have exited the multi-user online editor, the document lock is released and other editing tools cannot be used normally.
In one specific example, the Office multiplayer online editor uses an access token to send a file edit request to a server. The server can know that the user edits on the multi-person online editor by analyzing the access token, and further the server can generate a log file according to the user identification edited on the multi-person online editor.
According to the technical scheme, an assertion request is sent to a server, so that the server determines assertion according to identification information of a multi-user online editor carried by the assertion request; receiving an assertion sent by a server, and sending an access token request and the assertion to the server so that the server generates an access token according to the access token request and the assertion; receiving an access token sent by a server, wherein the access token carries identification information and user information of a multi-user online editor; according to the access token, a document locking request is sent to the server, so that the server locks the document to be locked according to the document identification to be locked and the access token carried by the document locking request, the problem that when other users enter the multi-user online editor for editing, the situation of failure in storage occurs and the multi-user online editor is not available is solved, and the effect that in the process that one or more users use the multi-user online editor, other editing tools cannot edit the document is achieved.
Example two
FIG. 2 is a flowchart of another document locking method according to an embodiment of the present invention, where the method may be implemented by a document locking device according to an embodiment of the present invention, and the device may be implemented in software and/or hardware, as shown in FIG. 2, and the method specifically includes the following steps:
S210, receiving an assertion request sent by the client.
Wherein the assertion request carries identification information of the multi-user online editor.
S220, determining assertion according to the identification information of the multi-user online editor.
Specifically, the manner of determining the assertion according to the identification information of the multi-user online editor may be: the server pre-stores the assertion provided by the assertion provider and the identification information of the multi-person online editor corresponding to the assertion, and queries the identification information of the multi-person online editor carried by the assertion request sent by the client to obtain the assertion corresponding to the identification information of the multi-person online editor.
S230, receiving an access token request and an assertion sent by a client, and generating an access token according to the access token request and the assertion.
Specifically, the client requests an access token from the server based on the assertion. After receiving the access token request sent by the client, the server judges whether the client has the access token use permission according to the assertion, and if the client has the access token use permission, the server generates an access token corresponding to the access token request.
Optionally, receiving an access token request and an assertion sent by a client, generating an access token according to the access token request and the assertion, including:
Registering access token authority corresponding to the identification information of each multi-user online editor in advance;
receiving an access token request and assertion sent by a client;
inquiring access token rights corresponding to the identification information of each preregistered multi-person online editor, and obtaining the access token rights corresponding to the identification information of the multi-person online editor in the assertion;
and if the identification information of the multi-person online editor in the assertion has the access token authority, generating an access token according to the access token request.
The access token authority corresponding to the identification information of each multi-person online editor may include: the identification information of the multi-person online editor has access token authority and can also comprise: the identification information of the multi-person online editor does not have access token authority, for example, the identification information a of the pre-registered multi-person online editor has access token authority, the identification information B of the multi-person online editor has access token authority, and the identification information C of the multi-person online editor does not have access token authority.
Specifically, the method for inquiring the access token authority corresponding to the identification information of each multi-person online editor registered in advance according to the identification information of the multi-person online editor in the assertion, and obtaining the access token authority corresponding to the identification information of the multi-person online editor in the assertion may be as follows: inquiring access token authority corresponding to the identification information of each multi-person online editor registered in advance according to the identification information of the multi-person online editor in the assertion, and determining the access token authority corresponding to the identification information of each multi-person online editor in the assertion as the access token authority of the identification information of the multi-person online editor in the assertion if the identification information of each multi-person online editor registered in advance is the same as the identification information of the multi-person online editor in the assertion. According to the identification information of the multi-person online editor in the assertion, inquiring the access token authority corresponding to the identification information of each pre-registered multi-person online editor, and obtaining the access token authority corresponding to the identification information of the multi-person online editor in the assertion may further be: the access token authority corresponding to the identification information of each multi-user online editor registered in advance only comprises: and accessing the token rights corresponding to the identification information of the multi-user online editors with the token access rights. If the identification information of each multi-person online editor registered in advance does not have the same identification information as the identification information of the multi-person online editor in the assertion, determining that the identification information of the multi-person online editor in the assertion does not have the access token authority. For example, the access token authority corresponding to the identification information of each multi-user online editor registered in advance may include: the identification information A of the pre-registered multi-person online editor is provided with access token authority, and the identification information B of the multi-person online editor is provided with access token authority. If the identification information of the multi-person online editor in the assertion is identification information C, determining that the identification information C of the multi-person online editor in the assertion does not have the access token authority.
And S240, the access token is sent to the client, wherein the access token carries the identification information and the user information of the multi-user online editor.
S250, receiving a document locking request sent by the client, and locking the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
Specifically, after the server sends the access token to the client, when the client detects that a user enters the multi-person online editor, the client sends a document locking request to the server, and the server determines that the client has the authority to lock the document according to the document to be locked identifier carried by the document locking request and the access token locking document to be locked, and locks the document to be locked according to the document to be locked identifier carried by the document locking request and the access token.
Optionally, receiving a document locking request sent by the client, locking the document to be locked according to a document identifier to be locked and an access token carried by the document locking request, including:
registering a document locking authority corresponding to the identification information of each multi-user online editor in advance;
inquiring document locking authorities corresponding to the identification information of each pre-registered multi-person online editor to obtain document locking authorities corresponding to the identification information of the multi-person online editor carried by a document locking request;
And if the identification information of the multi-person online editor carried by the document locking request has the document locking authority, locking the document to be locked according to the document identification to be locked carried by the document locking request and the access token.
The document locking authority corresponding to the identification information of each preregistered multi-user online editor may include: the identification information of the multi-user online editor has document locking authority and can also comprise: the identification information of the multi-person online editor does not have document locking rights. For example, the identification information E of the multi-person online editor may be registered in advance to have the document locking authority, the identification information F of the multi-person online editor may have the document locking authority, and the identification information G of the multi-person online editor may not have the document locking authority.
Specifically, the method for inquiring the document locking authority corresponding to the identification information of each pre-registered multi-person online editor to obtain the document locking authority corresponding to the identification information of the multi-person online editor carried by the document locking request may be: inquiring the document locking authority corresponding to the identification information of each multi-person online editor registered in advance according to the identification information of the multi-person online editor carried by the document locking request, and determining the document locking authority corresponding to the identification information of the multi-person online editor carried by the document locking request in the identification information of each multi-person online editor registered in advance as the document locking authority of the identification information of the multi-person online editor carried by the document locking request if the identification information of each multi-person online editor registered in advance is identical to the identification information of the multi-person online editor carried by the document locking request. The method for inquiring the document locking authority corresponding to the identification information of each multi-person online editor registered in advance according to the identification information of the multi-person online editor carried by the document locking request to obtain the document locking authority corresponding to the identification information of the multi-person online editor carried by the document locking request can also be as follows: the document locking authority corresponding to the identification information of each multi-user online editor registered in advance only comprises: and the document locking authority corresponding to the identification information of each multi-person online editor with the token access authority. If the identification information of each multi-person online editor registered in advance does not have the same identification information as the identification information of the multi-person online editor carried by the document locking request, determining that the identification information of the multi-person online editor carried by the document locking request does not have the document locking authority. For example, the document locking authority corresponding to the identification information of each of the multi-user online editors registered in advance may include: the identification information E of the pre-registered multi-person online editor has document locking authority, and the identification information F of the multi-person online editor has document locking authority. If the identification information of the multi-person online editor carried by the document locking request is the identification information G, determining that the identification information G of the multi-person online editor carried by the document locking request does not have the document locking authority.
Optionally, the method further comprises:
receiving a document editing request sent by a client, and generating feedback information according to a document identifier carried by the document editing request, identification information of a multi-user online editor and user information;
and sending feedback information to the client so that the client edits the document corresponding to the document identifier after receiving the feedback information.
Specifically, the client sends a document editing request to the server according to the access token, after receiving the document editing request, the server judges whether a document corresponding to the document identification is locked by other clients according to the document identification carried by the document editing request, the identification information of the multi-user online editor and the user information, and if the document is not locked by other clients, feedback information is generated according to the document identification carried by the document editing request, the identification information of the multi-user online editor and the user information.
Specifically, the method for sending feedback information to the client so that the client edits the document corresponding to the document identifier after receiving the feedback information may be: if the feedback information received by the client and sent by the server is readable and writable, editing the document corresponding to the document identifier.
It should be noted that, if the feedback information sent to the client by the server is readable and non-writable, the multi-user online editor can only open the document corresponding to the document identifier in a read-only manner.
Optionally, the method further comprises:
receiving a document lock release instruction sent by a client;
and releasing the document to be released according to the identification information of the document to be released carried by the document lock release instruction.
When a user enters the multi-person online editor, the client sends a document locking request to the server according to the access token, and the server determines the multi-person online editor as a locker of the document. If the multi-person online editor is always in use by a user, the locker of the document is always the multi-person online editor. Until all users have exited the multi-user online editor, the document lock is released and other editing tools cannot be used normally.
In one specific example, as shown in FIG. 3, when a user enters the Office multi-person online editor, a document lock request is sent to the server. Unlike the non-multi-person online editors of Web clients and synchronization disks, the server can enable the Office multi-person online editors to be edited as document lock holders. If Office multi-person online editor editing is always in use by a user, then the holder of the document lock is always the editor. Therefore, other editing tools such as a Web client and a synchronous disk can not edit files, and the influence on users in the Office multi-user online editor can not be caused. Until all users have exited the Office multi-person online editor, the document lock was released and other editing tools could not be used normally. Of course if the file has been initially locked by a Web client, a synchronization disk, etc., the Office multiplayer online editor can only open in a read-only manner.
The embodiment of the invention receives an assertion request sent by a client, wherein the assertion request carries identification information of a multi-user online editor; determining assertion according to the identification information of the multi-user online editor; receiving an access token request and assertion sent by a client, and generating an access token according to the access token request and assertion; the access token is sent to a client, wherein the access token carries identification information and user information of a multi-user online editor; the method comprises the steps of receiving a document locking request sent by a client, locking a document to be locked according to a document identifier to be locked and an access token carried by the document locking request, and solving the problem that when other users enter the multi-user online editor for editing, the multi-user online editor is not available due to the fact that the other users can only become a locker of the document, and the effect that in the process that one or more users use the multi-user online editor, other editing tools cannot edit the document is achieved.
Example III
Fig. 4 is a schematic structural diagram of a document locking device according to an embodiment of the present invention. The present embodiment may be applied to the case of document locking, and the apparatus may be implemented in software and/or hardware, and may be integrated in any device that provides a document locking function, as shown in fig. 4, where the document locking apparatus specifically includes: assertion request sending module 410, assertion receiving module 420, access token receiving module 430, and document lock request sending module 440.
The system comprises an assertion request sending module, an assertion request sending module and a server, wherein the assertion request sending module is used for sending an assertion request to the server so that the server can determine assertion according to the identification information of the multi-user online editor carried by the assertion request;
the assertion receiving module is used for receiving the assertion sent by the server and sending the access token request and the assertion to the server so that the server generates an access token according to the access token request and the assertion;
the access token receiving module is used for receiving the access token sent by the server, wherein the access token carries the identification information and the user information of the multi-user online editor;
and the document locking request sending module is used for sending a document locking request to the server according to the access token so that the server locks the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
The product can execute the method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 5 is a schematic structural diagram of a document locking device according to an embodiment of the present invention. The embodiment may be applied to the case of document locking, and the apparatus may be implemented in software and/or hardware, and may be integrated in any device that provides a document locking function, as shown in fig. 5, where the document locking apparatus specifically includes: an assertion request receiving module 510, an assertion determining module 520, an access token generating module 530, an access token transmitting module 540, and a document lock request receiving module 550.
The system comprises an assertion request receiving module, an assertion request sending module and an assertion request sending module, wherein the assertion request receiving module is used for receiving an assertion request sent by a client, and the assertion request carries identification information of a multi-user online editor;
the assertion determining module is used for determining assertion according to the identification information of the multi-user online editor;
the access token generation module is used for receiving an access token request and an assertion sent by the client and generating an access token according to the access token request and the assertion;
the access token sending module is used for sending the access token to the client, wherein the access token carries identification information and user information of the multi-user online editor;
the document locking request receiving module is used for receiving a document locking request sent by the client and locking the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
The product can execute the method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 6 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may 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 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various 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, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, such as a document locking method.
In some embodiments, the document locking method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the document locking method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the document locking method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out 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, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can 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 a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, 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, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (12)

1. A document locking method, performed by a client, the document locking method comprising:
sending an assertion request to a server so that the server determines assertion according to the identification information of the multi-user online editor carried by the assertion request;
receiving an assertion sent by a server, and sending an access token request and the assertion to the server so that the server generates an access token according to the access token request and the assertion;
Receiving an access token sent by a server, wherein the access token carries identification information and user information of a multi-user online editor;
and sending a document locking request to the server according to the access token, so that the server locks the document to be locked according to the document identification to be locked carried by the document locking request and the access token.
2. The method as recited in claim 1, further comprising:
sending a document editing request to a server according to an access token, so that the server generates feedback information according to a document identifier carried by the document editing request, the identifier information of the multi-user online editor and user information;
and receiving feedback information sent by the server, and editing the document corresponding to the document identification.
3. The method as recited in claim 1, further comprising:
when all users exit the multi-user online editor, a document lock release instruction is sent to a server, so that the server releases the document to be released according to the identification information of the document to be released, which is carried by the document lock release instruction.
4. A document locking method, performed by a server, the document locking method comprising:
Receiving an assertion request sent by a client, wherein the assertion request carries identification information of a multi-user online editor;
determining assertion according to the identification information of the multi-user online editor;
receiving an access token request and assertion sent by a client, and generating an access token according to the access token request and assertion;
the access token is sent to a client, wherein the access token carries identification information and user information of a multi-user online editor;
and receiving a document locking request sent by the client, and locking the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
5. The method as recited in claim 4, further comprising:
receiving a document editing request sent by a client, and generating feedback information according to a document identifier carried by the document editing request, identification information of a multi-user online editor and user information;
and sending feedback information to the client so that the client edits the document corresponding to the document identifier after receiving the feedback information.
6. The method as recited in claim 4, further comprising:
receiving a document lock release instruction sent by a client;
And releasing the document to be released according to the identification information of the document to be released carried by the document lock release instruction.
7. The method of claim 4, wherein receiving an access token request and assertion sent by a client, and generating an access token from the access token request and assertion comprises:
registering access token authority corresponding to the identification information of each multi-user online editor in advance;
receiving an access token request and assertion sent by a client;
inquiring access token rights corresponding to the identification information of each preregistered multi-person online editor, and obtaining the access token rights corresponding to the identification information of the multi-person online editor in the assertion;
and if the identification information of the multi-person online editor in the assertion has the access token authority, generating an access token according to the access token request.
8. The method of claim 4, wherein receiving the document locking request sent by the client, locking the document to be locked according to the document identifier to be locked and the access token carried by the document locking request, comprises:
registering a document locking authority corresponding to the identification information of each multi-user online editor in advance;
inquiring document locking authorities corresponding to the identification information of each pre-registered multi-person online editor to obtain document locking authorities corresponding to the identification information of the multi-person online editor carried by a document locking request;
And if the identification information of the multi-person online editor carried by the document locking request has the document locking authority, locking the document to be locked according to the document identification to be locked carried by the document locking request and the access token.
9. A document locking apparatus, characterized by being configured in a client, comprising:
the system comprises an assertion request sending module, an assertion request sending module and a server, wherein the assertion request sending module is used for sending an assertion request to the server so that the server can determine assertion according to the identification information of the multi-user online editor carried by the assertion request;
the assertion receiving module is used for receiving the assertion sent by the server and sending the access token request and the assertion to the server so that the server generates an access token according to the access token request and the assertion;
the access token receiving module is used for receiving the access token sent by the server, wherein the access token carries the identification information and the user information of the multi-user online editor;
and the document locking request sending module is used for sending a document locking request to the server according to the access token so that the server locks the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
10. A document locking apparatus, characterized by being configured in a server, comprising:
The system comprises an assertion request receiving module, an assertion request sending module and an assertion request sending module, wherein the assertion request carries identification information of a multi-user online editor;
the assertion determining module is used for determining assertion according to the identification information of the multi-user online editor;
the access token generation module is used for receiving an access token request and an assertion sent by the client and generating an access token according to the access token request and the assertion;
the access token sending module is used for sending the access token to the client, wherein the access token carries identification information and user information of the multi-user online editor;
the document locking request receiving module is used for receiving a document locking request sent by the client and locking the document to be locked according to the document identification to be locked and the access token carried by the document locking request.
11. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the document locking method of any one of claims 1-8.
12. A computer readable storage medium storing computer instructions for causing a processor to implement the document locking method of any one of claims 1-8 when executed.
CN202311816406.2A 2023-12-26 2023-12-26 Document locking method, device, equipment and storage medium Pending CN117785822A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311816406.2A CN117785822A (en) 2023-12-26 2023-12-26 Document locking method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311816406.2A CN117785822A (en) 2023-12-26 2023-12-26 Document locking method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117785822A true CN117785822A (en) 2024-03-29

Family

ID=90393932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311816406.2A Pending CN117785822A (en) 2023-12-26 2023-12-26 Document locking method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117785822A (en)

Similar Documents

Publication Publication Date Title
US8904480B2 (en) Social authentication of users
CN110930561B (en) Control method and device of intelligent lock
CN106330813A (en) Method, device and system for processing authorization
CN118250103B (en) User authorization method, device, equipment and medium
CN113360868A (en) Application program login method and device, computer equipment and storage medium
CN112182606A (en) Access request processing method and device, electronic equipment and readable storage medium
CN115935321A (en) Access method and device of algorithm library and storage medium
CN114513350A (en) Identity verification method, system and storage medium
CN109756469B (en) Public account management method and device and computer readable storage medium
CN111147496B (en) Data processing method and device
CN106998315B (en) Method, device and system for registration authentication
CN117034257A (en) Information acquisition method, device, equipment and medium under virtualization management
CN117785822A (en) Document locking method, device, equipment and storage medium
CN112579996A (en) Temporary authorization method and device
CN115242478B (en) Method and device for improving data security, electronic equipment and storage medium
CN114884718B (en) Data processing method, device, equipment and storage medium
CN114444041A (en) Interface access method and device, electronic equipment and storage medium
CN118764238A (en) Access control method, device, equipment and storage medium of client
CN116738394A (en) Interface control method and device, electronic equipment and storage medium
CN117336072A (en) Multi-fort machine access system, method, equipment and storage medium
CN115801417A (en) Identity authentication method, device, equipment and storage medium
CN117079370A (en) Method, device, equipment and storage medium for managing keys of security workstation
CN115473732A (en) Method, device, equipment and storage medium for sharing Web application account
CN115766022A (en) User identity authentication method and device
CN117560209A (en) Object information sharing method, device and server

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