A method, device, equipment and storage medium for multi-person collaborative report processing

By generating report transaction IDs on the server and creating a Buffer, the data synchronization of other clients in multi-person collaborative report processing is achieved quickly, solving the problem of low report editing efficiency under multi-person collaboration, and achieving efficient data synchronization.

CN119005149BActive Publication Date: 2025-03-25HANGZHOU NEWGRAND TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411488672.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-03-25
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

When multiple people collaborate to process reports, how to quickly realize data synchronization of other clients to ensure the efficiency of report editing.

Method used

By generating a report transaction ID on the server, creating a read cache area Buffer and a write buffer, writing branch transactions are written to the write buffer, and the transaction log in the current log file is read to the read buffer, and the report data is synchronized based on the write buffer and the read buffer.

Benefits of technology

It realizes efficient synchronization of report data between multiple collaborators, improving the efficiency of report editing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005149B_ABST
    Figure CN119005149B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for multi-person collaborative report processing. The method for multi-person collaborative report processing includes: in response to a request for obtaining a report transaction ID initiated by a client for a report to be edited, generating a report transaction ID according to the transaction status of the report to be edited and feeding it back to the client; in response to receiving a branch transaction and a branch transaction ID uploaded by a user, creating a read buffer and a write buffer with the report transaction ID as an identifier; the branch transaction ID includes the original report transaction ID and the number of the branch transaction; writing the branch transaction to the write buffer, and reading the transaction log in the current log file to the read buffer; based on the branch transaction and the branch transaction ID in the write buffer, and the transaction log in the read buffer, synchronizing the current report data. The technical solution of the embodiment of the present invention can improve the efficiency of data synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for multi-person collaborative report processing. Background Art

[0002] With the development of Internet technology, remote collaborative office mode is becoming more and more common in work scenarios. For example, multi-person collaborative report processing can support multiple users to edit reports through the client.

[0003] When multiple people are working on a report, it is necessary to synchronize the editing operations performed by the user to other clients through the server. When multiple people are working on a report at the same time, how to quickly synchronize data from other clients is very important to ensure the efficiency of completing the report editing work. Summary of the invention

[0004] The present invention provides a multi-person collaborative report processing method, device, equipment and storage medium to ensure the efficiency of report editing work.

[0005] According to one aspect of the present invention, a method for processing reports by multiple people in collaboration is provided, which is applied to a server and includes:

[0006] In response to a request for obtaining a report transaction ID initiated by a client for a report to be edited, generating a report transaction ID according to a transaction status of the report to be edited and feeding it back to the client;

[0007] In response to receiving the branch transaction and branch transaction ID uploaded by the user, a read buffer and a write buffer are created with the report transaction ID as an identifier; the branch transaction ID includes the original report transaction ID and the branch transaction number;

[0008] Write the branch transaction into the write buffer, and read the transaction log in the current log file into the read buffer;

[0009] Based on the branch transaction and branch transaction ID in the write buffer and the transaction log in the read buffer, data synchronization is performed on the current report.

[0010] According to another aspect of the present invention, a report processing device for multi-person collaboration is provided, comprising:

[0011] A report transaction ID generation module, configured to respond to a report transaction ID acquisition request initiated by a client for a report to be edited, generate a report transaction ID according to the transaction status of the report to be edited, and return the ID to the client;

[0012] A buffer creation module, configured to create a read buffer and a write buffer in response to receiving a branch transaction and a branch transaction ID uploaded by a user, using the report transaction ID as an identifier; the branch transaction ID includes the original report transaction ID and the branch transaction number;

[0013] A transaction writing module is used to write the branch transaction into a write buffer and read the transaction log in the current log file into a read buffer;

[0014] The data synchronization module is used to synchronize the data of the current report based on the branch transaction and the branch transaction ID in the write buffer and the transaction log in the read buffer.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the multi-person collaborative report processing method described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the multi-person collaborative report processing method described in any embodiment of the present invention when executed.

[0020] According to another aspect of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the multi-person collaborative report processing method of any embodiment of the present disclosure is implemented.

