Document co-processing method and business management system

By introducing a multi-level edit lock control mechanism into the business management system, combining pessimistic lock mechanism and distributed lock mechanism, the problems of poor data consistency, poor user experience and poor flexibility in document editing permission control in the existing technology are solved, and an efficient and flexible document collaborative processing method is achieved.

CN119938623APending Publication Date: 2025-05-06CHINA UNITED NETWORK COMM GRP CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411983261.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art has problems such as poor data consistency, poor user experience and poor flexibility in document editing permission control, especially in the multi-user concurrent editing scenario.

Method used

By introducing a multi-level editing lock control mechanism into the business management system, combining pessimistic locking mechanism and distributed locking mechanism, the document locking, renewal locking and unlocking can be achieved to ensure data consistency and user experience.

Benefits of technology

It effectively solves the problem of poor data consistency, improves user experience, and realizes flexible document editing permission control, which is suitable for complex business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938623A_ABST
    Figure CN119938623A_ABST
Patent Text Reader

Abstract

The invention provides a document co-processing method and a business management system, and relates to the technical field of Internet. The method comprises the following steps: a target client initiates a locking request of a first document to a server, wherein the locking request carries respective identifiers of the target client and the first document; when the first document is not locked in advance and has no mutual exclusion lock, the server locks the first document and determines the effective locking duration of the first document; the server generates editing lock attribute information according to the effective locking duration, and feeds back a locking result reply used for indicating successful locking to the target client; the target client extracts editing lock attribute information from the locking result reply, wherein the editing lock attribute information comprises the effective locking duration of the first document; and the target client edits the first document in the editing interface within the effective locking duration until the target client requests to unlock the first document and quits the editing interface. According to the method and the device, the problem of how to flexibly, efficiently and concisely carry out document editing permission control is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a document collaborative processing method and a business management system. Background Art

[0002] In the process of modern enterprise informatization, business management systems have become an indispensable core tool to support the operation of key areas such as financial management, supply chain management and manufacturing. With the continuous growth and increasing complexity of data in business management systems, effectively managing and controlling document editing permissions and ensuring the consistency and security of business data have become one of the key issues to ensure the smooth operation of business processes.

[0003] In the prior art, although optimistic locking mechanism, pessimistic locking mechanism and distributed locking mechanism have solved the problem of multi-user concurrent editing to a certain extent, they still have significant defects in practical applications. For example, optimistic locking may cause a large number of rollback operations in a high-conflict environment, affecting the consistency and accuracy of data; pessimistic locking may cause resources to be locked for a long time, reducing system concurrency; and distributed locking is suitable for more complex distributed environments with higher system complexity. Therefore, how to flexibly, efficiently and concisely control document editing permissions is a problem that needs to be solved in this application. Summary of the invention

[0004] The present application provides a document collaborative processing method and a business management system to solve the problem of how to flexibly, efficiently and concisely control document editing permissions.

[0005] The first aspect of the present application provides a document collaborative processing method. The business management system includes a server and multiple clients. The target client is any one of the multiple clients. The method is applied to the target client. The method includes:

[0006] Initiate a lock request for the first document to the server to request to enter the editing interface of the first document; wherein the lock request carries the identifiers of the target client and the first document;

[0007] Receive the lock result reply from the server; the lock result reply is used to indicate whether the lock is successful;

[0008] When the lock result reply indicates that the lock is successful, extracting the edit lock attribute information from the lock result reply; wherein the edit lock attribute information includes the effective lock duration of the first document;

[0009] Within the lock validity period, the first document is edited in the editing interface until a request is made to unlock the first document and the editing interface is exited.

[0010] In a possible design, within the lock validity period, editing the first document in the editing interface includes:

[0011] At each preset time interval, a renewal lock request for the first document is sent to the server; wherein the preset time interval is less than the effective lock time interval;

[0012] Receive the renewal lock result reply from the server; the renewal lock result reply is used to indicate whether the renewal is successful;

[0013] When the renewal lock result reply indicates that the renewal is successful, the lock validity period is updated;

[0014] The first document is edited in the editing interface within the updated lock validity period.

[0015] In a possible design, the edit lock attribute information further includes: an edit lock identifier of each of the first document and a plurality of second documents; wherein each of the second documents is a document associated with the first document, and each of the second documents is successfully locked by the server;

[0016] After extracting the edit lock attribute information from the lock result reply, the method further includes:

[0017] storing the edit lock identifiers of the first document and each of the second documents in the edit lock manager;

[0018] Initiate a renewal lock request for the first document to the server, including:

[0019] A renewal lock request is initiated to the server for each document corresponding to the edit lock identifier stored in the edit lock manager.

[0020] In a possible design, requesting to unlock the first document and exit the editing interface includes:

[0021] Initiate an unlock request for the first document to the server;

[0022] Receive the unlock result reply from the server; the unlock result reply is used to indicate whether the unlocking is successful;

[0023] When the unlock result reply indicates that the unlock is successful, exit the editing interface.

[0024] The second aspect of the present application provides a document collaborative processing method. The business management system includes a server and multiple clients. The method is applied to the server. The method includes:

[0025] Upon receiving a lock request for a first document initiated by a target client, checking whether the first document has been locked previously; wherein the target client is any one of the multiple clients;

[0026] When the first document is not locked in advance, checking whether the first document has a mutex lock;

[0027] When the first document does not have a mutex lock, the first document is locked, and a locking validity period of the first document is determined;

[0028] According to the effective lock duration, edit lock attribute information is generated, and a lock result reply indicating successful locking is fed back to the target client; wherein the lock result reply carries the edit lock attribute information.

[0029] In a possible design, edit lock attribute information is generated according to the lock validity period, including:

[0030] Detecting and obtaining a plurality of second documents associated with the first document;

[0031] Locking each second document, and generating respective edit lock identifiers for the first document and each second document;

[0032] The edit lock attribute information is generated according to the lock validity period and the edit lock identifiers of the first document and each second document.

[0033] In a possible design, upon receiving a renewal lock request or unlock request for the first document initiated by the target client, the method further includes:

[0034] Extracting an edit lock identifier of the first document from the renewal lock request or the unlock request;

[0035] Verifying the edit lock identifier of the first document;

