A conflict detection method and system for a standard online collaborative compilation platform

By collecting document and user behavior data in an online collaborative editing platform and using Markov chains and conditional random fields to dynamically adjust the detection range, the problem of insufficient detection range in existing technologies is solved, accurate conflict detection and efficient management are achieved, and the accuracy and efficiency of collaborative editing are improved.

CN120278125BActive Publication Date: 2025-09-09CHINA STANDARD TECH DEV CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510748698.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-09
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

The conflict detection methods of existing online collaborative editing platforms fail to fully combine historical data and real-time input features, resulting in insufficient accuracy of the detection range and the inability to dynamically adjust. They also fail to effectively handle the time correlation of editing operations, leading to misjudgments or missed judgments, reducing collaborative editing efficiency and user experience.

Method used

By collecting online document data and user behavior data, using Markov chains to calculate the transition probability matrix and conditional random field, dynamically adjusting the detection range, and combining popularity sorting and probabilistic counting of locked areas, real-time accurate detection and efficient management of conflicts can be achieved.

Benefits of technology

It achieves accurate conflict detection in online collaborative editing, reduces misjudgments and missed judgments, improves collaborative editing efficiency, and can effectively manage locked areas, reducing resource consumption and user interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120278125B_ABST
    Figure CN120278125B_ABST
Patent Text Reader

Abstract

The present invention discloses a conflict detection method and system for a standard online collaborative editing platform, including: collecting online document data and user behavior data, determining a first detection range based on the editable points in the online document data and the user's current input position, and revising the first detection range based on the popularity ranking of historical data; using the first detection range for initial detection, if a conflict point is detected, obtaining a first detection time based on the input feature, using the first detection time to expand the first detection range to obtain a second detection range, locking the second detection range based on the user's current input position, performing a secondary detection on the locked area, and if a conflict occurs, notifying other users that the locked area has been locked, marking the locked area, and counting the number of edits. This method dynamically adjusts the detection range by combining historical data and real-time input position, providing users with a collaborative editing experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of conflict detection, and in particular relates to a conflict detection method and system for a standard online collaborative compilation platform. Background Art

[0002] With the widespread use of online collaborative editing platforms, scenarios where multiple people edit the same document simultaneously are becoming increasingly common. Therefore, accurate and efficient conflict detection has become the key to ensuring the smoothness of collaborative editing. In existing technologies, some conflict detection methods fail to fully combine historical data and real-time input features when determining the detection range, resulting in insufficient accuracy of the detection range and the inability to dynamically adjust it. When processing the time correlation of editing operations, there is a lack of effective consideration of the time decay characteristics of the number of edits, making it difficult for the counting results to accurately reflect the actual impact of the operation.

[0003] Some traditional detection methods use a fixed detection range and do not consider the heat changes and time decay of editing operations, which can easily lead to misjudgments or missed judgments, reducing collaborative editing efficiency and user experience. They are also unable to predict the areas that users may edit, resulting in editing intention conflicts when multiple users edit the same area at the same time. Therefore, there is an urgent need for a conflict detection method that can fully consider time factors and historical data to improve the editing efficiency and accuracy of online collaborative editing platforms. Summary of the Invention

[0004] The purpose of the present invention is to provide a conflict detection method and system for a standard online collaborative compilation platform.

[0005] To achieve the above object, the present invention is implemented according to the following technical solutions:

[0006] A first aspect of the present invention provides a conflict detection method for a standard online collaborative compilation platform, comprising:

[0007] Collect online document data for preprocessing, and collect user behavior data in real time, including input location and input features;

[0008] Determining a first detection range based on the editable points of the online document data and the user's current input position;

[0009] Calculating a transition probability matrix at different input positions for the historical data of the online document data using a Markov chain, using the transition probability matrix to perform a popularity ranking of the historical input positions and the number of edits, and modifying the first detection range according to the popularity ranking;

[0010] Performing an initial detection using the first detection range, and if no conflict point is detected, marking the first detection range and counting the number of edits;

[0011] If the conflict point is located in the first detection range, obtaining a first detection time according to the input word length and input duration of the input feature, and using the first detection time to expand the first detection range through a conditional random field to obtain a second detection range;

[0012] The second detection range is locked according to the current input position of the user, and the locked area is detected again. If there is a conflict, it prompts other users that the locked area has been locked, marks the locked area and counts the number of edits.

[0013] As a further method, the pretreatment method comprises:

[0014] Collect the editable points of online documents, the number of edits corresponding to the editable points, the types of editing operations corresponding to the editable points, and historical data as online document data, and collect behavioral data of different users in real time. The behavioral data includes input position and input features. The input features include input frequency, single input word length, and single input duration. The online document data is cleaned and deduplicated.

[0015] As a further method, a method for determining the first detection range includes:

[0016] Extract the mouse track point set within the last two seconds based on the editable points in the online document data and the user's current input position. Extract the maximum and minimum coordinates of the track point set based on the mouse track point set. Use the minimum value as the coordinate of the lower left corner and the maximum value as the coordinate of the upper right corner. Obtain the minimum enclosing rectangle based on the coordinates of the lower left corner and the upper right corner.

[0017] Obtain relative horizontal and vertical coordinates based on the relative position of the current input position and the geometric center point of the minimum enclosing rectangle, use twice the relative horizontal and vertical coordinates to expand the horizontal and vertical boundaries of the minimum enclosing rectangle to obtain an enclosing rectangle, and use the enclosing rectangle to intersect the editable point area to obtain a first detection range;

[0018] If the user's mouse track point cannot be obtained, the enclosing rectangle formed by the user's current input position and the nearest editable point is directly expanded twice to obtain the first detection range.

[0019] As a further method, a method for calculating the transition probability matrix includes:

[0020] Based on the historical data of online document data, the transition probability matrix of different input positions is calculated through Markov chain. According to the historical data, the editable area of ​​the document is divided into grids at 0.8 times the average spacing of the editable points. The probability of two grids being accessed continuously in the historical data is counted. If the probability of being accessed continuously is greater than 0.3, a directed edge is generated to obtain a regional association graph. The transition probabilities of different grids are obtained based on the regional association graph. The transition probability matrix is ​​calculated using the transition probabilities. The transition probability matrix formula is:

[0021] ;

[0022] in For the kth user u from state Transfer to state The probability of The type of editing operation for the last editable point. The type of editing operation for the next editable point. Indicates that if the mth operation is from Transfer to ,but is 1, otherwise is 0, is the original number of edits for the mth operation, is the difference between the current time and the time when the mth operation occurs, is the average time interval of the last 100 editing operations within 24 hours, T is the total number of operations, is the original number of edits for the nth operation, The difference between the current time and the time when the nth operation occurred.

[0023] As a further method, a method for correcting the first detection range includes:

[0024] Based on the transition probability matrix and regional association graph of online document data, we extract the transition matrix elements of different grids. We calculate the heat value based on the transition matrix elements, historical input positions, and edit times. The heat formula is:

[0025] ,

[0026] in is the grid heat value after update, H is the grid heat value after update, t is the minute interval, is the attenuation factor, the attenuation rate is 50%, d is the number of edit operations that occurred in the grid G ​​in the current cycle, T is the total number of operations, is the transfer matrix element, G is the grid, The type of editing performed for editable points. The number of regions in the region association graph in the current period that have directed edges connected to the grid G;

[0027] Sort the heat values ​​of different grids in descending order, and merge the grids whose absolute value of the heat difference between adjacent grids is less than 0.2 and the transition probability is greater than 0.5 into high heat areas according to the sorting, and use the high heat areas to merge and expand the first detection range;

[0028] The grids whose absolute value of the heat difference between adjacent grids is greater than 0.3 or whose transition probability is less than 0.3 are regarded as low heat areas, and the intersection area of ​​the first detection range is shrunk using the low heat areas.

[0029] As a further method, a method for obtaining the first detection time includes:

[0030] Performing an initial detection based on the first detection range, if the input position of another user is within the first detection range, determining that a conflict point exists within the first detection range, dividing the relative distance between the conflict point and the input position of the current user by the distance between the input position of the current user and the boundary of the first detection range to obtain a first adjustment weight, and using the normalized weight of the input duration adjustment weight as a second adjustment weight;

[0031] Extracting the most recent single input word length and single input duration based on the current user's input features, and obtaining a first detection time by multiplying the single input word length by the first adjustment weight and the single input duration by the second adjustment weight;

[0032] If no input position of another user is detected within the first detection range during the current user input, there is no conflict, and the conflict-free area is marked and the number of edits is counted.

[0033] As a further method, a method for obtaining the second detection range includes:

[0034] Determine a time window based on the first detection time, extract the average input word length and average input duration of the user within the time window, and extract the grid coordinates of the boundary grid of the first detection range and the distance between the boundary grid and the current input position according to the time window;

[0035] The average input word length, average input duration, grid coordinates of the boundary grid, and the distance between the boundary grid and the current input position in the time window are used as the input observation sequence of the conditional random field;

[0036] Extracting four reduction directions (up, down, left, and right) from the first detection range, taking the normalized difference of the transition probabilities of the corresponding directions as the reduction amplitude according to the reduction direction, obtaining different combinations based on the reduction direction and the reduction amplitude, and taking the different combinations as the state label set of the conditional random field;

[0037] Based on historical data and state label sets, the transition probabilities between states are counted to obtain the conditional random field transfer matrix. The reduced state sequence is calculated using the Viterbi algorithm according to the conditional random field transfer matrix. The reduced state sequence is extracted according to the reduced state sequence, and the reduced grid corresponding to the reduction direction and reduction amplitude is subtracted from the first detection range to obtain the second detection range.

[0038] As a further method, a method for marking the locked area and counting the number of edits includes:

[0039] The second detection range is locked based on the user's current input position, and the locked area is re-detected. If the second detection range detects the input position of other users, it prompts other users that the locked area has been locked;

[0040] According to the locked area, the user input frequency is counted, and the half-life is extracted based on the input frequency. The average editing time of multiple users is extracted from the historical data of the locked area as a smoothing factor. The half-life and smoothing factor are used to probabilistically count the number of edits in the locked area. The counting formula is:

[0041] ,

[0042] in is the total number of edits after probabilistic counting, y is the total number of edit operations in the locked area, is the original number of the rth editing operation, is the half-life, is the time interval between the rth editing operation and the current time, is the smoothing factor;

[0043] Marking is performed based on the counting results, and cumulative counting is performed every 5 seconds on the locked area according to the marking. The marking and counting results are used as the historical data of the online document data, and the historical data is used for a new round of conflict detection.

[0044] A second aspect of the present invention provides a conflict detection system for a standard online collaborative compilation platform, comprising:

[0045] Data collection module: used to collect online document data for pre-processing and collect user behavior data in real time, including input location and input features;

[0046] A first detection range acquisition module: configured to determine a first detection range based on the editable points of the online document data and the user's current input position;

[0047] A first detection range correction module is configured to calculate a transition probability matrix of different input positions for the historical data of the online document data using a Markov chain, use the transition probability matrix to perform popularity ranking of the historical input positions and the number of edits, and correct the first detection range based on the popularity ranking;

[0048] A first detection module: performs an initial detection using the first detection range. If no conflict point is detected, the first detection range is marked and the number of edits is counted. If the conflict point is located in the first detection range, a first detection time is obtained based on the input word length and input duration of the input feature. The first detection time is used to expand the first detection range through a conditional random field to obtain a second detection range.

[0049] The second detection module is used to lock the second detection range according to the current input position of the user, perform a second detection on the locked area, and if there is a conflict, prompt other users that the locked area has been locked, mark the locked area and count the number of edits.

[0050] Compared with the prior art, the embodiments of the present invention have at least the following advantages or beneficial effects:

[0051] The present invention can accurately detect online collaborative editing conflicts in real time, dynamically correct the detection range, optimize detection by combining historical data with user behavior, reduce false positives and missed judgments, improve collaborative efficiency, and probabilistically count the number of edits to the locked area to facilitate efficient conflict management. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a flowchart of the steps of a conflict detection method for a standard online collaborative compilation platform in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The technical solutions 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, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0054] Reference Figure 1 As shown, the present invention provides a conflict detection method for a standard online collaborative compilation platform, comprising:

[0055] Online document data is collected for preprocessing, and user behavior data is collected in real time, including input location and input features.

[0056] In the actual evaluation, paragraphs of an online document are extracted as editable points, and the number of edits corresponding to the editable points and the types of editing operations corresponding to the editable points are collected. Historical data within the past 24 hours are collected. For example, a paragraph is edited 15 times, including 8 insertion operations, 5 modifications, and 2 deletion operations as online document data. Behavioral data of multiple users are collected in real time, such as the mouse click coordinates (600, 1000) with the upper left corner of the page as the origin, an input frequency of 1.2 times per second, a single input length of 8 characters, and a single input duration of 0.8 seconds. The online document data is cleaned, and continuous operations on the same coordinate point more than 3 times within 1 second are considered to be false touches, and the false touches are deduplicated.

[0057] A first detection range is determined based on the editable points of the online document data and the current input position of the user.

[0058] In the actual evaluation, the five mouse movement trajectory points [(580,990), (600,1000), (620,1010), (610,1005), (605,1002)] of user A in the last 2 seconds are captured as the mouse trajectory point set. The maximum and minimum values ​​of the trajectory point coordinates are extracted from the mouse trajectory point set. The minimum value is used as the lower left corner coordinate, and the maximum value is used as the upper right corner coordinate. The minimum enclosing rectangle R1 [(580,620), (990,1010)] is obtained based on the lower left corner coordinate and the upper right corner coordinate. The relative horizontal and vertical coordinates are obtained based on the relative position of the current input position (600, 1000) and the geometric center point of the minimum enclosing rectangle R1. The horizontal and vertical boundaries of the minimum enclosing rectangle are expanded using twice the relative horizontal and vertical coordinates to obtain the enclosing rectangle R2 [(560, 640), (970, 1030)], use the enclosing rectangle and the editable point area to take the intersection and obtain the first detection range D1 [(560, 640), (970, 1030)]. If the user mouse trajectory point cannot be obtained, the enclosing rectangle formed by the user's current input position and the nearest editable point is directly expanded by two times to obtain the first detection range.

[0059] The transition probability matrix of different input positions is calculated for the historical data of the online document data through a Markov chain, the historical input positions and the number of edits are ranked by popularity using the transition probability matrix, and the first detection range is modified according to the popularity ranking.