[0021] According to the technical solution of the embodiment of the present invention, the server responds to a report transaction ID acquisition request initiated by the client for the report to be edited, generates a report transaction ID and feeds it back to the client according to the transaction status of the report to be edited, and in response to receiving a branch transaction and a branch transaction ID uploaded by the user, creates a read buffer and a write buffer with the report transaction ID as an identifier, writes the branch transaction into the write buffer, and reads the transaction log in the current log file into the read buffer; based on the branch transaction and the branch transaction ID in the write buffer, and the transaction log in the read buffer, the current report is synchronized with data, so that report data synchronization between multiple collaborators can be efficiently performed.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 This is a flowchart of a report processing method for multi-person collaboration provided according to the first embodiment of the present invention;

[0025] Figure 2 is a flowchart of a multi-person collaborative report processing method provided according to Embodiment 2 of the present invention;

[0026] Figure 3 This is a schematic diagram of the structure of a multi-person collaborative report processing device provided according to Embodiment 3 of the present invention;

[0027] Figure 4 It is a structural schematic diagram of an electronic device for implementing the multi-person collaborative report processing method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 A flowchart of a multi-person collaborative report processing method is provided for the first embodiment of the present invention. This embodiment is applicable to the situation where report data is synchronized through log files. The method can be executed by a multi-person collaborative report processing device. The multi-person collaborative report processing device can be implemented in the form of hardware and / or software. The multi-person collaborative report processing device can be configured in various general-purpose computing devices. Figure 1 As shown, the method includes:

[0032] S110 . In response to a request for obtaining a report transaction ID initiated by a client for a report to be edited, a report transaction ID is generated according to a transaction status of the report to be edited and is fed back to the client.

[0033] The report to be edited is an online report that supports collaborative processing by multiple users through different clients. A report transaction is a transaction submitted by a user on the client to edit the report to be edited. For example, a report transaction is a transaction submitted by a user to the server through client A to delete cells A2 and B3 in the report to be edited, wherein the transaction to delete cell A2 and the transaction to delete cell B3 can be a branch transaction of a report transaction.

[0034] The report transaction ID is the number of times multiple users apply for a transaction on the same report to be edited. For example, each client will apply for a report transaction ID from the server before uploading the modified content. Each time the server receives the application, it finds the current report transaction ID of the report based on the report ID contained in the application, adds 1 to it, and then feeds back to the client that currently applies for the report transaction ID.

[0035] After the report is created, when the user opens the report to be edited on the client, the client will perform initialization operations. Specifically, the latest version of the report to be edited is loaded according to the currently stored snapshot file. When the client opens the report to be edited, a long connection is established with the server. After the long connection is established, a request to obtain the report transaction ID is initiated to the server, and the request includes the report ID of the report to be edited. The back-end server searches for the number of transactions that each client has applied for the report to be edited based on the report ID of the report to be edited, and generates a report transaction ID. For example, for the report to be edited, multiple clients have applied for 5 transactions, and the currently generated report transaction ID is 6. At the same time, the service also generates a snapshot file with the report ID file name ending with fri, as well as a transaction file named after the report ID.

[0036] In the embodiment of the present invention, after obtaining the report transaction identification ID acquisition request initiated by the client for the report to be edited, the server first obtains the report ID contained in the report transaction ID acquisition request. Further, according to the report ID, the report transaction ID currently maintained by the server and associated with the report ID is queried. For example, the currently maintained report transaction ID is 3. Finally, 3 is added by 1, and the report transaction ID is 4, which is fed back to the client.

[0037] S120 . In response to receiving the branch transaction and branch transaction ID uploaded by the user, a read buffer and a write buffer are created with the report transaction ID as an identifier; the branch transaction ID includes the original report transaction ID and the branch transaction number.

[0038] When the client edits the report to be edited, it will create a branch transaction ID for the branch transaction of the edited report based on the pre-acquired report transaction ID (hereinafter referred to as the original report transaction ID). For example, the original report transaction ID requested by the client from the server during the initialization process is 4. The client user modifies cells A2 and B3 of the report to be edited. The branch transaction ID corresponding to the branch transaction modified in cell A2 is 4-1, and the branch transaction corresponding to the branch transaction modified in cell B3 is 4-2. The client will upload the branch transaction ID and branch transaction to the server to instruct the server to synchronize the report data.

[0039] In the embodiment of the present invention, after receiving the branch transaction and branch transaction ID uploaded by the user, the server uses the report transaction ID as an identifier to create a log double buffer, specifically a read buffer and a write buffer.

[0040] S130: Write the branch transaction into the write buffer, and read the transaction log in the current log file into the read buffer.