[0036] When the editing lock identifier of the first document is verified, the locking validity period of the first document is renewed, and a renewal lock result reply indicating successful renewal is fed back to the target client, or the first document is unlocked, and an unlock result reply indicating successful unlocking is fed back to the target client.

[0037] In one possible design, the method further includes:

[0038] When the first document is locked previously or has a mutex lock, feeding back a lock result reply indicating a lock failure to the target client; wherein the lock result reply carries a lock failure reason and a reason description, and the reason description is used to indicate an identifier of the client that is editing the first document;

[0039] When the verification of the edit lock identifier of the first document fails, feeding back to the target client a renewal lock result reply indicating a renewal failure, or an unlock result reply indicating an unlock failure;

[0040] When the locking validity period of the first document is not renewed within the locking validity period, the first document is unlocked.

[0041] In a possible design, the first document includes multiple levels of hierarchy, and the target level is any level of the multiple levels of hierarchy;

[0042] When the target client edits the target level of the first document, the method further includes:

[0043] Detecting a plurality of third documents associated with a target level of the first document;

[0044] Each third document is locked until the target client finishes editing the target level.

[0045] A third aspect of the present application provides a business management system, the business management system includes a server and multiple clients, and the method is applied to the server, and the method includes:

[0046] The server communicates with multiple clients at the same time;

[0047] Each client is used to implement the document collaborative processing method as described in any one of the first aspects;

[0048] The server is used to implement the document collaborative processing method as described in any one of the second aspects.

[0049] A fourth aspect of the present application provides a document collaborative processing device, wherein the business management system includes a server and multiple clients, the target client is any one of the multiple clients, and the device is located at the target client, and the device includes:

[0050] A lock request module, used to initiate a lock request of the first document to the server to request to enter the editing interface of the first document; wherein the lock request carries the identifiers of the target client and the first document;

[0051] The locking confirmation module is used to receive the locking result reply fed back by the server; wherein the locking result reply is used to indicate whether the locking is successful;

[0052] The attribute extraction module is used to extract the edit lock attribute information from the lock result reply when the lock result reply indicates that the lock is successful; wherein the edit lock attribute information includes the lock validity period of the first document;

[0053] The first editing module is used to edit the first document in the editing interface within the locking validity period until a request is made to unlock the first document and exit the editing interface.

[0054] A fifth aspect of the present application provides a document collaborative processing device, wherein the business management system includes a server and multiple clients, and the device is located at the server, and the device includes:

[0055] A first checking module is used to check whether the first document has been locked before when receiving a lock request for the first document initiated by a target client; wherein the target client is any one of the multiple clients;

[0056] A second checking module, used for checking whether the first document has a mutex lock when the first document has not been locked in advance;

[0057] A first locking module, used to lock the first document when the first document has no mutually exclusive lock, and determine the effective locking time of the first document;

[0058] The lock reply module is used to generate the edit lock attribute information according to the lock validity period, and to feed back the lock result reply indicating the successful lock to the target client; wherein the lock result reply carries the edit lock attribute information.

[0059] A sixth aspect of the present application provides an electronic device, comprising: a memory, and a memory communicatively connected to a processor;

[0060] Memory stores computer-executable instructions;

[0061] When the processor executes the computer-executable instructions stored in the memory, it is used to implement the document collaborative processing method of any one of the first aspect or the second aspect.

[0062] The fifth aspect of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the document collaborative processing method of any one of the first aspect or the second aspect.

[0063] The sixth aspect of the present application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the document collaborative processing method of any one of the first aspect or the second aspect.

[0064] The present application provides a document collaborative processing method and business management system, in which a target client initiates a lock request for a first document to a server, and the lock request carries the identifiers of the target client and the first document respectively; when the first document has not been locked in advance and there is no mutually exclusive lock, the server locks the first document and determines the effective lock duration of the first document; the server generates edit lock attribute information according to the effective lock duration, and feeds back a lock result reply indicating successful locking to the target client; the target client extracts the edit lock attribute information from the lock result reply, and the edit lock attribute information includes the effective lock duration of the first document; the target client edits the first document in the editing interface within the effective lock duration until requesting to unlock the first document and exiting the editing interface. The following technical effects are achieved: when the first document has not been locked in advance and there is no mutual exclusion lock, the server allows the target client to edit the first document, solving the problem of poor data consistency; when the first document is locked in advance or has a mutual exclusion lock, a locking result reply indicating a locking failure is fed back to the target client, helping the user understand the editing status of the first document, solving the problem that when handling editing conflicts, the user lacks clear prompts, affecting the user experience; when receiving the locking result reply indicating a successful locking, the editing interface of the first document is entered, and the first document is edited in the editing interface, solving the problem of the user's failed attempt to save the modified document, and further improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0066] Figure 1 A schematic diagram of a scenario of a document collaborative processing method provided in an embodiment of the present application;

[0067] Figure 2 Schematic diagram of the process of document collaborative processing method provided in the embodiment of the present application Figure 1 ;

[0068] Figure 3 Schematic diagram of the process of document collaborative processing method provided in the embodiment of the present application Figure 2 ;

[0069] Figure 4 Schematic diagram of the process of document collaborative processing method provided in the embodiment of the present application Figure 3 ;

[0070] Figure 5A schematic diagram of the structure of the document collaborative processing device provided in the embodiment of the present application Figure 1 ;

[0071] Figure 6 A schematic diagram of the structure of the document collaborative processing device provided in the embodiment of the present application Figure 2 ;

[0072] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0073] Reference numerals:

[0074] 110-server; 120-client; 121-editing interface; 130-user;

[0075] 510-lock request module; 520-lock determination module; 530-attribute extraction module; 540-first editing module;

[0076] 610-first inspection module; 620-second inspection module; 630-first locking module; 640-locking reply module;

[0077] 710 - processor; 720 - memory; 730 - communication component; 740 - bus. DETAILED DESCRIPTION

[0078] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0079] In the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference. It should be noted that in the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way. In the present application, "at least one" refers to one or more, and "more" refers to two or more.

[0080] It should be noted that the "at..." in this application can be the instant when a certain situation occurs, or it can be a period of time after a certain situation occurs, and this application does not make specific limitations on this. In addition, the document collaborative processing method provided in this application is only an example, and the document collaborative processing method can also include more or less content. The user information (including but not limited to user device information and user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data, etc.) involved in one or more embodiments of this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0081] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The present application will be described below in conjunction with the accompanying drawings.