[0060] In the actual evaluation, the transition probability matrix of different input positions is calculated through the Markov chain based on the historical data of online document data. According to the historical data, the editable area of ​​the document is divided into grids at 0.8 times the average spacing of the editable points. For example, the text spacing in a paragraph in the editable area is about 10 pixels, which is divided into 8 by 8 pixel grids at 0.8 times the spacing. The current paragraph is divided into 50 columns and 60 rows, a total of 3000 grids, of which the current input position of user A is grid G[75,125]. The probability of two grids being continuously accessed in the historical data is counted. If the probability of continuous access is greater than 0.3, a directed edge is generated to obtain a regional association graph. The transition probability of different grids is obtained according to the regional association graph. For example, if two grids are continuously accessed 30 times and the total number of times is 200, the transition probability matrix is ​​calculated using the transition probability. The difference between a certain operation and the current time is 60 seconds, and the last 100 operations within 24 hours are The average time interval between editing operations is 90 seconds. Substituting it into the transition probability matrix formula, we obtain a time decay term of 0.0227, and a transition probability of 0.227. If it is less than 0.3, no directed edges are generated. The transition probabilities of the other two grids G[75,125] and the downward G[75,126] are 0.35, and directed edges are generated. Based on the directed edges, a regional association graph is obtained, and based on the regional association graph, a valid transition probability matrix is ​​obtained.

[0061] In the actual evaluation, for the grid G[75,125] where user A is located, its current cycle is 5 minutes, the number of internal edits is 4, the total number of operations is 10, the transfer matrix elements are only G[75,125] and the downward G[75,126], the number of associated regions is 1, and the heat value calculation formula is substituted into the calculation to obtain the attenuation factor of 0.7788 and the non-attenuation term of 0.2212. The heat value of the grid G[75,125] after update is 0.8628. The heat values ​​of different grids are sorted in descending order. According to the sorting, the absolute value of the heat difference between adjacent grids is less than 0.2 and the transfer probability is The grids with a heat rate greater than 0.5 are merged into high heat areas. Since the heat difference between G[75,125] and the downward G[75,126] is 0.02, which is less than 0.2 and the transition probability 0.35 is less than 0.5, they are not merged. At this time, the high heat area cannot be used to merge and expand the first detection range. At this time, the heat value of another grid G[75,124] is 0.2, and its transition probability with the associated grid is 0.1, which belongs to the low heat area. Based on the first detection range D1 minus the low heat area, the corrected first detection range [(568,632), (992,1024)] is obtained.

[0062] The first detection range is used to perform an initial detection. If no conflict point is detected, the first detection range is marked and the number of edits is counted.

[0063] In the actual evaluation, the first detection range after correction is used for the initial detection. Since no other user's input position is detected within this range, it means there is no conflict. The first detection range is marked and the number of edits within this range is counted.

[0064] If the conflict point is located in the first detection range, a first detection time is obtained according to the input word length and input time of the input feature, and the first detection range is expanded using the conditional random field using the first detection time to obtain a second detection range.

[0065] In the actual evaluation, it was detected that user B inputted at the grid [75,126] of the first detection range D1, and a conflict point was determined to exist. At this time, the vertical axis distance between user B's position (600,1008) and user A's position (600,1000) was 8 pixels, and the distance from the boundary of the first detection range was 24 pixels (the distance between the upper and lower boundaries of D1 was 48 pixels, and the half-length was 24). Then, 8 was divided by 24 to obtain the first adjustment weight of 0.333. The last input duration of user A was 0.8 seconds, so the normalized weight of the first adjustment weight was 0.2. The normalized weight was used as the second adjustment weight. The product of user A's single input word length (8 characters) and the first adjustment weight (0.333) plus the product of the single input duration (0.8 seconds) and the second adjustment weight (0.2) was used to obtain the first detection time of 2.824.

[0066] In the actual evaluation, the first detection time of 2.824 seconds is used as the time window, and the average input length of the current user A in the time window is extracted as 7 characters, and the average input time is 0.7 seconds. According to the time window, the lower boundary grid G[75,128] of the first detection range D1 and the boundary grid distance 24 from the input position of user A are extracted. Pixels, the average input word length, average input time, grid coordinates of the boundary grid, and the distance between the boundary grid and the current input position in the time window are used as the input observation sequence of the conditional random field. Four reduction directions, namely, up, down, left, and right, are extracted according to the first detection range. The normalized difference of the transition probability of the corresponding direction is used as the reduction amplitude according to the reduction direction. Four combinations are obtained based on the reduction direction and the reduction amplitude. These four combinations are used as the state label set of the conditional random field. The transition probability between each state is counted based on the historical data and the state label set to obtain the conditional random field transfer matrix. The reduction state sequence is calculated as "down 0.5" by the Viterbi algorithm according to the conditional random field transfer matrix. The reduction grid corresponding to the reduction direction and reduction amplitude is extracted according to the reduction state sequence, that is, 50% is reduced upward from the lower boundary of D1 to obtain the second detection range D2 [(568,632), (992,1016)].