[0041] In the embodiment of the present invention, the branch transaction is written into the write buffer, and then the transaction log in the current log file is read into the read buffer. Exemplarily, the branch transactions 4-1 and 4-2 can be written into the write buffer in the order of the branch transaction numbers. Further, the transaction log in the current log file of the server is read into the read buffer, for example, the transaction logs are 3-1, 3-2, etc.

[0042] S140: Based on the branch transaction and branch transaction ID in the write buffer and the transaction log in the read buffer, synchronize the data of the current report.

[0043] In an embodiment of the present invention, data synchronization can be performed on the current report based on the branch transaction and branch transaction ID in the write buffer and the transaction log in the read buffer. Specifically, the main transaction ID associated with the branch transaction can be determined based on the branch transaction ID in the write buffer, which is subsequently referred to as the first original report transaction ID, and the transaction log is searched in the read buffer.

[0044] If there is no transaction log in the read buffer, it means that the report to be edited has not changed. The branch transaction can be directly written to the read buffer for subsequent data synchronization.

[0045] If there is a transaction log in the read buffer, the second original report transaction ID associated with the transaction log is obtained. If the value of the first original report transaction ID (for example, 4) is smaller than the second original report transaction ID (for example, 5), it means that in the time interval from the current client applying for the report transaction ID to uploading the branch transaction, another client has uploaded the branch transaction. The current client may have network problems such as disconnection. In this case, the branch transaction uploaded by the current client can be directly discarded.

[0046] If the value of the first original report transaction ID (for example, 4) is greater than the second original report transaction ID (for example, 3), it indicates that no other client has uploaded a branch transaction in the time interval from the current client applying for the report transaction ID to uploading the branch transaction, and the read buffer can be updated according to the branch transaction uploaded by the current user.

[0047] When the value of the first original report transaction ID (for example, 4) is equal to the second original report transaction ID (for example, 4), it means that while the current client is uploading a branch transaction, other clients are also uploading branch transactions. At this time, you can further compare the time interval between the time when the two initiate branch transactions to the server and the creation time of the first original report transaction ID. If the time interval between the time when the current client uploads the time-sharing transaction and the creation time of the first original report transaction ID is longer, it means that the current client is a later application, and you can directly replace the transaction log in the read buffer with the branch transaction to update the read buffer.

[0048] According to the technical solution of the embodiment of the present invention, the server responds to a report transaction ID acquisition request initiated by the client for the report to be edited, generates a report transaction ID and feeds it back to the client according to the transaction status of the report to be edited, and in response to receiving a branch transaction and a branch transaction ID uploaded by the user, creates a read buffer and a write buffer with the report transaction ID as an identifier, writes the branch transaction into the write buffer, and reads the transaction log in the current log file into the read buffer; based on the branch transaction and the branch transaction ID in the write buffer, and the transaction log in the read buffer, the current report is synchronized with data, so that report data synchronization between multiple collaborators can be efficiently performed.

[0049] Embodiment 2

[0050] Figure 2 This is a flowchart of a multi-person collaborative report processing method provided in the second embodiment of the present invention. This embodiment further refines the above embodiment and provides specific steps for generating a report transaction ID and feeding it back to the client according to the transaction status of the report to be edited, as well as specific steps for synchronizing the data of the current report based on the branch transaction and branch transaction ID in the write buffer and the transaction log in the read buffer. Figure 2 As shown, the method includes:

[0051] S210 . In response to a request for obtaining a report transaction ID initiated by the client for the report to be edited, a report transaction ID is created according to the current application transaction number of the report to be edited, and the creation time is recorded.

[0052] In an embodiment of the present invention, the server receives a report transaction ID acquisition request initiated by a client for a report to be edited, creates a report transaction ID according to the current number of application transactions of the report to be edited, and records the creation time. Specifically, according to the report ID included in the report transaction ID acquisition request, the number of application transactions of the report to be edited corresponding to the report ID is determined, and according to the number of application transactions, a report transaction ID is created, and the creation time is recorded. For example, if the number of application transactions is 3, the report transaction ID created is the number of application transactions plus 1, that is, the generated report transaction ID is 4.

[0053] S220, determining the time difference between the sending time and the creation time of the report transaction ID, and sending the time difference and the report transaction ID to the client in correspondence, so as to instruct the client to determine the creation time distance that scrolls dynamically over time according to the network request time and the time difference.

