CN110209504A - Data copy method, data method of attaching, data processing method and system - Google Patents

Data copy method, data method of attaching, data processing method and system Download PDF

Info

Publication number
CN110209504A
CN110209504A CN201810316661.3A CN201810316661A CN110209504A CN 110209504 A CN110209504 A CN 110209504A CN 201810316661 A CN201810316661 A CN 201810316661A CN 110209504 A CN110209504 A CN 110209504A
Authority
CN
China
Prior art keywords
data
terminal
server
communication link
socket
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810316661.3A
Other languages
Chinese (zh)
Other versions
CN110209504B (en
Inventor
刘阳
蓝东飞
胡杰雄
胡贾
洪栩栩
郭佳伟
胡娟
樊昱伯
周玥婵
黎芷溶
陈阔
陈浩和
董婷婷
卢香
曹新宇
范小林
邱媛
杨晓俊
陆莹
袁琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810316661.3A priority Critical patent/CN110209504B/en
Publication of CN110209504A publication Critical patent/CN110209504A/en
Application granted granted Critical
Publication of CN110209504B publication Critical patent/CN110209504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

It is pasted this application involves a kind of duplication of data, data and data processing method, device, computer readable storage medium and computer equipment, the data copy method includes: the socket communication link between holding and server;Monitoring duplication operation;When monitoring duplication operation, the corresponding data of the duplication operation are obtained;By the socket communication link, Xiang Suoshu server reports the data;The data reported are used to indicate the server and pass through data described in the socket communication link broadcast that keeps with terminal room;The data of broadcast are used to indicate the terminal for the pasting boards of data update to the terminal.The efficiency that data duplication is pasted can be improved in scheme provided by the present application.

Description

Data copy method, data method of attaching, data processing method and system
Technical field
This application involves field of computer technology, more particularly to a kind of data copy method, data method of attaching, data Processing method and system.
Background technique
With the development of computer technology, there is duplication technology for applying, duplication technology for applying refers to that user can pass through meter Calculation machine replicate data, and the data of duplication are affixed at target.But in practical business treatment process, progress usually may require that Pasting data is replicated across screen, for example is replicated in first terminal, is pasted in second terminal.
When traditional method pasted across screen duplication is usually that user is replicated by terminal, one is sent to server Asynchronous Request is used to record the data of user's duplication, sends an Asynchronous Request acquisition duplication when needing to paste Shi Zaixiang server Data.However, traditional method pasted across screen data duplication, server need to carry out authentication operations to each Asynchronous Request, There is a problem of that data duplication sticking efficiency is low.
Summary of the invention
Based on this, it is necessary to for the low technical problem of data duplication sticking efficiency, provide a kind of data copy method, number According to method of attaching, data processing method and system.
A kind of data copy method, which comprises
Keep the socket communication link between server;
Monitoring duplication operation;
When monitoring duplication operation, the corresponding data of the duplication operation are obtained;
By the socket communication link, Xiang Suoshu server reports the data;The data reported, for referring to Show that the server passes through data described in the socket communication link broadcast that keeps with terminal room;The data of broadcast are for referring to Show that the data are updated the pasting boards to the terminal by the terminal.
A kind of data copy device, described device include:
Module is kept, for the socket communication link between holding and server;
Monitoring modular is operated for monitoring duplication;
Module is obtained, for when monitoring duplication operation, obtaining the corresponding data of the duplication operation;
Reporting module, for by the socket communication link, Xiang Suoshu server to report the data;The institute reported Data are stated, the server is used to indicate and passes through data described in the socket communication link broadcast that keeps with terminal room;Broadcast The data are used to indicate the terminal for the pasting boards of data update to the terminal.
A kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor executes the step of data copy method.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the calculating When machine program is executed by the processor, so that the step of processor executes the data copy method.
Above-mentioned data copy method, device, computer readable storage medium and computer equipment are kept between server Socket communication link may make that the socket communication link between server is successfully built by once authenticating in this way It is vertical, then persistently keep, it is convenient and efficient in order to carry out multiple data communication.When monitoring duplication operation, duplication behaviour is obtained Make corresponding data, then the socket communication link by keeping between server, the data of acquisition are reported to server.Clothes For the data that business device is reported by the socket communication link broadcast kept with terminal room again to terminal, terminal updates data to end The pasting boards at end.In this way, terminal is not necessarily to that the data of server broadcast can be received to server transmission Asynchronous Request, and more with this The pasting boards of new terminal can mitigate the concurrent processing pressure of server and greatly improve user and replicate pasting data across screen Efficiency.
A kind of data method of attaching, which comprises
Keep the socket communication link between server;
Receive the data that the server is broadcasted by the socket communication link;The data of broadcast are supervised with terminal Measure duplication operation correspond to, be by the terminal monitor the duplication operate when by the socket between the server Word communication link reports to the server;
The data are updated to local pasting boards;
When monitoring paste operation, the data in the pasting boards are pasted.
A kind of data sticker, described device include:
Module is kept, for the socket communication link between holding and server;
Receiving module, the data broadcasted for receiving the server by the socket communication link;Broadcast Data, it is corresponding with the duplication operation that terminal monitoring arrives, be by the terminal monitor the duplication operation when by with it is described Socket communication link between server reports to the server;
Update module, for updating the data to local pasting boards;
Stickup module, for when monitoring paste operation, the data in the pasting boards to be pasted.
A kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor executes the step of data method of attaching.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the calculating When machine program is executed by the processor, so that the step of processor executes the data method of attaching.
Above-mentioned data method of attaching, device, computer readable storage medium and computer equipment are kept between server Socket communication link may make that the socket communication link between server is successfully built by once authenticating in this way It is vertical, then persistently keep, it is convenient and efficient in order to carry out multiple data communication.It receives server and passes through socket communication link The data broadcasted, wherein the data broadcasted are led to when monitoring duplication operation by the socket between server by terminal Letter link reports to server.May not need in this way can be by the active broadcast of server to server transmission Asynchronous Request And data are received, it is convenient and efficient.Data are updated again will be in pasting boards when monitoring paste operation to local pasting boards Data pasted, the concurrent processing pressure of server can be mitigated but greatly improve user across screen replicate pasting data Efficiency.
A kind of data processing method, which comprises
First set of words communication link is kept with first terminal;
By the first set of words communication link, receive what the first terminal was reported when monitoring that duplication operates Data;The data reported are corresponding with the duplication operation;
Pass through data described in the second socket communication link broadcast between second terminal;The data of broadcast are for referring to Show that the second terminal after receiving the data updates the data to pasting boards.
A kind of data processing equipment, described device include:
Module is kept, for keeping first set of words communication link with first terminal;
Receiving module, for receiving the first terminal and monitoring to replicate by the first set of words communication link The data reported when operation;The data reported are corresponding with the duplication operation;
Broadcast module, for passing through data described in the second socket communication link broadcast between second terminal;Broadcast The data are used to indicate the second terminal and after receiving the data update the data to pasting boards.
A kind of data processing system, the system comprises:
First terminal, for the first set of words communication link between holding and server;When monitoring duplication operation, obtain The data for taking the duplication operation corresponding;By the first set of words communication link, Xiang Suoshu server reports the number According to;
The server, the data reported for receiving the first terminal;Pass through between second terminal Data described in two socket communication link broadcasts;
The second terminal, the data broadcasted for receiving the server;The data are updated to local Pasting boards;When monitoring paste operation, the data in the pasting boards are pasted.
A kind of computer readable storage medium is stored with computer program, when the computer program is executed by processor, So that the processor executes the step of data processing method.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the calculating When machine program is executed by the processor, so that the step of processor executes the data processing method.
Above-mentioned data processing method, device, system, computer readable storage medium and computer equipment, by with first The first set of words communication link that terminal is kept receives first terminal and operates monitor to be reported when duplication operation with duplication Corresponding data.Pass through data described in the second socket communication link broadcast between second terminal again.Second terminal is receiving Data are updated to pasting boards after to the data of broadcast.In this way can actively the data broadcasting that report first terminal to second eventually Asynchronous Request is initiated without second terminal in end, has not only reduced concurrent pressure that is local while handling Asynchronous Request, but also greatly improve Second terminal obtains the efficiency that first terminal executes the data chosen when duplication operation, and then it is multiple across screen to greatly improve user The efficiency of pasting data processed.
Detailed description of the invention
Fig. 1 is the application of data copy method and/or data method of attaching and/or data processing method in one embodiment Environment map;
Fig. 2 is the flow diagram of data copy method in one embodiment;
Fig. 3 is the flow diagram of data copy method in another embodiment;
Fig. 4 is the flow diagram of data method of attaching in one embodiment;
Fig. 5 be one embodiment in when the first user identifier is consistent with second user mark, data are pasted The flow diagram of step;
Fig. 6 be one embodiment in when the first user identifier and second user mark it is inconsistent when, data are pasted The step of flow diagram;
Fig. 7 is the flow diagram of data method of attaching in another embodiment;
Fig. 8 is the flow diagram of data processing method in one embodiment;
Fig. 9 is the timing diagram of data processing method in one embodiment;
Figure 10 is the timing diagram of data processing method in another embodiment;
Figure 11 is the structural block diagram of data copy device in one embodiment;
Figure 12 is the structural block diagram of data copy device in another embodiment;
Figure 13 is the structural block diagram of data sticker in one embodiment;
Figure 14 is the structural block diagram of data sticker in another embodiment;
Figure 15 is the structural block diagram of data processing equipment in one embodiment;
Figure 16 is the structural block diagram of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
Fig. 1 is the application of data copy method and/or data method of attaching and/or data processing method in one embodiment Environment map.Referring to Fig.1, the data copy method and/or data method of attaching and/or data processing method are applied to data processing System.The data processing system includes first terminal 110, second terminal 120 and server 130.First terminal 110 and server 130 pass through network connection.Second terminal 120 and server 130 pass through network connection.First terminal 110 and second terminal 120 have Body can be terminal console or mobile terminal, mobile terminal specifically can in mobile phone, tablet computer and laptop etc. extremely Few one kind.Server 130 can be realized with the server cluster of the either multiple server compositions of independent server.
As shown in Fig. 2, in one embodiment, providing a kind of data copy method.The present embodiment is mainly in this way It is illustrated applied to the first terminal 110 in above-mentioned Fig. 1.Referring to Fig. 2, which specifically includes following step It is rapid:
S202 keeps the socket communication link between server.
Wherein, socket is also referred to as " socket ", is the interface between same host application layer and transport layer.In data communication Field, when two programs realize the exchange of data by two-way communication link, wherein the one end connected is known as a socket. Socket communication link is by the socket communication link realized, it can be achieved that the two-way communication between server and client side.
In one embodiment, a socket object, that is, socket example can be pre-created in server.Server (Internet Protocol, the agreement interconnected between the network) address an IP and port can be bound, accordingly convenient for creation Socket example can monitor the socket connection request from terminal in real time.When socket object is listened to from terminal After socket connection request, then the socket communicated with corresponding terminal is respectively created.What server was pre-created is responsible for The socket for monitoring socket connection request then continues to monitor socket connection request.
Specifically, first terminal can send socket connection request to server, carry in the socket connection request The IP address of server and port numbers for communication.Socket object monitoring in server is to the set from first terminal The socket communication link between first terminal is established after connecing word connection request.
In one embodiment, first terminal can send socket by the user end to server being mounted on first terminal Word connection request, request are connected to the designated port of server.When the socket for being responsible for monitoring in server listens to client When having socket connection request, it is created that the socket being responsible for client communication.
In one embodiment, after terminal is connected to server by socket, so that it may pass through between server Socket carries out two-way communication.After establishing socket communication link between terminal and server, terminal can keep and service Socket communication link between device can be carried out multiple between terminal and server by the socket communication link of holding at this time Communication, without verifying the identity of both sides.After when terminal or server, either one closes the socket for communication, then terminal and Sign off between server.
S204, monitoring duplication operation.
Wherein, duplication operation is to trigger the operation of replicate data.Duplication operation specifically can be touch operation, cursor operations Or button operation.Wherein, touch operation can be and touch clicking operation, touches pressing operation or touch slide, touching Touching operation can be single-touch operation or multiple point touching operation;Cursor operations can be the operation that control cursor is clicked Or the operation that control cursor is pressed;Button operation can be operation of virtual key or physical button operation etc..Duplication Operation such as presses " Ctrl "+" c " shortcut key under window system.
Specifically, first terminal can real-time detection of webpage application in trigger duplication operation.When user's log-on webpage application Application page, in application interface execute duplication operation when, terminal can monitor the duplication operate.
In one embodiment, first terminal can real-time monitoring triggered on first terminal duplication operation.Duplication behaviour It can be and triggered in the application page for keeping socket communication link with server, be also possible to touch in other pages Hair.
S206 obtains the corresponding data of duplication operation when monitoring duplication operation.
Specifically, when first terminal monitors duplication operation, when first terminal can directly determine execution duplication operation The data chosen, and obtain the corresponding data of duplication operation.
In one embodiment, when first terminal executes duplication operation, the corresponding data of duplication operation can be updated To local pasting boards.When first terminal monitors duplication operation, the data in pasting boards are obtained.
S208, by socket communication link, to server reported data;It is logical to be used to indicate server for the data reported Cross the socket communication link broadcast data kept with terminal room;The data of broadcast are used to indicate terminal and update data to terminal Pasting boards.
Wherein, pasting boards are one piece of regions in the memory of terminal, can be used to transmit and shared information.In general, Data in pasting boards temporarily store, and whenever new data are incoming, old data will be capped.
Specifically, after first terminal obtains the corresponding data of duplication operation, the socket between server can be passed through Data are reported to server by communication link.After server receives the data that report, then by the data broadcasting reported to service The corresponding terminal of device holding socket communication link.The terminal of socket communication link is kept to can be first eventually with server End, is also possible to other terminals.Terminal updates received data to the viscous of terminal after receiving the data of server broadcast Pasting board.
In one embodiment, first terminal is after getting the corresponding data of duplication operation, the data that can be will acquire It is written in socket, then server is reported to by socket communication link.
In one embodiment, server reads corresponding data from socket corresponding with first terminal.And pass through The socket communication link broadcast data kept with terminal room.Specifically, server can write data into and keep between server Socket corresponding to the terminal of socket communication link, terminal read the data of broadcast from corresponding socket again.
In one embodiment, after server receives the data reported, data can be stored into database.For example, clothes Business device can store data into redis database.Redis database can accordingly deposit data by the source side of data Storage.Wherein, the source side of data, for example user identifier corresponding to the terminal of operation is replicated with execution corresponding to data, or Person, the document identification of document where data.For example, redis database can deposit accordingly data by user identifier Storage or redis database can store accordingly data by document identification.
In one embodiment, terminal can monitor paste operation.When terminal monitoring is to paste operation, by terminal pasting boards In data pasted.
Above-mentioned data copy method keeps the socket communication link between server, may make between server in this way Socket communication link persistently kept after once authenticating and being successfully established, in order to carry out multiple data communication, It is convenient and efficient.When monitoring duplication operation, the corresponding data of duplication operation, then the set by keeping between server are obtained Word communication link is connect, the data of acquisition are reported to server.The server socket communication link by being kept with terminal room again Reported data is broadcasted to terminal, data are updated the pasting boards to terminal by terminal.In this way, terminal is asynchronous without sending to server Request can receive the data of server broadcast, and with the pasting boards of this more new terminal, can mitigate the concurrent processing of server Pressure, and efficiency of the user across screen duplication pasting data can be greatly improved.
In one embodiment, data copy method further include: the application page for application of entering the Web page;Pass through applications pages Service-oriented device sends socket connection request;Socket connection request is used to indicate server and passes through the socket on server Object word establishes socket communication link.Step S208 includes: the socket pair by socket communication link, on server As data are written.
Wherein, web application is the application that interface is presented in the form of web pages, be may operate in terminal.Web application, such as Browser application.Specifically, first terminal can enter the Web page the application interface of application, be sent by application page to server Socket connection request.
In one embodiment, the Socket object of server end, also referred to as ServerSocket can be pre-created in server Object.The socket connection request of client is monitored by accept () method.First terminal can create visitor by application page Family end Socket, and socket connection request is sent to server.Received server-side connects from the socket of first terminal After connecing request, creation connection Socket.The socket communication link between first terminal and server is just established at this time.First eventually End can be based on Transmission Control Protocol (Transmission Control Protocol transmission control protocol) will be corresponding with duplication operation Data are written in Socket, flow to server reported data by the output in Socket.Server passes through defeated in Socket The data that the reading client that becomes a mandarin reports.
In above-described embodiment, socket connection request is sent to server by application page, server may make to pass through Socket object word on server establishes socket communication link.In this way, when monitoring duplication operation in application page, it can be straight It connects and the corresponding data of duplication operation is reported into server, need not move through the verifying again of server, it is convenient and efficient, and significantly Improve the efficiency of data duplication.
In one embodiment, data copy method further include: when monitoring duplication operation, obtain duplication operation institute Corresponding cursor position;By socket communication link, cursor position is reported to server;The cursor position reported, for referring to Show that server passes through the socket communication link broadcast cursor position that keeps with terminal room;The cursor position of broadcast is used to indicate end End updates the cursor in terminal at cursor position.
Wherein, cursor position is the position in the display page of terminal where cursor, for example can be cursor in the text Position.Cursor position is the position where the mouse that terminal is shown in display interface, and terminal can carry out at cursor position Data manipulation, such as insertion text, picture, delete data or choose data etc..
Specifically, first terminal is when monitoring duplication operation, while acquisition duplication operation corresponding data, also The corresponding cursor position of available duplication operation.First terminal can be by the socket communication link between server, will Data and cursor position report to server.After server receives the cursor position that reports, then the cursor position reported broadcasted To the corresponding terminal for keeping socket communication link with server.Keep the terminal of socket communication link can be with server It is first terminal, is also possible to other terminals.Terminal is after receiving the cursor position of server broadcast, by the cursor in terminal It updates at cursor position.
In one embodiment, cursor position is broadcasted to server and keeps the corresponding of socket communication link by server Terminal can directly update the cursor in terminal at cursor position when corresponding terminal is after receiving cursor position.
In one embodiment, cursor position is broadcasted to server and keeps the corresponding of socket communication link by server Terminal, corresponding terminal receive cursor position.The cursor in terminal is updated to cursor position when terminal monitoring is to paste operation Place is set, and the data in pasting boards are pasted at the updated position of cursor.
In above-described embodiment, by socket communication link, cursor position corresponding with duplication operation is reported to server, Again by being arrived so that terminal updates cursor to keeping the corresponding terminal of socket communication link to broadcast cursor position with server , it can be achieved that different user is synchronous to cursor position in the operation of the same page at cursor position.
In one embodiment, data copy method further include: the data in the pasting boards of regular check local;Work as inspection When being updated to the data in local pasting boards, then by socket communication link, reported in ground pasting boards more to server Data after new.
In one embodiment, when first terminal monitors to trigger in the application page for carrying out Socket connection with server Duplication operation when, the corresponding data of duplication operation can be reported to server.
In one embodiment, when first terminal monitors that duplication operation is not carry out answering for Socket connection with server With the other application of the page or local triggered when, then the corresponding data of duplication operation are updated to the stickup of first terminal Plate.Data in application page regular check local pasting boards of the first terminal by carrying out Socket connection with server, when When checking the data in local pasting boards and updating, then by socket communication link, ground pasting boards are reported to server In updated data.Regular check, for example then check whether the data in primary local pasting boards become every 100ms Change.
In above-described embodiment, by the data in the pasting boards of regular check local, when checking the number in local pasting boards When according to updating, then by socket communication link, updated data in ground pasting boards are reported to server.Can comprehensively, Data corresponding with duplication operation are neatly obtained, the application that same server keeps socket communication link is no longer not limited to The page.
In one embodiment, data copy method further include: when monitoring duplication operation, obtain text where data The document identification of shelves;By socket communication link, document identification is reported to server;The document identification reported, is used to indicate Server determines the terminal for participating in the collaborative editing of document corresponding to document identification;It is logical to be used to indicate server for the data reported The socket communication link broadcast data crossed and determine that the terminal room for participating in collaborative editing is kept.
Wherein, document identification is the mark of marking document, can be number, text or symbol etc..Document identification is used to only One mark the document.For example, document identification can be the document name of document or the storage address of document etc..The present embodiment to this not It is defined, as long as can unique identification document.Wherein, document can be web (World Wide Web, global wide area network) Document.
In one embodiment, server can store accordingly data by document identification.First terminal is monitoring When operating to duplication, while acquisition duplication operation corresponding data, the document mark of data place document can also be obtained Know.Document identification can be reported to server by the socket communication link between server by first terminal.Server receives After the document identification reported, from the terminal for keeping socket communication link with server, is determined according to document identification and participate in text Shelves identify the terminal of the collaborative editing of corresponding document.Again by the document identification reported and data broadcasting to corresponding terminal.Phase The terminal answered updates the pasting boards to terminal after receiving the data of server broadcast, by data.It participates in corresponding to document identification The terminal of the collaborative editing of document, for example, participating in the terminal to the online web document editor of a same piece.
In above-described embodiment, the document identification of document, can make where the data for reporting duplication operation corresponding to server Server is obtained in the terminal for keeping socket communication link with server, is compiled to the cooperation for participating in document corresponding to document identification The terminal broadcast data collected.In this way, the terminal for only participating in the collaborative editing of document corresponding to document identification just will be updated stickup Data in plate may make different user or same subscriber when different terminals carry out collaborative editing to document, realize across screen Duplication paste functionality.
In one embodiment, server can store accordingly data by user identifier.First terminal is monitoring To when duplication operation, while acquisition duplication operation corresponding data, duplication can also be obtained and operate corresponding user Mark.User identifier can be reported to server by the socket communication link between server by first terminal.Server connects After receiving the user identifier reported, from the terminal for keeping socket communication link with server, corresponding same user identifier is determined Terminal.Again by the user identifier reported and data broadcasting to corresponding terminal.Corresponding terminal is receiving server broadcast After data, data are updated into the pasting boards to terminal.
In above-described embodiment, the user identifier for reporting duplication operation corresponding to server, may make server with clothes It is engaged in the terminal of device holding socket communication link, the data that the terminal broadcast of corresponding same user identifier reports.In this way, same Terminal corresponding to user identifier just will be updated the data in pasting boards, may make using account corresponding to same user identifier The terminal of login realizes the duplication paste functionality across screen.
In one embodiment, when monitoring duplication operation, the first corresponding user identifier of duplication operation is obtained;It is logical Socket communication link is crossed, reports the first user identifier to server;It is logical to be used to indicate server for the first user identifier reported The first user identifier of socket communication link broadcast crossed and determine that the terminal room for participating in collaborative editing is kept;The first of broadcast is used Family mark is used to indicate terminal and is monitoring paste operation and the first user identifier second user mark corresponding with paste operation When consistent, the data in pasting boards are pasted.
Wherein, user identifier is to mark the mark of user, can be number, text or symbol etc..User identifier is used to Unique identification user.For example, user identifier, which can be user, logs in user account or other identifier of internet etc., the present embodiment To this without limiting, as long as can unique identification user.
In one embodiment, first terminal obtains the corresponding data of duplication operation when monitoring duplication operation At the same time it can also obtain the document identification of data place document, and the first user identifier that duplication operation is corresponding.First eventually End is by socket communication link, to server reported data, document identification and the first user identifier.Server is according to document mark Know the terminal by data and the first subscriber identification broadcast extremely with the collaborative editing for participating in document corresponding to document identification.Terminal will Data update the pasting boards to terminal.
In one embodiment, when terminal is when monitoring paste operation, the first user identifier and paste operation be can determine whether Corresponding second user identifies whether unanimously.When the first user identifier is consistent with second user mark, by the number in pasting boards According to being pasted.
In one embodiment, when terminal is when monitoring paste operation, the first user identifier and paste operation be can determine whether Corresponding second user identifies whether unanimously.When the first user identifier and inconsistent second user mark, terminal can be to service Device initiates pasting data selection instruction.When terminal receives the stickup number for identifying corresponding data with second user of user's selection When according to selection instruction, is sent to server and carry the data query instruction that second user identifies.Server based on data inquiry refers to Order can inquire the previous data reported corresponding with second user mark from database.And extremely by the data feedback inquired Terminal.Terminal receives data and is pasted.
In above-described embodiment, the terminal for participating in the collaborative editing of document corresponding to same document identification can share first eventually The data for holding duplication, when the terminal of shared data is when executing paste operation, the only corresponding second user of paste operation is identified When consistent with the first corresponding user identifier of duplication operation, just the data in the pasting boards of terminal are pasted.In this way may be used When different user being avoided to edit same document, the data of other users duplication are accidentally pasted, can ensure pasting data Safety.
As shown in figure 3, in a specific embodiment, data copy method the following steps are included:
S302, the application page for application of entering the Web page.
S304 sends socket connection request to server by application page;Socket connection request is used to indicate clothes Business device establishes socket communication link by the socket object word on server.
S306 keeps the socket communication link between server.
S308, monitoring duplication operation.
S310 obtains text where the corresponding data of duplication operation, cursor position, data when monitoring duplication operation The document identification of shelves, and the first user identifier that duplication operation is corresponding.
S312, by socket communication link, to server reported data, cursor position, document identification and the first user Mark;The document identification reported is used to indicate server and determines the terminal for participating in the collaborative editing of document corresponding to document identification; Data, cursor position and the first user identifier reported is used to indicate server and passes through the terminal with determining participation collaborative editing Between the socket communication link broadcast data, cursor position and the first user identifier that keep;The data of broadcast are used to indicate terminal Data are updated into the pasting boards to terminal;The cursor position of broadcast is used to indicate terminal will be in terminal when monitoring paste operation Cursor update pasted at the updated position of cursor at cursor position, and by the data in pasting boards;The first of broadcast User identifier is used to indicate terminal and is monitoring paste operation and the first user identifier second user mark corresponding with paste operation When knowing consistent, the data in pasting boards are pasted.
Above-mentioned data copy method keeps the socket communication link between server, may make between server in this way Socket communication link being successfully established by once authenticate and, rear lasting holding is led in order to carry out multiple data Letter, it is convenient and efficient.When monitoring duplication operation, the corresponding data of duplication operation are obtained, then by keeping between server Socket communication link, the data of acquisition are reported to server.The server socket communication by being kept with terminal room again Data are updated the pasting boards to terminal by the data that link broadcast reports to terminal, terminal.In this way, terminal is not necessarily to send out to server Data for sending Asynchronous Request that can receive server broadcast, and with the pasting boards of this more new terminal, can mitigate server and Processing pressure is sent out, and efficiency of the user across screen duplication pasting data can be greatly improved.
Fig. 3 is the flow diagram of data copy method in one embodiment.Although should be understood that the process of Fig. 3 Each step in figure is successively shown according to the instruction of arrow, but these steps are not the inevitable sequence indicated according to arrow Successively execute.Unless expressly stating otherwise herein, there is no stringent sequences to limit for the execution of these steps, these steps can To execute in other order.Moreover, at least part step in Fig. 3 may include multiple sub-steps or multiple stages, These sub-steps or stage are not necessarily to execute completion in synchronization, but can execute at different times, these Sub-step perhaps the stage execution sequence be also not necessarily successively carry out but can be with the son of other steps or other steps Step or at least part in stage execute in turn or alternately.
As shown in figure 4, in one embodiment, providing a kind of data method of attaching.The present embodiment is mainly in this way It is illustrated applied to the second terminal 120 in above-mentioned Fig. 1.Referring to Fig. 4, which specifically includes following step It is rapid:
S402 keeps the socket communication link between server.
In one embodiment, a socket object, that is, socket example can be pre-created in server.Server An IP address and port can be accordingly bound, the socket company from terminal can be monitored in real time convenient for the socket example of creation Connect request.After socket object is listened to from the socket connection request of terminal, then it is respectively created and corresponding terminal The socket communicated.The socket for the responsible monitoring socket connection request that server is pre-created then continues to monitor socket Word connection request.
Specifically, second terminal can send socket connection request to server, carry in the socket connection request The IP address of server and port numbers for communication.Socket object monitoring in server is to the set from second terminal The socket communication link between second terminal is established after connecing word connection request.
In one embodiment, second terminal can send socket by the user end to server being mounted in second terminal Word connection request, request are connected to the designated port of server.When the socket for being responsible for monitoring in server listens to client When having socket connection request, it is created that the socket being responsible for client communication.
In one embodiment, after second terminal is connected to server by socket, so that it may lead between server It crosses socket and carries out two-way communication.After establishing socket communication link between second terminal and server, second terminal can The socket communication link between server is kept, it at this time can be logical by the socket of holding between second terminal and server Letter link is repeatedly communicated, without verifying the identity of both sides.When second terminal or server, either one is closed for communicating Socket after, then the sign off between second terminal and server.
In one embodiment, second terminal can and the synchronous socket communication chain established between server of first terminal Road is simultaneously kept.In another embodiment, second terminal can also be the asynchronous socket established between server of first terminal Communication link is simultaneously kept, for example, the socket communication link of first terminal than second terminal socket communication link one step ahead It establishes.Wherein, first terminal is the terminal for executing duplication operation.
S404 receives server and passes through the data that socket communication link is broadcasted;The data of broadcast, are arrived with terminal monitoring Duplication operate and correspond to, be to be reported to when monitoring duplication operation by the socket communication link between server by terminal Server.
In one embodiment, terminal, such as first terminal, can monitoring duplication operation.First terminal monitors duplication behaviour After work, the corresponding data of duplication operation can be obtained.First terminal can keep the socket communication link between server, and first The data that the socket communication link that terminal passes through holding again will acquire report to server.Server by data broadcasting to clothes Business device keeps the corresponding first terminal and second terminal of socket communication link.
Specifically, when server passes through socket communication link broadcast data, second terminal can receive server broadcast Data.Wherein, the data of server broadcast are that the duplication action-item that monitors with first terminal is corresponding, and be by first eventually End reports to server by the socket communication link between server when monitoring duplication operation.
In one embodiment, second terminal can pre-establish the socket communication link between server and keep.When Data corresponding with the duplication operation monitored are reported to server by first terminal, when server broadcast to second terminal, Two terminals can receive the data of server broadcast by the socket communication link between server.
In one embodiment, when the data that server reception first terminal reports, and second terminal does not also set up and takes Be engaged in device between socket communication link when.When second terminal establishes the socket communication link between server, server is just The corresponding data of the duplication operation that the newest and first terminal of storage can be monitored, through foundation between second terminal Socket communication link, be sent to second terminal.
S406 updates data to local pasting boards.
Specifically, second terminal can update data received from server to local pasting boards.Second terminal connects The data of receipts can be covered with data old in local pasting boards.
S408 pastes the data in pasting boards when monitoring paste operation.
Wherein, paste operation is the operation for triggering pasting data.Paste operation specifically can be touch operation, cursor operations Or button operation.Wherein, touch operation can be and touch clicking operation, touches pressing operation or touch slide, touching Touching operation can be single-touch operation or multiple point touching operation;Cursor operations can be the operation that control cursor is clicked Or the operation that control cursor is pressed;Button operation can be operation of virtual key or physical button operation etc..It pastes Operation such as presses " Ctrl "+" v " shortcut key under window system.
Specifically, second terminal can monitor paste operation.When monitoring paste operation, second terminal can will be in pasting boards Data affix at the cursor position of second terminal.
In one embodiment, the paste operation that second terminal can trigger in real-time monitoring web application.When user logs in The application page of web application, when executing paste operation in application interface, second terminal can monitor the paste operation.
In one embodiment, second terminal can the paste operation that triggers in second terminal of real-time monitoring.Stickup behaviour It can be and triggered in the application page for keeping socket communication link with server, be also possible to touch in other pages Hair.
Above-mentioned data method of attaching keeps the socket communication link between server, may make between server in this way Socket communication link by once authenticate and being successfully established, then persistently keep, lead in order to carry out multiple data Letter, it is convenient and efficient.It receives server and passes through the data that socket communication link is broadcasted, wherein the data of broadcast are by terminal Server is reported to by the socket communication link between server when monitoring duplication operation.May not need in this way to Server, which sends Asynchronous Request, to receive data by the active broadcast of server, convenient and efficient.Data update is arrived again Local pasting boards paste the data in pasting boards when monitoring paste operation, can mitigate the concurrent of server Processing pressure, and efficiency of the user across screen duplication pasting data can be greatly improved.
In one embodiment, data method of attaching further include: it is wide by socket communication link institute to receive server The cursor position broadcast;Cursor is updated at cursor position;Step S208 include when monitoring paste operation, will be in pasting boards Data paste at the updated position of cursor.
In one embodiment, first terminal is obtaining the corresponding data of duplication operation when monitoring duplication operation While, the corresponding cursor position of duplication operation can also be obtained.First terminal can be logical by the socket between server Believe link, data and cursor position are reported into server.Data and cursor position are broadcasted to server and are kept by server The corresponding terminal of socket communication link.Wherein, corresponding terminal includes second terminal.Second terminal receives server broadcast Cursor position after, the cursor of second terminal is updated at cursor position.When second terminal monitors paste operation, will glue Data in pasting board paste at the updated position of cursor.
In above-described embodiment, by socket communication link, the cursor position for receiving server broadcast again updates cursor To at cursor position, when monitoring paste operation, the data in pasting boards are pasted at the updated position of cursor, it can be real Existing different user is synchronous to the operation of the same page.
In one embodiment, the terminal of reported data is to participate in the terminal of collaborative editing of the document data method of attaching It further include when the first user identifier is consistent with second user mark, the step of stickup to data, which includes:
S502 receives server and passes through the first user identifier that socket communication link is broadcasted;First user identifier with Duplication operation corresponds to.
In one embodiment, first terminal obtains the corresponding data of duplication operation when monitoring duplication operation Corresponding first user identifier is operated at the same time it can also obtain language duplication.First terminal is by socket communication link, to clothes Device reported data of being engaged in and the first user identifier.Server is by data and the first subscriber identification broadcast to corresponding terminal.Wherein, eventually End includes second terminal.The data and corresponding first user identifier of second terminal reception server broadcast.
S504 obtains the second user mark of triggering paste operation when monitoring paste operation.
Specifically, second terminal is when monitoring paste operation, it may be determined that triggers the second user mark of paste operation.? In one embodiment, second terminal can enter the Web page the application page of application, and paste operation is monitored in application page, works as monitoring When to paste operation, the second user mark of triggering paste operation is obtained, for example logs in the user account etc. of the web application.
S506 compares the first user identifier and second user mark.
Specifically, comparable first user identifier of second terminal identifies whether consistent with second user.
S508 pastes the data in pasting boards when the first user identifier is consistent with second user mark.
Specifically, when the first user identifier and consistent second user mark, second terminal can directly will be in pasting boards Data are pasted.In one embodiment, the data in pasting boards can be pasted the cursor position of second terminal by second terminal Set place.
In above-described embodiment, when the first user identifier of triggering duplication operation and the second user mark of triggering paste operation When consistent, duplication operation is just executed, the data in pasting boards are pasted, same document can carried out to avoid different user When editor, the data of other users duplication are accidentally pasted, can ensure the safety of pasting data.
In one embodiment, which further includes when the first user identifier and second user mark are inconsistent When, the step of stickup to data, which includes:
S602 detects pasting data selection instruction when the first user identifier and inconsistent second user mark.
Wherein, the instruction of the selection pasting data of pasting data selection instruction.Specifically, when the first user identifier and second When user identifier is inconsistent, second terminal can detect the pasting data selection instruction of user's triggering.
In one embodiment, when the first user identifier and inconsistent second user mark, display circle of second terminal Face can show pasting data choice box.It wherein, may include selection number corresponding with second user mark in pasting data choice box According to selection mark, and the selection of corresponding with the first user identifier data of selection identifies.User can select in pasting data Pasting data selection instruction is triggered in frame.For example, user can identify corresponding data with second user by clicking or touching The pasting data selection instruction that corresponding data are identified with second user is chosen in selection mark, triggering.Alternatively, user can pass through a little The selection mark of data corresponding with the first user identifier is hit or touches, data corresponding with the first user identifier are chosen in triggering Pasting data selection instruction.
S604, when detect choose the pasting data selection instruction that corresponding data are identified with second user when, to service Device sends the data query instruction for carrying second user mark.
Specifically, the pasting data selection instruction that corresponding data are identified with second user is chosen when second terminal detects When, it is sent to server and carries the data query instruction that second user identifies.Second user is carried when server receives After the data query instruction of mark, it can be instructed according to data query and inquire number corresponding with second user mark in the database According to.In one embodiment, server can obtain in data corresponding with second user mark, the nearest data of storage time. When data base querying is received to data corresponding with second user mark, the data inquired are sent to second terminal.
S606 receives data that server is fed back in response to data query instruction and corresponding with second user mark.
Specifically, second terminal can by the socket communication link between server, receive that server sends with the The corresponding data of two user identifiers.
S608, the data that server is fed back are pasted.
Specifically, second terminal can affix to the light of second terminal according to paste operation, the data that server is fed back At cursor position.
In above-described embodiment, when the first user identifier of triggering duplication operation and the second user mark of triggering paste operation When inconsistent, pasting data selection instruction is detected.The pasting data that corresponding data are identified with second user is chosen when detecting When selection instruction, the data query instruction for carrying second user mark is sent to server to obtain corresponding data.In this way may be used When being edited to avoid different user to same document, the data of other users duplication are accidentally pasted, can ensure pasting data Safety.
In one embodiment, when the first user identifier and inconsistent second user mark, detection pasting data selection Instruction;When detecting the pasting data selection instruction for choosing data corresponding with the first user identifier, by the number in pasting boards According to being pasted.
In above-described embodiment, when detecting the pasting data selection instruction for choosing data corresponding with the first user identifier When, directly the data in pasting boards can be pasted.
As shown in fig. 7, in a specific embodiment, data method of attaching the following steps are included:
S702 keeps the socket communication link between server.
S704 receives server and passes through data, cursor position and the first user identifier that socket communication link is broadcasted; The data of broadcast, it is corresponding with the duplication operation that terminal monitoring arrives, be by terminal monitor duplication operation when by with server Between socket communication link report to server;First user identifier is corresponding with duplication operation.
S706 updates data to local pasting boards.
S708 updates cursor at cursor position.
S710 obtains the second user mark of triggering paste operation when monitoring paste operation.
S712 compares the first user identifier and second user mark.
Data in pasting boards are pasted cursor more when the first user identifier is consistent with second user mark by S714 At position after new.
S716 detects pasting data selection instruction when the first user identifier and inconsistent second user mark.
S718, when detect choose the pasting data selection instruction that corresponding data are identified with second user when, to service Device sends the data query instruction for carrying second user mark.
S720 receives data that server is fed back in response to data query instruction and corresponding with second user mark.
S722, the data that server is fed back paste at the updated position of cursor.
Above-mentioned data method of attaching keeps the socket communication link between server, may make between server in this way Socket communication link by once authenticate and being successfully established, then persistently keep, lead in order to carry out multiple data Letter, it is convenient and efficient.It receives server and passes through the data that socket communication link is broadcasted, wherein the data broadcasted are existed by terminal It monitors to report to server by the socket communication link between server when duplication operation.It is may not need in this way to clothes Business device, which sends Asynchronous Request, to receive data by the active broadcast of server, convenient and efficient.Data are updated to this again The pasting boards on ground paste the data in pasting boards when monitoring paste operation, can mitigate the concurrently place of server Pressure is managed, and efficiency of the user across screen duplication pasting data can be greatly improved.
Fig. 7 is the flow diagram of data method of attaching in one embodiment.Although should be understood that the process of Fig. 7 Each step in figure is successively shown according to the instruction of arrow, but these steps are not the inevitable sequence indicated according to arrow Successively execute.Unless expressly stating otherwise herein, there is no stringent sequences to limit for the execution of these steps, these steps can To execute in other order.Moreover, at least part step in Fig. 7 may include multiple sub-steps or multiple stages, These sub-steps or stage are not necessarily to execute completion in synchronization, but can execute at different times, these Sub-step perhaps the stage execution sequence be also not necessarily successively carry out but can be with the son of other steps or other steps Step or at least part in stage execute in turn or alternately.
As shown in figure 8, in one embodiment, providing a kind of data processing method.The present embodiment is mainly in this way It is illustrated applied to the server 130 in above-mentioned Fig. 1.Referring to Fig. 8, which specifically comprises the following steps:
S802 keeps first set of words communication link with first terminal.
In one embodiment, a socket object can be pre-created in server, for monitoring the set from terminal Connect word connection request.After socket object is listened to from the socket connection request of terminal, then be respectively created with accordingly The socket that is communicated of terminal.The socket for the responsible monitoring socket connection request that server is pre-created then continues to supervise Listen socket connection request.
In one embodiment, first terminal can send socket connection request, the socket connection request to server In carry the IP address of server and the port numbers for communication.Socket object monitoring in server is to from first The socket communication link between first terminal is established after the socket connection request of terminal.
In one embodiment, after first terminal is connected to server by socket, first terminal can and be serviced Two-way communication is carried out by socket between device.When establishing first set of words communication link between first terminal and server Afterwards, server can keep the first set of words communication link between first terminal, at this time can between first terminal and server It is repeatedly communicated by the first set of words communication link of holding, without verifying the identity of both sides.When first terminal or clothes It is engaged in after socket of either one closing of device for communication, then the sign off between first terminal and server.
S804 receives first terminal in the number for monitoring to be reported when duplication operation by first set of words communication link According to;The data reported are corresponding with duplication operation.
Specifically, first terminal can will be grasped when monitoring duplication operation by first set of words communication link with duplication Make corresponding data and reports to server.Server receives the data that first terminal reports by first set of words communication link.
In one embodiment, first terminal can real-time monitoring triggered on first terminal duplication operation.Duplication behaviour It can be and triggered in the application page for keeping socket communication link with server, be also possible to touch in other pages Hair.
In one embodiment, server receives data by the first set of words communication link kept between first terminal When, data can be stored into database.For example, server can store data into redis database.Redis database Respective stored can be carried out to data by the source side of data.Wherein, the source side of data, for example, it is multiple with execution corresponding to data User identifier corresponding to the first terminal of operation is made, alternatively, the document identification of document where data.For example, redis number Data can be stored accordingly by user identifier according to library or redis database can carry out phase to data by document identification The storage answered.
S806 passes through the second socket communication link broadcast data between second terminal;The data of broadcast are used to indicate Second terminal after receiving the data updates data to pasting boards.
In one embodiment, second terminal can pre-establish the second socket communication link between server and protect It holds.When data corresponding with the duplication operation monitored are reported to server, server broadcast to second terminal by first terminal When, second terminal can receive the data of server broadcast by the second socket communication link between server.Second terminal Data are updated to pasting boards after the data for receiving server broadcast.
In one embodiment, when the data that server reception first terminal reports, and second terminal does not also set up and takes Be engaged in device between the second socket communication link when.When server establishes the second socket communication link between second terminal, The corresponding data of the duplication operation that server can monitor the newest and first terminal of storage, pass through the second socket Communication link is sent to second terminal.
Above-mentioned data processing method receives first terminal by the first set of words communication link kept with first terminal In the data corresponding with duplication operation for monitoring to be reported when duplication operation.Pass through the second socket between second terminal again Communication link broadcast data.Second terminal updates data to pasting boards after the data for receiving broadcast.In this way can actively by The data broadcasting that first terminal reports initiates Asynchronous Request without second terminal, had both reduced local while having located to second terminal The concurrent pressure of Asynchronous Request is managed, and substantially increases second terminal and obtains the number chosen when first terminal execution duplication operation According to efficiency, and then greatly improve user across screen duplication pasting data efficiency.
In one embodiment, a kind of data processing system is provided, comprising:
First terminal, for the first set of words communication link between holding and server;When monitoring duplication operation, obtain The data for taking duplication operation corresponding;By first set of words communication link, to server reported data.
Server, the data reported for receiving first terminal;Pass through the second socket communication between second terminal Link broadcast data.
Second terminal, the data broadcasted for receiving server;Data are updated to local pasting boards;When monitoring When paste operation, the data in pasting boards are pasted.
Above-mentioned data processing system receives first terminal by the first set of words communication link kept with first terminal In the data corresponding with duplication operation for monitoring to be reported when duplication operation.Pass through the second socket between second terminal again Communication link broadcast data.Second terminal updates data to pasting boards after the data for receiving broadcast.In this way can actively by The data broadcasting that first terminal reports initiates Asynchronous Request without second terminal, had both reduced local while having located to second terminal The concurrent pressure of Asynchronous Request is managed, and substantially increases second terminal and obtains the number chosen when first terminal execution duplication operation According to efficiency, and then greatly improve user across screen duplication pasting data efficiency.
In concrete application scene, it is understood that there may be two kinds of situations.The first situation, such as user protect with server The multiple browser ends for holding socket connection carry out duplication paste operation.Situation in second, for example user is in a browser end Duplication operation is executed after establishing socket connection, still further a browser end foundation is held again after connecting with the socket of server Row paste operation.
In the first scenario, as shown in figure 9, Fig. 9 shows the timing diagram of data processing method in one embodiment.The One terminal and second terminal can be established respectively to be connect with the socket of server.User can trigger duplication behaviour by first terminal Make, first terminal executes duplication behaviour, and updates pasting boards according to data corresponding with duplication operation.First terminal will be grasped with duplication Make corresponding data and is sent to server.After server receives data, socket is kept to connect to server data broadcasting The first terminal and second terminal connect.First terminal and second terminal are respectively according to the pasting boards of the data of broadcast more new terminal. User triggers paste operation by second terminal, and when second terminal monitors paste operation, the data in pasting boards are pasted To cursor position.
In the first scenario, as shown in Figure 10, Figure 10 shows the timing of data processing method in another embodiment Figure.First terminal foundation is connect with the socket of server.User can trigger duplication operation by first terminal, and first terminal is held Row duplication behaviour, and pasting boards are updated according to data corresponding with duplication operation.First terminal will data corresponding with duplication operation It is sent to server.After server receives data, by data broadcasting to the first terminal for keeping socket to connect with server. First terminal is according to the pasting boards of the data more new terminal of broadcast.Second terminal foundation is connect with the socket of server.At this point, The data broadcasted before are directly sent to second terminal by server.Second terminal is according to the stickup of the data more new terminal of broadcast Plate.User triggers paste operation by second terminal and glues the data in pasting boards when second terminal monitors paste operation It is labelled at cursor position.
As shown in figure 11, in one embodiment, a kind of data copy device 1100 is provided, comprising: keep module 1101, monitoring modular 1102, acquisition module 1103 and reporting module 1104.
Module 1101 is kept, for the socket communication link between holding and server.
Monitoring modular 1102 is operated for monitoring duplication.
Module 1103 is obtained, for when monitoring duplication operation, obtaining the corresponding data of duplication operation.
Reporting module 1104, for passing through socket communication link, to server reported data;The data reported, are used for Indicate that server passes through the socket communication link broadcast data that keep with terminal room;The data of broadcast are used to indicate terminal and will count According to the pasting boards updated to terminal.
Above-mentioned data copy method keeps the socket communication link between server, may make between server in this way Socket communication link persistently kept after once authenticating and being successfully established, in order to carry out multiple data communication, It is convenient and efficient.When monitoring duplication operation, the corresponding data of duplication operation, then the set by keeping between server are obtained Word communication link is connect, the data of acquisition are reported to server.The server socket communication link by being kept with terminal room again Reported data is broadcasted to terminal, data are updated the pasting boards to terminal by terminal.In this way, terminal is asynchronous without sending to server Request can receive the data of server broadcast, and with the pasting boards of this more new terminal, can mitigate the concurrent processing of server Pressure, and efficiency of the user across screen duplication pasting data can be greatly improved.
In one embodiment, data copy device 1100 further includes entering module 1105 and sending module 1106.
Application page into module 1105, for application of entering the Web page.
Sending module 1106, for sending socket connection request to server by application page;Socket connection is asked It asks, is used to indicate server by the socket object word on server and establishes socket communication link.
Reporting module 1104 is also used to the write-in data of the socket object word by socket communication link, on server.
In above-described embodiment, socket connection request is sent to server by application page, server may make to pass through Socket object word on server establishes socket communication link.In this way, when monitoring duplication operation in application page, it can be straight It connects and the corresponding data of duplication operation is reported into server, need not move through the verifying again of server, it is convenient and efficient, and significantly Improve the efficiency of data duplication.
In one embodiment, it obtains module 1103 to be also used to when monitoring duplication operation, it is right to obtain duplication operation institute The cursor position answered.Reporting module 1104 is also used to report cursor position to server by socket communication link;It reports Cursor position is used to indicate server and passes through the socket communication link broadcast cursor position that keeps with terminal room;The light of broadcast Cursor position is used to indicate terminal and updates the cursor in terminal at cursor position.
In above-described embodiment, by socket communication link, cursor position corresponding with duplication operation is reported to server, Again by being arrived so that terminal updates cursor to keeping the corresponding terminal of socket communication link to broadcast cursor position with server , it can be achieved that different user is synchronous to cursor position in the operation of the same page at cursor position.
In one embodiment, the cursor position of broadcast be used to indicate terminal will be in terminal when monitoring paste operation Cursor update pastes at the updated position of cursor at cursor position, and by the data in pasting boards.
In above-described embodiment, by the data in pasting boards being pasted at the updated position of cursor, it can be achieved that different User is synchronous to the operation of the same page.
As shown in figure 12, in one embodiment, data copy device 1100 further includes checking module 1107, checks module 1107 for the data in the pasting boards of regular check local.Reporting module 1104 is also used to work as the number checked in local pasting boards When according to updating, then by socket communication link, updated data in ground pasting boards are reported to server.
In above-described embodiment, by the data in the pasting boards of regular check local, when checking the number in local pasting boards When according to updating, then by socket communication link, updated data in ground pasting boards are reported to server.Can comprehensively, Data corresponding with duplication operation are neatly obtained, the application that same server keeps socket communication link is no longer not limited to The page.
In one embodiment, module 1103 is obtained to be also used to obtain document where data when monitoring duplication operation Document identification.Reporting module 1104 is also used to report document identification to server by socket communication link;The text reported Shelves mark is used to indicate server and determines the terminal for participating in the collaborative editing of document corresponding to document identification;The data reported are used Pass through the socket communication link broadcast data with the terminal room holding for determining participation collaborative editing in instruction server.
In above-described embodiment, the document identification of document, can make where the data for reporting duplication operation corresponding to server Server is obtained in the terminal for keeping socket communication link with server, is compiled to the cooperation for participating in document corresponding to document identification The terminal broadcast data collected.In this way, the terminal for only participating in the collaborative editing of document corresponding to document identification just will be updated stickup Data in plate may make different user or same subscriber when different terminals carry out collaborative editing to document, realize across screen Duplication paste functionality.
In one embodiment, it obtains module 1103 to be also used to when monitoring duplication operation, it is right to obtain duplication operation institute The first user identifier answered.Reporting module 1104 is also used to through socket communication link, reports the first user to mark to server Know;The first user identifier reported is used to indicate server and passes through the socket with the terminal room holding for determining participation collaborative editing Word communication link broadcasts the first user identifier;Broadcast the first user identifier be used to indicate terminal monitor paste operation and When first user identifier second user mark corresponding with paste operation is consistent, the data in pasting boards are pasted.
In above-described embodiment, the terminal for participating in the collaborative editing of document corresponding to same document identification can share first eventually The data for holding duplication, when the terminal of shared data is when executing paste operation, the only corresponding second user mark of paste operation When knowing consistent with the first corresponding user identifier of duplication operation, just the data in the pasting boards of terminal are pasted.In this way When avoidable different user edits same document, the data of other users duplication are accidentally pasted, can ensure pasting data Safety.
As shown in figure 13, in one embodiment, a kind of data sticker 1300 is provided, comprising: keep module 1301, receiving module 1302, update module 1303 and stickup module 1304.
Module 1301 is kept, for the socket communication link between holding and server.
Receiving module 1302 passes through the data that socket communication link is broadcasted for receiving server;The data of broadcast, It is corresponding with the duplication operation that terminal monitoring arrives, it is to be led to when monitoring duplication operation by the socket between server by terminal Letter link reports to server.
Update module 1303, for updating data to local pasting boards.
Stickup module 1304, for when monitoring paste operation, the data in pasting boards to be pasted.
Above-mentioned data method of attaching keeps the socket communication link between server, may make between server in this way Socket communication link by once authenticate and being successfully established, then persistently keep, lead in order to carry out multiple data Letter, it is convenient and efficient.It receives server and passes through the data that socket communication link is broadcasted, wherein the data of broadcast are by terminal Server is reported to by the socket communication link between server when monitoring duplication operation.May not need in this way to Server, which sends Asynchronous Request, to receive data by the active broadcast of server, convenient and efficient.Data update is arrived again Local pasting boards paste the data in pasting boards when monitoring paste operation, can mitigate the concurrent of server Processing pressure, and efficiency of the user across screen duplication pasting data can be greatly improved.
In one embodiment, receiving module 1302 is also used to receive what server was broadcasted by socket communication link Cursor position.Update module 1303 is also used to update cursor at cursor position.Stickup module 1304 is also used to work as and monitor When paste operation, the data in pasting boards are pasted at the updated position of cursor.
In above-described embodiment, by socket communication link, the cursor position for receiving server broadcast again updates cursor To at cursor position, when monitoring paste operation, the data in pasting boards are pasted at the updated position of cursor, it can be real Existing different user is synchronous to the operation of the same page.
In one embodiment, the terminal of reported data is to participate in the terminal of the collaborative editing of document;Data sticker 1300 further include obtaining module 1305 and comparison module 1306.
Receiving module 1302 is also used to receive server and passes through the first user identifier that socket communication link is broadcasted;The One user identifier is corresponding with duplication operation.
Module 1305 is obtained, for when monitoring paste operation, obtaining the second user mark of triggering paste operation.
Comparison module 1306, for comparing the first user identifier and second user mark.
Stickup module 1304 is also used to when the first user identifier is consistent with second user mark, by the data in pasting boards It is pasted.
In above-described embodiment, when the first user identifier of triggering duplication operation and the second user mark of triggering paste operation When consistent, duplication operation is just executed, the data in pasting boards are pasted, same document can carried out to avoid different user When editor, the data of other users duplication are accidentally pasted, can ensure the safety of pasting data.
As shown in figure 14, in one embodiment, data sticker 1300 further includes detection module 1307 and transmission mould Block 1308.
Detection module 1307, for when the first user identifier and inconsistent second user mark, detection pasting data to be selected Select instruction.
Sending module 1308 chooses the pasting data selection for identifying corresponding data with second user to refer to for that ought detect When enabling, is sent to server and carry the data query instruction that second user identifies.
Receiving module 1302 be also used to receive server in response to data query instruction fed back and with second user mark Know corresponding data.
The data that stickup module 1304 is also used to be fed back server are pasted.
In above-described embodiment, when the first user identifier of triggering duplication operation and the second user mark of triggering paste operation When inconsistent, pasting data selection instruction is detected.The pasting data that corresponding data are identified with second user is chosen when detecting When selection instruction, the data query instruction for carrying second user mark is sent to server to obtain corresponding data.In this way may be used When being edited to avoid different user to same document, the data of other users duplication are accidentally pasted, can ensure pasting data Safety.
As shown in figure 15, in one embodiment, a kind of data processing equipment 1500 is provided, comprising: keep module 1501, receiving module 1502 and broadcast module 1503.
Module 1501 is kept, for keeping first set of words communication link with first terminal.
Receiving module 1502, for receiving first terminal and monitoring duplication operation by first set of words communication link When the data that are reported;The data reported are corresponding with duplication operation.
Broadcast module 1503, for passing through the second socket communication link broadcast data between second terminal;Broadcast Data are used to indicate second terminal and after receiving the data update data to pasting boards.
Above-mentioned data processing method receives first terminal by the first set of words communication link kept with first terminal In the data corresponding with duplication operation for monitoring to be reported when duplication operation.Pass through the second socket between second terminal again Communication link broadcast data.Second terminal updates data to pasting boards after the data for receiving broadcast.In this way can actively by The data broadcasting that first terminal reports initiates Asynchronous Request without second terminal, had both reduced local while having located to second terminal The concurrent pressure of Asynchronous Request is managed, and substantially increases second terminal and obtains the number chosen when first terminal execution duplication operation According to efficiency, and then greatly improve user across screen duplication pasting data efficiency.
Figure 16 shows the internal structure chart of computer equipment in one embodiment.The computer equipment specifically can be figure First terminal 110, second terminal 120 or server 130 in 1.As shown in figure 16, which includes that the computer is set Standby includes processor, memory and the network interface connected by system bus.Wherein, memory includes that non-volatile memories are situated between Matter and built-in storage.The non-volatile memory medium of the computer equipment is stored with operating system, can also be stored with computer journey Sequence when the computer program is executed by processor, may make processor to realize data copy method and/or data method of attaching And/or data processing method.Computer program can also be stored in the built-in storage, which is executed by processor When, it may make processor to execute data copy method and/or data method of attaching and/or data processing method.
It will be understood by those skilled in the art that structure shown in Figure 16, only part relevant to application scheme The block diagram of structure, does not constitute the restriction for the computer equipment being applied thereon to application scheme, and specific computer is set Standby may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, data copy device provided by the present application, data sticker and data processing equipment can In the form of being embodied as a kind of computer program, computer program can be run in computer equipment as shown in figure 16.It calculates The each program for forming the data copy device, data sticker or data processing equipment can be stored in the memory of machine equipment Module, for example, holding module, monitoring modular, acquisition module and reporting module shown in Figure 11.The meter that each program module is constituted Calculation machine program makes processor execute the step in the data copy method of each embodiment of the application described in this specification. Also for example, holding module, receiving module, update module and stickup module shown in Figure 13.The calculating that each program module is constituted Machine program makes processor execute the step in the data method of attaching of each embodiment of the application described in this specification.Again For example, holding module, receiving module and broadcast module shown in figure 15.The computer program that each program module is constituted to locate Reason device executes the step in the data processing method of each embodiment of the application described in this specification.
For example, computer equipment shown in Figure 16 can pass through the holding module in data copy device as shown in figure 11 Execute step S202.Computer equipment can execute step S204 by monitoring modular.Computer equipment can be held by obtaining module Row step S206.Computer equipment can execute step S208 by reporting module.
For example, computer equipment shown in Figure 16 can pass through the holding module in data sticker as shown in fig. 13 that Execute step S402.Computer equipment can execute step S404 by receiving module.Computer equipment can be held by update module Row step S406.Computer equipment can execute step S408 by stickup module.
For example, computer equipment shown in Figure 16 can pass through the holding module in data processing equipment as shown in figure 15 Execute step S802.Computer equipment can execute step S804 by receiving module.Computer equipment can be held by broadcast module Row step S806.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, when computer program is executed by processor, so that processor executes following steps: keeping the set between server Connect word communication link;Monitoring duplication operation;When monitoring duplication operation, the corresponding data of duplication operation are obtained;Pass through set Word communication link is connect, to server reported data;The data reported are used to indicate server and pass through the socket that keeps with terminal room Word communication link broadcast data;The data of broadcast are used to indicate terminal for the pasting boards of data update to terminal.
In one embodiment, computer program to go back processor execution following steps: the application for application of entering the Web page The page;Socket connection request is sent to server by application page;Socket connection request is used to indicate server and passes through Socket object word on server establishes socket communication link;Socket by socket communication link, on server Data are written in object.
In one embodiment, computer program to go back processor execution following steps: when monitoring duplication operation, Obtain the corresponding cursor position of duplication operation;By socket communication link, cursor position is reported to server;The light reported Cursor position is used to indicate server and passes through the socket communication link broadcast cursor position that keeps with terminal room;The cursor of broadcast Position is used to indicate terminal and updates the cursor in terminal at cursor position.
In one embodiment, the cursor position of broadcast be used to indicate terminal will be in terminal when monitoring paste operation Cursor update pastes at the updated position of cursor at cursor position, and by the data in pasting boards.
In one embodiment, computer program to go back processor execution following steps: regular check local pasting boards In data;When checking the data in local pasting boards and updating, then by socket communication link, on server Updated data in report ground pasting boards.
In one embodiment, computer program to go back processor execution following steps: when monitoring duplication operation, The document identification of document where obtaining data;By socket communication link, document identification is reported to server;The document reported Mark is used to indicate server and determines the terminal for participating in the collaborative editing of document corresponding to document identification;The data reported, are used for Indicate that server passes through the socket communication link broadcast data with the terminal room holding for determining participation collaborative editing.
In one embodiment, computer program to go back processor execution following steps: when monitoring duplication operation, Obtain the first corresponding user identifier of duplication operation;By socket communication link, the first user identifier is reported to server; The first user identifier reported is used to indicate server by leading to the socket for determining that the terminal room for participating in collaborative editing is kept Believe the first user identifier of link broadcast;First user identifier of broadcast is used to indicate terminal and is monitoring paste operation and first When user identifier second user mark corresponding with paste operation is consistent, the data in pasting boards are pasted.
Above-mentioned computer equipment keeps the socket communication link between server, may make between server in this way Socket communication link is successfully established by once authenticating, and is then persistently kept, in order to carry out multiple data communication, It is convenient and efficient.When monitoring duplication operation, the corresponding data of duplication operation, then the set by keeping between server are obtained Word communication link is connect, the data of acquisition are reported to server.The server socket communication link by being kept with terminal room again The data reported are broadcasted to terminal, data are updated the pasting boards to terminal by terminal.In this way, terminal is different without sending to server Step request can receive the data of server broadcast, and with the pasting boards of this more new terminal, can mitigate the concurrently place of server Pressure is managed, and efficiency of the user across screen duplication pasting data can be greatly improved.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, when computer program is executed by processor, so that processor executes following steps: keeping the set between server Connect word communication link;It receives server and passes through the data that socket communication link is broadcasted;The data of broadcast, are arrived with terminal monitoring Duplication operate and correspond to, be to be reported to when monitoring duplication operation by the socket communication link between server by terminal Server;Data are updated to local pasting boards;When monitoring paste operation, the data in pasting boards are pasted.
In one embodiment, computer program to go back processor execution following steps: receiving server and passes through socket The cursor position that word communication link is broadcasted;Cursor is updated at cursor position;When monitoring paste operation, by pasting boards In data paste at the updated position of cursor.
In one embodiment, the terminal of reported data is to participate in the terminal of the collaborative editing of document;Computer program makes Processor must be gone back and execute following steps: receiving server and pass through the first user identifier that socket communication link is broadcasted;First User identifier is corresponding with duplication operation;When monitoring paste operation, the second user mark of triggering paste operation is obtained;Compare First user identifier and second user mark;When the first user identifier is consistent with second user mark, by the number in pasting boards According to being pasted.
In one embodiment, computer program to go back processor and executes following steps: when the first user identifier and the When two user identifiers are inconsistent, pasting data selection instruction is detected;Data corresponding with second user mark are chosen when detecting Pasting data selection instruction when, to server send carry second user identify data query instruction;Server is received to ring Data being fed back and corresponding with second user mark should be instructed in data query;The data that server is fed back carry out It pastes.
Above-mentioned computer equipment keeps the socket communication link between server, may make between server in this way Socket communication link is successfully established by once authenticating, and is then persistently kept, in order to carry out multiple data communication, It is convenient and efficient.It receives server and passes through the data that socket communication link is broadcasted, wherein the data broadcasted are being supervised by terminal Server is reported to by the socket communication link between server when measuring duplication operation.It is may not need in this way to service Device, which sends Asynchronous Request, to receive data by the active broadcast of server, convenient and efficient.Data are updated to local again Pasting boards the data in pasting boards are pasted when monitoring paste operation, the concurrent processing of server can be mitigated Pressure, and efficiency of the user across screen duplication pasting data can be greatly improved.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory Computer program, when computer program is executed by processor, so that processor executes following steps: keeping first with first terminal Socket communication link;By first set of words communication link, receive what first terminal was reported when monitoring that duplication operates Data;The data reported are corresponding with duplication operation;Pass through the second socket communication link broadcast data between second terminal;Extensively The data broadcast are used to indicate second terminal and after receiving the data update data to pasting boards.
Above-mentioned computer equipment is received first terminal and is existed by the first set of words communication link kept with first terminal Monitor the data corresponding with duplication operation reported when duplication operation.It is logical by the second socket between second terminal again Believe link broadcast data.Second terminal updates data to pasting boards after the data for receiving broadcast.It in this way can be actively by the The data broadcasting that one terminal reports initiates Asynchronous Request without second terminal, had both reduced local while having handled to second terminal The concurrent pressure of Asynchronous Request, and substantially increase second terminal and obtain the data chosen when first terminal execution duplication operation Efficiency, and then greatly improve user across screen duplication pasting data efficiency.
A kind of computer readable storage medium, is stored with computer program, real when which is executed by processor Existing following steps: the socket communication link between server is kept;Monitoring duplication operation;When monitoring duplication operation, obtain The data for taking duplication operation corresponding;By socket communication link, to server reported data;The data reported, for referring to Show that server passes through the socket communication link broadcast data that keep with terminal room;The data of broadcast are used to indicate terminal for data Update the pasting boards of terminal.
In one embodiment, computer program to go back processor execution following steps: the application for application of entering the Web page The page;Socket connection request is sent to server by application page;Socket connection request is used to indicate server and passes through Socket object word on server establishes socket communication link;Socket by socket communication link, on server Data are written in object.
In one embodiment, computer program to go back processor execution following steps: when monitoring duplication operation, Obtain the corresponding cursor position of duplication operation;By socket communication link, cursor position is reported to server;The light reported Cursor position is used to indicate server and passes through the socket communication link broadcast cursor position that keeps with terminal room;The cursor of broadcast Position is used to indicate terminal and updates the cursor in terminal at cursor position.
In one embodiment, the cursor position of broadcast be used to indicate terminal will be in terminal when monitoring paste operation Cursor update pastes at the updated position of cursor at cursor position, and by the data in pasting boards.
In one embodiment, computer program to go back processor execution following steps: regular check local pasting boards In data;When checking the data in local pasting boards and updating, then by socket communication link, on server Updated data in report ground pasting boards.
In one embodiment, computer program to go back processor execution following steps: when monitoring duplication operation, The document identification of document where obtaining data;By socket communication link, document identification is reported to server;The document reported Mark is used to indicate server and determines the terminal for participating in the collaborative editing of document corresponding to document identification;The data reported, are used for Indicate that server passes through the socket communication link broadcast data with the terminal room holding for determining participation collaborative editing.
In one embodiment, computer program to go back processor execution following steps: when monitoring duplication operation, Obtain the first corresponding user identifier of duplication operation;By socket communication link, the first user identifier is reported to server; The first user identifier reported is used to indicate server by leading to the socket for determining that the terminal room for participating in collaborative editing is kept Believe the first user identifier of link broadcast;First user identifier of broadcast is used to indicate terminal and is monitoring paste operation and first When user identifier second user mark corresponding with paste operation is consistent, the data in pasting boards are pasted.
Above-mentioned computer readable storage medium keeps the socket communication link between server, may make kimonos in this way Socket communication link between business device is successfully established by once authenticating, and is then persistently kept, in order to carry out repeatedly Data communication, it is convenient and efficient.When monitoring duplication operation, obtain the corresponding data of duplication operation, then by with server Between the socket communication link that keeps, the data of acquisition are reported to server.The server socket by being kept with terminal room again Data are updated the pasting boards to terminal by the data that the broadcast of word communication link reports to terminal, terminal.In this way, terminal is not necessarily to clothes Business device, which sends Asynchronous Request, can receive the data of server broadcast, and with the pasting boards of this more new terminal, can mitigate service The concurrent processing pressure of device, and efficiency of the user across screen duplication pasting data can be greatly improved.
A kind of computer readable storage medium, is stored with computer program, real when which is executed by processor Existing following steps: the socket communication link between server is kept;Server is received to be broadcasted by socket communication link Data;The data of broadcast, it is corresponding with the duplication operation that terminal monitoring arrives, be by terminal monitor duplication operation when by with Socket communication link between server reports to server;Data are updated to local pasting boards;It is grasped when monitoring to paste When making, the data in pasting boards are pasted.
In one embodiment, computer program to go back processor execution following steps: receiving server and passes through socket The cursor position that word communication link is broadcasted;Cursor is updated at cursor position;When monitoring paste operation, by pasting boards In data paste at the updated position of cursor.
In one embodiment, the terminal of reported data is to participate in the terminal of the collaborative editing of document;Computer program makes Processor must be gone back and execute following steps: receiving server and pass through the first user identifier that socket communication link is broadcasted;First User identifier is corresponding with duplication operation;When monitoring paste operation, the second user mark of triggering paste operation is obtained;Compare First user identifier and second user mark;When the first user identifier is consistent with second user mark, by the number in pasting boards According to being pasted.
In one embodiment, computer program to go back processor and executes following steps: when the first user identifier and the When two user identifiers are inconsistent, pasting data selection instruction is detected;Data corresponding with second user mark are chosen when detecting Pasting data selection instruction when, to server send carry second user identify data query instruction;Server is received to ring Data being fed back and corresponding with second user mark should be instructed in data query;The data that server is fed back carry out It pastes.
Above-mentioned computer readable storage medium keeps the socket communication link between server, may make kimonos in this way Socket communication link between business device is successfully established by once authenticating, and is then persistently kept, in order to carry out repeatedly Data communication, it is convenient and efficient.Receive server and pass through the data broadcasted of socket communication link, wherein the data broadcasted be by Terminal reports to server by the socket communication link between server when monitoring duplication operation.It in this way can nothing Asynchronous Request need to be sent to server can receive data by the active broadcast of server, convenient and efficient.Again more by data It is new to paste the data in pasting boards when monitoring paste operation to local pasting boards, server can be mitigated Concurrent processing pressure, and efficiency of the user across screen duplication pasting data can be greatly improved.
A kind of computer readable storage medium, is stored with computer program, real when which is executed by processor Existing following steps: first set of words communication link is kept with first terminal;By first set of words communication link, first is received eventually It holds in the data for monitoring to be reported when duplication operation;The data reported are corresponding with duplication operation;By between second terminal Second socket communication link broadcast data;The data of broadcast are used to indicate second terminal and after receiving the data update data To pasting boards.
Above-mentioned computer readable storage medium receives the by the first set of words communication link kept with first terminal One terminal is in the data corresponding with duplication operation for monitoring to be reported when duplication operation.Pass through second between second terminal again Socket communication link broadcast data.Second terminal updates data to pasting boards after the data for receiving broadcast.In this way may be used The data broadcasting that actively first terminal is reported initiates Asynchronous Request without second terminal, both reduces local to second terminal The concurrent pressure of Asynchronous Request is handled simultaneously, and is substantially increased selected when second terminal acquisition first terminal execution duplication operation In data efficiency, and then greatly improve user across screen duplication pasting data efficiency.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, provided herein Each embodiment used in any reference to memory, storage, database or other media, may each comprise non-volatile And/or volatile memory.Nonvolatile memory may include that read-only memory (ROM), programming ROM (PROM), electricity can be compiled Journey ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) directly RAM (RDRAM), straight Connect memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (15)

