CN110750364A - Multi-user online editing management method, device and system - Google Patents

Multi-user online editing management method, device and system Download PDF

Info

Publication number
CN110750364A
CN110750364A CN201910828249.4A CN201910828249A CN110750364A CN 110750364 A CN110750364 A CN 110750364A CN 201910828249 A CN201910828249 A CN 201910828249A CN 110750364 A CN110750364 A CN 110750364A
Authority
CN
China
Prior art keywords
editing
resource
terminal
server
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910828249.4A
Other languages
Chinese (zh)
Inventor
王广邦
孙迁
张毅
武丽鸿
周雅欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN201910828249.4A priority Critical patent/CN110750364A/en
Publication of CN110750364A publication Critical patent/CN110750364A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention discloses a multi-user online editing management method, a multi-user online editing management device and a multi-user online editing management system, which solve the technical problem of data asynchronism caused by the fact that multiple users simultaneously edit the same data resource. In the implementation of the invention, before a user edits a resource, a terminal sends an editing request carrying a communication identifier to a server, the server judges whether the resource is locked or not, if the resource is locked, the lock identifier is set as the communication identifier, the user is allowed to edit the resource, and after the editing is finished, the terminal informs the server to release the lock of the resource. The communication identifiers are generated according to the user identifiers and the editing tab labels, different users, different terminals and different editing tabs are different in the sent editing requests, during the resource locking period, the server only allows the users with the same communication identifiers and lock identifiers in the sent editing requests to edit, the editing requests of other users to the resources are rejected, data collision is avoided, and the integrity of the data is guaranteed.

Description