[0082] In order to clearly understand the technical solution of the present application, the solution of the prior art is first introduced in detail.

[0083] In the process of modern enterprise informatization, business management systems have become an indispensable core tool to support the operation of key areas such as financial management, supply chain management and manufacturing. With the continuous growth and increasing complexity of data in business management systems, effectively managing and controlling document editing permissions and ensuring the consistency and security of business data have become one of the key issues to ensure the smooth operation of business processes.

[0084] In the prior art, optimistic locking mechanism, pessimistic locking mechanism and distributed locking mechanism have solved the problem of concurrent editing by multiple users to a certain extent.

[0085] The optimistic locking mechanism is a widely used technical means. It is based on the following assumption: in most cases, different users will not try to modify the same document at the same time. When a user requests to edit a specific document, the system will record the version number or timestamp of the document; and before the user submits the document change, the system will verify again whether this identifier is still valid. If other users have modified the document during this period, the current user's changes will be considered invalid and the latest state needs to be reloaded before the operation can continue. This method improves system performance by reducing unnecessary locks, and is particularly suitable for application scenarios with low conflict rates. However, the optimistic locking mechanism still has the problem that it may cause a large number of rollback operations in a high-conflict environment, affecting the consistency and accuracy of the data.

[0086] The pessimistic locking mechanism takes a completely opposite strategy, assuming that multiple users are likely to access the same document at the same time. Therefore, whenever a user starts editing a document, the system immediately locks the document until the editing process is completed and the changes are successfully saved. This method can better avoid data inconsistency caused by concurrent modifications, but it still has the problem of locking resources for a long time and reducing system concurrency.

[0087] For more complex distributed environments, the distributed lock mechanism provides an effective solution. When multiple users need to access a document, they first need to compete for a globally unique lock. Only users who successfully obtain the lock can perform the corresponding operation, and continue to hold the lock throughout the entire processing process until all tasks are completed. In this way, data consistency and integrity can be well maintained even in large-scale distributed architectures. However, the distributed lock mechanism still has the problem of being applicable to more complex distributed environments and having high system complexity.

[0088] These lock mechanisms each address the core challenges in document editing permission control from different perspectives, but they also have certain limitations in their scope of application. Specifically, they are as follows:

[0089] First, data consistency is poor. In high-concurrency scenarios, the optimistic locking mechanism may cause data conflicts or overwriting due to improper design of the locking mechanism, affecting data consistency and accuracy.

[0090] Second, the user experience is poor. When dealing with editing conflicts, users lack clear prompts and may wait for a long time without knowing the reason, which affects the user experience. At the same time, the system only locks when submitting documents, not when editing. This results in multiple users being able to enter the editing interface at the same time, but when they try to save the modified document, it will fail because others have already modified it.

[0091] Third, poor flexibility. The traditional locking mechanism process is usually fixed and difficult to flexibly adjust according to actual business needs, which limits the scope of application of the system.

[0092] Therefore, in response to the above technical problems, it was found in the research that in order to solve the problem of how to flexibly, efficiently and concisely control document editing permissions, the pessimistic locking mechanism and the distributed locking mechanism can be combined.

[0093] First, in order to solve the problem of poor data consistency, a multi-level editing lock control mechanism is provided to ensure data consistency and integrity in multi-user concurrent editing scenarios. Especially in complex business scenarios, related documents can be locked hierarchically or across levels to avoid data conflicts and overwriting.

[0094] Secondly, in order to solve the problem of poor user experience, the system can promptly provide users with clear prompt information to inform them of the current document locking status, reduce users' ineffective waiting time, and improve users' work efficiency.

[0095] Thirdly, through flexible locking, unlocking and renewal mechanisms, document editing permissions can be dynamically adjusted according to different business needs, thereby improving the applicability of the system.

[0096] Based on the above creative findings, the technical solution of the present application is proposed.

[0097] The following is an introduction to the application scenarios of the document collaborative processing method provided by this application.

[0098] Figure 1 A schematic diagram of a scenario of a document collaborative processing method provided in an embodiment of the present application. It should be noted that: Figure 1 What is shown are merely examples of scenarios in which the present application can be applied, to help those skilled in the art understand the technical content of the present application, but it does not mean that the present application cannot be used in other devices, systems, environments or scenarios.

[0099] like Figure 1 As shown, the application scenario includes: a server 110 and multiple clients 120, and the server 110 is communicated with the multiple clients 120 at the same time.

[0100] In the embodiment of the present application, the server 110 may be a central database and management center (for example only) that provides various service supports (for example, journal editing in a financial system, etc.), storing a large number of document resources. In order to ensure the consistency and security of business data, the server 110 locks, unlocks, and renews the locks of these documents through a document collaborative processing method, and manages the state of the editing lock to ensure that only one client 120 can edit a specific document at the same time.

[0101] The client 120 can be various types of communication devices belonging to the user, including but not limited to smart phones, smart watches and tablet computers. The client 120 maintains real-time communication with the server 110 through wired communication such as twisted pair (TP), coaxial cable (Coaxial Cable) or optical fiber (Fiber Optic), or wireless communication such as mobile communication technology (MCT), wireless local area network technology (WLAN), Bluetooth technology (BT) or satellite communication technology. The client 120 is responsible for initiating document editing requests, lock requests, renewal lock requests and unlock requests, and managing the editing lock status. The client 120 allows users to access, edit and share documents stored in the server 110.

[0102] Documents can have multiple formats to meet the needs and scenarios of different users. Document formats can include: text documents for storing plain text information, table documents for storing table data, audio and video documents for storing images, audio and video content, drawing documents for storing engineering drawings and models, database documents for storing database data, and code documents for storing and debugging program code, etc.

[0103] When a client 120 successfully initiates a document lock request to the server 110 , the client 120 displays an editing interface 121 of the document on its own screen, so that a user 130 of the client 120 can edit the document on the editing interface 121 .

[0104] The embodiments of the present application are introduced below in conjunction with the drawings in the specification.

[0105] Figure 2 Schematic diagram of the process of document collaborative processing method provided in the embodiment of the present application Figure 1 The business management system includes a server and multiple clients, and the target client is any one of the multiple clients. Figure 2 As shown, in the embodiment of the present application, the execution subject may be a server and a target client, and the document collaborative processing method provided in the embodiment of the present application includes the following steps:

[0106] S201: The target client initiates a lock request for a first document to a server to request to enter an editing interface of the first document.

[0107] Specifically, when a user needs to edit the first document, the user operates the target client to enter the editing interface of the first document, and the target client initiates a lock request for the first document to the server. The lock request carries the identifiers of the target client and the first document (such as the document ID), and may also carry the document name and document type information of the first document.

[0108] S202: Upon receiving a lock request for a first document initiated by a target client, the server checks whether the first document has been locked previously.

[0109] Specifically, the server generates an edit lock identifier based on the information carried in the lock request. The format of the edit lock identifier is: edit lock prefix + document name + document type + document ID. After that, the server checks whether the first document has been locked before. If it has been locked before, it means that the first document is being edited by other users on other clients. In this case, the target client cannot edit the first document.

[0110] S203: When the first document has not been locked in advance, the server checks whether the first document has a mutex lock.

[0111] Specifically, when the first document is not locked in advance, the server checks whether the first document has a mutual exclusion lock. The mutual exclusion lock means that the first document is being edited by the user on other clients, and the target client cannot edit the first document.

[0112] In one possible design, when the first document is previously locked or has a mutual exclusion lock, a lock result reply indicating a lock failure is fed back to the target client; wherein the lock result reply carries the lock failure reason and a reason description, and the reason description is used to indicate the identifier of the client that is editing the first document.

[0113] Specifically, the server compares the key value of the lock of the first document with the client login information, such as the login client identifier, the login person identifier, and the login account role.

[0114] When the comparison is consistent and the first document is locked first, the following information is returned: the reason for the locking failure is: the first document is locked first; the reason is described as: the first document is being edited by a client, or the first document is being edited by a user on a client.

[0115] When the comparison is consistent and the first document has a mutex lock, the following information is returned: the reason for the lock failure is: the first document has a mutex lock; the reason is described as: the first document has been opened on a client.

[0116] S204: When the first document does not have a mutex lock, the server locks the first document and determines a valid lock duration for the first document.

[0117] Specifically, when the first document does not have a mutex lock, the server locks the first document, and the lock value includes: target client ID, login person ID, login account role, etc. Then, the effective lock duration of the first document is determined, and the effective lock duration is T1.

[0118] S205: The server generates edit lock attribute information according to the lock validity period.

[0119] S206. The server feeds back a locking result reply indicating successful locking to the target client.

[0120] The lock result reply carries the edit lock attribute information.

[0121] S207: The target client receives the locking result reply fed back by the server.

[0122] The lock result reply is used to indicate whether the lock is successful.

[0123] S208. When the locking result reply indicates that the locking is successful, the target client extracts the editing lock attribute information from the locking result reply.

[0124] Specifically, the edit lock attribute information includes the effective lock duration of the first document. The target client stores the edit lock identifier in the edit lock manager and displays the edit interface of the first document.

[0125] S209: The target client edits the first document in the editing interface within the locking validity period, until requesting to unlock the first document and exiting the editing interface.

[0126] In a possible design, the server unlocks the first document after the lock validity period expires, and the target client cannot edit the first document and exits the editing interface.

[0127] An embodiment of the present application provides a document collaborative processing method, in which a target client initiates a lock request for a first document to a server, and the lock request carries the respective identifiers of the target client and the first document; when the first document has not been locked in advance and there is no mutually exclusive lock, the server locks the first document and determines the effective lock duration of the first document; the server generates edit lock attribute information based on the effective lock duration, and feeds back a lock result reply indicating successful locking to the target client; the target client extracts the edit lock attribute information from the lock result reply, and the edit lock attribute information includes the effective lock duration of the first document; the target client edits the first document in the editing interface within the effective lock duration until requesting to unlock the first document and exiting the editing interface. The following technical effects are achieved: when the first document has not been locked in advance and there is no mutual exclusion lock, the server allows the target client to edit the first document, solving the problem of poor data consistency; when the first document is locked in advance or has a mutual exclusion lock, a locking result reply indicating a locking failure is fed back to the target client, helping the user understand the editing status of the first document, solving the problem that when handling editing conflicts, the user lacks clear prompts, affecting the user experience; when receiving the locking result reply indicating a successful locking, the editing interface of the first document is entered, and the first document is edited in the editing interface, solving the problem of the user's failed attempt to save the modified document, and further improving the user experience.

[0128] Figure 3 Schematic diagram of the process of document collaborative processing method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, in a possible design, the target client in S209 edits the first document in the editing interface within the effective lock time, including:

[0129] S301. The target client initiates a renewal lock request for the first document to the server at a preset time interval.

[0130] Specifically, the target client sends a renewal lock request for the first document to the server at every preset time T2 to extend the lock validity period. For example, the lock validity period T1 is 30 seconds, the preset time T2 is less than the lock validity period T1, and the lock validity period T1 is 10 seconds.

[0131] Furthermore, the renewal lock request carries an edit lock identifier of the first document.

[0132] S302: When receiving a renewal lock request for a first document initiated by a target client, the server extracts an edit lock identifier of the first document from the renewal lock request.

[0133] Specifically, when the server receives the renewal lock request for the first document, it renews the first document. Before verifying the edit lock identifier of the first document, it extracts the edit lock identifier of the first document from the renewal lock request and checks whether the first document is being edited by the target client.

[0134] When the first document has not been edited by the target client, the renewal lock request is marked as an invalid request, and the edit lock identifier is marked as an invalid identifier.

[0135] S303: The server verifies the edit lock identifier of the first document.

[0136] Specifically, when the first document is edited by the target client, the server verifies the edit lock identifier of the first document, that is, compares it with the information of the target client.

[0137] S304: When the editing lock identifier of the first document is verified, the server renews the effective lock period of the first document.

[0138] Specifically, when the edit lock identifier of the first document is verified to be consistent with the information of the target client, the server renews the effective lock duration of the first document, that is, re-updates the time to T1.

[0139] In a possible design, when the server fails to renew the lock validity period of the first document within the lock validity period, the first document is unlocked. The reason for not renewing the lock may be that the edit lock mark verification of the first document fails, or the server fails to receive the lock request of the first document initiated by the target client due to exiting the editing interface, network failure or client failure.

[0140] S305. The server feeds back a renewal lock result reply indicating successful renewal to the target client.

[0141] In one possible design, when the edit lock identifier verification of the first document fails, the server marks the renewal lock request as an invalid request and marks the edit lock identifier as an invalid identifier, and the server feeds back a renewal lock result reply indicating the renewal failure to the target client.

[0142] S306: The target client receives a renewal lock result reply fed back by the server.

[0143] The renewal lock result reply is used to indicate whether the renewal is successful.

[0144] S307: When the renewal lock result reply indicates that the renewal is successful, the target client updates the lock validity period.

[0145] Specifically, when the renewal lock result reply indicates that the renewal is successful, the target client updates the effective lock duration of the first document, that is, re-updates the time to T1. After this and before T2, the target client can continue to edit the first document; at T2, the target client needs to re-initiate a renewal lock request for the first document to the server until the target client requests to unlock the first document and exits the editing interface.

[0146] S308: The target client edits the first document in the editing interface within the updated lock validity period.

[0147] The technical effect of the embodiment of the present application is: through the renewal lock mechanism that interacts between the client and the server, the lock validity period is regularly updated and dynamically extended to ensure that the user does not lose editing permissions due to lock timeout when editing the document, thereby further improving the user experience; when the server does not renew the lock validity period within the lock validity period, the first document is unlocked, thereby avoiding abnormal occupation of documents and improving the operating efficiency of the business management system.

[0148] In a possible design, S205, the server generates edit lock attribute information according to the lock validity period, including:

[0149] S2051. Detect and obtain several second documents associated with the first document.

[0150] S2052: Lock each second document, and generate an edit lock identifier for the first document and each second document.

[0151] S2053: Generate edit lock attribute information according to the lock validity period and the edit lock identifiers of the first document and each second document.

[0152] Specifically, when the target client attempts to edit the first document, in some cases, the editing operation may need to span multiple levels. For example, when editing a specific journal voucher document, the server needs to perform a double locking operation, locking both the voucher document itself and the journal batch document to which it belongs, to prevent other clients from modifying the batch document and the voucher detail documents in the batch document at the same time, because the voucher detail documents in the batch document may directly reference the specific content of the voucher document. Therefore, the server automatically identifies several second documents associated with the first document through cross-level locking, and then locks each second document to prevent data conflicts. The edit lock attribute information also includes: the edit lock identifiers of the first document and several second documents; wherein each second document is a document associated with the first document, and each second document is successfully locked by the server.

[0153] After the target client extracts the edit lock attribute information from the lock result reply in S208, the method further includes: the target client stores the edit lock identifiers of the first document and each second document in the edit lock manager.

[0154] The target client in S301 initiates a renewal lock request for the first document to the server, including: initiating a renewal lock request for the document corresponding to each edit lock identifier stored in the edit lock manager to the server.

[0155] Specifically, the number of the plurality of second documents may be zero, in which case there is no second document associated with the first document; the number of the plurality of second documents may be one, in which case there is one second document associated with the first document; the number of the plurality of second documents may be multiple, in which case there are multiple second documents associated with the first document.

[0156] The effective lock duration of each of the plurality of second documents is the same as that of the first document, so as to ensure that when the first document is locked, the plurality of second documents are also locked. When the target client initiates a renewal lock request for the first document to the server, it also initiates a renewal lock request for the first document and each of the second documents to the server.

[0157] Considering that the target client may edit multiple documents at the same time, for example, edit the first document and the fourth document at the same time, the editing lock manager includes: the editing lock identifiers of the first document and each second document, and the editing lock identifiers of the fourth document and each fifth document; wherein each fifth document is a document associated with the fourth document. In order to ensure that the effective lock duration of these documents can be updated in a timely manner, the target client initiates a renewal lock request for the document corresponding to each editing lock identifier stored in the editing lock manager to the server. Accordingly, when the server receives these renewal lock requests, it renews the effective lock duration of each document; the renewal result reply fed back by the server carries the editing lock identifiers of the documents that have been successfully renewed, and the editing lock identifiers of the documents that have failed to be renewed. According to the renewal result reply, the target client deletes the editing lock identifiers corresponding to the documents that have failed to be renewed in the editing lock manager.

[0158] The technical effect of the embodiment of the present application is: the server locks each second document, and the target client simultaneously initiates a renewal lock request for the document corresponding to each edit lock identifier stored in the edit lock manager, ensuring cross-level locking of the document and avoiding data conflicts and overwriting.

[0159] In a possible design, the first document includes multiple levels of hierarchy, and the target level is any level of the multiple levels of hierarchy;

[0160] When the target client edits the target level of the first document, the method further includes:

[0161] Detecting a plurality of third documents associated with a target level of the first document;

[0162] Each third document is locked until the target client finishes editing the target level.

[0163] Specifically, when the target client edits the target level of the first document, the server will automatically identify all the lower-level documents associated with it through hierarchical locking, and lock these documents at the same time. For example, when the first document is a journal batch document, the server will identify all journal voucher documents and voucher detail documents of the batch document, that is, the third document.

[0164] The generation, reply and renewal of the edit lock identification of the plurality of third documents are similar to those of the plurality of second documents, and will not be described in detail in this embodiment.

[0165] The technical effect of the embodiment of the present application is that the server locks each third document, ensuring hierarchical locking of the documents and further avoiding data conflicts and overwriting.

[0166] Figure 4 Schematic diagram of the process of document collaborative processing method provided in the embodiment of the present application Figure 3 .like Figure 4 As shown, in a possible design, when the target client exits the editing interface, cancels document editing, switches login roles, or submits a document, it requests to unlock the first document. Then the request to unlock the first document and exit the editing interface in S209 includes:

[0167] S401: The target client initiates an unlocking request for a first document to a server.

[0168] S402: When receiving the unlock request for the first document initiated by the target client, the server extracts the edit lock identifier of the first document from the unlock request.

[0169] S403: The server verifies the edit lock identifier of the first document.

[0170] S404: When the editing lock identifier of the first document is verified to be successful, the server unlocks the first document.

[0171] S405. The server feeds back an unlock result reply indicating successful unlocking to the target client.

[0172] In one possible design, when the editing lock identifier verification of the first document fails, the server marks the unlock request as an invalid request and marks the editing lock identifier as an invalid identifier, and the server feeds back an unlock result reply indicating the unlock failure to the target client.

[0173] In one possible design, when the target client requests to unlock, if the first document has been unlocked by the server because it is not within the effective lock period, the server will feedback to the target client an unlock result reply indicating the unlocking failure and the reason for the unlocking failure, indicating that the first document has been unlocked.

[0174] In one possible design, when the first document is unlocked, the server automatically unlocks each second document and each third document, and allows other clients to access the previously locked documents.

[0175] S406: The target client receives the unlock result reply fed back by the server.

[0176] The unlock result reply is used to indicate whether the unlock is successful.

[0177] S407: When the unlock result reply indicates that the unlocking is successful, the target client exits the editing interface.

[0178] S401-S407 are similar to S301-S308 and will not be described in detail in this embodiment.

[0179] The technical effect of the embodiments of the present application is: through the locking, unlocking and renewal lock mechanism, the document editing permissions can be dynamically adjusted according to different business needs, thereby improving the flexibility of document collaborative processing; when the first document is unlocked, the server will automatically unlock each second document and each third document, thereby avoiding the situation where other clients cannot obtain the lock due to waiting timeout.

[0180] In other embodiments, the document collaborative processing method is based on a database transaction management mechanism.

[0181] Specifically, when the target client initiates a lock request for the first document, a database transaction is started. The server executes an exclusive lock in the database, such as SELECT ...FOR UPDATE in SQL, to ensure that only the current user can edit the first document on the target client during the transaction. The target client periodically sends renewal requests to the server, and the server maintains the validity of the lock by extending the transaction timeout. After the target client completes the editing, it commits the transaction to release the lock. If the transaction times out or the target client is abnormally interrupted, the database automatically rolls back the transaction to release the lock.

[0182] In other embodiments, the document collaborative processing mode is based on timestamp and version number control.

[0183] Specifically, when the target client initiates a lock request for the first document, it obtains the current timestamp and version number of the first document. The target client periodically sends a renewal request to the server, and the server updates the timestamp and version number to maintain the validity of the lock. When the target client requests to unlock the first document, the server verifies the timestamp and version number. If the timestamp or version number does not match, it means that the first document has been modified by other clients, and the submission is rejected. If the target client is abnormally interrupted, the server automatically releases the lock after a certain period of time.

[0184] The following is a specific example provided by the embodiment of the present application, which is applied to the editing of journal documents in a financial system. User A attempts to edit a journal batch document 1001, which includes multiple journal voucher documents (such as voucher documents 1001-1 and 1001-2, etc.). The locking process of the batch document 1001 includes the following steps:

[0185] S511 , user A initiates a lock request for batch document 1001 on client I.

[0186] S512. The server generates a lock key value, which is: LOCK EDIT-Finance-Diary Batch Document 1001 (and the edit lock identifier), and checks whether the batch document 1001 has been locked before and whether there is a mutex lock. If the batch document 1001 has not been locked before and there is no mutex lock, the batch document 1001 is locked. At the same time, the server locks all journal voucher documents contained in the batch document 1001.

[0187] S513. The server determines that the effective lock duration of the batch document 1001 is 30 seconds.

[0188] S514. The server feeds back a locking result reply to the client I to indicate that the locking was successful.

[0189] S515. Client I adds the edit lock identifiers of batch document 1001 and all journal voucher documents thereof to the lock manager, and client I enters and displays the edit interface.

[0190] The batch document 1001 renewal lock process includes the following steps:

[0191] S521. Client I initiates a renewal lock request to the server every 10 seconds, and the request includes the editing lock identifiers of the batch document 1001 and all its journal voucher documents.

[0192] S522. The server receives the renewal lock request, checks the edit lock identifier, and confirms that it is consistent with the identifier of client I. It then updates the lock validity period of the first document to 30 seconds, and feeds back a renewal lock result reply indicating successful renewal to client I.

[0193] The batch document 1001 unlocking process includes the following steps:

[0194] S531. Client I initiates an unlock request to the server, the request including the edit lock identifiers of batch document 1001 and all its journal voucher documents.

[0195] S532. The server receives the unlock request, checks the edit lock identifier, and confirms that it is consistent with the identifier of client I, then unlocks the batch document 1001 and all its journal voucher documents.

[0196] It should be noted that during the locking process, the server locks batch document 1001 and all its journal voucher documents at the same time. If other users request to edit voucher document 1001-1 of batch document 1001, the editing of voucher document 1001-1 will fail due to multi-dimensional locking. When batch document 1001 is locked and unlocked for renewal, the server will lock and unlock all its journal voucher documents for renewal at the same time.

[0197] The following is another specific example provided by the embodiment of the present application, which is also applied to the editing of journal documents in a financial system. User A and user B simultaneously try to edit the journal batch document 2001. The locking process of the batch document 2001 includes the following steps:

[0198] S511, user A first initiates a lock request for batch document 2001, and the lock is successful, and client I enters and displays the editing interface.

[0199] S512 : User B then initiates a lock request for the batch document 2001 .

[0200] S513. The server checks that the batch document 2001 has been locked before, and then feeds back a locking result reply indicating a locking failure to the client II, prompting that the batch document 2001 is being edited by the user A on the client I.

[0201] The renewal lock process of batch document 2001 is similar to the renewal lock process of batch document 1001, and will not be described in detail in this embodiment.

[0202] The batch document 2001 unlocking process includes the following steps:

[0203] S521, user A completes editing and submits, and client I initiates an unlock request for batch document 2001 to the server.

[0204] S522, the server receives the unlock request, checks the edit lock identifier, and confirms that it is consistent with the identifier of the client I, then unlocks the batch document 2001.

[0205] S523, user B initiates a lock request for batch document 2001 again, and the lock is successful. Client II enters and displays the editing interface.

[0206] The present application also provides a business management system. Figure 1 As shown, the system includes: a server and multiple clients;

[0207] The server communicates with multiple clients at the same time;

[0208] Each client is used to implement the document collaborative processing method of the above embodiment;

[0209] The server is used to implement the document collaborative processing method of the above embodiment.

[0210] The business management system provided in the embodiment of the present application can be executed Figures 2 to 4 The technical solution of the method embodiment shown in the figure has the same implementation principle and technical effect as Figures 2 to 4 The method embodiments shown are similar and will not be described in detail in the embodiments of the present application.

[0211] Figure 5 A schematic diagram of the structure of the document collaborative processing device provided in the embodiment of the present application Figure 1 ,like Figure 5 As shown, in the embodiment of the present application, the business management system includes a server and multiple clients, the target client is any one of the multiple clients, and the device is located at the target client, then the device includes:

[0212] The lock request module 510 is used to initiate a lock request of the first document to the server to request to enter the editing interface of the first document; wherein the lock request carries the identifiers of the target client and the first document respectively;

[0213] The locking determination module 520 is used to receive the locking result reply fed back by the server; wherein the locking result reply is used to indicate whether the locking is successful;

[0214] The attribute extraction module 530 is used to extract the edit lock attribute information from the lock result reply when the lock result reply indicates that the lock is successful; wherein the edit lock attribute information includes the lock validity period of the first document;

[0215] The first editing module 540 is used to edit the first document in the editing interface within the locking effective time, until a request is made to unlock the first document and exit the editing interface.

[0216] The document collaborative processing device provided in the embodiment of the present application can execute Figure 2 The technical solution of the method embodiment shown in the figure has the same implementation principle and technical effect as Figure 2 The method embodiments shown are similar and will not be described in detail in the embodiments of the present application.

[0217] At the same time, the document collaborative processing device provided in the embodiment of the present application is further refined on the basis of the document collaborative processing device provided in the embodiment of the previous application.

[0218] In a possible design, the first editing module 540 includes:

[0219] A renewal request module, configured to initiate a renewal lock request for the first document to the server at every preset time interval; wherein the preset time interval is less than the effective time interval of the lock;

[0220] The renewal confirmation module is used to receive the renewal lock result reply fed back by the server; wherein the renewal lock result reply is used to indicate whether the renewal is successful;

[0221] The duration update module is used to update the effective duration of the lock when the renewal lock result reply indicates that the renewal is successful;

[0222] The second editing module is used to edit the first document in the editing interface within the updated locking validity period.

[0223] In a possible design, the edit lock attribute information further includes: an edit lock identifier of each of the first document and a plurality of second documents; wherein each of the second documents is a document associated with the first document, and each of the second documents is successfully locked by the server;

[0224] The device further includes: an identification storage module, for storing the edit lock identification of the first document and each second document respectively in the edit lock manager;

[0225] The renewal request module is specifically used to initiate a renewal lock request for the document corresponding to each edit lock identifier stored in the edit lock manager to the server.

[0226] In a possible design, the first editing module 540 includes:

[0227] An unlock request module, used to initiate an unlock request for the first document to the server;

[0228] The unlocking confirmation module is used to receive the unlocking result reply fed back by the server; wherein the unlocking result reply is used to indicate whether the unlocking is successful;

[0229] Exit the editing module, used to exit the editing interface when the unlock result reply indicates that the unlocking is successful.

[0230] The document collaborative processing device provided in the embodiment of the present application can execute Figures 2 to 4 The technical solution of the method embodiment shown in the figure has the same implementation principle and technical effect as Figures 2 to 4 The method embodiments shown are similar and will not be described in detail in the embodiments of the present application.

[0231] Figure 6 A schematic diagram of the structure of the document collaborative processing device provided in the embodiment of the present application Figure 2 ,like Figure 6 As shown, in the embodiment of the present application, the business management system includes a server and multiple clients, and the device is located at the server, and the device includes:

[0232] A first checking module 610 is configured to check whether the first document has been previously locked upon receiving a lock request for the first document initiated by a target client; wherein the target client is any one of the multiple clients;

[0233] A second checking module 620, configured to check whether the first document has a mutex lock when the first document has not been locked previously;

[0234] A first locking module 630, configured to lock the first document when the first document has no mutually exclusive lock, and determine a valid locking time of the first document;

[0235] The lock reply module 640 is used to generate the edit lock attribute information according to the lock validity period, and to feed back a lock result reply indicating that the lock is successful to the target client; wherein the lock result reply carries the edit lock attribute information.

[0236] The document collaborative processing device provided in the embodiment of the present application can execute Figure 2 The technical solution of the method embodiment shown in the figure has the same implementation principle and technical effect as Figure 2 The method embodiments shown are similar and will not be described in detail in the embodiments of the present application.

[0237] At the same time, the document collaborative processing device provided in the embodiment of the present application is further refined on the basis of the document collaborative processing device provided in the embodiment of the previous application.

[0238] In one possible design, the lock reply module 640 includes:

[0239] A first detection module, used to detect and obtain a plurality of second documents associated with the first document;

[0240] A second locking module, used to lock each second document and generate an editing lock identifier for the first document and each second document;

[0241] The attribute generation module is used to generate edit lock attribute information according to the lock validity period and the edit lock identifiers of the first document and each second document.

[0242] In one possible design, the device further includes:

[0243] An identifier extraction module, used to extract an edit lock identifier of the first document from a renewal lock request or an unlock request;

[0244] An identification verification module, used to verify the edit lock identification of the first document;

[0245] The duration renewal module is used to renew the effective lock duration of the first document when the editing lock identifier of the first document is verified, and to feedback a renewal lock result reply indicating successful renewal to the target client, or to unlock the first document and feedback an unlock result reply indicating successful unlocking to the target client.

[0246] In one possible design, the device further includes:

[0247] A first feedback module is used to feed back a lock result reply indicating a lock failure to the target client when the first document is previously locked or has a mutex lock; wherein the lock result reply carries a lock failure reason and a reason description, and the reason description is used to indicate an identifier of the client that is editing the first document;

[0248] A second feedback module is used to feed back to the target client a renewal lock result reply indicating a renewal failure, or an unlock result reply indicating an unlock failure, when the editing lock identifier verification of the first document fails;

[0249] The invalid unlocking module is used to unlock the first document when the locking validity period of the first document is not renewed within the locking validity period.

[0250] In a possible design, the first document includes multiple levels of hierarchy, and the target level is any level of the multiple levels of hierarchy;

[0251] When the target client edits the target level of the first document, the device further includes:

[0252] A second detection module is used to detect and obtain a plurality of third documents associated with the target level of the first document;

[0253] The third locking module is used to lock each third document until the target client finishes editing the target level.

[0254] The document collaborative processing device provided in the embodiment of the present application can execute Figures 2 to 4 The technical solution of the method embodiment shown in the figure has the same implementation principle and technical effect as Figures 2 to 4 The method embodiments shown are similar and will not be described in detail in the embodiments of the present application.