[0067] The second detection range is locked according to the current input position of the user, and the locked area is detected again. If there is a conflict, it prompts other users that the locked area has been locked, marks the locked area and counts the number of edits.

[0068] It should be explained that in online collaborative editing scenarios, conflict detection generally detects the input positions of multiple users in real time and cannot reflect the input characteristics of the current user. This is because in the actual editing process, users will not continuously input content, but will think while typing. After completing a period of input, they may interrupt the input and wait for a while before continuing to input. This interruption phenomenon is particularly obvious when multiple users are collaborating on editing. Therefore, the half-life parameter is used to give more weight to recent editing operations. The characteristics of the half-life are used to simulate this interruption phenomenon. At the same time, the smoothing factor is used to suppress the interference of long-term historical operations. This counting method can dynamically adapt to the differences in user editing rhythms, reflect the input characteristics of the current user, and quantify the conflict risk. High-risk areas trigger high-frequency detection, and low-risk areas reduce resource consumption, ultimately improving the accuracy of conflict detection and reducing the interference of invalid prompts on users.

[0069] In the actual evaluation, the second detection range D2 is locked, and the locked area is re-detected. If the input positions of user B and user C are detected in the second detection range at this time, it is prompted that user A is editing in this area, and other users cannot edit this area temporarily. It is recommended to switch the editing position. According to the statistics of the locked area, the input frequency of user A is 0.2 times per second. The half-life is extracted based on the input frequency to obtain 30 seconds. The lock is released when the current user switches the input position or reaches the half-life of the locked area. The average editing time of multiple users (500 seconds) is extracted from the historical data of the locked area as a smoothing factor. The half-life and smoothing factor are used to calculate the number of edits in the locked area. Probabilistic counting: for example, user A subsequently edited the locked area three times. The first edit was performed once after 10 seconds, the second edit was performed once after 25 seconds, and the third edit was performed twice after 45 seconds. The weights of these three edits are 0.778, 0.585, and 0.435, respectively. The total count is 2.201 when substituted into the counting formula. Marking is performed based on the counting results, and the locked area is counted every 5 seconds according to the markings. The markings and counting results are used as historical data of the online document data. If no conflict point is detected in the second detection, the second detection range is directly marked and the number of edits is counted.

[0070] In this embodiment, the preprocessing method includes:

[0071] Collect the editable points of online documents, the number of edits corresponding to the editable points, the types of editing operations corresponding to the editable points, and historical data as online document data, and collect behavioral data of different users in real time. The behavioral data includes input position and input features. The input features include input frequency, single input word length, and single input duration. The online document data is cleaned and deduplicated.

[0072] In this embodiment, the method for determining the first detection range includes:

[0073] Extract the mouse track point set within the last two seconds based on the editable points in the online document data and the user's current input position. Extract the maximum and minimum coordinates of the track point set based on the mouse track point set. Use the minimum value as the coordinate of the lower left corner and the maximum value as the coordinate of the upper right corner. Obtain the minimum enclosing rectangle based on the coordinates of the lower left corner and the upper right corner.

[0074] Obtain relative horizontal and vertical coordinates based on the relative position of the current input position and the geometric center point of the minimum enclosing rectangle, use twice the relative horizontal and vertical coordinates to expand the horizontal and vertical boundaries of the minimum enclosing rectangle to obtain an enclosing rectangle, and use the enclosing rectangle to intersect the editable point area to obtain a first detection range;

[0075] If the user's mouse track point cannot be obtained, the enclosing rectangle formed by the user's current input position and the nearest editable point is directly expanded twice to obtain the first detection range.

[0076] In this embodiment, the method for calculating the transition probability matrix includes:

[0077] Based on the historical data of online document data, the transition probability matrix of different input positions is calculated through Markov chain. According to the historical data, the editable area of ​​the document is divided into grids at 0.8 times the average spacing of the editable points. The probability of two grids being accessed continuously in the historical data is counted. If the probability of being accessed continuously is greater than 0.3, a directed edge is generated to obtain a regional association graph. The transition probabilities of different grids are obtained based on the regional association graph. The transition probability matrix is ​​calculated using the transition probabilities. The transition probability matrix formula is:

[0078] ;

[0079] in For the kth user u from state Transfer to state The probability of The type of editing operation for the last editable point. The type of editing operation for the next editable point. Indicates that if the mth operation is from Transfer to ,but is 1, otherwise is 0, is the original number of edits for the mth operation, is the difference between the current time and the time when the mth operation occurs, is the average time interval of the last 100 editing operations within 24 hours, T is the total number of operations, is the original number of edits for the nth operation, The difference between the current time and the time when the nth operation occurred.

[0080] In this embodiment, the method for correcting the first detection range includes:

[0081] Based on the transition probability matrix and regional association graph of online document data, we extract the transition matrix elements of different grids. We calculate the heat value based on the transition matrix elements, historical input positions, and edit times. The heat formula is:

[0082] ,

[0083] in is the grid heat value after update, H is the grid heat value after update, t is the minute interval, is the attenuation factor, the attenuation rate is 50%, d is the number of edit operations that occurred in the grid G ​​in the current cycle, T is the total number of operations, is the transfer matrix element, G is the grid, The type of editing performed for editable points. The number of regions in the region association graph in the current period that have directed edges connected to the grid G;

[0084] Sort the heat values ​​of different grids in descending order, and merge the grids whose absolute value of the heat difference between adjacent grids is less than 0.2 and the transition probability is greater than 0.5 into high heat areas according to the sorting, and use the high heat areas to merge and expand the first detection range;

[0085] The grids whose absolute value of the heat difference between adjacent grids is greater than 0.3 or whose transition probability is less than 0.3 are regarded as low heat areas, and the intersection area of ​​the first detection range is shrunk using the low heat areas.

[0086] In this embodiment, the method for obtaining the first detection time includes:

[0087] Performing an initial detection based on the first detection range, if the input position of another user is within the first detection range, determining that a conflict point exists within the first detection range, dividing the relative distance between the conflict point and the input position of the current user by the distance between the input position of the current user and the boundary of the first detection range to obtain a first adjustment weight, and using the normalized weight of the input duration adjustment weight as a second adjustment weight;

[0088] Extracting the most recent single input word length and single input duration based on the current user's input features, and obtaining a first detection time by multiplying the single input word length by the first adjustment weight and the single input duration by the second adjustment weight;

[0089] If no input position of another user is detected within the first detection range during the current user input, there is no conflict, and the conflict-free area is marked and the number of edits is counted.

[0090] In this embodiment, the method for obtaining the second detection range includes:

[0091] Determine a time window based on the first detection time, extract the average input word length and average input duration of the user within the time window, and extract the grid coordinates of the boundary grid of the first detection range and the distance between the boundary grid and the current input position according to the time window;

[0092] The average input word length, average input duration, grid coordinates of the boundary grid, and the distance between the boundary grid and the current input position in the time window are used as the input observation sequence of the conditional random field;

[0093] Extracting four reduction directions (up, down, left, and right) from the first detection range, taking the normalized difference of the transition probabilities of the corresponding directions as the reduction amplitude according to the reduction direction, obtaining different combinations based on the reduction direction and the reduction amplitude, and taking the different combinations as the state label set of the conditional random field;

[0094] Based on historical data and state label sets, the transition probabilities between states are counted to obtain the conditional random field transfer matrix. The reduced state sequence is calculated using the Viterbi algorithm according to the conditional random field transfer matrix. The reduced state sequence is extracted according to the reduced state sequence, and the reduced grid corresponding to the reduction direction and reduction amplitude is subtracted from the first detection range to obtain the second detection range.

[0095] In this embodiment, the method for marking the locked area and counting the number of edits includes:

[0096] The second detection range is locked based on the user's current input position, and the locked area is re-detected. If the second detection range detects the input position of other users, it prompts other users that the locked area has been locked;

[0097] According to the locked area, the user input frequency is counted, and the half-life is extracted based on the input frequency. The average editing time of multiple users is extracted from the historical data of the locked area as a smoothing factor. The half-life and smoothing factor are used to probabilistically count the number of edits in the locked area. The counting formula is:

[0098] ,

[0099] in is the total number of edits after probabilistic counting, y is the total number of edit operations in the locked area, is the original number of the rth editing operation, is the half-life, is the time interval between the rth editing operation and the current time, is the smoothing factor;

[0100] Marking is performed based on the counting results, and cumulative counting is performed every 5 seconds on the locked area according to the marking. The marking and counting results are used as the historical data of the online document data, and the historical data is used for a new round of conflict detection.

[0101] The second aspect of the present invention further provides a conflict detection system for a standard online collaborative compilation platform, comprising:

[0102] Data collection module: used to collect online document data for pre-processing and collect user behavior data in real time, including input location and input features;

[0103] A first detection range acquisition module: configured to determine a first detection range based on the editable points of the online document data and the user's current input position;

[0104] A first detection range correction module is configured to calculate a transition probability matrix of different input positions for the historical data of the online document data using a Markov chain, use the transition probability matrix to perform popularity ranking of the historical input positions and the number of edits, and correct the first detection range based on the popularity ranking;

[0105] A first detection module: performs an initial detection using the first detection range. If no conflict point is detected, the first detection range is marked and the number of edits is counted. If the conflict point is located in the first detection range, a first detection time is obtained based on the input word length and input duration of the input feature. The first detection time is used to expand the first detection range through a conditional random field to obtain a second detection range.

[0106] The second detection module is used to lock the second detection range according to the current input position of the user, perform a second detection on the locked area, and if there is a conflict, prompt other users that the locked area has been locked, mark the locked area and count the number of edits.