[0054] In the embodiment of the present invention, after the report transaction ID is created, the report transaction ID needs to be sent to the client. At this time, the time difference between the sending time and the creation time of the report transaction ID can be calculated, and the time difference and the report transaction ID are sent to the client in correspondence. After the client receives the report transaction ID and the time difference, it determines the creation time distance that is dynamically scrolled over time according to the network request time and the time difference.

[0055] For example, the creation time of the report transaction ID on the server is 3:00, and the time when the report transaction ID is sent to the client is 3:10, and the time difference is 10 minutes. The server will send the report transaction ID and 10 minutes to the client. The client will maintain a dynamically rolling creation time distance from the creation of the report transaction ID to the current time, which includes the time difference sent by the server, the communication time consumed during the sending process, and the time rolling.

[0056] S230 . In response to receiving the branch transaction and branch transaction ID uploaded by the user, a read buffer and a write buffer are created with the report transaction ID as an identifier; the branch transaction ID includes the original report transaction ID and the branch transaction number.

[0057] In the embodiment of the present invention, after receiving the branch transaction and branch transaction ID uploaded by the user, the server creates a read buffer and a write buffer using the report transaction ID as an identifier (for example, the original report transaction ID associated with the current branch transaction is 3). The branch transaction ID includes the original report transaction ID and the branch transaction number, for example, 3-1.

[0058] S240: Write the branch transaction into the write buffer, and read the transaction log in the current log file into the read buffer.

[0059] In the embodiment of the present invention, the branch transaction is written into the write buffer, and the transaction log in the current log file is read into the read buffer. The branch transaction can be extracted from the read buffer for report data synchronization later, avoiding repeated disk reading and improving data synchronization efficiency.

[0060] S250: Obtain the first original report transaction ID in the branch transaction ID associated with the branch transaction in the write buffer.

[0061] In the embodiment of the present invention, after writing the branch transaction into the write buffer, in order to perform data synchronization based on the branch transaction, it is necessary to obtain the first original report transaction ID in the branch transaction ID associated with the branch transaction in the write buffer. For example, if the branch transaction IDs associated with the branch transaction in the write buffer are 3-1 and 3-2 respectively, the corresponding first original report transaction ID is 3.

[0062] S260, searching for the transaction log in the read buffer.

[0063] S270: When there is no transaction log in the read buffer, write the branch transaction in the write buffer into the read buffer to obtain an updated read buffer.

[0064] In the embodiment of the present invention, if the transaction log does not exist in the read buffer, it indicates that the report to be edited has not changed, and the branch transaction can be directly written into the read buffer for subsequent report data synchronization.

[0065] S280: When the transaction log exists in the read buffer, obtain a second original report transaction ID associated with the transaction log.

[0066] In the embodiment of the present invention, when there is a transaction log in the read buffer, it is necessary to further obtain the second original report transaction ID associated with the transaction log. For example, if the branch transaction IDs associated with the transaction log in the read buffer are 2-1 and 2-2, then the second original report transaction ID is 2.

[0067] S290: Based on the first original report transaction ID and the second original report transaction ID, the read buffer is updated, and based on the updated read buffer, data synchronization is performed on the current report.

[0068] In the embodiment of the present invention, the read buffer is updated based on the first original report transaction ID and the second original report transaction ID, and the data of the current report is synchronized based on the updated read buffer. Specifically, the larger the value of the original report transaction ID corresponding to the branch transaction, the earlier the original report transaction to which the branch transaction belongs is applied, and the value of the first original report transaction ID is compared with the value of the second original report transaction ID to sort the read buffer, so as to synchronize the data of the current report according to the sorted read buffer.

[0069] After the read buffer is sorted, the amount of data in the current write buffer is obtained. If it exceeds 1,000, a new read buffer is created and the transaction logs in the original read buffer are solidified to disk. Each log file does not exceed 25 KB.

[0070] Optionally, based on the first original report transaction ID and the second original report transaction ID, updating the read buffer includes:

[0071] When the value of the first original report transaction ID is smaller than the value of the second original report transaction ID, the branch transaction in the write buffer is discarded;

[0072] When the value of the first original report transaction ID is greater than the value of the second original report transaction ID, the read buffer is updated based on the branch transaction in the write buffer;