1. a kind of data copy method, which comprises
Keep the socket communication link between server;
Monitoring duplication operation;
When monitoring duplication operation, the corresponding data of the duplication operation are obtained;
By the socket communication link, Xiang Suoshu server reports the data;The data reported, are used to indicate institute It states server and passes through data described in the socket communication link broadcast that keeps with terminal room;The data of broadcast are used to indicate institute Terminal is stated by the pasting boards of data update to the terminal.
2. the method according to claim 1, wherein the method also includes:
It enters the Web page the application page of application;
Socket connection request is sent to server by the application page;The socket connection request, is used to indicate institute It states server and socket communication link is established by the socket object word on the server;
It is described by the socket communication link, Xiang Suoshu server reports the data to include:
By the socket communication link, the data are written in the socket object word on Xiang Suoshu server.
3. the method according to claim 1, wherein the method also includes:
When monitoring duplication operation, the corresponding cursor position of the duplication operation is obtained;
By the socket communication link, Xiang Suoshu server reports the cursor position;The cursor position reported is used In indicating that the server passes through cursor position described in the socket communication link broadcast that keeps with terminal room;The cursor position of broadcast Set be used to indicate the terminal by the terminal cursor update at the cursor position.
4. according to the method described in claim 3, it is characterized in that, the cursor position of the broadcast is used to indicate the terminal exists The cursor in the terminal is updated at the cursor position when monitoring paste operation, and will be described in the pasting boards Data paste at the updated position of the cursor.
5. the method according to claim 1, wherein the method also includes:
Data in the pasting boards of regular check local;
When checking the data in local pasting boards and updating, then
By the socket communication link, Xiang Suoshu server reports updated data in ground pasting boards.
6. the method according to claim 1, wherein the method also includes:
When monitoring duplication operation, the document identification of document where obtaining the data;
By the socket communication link, Xiang Suoshu server reports the document identification;The document identification reported is used In the terminal for indicating that the server determines the collaborative editing of document corresponding to the participation document identification;The number reported According to, be used to indicate the server pass through with determine participate in collaborative editing terminal room keep socket communication link broadcast institute State data.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
When monitoring duplication operation, the first corresponding user identifier of the duplication operation is obtained;
By the socket communication link, Xiang Suoshu server reports first user identifier;Described first reported is used Family mark, be used to indicate the server pass through with determine participate in collaborative editing terminal room keep socket communication link it is wide Broadcast first user identifier;Broadcast first user identifier be used to indicate the terminal monitor paste operation and When first user identifier second user mark corresponding with the paste operation is consistent, by the number in the pasting boards According to being pasted.
8. a kind of data method of attaching, which comprises
Keep the socket communication link between server;
Receive the data that the server is broadcasted by the socket communication link;The data of broadcast, are arrived with terminal monitoring Duplication operate and correspond to, be to be led to when monitoring that the duplication is operated by the socket between the server by the terminal Letter link reports to the server;
The data are updated to local pasting boards;
When monitoring paste operation, the data in the pasting boards are pasted.
9. according to the method described in claim 8, it is characterized in that, the method also includes:
Receive the cursor position that the server is broadcasted by the socket communication link;
Cursor is updated at the cursor position;
It is described when monitoring paste operation, the data in the pasting boards are pasted, comprising:
When monitoring paste operation, the data in the pasting boards are pasted at the updated position of the cursor.
10. according to the method described in claim 8, it is characterized in that, reporting the terminal of the data is to participate in the cooperation of document The terminal of editor;The method also includes:
Receive the first user identifier that the server is broadcasted by the socket communication link;First user identifier It is corresponding with the duplication operation;
It is described when monitoring paste operation, the data in the pasting boards are pasted, comprising:
When monitoring paste operation, the second user mark for triggering the paste operation is obtained;
Compare first user identifier and second user mark;
When first user identifier is consistent with second user mark, the data in the pasting boards are glued Patch.
11. according to the method described in claim 10, it is characterized in that, the method also includes:
When first user identifier and inconsistent second user mark, pasting data selection instruction is detected;
When detect choose the pasting data selection instruction that corresponding data are identified with the second user when, Xiang Suoshu server Send the data query instruction for carrying the second user mark;
Receive number that the server is fed back in response to data query instruction and corresponding with second user mark According to;
The data that the server is fed back are pasted.
12. a kind of data processing method, which comprises
First set of words communication link is kept with first terminal;
By the first set of words communication link, the first terminal is received in the number for monitoring to be reported when duplication operation According to;The data reported are corresponding with the duplication operation;
Pass through data described in the second socket communication link broadcast between second terminal;The data of broadcast are used to indicate institute Second terminal is stated after receiving the data to update the data to pasting boards.
13. a kind of data processing system, the system comprises:
First terminal, for the first set of words communication link between holding and server;When monitoring duplication operation, institute is obtained State the corresponding data of duplication operation;By the first set of words communication link, Xiang Suoshu server reports the data;
The server, the data reported for receiving the first terminal;Pass through second set between second terminal It connects word communication link and broadcasts the data;
The second terminal, the data broadcasted for receiving the server;The data are updated to local and are glued Pasting board;When monitoring paste operation, the data in the pasting boards are pasted.
14. a kind of data copy device, which is characterized in that described device includes:
Module is kept, for the socket communication link between holding and server;
Monitoring modular is operated for monitoring duplication;
Module is obtained, for when monitoring duplication operation, obtaining the corresponding data of the duplication operation;
Reporting module, for by the socket communication link, Xiang Suoshu server to report the data;The number reported According to being used to indicate the server and pass through data described in the socket communication link broadcast that keeps with terminal room;That broadcasts is described Data are used to indicate the terminal for the pasting boards of data update to the terminal.
15. a kind of computer equipment, including memory and processor, the memory is stored with computer program, the calculating When machine program is executed by the processor, so that the processor is executed such as any one of claims 1 to 12 the method Step.
CN201810316661.3A 2018-04-10 2018-04-10 Data copying method, data pasting method, data processing method and system Active CN110209504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810316661.3A CN110209504B (en) 2018-04-10 2018-04-10 Data copying method, data pasting method, data processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810316661.3A CN110209504B (en) 2018-04-10 2018-04-10 Data copying method, data pasting method, data processing method and system