Multi-user online editing management method, device and system
Technical Field
The invention relates to the technical field of resource management, in particular to a multi-user editing resource management method, device and system.
Background
When a web user edits the same resource of a server, especially when multiple terminals edit the same resource in the same time period, the phenomenon that resource data is asynchronous and even lost is easily caused.
One solution is real-time synchronization, which synchronizes to the server in real-time and synchronizes the server content to the terminal in real-time as the user edits the content. The scheme needs to monitor the content of the user in real time and needs to keep long-time and multi-content communication with the server, and the communication content is larger and larger as the edited content is more and more. It is easy to put a great deal of pressure on the server.
Another solution is version comparison, similar to current version comparison tools. The method does not need real-time synchronization, and solves the problem that the first scheme causes pressure to the server. Before the user edits and submits the resource data, a front-back version comparison display is needed, and the user decides to accept or reject a certain version or merge the versions. Obviously, the scheme greatly reduces the user experience and does not solve the problem of data asynchronism fundamentally.
Disclosure of Invention
The embodiment of the invention provides a multi-user online editing management method, a multi-user online editing management device and a multi-user online editing management system, and solves the technical problem that data resources are asynchronous due to the fact that multiple users edit the same resources at the same time.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a multi-user online editing management method, used in a server, where the method includes:
receiving an editing request which is sent by a terminal and carries a resource name and a communication identifier, wherein the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
confirming whether the resource is locked or not, and if the resource is locked, sending an editing forbidding response to the terminal; if the resource is not locked, locking the resource, setting a lock identifier of the resource as a communication identifier, and sending an editing permission response to the terminal, wherein the editing permission response is used for editing the resource after being received by the terminal;
and receiving an editing ending request carrying a communication identifier sent by a terminal, and releasing the lock of the resource.
In a second aspect, an embodiment of the present invention provides a multi-user online editing management method, used for a terminal, where the method includes:
sending an editing request carrying a resource name and a communication identifier to a server, wherein the editing request is used for confirming whether the resource is locked or not after being received by the server, if the resource is not locked, locking the resource, setting the lock identifier of the resource as the communication identifier, and sending an editing permission response to a terminal; if the resource is locked, sending an editing forbidding response to the terminal; the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
receiving a response fed back by the server, and editing the resource if the response is a response allowing editing;
and sending an edit ending request carrying the communication identifier to the server, wherein the edit ending request is used for releasing the lock of the resource after being received by the server.
In a third aspect, an embodiment of the present invention provides a multi-user online editing management apparatus, for a server, where the apparatus includes:
the editing request receiving module is used for receiving an editing request which is sent by a terminal and carries a resource name and a communication identifier, and the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
the locking judgment module is used for confirming whether the resource is locked or not, and if the resource is locked, sending an editing forbidding response to the terminal; if the resource is not locked, locking the resource, setting a lock identifier of the resource as a communication identifier, and sending an editing permission response to the terminal, wherein the editing permission response is used for editing the resource after being received by the terminal;
and the ending module is used for receiving an ending editing request which is sent by the terminal and carries the communication identifier and releasing the lock of the resource.
In a fourth aspect, an embodiment of the present invention provides a multi-user online editing management apparatus, for a terminal, where the apparatus includes:
the editing request generating module is used for sending an editing request carrying a resource name and a communication identifier to the server, confirming whether the resource is locked or not after the editing request is received by the server, locking the resource if the resource is not locked, setting the lock identifier of the resource as the communication identifier, and sending an editing permission response to the terminal; if the resource is locked, sending an editing forbidding response to the terminal; the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
the editing module is used for receiving the response fed back by the server, and editing the resource if the response is a response allowing editing;
and the ending request generating module is used for sending an ending editing request carrying the communication identifier to the server, and the ending editing request is used for releasing the lock of the resource after being received by the server.
In a fifth aspect, an embodiment of the present invention provides a multi-user online editing management system, where the system includes a terminal and a server connected to the terminal through a wired network or a wireless network;
the server comprises a multi-user online editing management device according to the third aspect;
the terminal comprises the multi-user online editing management device according to the fourth aspect.
The embodiment of the invention provides a multi-user editing resource management method, a device and a system, which solve the technical problem of data asynchronism caused by the fact that multiple users edit the same data resource at the same time. Compared with the prior art, in the implementation of the invention, before the user edits the resource, the terminal firstly sends the editing request carrying the communication identifier to the server, the server inquires whether the resource is locked or not, if the resource is locked, the lock identifier is set as the communication identifier, the user is allowed to edit the resource, and after the editing is finished, the terminal informs the server to release the lock of the resource. The communication identifiers are generated according to the user identifiers and the editing tab labels, different users, different terminals or different editing tabs are different in the sent editing requests, the server only allows the users with the same communication identifier and the same locking identifier in the sent editing requests to edit during resource locking, the editing requests of other users to the resources can be rejected, only one user, one terminal and one editing tab can edit the resources at the same time, data collision is avoided, and the integrity of the data resources is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an implementation environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for managing multi-user online editing according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for multi-user online editing management according to another embodiment of the present invention;
FIG. 4 is a flow chart of a specific example to which embodiments of the present invention relate;
fig. 5 is a block diagram illustrating an architecture of a multi-user online editing management apparatus according to an embodiment of the present invention;
fig. 6 is a block diagram illustrating a multi-user online editing management apparatus according to another embodiment of the present invention;
fig. 7 is a block diagram illustrating a multi-user online editing management system according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the present invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, those skilled in the art can obtain the embodiments without any inventive step in advance, and the embodiments are within the protection scope of the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Fig. 1 is a schematic diagram illustrating an implementation environment according to an embodiment of the present invention. The implementation environment includes a terminal and a server.
The terminal may be a mobile phone, a tablet computer, a laptop portable computer, a desktop computer, etc. The terminal and the server can be connected through a wireless network or a wired network. The server can be a server, a server cluster consisting of a plurality of servers, or a cloud computing service center.
The terminal includes memory (which may include one or more computer-readable storage media), a memory controller, one or more processing units (CPUs), a peripheral interface, RF circuitry, audio circuitry, speakers, microphones, input/output (I/O) subsystems, other input control terminals, and external ports. The terminal may include one or more optical sensors, which may communicate via one or more communication buses or signal lines.
The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile memory. Access to the memory by other components of the terminal, such as the CPU and peripheral interfaces, may be controlled by a memory controller.
The peripheral interface couples input and output peripherals of the terminal to the CPU and memory. The one or more processors execute or execute various software programs and/or sets of instructions stored in the memory to implement various functions of the terminal and to process data.
In some embodiments, the peripheral interface, the CPU, and the memory controller may be implemented on a single chip. In some other embodiments, they may be implemented on separate chips.
RF (radio frequency) circuits receive and transmit RF signals. The RF circuit converts/transforms an electrical signal into/from an electromagnetic signal, and communicates with a communication network and other communication devices through the electromagnetic signal. The RF circuitry may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC chipset, a Subscriber Identity Module (SIM) card, memory, and so forth.
The audio circuit, speaker, and microphone provide an audio interface between the user and the terminal. The audio circuit receives audio data from the peripheral interface, converts the audio data to an electrical signal, and sends the electrical signal to the speaker. The speaker converts the electrical signal into sound waves that are heard by the human ear. The audio circuit also receives electrical signals converted by the microphone from sound waves. The audio circuit converts the electrical signal to audio data and sends the audio data to the peripheral interface for processing. Audio data may be retrieved from and/or transmitted to the memory and/or RF circuitry through the peripheral interface.
The I/O subsystem couples input/output peripherals on the terminal to the peripheral interfaces. The I/O subsystem may include a display controller and one or more input controllers for other input or control terminals. One or more input controllers receive and transmit electrical signals from/to other input or control terminals. Other input/control terminals may include physical buttons, dials, slide switches, joysticks, click wheels, and the like. In some alternative embodiments, the input controller may be coupled to any one of the following: a keyboard, an infrared port, a USB port, and a pointing device such as a mouse.
Touch sensitive touch screens provide an input interface and an output interface between a terminal and a user. The display controller receives and/or transmits electrical signals from/to the touch screen. The touch screen displays visual output to the user. The visual output may include graphics, text, icons, video, and any combination thereof (collectively "graphics").
Touch screens have a touch sensitive surface, sensor or group of sensors for accepting input from a user based on tactile and/or haptic contact. The touch screen and the display controller detect contact on the touch screen and convert the detected contact into interaction with a user interface object displayed on the touch screen. In one example embodiment, the point of contact between the touch screen and the user corresponds to a finger of the user. Other display technologies may be employed in other embodiments.
The server may include components such as an input unit, a processor unit, an output unit, a communication unit, a storage unit, peripheral units, and the like. These components communicate over one or more buses. Specifically, the method comprises the following steps:
the input unit is used for realizing the interaction between a user and the server and/or inputting information into the server. For example, the input unit may receive numeric or character information input by a user to generate a signal input related to user setting or function control. In the embodiment of the present invention, the input unit may be a touch panel, or may be other human-computer interaction interfaces, such as a physical input key, a mouse, or a joystick.
The processor unit is a control center of the server, connects various parts of the entire server using various interfaces and lines, and executes various functions of the server and/or processes data by operating or executing software programs and/or modules stored in the storage unit and calling data stored in the storage unit. The processor unit may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor Unit may include only a Central Processing Unit (CPU), or may be a combination of a GPU, a Digital Signal Processor (DSP), and a control chip (e.g., a baseband chip) in the communication Unit. In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
The communication unit is configured to establish a communication channel, so that the server is connected to a remote device, for example, a terminal device of a technician, through the communication channel, and performs data interaction with the remote device, for example, the terminal device of the technician may send a request message to the server, so as to trigger the server to start executing the method flow provided in this embodiment.
The output unit includes, but is not limited to, an image output unit and a sound output unit. The image output unit is used for outputting characters, pictures and/or videos. The image output unit may include a display panel, such as a display panel configured in the form of an LCD (Liquid crystal display), an OLED (Organic Light-Emitting Diode), a Field Emission Display (FED), and the like.
The storage unit may be used to store software programs and modules, and the processing unit executes various functional applications of the server and implements data processing by running the software programs and modules stored in the storage unit. The storage unit mainly comprises a program storage area and a data storage area, wherein the program storage area can store an operating system and an application program required by at least one function. In an embodiment of the invention, the Memory unit may include a volatile Memory, such as a Nonvolatile dynamic Random Access Memory (NVRAM), a phase change Random Access Memory (PRAM), a Magnetoresistive Random Access Memory (MRAM), and a non-volatile Memory, such as at least one magnetic disk Memory device, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a flash Memory device, such as a flash Memory (NOR) or a flash Memory (NAND) or a flash Memory. The nonvolatile memory stores an operating system and an application program executed by the processing unit. The processing unit loads the operating program and data from the non-volatile memory into the memory and stores the digital content in the mass storage device.
The power supply is used to power the various components of the server to maintain their operation, including an external power supply that directly powers the server, such as an AC adapter or the like. In some embodiments of the invention, the power supply may be more broadly defined and may include, for example, a power management system, a charging system, a power failure detection circuit, a power converter or inverter, a power status indicator (e.g., a light emitting diode), and any other components associated with power generation, management, and distribution of the server.
Referring to fig. 2, a flowchart of a method for managing multi-user online editing according to an embodiment of the present invention is shown, and the embodiment of the present invention is illustrated by applying the method for managing multi-user editing resources to a terminal in the implementation environment shown in fig. 1. The multi-user editing resource management method comprises the following steps:
step S102, sending an editing request carrying a resource name and a communication identifier to a server, wherein the editing request is used for confirming whether the resource is locked or not after being received by the server, if the resource is not locked, locking the resource, setting the lock identifier of the resource as the communication identifier, and sending an editing permission response to a terminal; if the resource is locked, sending an editing forbidding response to the terminal; and the communication identifier is generated according to the user identifier and the editing tab identifier of the terminal.
And step S104, receiving a response fed back by the server, and editing the resource if the response is a response allowing editing.
And step S106, sending an editing ending request carrying the communication identifier to the server, wherein the editing ending request is used for releasing the lock of the resource after being received by the server.
The embodiment of the invention provides a multi-user editing resource management method, which solves the technical problem of data asynchronism caused by the fact that multiple users edit the same data resource at the same time. Compared with the prior art, in the implementation of the invention, before the user edits the resource, the terminal firstly sends the editing request carrying the communication identifier to the server, the server inquires whether the resource is locked or not, if the resource is locked, the lock identifier is set as the communication identifier, the user is allowed to edit the resource, and after the editing is finished, the terminal informs the server to release the lock of the resource. The communication identifiers are generated according to the user identifiers and the editing tab labels, different users, different terminals or different editing tabs are different in the sent editing requests, the server only allows the users with the same communication identifier and the same locking identifier in the sent editing requests to edit during resource locking, the editing requests of other users to the resources can be rejected, only one user, one terminal and one editing tab can edit the resources at the same time, data collision is avoided, and the integrity of the data resources is guaranteed.
Referring to fig. 3, a flowchart of a method for managing multi-user online editing according to an embodiment of the present invention is shown, and the embodiment of the present invention is illustrated in a manner that the method for managing multi-user online editing resources is applied to a server in the implementation environment shown in fig. 1. The multi-user editing resource management method comprises the following steps:
step S202, receiving an editing request which is sent by a terminal and carries a resource name and a communication identifier.
Step S204, confirming whether the resource is locked, if the resource is not locked, locking the resource, setting the lock identifier of the resource as a communication identifier, and sending an editing permission response to the terminal; if the resource is locked, sending an editing forbidding response to the terminal; and the editing allowing response is used for editing the resource after being received by the terminal and sending an editing ending request carrying the communication identifier to the server.
And step S206, receiving an edit ending request carrying the communication identifier sent by the terminal, and releasing the lock of the resource.
The embodiment of the invention provides a multi-user online editing management method, which solves the technical problem of data asynchronism caused by the fact that multiple users edit the same data resource at the same time. Compared with the prior art, in the implementation of the invention, before the user edits the resource, the terminal firstly sends the editing request carrying the communication identifier to the server, the server inquires whether the resource is locked or not, if the resource is locked, the lock identifier is set as the communication identifier, the user is allowed to edit the resource, and after the editing is finished, the terminal informs the server to release the lock of the resource. The communication identifiers are generated according to the user identifiers and the editing tab labels, different users, different terminals or different editing tabs are different in the sent editing requests, the server only allows the users with the same communication identifier and the same locking identifier in the sent editing requests to edit during resource locking, the editing requests of other users to the resources can be rejected, only one user, one terminal and one editing tab can edit the resources at the same time, data collision is avoided, and the integrity of the data resources is guaranteed.
Referring to fig. 4, a flowchart of a method for managing multi-user online editing according to an embodiment of the present invention is shown, and this embodiment is illustrated by applying the method for managing multi-user editing resources to the implementation environment shown in fig. 1. The multi-user editing resource management method comprises the following steps:
step S301, sending an editing request carrying the resource name and the communication identifier to a server.
The terminal A sends an editing request to the server, wherein the editing request comprises a resource name a and a communication identifier ID1, and the communication identifier ID1 is generated according to the user identifier and the editing tab identifier of the terminal A.
Correspondingly, the server receives the editing request sent by the terminal.
Step S303, confirming whether the resource is locked, if the resource is not locked, locking the resource, setting the lock identifier of the resource as a communication identifier, and sending an editing permission response to the terminal; and if the resource is locked, sending an editing forbidding response to the terminal.
The server inquires whether the resource a has a lock from the database server, at the moment, the resource a has no lock, locks the resource a, sets the lock identifier of the resource a to be ID1, and sends an edit permission response to the terminal A.
If the terminal B sends an editing request carrying the resource name a and the communication identification ID2 to the server, the server inquires whether the resource a is locked or not from the database server after receiving the editing request sent by the terminal B, and if the resource a is locked, an access prohibition response is sent to the terminal B.
Optionally, after the resource is locked, the lock is checked by using a heartbeat mechanism, and if the number of times that the lock is not detected exceeds the preset number of times, the lock of the resource is released.
Optionally, the access prohibition response carries a lock identifier of the resource. The server sends a block access response to terminal B containing the lock identification ID1 for resource a.
And step S305, receiving a response fed back by the server, and if the response is an editing-allowed response, sending an editing request carrying the editing content and the communication identifier to the server.
The response that the terminal a receives the server feedback is a permission editing response, and the terminal a transmits editing information including the editing content and the communication identification ID1 to the server.
Correspondingly, the server receives the editing information sent by the terminal.
Step S307, judging whether the communication identifier is the same as the lock identifier of the resource, if so, editing the resource according to the editing content, and sending an editing success response to the terminal.
And the server judges that the communication identifier ID1 in the editing information is the same as the lock identifier ID1 of the resource a, edits the resource a according to the editing content, and feeds back an editing success response to the terminal A after the editing is successful.
Correspondingly, the terminal receives the editing success response fed back by the server.
Step S309, sending an edit ending request carrying the communication identifier to the server.
The terminal a transmits an end edit request including the communication identification ID1 to the server.
Correspondingly, the server receives the edit ending request sent by the terminal.
Step S311, release the lock of the resource.
The server releases the lock for resource a.
The embodiment of the invention provides a multi-user online editing management method, which solves the technical problem of data asynchronism caused by the fact that multiple users edit the same data resource at the same time. Compared with the prior art, in the implementation of the invention, before the user edits the resource, the terminal firstly sends the editing request carrying the communication identifier to the server, the server inquires whether the resource is locked or not, if the resource is locked, the lock identifier is set as the communication identifier, the user is allowed to edit the resource, and after the editing is finished, the terminal informs the server to release the lock of the resource. The communication identifiers are generated according to the user identifiers and the editing tab labels, different users, different terminals or different editing tabs are different in the sent editing requests, the server only allows the users with the same communication identifier and the same locking identifier in the sent editing requests to edit during resource locking, the editing requests of other users to the resources can be rejected, only one user, one terminal and one editing tab can edit the resources at the same time, data collision is avoided, and the integrity of the data resources is guaranteed.
In addition, the embodiment of the invention provides that after the response of allowing editing is received, the server judges whether the communication identifier in the editing information is the same as the lock identifier of the resource, and then edits the resource, so that the inconsistency of data caused by replacing a user or an editing tab or a terminal after the response of allowing editing is received is prevented, the user and the editing tab on the terminal allowing editing are obtained when the resource is edited, and the integrity of the resource is better ensured.
The embodiment of the invention also provides that after the server locks the resource, the heartbeat mechanism is adopted to detect the lock, and if the lock cannot be detected after the preset times, the lock is released. The method and the device prevent the terminal from encountering faults before sending the lock releasing request, such as unexpected closing of the terminal or interruption of connection between the terminal and the server, so that the resources are locked all the time and cannot be released, and ensure the timeliness of the lock releasing.
The embodiment of the invention also provides that when the terminal sends an editing request to the server, the server inquires that the resource is locked, sends an editing forbidding response carrying the resource lock identification to the terminal, the terminal displays the resource lock identification and informs the user which user or page label is editing the resource at present, and if the user is the lock added at other terminals, the user can release the lock in time.
Referring to fig. 5, it shows a block diagram of a multi-user online editing management apparatus according to an embodiment of the present invention, which may be implemented as part of a terminal through software, hardware, or a combination of both. The multi-user online editing management device comprises: the device comprises an editing request generation module, an editing module and an ending request generation module.
The editing request generating module is used for sending an editing request carrying a resource name and a communication identifier to the server, confirming whether the resource is locked or not after the editing request is received by the server, locking the resource if the resource is not locked, setting the lock identifier of the resource as the communication identifier, and sending an editing permission response to the terminal; if the resource is locked, sending an editing forbidding response to the terminal; the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
the editing module is used for receiving the response fed back by the server, and editing the resource if the response is a response allowing editing;
and the ending request generating module is used for sending an ending editing request carrying the communication identifier to the server, and the ending editing request is used for releasing the lock of the resource after being received by the server.
The multi-user online editing management device provided by the embodiment of the invention solves the technical problem of data asynchronism caused by the fact that multiple users edit the same data resource at the same time. Compared with the prior art, in the implementation of the invention, before the user edits the resource, the terminal firstly sends the editing request carrying the communication identifier to the server, the server inquires whether the resource is locked or not, if the resource is locked, the lock identifier is set as the communication identifier, the user is allowed to edit the resource, and after the editing is finished, the terminal informs the server to release the lock of the resource. The communication identifiers are generated according to the user identifiers and the editing tab labels, different users, different terminals or different editing tabs are different in the sent editing requests, the server only allows the users with the same communication identifier and the same locking identifier in the sent editing requests to edit during resource locking, the editing requests of other users to the resources can be rejected, only one user, one terminal and one editing tab can edit the resources at the same time, data collision is avoided, and the integrity of the data resources is guaranteed.
Referring to fig. 6, it shows a block diagram of a multi-user online editing management apparatus according to an embodiment of the present invention, which may be implemented as part of a server through software, hardware, or a combination of the two. The multi-user online editing management device comprises: the device comprises an editing request receiving module, a locking judging module and an ending module.
The editing request receiving module is used for receiving an editing request which is sent by a terminal and carries a resource name and a communication identifier;
the locking judgment module is used for confirming whether the resource is locked or not, if the resource is not locked, locking the resource, setting the lock identifier of the resource as a communication identifier, and sending an editing permission response to the terminal; if the resource is locked, sending an editing forbidding response to the terminal; the editing allowing response is used for editing the resource after being received by the terminal and sending an editing ending request carrying the communication identifier to the server;
and the ending module is used for receiving an ending editing request which is sent by the terminal and carries the communication identifier and releasing the lock of the resource.
The multi-user online editing management device provided by the embodiment of the invention solves the technical problem of data asynchronism caused by the fact that multiple users edit the same data resource at the same time. Compared with the prior art, in the implementation of the invention, before the user edits the resource, the terminal firstly sends the editing request carrying the communication identifier to the server, the server inquires whether the resource is locked or not, if the resource is locked, the lock identifier is set as the communication identifier, the user is allowed to edit the resource, and after the editing is finished, the terminal informs the server to release the lock of the resource. The communication identifiers are generated according to the user identifiers and the editing tab labels, different users, different terminals or different editing tabs are different in the sent editing requests, the server only allows the users with the same communication identifier and the same locking identifier in the sent editing requests to edit during resource locking, the editing requests of other users to the resources can be rejected, only one user, one terminal and one editing tab can edit the resources at the same time, data collision is avoided, and the integrity of the data resources is guaranteed.
Referring to fig. 7, it shows a block diagram of a multi-user online editing management system according to an embodiment of the present invention, the multi-user online editing management system includes: the terminal comprises a terminal and a server connected with the terminal through a wired network or a wireless network.
The terminal may include a multi-user online edit management apparatus, which may be implemented as part of the terminal by software, hardware, or a combination of both. The multi-user online editing management device comprises: the device comprises an editing request generation module, an editing module and an ending request generation module.
The editing request generating module is used for sending an editing request carrying a resource name and a communication identifier to the server, confirming whether the resource is locked or not after the editing request is received by the server, locking the resource if the resource is not locked, setting the lock identifier of the resource as the communication identifier, and sending an editing permission response to the terminal; if the resource is locked, sending an editing forbidding response to the terminal; the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
the editing module is used for receiving the response fed back by the server, and editing the resource if the response is a response allowing editing;
and the ending request generating module is used for sending an ending editing request carrying the communication identifier to the server, and the ending editing request is used for releasing the lock of the resource after being received by the server.
The server may include a multi-user online edit management device that may be implemented as part of the server in software, hardware, or a combination of both. The multi-user online editing management device comprises: the device comprises an editing request receiving module, a locking judging module, an ending module and a detecting module.
The editing request receiving module is used for receiving an editing request which is sent by a terminal and carries a resource name and a communication identifier;
the locking judgment module is used for confirming whether the resource is locked or not, if the resource is not locked, locking the resource, setting the lock identifier of the resource as a communication identifier, and sending an editing permission response to the terminal; if the resource is locked, sending an editing forbidding response to the terminal; the editing allowing response is used for editing the resource after being received by the terminal and sending an editing ending request carrying the communication identifier to the server;
and the ending module is used for receiving an ending editing request which is sent by the terminal and carries the communication identifier and releasing the lock of the resource.
And the detection module is used for checking the lock by adopting a heartbeat mechanism, and releasing the lock of the resource if the number of times that the lock is not detected exceeds the preset number of times.
The multi-user online editing management system provided by the embodiment of the invention solves the technical problem of data asynchronism caused by the fact that multiple users edit the same data resource at the same time. Compared with the prior art, in the implementation of the invention, before the user edits the resource, the terminal firstly sends the editing request carrying the communication identifier to the server, the server inquires whether the resource is locked or not, if the resource is locked, the lock identifier is set as the communication identifier, the user is allowed to edit the resource, and after the editing is finished, the terminal informs the server to release the lock of the resource. The communication identifiers are generated according to the user identifiers and the editing tab labels, different users, different terminals or different editing tabs are different in the sent editing requests, the server only allows the users with the same communication identifier and the same locking identifier in the sent editing requests to edit during resource locking, the editing requests of other users to the resources can be rejected, only one user, one terminal and one editing tab can edit the resources at the same time, data collision is avoided, and the integrity of the data resources is guaranteed.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A multi-user online edit management method, for a server, the method comprising:
receiving an editing request which is sent by a terminal and carries a resource name and a communication identifier, wherein the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
confirming whether the resource is locked or not, and if the resource is locked, sending an editing forbidding response to the terminal; if the resource is not locked, locking the resource, setting a lock identifier of the resource as a communication identifier, and sending an editing permission response to the terminal, wherein the editing permission response is used for editing the resource after being received by the terminal;
and receiving an editing ending request carrying a communication identifier sent by a terminal, and releasing the lock of the resource.
2. The method according to claim 1, before the edit end request with the communication identifier sent by the receiving terminal, further comprising:
receiving editing information which is sent by a terminal and carries editing content and a communication identifier;
judging whether the communication identifier is the same as the lock identifier of the resource, and if so, editing the resource according to the editing content;
and sending an editing success response to the terminal, wherein the editing success response is used for sending an editing ending request carrying the communication identifier after the terminal receives the editing success response.
3. The method of claim 1, wherein the edit prohibition response carries a lock identification for the resource.
4. The method of claim 1, further comprising:
after the resource is locked, a heartbeat mechanism is adopted to check the lock, and if the times of the lock which is not detected exceeds the preset times, the lock of the resource is released.
5. A multi-user online editing management method is used for a terminal, and comprises the following steps:
sending an editing request carrying a resource name and a communication identifier to a server, wherein the editing request is used for confirming whether the resource is locked or not after being received by the server, if the resource is not locked, locking the resource, setting the lock identifier of the resource as the communication identifier, and sending an editing permission response to a terminal; if the resource is locked, sending an editing forbidding response to the terminal; the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
receiving a response fed back by the server, and editing the resource if the response is a response allowing editing;
and sending an edit ending request carrying the communication identifier to the server, wherein the edit ending request is used for releasing the lock of the resource after being received by the server.
6. The method according to claim 5, wherein the editing the resource specifically comprises:
sending edit information carrying edit content and a communication identifier to a server, wherein the edit information is used for judging whether the communication identifier is the same as the lock identifier of the resource after being received by the server, and if so, editing the resource according to the edit content and sending an edit success response to a terminal;
and receiving an editing success response fed back by the server.
7. A multi-user online edit management apparatus, for a server, the apparatus comprising:
the editing request receiving module is used for receiving an editing request which is sent by a terminal and carries a resource name and a communication identifier, and the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
the locking judgment module is used for confirming whether the resource is locked or not, and if the resource is locked, sending an editing forbidding response to the terminal; if the resource is not locked, locking the resource, setting a lock identifier of the resource as a communication identifier, and sending an editing permission response to the terminal, wherein the editing permission response is used for editing the resource after being received by the terminal;
and the ending module is used for receiving an ending editing request which is sent by the terminal and carries the communication identifier and releasing the lock of the resource.
8. The apparatus of claim 7, further comprising:
and the detection module is used for checking the lock by adopting a heartbeat mechanism, and releasing the lock of the resource if the number of times that the lock is not detected exceeds the preset number of times.
9. A multi-user online edit management apparatus, for a terminal, the apparatus comprising:
the editing request generating module is used for sending an editing request carrying a resource name and a communication identifier to the server, confirming whether the resource is locked or not after the editing request is received by the server, locking the resource if the resource is not locked, setting the lock identifier of the resource as the communication identifier, and sending an editing permission response to the terminal; if the resource is locked, sending an editing forbidding response to the terminal; the communication identifier is generated according to a user identifier and an editing tab identifier of the terminal;
the editing module is used for receiving the response fed back by the server, and editing the resource if the response is a response allowing editing;
and the ending request generating module is used for sending an ending editing request carrying the communication identifier to the server, and the ending editing request is used for releasing the lock of the resource after being received by the server.
10. A multi-user online editing management system is characterized by comprising a terminal and a server connected with the terminal through a wired network or a wireless network;
the server comprises the multi-user online editing management device according to claim 7 or 8;
the terminal includes the multi-user online edit management apparatus according to claim 9.
CN201910828249.4A 2019-09-03 2019-09-03 Multi-user online editing management method, device and system Pending CN110750364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910828249.4A CN110750364A (en) 2019-09-03 2019-09-03 Multi-user online editing management method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910828249.4A CN110750364A (en) 2019-09-03 2019-09-03 Multi-user online editing management method, device and system

Publications (1)

Publication Number Publication Date
CN110750364A true CN110750364A (en) 2020-02-04

Family

ID=69276105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910828249.4A Pending CN110750364A (en) 2019-09-03 2019-09-03 Multi-user online editing management method, device and system

Country Status (1)

Country Link
CN (1) CN110750364A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488397A (en) * 2020-04-10 2020-08-04 北京杰软科技有限公司 Multi-terminal project declaration system
CN111553132A (en) * 2020-04-21 2020-08-18 广州视源电子科技股份有限公司 Data cooperative processing method, device and system
CN112560129A (en) * 2020-12-17 2021-03-26 北京构力科技有限公司 Building information model data cooperation method and system based on component level
CN113688121A (en) * 2021-10-27 2021-11-23 飞狐信息技术(天津)有限公司 Multi-person collaborative content management method, related device and computer storage medium
CN115828868A (en) * 2023-02-09 2023-03-21 成都字节流科技有限公司 Single-visit data editing response method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714990A (en) * 2013-12-12 2015-06-17 南宁市磁汇科技有限公司 Method and device for locking objects in WEB page dynamic editing
CN107491429A (en) * 2017-08-18 2017-12-19 杭州安恒信息技术有限公司 A kind of method for solving to edit document content conflict simultaneously
CN107770206A (en) * 2016-08-16 2018-03-06 珠海金山办公软件有限公司 A kind of document edit method, apparatus and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714990A (en) * 2013-12-12 2015-06-17 南宁市磁汇科技有限公司 Method and device for locking objects in WEB page dynamic editing
CN107770206A (en) * 2016-08-16 2018-03-06 珠海金山办公软件有限公司 A kind of document edit method, apparatus and system
CN107491429A (en) * 2017-08-18 2017-12-19 杭州安恒信息技术有限公司 A kind of method for solving to edit document content conflict simultaneously

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488397A (en) * 2020-04-10 2020-08-04 北京杰软科技有限公司 Multi-terminal project declaration system
CN111553132A (en) * 2020-04-21 2020-08-18 广州视源电子科技股份有限公司 Data cooperative processing method, device and system
CN111553132B (en) * 2020-04-21 2024-01-30 广州视源电子科技股份有限公司 Method, device and system for data cooperative processing
CN112560129A (en) * 2020-12-17 2021-03-26 北京构力科技有限公司 Building information model data cooperation method and system based on component level
CN113688121A (en) * 2021-10-27 2021-11-23 飞狐信息技术(天津)有限公司 Multi-person collaborative content management method, related device and computer storage medium
CN113688121B (en) * 2021-10-27 2022-03-01 飞狐信息技术(天津)有限公司 Multi-person collaborative content management method, related device and computer storage medium
CN115828868A (en) * 2023-02-09 2023-03-21 成都字节流科技有限公司 Single-visit data editing response method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110750364A (en) Multi-user online editing management method, device and system
US11874903B2 (en) User interface switching method and terminal
WO2020125134A1 (en) Customized model tamper-proof method and apparatus, terminal device and storage medium
WO2018019261A1 (en) Resource transfer method and apparatus
KR102048222B1 (en) Apparatus and method for recognizing an external device in a communication system
US20160301530A1 (en) Sensitive operation verification method, apparatus, and system
US20150282106A1 (en) Terminal and synchronization control method among terminals
US10877571B2 (en) Device driver-level approach for utilizing a single set of interface input devices for multiple computing devices
WO2023151677A1 (en) Method and apparatus for determining file integrity in file system, and electronic device
AU2019203256A1 (en) Fingerprint event processing method, apparatus, and terminal
JP2021117972A (en) Device interactive method, authority management method, interactive device and client
CN107423395A (en) Navigation data processing system
CN114327087A (en) Input event processing method and device, electronic equipment and storage medium
EP3373140A1 (en) Method for processing ordered broadcast and electronic device
CN109107148B (en) Control method, control device, storage medium and mobile terminal
CN114070892A (en) Data transmission method and device
CN112988426A (en) Message processing method and device
CN106599642A (en) Information leakage prevention method and electronic terminal
CN114489858B (en) Application software information setting method and device, terminal equipment and storage medium
CN109561146A (en) Document down loading method, device, terminal device
CN109657179A (en) A kind of method for processing business, system and storage medium
CN105490810B (en) Method, device and system for processing virtual resource data
CN115202766A (en) Terminal control method and device
CN117377133A (en) Bluetooth connection establishment method and device, electronic equipment and readable storage medium
CN115827527A (en) Display control method and device based on DP connector, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200204

RJ01 Rejection of invention patent application after publication