1. Technical Field
Embodiments of the present disclosure relate to network cooperation technology, and particularly to a computing device and a cooperative drawing method of the computing device.
2. Description of Related Art
For fun or business, users sometimes team up to draw a picture together using different client computers via a network. However, the picture may be huge, resulting in the picture not being able to be displayed in real-time.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
In general, the word “module”, as used herein, refers to logic embodied in computing or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or computing modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
In the embodiment, the computing device 10 further includes a storage system 14 and at least one processor 15. The storage system 14 may be a dedicated memory, such as an EPROM, a hard disk drive, or flash memory. In some embodiments, the storage system 14 may be an external storage device, such as an external hard disk, a storage card, or a data storage medium.
In step S301, the creation module 200 creates a new picture and a drawing group, and determines client computers 12 that join the drawing group. In one embodiment, a client computer 12 may send a membership request for joining the drawing group to the computing device 10. The creation module 200 examines the membership request to determine whether the membership request is approvable. If the membership request is approved by the creation module 200, the client computer 12 becomes a member of the drawing group. The membership request may include a user ID, a request time, and an IP address of the client computer 12. The creation module 200 may examine the membership request according to the user ID of the client computer 12.
In step S302, the creation module 200 checks whether the client computers 12 in the drawing group are offline for a predetermined period of time. If any of the client computers 12 in the drawing group are offline for the predetermined period of time, the creation module 200 drops the client computer 12 from the drawing group.
In step S303, the assignment module 210 receives a drawing request from one of the client computers 12 in the drawing group, and assigns a control right and a drawing region of the picture to the client computer 12. In one embodiment, the assignment module 210 assigns the control right to only one client computer 13 in the drawing group at the same time. The assignment module 210 may notify a drawing manager to examine the drawing request and approve or reject the drawing request. The picture may be divided into a plurality of non-overlapping drawing regions by the assignment module 210, each of which is assigned to a unique client computer 12 in the drawing group.
In step S304, the generation module 220 allocates the picture to the client computer 12 having the control right, and generates drawing codes according to changes to the picture. The client computer 12 having the control right may add new content to the picture, delete content from the picture, or modify content in the picture. In one embodiment, the generation module 220 may provide various drawing tools for the client computer 12 having the control right to draw on the picture. For example, the generation module 220 provides shape tools, e.g. a rectangular tool and a circle tool, to draw different shapes in the picture. The generation module 220 may further provide operation tools, e.g. a rotation tool, to operate on the shapes in the picture.
In step S305, the transfer module 230 transfers the drawing codes to the client computers 12 in the drawing group. According to the drawing codes, the client computers 12 in the drawing group generate the picture and display the picture on display devices (not shown) connected to the client computers 12. The drawing codes may be smaller than the picture. Therefore, less data transfer between the computing device 10 and the client computers 12 is achieved. In one embodiment, the transfer module 230 transfers a part of the drawing codes that correspond to the changes of the picture to the client computers 12 in the drawing group.
In step S306, the storage module 240 stores the picture into the storage system 14. In one embodiment, the storage module 240 may notify the client computers 12 in the drawing group to approve or reject the changes to the picture. In one example, if most of the client computers 12 in the drawing group approve the changes to the picture, the picture is stored in the storage system 14.
In step S307, the communication module 250 provides a communication function for the client computers 12 in the drawing group to discuss the picture. In one embodiment, the communication module 250 supports the client computers 12 to transfer text, audio, and video information.
Although certain inventive embodiments of the present disclosure have been specifically described, the present disclosure is not to be construed as being limited thereto. Various changes or modifications may be made to the present disclosure without departing from the scope and spirit of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
2012101613530 | May 2012 | CN | national |