Publications (2)

Publication Number Publication Date
CN110209504A true CN110209504A (en) 2019-09-06
CN110209504B CN110209504B (en) 2023-05-12

Family

ID=67779026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810316661.3A Active CN110209504B (en) 2018-04-10 2018-04-10 Data copying method, data pasting method, data processing method and system

Country Status (1)

Country Link
CN (1) CN110209504B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011022856A (en) * 2009-07-16 2011-02-03 Fujitsu Ltd Method, apparatus and program for coordinating web application
US20140025727A1 (en) * 2012-07-18 2014-01-23 Sentence Co., Ltd Synchronization server for clipboard and synchronization system for clipboard having the same
CN104243528A (en) * 2013-06-20 2014-12-24 腾讯科技(深圳)有限公司 Method and system for synchronously copying contents among multiple terminal devices
CN106325771A (en) * 2016-08-23 2017-01-11 惠州市拉维尼科技有限公司 Method for processing data of multiple terminals
CN106341455A (en) * 2016-08-23 2017-01-18 惠州市拉维尼科技有限公司 Copying and pasting method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011022856A (en) * 2009-07-16 2011-02-03 Fujitsu Ltd Method, apparatus and program for coordinating web application
US20140025727A1 (en) * 2012-07-18 2014-01-23 Sentence Co., Ltd Synchronization server for clipboard and synchronization system for clipboard having the same
CN104243528A (en) * 2013-06-20 2014-12-24 腾讯科技(深圳)有限公司 Method and system for synchronously copying contents among multiple terminal devices
CN106325771A (en) * 2016-08-23 2017-01-11 惠州市拉维尼科技有限公司 Method for processing data of multiple terminals
CN106341455A (en) * 2016-08-23 2017-01-18 惠州市拉维尼科技有限公司 Copying and pasting method