[0107] The above content is merely an example and explanation of the structure of the present invention. Those skilled in the art may make various modifications or additions to the described specific embodiments or replace them in a similar manner. As long as they do not deviate from the structure of the invention or exceed the scope defined by the claims, they should all fall within the scope of protection of the present invention.

Claims

1. A conflict detection method for a standard online collaborative editing platform, characterized in that: The following steps are involved: Collect online document data for preprocessing, and collect user behavior data in real time, including input location and input features; Determining a first detection range based on the editable points of the online document data and the user's current input position; Calculating a transition probability matrix of different input positions for historical data of the online document data using a Markov chain, using the transition probability matrix to perform popularity ranking of historical input positions and edit times, and modifying the first detection range according to the popularity ranking; Performing an initial detection using the first detection range, and if no conflict point is detected, marking the first detection range and counting the number of edits; If the conflict point is located in the first detection range, a first detection time is obtained based on the input word length and input duration of the input feature, a time window is determined based on the first detection time, the average input word length and average input duration of the user within the time window are extracted, and the grid coordinates of the boundary grid of the first detection range and the distance between the boundary grid and the current input position are extracted based on the time window; The average input word length, average input duration, grid coordinates of the boundary grid, and the distance between the boundary grid and the current input position in the time window are used as the input observation sequence of the conditional random field; Extracting four reduction directions (up, down, left, and right) from the first detection range, taking the normalized difference of the transition probabilities of the corresponding directions as the reduction amplitude according to the reduction direction, obtaining different combinations based on the reduction direction and the reduction amplitude, and taking the different combinations as the state label set of the conditional random field; Based on historical data and state label sets, the transition probabilities between states are calculated to obtain a conditional random field transition matrix. The reduced state sequence is calculated using the Viterbi algorithm based on the conditional random field transition matrix. The reduced state sequence is extracted based on the reduced state sequence, and the reduced grid corresponding to the reduction direction and reduction amplitude is subtracted from the first detection range to obtain the second detection range. The second detection range is locked according to the current input position of the user, and the locked area is detected again. If there is a conflict, it prompts other users that the locked area has been locked, marks the locked area and counts the number of edits.

2. The conflict detection method for a standard online collaborative editing platform according to claim 1, characterized in that: The pretreatment method comprises: Collect the editable points of online documents, the number of edits corresponding to the editable points, the types of editing operations corresponding to the editable points, and historical data as online document data, and collect behavioral data of different users in real time. The behavioral data includes input position and input features. The input features include input frequency, single input word length, and single input duration. The online document data is cleaned and deduplicated.

3. The conflict detection method for a standard online collaborative editing platform according to claim 1, characterized in that: The method for determining the first detection range includes: Extract the mouse track point set within the last two seconds based on the editable points in the online document data and the user's current input position. Extract the maximum and minimum coordinates of the track point set based on the mouse track point set. Use the minimum value as the coordinate of the lower left corner and the maximum value as the coordinate of the upper right corner. Obtain the minimum enclosing rectangle based on the coordinates of the lower left corner and the upper right corner. Obtain relative horizontal and vertical coordinates based on the relative position of the current input position and the geometric center point of the minimum enclosing rectangle, use twice the relative horizontal and vertical coordinates to expand the horizontal and vertical boundaries of the minimum enclosing rectangle to obtain an enclosing rectangle, and use the enclosing rectangle to intersect the editable point area to obtain a first detection range; If the user's mouse track point cannot be obtained, the enclosing rectangle formed by the user's current input position and the nearest editable point is directly expanded twice to obtain the first detection range.

4. The conflict detection method for a standard online collaborative editing platform according to claim 1, characterized in that: The method for calculating the transition probability matrix includes: Based on the historical data of online document data, the transition probability matrix of different input positions is calculated through Markov chain. According to the historical data, the editable area of ​​the document is divided into grids at 0.8 times the average spacing of the editable points. The probability of two grids being accessed continuously in the historical data is counted. If the probability of being accessed continuously is greater than 0.3, a directed edge is generated to obtain a regional association graph. The transition probabilities of different grids are obtained based on the regional association graph. The transition probability matrix is ​​calculated using the transition probabilities. The transition probability matrix formula is: ; in For the kth user u from state Transfer to state The probability of The type of editing operation for the last editable point. The type of editing operation for the next editable point. Indicates that if the mth operation is from Transfer to ,but is 1, otherwise is 0, is the original number of edits for the mth operation, is the difference between the current time and the time when the mth operation occurs, is the average time interval of the last 100 editing operations within 24 hours, T is the total number of operations, is the original number of edits for the nth operation, The difference between the current time and the time when the nth operation occurred.

5. The conflict detection method for a standard online collaborative editing platform according to claim 1, characterized in that: The method for correcting the first detection range includes: Based on the transition probability matrix and regional association graph of online document data, we extract the transition matrix elements of different grids. We calculate the heat value based on the transition matrix elements, historical input positions, and edit times. The heat formula is: , in is the grid heat value after update, H is the grid heat value after update, t is the minute interval, is the attenuation factor, the attenuation rate is 50%, d is the number of edit operations that occurred in the grid G ​​in the current cycle, T is the total number of operations, is the transfer matrix element, G is the grid, The type of editing performed for editable points. The number of regions in the region association graph in the current period that have directed edges connected to the grid G; Sort the heat values ​​of different grids in descending order, and merge the grids whose absolute value of the heat difference between adjacent grids is less than 0.2 and the transition probability is greater than 0.5 into high heat areas according to the sorting, and use the high heat areas to merge and expand the first detection range; The grids whose absolute value of the heat difference between adjacent grids is greater than 0.3 or whose transition probability is less than 0.3 are regarded as low heat areas, and the intersection area of ​​the first detection range is shrunk using the low heat areas.

6. The conflict detection method for a standard online collaborative editing platform according to claim 1, characterized in that: The method for obtaining the first detection time includes: Performing an initial detection based on the first detection range, if the input position of another user is within the first detection range, determining that a conflict point exists within the first detection range, dividing the relative distance between the conflict point and the input position of the current user by the distance between the input position of the current user and the boundary of the first detection range to obtain a first adjustment weight, and using the normalized weight of the input duration adjustment weight as a second adjustment weight; Extracting the most recent single input word length and single input duration based on the current user's input features, and obtaining a first detection time by multiplying the single input word length by the first adjustment weight and the single input duration by the second adjustment weight; If no input position of another user is detected within the first detection range during the current user input, there is no conflict, and the conflict-free area is marked and the number of edits is counted.

7. The conflict detection method for a standard online collaborative editing platform according to claim 1, characterized in that: The method for marking the locked area and counting the number of edits includes: The second detection range is locked based on the user's current input position, and the locked area is re-detected. If the second detection range detects the input position of other users, it prompts other users that the locked area has been locked; According to the locked area, the user input frequency is counted, and the half-life is extracted based on the input frequency. The average editing time of multiple users is extracted from the historical data of the locked area as a smoothing factor. The half-life and smoothing factor are used to probabilistically count the number of edits in the locked area. The counting formula is: , in is the total number of edits after probabilistic counting, y is the total number of edit operations in the locked area, is the original number of the rth editing operation, is the half-life, is the time interval between the rth editing operation and the current time, is the smoothing factor; Marking is performed based on the counting results, and cumulative counting is performed every 5 seconds on the locked area according to the marking. The marking and counting results are used as the historical data of the online document data, and the historical data is used for a new round of conflict detection.

8. A conflict detection system for a standard online collaborative editing platform, used to execute the conflict detection method for a standard online collaborative editing platform according to any one of claims 1 to 7, characterized in that: The system comprises: Data collection module: used to collect online document data for pre-processing and collect user behavior data in real time, including input location and input features; A first detection range acquisition module: configured to determine a first detection range based on the editable points of the online document data and the user's current input position; A first detection range correction module is configured to calculate a transition probability matrix of different input positions for the historical data of the online document data using a Markov chain, use the transition probability matrix to perform popularity ranking of the historical input positions and the number of edits, and correct the first detection range based on the popularity ranking; A first detection module: performs an initial detection using the first detection range. If no conflict point is detected, the first detection range is marked and the number of edits is counted. If the conflict point is located in the first detection range, a first detection time is obtained based on the input word length and input duration of the input feature. A time window is determined based on the first detection time, and the average input word length and average input duration of the user within the time window are extracted. The grid coordinates of the boundary grid of the first detection range and the distance between the boundary grid and the current input position are extracted based on the time window. The average input word length, average input duration, grid coordinates of the boundary grid, and the distance between the boundary grid and the current input position in the time window are used as the input observation sequence of the conditional random field; Extracting four reduction directions (up, down, left, and right) from the first detection range, taking the normalized difference of the transition probabilities of the corresponding directions as the reduction amplitude according to the reduction direction, obtaining different combinations based on the reduction direction and the reduction amplitude, and taking the different combinations as the state label set of the conditional random field; Based on historical data and state label sets, the transition probabilities between states are calculated to obtain a conditional random field transition matrix. The reduced state sequence is calculated using the Viterbi algorithm based on the conditional random field transition matrix. The reduced state sequence is extracted based on the reduced state sequence, and the reduced grid corresponding to the reduction direction and reduction amplitude is subtracted from the first detection range to obtain the second detection range. The second detection module is used to lock the second detection range according to the current input position of the user, perform a second detection on the locked area, and if there is a conflict, prompt other users that the locked area has been locked, mark the locked area and count the number of edits.

Citation Information

Patent Citations

  • Geotechnical engineering intelligent monitoring and early warning method and device based on probability theory

    CN112818567A

  • Text classification method, device and equipment and computer readable storage medium

    CN118673140A