[0073] When the value of the first original report transaction ID is equal to the value of the second original report transaction ID, the read buffer is updated according to the creation time distance of the first original report transaction ID and the creation time distance of the second original report transaction ID.

[0074] In this optional embodiment, a specific method for updating the read buffer based on the first original report transaction ID and the second original report transaction ID is provided: when the value of the first original report transaction ID is less than the value of the second original report transaction ID, it indicates that in the time interval from the current client applying for the report transaction ID to uploading the branch transaction, other clients have uploaded branch transactions, and the current client may have network problems such as disconnection. At this time, the branch transaction uploaded by the current client can be directly discarded.

[0075] When the value of the first original report transaction ID is greater than the value of the second original report transaction ID, it indicates that no other client has uploaded a branch transaction in the time interval from the current client applying for the report transaction ID to uploading the branch transaction. The read buffer can be updated according to the branch transaction uploaded by the current user. Specifically, the branch transaction in the write buffer can be used to replace the transaction log in the read buffer.

[0076] When the value of the first original report transaction ID is equal to the value of the second original report transaction ID, it indicates that while the current client is uploading a branch transaction, other clients are also uploading branch transactions. At this time, the time interval between the time when the two initiate branch transactions to the server and the creation time of the first original report transaction ID can be further compared. If the time interval between the time when the current client uploads the time-sharing transaction and the creation time of the first original report transaction ID is longer, it means that the current client is a later application, and the transaction log in the read buffer can be directly replaced with the branch transaction to update the read buffer.

[0077] In a specific example, when the value of the first original report transaction ID is equal to the value of the second original report transaction ID, the value of the creation time distance of the branch transaction moment uploaded by the client and the creation time distance of the branch transaction moment associated with the transaction log in the read buffer are obtained. The branch transaction with a larger time distance is selected and stored in the read buffer to ensure that the report modification data of the latest modified report is used.

[0078] Optionally, the embodiment of the present invention further includes:

[0079] According to the set time period, obtain the target snapshot file with the largest value of the corresponding report transaction ID, and read the transaction log in the buffer;

[0080] Compare the target value of the report transaction ID corresponding to the target snapshot with the value of the report transaction ID associated with each transaction log, and obtain at least one target transaction log whose value of the report transaction ID is greater than the target value;

[0081] Based on the target snapshot and each target transaction log, data is replayed to obtain the snapshot file associated with each target transaction log;

[0082] In response to a request initiated by a user to obtain a snapshot file, a snapshot file generated by data playback based on a target transaction log with the largest value of a report transaction ID is returned to the client.

[0083] In this optional embodiment, when the user opens the report to be edited for the first time, it is necessary to apply for a snapshot file from the server to play back the data based on the snapshot file, so as to display the latest version of the report to be edited. Specifically, the server will obtain the target snapshot file with the largest value of the corresponding report transaction ID according to the set time period, and read the transaction log in the Buffer. The target value of the report transaction ID corresponding to the target snapshot is compared with the value of the report transaction ID associated with each transaction log, and at least one target transaction log whose value of the report transaction ID is greater than the target value is obtained. Based on the target snapshot and each target transaction log, data playback is performed to obtain the snapshot file associated with each target transaction log. After receiving the user's request to obtain the snapshot file, the snapshot file generated by data playback based on the target transaction log with the largest value of the report transaction ID is returned to the client.

[0084] In a specific example, the server obtains the target snapshot file with the largest value of the corresponding report transaction ID, such as fri-3 (fri-3 indicates the snapshot file with the corresponding report transaction ID value of 3), and reads the transaction logs in the buffer, such as transaction log-4 (transaction log-4 indicates the transaction log with the corresponding report transaction ID value of 4) and transaction log-5, according to the set time period. The target value (3) of the report transaction ID corresponding to the target snapshot is compared with the value (4 and 5) of the report transaction ID associated with each transaction log, and at least one target transaction log with a report transaction ID value greater than the target value is obtained, that is, transaction log-4 and transaction log-5 are both target transaction logs. Based on the target snapshot and each target transaction log, data playback is performed to obtain snapshot files fri-4 and fri-5 associated with each target transaction log. After receiving a request from the user to obtain a snapshot file, the snapshot file (fri-5) generated by data playback based on the target transaction log with the largest value of the report transaction ID (transaction log-5) is returned to the client.

[0085] Optionally, data playback is performed based on the target snapshot and each target transaction log, including:

[0086] Use the position of each cell in the report as the index column;

[0087] The target cell is located according to the index column, and data of the target cell is played back according to the target transaction log associated with the index column.

[0088] In this optional embodiment, a specific method for data playback based on the target snapshot and each target transaction log is provided: the transaction log will contain the position of each cell that needs to be processed in the report, and the position is identified in the form of a two-dimensional array. The position and the cell modification method in the transaction log are stored correspondingly, for example, deleting the content in cell B3. During the data playback process, the position of each cell in the report is used as an index column, and the target cell is located according to the index column. According to the target transaction log associated with the index column, data is played back for the target cell. After the snapshot file is generated, the transaction log that has been played back needs to be deleted.

[0089] Optionally, the embodiment of the present invention further includes:

[0090] In response to the request to pull the transaction log initiated by the client, the transaction log in the current read buffer is fed back to the client to instruct the server to update the local report data according to the transaction log.

[0091] In this optional embodiment, after the non-local client uploads the transaction file to instruct the server to update the report transaction, the local client needs to pull the latest report data from the server. At this time, the client initiates a request to pull the transaction log to the server, and the server responds to the request to pull the transaction log initiated by the client and feeds back the transaction log in the current read buffer to the client. The client plays back the data based on the transaction log in the read buffer, merges the played back report data with the modified data of the local user, and then renders the report.

[0092] According to the technical solution of the embodiment of the present invention, after writing the branch transaction uploaded by the user into the write buffer, the transaction log is searched in the read buffer by obtaining the first original report transaction ID in the branch transaction ID associated with the branch transaction in the write buffer, and then, if the transaction log does not exist in the read buffer, the branch transaction in the write buffer is written into the read buffer to obtain an updated read buffer, or if the transaction log exists in the read buffer, the second original report transaction ID associated with the transaction log is obtained, and the read buffer is updated based on the first original report transaction ID and the second original report transaction ID, and finally, based on the updated read buffer, the current report is synchronized with data, and the use of the buffer does not require frequent hard disk searches, thereby improving data synchronization efficiency.

[0093] Embodiment 3

[0094] Figure 3 This is a schematic diagram of the structure of a multi-person collaborative report processing device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:

[0095] A report transaction ID generating module 310 is used to respond to a report transaction ID acquisition request initiated by a client for a report to be edited, generate a report transaction ID according to the transaction status of the report to be edited, and return the ID to the client;

[0096] The buffer creation module 320 is used to create a read buffer and a write buffer in response to receiving a branch transaction and a branch transaction ID uploaded by a user, using the report transaction ID as an identifier; the branch transaction ID includes the original report transaction ID and the branch transaction number;

[0097] The transaction writing module 330 is used to write the branch transaction into the write buffer and read the transaction log in the current log file into the read buffer;

[0098] The data synchronization module 340 is used to synchronize the data of the current report based on the branch transaction and the branch transaction ID in the write buffer and the transaction log in the read buffer.

[0099] According to the technical solution of the embodiment of the present invention, the server responds to a report transaction ID acquisition request initiated by the client for the report to be edited, generates a report transaction ID and feeds it back to the client according to the transaction status of the report to be edited, and in response to receiving a branch transaction and a branch transaction ID uploaded by the user, creates a read buffer and a write buffer with the report transaction ID as an identifier, writes the branch transaction into the write buffer, and reads the transaction log in the current log file into the read buffer; based on the branch transaction and the branch transaction ID in the write buffer, and the transaction log in the read buffer, the current report is synchronized with data, so that report data synchronization between multiple collaborators can be efficiently performed.

[0100] Optionally, the report transaction ID generating module 310 is specifically used to:

[0101] Create a report transaction ID based on the current application transaction number of the report to be edited, and record the creation time;

[0102] Determine the time difference between the sending time of the report transaction ID and the creation time, and send the time difference and the report transaction ID to the client in correspondence, so as to instruct the client to determine the creation time distance that scrolls dynamically over time according to the network request time and the time difference.

[0103] Optionally, the data synchronization module 340 includes:

[0104] A first ID acquisition unit is used to acquire a first original report transaction ID from a branch transaction ID associated with a branch transaction in a write buffer;

[0105] A transaction log search unit, configured to search for a transaction log in the read buffer;

[0106] a read buffer updating unit, configured to write the branch transaction in the write buffer into the read buffer to obtain an updated read buffer when no transaction log exists in the read buffer;

[0107] A second ID acquisition unit, configured to acquire a second original report transaction ID associated with the transaction log when the transaction log exists in the read buffer;

[0108] The data synchronization unit is used to update the read buffer based on the first original report transaction ID and the second original report transaction ID, and synchronize the data of the current report based on the updated read buffer.

[0109] Optionally, the data synchronization unit is specifically used to:

[0110] When the value of the first original report transaction ID is smaller than the value of the second original report transaction ID, the branch transaction in the write buffer is discarded;

[0111] When the value of the first original report transaction ID is greater than the value of the second original report transaction ID, the read buffer is updated based on the branch transaction in the write buffer;

[0112] When the value of the first original report transaction ID is equal to the value of the second original report transaction ID, the read buffer is updated according to the creation time distance of the first original report transaction ID and the creation time distance of the second original report transaction ID.

[0113] Optionally, the multi-person collaborative report processing device also includes:

[0114] The file acquisition module is used to obtain the target snapshot file with the largest value of the corresponding report transaction ID according to the set time period, and read the transaction log in the buffer;

[0115] a target transaction log determination module, configured to compare a target value of the report transaction ID corresponding to the target snapshot with a value of the report transaction ID associated with each transaction log, and obtain at least one target transaction log whose value of the report transaction ID is greater than the target value;

[0116] A snapshot file acquisition module, used to play back data based on the target snapshot and each target transaction log, and obtain a snapshot file associated with each target transaction log;

[0117] The snapshot returning module is used to respond to a request initiated by a user to obtain a snapshot file and return the snapshot file generated by data playback based on the target transaction log with the largest value of the report transaction ID to the client.

[0118] Optionally, the multi-person collaborative report processing device also includes:

[0119] The transaction log feedback module is used to respond to the transaction log pull request initiated by the client and feed back the transaction log in the current read buffer to the client to instruct the server to update the local report data according to the transaction log.

[0120] Optional, snapshot file acquisition module, specifically used for:

[0121] Use the position of each cell in the report as the index column;

[0122] The target cell is located according to the index column, and data of the target cell is played back according to the target transaction log associated with the index column.

[0123] The multi-person collaborative report processing device provided in the embodiment of the present invention can execute the multi-person collaborative report processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0124] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0125] Embodiment 4

[0126] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.

[0127] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, applicators, blade applicators, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0128] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0129] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0130] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a report processing method for multi-person collaboration.

[0131] In some embodiments, the report processing method for multi-person collaboration may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the report processing method for multi-person collaboration described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the report processing method for multi-person collaboration in any other appropriate manner (e.g., by means of firmware).

[0132] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0133] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or application.

[0134] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0135] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0136] The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data applier), or a computing system that includes a middleware component (e.g., an application applier), or a computing system that includes a frontend component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0137] A computing system may include a client and an application server. The client and the application server are generally remote from each other and usually interact through a communication network. The relationship between the client and the application server is generated by computer programs running on corresponding computers and having a client-application server relationship with each other. The application server may be a cloud application server, also known as a cloud computing application server or a cloud host, which is a host product in a cloud computing application system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS applications.

[0138] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0139] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A report processing method for multi-person collaboration, characterized in that: Applied to the server, including: In response to a request for obtaining a report transaction ID initiated by a client for a report to be edited, generating a report transaction ID according to a transaction status of the report to be edited and feeding it back to the client; In response to receiving the branch transaction and branch transaction ID uploaded by the user, a read buffer and a write buffer are created with the report transaction ID as an identifier; the branch transaction ID includes the original report transaction ID and the branch transaction number; Write the branch transaction into the write buffer, and read the transaction log in the current log file into the read buffer; Based on the branch transaction and branch transaction ID in the write buffer and the transaction log in the read buffer, synchronize the data of the current report; Wherein, based on the branch transaction and the branch transaction ID in the write buffer and the transaction log in the read buffer, data synchronization is performed on the current report, including: Obtaining the first original report transaction ID in the branch transaction ID associated with the branch transaction in the write buffer; Searching for a transaction log in the read buffer; When there is no transaction log in the read buffer, writing the branch transaction in the write buffer into the read buffer to obtain an updated read buffer; If a transaction log exists in the read buffer, obtaining a second original report transaction ID associated with the transaction log; Based on the first original report transaction ID and the second original report transaction ID, the read buffer is updated, and based on the updated read buffer, data synchronization is performed on the current report; Based on the first original report transaction ID and the second original report transaction ID, updating the read buffer includes: When the value of the first original report transaction ID is smaller than the value of the second original report transaction ID, the branch transaction in the write buffer is discarded; When the value of the first original report transaction ID is greater than the value of the second original report transaction ID, the read buffer is updated based on the branch transaction in the write buffer; When the value of the first original report transaction ID is equal to the value of the second original report transaction ID, the read buffer is updated according to the creation time distance of the first original report transaction ID and the creation time distance of the second original report transaction ID.

2. The method according to claim 1, characterized in that According to the transaction status of the report to be edited, a report transaction ID is generated and fed back to the client, including: Create a report transaction ID based on the current application transaction number of the report to be edited, and record the creation time; Determine the time difference between the sending time of the report transaction ID and the creation time, and send the time difference and the report transaction ID to the client in correspondence, so as to instruct the client to determine the creation time distance that scrolls dynamically over time according to the network request time and the time difference.

3. The method according to claim 1, characterized in that Also includes: According to the set time period, obtain the target snapshot file with the largest value of the corresponding report transaction ID, and read the transaction log in the buffer; Compare the target value of the report transaction ID corresponding to the target snapshot with the value of the report transaction ID associated with each transaction log, and obtain at least one target transaction log whose value of the report transaction ID is greater than the target value; Based on the target snapshot and each target transaction log, data playback is performed to obtain a snapshot file associated with each target transaction log; In response to a request initiated by a user to obtain a snapshot file, a snapshot file generated by data playback based on a target transaction log having a maximum value of a report transaction ID is returned to the client.

4. The method according to claim 1, characterized in that: Also includes: In response to the request for pulling transaction logs initiated by the client, the transaction log in the current read buffer is fed back to the client to instruct the server to update the local report data according to the transaction log.

5. The method according to claim 3, characterized in that: Based on the target snapshot and each target transaction log, data playback is performed, including: Use the position of each cell in the report as the index column; The target cell is located according to the index column, and data of the target cell is played back according to the target transaction log associated with the index column.

6. A report processing device for multi-person collaboration, characterized in that: include: A report transaction ID generation module, configured to respond to a report transaction ID acquisition request initiated by a client for a report to be edited, generate a report transaction ID according to the transaction status of the report to be edited, and feed it back to the client; A buffer creation module, configured to create a read buffer and a write buffer in response to receiving a branch transaction and a branch transaction ID uploaded by a user, using the report transaction ID as an identifier; the branch transaction ID includes an original report transaction ID and a branch transaction number; A transaction writing module is used to write the branch transaction into a write buffer and read the transaction log in the current log file into a read buffer; A data synchronization module, used to synchronize data of the current report based on the branch transaction and branch transaction ID in the write buffer and the transaction log in the read buffer; The data synchronization module comprises: A first ID acquisition unit, configured to acquire a first original report transaction ID from a branch transaction ID associated with a branch transaction in the write buffer; A transaction log search unit, configured to search for a transaction log in the read buffer; a read buffer updating unit, configured to write the branch transaction in the write buffer into the read buffer to obtain an updated read buffer when no transaction log exists in the read buffer; A second ID acquisition unit, configured to acquire a second original report transaction ID associated with the transaction log when the transaction log exists in the read buffer; A data synchronization unit, configured to update the read buffer based on the first original report transaction ID and the second original report transaction ID, and synchronize data of the current report based on the updated read buffer; The data synchronization unit is specifically used for: When the value of the first original report transaction ID is smaller than the value of the second original report transaction ID, the branch transaction in the write buffer is discarded; When the value of the first original report transaction ID is greater than the value of the second original report transaction ID, the read buffer is updated based on the branch transaction in the write buffer; When the value of the first original report transaction ID is equal to the value of the second original report transaction ID, the read buffer is updated according to the creation time distance of the first original report transaction ID and the creation time distance of the second original report transaction ID.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the multi-person collaborative report processing method described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the multi-person collaborative report processing method according to any one of claims 1 to 5 when executed.

Citation Information

Patent Citations

  • Log synchronization method and device, storage medium and electronic equipment

    CN110019498A

  • Cloud document synchronization method and system

    CN110727650A