An editing operation merging strategy determination method and device
By identifying the operational intentions and conflict risks of multi-person collaborative editing, combining the area overlap rate and intimacy factor, calculating the conflict probability and determining the merge strategy in the sandbox, the problem of low accuracy of editing operation merge strategies in multi-person collaborative editing of documents is solved, and efficient conflict prediction and merging are achieved.
Patent Information
- Application Number
- CN202511126067.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2045-08-12
AI Technical Summary
In the existing technology, when multiple people collaborate to edit a document, the editing operation merging strategy has a low accuracy rate and cannot understand the semantic intention behind the user's modification, resulting in a high rate of conflict misjudgment.
By obtaining the editing operation data of multiple users, identifying the operation intention, determining the conflict risk weight and area overlap rate, and combining the intimacy factor to calculate the editing operation conflict probability, and determining the merge strategy in the sandbox, the operation intention identification model and conflict risk mapping relationship are used to establish a version tree mapping and visualize conflict information.
It improves the accuracy of conflict prediction, reduces the false alarm rate and negotiation time, improves the accuracy of editing operation merge strategies, and reduces the rollback of main document versions.
Smart Images

Figure CN120633612B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of document editing technology, and in particular to a method and device for determining an editing operation merging strategy. Background Art
[0002] With the development of internet technology, paperless office has become widely popular. In recent years, document editing has gradually shifted from offline to online editing, supporting real-time browsing and collaborative editing across multiple terminals and users. This has saved users a significant amount of time on file transfers and version updates, significantly improving office efficiency.
[0003] Related technologies employ either OT (Operational Transformation) or CRDT (Conflict-Free Replicated DataType) for collaborative document editing. However, when using OT, because it relies on operational transformation rules to resolve "editing conflicts" during collaborative document editing, it can only resolve conflicts in the order and structure of text operations but cannot understand the semantic intent behind user modifications. When using CRDT, the system automatically merges all modifications. However, while CRDT ensures "technical consistency," it focuses only on operations at the data structure level and does not understand the user's semantic intent. This results in a high rate of misjudgment of conflicts during collaborative document editing, and in turn, a low accuracy rate for the determined editing operation merge strategy. Summary of the Invention
[0004] In view of this, the present application provides a method and device for determining an editing operation merging strategy, which is used to solve the problem of low accuracy of editing operation merging strategies determined in collaborative editing of documents by multiple people in the prior art.
[0005] The purpose of this application can be achieved through the following technical solutions:
[0006] A first aspect of the present application is to provide a method for determining an edit operation merge strategy, comprising:
[0007] Acquire editing operation data corresponding to editing operations performed by multiple users within a preset time range on a preset area of the document to be edited;
[0008] Determine the operation intention corresponding to the editing operation data;
[0009] Determine the conflict risk weight corresponding to the operation intention based on the operation intention;
[0010] obtain a region overlap rate of the editing regions corresponding to any two users in the plurality of users and an intimacy factor corresponding to any two users in the plurality of users;
[0011] determine a maximum conflict risk weight, a maximum region overlap rate, and a minimum intimacy factor;
[0012] determine an editing operation conflict probability based on the maximum conflict risk weight, the maximum region overlap rate, and the minimum intimacy factor;
[0013] determine an editing operation merging strategy based on the editing operation conflict probability.
[0014] In an optional embodiment, determining an operation intention corresponding to the editing operation data comprises:
[0015] inputting the editing operation data into a pre-trained operation intention recognition model to obtain the operation intention corresponding to the editing operation data.
[0016] In an optional embodiment, determining a conflict risk weight corresponding to the operation intention based on the operation intention comprises:
[0017] determining the conflict risk weight corresponding to the operation intention from a mapping relationship between operation intentions and conflict risk weights established in advance.
[0018] In an optional embodiment, obtaining the intimacy factor corresponding to any two users in the plurality of users comprises:
[0019] obtaining a basic trust value, a number of times of historical collaborative editing operations without conflicts between the two users, and a total number of historical collaborative editing operations between the two users, the historical collaborative editing operations being editing operations performed by the two users within a preset time range and within a preset region range in the document before the current editing operation;
[0020] determining the intimacy factor corresponding to any two users in the plurality of users based on the basic trust value, the number of times of historical collaborative editing operations without conflicts between the two users, and the total number of historical collaborative editing operations between the two users.
[0021] In an optional embodiment, determining the editing operation merging strategy based on the editing operation conflict probability comprises:
[0022] in a case where the editing operation conflict probability is greater than a preset threshold, creating a sandbox, redirecting editing operations performed by the plurality of users within a preset time range and within a preset region range in the document to be edited into the sandbox, and determining the editing operation merging strategy in the sandbox.
[0023] In an optional embodiment, the method further comprises:
[0024] The mapping between the editing operation performed in the sandbox and the version tree of the main document is established, and the version tree is used to represent the historical versions of the main document.
[0025] In an optional embodiment, further comprising:
[0026] The editing operation conflict information is visualized in the sandbox, and the editing operation conflict information includes at least one of the following information: editing operation conflict area, editing operation conflict probability, operation content of the editing operation, and operation intention of the editing operation.
[0027] In an optional embodiment, the editing operation merging strategy is determined in the sandbox, including:
[0028] The negotiation mechanism is determined based on the editing operation conflict information;
[0029] The editing operation merging strategy is determined based on the negotiation mechanism.
[0030] In an optional embodiment, the editing operation merging strategy is determined based on the negotiation mechanism, including:
[0031] The editing operation merging strategy is determined based on the negotiation result of the user received within the preset time length;
[0032] If the negotiation result of the user is not received within the preset time length, information about the editing operations performed by the multiple users in the sandbox within the preset time range on the preset area range in the to-be-edited document is submitted to the upper system.
[0033] The second aspect of the present application provides an editing operation merging strategy determination device, including:
[0034] The first acquisition module is configured to acquire editing operation data corresponding to the editing operations performed by the multiple users within the preset time range on the preset area range in the to-be-edited document;
[0035] The first determination module is configured to determine the operation intention corresponding to the editing operation data;
[0036] The second determination module is configured to determine the conflict risk weight corresponding to the operation intention based on the operation intention;
[0037] The second acquisition module is configured to acquire the area overlap rate of the editing areas corresponding to any two users of the multiple users and the intimacy factor corresponding to any two users of the multiple users;
[0038] The third determination module is configured to determine the maximum conflict risk weight, the maximum area overlap rate, and the minimum intimacy factor;
[0039] A fourth determination module is configured to determine an editing operation conflict probability based on a maximum conflict risk weight, a maximum region overlap rate, and a minimum intimacy factor;
[0040] The fifth determining module is configured to determine an editing operation merging strategy based on the editing operation conflict probability.
[0041] The third aspect of the present application is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method of the first aspect when executing the computer program.
[0042] The fourth aspect of the present application is to provide a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method of the first aspect.
[0043] Compared with the prior art, the method for determining an editing operation merging strategy provided by the present application obtains editing operation data corresponding to editing operations performed by multiple users within a preset area of a document to be edited within a preset time range; determines the operation intention corresponding to the editing operation data; determines the conflict risk weight corresponding to the operation intention based on the operation intention; obtains the regional overlap rate of the editing areas corresponding to any two users among the multiple users and the intimacy factor corresponding to any two users among the multiple users; determines the maximum conflict risk weight, the maximum regional overlap rate, and the minimum intimacy factor; determines the probability of editing operation conflict based on the maximum conflict risk weight, the maximum regional overlap rate, and the minimum intimacy factor; and determines the editing operation merging strategy based on the editing operation conflict probability. By introducing operation intention recognition into conflict prediction, the conflict prediction accuracy is improved, and an accurate editing operation merging strategy can be provided for the predicted conflict. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0045] Figure 1 A flowchart of a method for determining an edit operation merge strategy provided in an embodiment of the present application;
[0046] Figure 2 Another flowchart of the method for determining the edit operation merge strategy provided in an embodiment of the present application;
[0047] Figure 3 A structural block diagram of a device for determining an edit operation merge strategy provided in an embodiment of the present application;
[0048] Figure 4 A structural block diagram of an electronic device for implementing the editing operation merging policy determination method provided in the embodiments of the present application is provided. DETAILED DESCRIPTION
[0049] In order for those skilled in the technical field to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts should fall within the scope of protection of the present application.
[0050] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to the process, method, product, or device.
[0051] It should be understood that in the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is only a description of the association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects. "Including A, B, and / or C" means including any one or any two or three of A, B, and C.
[0052] It should be understood that in the embodiments of the present application, "B corresponding to A", "B corresponding to A", "A corresponding to B", or "B corresponding to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.
[0053] To solve the technical problems existing in the related art, the embodiments of the present application provide an editing operation merging policy determination method and device.
[0054] The editing operation merging strategy determination method provided by the embodiments of the present application can be executed by an electronic device, which can be a terminal or a server, etc. The terminal can be a terminal device such as a smartphone, a tablet computer, a notebook computer, etc. The server can be a physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, etc. It can be understood that the present application does not specifically limit the execution subject of the editing operation merging strategy determination method.
[0055] The technical solutions of the present application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in detail in some embodiments. The embodiments described below are used to explain the technical solutions of the present application and are not limited to actual use.
[0056] To solve the technical problems in the related art, the embodiments of the present application provide an editing operation merging strategy determination method, as shown in Figure 1 Figure 1 An example flow chart of the editing operation merging strategy determination method provided by the embodiments of the present application. It should be noted that the steps shown can be executed in a different logical order from that shown in the method flow chart. The method can include the following steps S101-S107.
[0057] Step S101: Obtain editing operation data corresponding to editing operations performed by multiple users on a preset region range in a to-be-edited document within a preset time range.
[0058] In an optional embodiment, the editing operation merging strategy determination method provided by the embodiments of the present application is applied in the application scenario of multiple users collaboratively editing a document.
[0059] The preset time range refers to the time difference of the editing operations performed by each user in the multiple users on the to-be-edited document within the preset time range. The preset region range refers to the region difference of the editing operations performed by each user in the multiple users on the to-be-edited document within the preset region range.
[0060] In a specific embodiment, user A performs editing operations on lines 2-5 of the document to be edited at 13:23, user B performs editing operations on lines 3-6 of the document to be edited at 13:25, and user C performs editing operations on lines 20-34 of the document to be edited at 14:20. The difference between 13:23 and 13:25 is two minutes, which can be understood as being within the preset time range, and the difference between 13:23 and 14:20 is 57 minutes, which can be understood as being outside the preset time range. The difference between lines 2 and 3 is one line, which can be understood as being within the preset area range, and the difference between lines 2 and 20 is 18 lines, which can be understood as being outside the preset area range. It should be noted that the preset time range and the preset area range can be set based on actual experience, and this application does not limit this.
[0061] In another optional embodiment, the document is divided into different regions, and each region is assigned a unique identifier. When multiple users edit the same region, the region is determined as a potential conflict region.
[0062] In an optional embodiment, online collaborative document editing software, enterprise cloud disk functions, team collaboration tools, and instant messaging tools are used to enable multiple users to collaboratively edit documents.
[0063] In an optional embodiment, the editing operation includes at least one of the following operations: inputting text in the document, deleting paragraphs, adjusting the format, etc. In addition, the editing operation may also include other operations, which are not limited in this application.
[0064] In an optional embodiment, the editing operation data includes at least one of the following data: operation type, operation location, operation content, and operation timestamp.
[0065] In a more specific embodiment, the operation type indicates what type of editing operation the user performed. The operation type includes at least one of the following types: insert, delete, format adjustment, add annotation, move, and undo. Of course, other operation types may also be included, and this application does not limit this. The operation location is the specific location information of the user's operation in the document. Common location description methods include: character offset, paragraph number, line number, and coordinate position. The operation content refers to the specific text or data content related to the operation. The operation timestamp records the specific time when the operation occurs.
[0066] In a more specific embodiment, the method for determining an edit operation merge strategy provided by the embodiment of the present application further includes:
[0067] Use natural language processing technology to convert the format of operation content.
[0068] It should be noted that the operation content after the format conversion is structured data that can be understood by a computer.
[0069] In a more specific embodiment, the format conversion includes at least one of the following operations: word segmentation, part-of-speech tagging, named entity recognition, etc.
[0070] In a more specific embodiment, the editing operation from the message queue is monitored, the operation area is determined according to the operation position, and the operation area and the user list being edited are recorded.
[0071] Step S102: Obtain the operation intention corresponding to the editing operation data.
[0072] In an optional embodiment, the editing operation data is input into the operation intention recognition model to obtain the operation intention corresponding to the editing operation data.
[0073] In a specific embodiment, the editing operation data is input into the operation intention recognition model to obtain the operation intention probability distribution corresponding to the editing operation data, and the operation intention with the highest probability is selected as the operation intention corresponding to the editing operation data.
[0074] The training process of the operation intention recognition model specifically includes the following steps:
[0075] Obtain sample editing operation data and operation intention category labels corresponding to the sample editing operation data, and perform model training based on the sample editing operation data and the operation intention category labels corresponding to the sample editing operation data to obtain the operation intention recognition model. The specific training process is similar to the model training process in related technologies, and will not be described here. The model parameters are optimized through a back propagation algorithm, so that the trained operation intention recognition model can accurately recognize the operation intention of the user.
[0076] In an optional embodiment, the operation intention recognition model can be a BERT (Bidirectional Encoder Representations from Transformers) or other NLP (Natural Language Processing) model, and the present application does not limit it.
[0077] It should be noted that the operation intention category label corresponding to the sample editing operation data is manually annotated.
[0078] In this step, by analyzing the operation intention of the user, it can be more accurately judged whether the two editing operations really exist conflict, and the accuracy of conflict prediction is improved.
[0079] Step S103: Determine the conflict risk weight corresponding to the operation intention based on the operation intention.
[0080] In an optional embodiment, considering that in a scenario where multiple users collaborate to edit a document, editing operations of different users may conflict, in order to identify potential conflict risks in advance, conflict risk weight classification is performed based on the user's operation intention.
[0081] In a specific embodiment, determining the conflict risk weight corresponding to the operation intention based on the operation intention specifically includes the following steps:
[0082] Based on the operation intention, the conflict risk weight corresponding to the operation intention is determined from a pre-established mapping relationship between the operation intention and the conflict risk weight.
[0083] In a specific embodiment, the operation intentions include modifying the framework, adding content, deleting redundancy, and adjusting wording. For example, the operation intention type corresponding to editing operations such as deleting chapters or adjusting the structure is modifying the framework, the operation intention type corresponding to editing operations such as adding charts or references is supplementing data, the operation intention type corresponding to editing operations such as removing repeated sentences is deleting redundancy, and the operation intention type corresponding to editing operations such as grammar optimization or term replacement is adjusting wording. The conflict risk weight corresponding to modifying the framework is 0.9, the conflict risk weight corresponding to adding content is 0.6, the conflict risk weight corresponding to deleting redundancy is 0.4, and the conflict risk weight corresponding to adjusting the wording is 0.2.
[0084] In this step, considering the different probabilities of conflicts between different operation intentions, the accuracy of conflict prediction can be further improved by setting weights.
[0085] Step S104: obtaining the area overlap ratio of the editing areas corresponding to any two users among the multiple users and the intimacy factors corresponding to any two users among the multiple users.
[0086] In an optional embodiment, the area overlap rate of the editing areas corresponding to any two users among the multiple users is obtained by calculating the ratio of the area of the overlapping area to the total area of the editing areas corresponding to the two users.
[0087] In an optional embodiment, obtaining the intimacy factors corresponding to any two users among a plurality of users specifically includes the following steps:
[0088] Obtain a basic trust value, the number of historical collaborative editing operations between two users without conflict, and the total number of historical collaborative editing operations between the two users. A historical collaborative editing operation refers to an editing operation performed by two users on a preset area in a document within a preset time range before performing a current editing operation. Determine the intimacy factor corresponding to any two users among multiple users based on the basic trust value, the number of historical collaborative editing operations between the two users without conflict, and the total number of historical collaborative editing operations between the two users.
[0089] In an optional embodiment, the basic trust value may be set according to actual needs. For example, the basic trust value may be set to 0.7.
[0090] In an optional embodiment, based on the basic trust value, the number of historical collaborative editing operations between the two users without conflict, and the total number of historical collaborative editing operations between the two users, the following formula is used to determine the intimacy factor corresponding to any two users among the multiple users:
[0091] f=base+(1-base)×success / total(1)
[0092] Where f is the intimacy factor corresponding to any two users among multiple users, base is the basic trust value, success is the number of historical collaborative editing operations between the two users without conflict, and total is the total number of historical collaborative editing operations between the two users.
[0093] In an optional embodiment, the initial value of f can be set according to the Hawthorne effect, for example, f is 0.8.
[0094] Step S105: Determine the maximum conflict risk weight, the maximum area overlap rate, and the minimum intimacy factor.
[0095] Step S106: Determine the editing operation conflict probability based on the maximum conflict risk weight, the maximum area overlap rate, and the minimum intimacy factor.
[0096] In an optional embodiment, based on the maximum conflict risk weight, the maximum area overlap rate, and the minimum intimacy factor, the editing operation conflict probability is determined by the following formula, which specifically includes the following steps:
[0097] P=(0.7×w_max+0.3×o)×f_min (2)
[0098] Among them, P is the editing operation conflict probability, w_max is the maximum conflict risk weight, o is the maximum position overlap rate, and f_min is the minimum intimacy factor.
[0099] By setting corresponding weights for operation intention and area overlap rate, the probability of editing operation conflict is calculated to further improve the accuracy of conflict prediction.
[0100] Step S107: Determine an editing operation merging strategy based on the editing operation conflict probability.
[0101] In an optional embodiment, determining an edit operation merging strategy based on the edit operation conflict probability specifically includes the following steps:
[0102] When the probability of editing operation conflict is greater than a preset threshold, a sandbox is created to redirect the editing operations performed by multiple users within a preset time range within a preset area of the document to be edited to the sandbox; and an editing operation merging strategy is determined in the sandbox.
[0103] In a specific embodiment, the preset threshold can be set according to actual needs. For example, the preset threshold is 0.65, which is not limited in this application.
[0104] In another optional embodiment, the method for determining an edit operation merge strategy provided in the embodiment of the present application further includes:
[0105] A mapping is established between the editing operations performed in the sandbox and the version tree of the master document, which is used to represent the historical versions of the master document.
[0106] In a collaborative editing system, a sandbox is a temporary, isolated environment where users perform editing operations. Edits within a sandbox do not directly modify the main document; instead, they are committed to the main document only after verification. Each editing sandbox is isolated from the main document data. Edits performed within the sandbox are visible and effective only within the sandbox and do not immediately affect the main document content. Version history is a structured representation of version history, typically displaying the evolution of a document in a tree-like structure, including operations such as branching, merging, and rollback.
[0107] Establishing a mapping between the edits performed in the sandbox and the version tree of the main document ensures that the merge is verifiable and traceable. The user's operation records in the sandbox are mapped to the corresponding areas of the main document to facilitate subsequent merge operations.
[0108] In another optional embodiment, the method for determining an edit operation merge strategy provided in the embodiment of the present application further includes:
[0109] The editing operation conflict information is visually prompted in the sandbox, where the editing operation conflict information includes at least one of the following information: the editing operation conflict area, the editing operation conflict probability, the operation content of the editing operation, and the operation intention of the editing operation.
[0110] Within the editing sandbox, operations within the sandbox are monitored in real time. If multiple users are editing within the same sandbox and potential conflicts arise, users are notified through visual prompts (such as highlighting the conflicting area or displaying a pop-up notification box), displaying the specific content and intent of the conflicting operation. Users can negotiate and communicate within the sandbox, resolving conflicts by manually adjusting edits or marking retained versions. For example, if user A and user B are editing a paragraph in the same sandbox and the system indicates a conflict, both parties can discuss and finalize the edited version within the sandbox.
[0111] By visually prompting editing operation conflict information in the sandbox, potential conflicts can be detected in advance, avoiding conflicts from being brought into the main document, and allowing users to resolve conflicts in the sandbox without affecting the main document.
[0112] In another optional embodiment, the method for determining an edit operation merge strategy provided in the embodiment of the present application further includes:
[0113] A negotiation mechanism is determined based on the editing operation conflict information; and an editing operation merging strategy is determined based on the negotiation mechanism.
[0114] In a specific embodiment, determining the edit operation merge strategy based on the negotiation mechanism specifically includes the following steps:
[0115] If the user's negotiation result is received within the preset time, the editing operation merging strategy is determined based on the user's negotiation result; if the user's negotiation result is not received within the preset time, the information on the editing operations performed by multiple users in the sandbox within the preset time range on the preset area of the document to be edited is submitted to the superior system.
[0116] It should be noted that the superior system is used to make the final decision.
[0117] In another optional embodiment, determining the editing operation merging strategy based on the editing operation conflict probability further includes:
[0118] Automatically merge editing operations when the probability of editing operation conflict is not greater than a preset threshold.
[0119] In the embodiment of the present application, the editing operation data corresponding to the editing operations of a plurality of users in a preset time range on a preset region range in a to-be-edited document is acquired; the operation intention corresponding to the editing operation data is determined; the conflict risk weight corresponding to the operation intention is determined based on the operation intention; the region overlap rate of the editing regions corresponding to any two users of the plurality of users and the intimacy factor corresponding to any two users of the plurality of users are acquired; the maximum conflict risk weight, the maximum region overlap rate, and the minimum intimacy factor are determined; the editing operation conflict probability is determined based on the maximum conflict risk weight, the maximum region overlap rate, and the minimum intimacy factor; and the editing operation merging strategy is determined based on the editing operation conflict probability. By introducing operation intention recognition into conflict prediction, the conflict prediction accuracy is improved, and thus an accurate editing operation merging strategy can be provided for the predicted conflict.
[0120] It should be noted that, compared with the OT method in the related art, the conflict false positive rate is reduced from 41.7% to 8.2% by using the editing operation merging strategy determination method provided in the embodiment of the present application, and the negotiation time consumption is reduced from 215 seconds to 76 seconds. Compared with the CRDT method, the conflict resolution success rate is reduced from 72.1% to 98.3%. Moreover, the operation intention recognition accuracy is 89.6% by using the editing operation merging strategy determination method provided in the embodiment of the present application, and the rollback of the main document version is reduced by 73% by using the sandbox mechanism.
[0121] The embodiment of the present application also provides an editing operation merging strategy determination method, as shown in Figure 2 , a flowchart of the editing operation merging strategy determination method provided in the embodiment of the present application, specifically comprising the following steps: Figure 2 The embodiment of the present application also provides an editing operation merging strategy determination method, as shown in
[0122] Step S201: acquiring real-time data streams through an operation acquisition layer;
[0123] Step S202: determining the operation intention corresponding to the real-time data streams through an intention recognition layer;
[0124] Step S203: determining the probability that the operation exists conflict through a conflict prediction layer based on the operation intention;
[0125] Step S204: if the probability exceeds a preset threshold, a sandbox isolation is used;
[0126] Step S205: if the probability does not exceed the preset threshold, automatic merging is performed.
[0127] Corresponding to the editing operation merging strategy determination method provided in the embodiment of the present application, the embodiment of the present application also provides an editing operation merging strategy determination apparatus, as shown in Figure 3 , the editing operation merging strategy determination apparatus comprises:
[0128] The first obtaining module 301 is configured to obtain editing operation data corresponding to editing operations performed by a plurality of users on a preset region range in a to-be-edited document within a preset time range.
[0129] The first determining module 302 is configured to determine an operation intention corresponding to the editing operation data.
[0130] The second determining module 303 is configured to determine a conflict risk weight corresponding to the operation intention based on the operation intention.
[0131] The second obtaining module 304 is configured to obtain a region overlap rate of editing regions corresponding to any two users of the plurality of users and an intimacy factor corresponding to the any two users of the plurality of users.
[0132] The third determining module 305 is configured to determine a maximum conflict risk weight, a maximum region overlap rate, and a minimum intimacy factor.
[0133] The fourth determining module 306 is configured to determine an editing operation conflict probability based on the maximum conflict risk weight, the maximum region overlap rate, and the minimum intimacy factor.
[0134] The fifth determining module 307 is configured to determine an editing operation merging strategy based on the editing operation conflict probability.
[0135] In an optional embodiment, the first determining module is configured to:
[0136] input the editing operation data into a pre-trained operation intention recognition model to obtain the operation intention corresponding to the editing operation data.
[0137] In an optional embodiment, the second determining module is configured to:
[0138] determine the conflict risk weight corresponding to the operation intention from a mapping relationship between operation intentions and conflict risk weights established in advance based on the operation intention.
[0139] In an optional embodiment, the second obtaining module is configured to:
[0140] obtain a basic trust value, a number of times of historical collaborative editing operations without conflicts between the two users, and a total number of historical collaborative editing operations between the two users, the historical collaborative editing operations being editing operations performed by the two users on the preset region range in the document within the preset time range before the current editing operation is performed.
[0141] determine the intimacy factor corresponding to the any two users of the plurality of users based on the basic trust value, the number of times of historical collaborative editing operations without conflicts between the two users, and the total number of historical collaborative editing operations between the two users.
[0142] In an optional embodiment, the fifth determining module is configured to:
[0143] When the probability of editing operation conflict is greater than a preset threshold, a sandbox is created to redirect the editing operations performed by multiple users within a preset time range on a preset area of the document to be edited to the sandbox; and an editing operation merging strategy is determined in the sandbox.
[0144] In an optional embodiment, the method further includes:
[0145] A mapping is established between the editing operations performed in the sandbox and the version tree of the master document, which is used to represent the historical versions of the master document.
[0146] In an optional embodiment, the method further includes:
[0147] The editing operation conflict information is visually prompted in the sandbox, where the editing operation conflict information includes at least one of the following information: the editing operation conflict area, the editing operation conflict probability, the operation content of the editing operation, and the operation intention of the editing operation.
[0148] In an optional embodiment, the method further includes:
[0149] Determining a negotiation mechanism based on editing operation conflict information;
[0150] The editing operation merging strategy is determined based on the negotiation mechanism.
[0151] In an optional embodiment, the method further includes:
[0152] receiving a negotiation result from the user within a preset time period, and determining an edit operation merging strategy based on the negotiation result from the user;
[0153] If no negotiation result from the user is received within the preset time period, information including editing operations performed by multiple users in the sandbox within the preset time range on a preset area in the document to be edited is submitted to the upper system.
[0154] Corresponding to the method for determining an editing operation merging strategy provided in the embodiment of the present application, the embodiment of the present application also provides an electronic device for executing the method for determining an editing operation merging strategy, such as Figure 4 As shown, the electronic device includes: a processor 401; and a memory 402, which is used to store a program of a method for determining an edit operation merge strategy. After the device is powered on and the program of the method for determining an edit operation merge strategy is run by the processor, the following steps are performed:
[0155] Acquire editing operation data corresponding to editing operations performed by multiple users within a preset time range on a preset area of the document to be edited;
[0156] Determine the operation intention corresponding to the editing operation data;
[0157] Determine the conflict risk weight corresponding to the operation intention based on the operation intention;
[0158] Obtaining the area overlap ratio of the editing areas corresponding to any two users among the multiple users and the intimacy factors corresponding to any two users among the multiple users;
[0159] Determine the maximum conflict risk weight, maximum regional overlap, and minimum intimacy factor;
[0160] Determine the editing operation conflict probability based on the maximum conflict risk weight, the maximum region overlap rate, and the minimum intimacy factor;
[0161] The editing operation merging strategy is determined based on the editing operation conflict probability.
[0162] Corresponding to the method for determining an edit operation merge strategy provided in an embodiment of the present application, an embodiment of the present application further provides a computer-readable storage medium storing a program for determining an edit operation merge strategy, which is executed by a processor to perform the following steps:
[0163] Acquire editing operation data corresponding to editing operations performed by multiple users within a preset time range on a preset area of the document to be edited;
[0164] Determine the operation intention corresponding to the editing operation data;
[0165] Determine the conflict risk weight corresponding to the operation intention based on the operation intention;
[0166] Obtaining the area overlap ratio of the editing areas corresponding to any two users among the multiple users and the intimacy factors corresponding to any two users among the multiple users;
[0167] Determine the maximum conflict risk weight, maximum regional overlap, and minimum intimacy factor;
[0168] Determine the editing operation conflict probability based on the maximum conflict risk weight, the maximum region overlap rate, and the minimum intimacy factor;
[0169] The editing operation merging strategy is determined based on the editing operation conflict probability.
[0170] Corresponding to the method for determining an edit operation merge strategy provided in an embodiment of the present application, an embodiment of the present application further provides a computer program comprising instructions. When the program is executed by a computer, the instructions cause the computer to perform the following steps:
[0171] Acquire editing operation data corresponding to editing operations performed by multiple users within a preset time range on a preset area of the document to be edited;
[0172] Determine the operation intention corresponding to the editing operation data;
[0173] Determine the conflict risk weight corresponding to the operation intention based on the operation intention;
[0174] Obtaining the area overlap ratio of the editing areas corresponding to any two users among the multiple users and the intimacy factors corresponding to any two users among the multiple users;
[0175] Determine the maximum conflict risk weight, maximum regional overlap, and minimum intimacy factor;
[0176] Determine the editing operation conflict probability based on the maximum conflict risk weight, the maximum region overlap rate, and the minimum intimacy factor;
[0177] The editing operation merging strategy is determined based on the editing operation conflict probability.
[0178] It should be noted that for the detailed description of the editing operation merging strategy determination device, electronic device, computer-readable storage medium and computer program provided in the embodiment of the present application, reference can be made to the relevant description of the editing operation merging strategy determination method embodiment provided in the embodiment of the present application, and no further details will be given here.
[0179] Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0180] In a typical configuration, an electronic device includes one or more processors (Central Processing Unit), input / output interfaces, network interfaces, and memory.
[0181] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of a computer-readable medium.
[0182] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology to store information. The information can be computer-readable operations, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, programmable analog modules (PAMs), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RANM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPRM), flash memory or other memory technologies, compact disc read-only memory (CDROM), digital versatile disc (DVCD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0183] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, compact disc read-only memory, optical storage, etc.) containing computer-usable program code.
[0184] Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. A method for determining an edit operation merge strategy, characterized in that: include: Acquire editing operation data corresponding to editing operations performed by multiple users within a preset time range on a preset area of the document to be edited; Inputting the editing operation data into a pre-trained operation intention recognition model to obtain the operation intention corresponding to the editing operation data, wherein the operation intention recognition model is an NLP model; Determining a conflict risk weight corresponding to the operation intention based on the operation intention; Obtaining a region overlap ratio of edited regions corresponding to any two of the plurality of users and a closeness factor corresponding to any two of the plurality of users; Determine the maximum conflict risk weight, maximum regional overlap, and minimum intimacy factor; Determining an editing operation conflict probability based on the maximum conflict risk weight, the maximum region overlap rate, and the minimum intimacy factor; determining an editing operation merging strategy based on the editing operation conflict probability; The training process of the operation intention recognition model includes: Obtaining sample editing operation data and the operation intention category label corresponding to the sample editing operation data; Model training is performed based on the sample editing operation data and the operation intention category labels corresponding to the sample editing operation data to obtain an operation intention recognition model.
2. The method for determining an edit operation merge strategy according to claim 1, wherein: The determining, based on the operation intention, a conflict risk weight corresponding to the operation intention includes: Based on the operation intention, the conflict risk weight corresponding to the operation intention is determined from a pre-established mapping relationship between the operation intention and the conflict risk weight.
3. The method for determining an edit operation merge strategy according to claim 1, wherein: The obtaining of intimacy factors corresponding to any two users among the plurality of users includes: Obtaining a basic trust value, the number of historical collaborative editing operations between the two users without conflict, and the total number of historical collaborative editing operations between the two users, where the historical collaborative editing operations refer to editing operations performed by the two users within a preset time range within a preset area of the document before the current editing operation is performed; The intimacy factors corresponding to any two users among the plurality of users are determined based on the basic trust value, the number of historical collaborative editing operations without conflicts between the two users, and the total number of historical collaborative editing operations between the two users.
4. The method for determining an edit operation merge strategy according to claim 1, wherein: The determining of the editing operation merging strategy based on the editing operation conflict probability includes: When the probability of the editing operation conflict is greater than a preset threshold, a sandbox is created, and the editing operations performed by the multiple users within a preset time range on a preset area of the document to be edited are redirected to the sandbox; and an editing operation merging strategy is determined in the sandbox.
5. The method for determining an edit operation merge strategy according to claim 4, wherein: Also includes: A mapping is established between the editing operations performed in the sandbox and a version tree of the master document, where the version tree is used to represent historical versions of the master document.
6. The method for determining an edit operation merge strategy according to claim 4, wherein: Also includes: The editing operation conflict information is visually prompted in the sandbox, where the editing operation conflict information includes at least one of the following information: an editing operation conflict area, an editing operation conflict probability, an operation content of the editing operation, and an operation intention of the editing operation.
7. The method for determining an edit operation merge strategy according to claim 6, wherein: Determining the editing operation merging strategy in the sandbox includes: determining a negotiation mechanism based on the editing operation conflict information; An editing operation merging strategy is determined based on the negotiation mechanism.
8. The method for determining an edit operation merge strategy according to claim 7, wherein: Determining the editing operation merging strategy based on the negotiation mechanism includes: receiving a negotiation result from the user within a preset time period, and determining an editing operation merging strategy based on the negotiation result from the user; If no negotiation result from the user is received within the preset time period, information on editing operations performed by the multiple users in the sandbox within the preset time range on a preset area of the document to be edited is submitted to a superior system.
9. A device for determining an editing operation merge strategy, characterized in that: include: A first acquisition module is used to acquire editing operation data corresponding to editing operations performed by multiple users within a preset time range on a preset area of a document to be edited; A first determination module is configured to input the editing operation data into a pre-trained operation intention recognition model to obtain an operation intention corresponding to the editing operation data, wherein the operation intention recognition model is a NLP model; A second determining module is configured to determine a conflict risk weight corresponding to the operation intention based on the operation intention; A second acquisition module is configured to acquire an area overlap ratio of edited areas corresponding to any two of the plurality of users and an intimacy factor corresponding to any two of the plurality of users; The third determination module is used to determine the maximum conflict risk weight, the maximum area overlap rate and the minimum intimacy factor; a fourth determining module, configured to determine an editing operation conflict probability based on the maximum conflict risk weight, the maximum region overlap rate, and the minimum intimacy factor; a fifth determining module, configured to determine an editing operation merging strategy based on the editing operation conflict probability; The editing operation merging strategy determination device further includes a module for performing the following operations: Obtaining sample editing operation data and the operation intention category label corresponding to the sample editing operation data; Model training is performed based on the sample editing operation data and the operation intention category labels corresponding to the sample editing operation data to obtain an operation intention recognition model.
Citation Information
Patent Citations
Cloud document processing method and device and server
CN116132457A
Document annotation method and device for electronic whiteboard, equipment and storage medium
CN120449841A