[0255] The present application also provides an electronic device, Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7As shown, the electronic device includes: the electronic device includes: at least one processor 710 and a memory 720. The electronic device also includes a communication component 730. The processor 710, the memory 720 and the communication component 730 are connected via a bus 740.

[0256] In a specific implementation process, at least one processor 710 executes the computer execution instructions stored in the memory 720, so that the at least one processor 710 is used to implement the document collaborative processing method of the above embodiment.

[0257] The specific implementation process of the processor 710 can be found in the above-mentioned method embodiment, and its implementation principle and technical effect are similar, so the embodiments of the present application will not be repeated here.

[0258] In the above embodiment, it should be understood that the processor 710 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0259] The memory 720 may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.

[0260] The bus 740 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 740 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus 740 in the drawings of the present application is not limited to only one bus or one type of bus.

[0261] The above functions implemented by the electronic device and the main control device introduce the scheme provided by the embodiment of the present application. It is understandable that in order to implement the above functions, the electronic device or the main control device includes a hardware structure and / or software module corresponding to each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in the embodiment of the present application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present application.

[0262] The embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the document collaborative processing method of the above embodiment. In the specific implementation of the above document collaborative processing method, each module can be implemented as a processor.

[0263] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0264] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in an electronic device or a main control device.

[0265] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the document collaborative processing method of the above embodiment.

[0266] The computer program is stored in a readable storage medium. At least one processor can read the computer program from the readable storage medium. At least one processor executes the computer program to execute the solution provided in any of the above embodiments.

[0267] A person skilled in the art can understand that all or part of the steps of implementing the above-mentioned application embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiment are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc., various media that can store program codes.

[0268] So far, the technical solution of the present application has been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments, and the above embodiments are only used to illustrate the technical solution of the present application rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A document collaborative processing method, characterized in that: The business management system includes a server and multiple clients, the target client is any one of the multiple clients, and the method is applied to the target client, then the method includes: Initiating a lock request for the first document to the server to request to enter the editing interface of the first document; wherein the lock request carries the respective identifiers of the target client and the first document; Receive a locking result reply fed back by the server; wherein the locking result reply is used to indicate whether the locking is successful; When the lock result reply indicates that the lock is successful, extracting the edit lock attribute information from the lock result reply; wherein the edit lock attribute information includes the effective lock duration of the first document; Within the lock validity period, the first document is edited in the editing interface until a request is made to unlock the first document and the editing interface is exited.

2. The method according to claim 1, characterized in that The editing of the first document in the editing interface within the locking validity period includes: Initiate a renewal lock request for the first document to the server at every preset time interval; wherein the preset time interval is less than the lock validity time interval; receiving a renewal lock result reply fed back by the server; wherein the renewal lock result reply is used to indicate whether the renewal is successful; When the renewal lock result reply indicates that the renewal is successful, updating the lock validity period; The first document is edited in the editing interface within the updated lock validity period.

3. The method according to claim 2, characterized in that The edit lock attribute information also includes: edit lock identifiers of the first document and a plurality of second documents; wherein each of the second documents is a document associated with the first document, and each of the second documents is successfully locked by the server; After extracting the edit lock attribute information from the lock result reply, the method further includes: storing the edit lock identifier of the first document and each copy of the second document in the edit lock manager; The initiating a renewal lock request for the first document to the server includes: A renewal lock request for the document corresponding to each edit lock identifier stored in the edit lock manager is initiated to the server.

4. The method according to claim 1, characterized in that: The request to unlock the first document and exit the editing interface includes: Initiating an unlocking request for the first document to the server; Receive an unlock result reply fed back by the server; wherein the unlock result reply is used to indicate whether the unlocking is successful; When the unlock result reply indicates that the unlocking is successful, exit the editing interface.

5. A document collaborative processing method, characterized in that: The business management system includes a server and multiple clients. The method is applied to the server, and the method includes: Upon receiving a lock request for a first document initiated by a target client, checking whether the first document has been locked previously; wherein the target client is any one of the multiple clients; When the first document has not been locked in advance, checking whether the first document has a mutex lock; When the first document does not have a mutually exclusive lock, locking the first document and determining a valid locking time of the first document; According to the locking validity period, the editing lock attribute information is generated, and a locking result reply indicating that the locking is successful is fed back to the target client; wherein the locking result reply carries the editing lock attribute information.

6. The method according to claim 5, characterized in that The generating of the edit lock attribute information according to the lock validity period includes: Detecting and obtaining a plurality of second documents associated with the first document; Locking each copy of the second document, and generating respective edit lock identifiers for the first document and each copy of the second document; The edit lock attribute information is generated according to the lock validity period and the edit lock identifiers of the first document and each copy of the second document.

7. The method according to claim 5, characterized in that When receiving a renewal lock request or an unlock request for the first document initiated by the target client, the method further includes: Extracting the edit lock identifier of the first document from the renewal lock request or the unlock request; Verifying the edit lock identifier of the first document; When the editing lock identifier of the first document is verified, the locking validity period of the first document is renewed, and a renewal lock result reply indicating successful renewal is fed back to the target client, or the first document is unlocked, and an unlock result reply indicating successful unlocking is fed back to the target client.

8. The method according to claim 7, characterized in that The method further comprises: When the first document is locked in advance or has a mutex lock, feeding back a lock result reply indicating a lock failure to the target client; wherein the lock result reply carries a lock failure reason and a reason description, and the reason description is used to indicate an identifier of the client that is editing the first document; When the verification of the edit lock identifier of the first document fails, feeding back to the target client a renewal lock result reply indicating a renewal failure, or an unlock result reply indicating an unlock failure; When the locking validity period of the first document is not renewed within the locking validity period, the first document is unlocked.

9. The method according to claim 5, characterized in that The first document includes multiple levels, and the target level is any level in the multiple levels; When the target client edits the target level of the first document, the method further includes: Detecting and obtaining a plurality of third documents associated with a target level of the first document; Each of the third documents is locked until the target client finishes editing the target level.

10. A business management system, characterized in that: include: Server and multiple clients; The server is simultaneously connected to the multiple clients for communication; Each of the clients is used to implement the document collaborative processing method according to any one of claims 1 to 4; The server is used to implement the document collaborative processing method as described in any one of claims 5 to 9.

Citation Information

Cited By

  • Online document processing method and system based on document processing model

    CN120337879A