Also Published As

Publication number Publication date
CN110209504B (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN110875840B (en) Network element management method, device, system and storage medium
CN110209652A (en) Tables of data moving method, device, computer equipment and storage medium
CN112738791B (en) User information correlation backfill method, device, equipment and medium based on 5G core network
US20140372369A1 (en) Managing Changes to Shared Electronic Documents Using Change History
CN110365575A (en) Message information displaying method, processing method, storage medium and device
CN110413261A (en) A kind of configuration method and equipment of direct broadcast function module
CN104216787A (en) Method, device and system for synchronizing clipboards between terminal equipment
CN104348848A (en) Method, terminal equipment and server for managing pictures
CN111880858A (en) Document processing and instant messaging method, device, electronic equipment and storage medium
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
CN110209504A (en) Data copy method, data method of attaching, data processing method and system
CN111461659A (en) Personal contract business processing method, device, medium and equipment based on big data
CN110619513A (en) Electronic resource obtaining method, electronic resource distributing method and related equipment
CN109902025A (en) Test environment Chinese part processing method, device, storage medium and computer equipment
CN111147586B (en) Equipment end control method and device and conference system
CN113468260B (en) Data analysis method and device, electronic equipment and storage medium
CN104516883A (en) Webpage sharing method, device and system
CN112100534A (en) Information processing method, device, medium and electronic equipment in page sharing
CN107609008A (en) A kind of data importing device and method from relevant database to Kafka based on Apache Sqoop
CN114900569B (en) Test script acquisition method and device
CN117150169B (en) Multi-browser UI automatic recording method, system, equipment and medium
CN117155890B (en) Method and device for processing applet message and electronic equipment
CN112306337B (en) Conference same screen system, method and device, computer equipment and storage medium
CN108111521A (en) Sound-box device and the correlating method of music software account
CN112165406B (en) Interface message testing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant