Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing the devices, modules or units, and are not used for limiting the devices, modules or units to be different devices, modules or units, and also for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
The user terminal in the technical scheme of the present disclosure is a computer device, including but not limited to a personal computer, a notebook computer, a tablet computer, a smart phone, and the like. The first server and the second server include, but are not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud of a large number of computers or network servers in Cloud Computing (Cloud Computing), wherein Cloud Computing is a type of distributed Computing and a super virtual computer consists of a group of loosely coupled computers. The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a VPN network, etc.
Fig. 1 is a schematic flowchart of a method for processing online document information synchronously according to an embodiment of the present disclosure, and as shown in fig. 1, the method may include:
in step S101, a first server monitors a modification request for an online document.
The first server stores a document directory tree structure corresponding to the online document, the document directory tree structure comprises a plurality of nodes, and each node corresponds to one document.
In one example, the document information corresponding to each node of the document directory tree structure having an ID of 1 is shown in table 1.
Directory tree ID
|
Document ID
|
Title
|
Parent document ID
|
Update time
|
(other columns)
|
1
|
123
|
test_new
|
456
|
2019/06/25
|
...
|
1
|
456
|
test1
|
789
|
2019/06/25
|
...
|
1
|
457
|
test2
|
789
|
2019/06/25
|
...
|
1
|
789
|
test3
|
0
|
2019/06/25
|
... |
TABLE 1
As shown in table 1, the document information corresponding to each node of the document directory tree structure includes a directory tree ID, a document ID corresponding to each node in the directory tree, a document title, a parent document ID, and an update time, and the other columns may include a user name of a user operating on the document, and the like.
The document information can be stored through a mysql determinant database. Recording operation data aiming at the document through a binary log binlog, for example, if a document is added in a document directory tree structure, adding a log for adding records in the binlog; and if the content of a document title in the document directory tree structure is modified, adding a log of modification records in the binlog, and monitoring the records of the binlog to monitor the modification request of the online document.
The modification request can be sent by a terminal device registered in the first server, wherein the terminal device has acquired the document directory tree structure from the first server; the modification request may also be a request generated by directly modifying the document directory tree structure at the first server, and the content of the modification request may include adding, moving, deleting, modifying the document header content, and the like for the online document.
Step S102, when a modification request aiming at the online document is monitored, correspondingly modifying the document directory tree structure of the online document according to the modification request;
specifically, if the first server receives the modification request, the log binlog records an operation record corresponding to the request, including a document ID and modified content information corresponding to the modification request. And inquiring a document directory tree structure corresponding to the document ID, and modifying the document information according to the modified content information.
In one example, the title test _ old of the document with the document ID of 123 is modified to test _ new, and the document information before modification is shown in table 2:
directory tree ID
|
Document ID
|
Title
|
Parent document ID
|
Update time
|
(other columns)
|
1
|
123
|
test_old
|
456
|
2019/06/24
|
... |
TABLE 2
The modified document information is shown in table 3:
directory tree ID
|
Document ID
|
Title
|
Parent document ID
|
Update time
|
(other columns)
|
1
|
123
|
test_new
|
456
|
2019/06/25
|
... |
TABLE 3
Step S103, the first server sends a corresponding modification instruction to the second server.
And after modifying the corresponding document directory tree structure according to the modification request, the first server generates a modification instruction according to the modification request and sends the modification instruction to the second server.
It should be noted that the second server in the technical solution of the present disclosure may be a separate server, or may be a module in the first server for implementing document information synchronization setting.
The modification instruction content may include the following:
1. adding document information instructions:
{"tree_id":1,"op":'add',parent_id:'789',obj_id:'888'}
2. moving the document information instruction:
{"tree_id":1,"op":'move',old_parent_id:'456',new_parent_id:'457,obj_id:'123'}
3. and a document information deleting instruction:
{"tree_id":1,"op":'del',parent_id:'789',obj_id:'456'}
4. update document title content instruction:
{"tree_id":1,"op":'update',title:'new_test',obj_id:'123'}
and step S104, the second server sends the modification instruction to the user terminal.
The user terminal is a user terminal which acquires a document directory tree structure from the first server in advance. The user terminal sends a document directory tree acquisition request to the first server, the directory tree acquisition request comprises a directory tree ID of the document directory tree and a terminal identifier of the user terminal, and the first server inquires a corresponding document directory tree structure according to the directory tree ID and sends the document directory tree structure to the user terminal corresponding to the terminal identifier.
The method comprises the steps that after a user terminal obtains a document directory tree structure from a first server, a long connection establishment request is sent to a second server, the second server establishes long connection with the user terminal according to the long connection establishment request, and the second server stores the corresponding relation between a terminal identifier of the user terminal and a directory tree ID.
After data transmission is carried out between devices with long connection or between application programs, the connection is not closed, the connection can be kept in a connected state for a long time, if new data needs to be transmitted, the connection is directly multiplexed, a new connection does not need to be established, and therefore the data transmission efficiency is improved.
And after receiving the modification instruction sent by the first server, the second server analyzes the modification instruction to obtain a directory tree ID and modification instruction content corresponding to the modification instruction, inquires a terminal identifier corresponding to the directory tree ID according to the corresponding relation between the terminal identifier and the directory tree ID, and sends the modification instruction content to the user terminal corresponding to the terminal identifier through long connection.
In the technical scheme, the second server sends the modification instruction to the user terminal through long connection, and does not need to send all directory tree structure data to the user terminal, so that the sent data volume is reduced, and the bandwidth resource is saved.
Step S105, the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction sent by the second server.
Specifically, after receiving the modification instruction sent by the second server, the user terminal executes the operation corresponding to the modification instruction, modifies the document directory tree structure, and displays the modified document directory tree structure, so that the user can see the newly modified document directory tree structure without performing a refresh operation.
The user terminal modifies the document information according to the modification instruction, which comprises the following conditions:
if the modification instruction comprises a document adding instruction, document information of a node corresponding to the modification instruction is added in the document directory tree structure;
if the modification instruction comprises a position modification instruction, modifying the position of the document of the node corresponding to the modification instruction in the document directory tree structure;
if the modification instruction comprises a deletion instruction, deleting the document information of the node corresponding to the modification instruction in the document directory tree structure;
and if the modification instruction comprises a title content updating instruction, updating the document title content of the node corresponding to the modification instruction in the document directory tree structure.
In an example, the user terminal a1 and the user terminal a2 respectively obtain a document directory tree structure with a directory tree ID of 1 from a first server, as shown in fig. 2, the user terminal a1 and the user terminal a2 respectively send a long connection establishment request to a second server, and establish a long connection with the second server, and the second server respectively stores correspondence between the directory tree ID and the terminal identifiers of the user terminal a1 and the user terminal a 2. The first server receives a modification request aiming at the document directory tree with the ID of 1, and modifies the document directory tree structure: adding a document with the ID of 888 under a parent node with the ID of 789 in the document directory tree structure with the ID of 1 to obtain a document directory tree structure, as shown in FIG. 3; moving the document with the ID 123 from the parent node with the ID 456 to the parent node with the ID 457 to obtain a document directory tree structure as shown in FIG. 4; deleting the document with ID 456 results in a document directory tree structure as shown in FIG. 5. The first server sends a modification instruction generated according to the modification request to the second server, the second server analyzes the modification instruction to obtain a directory tree ID and modification instruction content, a terminal identifier corresponding to the directory tree ID is inquired, the modification instruction content is sent to the user terminal A1 and the user terminal A2, the user terminal A1 and the user terminal A2 modify a document directory tree structure according to the modification instruction content, and the modified document directory tree structure is displayed.
It should be noted that, the number of the user terminals in the technical solution of the present application is not limited, all the document directory tree structures that obtain the same directory tree ID from the first server, and the user terminals that establish long connection with the second server, the first server monitors the modification request, and after modifying the directory tree structure, sends the modification instruction to the second server, and the second server sends the modification instruction content to each user terminal according to the correspondence between the directory tree ID and the terminal identifier of the user terminal, and each user terminal modifies the content synchronously, and can display the recently modified document directory tree structure without performing an update operation.
In the scheme of the embodiment of the disclosure, when the first server monitors a modification request for an online document; and correspondingly modifying the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to a second server, wherein the second server sends the modification instruction to the user terminal, and the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction. The method and the device have the advantages that the user terminal for opening the document directory tree structure can synchronously modify the document directory tree structure according to the modification request monitored by the first server, so that the modified document directory tree structure can be displayed without refreshing, operation steps are reduced, and user experience is improved.
FIG. 6 is a flowchart illustrating a method for processing online document information synchronously according to an embodiment of the present disclosure; as shown in fig. 6, the method in the embodiment of the present disclosure is performed by a first server, and the method includes:
step S601, when a modification request aiming at the online document is monitored, correspondingly modifying the document directory tree structure of the online document according to the modification request;
step S602, sending a corresponding modification instruction to a second server, so that the second server sends the modification instruction to the user terminal, where a correspondence between a terminal identifier of the user terminal and a directory tree ID of the document directory tree structure is stored in the second server, and the user terminal is a terminal that has acquired the document directory tree structure.
In one possible implementation, the method further includes:
receiving a document directory tree structure acquisition request of a user terminal, wherein the document directory tree structure acquisition request comprises a directory tree ID;
determining a corresponding document directory tree structure according to the directory tree ID, and sending the document directory tree structure to the user terminal;
the corresponding relation is determined by the second server according to a long connection establishment request sent by the user terminal after the user terminal acquires the document directory tree structure, and the long connection establishment request comprises a terminal identifier and a directory tree ID.
The embodiment of the present disclosure is an embodiment in which the first server is an execution main body, and specific implementation processes of each step in the embodiment of the present disclosure have been described in detail in the method embodiment corresponding to fig. 1, and are not described again here.
In the scheme of the embodiment of the disclosure, when the first server monitors a modification request for an online document; and correspondingly modifying the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to a second server, wherein the second server sends the modification instruction to the user terminal, and the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction. The method and the device have the advantages that the user terminal for opening the document directory tree structure can synchronously modify the document directory tree structure according to the modification request monitored by the first server, so that the modified document directory tree structure can be displayed without refreshing, operation steps are reduced, and user experience is improved.
FIG. 7 is a flowchart illustrating a method for processing online document information synchronously according to an embodiment of the present disclosure; as shown in fig. 7, the method in the embodiment of the present disclosure is performed by a second server, and the method includes:
step S701, receiving a modification instruction aiming at the online document sent by a first server, wherein the modification instruction is sent after the first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request;
step S702, according to the stored corresponding relation between the terminal identifier of the user terminal and the directory tree ID of the document directory tree structure, sending a modification instruction to the user terminal so that the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction, wherein the user terminal is the terminal which has acquired the document directory tree structure.
In one possible implementation, the method further includes:
receiving a long connection establishment request sent by a user terminal, wherein the long connection establishment request is sent by the user terminal after the user terminal acquires a document directory tree structure, and the long connection establishment request comprises a terminal identifier and a directory tree ID;
and establishing a corresponding relation between the terminal identification and the directory tree ID according to the long connection establishment request.
In the scheme of the embodiment of the disclosure, when the first server monitors a modification request for an online document; and correspondingly modifying the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to a second server, wherein the second server sends the modification instruction to the user terminal, and the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction. The method and the device have the advantages that the user terminal for opening the document directory tree structure can synchronously modify the document directory tree structure according to the modification request monitored by the first server, so that the modified document directory tree structure can be displayed without refreshing, operation steps are reduced, and user experience is improved.
FIG. 8 is a flowchart illustrating a method for processing online document information synchronously according to an embodiment of the present disclosure; as shown in fig. 8, the method in the embodiment of the present disclosure is performed by a user terminal, and the method includes:
step S801, receiving a modification instruction aiming at the online document sent by a second server, wherein the modification instruction is sent to the second server after a first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request; the second server is a server storing the corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure;
step S802, the document information of the corresponding node in the document directory tree structure is modified according to the modification instruction.
In one possible implementation, before receiving a modification instruction for the online document sent by the second server, the method further includes:
sending a document directory tree structure acquisition request to a first server, wherein the document directory tree structure acquisition request comprises a directory tree ID;
receiving a document directory tree structure sent by a first server according to a document directory tree structure acquisition request;
and sending a long connection establishment request to a second server so that the second server establishes a corresponding relation between the terminal identifier and the directory tree ID according to the long connection establishment request, wherein the long connection establishment request comprises the terminal identifier and the directory tree ID.
In one possible implementation manner, the modifying the document information of the corresponding node in the document directory tree structure according to the modification instruction includes at least one of the following:
if the modification instruction comprises a document adding instruction, document information of a node corresponding to the modification instruction is added in the document directory tree structure;
if the modification instruction comprises a position modification instruction, modifying the position of the document of the node corresponding to the modification instruction in the document directory tree structure;
if the modification instruction comprises a deletion instruction, deleting the document information of the node corresponding to the modification instruction in the document directory tree structure;
and if the modification instruction comprises a title content updating instruction, updating the document title content of the node corresponding to the modification instruction in the document directory tree structure.
The embodiment of the present disclosure is an embodiment in which a user terminal is taken as an execution subject, and specific implementation processes of each step in the embodiment of the present disclosure have been described in detail in the method embodiment corresponding to fig. 1, and are not described again here.
In the scheme of the embodiment of the disclosure, when the first server monitors a modification request for an online document; and correspondingly modifying the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to a second server, wherein the second server sends the modification instruction to the user terminal, and the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction. The method and the device have the advantages that the user terminal for opening the document directory tree structure can synchronously modify the document directory tree structure according to the modification request monitored by the first server, so that the modified document directory tree structure can be displayed without refreshing, operation steps are reduced, and user experience is improved.
Based on the same principle as the method shown in fig. 1, an embodiment of the present disclosure further provides a system for synchronous processing of online document information, as shown in fig. 5, the system includes: the system comprises a first server 1, a second server 2 and a user terminal 3;
wherein, the first server 1 comprises a first modification module 11 and a first sending module 12;
the first modification module 11 is configured to, when a modification request for an online document is monitored, modify a document directory tree structure of the online document correspondingly according to the modification request;
the first sending module 12 is configured to send a corresponding modification instruction to a second server, so that the second server sends the modification instruction to the user terminal, where a correspondence between a terminal identifier of the user terminal and a directory tree ID of the document directory tree structure is stored in the second server, and the user terminal is a terminal that has acquired the document directory tree structure.
The second server 2 comprises a first receiving module 21 and a second sending module 22;
a first receiving module 21, configured to receive a modification instruction for an online document sent by a first server, where the modification instruction is sent after the first server monitors a modification request for the online document and modifies a document directory tree structure of the online document according to the modification request;
and a second sending module 22, configured to send the modification instruction to the user terminal according to a correspondence between the stored terminal identifier of the user terminal and the directory tree ID of the document directory tree structure, so that the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction, where the user terminal is a terminal that has acquired the document directory tree structure.
The user terminal 3 comprises a second receiving module 31 and a second modifying module 32;
a second receiving module 31, configured to receive a modification instruction for the online document sent by the second server, where the modification instruction is sent to the second server after the first server monitors a modification request for the online document and modifies a document directory tree structure of the online document according to the modification request; the second server is a server storing the corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure;
and the second modification module 32 is configured to modify the document information of the corresponding node in the document directory tree structure according to the modification instruction.
In a possible implementation manner, the first server 1 further includes a third receiving module; the third receiving module comprises a receiving unit and a sending unit;
the receiving unit is used for receiving a document directory tree structure acquisition request of a user terminal, wherein the document directory tree structure acquisition request comprises a directory tree ID;
the sending unit is used for determining a corresponding document directory tree structure according to the directory tree ID and sending the document directory tree structure to the user terminal;
the corresponding relation is determined by the second server according to a long connection establishment request sent by the user terminal after the user terminal acquires the document directory tree structure, and the long connection establishment request comprises a terminal identifier and a directory tree ID.
In a possible implementation, the second server 2 further includes a connection establishment module;
the connection establishment module is configured to: receiving a long connection establishment request sent by a user terminal, wherein the long connection establishment request is sent by the user terminal after the user terminal acquires a document directory tree structure, and the long connection establishment request comprises a terminal identifier and a directory tree ID;
and establishing a corresponding relation between the terminal identification and the directory tree ID according to the long connection establishment request.
In a possible implementation, the user terminal 3 further includes an obtaining module;
the acquisition module is used for: sending a document directory tree structure acquisition request to a first server, wherein the document directory tree structure acquisition request comprises a directory tree ID;
receiving a document directory tree structure sent by a first server according to a document directory tree structure acquisition request;
and sending a long connection establishment request to a second server so that the second server establishes a corresponding relation between the terminal identifier and the directory tree ID according to the long connection establishment request, wherein the long connection establishment request comprises the terminal identifier and the directory tree ID.
In a possible implementation manner, the second modification module 32 is specifically configured to:
if the modification instruction comprises a document adding instruction, document information of a node corresponding to the modification instruction is added in the document directory tree structure;
if the modification instruction comprises a position modification instruction, modifying the position of the document of the node corresponding to the modification instruction in the document directory tree structure;
if the modification instruction comprises a deletion instruction, deleting the document information of the node corresponding to the modification instruction in the document directory tree structure;
and if the modification instruction comprises a title content updating instruction, updating the document title content of the node corresponding to the modification instruction in the document directory tree structure.
In the scheme of the embodiment of the disclosure, when the first server monitors a modification request for an online document; and correspondingly modifying the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to a second server, wherein the second server sends the modification instruction to the user terminal, and the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction. The method and the device have the advantages that the user terminal for opening the document directory tree structure can synchronously modify the document directory tree structure according to the modification request monitored by the first server, so that the modified document directory tree structure can be displayed without refreshing, operation steps are reduced, and user experience is improved.
The online document information synchronization processing system of the embodiment of the present disclosure may execute the online document information synchronization processing method provided by the embodiment of the present disclosure, and the implementation principle is similar, the actions executed by each module in the online document information synchronization processing system in each embodiment of the present disclosure correspond to the steps in the online document information synchronization processing method in each embodiment of the present disclosure, and for the detailed function description of each module of the multimedia playing system, reference may be specifically made to the description in the corresponding online document information synchronization processing method shown in the foregoing, and details are not repeated here.
Based on the same principle as the user list generation method in the embodiments of the present disclosure, embodiments of the present disclosure also provide an electronic device, which may include, but is not limited to, one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: and executing the operation corresponding to the synchronous processing method of the online document information according to the embodiment of the disclosure.
In the electronic equipment of the embodiment of the disclosure, when a modification request for an online document is monitored, a document directory tree structure of the online document is modified correspondingly according to the modification request; and sending a corresponding modification instruction to a second server so that the second server sends the modification instruction to the user terminal, wherein the second server stores the corresponding relation between the terminal identifier of the user terminal and the directory tree ID of the document directory tree structure, and the user terminal is the terminal which acquires the document directory tree structure.
Or receiving a modification instruction aiming at the online document sent by the first server, wherein the modification instruction is sent after the first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request; and sending the modification instruction to the user terminal according to the corresponding relation between the stored terminal identifier of the user terminal and the directory tree ID of the document directory tree structure, so that the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction, wherein the user terminal is the terminal which acquires the document directory tree structure.
Or receiving a modification instruction aiming at the online document sent by the second server, wherein the modification instruction is sent to the second server after the first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request; the second server is a server storing the corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure; and modifying the document information of the corresponding node in the document directory tree structure according to the modification instruction.
Based on the same principle as the online document information synchronization processing method in the embodiment of the present disclosure, a computer-readable storage medium for storing computer instructions that, when executed on a computer, enable the computer to perform the online document information synchronization processing method as shown in the embodiment of the present disclosure is also provided in the embodiment of the present disclosure.
In the computer-readable storage medium of the embodiment of the disclosure, when a modification request for an online document is monitored, a document directory tree structure of the online document is modified correspondingly according to the modification request; and sending a corresponding modification instruction to a second server so that the second server sends the modification instruction to the user terminal, wherein the second server stores the corresponding relation between the terminal identifier of the user terminal and the directory tree ID of the document directory tree structure, and the user terminal is the terminal which acquires the document directory tree structure.
Or receiving a modification instruction aiming at the online document sent by the first server, wherein the modification instruction is sent after the first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request; and sending the modification instruction to the user terminal according to the corresponding relation between the stored terminal identifier of the user terminal and the directory tree ID of the document directory tree structure, so that the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction, wherein the user terminal is the terminal which acquires the document directory tree structure.
Or receiving a modification instruction aiming at the online document sent by the second server, wherein the modification instruction is sent to the second server after the first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request; the second server is a server storing the corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure; and modifying the document information of the corresponding node in the document directory tree structure according to the modification instruction.
Referring now to FIG. 10, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The execution subject of the technical solution of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), etc., and a stationary terminal such as a digital TV, a desktop computer, etc. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as a processing device 601 described below, and the memory may include at least one of a Read Only Memory (ROM)602, a Random Access Memory (RAM)603, and a storage device 608, which are described below:
as shown in fig. 10, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 10 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring first characteristic information of at least one first user of a first application program, wherein the first characteristic information meets preset conditions; acquiring second characteristic information respectively corresponding to at least one second user of a second application program; and respectively matching the first characteristic information with second characteristic information respectively corresponding to at least one second user, and determining a target user of the second application program based on the second user corresponding to the second characteristic information matched with the first characteristic information.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the designation of a module or unit does not in some cases constitute a limitation of the unit itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, the present disclosure provides a method for synchronous processing of online document information, the method being performed by a first server, the method including:
when a modification request aiming at the online document is monitored, correspondingly modifying the document directory tree structure of the online document according to the modification request;
and sending a corresponding modification instruction to a second server so that the second server sends the modification instruction to the user terminal, wherein the second server stores the corresponding relation between the terminal identifier of the user terminal and the directory tree ID of the document directory tree structure, and the user terminal is the terminal which acquires the document directory tree structure.
In one possible implementation, the method further includes:
receiving a document directory tree structure acquisition request of a user terminal, wherein the document directory tree structure acquisition request comprises a directory tree ID;
determining a corresponding document directory tree structure according to the directory tree ID, and sending the document directory tree structure to the user terminal;
the corresponding relation is determined by the second server according to a long connection establishment request sent by the user terminal after the user terminal acquires the document directory tree structure, and the long connection establishment request comprises a terminal identifier and a directory tree ID.
According to one or more embodiments of the present disclosure, the present disclosure provides a method for synchronous processing of online document information, the method being performed by a second server, the method including:
receiving a modification instruction aiming at the online document sent by a first server, wherein the modification instruction is sent after the first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request;
and sending the modification instruction to the user terminal according to the corresponding relation between the stored terminal identifier of the user terminal and the directory tree ID of the document directory tree structure, so that the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction, wherein the user terminal is the terminal which acquires the document directory tree structure.
In one possible implementation, the method further includes:
receiving a long connection establishment request sent by a user terminal, wherein the long connection establishment request is sent by the user terminal after the user terminal acquires a document directory tree structure, and the long connection establishment request comprises a terminal identifier and a directory tree ID;
and establishing a corresponding relation between the terminal identification and the directory tree ID according to the long connection establishment request.
According to one or more embodiments of the present disclosure, the present disclosure provides a method for synchronous processing of online document information, the method being performed by a user terminal, the method including:
receiving a modification instruction aiming at the online document sent by a second server, wherein the modification instruction is sent to the second server after a first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request; the second server is a server storing the corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure;
and modifying the document information of the corresponding node in the document directory tree structure according to the modification instruction.
In one possible implementation, before receiving a modification instruction for the online document sent by the second server, the method further includes:
sending a document directory tree structure acquisition request to a first server, wherein the document directory tree structure acquisition request comprises a directory tree ID;
receiving a document directory tree structure sent by a first server according to a document directory tree structure acquisition request;
and sending a long connection establishment request to a second server so that the second server establishes a corresponding relation between the terminal identifier and the directory tree ID according to the long connection establishment request, wherein the long connection establishment request comprises the terminal identifier and the directory tree ID.
In one possible implementation manner, the modifying the document information of the corresponding node in the document directory tree structure according to the modification instruction includes at least one of the following:
if the modification instruction comprises a document adding instruction, document information of a node corresponding to the modification instruction is added in the document directory tree structure;
if the modification instruction comprises a position modification instruction, modifying the position of the document of the node corresponding to the modification instruction in the document directory tree structure;
if the modification instruction comprises a deletion instruction, deleting the document information of the node corresponding to the modification instruction in the document directory tree structure;
and if the modification instruction comprises a title content updating instruction, updating the document title content of the node corresponding to the modification instruction in the document directory tree structure.
According to one or more embodiments of the present disclosure, the present disclosure provides an apparatus for synchronous processing of online document information, the apparatus including:
the first modification module is used for correspondingly modifying the document directory tree structure of the online document according to the modification request when the modification request aiming at the online document is monitored;
the first sending module is used for sending a corresponding modification instruction to the second server so that the second server sends the modification instruction to the user terminal, wherein the second server stores a corresponding relation between a terminal identifier of the user terminal and a directory tree ID of the document directory tree structure, and the user terminal is a terminal which has acquired the document directory tree structure.
In a possible implementation manner, the apparatus further includes a third receiving module; the third receiving module comprises a receiving unit and a sending unit;
the receiving unit is used for receiving a document directory tree structure acquisition request of a user terminal, wherein the document directory tree structure acquisition request comprises a directory tree ID;
the sending unit is used for determining a corresponding document directory tree structure according to the directory tree ID and sending the document directory tree structure to the user terminal;
the corresponding relation is determined by the second server according to a long connection establishment request sent by the user terminal after the user terminal acquires the document directory tree structure, and the long connection establishment request comprises a terminal identifier and a directory tree ID.
According to one or more embodiments of the present disclosure, the present disclosure provides an apparatus for synchronous processing of online document information, the apparatus including:
the first receiving module is used for receiving a modification instruction which is sent by the first server and aims at the online document, wherein the modification instruction is sent after the first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request;
and the second sending module is used for sending the modification instruction to the user terminal according to the corresponding relation between the stored terminal identifier of the user terminal and the directory tree ID of the document directory tree structure so that the user terminal modifies the document information of the corresponding node in the document directory tree structure according to the modification instruction, and the user terminal is the terminal which acquires the document directory tree structure.
In one possible implementation, the apparatus further includes a connection establishment module;
the connection establishment module is configured to: receiving a long connection establishment request sent by a user terminal, wherein the long connection establishment request is sent by the user terminal after the user terminal acquires a document directory tree structure, and the long connection establishment request comprises a terminal identifier and a directory tree ID;
and establishing a corresponding relation between the terminal identification and the directory tree ID according to the long connection establishment request.
According to one or more embodiments of the present disclosure, the present disclosure provides an apparatus for synchronous processing of online document information, the apparatus including:
the second receiving module is used for receiving a modification instruction aiming at the online document, which is sent by the second server, wherein the modification instruction is sent to the second server after the first server monitors a modification request aiming at the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request; the second server is a server storing the corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure;
and the second modification module is used for modifying the document information of the corresponding node in the document directory tree structure according to the modification instruction.
In one possible implementation manner, the apparatus further includes an obtaining module;
the acquisition module is used for: sending a document directory tree structure acquisition request to a first server, wherein the document directory tree structure acquisition request comprises a directory tree ID;
receiving a document directory tree structure sent by a first server according to a document directory tree structure acquisition request;
and sending a long connection establishment request to a second server so that the second server establishes a corresponding relation between the terminal identifier and the directory tree ID according to the long connection establishment request, wherein the long connection establishment request comprises the terminal identifier and the directory tree ID.
In a possible implementation manner, the second modification module is specifically configured to:
if the modification instruction comprises a document adding instruction, document information of a node corresponding to the modification instruction is added in the document directory tree structure;
if the modification instruction comprises a position modification instruction, modifying the position of the document of the node corresponding to the modification instruction in the document directory tree structure;
if the modification instruction comprises a deletion instruction, deleting the document information of the node corresponding to the modification instruction in the document directory tree structure;
and if the modification instruction comprises a title content updating instruction, updating the document title content of the node corresponding to the modification instruction in the document directory tree structure.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including:
one or more processors;
a memory;
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: and executing the operation corresponding to the synchronous processing method of the online document information provided by the embodiment of the disclosure.
According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided for storing computer instructions, which, when executed on a computer, enable the computer to perform operations corresponding to the method for synchronous processing of online document information provided as an embodiment of the present disclosure.