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 have been shown in the accompanying 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 are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present 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. Furthermore, 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 "including" and variations thereof as used herein are intended to be 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. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are used merely to distinguish one device, module, or unit from another device, module, or unit, and are not intended to limit the order or interdependence of the functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The following describes the technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail 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 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, the second server, include, but are not limited to, a single network server, a server group of multiple network servers, or a Cloud of large numbers of computers or network servers in Cloud Computing (Cloud Computing), where Cloud Computing is one of distributed Computing and is a super virtual computer consisting of a group of loosely coupled computer sets. Wherein 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, and the like.
Fig. 1 is a flowchart of a method for processing online document information according to an embodiment of the present disclosure, where, as shown in fig. 1, the method may include:
in step S101, the first server monitors a modification request for an online document.
The first server stores a document directory tree structure corresponding to the online document, wherein 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 with ID 1 is shown in table 1.
| Directory tree ID
|
Document ID
|
Title of the book
|
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, an update time, and other columns may include a user name of a user operating the document, etc.
Wherein the document information may be stored via a mysql determinant database. Recording operation data for a document through a binary log binlog, for example, adding a document in a document directory tree structure, and newly adding a log for adding records in the binlog; and modifying the content of a document title in the document directory tree structure, adding a log of modification records in the binlog, and monitoring the modification request for the online document by monitoring the record of the binlog.
Wherein the modification request may be sent for a terminal device registered at the first server, the terminal device having acquired the document directory tree structure from the first server; the modification request may also be a request generated directly at the first server to modify the document directory tree structure, and the content of the modification request may include adding, moving, deleting, modifying document title content for the online document, etc.
Step S102, when a modification request for an online document is monitored, the document directory tree structure of the online document is correspondingly modified according to the modification request;
specifically, if the first server receives the modification request, the log binlog records the corresponding operation record of the request, including the document ID corresponding to the modification request and the modification content information. And inquiring the 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 document ID 123 is modified to test_new, and the information of the document before modification is shown in Table 2:
| directory tree ID
|
Document ID
|
Title of the book
|
Parent document ID
|
Update time
|
(other columns)
|
| 1
|
123
|
test_old
|
456
|
2019/06/24
|
... |
TABLE 2
The modified document information is as shown in Table 3:
| directory tree ID
|
Document ID
|
Title of the book
|
Parent document ID
|
Update time
|
(other columns)
|
| 1
|
123
|
test_new
|
456
|
2019/06/25
|
... |
TABLE 3 Table 3
Step S103, the first server sends a corresponding modification instruction to the second server.
After the first server modifies the corresponding document directory tree structure according to the modification request, a modification instruction is generated according to the modification request and is sent 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. newly added document information instruction:
{"tree_id":1,"op":'add',parent_id:'789',obj_id:'888'}
2. mobile document information instruction:
{"tree_id":1,"op":'move',old_parent_id:'456',new_parent_id:'457,obj_id:'123'}
3. the delete document information instruction:
{"tree_id":1,"op":'del',parent_id:'789',obj_id:'456'}
4. update document title content instructions:
{"tree_id":1,"op":'update',title:'new_test',obj_id:'123'}
step S104, the second server sends the modification instruction to the user terminal.
The user terminal is a user terminal which acquires the document directory tree structure from the first server in advance. The user terminal sends a document directory tree acquisition request to a first server, wherein the directory tree acquisition request comprises a directory tree ID of a 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 corresponding user terminal to the terminal identifier.
After the user terminal obtains the document directory tree structure from the first server, a long connection establishment request is sent to the 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 the terminal identification of the user terminal and the directory tree ID.
After data transmission is carried out once, the connection is not closed, and the connection can be kept in a long-term communication state, if new data needs to be transmitted, the connection is directly multiplexed, and a new connection is not required to be established, so that the efficiency of data transmission is improved.
After receiving the modification instruction sent by the first server, the second server analyzes the modification instruction to obtain a directory tree ID corresponding to the modification instruction and modification instruction content, queries 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 a user terminal corresponding to the terminal identifier through long connection.
In the technical scheme of the disclosure, the second server transmits the modification instruction to the user terminal through the long connection, and all directory tree structure data is not required to be transmitted to the user terminal, so that the transmitted data quantity is reduced, and bandwidth resources are 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 an 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 document directory tree structure according to the latest modification without performing refresh operation.
The user terminal modifying the document information according to the modification instruction includes the following cases:
If the modification instruction comprises a document adding instruction, adding the document information of the node corresponding to the modification instruction 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;
if the modification instruction comprises a title content update 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 acquire the document directory tree structure with the directory tree ID of 1 from the first server, as shown in fig. 2, the user terminal A1 and the user terminal A2 respectively send a long connection establishment request to the second server, establish a long connection with the second server, and the second server respectively stores the correspondence between the directory tree ID and the terminal identifications of the user terminal A1 and the user terminal A2. The first server receives a modification request for the document directory tree with ID 1, modifies the document directory tree structure: adding a document with ID 888 under a parent node with ID 789 in a document directory tree structure with ID 1 to obtain a document directory tree structure, as shown in FIG. 3; moving the document with ID 123 from the parent node with ID 456 to the parent node with ID 457 to obtain a document directory tree structure as shown in FIG. 4; the document with ID 456 is deleted, resulting 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, queries a terminal identifier corresponding to the directory tree ID, sends the modification instruction content to the user terminal A1 and the user terminal A2, and the user terminal A1 and the user terminal A2 modify the document directory tree structure according to the modification instruction content and display the modified document directory tree structure.
It should be noted that, the number of user terminals in the technical solution of the present application is not limited, all the user terminals that acquire the same directory tree ID from the first server and establish a long connection with the second server, after the first server monitors the modification request and modifies the directory tree structure, the second server sends a modification instruction to the second server, and the second server sends the content of the modification instruction to each user terminal according to the corresponding relationship between the directory tree ID and the terminal identifier of the user terminal, so that each user terminal synchronously modifies, without performing an update operation, the recently modified document directory tree structure can be displayed.
In aspects of embodiments of the present disclosure, when a first server monitors a modification request for an online document; and carrying out corresponding modification on the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to the 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. According to the method and the device for displaying the document directory tree structure, 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 of a method for synchronous processing of online document information according to an embodiment of the present disclosure; as shown in fig. 6, a method in an embodiment of the present disclosure is performed by a first server, the method including:
step S601, when a modification request for an online document is monitored, carrying out corresponding modification on a document directory tree structure of the online document according to the modification request;
step S602, a corresponding modification instruction is sent to the second server, so that the second server sends the modification instruction to the user terminal, wherein the corresponding relation between the terminal identifier of the user terminal and the directory tree ID of the document directory tree structure is stored in the second server, and the user terminal is the terminal which 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 transmitting 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, wherein the long connection establishment request comprises a terminal identifier and a directory tree ID.
In the embodiment of the present disclosure, the first server is taken as an execution body, and specific implementation processes of each step in the embodiment of the present disclosure are described in detail in the method embodiment corresponding to fig. 1, which is not described herein again.
In aspects of embodiments of the present disclosure, when a first server monitors a modification request for an online document; and carrying out corresponding modification on the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to the 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. According to the method and the device for displaying the document directory tree structure, 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 of a method for synchronous processing of online document information 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 includes:
Step S701, receiving a modification instruction for an online document sent by a first server, wherein the modification instruction is sent after the first server monitors a modification request for 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 correspondence between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure, a modification instruction is sent 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, and 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 acquiring 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 aspects of embodiments of the present disclosure, when a first server monitors a modification request for an online document; and carrying out corresponding modification on the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to the 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. According to the method and the device for displaying the document directory tree structure, 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 of a method for synchronous processing of online document information according to an embodiment of the present disclosure; as shown in fig. 8, a method in an embodiment of the present disclosure is performed by a user terminal, the method including:
step S801, a modification instruction for an online document sent by a second server is received, the modification instruction is sent to the second server after the first server monitors a modification request for 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 the 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 the 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, modifying the document information of the corresponding node in the document directory tree structure according to the modification instruction includes at least one of:
if the modification instruction comprises a document adding instruction, adding the document information of the node corresponding to the modification instruction 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;
if the modification instruction comprises a title content update 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 uses a user terminal as an execution body, and a specific implementation process of each step in the embodiment of the present disclosure is described in detail in a method embodiment corresponding to fig. 1, which is not described herein again.
In aspects of embodiments of the present disclosure, when a first server monitors a modification request for an online document; and carrying out corresponding modification on the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to the 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. According to the method and the device for displaying the document directory tree structure, 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, there is also provided in an embodiment of the present disclosure a synchronous processing system for online document information, as shown in fig. 5, the system including: 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;
a first modification module 11, configured to, when a modification request for an online document is monitored, modify a document directory tree structure of the online document according to the modification request;
the first sending module 12 is configured to send a corresponding modification instruction to the second server, so that the second server sends the modification instruction to the user terminal, where the second server stores a correspondence 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 that has acquired the document directory tree structure.
The second server 2 comprises a first receiving module 21 and a second sending module 22;
the first receiving module 21 is configured to receive a modification instruction for an online document sent by the 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;
The second sending module 22 is configured to send a modification instruction to the user terminal according to the stored correspondence between the 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 a terminal that has acquired the document directory tree structure.
The user terminal 3 comprises a second receiving module 31, a second modifying module 32;
the second receiving module 31 is configured to receive a modification instruction for an 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;
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 one possible implementation, the first server 1 further comprises a third receiving module; the third receiving module comprises a receiving unit and a sending unit;
A receiving unit, configured to receive a document directory tree structure acquisition request of a user terminal, where the document directory tree structure acquisition request includes a directory tree ID;
a transmitting unit, configured to determine a corresponding document directory tree structure according to the directory tree ID, and transmit 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, wherein the long connection establishment request comprises a terminal identifier and a directory tree ID.
In a possible implementation, the second server 2 further comprises a connection establishment module;
the connection establishment module is used for: receiving a long connection establishment request sent by a user terminal, wherein the long connection establishment request is sent by the user terminal after acquiring 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 comprises an acquisition 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 the 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, the second modification module 32 is specifically configured to:
if the modification instruction comprises a document adding instruction, adding the document information of the node corresponding to the modification instruction 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;
if the modification instruction comprises a title content update instruction, updating the document title content of the node corresponding to the modification instruction in the document directory tree structure.
In aspects of embodiments of the present disclosure, when a first server monitors a modification request for an online document; and carrying out corresponding modification on the document directory tree structure of the online document according to the modification request, and sending a corresponding modification instruction to the 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. According to the method and the device for displaying the document directory tree structure, 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 synchronization processing system for online document information according to the embodiments of the present disclosure may perform the synchronization processing method for online document information provided by the embodiments of the present disclosure, and the implementation principle is similar, and actions performed by each module in the synchronization processing system for online document information in each embodiment of the present disclosure correspond to steps in the synchronization processing method for online document information in each embodiment of the present disclosure, and detailed functional descriptions of each module of the multimedia playing system may be referred to the descriptions in the corresponding synchronization processing method for online document information shown in the foregoing, which are not repeated herein.
Based on the same principles as the user list generation method in embodiments of the present disclosure, there is also provided in embodiments of the present disclosure an electronic device that may include, but is not limited to, one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to: operations corresponding to the online document information synchronization processing method according to the embodiment of the present disclosure are performed.
In the electronic device 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 the second server so that the second server sends the modification instruction to the user terminal, wherein the corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure is stored in the second server, and the user terminal is the terminal which has acquired the document directory tree structure.
Or receiving a modification instruction for the online document sent by the first server, wherein the modification instruction is sent after the first server monitors a modification request for the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request; and according to the corresponding relation between the stored terminal identification of the user terminal and the directory tree ID of the document directory tree structure, transmitting 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, and the user terminal is the terminal which has acquired the document directory tree structure.
Or receiving a modification instruction for 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 for the online document and correspondingly modifies the 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 synchronization processing method of online document information in the embodiments of the present disclosure, there is also provided in the embodiments of the present disclosure a computer-readable storage medium for storing computer instructions that, when run on a computer, enable the computer to perform the synchronization processing method of online document information as shown in the embodiments of the present disclosure.
In the computer readable storage medium of the embodiments of the present disclosure, when a modification request for an online document is monitored, a document directory tree structure of the online document is modified accordingly according to the modification request; and sending a corresponding modification instruction to the second server so that the second server sends the modification instruction to the user terminal, wherein the corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure is stored in the second server, and the user terminal is the terminal which has acquired the document directory tree structure.
Or receiving a modification instruction for the online document sent by the first server, wherein the modification instruction is sent after the first server monitors a modification request for the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request; and according to the corresponding relation between the stored terminal identification of the user terminal and the directory tree ID of the document directory tree structure, transmitting 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, and the user terminal is the terminal which has acquired the document directory tree structure.
Or receiving a modification instruction for 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 for the online document and correspondingly modifies the 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 schematic 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 embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 10 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
An electronic device includes: a memory and a processor, where the processor may be referred to as a processing device 601 described below, 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 described below, as follows:
as shown in fig. 10, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphic processor, etc.) 601, which may perform various appropriate actions and processes according to 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 required 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 through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic 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 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, 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 communication 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 networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated 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 meeting preset conditions; acquiring second characteristic information corresponding to at least one second user of the second application program respectively; and respectively carrying out matching processing on the first characteristic information and second characteristic information 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 of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Where the name of a module or unit does not in some cases constitute a limitation of the unit itself.
The functions described above herein 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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), 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. The 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 of synchronously processing online document information, the method being performed by a first server, the method comprising:
when a modification request for the online document is monitored, carrying out corresponding modification on the document directory tree structure of the online document according to the modification request;
and sending a corresponding modification instruction to the second server so that the second server sends the modification instruction to the user terminal, wherein the corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure is stored in the second server, and the user terminal is the terminal which 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 transmitting 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, wherein 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 synchronous processing method of online document information, the method being performed by a second server, the method comprising:
receiving a modification instruction for an online document sent by a first server, wherein the modification instruction is sent after the first server monitors a modification request for the online document and correspondingly modifies a document directory tree structure of the online document according to the modification request;
and according to the corresponding relation between the stored terminal identification of the user terminal and the directory tree ID of the document directory tree structure, transmitting 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, and 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 acquiring 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 synchronously processing online document information, the method being performed by a user terminal, the method comprising:
receiving a modification instruction for the online document sent by a second server, wherein the modification instruction is sent to the second server after the first server monitors a modification request for 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 the 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 the 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, modifying the document information of the corresponding node in the document directory tree structure according to the modification instruction includes at least one of:
if the modification instruction comprises a document adding instruction, adding the document information of the node corresponding to the modification instruction 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;
if the modification instruction comprises a title content update 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, there is provided an apparatus for synchronous processing of online document information, the apparatus including:
the first modification module is used for carrying out corresponding modification on the document directory tree structure of the online document according to the modification request when the modification request for 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 corresponding relation between the terminal identification of the user terminal and the directory tree ID of the document directory tree structure is stored in the second server, and the user terminal is the terminal which has acquired the document directory tree structure.
In one possible implementation, the apparatus further includes a third receiving module; the third receiving module comprises a receiving unit and a sending unit;
a receiving unit, configured to receive a document directory tree structure acquisition request of a user terminal, where the document directory tree structure acquisition request includes a directory tree ID;
a transmitting unit, configured to determine a corresponding document directory tree structure according to the directory tree ID, and transmit 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, wherein the long connection establishment request comprises a terminal identifier and a directory tree ID.
According to one or more embodiments of the present disclosure, there is provided an apparatus for synchronous processing of online document information, the apparatus including:
the first receiving module is used for receiving a modification instruction for the online document sent by the first server, wherein the modification instruction is sent after the first server monitors a modification request for 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 a modification instruction to the user terminal according to the corresponding relation between the stored terminal identification 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 a terminal which has acquired the document directory tree structure.
In one possible implementation, the apparatus further includes a connection establishment module;
the connection establishment module is used for: receiving a long connection establishment request sent by a user terminal, wherein the long connection establishment request is sent by the user terminal after acquiring 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, there is provided an apparatus for synchronous processing of online document information, the apparatus including:
the second receiving module is used for receiving a modification instruction for 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 for 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, the apparatus further includes an acquisition 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 the 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, the second modification module is specifically configured to:
if the modification instruction comprises a document adding instruction, adding the document information of the node corresponding to the modification instruction 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;
if the modification instruction comprises a title content update 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, there is provided an electronic device including:
One or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications 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, there is provided a computer-readable storage medium for storing computer instructions that, when executed on a computer, cause the computer to perform operations corresponding to a method for synchronous processing of online document information as provided by embodiments of the present disclosure.