CN108961348A - Instant picture exchange method based on object-oriented - Google Patents
Instant picture exchange method based on object-oriented Download PDFInfo
- Publication number
- CN108961348A CN108961348A CN201810594056.2A CN201810594056A CN108961348A CN 108961348 A CN108961348 A CN 108961348A CN 201810594056 A CN201810594056 A CN 201810594056A CN 108961348 A CN108961348 A CN 108961348A
- Authority
- CN
- China
- Prior art keywords
- data
- drawing object
- attribute
- image
- title
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000004048 modification Effects 0.000 claims abstract description 24
- 238000012986 modification Methods 0.000 claims abstract description 24
- 230000005540 biological transmission Effects 0.000 claims abstract description 20
- 230000015654 memory Effects 0.000 claims description 54
- 230000033001 locomotion Effects 0.000 claims description 17
- 230000008859 change Effects 0.000 claims description 11
- 230000009471 action Effects 0.000 claims description 8
- 238000012217 deletion Methods 0.000 claims description 6
- 230000037430 deletion Effects 0.000 claims description 6
- 241001269238 Data Species 0.000 claims description 5
- 238000000605 extraction Methods 0.000 claims description 5
- 238000012856 packing Methods 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 238000010009 beating Methods 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 description 15
- 230000003993 interaction Effects 0.000 description 11
- 230000008569 process Effects 0.000 description 7
- 241000406668 Loxodonta cyclotis Species 0.000 description 6
- 230000002452 interceptive effect Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 239000011248 coating agent Substances 0.000 description 1
- 238000000576 coating method Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 239000003973 paint Substances 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/001—Texturing; Colouring; Generation of texture or colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Abstract
A kind of instant picture exchange method based on object-oriented, firstly, the fundamental type of the pre-defined object of being drawn;Then, during drawing and image transmitting, it is all to be recorded and transmitted using the object in image as unit, to, it can be realized when object is transferred to the other end, user can carry out the attribute modification of instantaneity to the object in image completely, and the Drawing Object of this modification is traveled back or be transferred to again other terminals, to realize the exchange and interdynamic of picture truly.This method application is simple, and applied widely, instant performance is strong, and improves the safety of network data transmission.
Description
Technical field
The present invention relates to a kind of instant picture exchange methods, more particularly, to a kind of instant picture based on object-oriented
Figure exchange method.
Background technique
In the mode of person to person's exchange, in addition to voice, outside the exchanging of text and expression, drawing is also one essential
Mode.Especially when people discuss challenge face-to-face, often a people has described in words for a long time,
Other side can not be well understood by, but by simply drawing, and can give expression to what the logical relation of challenge will be apparent that
Come, in this way, other side can also be well understood by.Even if other side has different opinions, he can also on the basis of the figure drawn,
It makes corresponding changes, to express oneself different opinions.In this way, the thought for understanding other side that both sides can will be apparent that.
Currently, there are the text of many instantaneities and the communication software of voice and technology in the market, however, but without instantaneity
Picture communication software or technology.Currently, there are some network drawing softwares, there is the ability of unidirectional picture transmission.It is so-called
Unidirectionally, i.e., can be for transmission to the end B from the image drawn at the end A, however data have arrived the end B, the user at the end B can not be immediately
Change each attribute of Drawing Object transmitted from the end A, i.e., the figure pair that change that cannot be whole is transmitted from the end A
The displacement of elephant or color etc..The realization of this technology, only drawn pixel record and transmission, that is simple biography
Defeated pixel, rather than as record and transmitted using drawn things as object one by one.So such technology can only
It is once an objects draw is complete, either Local or Remote is difficult to its further operating.Exactly because also in this way, any
The user of one end can only change certain pixels on image, if it is desired to certain objects in image are carried out with the modification of instantaneity,
It is impossible.It therefore, is unidirectional transmission to the object in drawn image, without realizing to any right in image
The attribute of elephant is changed to form interaction, so, these technologies can't be the picture interaction of real meaning.
In addition, under existing technical conditions, one can be passed through if the picture interaction of certain instantaneities have to be realized
Client allows another client remote to log on on his computer, and shares his operating right, to make long-range
Client carries out picture with the personnel of the computer on this computer and exchanges.But this has Railway Project:
Transmitted data amount is very big: because this two computers shares screen, what is transmitted is the entire screen of each frame
Pixel can reach several hundred million transmission quantity for one minute.
It is dangerous to share same permission: because local terminal needs to give the same permission of Telnet terminal, remotely
Terminal can carry out any operation to local, then this there is potential danger.
Even if can draw under same picture frame, because, once an object paints, being difficult by Object Operations
Corresponding attribute modification is carried out to the object again, causes this interactive function imperfect.
It cannot be carried out between desktop computer and portable mobile terminal (such as mobile phone, various pad).
Summary of the invention
In view of the above problems, the invention proposes a kind of instant picture exchange method based on object-oriented, jump
Traditional image thinking logic is gone out, has not been drawn using pixel as basic unit, using the object of drawn image as base
This unit.Firstly, the fundamental type of the pre-defined object of being drawn;Then, during drawing and image transmitting, all it is
It is recorded and transmitted using the object in image as unit, thus, it is possible to realize when object is transferred to the other end, user
The whole attribute modification of instantaneity can be carried out to the object in image completely, and the Drawing Object of this modification is transmitted again
Go back or be transferred to other terminals, to realize the exchange and interdynamic of picture truly, this be also be different from it is existing
Software or technology key.The technology is not only limited to the interaction of two terminals, but can apply in the same of multiple terminals
When interaction.It is by taking the interaction of two terminals as an example in next technical description.The interaction of multiple terminals and two terminals
Interaction as, only Simultaneous Transmission of Data to a number of other terminals.
To achieve the goals above, the technical solution that the invention uses are as follows: the instant picture based on object-oriented
Figure exchange method, which is characterized in that using drawn image object as basic unit, the steps include:
1) it pre-defines: in each terminal, pre-defining image object type, in the type of definition, including definition
The essential attribute of object;
2) terminal user, which draws, operates: terminal user needs first to select a type, then when drawing new image object
Specific object is drawn in the picture;
3) Drawing Object title generates: in whole image, when a new Drawing Object generates, title generator is given
The object one unique title is stored;In native object reservoir, by all objects with the data structure of hash
Form storage, with the name of Drawing Object be referred to as index be used to inquire, it is each index it is corresponding be the Drawing Object basic category
Property;
4) it updates local Drawing Object memory: a Drawing Object reservoir is equipped in local part, in Drawing Object
The data that other terminal transmissions come in the object data and network locally generated are stored in reservoir;When the operation in step 2)
When completion, generated object data is stored and updated in memory;
5) it data packet: after operation more than completion, needs the movement to operation and is carried out accordingly by operation Drawing Object
Data are packaged, and include all master datas of image object in a data packet;By data packet, by local operation and grasped
The attribute change of the object of work transmits other terminals;After receiving end is unpacked, replicates same operational motion and operated
Object and its attribute various change, the information in Drawing Object memory is updated;
6) it regenerates Drawing Object: being the data in receiving end according to data packet, rebuild Drawing Object and operation
Movement;
7) local Drawing Object memory is updated;Each terminal is according to the data packet received, according to what is be reconstructed
The title and operational motion of Drawing Object are updated local image object reservoir;
8) client display Drawing Object: refreshed image area is being received, by the Drawing Object harness transmitted in image
In region.
In the step 1), image object type is made of one or more of geometric figures.
In step 1), the essential attribute of Drawing Object includes and does not comprise only Drawing Object: position, size, color,
Line weight.
In the step 2), graphic operation type: specifically including 2.1), 2.2) He 2.3) three types, and user's is every
When secondary operation Drawing Object is packaged by data, corresponding data type is write into data packet:
2.1) new images object: the user of a terminal is drawn, selects a graph style first, is then drawn in drawing area
Specific Drawing Object out;After object is finished, it is determined that the Drawing Object specific object value;In this way, the object is with these
The form of attribute value is saved in the picture;
2.2) it modifies Drawing Object: after selecting one or several objects, its attribute can be changed, after modification, repaired
The Drawing Object changed is saved in the picture with the attribute value being updated;
2.3) Delete Shape object: after for selecting the Drawing Object in one or several images, deleting it,
Corresponding Drawing Object just disappears in the picture;The movement is recorded, and when beating data packet, the title of the object of deletion is beaten
Packet, is transferred to other clients more new images.
The specific update method that the step 4) updates local Drawing Object memory is as follows:
4.1) it is directed to step 2.1): having drawn new graph image, a new object oriented is first generated by title generator,
The title generator guarantees that the title generated will not be repeated with the title of existing data object, then, with the entitled index,
Whole attribute datas of the object are stored in local Drawing Object memory;
4.2) it is directed to step 2.2): existing object in more new images, according to the title of the object, in local Drawing Object
The object is found in memory, then, updates the attribute of the object in memory;If searched less than reporting an error;
4.3) it is directed to step 2.3): deleting some object in image, first looked into the memory according to the title of object
The object is found, then deletes the object and its index name in memory;If searched less than reporting an error.
Data packet in the step 5) is made of following data block:
5.1) object oriented: the title of current drawn or selected Drawing Object, no matter how developer defines figure
Type has to include object oriented, otherwise, inquiry of having no idea the object that is operated;
5.2) operation object type: operation includes three types: drawing new Drawing Object;Modify existing Drawing Object;It deletes
Except existing Drawing Object;
5.3) graphic object type;
5.4) it modifies operation object type: being served only for the action type of modification existing graphics object, it is specially following
Type: selecting object cancels selecting object, and attribute modification does not operate;When operation object type is not modification Drawing Object
When, which is sky;
5.5) Drawing Object attribute value: if drawing new Drawing Object when the graphic operation, this data block will include new right
The all properties data of elephant;If the graphic operation is to update image object, which can only include the figure pair
As the part attribute for needing to update, it also may include whole attribute values of the object in object memories;If it is deletion
Action type, the part can be sky.
When the data packet is transferred to any one other terminal, firstly, it will go into a data packet
Memory in, wait in line to handle herein according to sequencing;And when the thread free time of unpacking, data packet of arriving storage
In device, each data packet in memory is handled in order.
The data packet is parsed by resolve packet device, and resolve packet device is responsible for from packet memory
According to existing sequence, extraction data packet one by one is simultaneously unpacked, and when extraction, need to extract include in data packet all basic
Data content.
In step 6) specifically: after the completion of step point 5) step, the value in each data block in data packet is all extracted
Out, the attribute value of operational motion and the Drawing Object operated is also all extracted, and does following work according to action type:
9.1) construct new Drawing Object: if it is building row image object, first have to search new object title whether
The terminal exists, if it does, reporting an error;If it does not exist, then constructing new Drawing Object according to attribute.
9.2) update Drawing Object: likewise, the title for first having to search the object whether there is, the title is in the terminal
In the presence of updating the attribute of the Drawing Object;Otherwise, it reports an error.
9.3) Delete Shape object: the title for first having to search the object whether there is, which exists, and delete in this terminal
Except the object;Otherwise, it reports an error.
The invention has the benefit that
1) object unit of image constructed by: in any one terminal because using this method construct image be with
Drawing Object is basic unit, therefore does not need any image segmentation and carry out segmented image to extract certain contents in image.
On the contrary, any object that user can directly choose in image is combined, the operation such as modification.This is provided for the editor of image
Great flexibility and convenience.
2) interactivity: exactly because transmission is object in image rather than pixel, this make in a network user it
Between the interactive operation of the object in same image is possibly realized.The Drawing Object that any one user draws is transferred to other visitors
Behind the end of family, the user of client can be controlled, and modify and delete these objects, so that it is flat in a network to reach multiple users
The purpose of the image interaction of real meaning is realized on platform.
3) transmitted data amount is small: because transmission is object's property value, rather than all pixels, and for most
The data volume of several object's property values is all the data volume of the occupied pixel value on far smaller than corresponding image, because
This, the data of transmission significantly reduce, so that the requirement to bandwidth be greatly reduced, and will not influence the quality of image.
4) instantaneity: because the data volume of transmission is small, even if the mode with video or the other computers of Telnet is compared,
The time delay of this technology wants small, and instantaneity is very strong.
5) draw and transmit the diversity and scalability of image: because wanting the different object types to be drawn can root
According to the requirement definition of user, therefore, the type of object has diversity and scalability.
6) this technology can not merely can be applied on 3-D image using on 2d.
7) safety: because the only operation object in transmission image, may be not present the problem of sharing local operation permission,
So substantially increasing safety merely for this technology.
8) it cross-platform interchange: as long as developing corresponding software in corresponding operation system application this technology, and accesses same
One server, and corresponding software is installed in local terminal, so that it may realize in kinds of platform (either desktop computer, also
It is mobile phone or pad, the embedded device even customized) while interaction.
Detailed description of the invention
Fig. 1: transmitting terminal flow chart of data processing schematic diagram.
Fig. 2: receiving end flow chart of data processing schematic diagram
Fig. 3: the required master data schematic diagram for including of data packet.
The rough schematic view of Fig. 4: two terminal networks interaction
Specific embodiment
1) it defines object type: in each terminal, there is a type of Drawing Object predetermined, such as straight line, curve,
Rectangle, circle etc..In these types, the essential attribute including defining object, such as: position, size, color, line weight
Deng.These graphic object types are defined by developer, these types, can also be with either some basic graph styles
It is graph style complicated made of certain type combinations.The user of terminal is when drawing new Drawing Object, it is necessary first to select
Then one type can just draw specific object in the picture.During receiving data packet, it is also desirable to according to object
Type rebuilds or updates Drawing Object according to the attribute of object in receiving end to unpack.Further amplification, photo, text
Part, even video also can be seen as an object, they can be loaded into certain fundamental figures above-mentioned (such as
Rectangle) in, some operations cited below are then carried out as object using the rectangle of this load photo or file or video.Rear
The illustration part in face, has and is described in more detail.
In addition, currently have many technologies that can extract various image from photo, then the object extracted,
It can be seen as to be transmitted and be operated object.
Because define object type realizes how to define some basic objects and do not exist in many drawing softwares already
In the range of present patent application protection.Here statement is since it is desired that the step.
2) graphic operation type: following three kinds of operations are the action type to image object, each operation figure of user
When object is packaged by data, corresponding data type require to write into data packet (with reference to attached drawing 1 data packet it is basic
Definition).Here it is the specific descriptions operated to it:
2.1) new images object: the user of a terminal is drawn, selects a graph style first, is then drawn in drawing area
Specific Drawing Object out.After object is finished, which is also determined that, in this way, the object is with this
The form of a little attribute values is saved in the picture, rather than using the pixel value that the object is occupied in the picture as conservation object
's.Therefore, a Drawing Object is possible to how much unrelated the pixel occupied with it is, and how the type for being primarily to see the object is
Definition.
2.2) modify Drawing Object: because image is saved as unit of Drawing Object, user can be non-
Any existing Drawing Object is often easily chosen in the picture.After selecting one or several objects, user can be modified
Their attribute, for example, changing their positions or color in the picture, the thickness etc. of lines.After modification, modified
Drawing Object just saved in the picture with the attribute value being updated.
2.3) it Delete Shape object: likewise, after with the Drawing Object in one or several images is selected, can delete
It (s), in this way, corresponding Drawing Object just disappears in the picture.But the movement can be recorded, to beat data packet
When, the title of the object of deletion is packaged, other clients more new images are transferred to.
3) it Drawing Object title generator: in order to which the Drawing Object in image easily identifies and inquires, is next introducing
Native object memory in, all objects be in the form of the data structure of hash store, i.e., with the name of Drawing Object
Referred to as index be used to inquire, it is each index it is corresponding be the Drawing Object each attribute.Therefore, in entire image, appoint
The title of what Drawing Object is cannot be duplicate.The effect of Drawing Object title generator is ensuring that generation is unduplicated
Object oriented, when a new Drawing Object generates, which distributes to its unique title to store.
4) local Drawing Object memory is updated: as soon as software has a Drawing Object memory in local part, effect
It is the data for storing Drawing Object all in image.This includes the object data being locally generated, also include from network its
The data that its terminal transmission comes.The data structure of storage is hash structure, when any one operation in second step is completed
When, the data of produced or modification object properties will update in this object memories, specific update method
It is:
4.1) if it is new graph image (step 2.1) has been drawn, a new object name is first generated by title generator
Claim, which guarantees that the title generated will not be repeated with the title of existing data object, then, with the entitled rope
Draw, stores whole attribute datas of the object in local Drawing Object memory;
4.2) if it is object (step 2.2) existing in more new images, according to the title of the object, in local figure pair
As finding the object in memory, then, the attribute of the object is updated in memory;If searched less than program needs
It reports an error.
4.3) it if it is some the object (step 2.3) deleted in image, also needs in the present memory according to right
The title of elephant finds the object, then deletes the object and its index name in memory;If searched less than journey
Sequence reports an error.
5) generate data packet: after 1 or several operations are completed in the operation of above 2-4 step, software is needed to operation
Movement and the Drawing Object operated accordingly carry out data packet packing.Fig. 2 defines a kind of the required of data packet
Master data.The effect of data packet is exactly to transmit the attribute change of local operation and the object operated, to other networks
Terminal.To which each of same operational motion and the object operated and its attribute can be replicated after the unpacking of other terminals
Kind variation.Data packet is mainly by following data chunk at specific as shown in Figure 3:
5.1) object oriented: the title of current drawn or selected Drawing Object.No matter how fixed developer is
Adopted graph style has to include object oriented.Otherwise, have no idea inquiry the object that is operated.
5.2) operation object type: operation includes three types: drawing new Drawing Object;Modify existing Drawing Object;It deletes
Except existing Drawing Object.
5.3) graphic object type: if operation object type is the new Drawing Object of picture, which kind of this definition data block draws
Graph style has specifically illustrated the graph style what is definition in the definition object type of step 1.
5.4) it modifies operation object type: being served only for the action type of modification existing graphics object.It can have following several
A type: selecting object cancels selecting object, and attribute modification does not operate.When operation object type is not modification Drawing Object
When, which can be for sky.
5.5) Drawing Object attribute value: if drawing new Drawing Object when the graphic operation, this data block will include new right
The all properties data of elephant.If the graphic operation is to update image object, which can only include the figure pair
As the part attribute for needing to update;It can certainly include to remove whole attribute values of the object in object memories,
Depending on this is depending on the software designer the case where.If it is delete operation type, which can be sky.
6) data packet is transmitted: after the completion of data packet is packaged, so that it may go out from the client transmissions.Transmission can be passed directly
It is defeated to arrive other clients, or server-client form is used, it is first transferred to server, is then distributed to again by server
Other clients.Fig. 1, that is, building process data packet of drawing are exactly the process of vivider expression step 1-6.
7) packet memory of client: first when a data coating is transferred to any one other terminal
First, it will go into the memory of a data packet, wait in line to handle herein according to sequencing.The purpose done so
It is: saves any data packet not being depacketized transmitted, prevent loss of data.When a data packet reaches a terminal
When, the unpacking thread of this terminal is possible to handling a data packet, or carries out some local other calculating, and
There is no time-triggered protocol to be just communicated through the data packet come.There is such a packet memory, is just transmitted to save
Data, and after the thread unpacked finishes current calculating, then each data packet in memory is handled in order.This can also be protected
The sequence for demonstrate,proving the data transmitted is correct.
8) resolve packet device: resolve packet device is responsible for the extraction data packet from packet memory one by one simultaneously
It unpacks, extracts the data of the packet.For each data packet, unpacking is exactly according to step 5, the basic number for being included in data packet
It is all extracted according to content.
9) regenerate Drawing Object: after the completion of step 8, the value in each data block in data packet is all extracted
Come, in this way, the attribute value of operational motion (step 2) and the Drawing Object operated is also all extracted, according to action type
It does and works:
9.1) construct new Drawing Object: if it is building row image object, first have to search new object title whether
The terminal exists, if it is present reporting an error;If it does not exist, then constructing new Drawing Object according to attribute.
9.2) Drawing Object is updated: likewise, the title for first having to search the object whether there is, different from a, only
With the presence of the title in the terminal, the attribute of the Drawing Object could be updated, otherwise, to be reported an error.
9.3) Delete Shape object: similar with upper step 9.2, the title for first having to search the object whether there is, and only should
In the presence of object, just in this terminal deletion object, otherwise to report an error.
10) update local Drawing Object memory: just as introducing in step 5, each client has this map
Shape object memories, according to the title and operational motion of the Drawing Object being reconstructed, need after the completion of step 9
Drawing Object and its attribute are updated in the local storage of the terminal.The method of update in step 4 as with introducing, herein
Just it is not repeated.
11) Drawing Object is shown in reception client: after the completion of above step, program updating image district, then by passing
The defeated Drawing Object to come will be shown in the image area, if it is object is deleted, then the object will be in image-region
In be deleted.Fig. 2 then more intuitively describes the process of step 7~11.
Embodiment 1:
1) for more specific description this technology, as shown in figure 4, below by taking two terminals in a network as an example, description
The process of image interactive exchange is carried out using the technology.In practical applications, exchange can be interacted simultaneously with multiple terminals.
In terminal A, user has selected rectangle type, has then drawn a rectangle with mouse at picture interface, specific to belong to
Property is as follows:
Title: A_Rectangle1 (is generated) by image object title generator
Coordinate: top left corner apex: (10,10), bottom right angular vertex: (210,180)
Frame line: solid line;Thickness: 2pt;Color: black
Whether color fills whole rectangles: being
From above object properties, it can be appreciated that the size of the rectangle is: long 200, wide by 170, the centre of rectangle is all
It is filled black.Although the rectangle occupies 200*170=34000 pixel in the picture, in one 64 computers
On, by above definition, occupied space is probably the rectangular object in memory: 16 (title, character string)+2*2*4 (are sat
Mark, int type)+4 (frame line type, int type)+4 (thickness type, int type)+16 (color, int type)+1 (whether
Filling, boolean type)=57 bytes (for c++ programming language).That is, if being passed according to traditional image
Defeated method, even only transmitting changed pixel, the operation valid data to be transmitted also want 34000*16=
544000 bytes, the i.e. data volume of 544k, and apply this patent, it is only necessary to transmit general 57 effective bytes, it is seen then that work as biography
When the customized graph style of defeated user, this patent improves efficiency of transmission up to up to ten thousand times.
2) when user constructs that above rectangle with mouse, corresponding attribute is stored in local object and deposits
In reservoir, index is the title A_Rectangle1 as caused by title generator.If later user wants modification, this is right
Any attribute of elephant according to the coordinate of mouse and is somebody's turn to do as long as user clicks any position in the rectangle with mouse in the picture
The coordinate (being defined by the upper left corner and the lower right corner) of rectangle passes through the object memories of local figure, so that it may the object is inquired,
To choose the object.
3) after user completes to create the rectangular operation at the end A, according in the rectangle, in the data of object memories, program is just
Data packing can be carried out to the object.It is packaged and the master data for including is needed to follow the step 5 in Implementation Technology part
Introduction.Herein, the master data of the data packet is as follows: object oriented: A_Rectangle1;Operation object type: creation
New object;Predefined graph style: rectangle;Modify operation object type: empty;Drawing Object attribute value: it is deposited in local object
All data of the object, i.e., the data of the rectangle in step 1 in reservoir.
4) after being packaged, which just passes through network, is transferred to other terminals, is in this example the end B.
After the data packet reaches B terminal, initially enters in packet memory and be lined up.The data for arriving first the end come
Before, after that arrives afterwards comes.
5) after resolve packet device mentions the rectangle data packet from packet memory, it is unpacked, is extracted
The data of the packet.
6) after extracting data, first according to information such as operation object type and data attributes, the rectangle pair is rebuild
As, and be stored in the local Drawing Object memory at the end B.
7) graphical interfaces finally at the end B shows the new rectangular graph.
It 8) is user more than in the new rectangular object of the end A picture, process of the instantaneous transmission to the end B.Next proceed to be with this
Example, it is further to operate.
9) at this point, if the end B has shown that the rectangle drawn by A end subscriber, at this moment, if B end subscriber is wanted to modify the square
Shape object, according to the explanation of step 2, after selecting the object, which can change each attribute in addition to title, such as:
Change the rectangle position (can with mouse in tow the rectangular object to new position), for example new position is: the upper left corner is
(50,25) are moved to the left 40 pixels then the coordinate in the lower right corner is exactly (250,195), move down 15 pixels.
10) in this way, being similar to step 3, the attribute (i.e. coordinate) that the end B only needs the rectangle to be modified here is packaged i.e.
Can, specifically: object oriented: A_Rectangle1;Operation object type: existing Drawing Object is modified;Predefined graphics class
Type: rectangle;Modify operation object type: attribute modification;Drawing Object attribute value: coordinate: the upper left corner (50,25), the lower right corner
(250,195).
11) the step of following step is with 4-6 is identical, is only transferred to the end A from the end B.
12) at the end A after resolve packet device extracts the data of the packet, first according to the title A_ of the data
Rectangle1, searching the object in the native object memory at the end A whether there is.If it is present being replaced with new coordinate
Change coordinate value of the object in object memories;Otherwise, if not finding the object name, program will report mistake, simultaneously
The data packet will also be abandoned.
13) after update in the object memories at the end A when data, finally in user images interface more new images.In this way, this
It is achieved that B end subscriber modifies the image object, and the content transmission of the instant modification is to the end A.
The step of above 1-13 is exactly the building of two clients and the modification object of primary simple but complete instantaneity
Process, a process, the two clients realize the purpose that application image carries out the interactive exchange of instantaneity in this way.When
So, the predefined graphic object type of application definition is abundanter, and the attribute of each object is more specific, then providing for user
Function selection it is more, it is such exchange it is more excellent.
Claims (9)
1. the instant picture exchange method based on object-oriented, which is characterized in that using drawn image object as basic
Unit the steps include:
1) it pre-defines: in each terminal, pre-defining image object type, in the type of definition, including define object
Essential attribute;
2) terminal user, which draws, operates: terminal user needs first to select a type, then scheme when drawing new image object
Specific object is drawn as in;
3) Drawing Object title generates: in whole image, when a new Drawing Object generates, title generator can generate one
A unique title is simultaneously distributed to the object and is stored;In native object reservoir, by all objects with hash
Data structure form storage, with the name of Drawing Object be referred to as index be used to inquire, it is each index it is corresponding be the figure pair
As and including its whole attribute;
4) it updates local Drawing Object memory: being equipped with a Drawing Object reservoir in local part, stored in Drawing Object
The object data that other terminal transmissions come in the object data and network locally generated is stored in device;When the operation in step 2)
When completion, generated object data is stored and updated in memory;
5) it data packet: after operation more than completion, needs the movement to operation and data is carried out by operation Drawing Object accordingly
It is packaged, includes all master datas of image object in a data packet;By data packet, by local operation and operated
The attribute change of object transmits other terminals;Receiving end unpack after, replicate same operational motion and the object operated and
The various change of its attribute is updated the information in Drawing Object memory;
6) regenerate Drawing Object: the data in receiving end according to data packet rebuild Drawing Object and operational motion;
7) local Drawing Object memory is updated;In receiving end according to the title and operational motion of the Drawing Object being reconstructed
Local image object reservoir is updated;
8) receiving client display Drawing Object: refreshed image area shows the Drawing Object of update in the image area.
2. the instant picture exchange method according to claim 1 based on object-oriented, it is characterised in that: described
In step 1), image object type is made of one or more of geometric figures.
3. the instant picture exchange method according to claim 1 based on object-oriented, it is characterised in that: step 1)
In, the essential attribute of Drawing Object includes and does not comprise only Drawing Object: position, size, color, line weight.
4. the instant picture exchange method according to claim 1 based on object-oriented, it is characterised in that: described
In step 2), graphic operation type: 2.1), 2.2) He 2.3) three types, each operation Drawing Object of user are specifically included
When packing by data, corresponding data type is write into data packet:
2.1) new images object: the user of a terminal is drawn, a graph style is selected first, then draws tool in drawing area
The Drawing Object of body;After object is finished, it is determined that the Drawing Object specific object value;In this way, the object is with these attributes
The form of value is saved in the picture;
2.2) it modifies Drawing Object: after selecting one or several objects, their attribute can be changed, after modification, modified
Drawing Object saved in the picture with the attribute value being updated;
2.3) Delete Shape object: after for selecting the Drawing Object in one or several images, deleting it, corresponding
Drawing Object in the picture just disappear;The movement is recorded, and when beating data packet, the title of the object of deletion is packaged, is passed
It is defeated to arrive other clients more new images.
5. the instant picture exchange method according to claim 4 based on object-oriented, it is characterised in that: described
The specific update method that step 4) updates local Drawing Object memory is as follows:
4.1) it is directed to step 2.1): having drawn new graph image, a new object oriented, the name are first generated by title generator
Generator is claimed to guarantee that the title generated will not be repeated with the title of existing data object, then, with the entitled index, storage
Whole attribute datas of the object are in local Drawing Object memory;
4.2) it is directed to step 2.2): existing object in more new images, according to the title of the object, is stored in local Drawing Object
The object is found in device, then, updates the attribute of the object in memory;If searched less than reporting an error;
4.3) be directed to step 2.3): some object deleted in image is looked into according to the title of object in native object memory
The object is found, then deletes the object and its index name in memory;If searched less than reporting an error.
6. the instant picture exchange method according to claim 1 based on object-oriented, it is characterised in that: described
Data packet in step 5) includes following data block:
5.1) object oriented: the title of current drawn or selected Drawing Object, no matter how developer defines graphics class
Type has to include object oriented, otherwise, inquiry of having no idea the object that is operated;
5.2) operation object type: operation includes three types: drawing new Drawing Object;Modify existing Drawing Object;It deletes
Some Drawing Objects;
5.3) graphic object type: the graphic object type being defined by the user;
5.4) it modifies operation object type: being served only for the action type of modification existing graphics object, including and be not limited only to following
Several types: selecting object cancels selecting object, and attribute modification does not operate;When operation object type is not modification figure pair
As when, the part be sky;
5.5) Drawing Object attribute value: if drawing new Drawing Object when the graphic operation, this data block will include new object
All properties data;If the graphic operation is to update image object, which can only include the Drawing Object and need
The part attribute to be updated also may include whole attribute values of the object in object memories;If it is delete operation
Type, the part can be sky.
7. the instant picture exchange method according to claim 1 based on object-oriented, it is characterised in that: described
When data packet is transferred to any one other terminal, firstly, it will go into the memory of a data packet, according to
Sequencing is waited in line to handle herein;And when the thread free time of unpacking, in packet memory of arriving, handle in order
Each data packet in memory.
8. the instant picture exchange method according to claim 1 based on object-oriented, it is characterised in that: described
Data packet is parsed by resolve packet device, and resolve packet device is responsible for from packet memory according to existing sequence,
Extraction data packet one by one simultaneously unpacks, and when extraction, need to extract all data contents for including in data packet.
9. the instant picture exchange method according to claim 1 based on object-oriented, it is characterised in that: step 6)
In specifically: after the completion of step point 5) step, the value in each data block in receiving end, data packet is all extracted,
The attribute value of operational motion and the Drawing Object operated is also all extracted, and does following work according to action type:
9.1) construct new Drawing Object: if it is building row image object, whether the title for first having to search new object is at the end
End exists, if it does, reporting an error;If it does not exist, then constructing new Drawing Object according to attribute.
9.2) update Drawing Object: likewise, the title for first having to search the object whether there is, which deposits in the terminal
Updating the attribute of the Drawing Object;Otherwise, it reports an error.
9.3) Delete Shape object: the title for first having to search the object whether there is, which exists, and be somebody's turn to do in this terminal deletion
Object;Otherwise, it reports an error.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810594056.2A CN108961348A (en) | 2018-06-11 | 2018-06-11 | Instant picture exchange method based on object-oriented |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810594056.2A CN108961348A (en) | 2018-06-11 | 2018-06-11 | Instant picture exchange method based on object-oriented |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108961348A true CN108961348A (en) | 2018-12-07 |
Family
ID=64488323
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810594056.2A Pending CN108961348A (en) | 2018-06-11 | 2018-06-11 | Instant picture exchange method based on object-oriented |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108961348A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1658567A (en) * | 2005-02-21 | 2005-08-24 | 华东师范大学 | Cooperative plotting method based on internet |
CN103986759A (en) * | 2014-05-14 | 2014-08-13 | 上海复兰信息科技有限公司 | Multi-person real-time synchronous graphic edition and display method based on network transmission |
CN106022716A (en) * | 2010-11-04 | 2016-10-12 | 中兴通讯股份有限公司 | Method and system for multi-user cooperative graph editing of mobile terminal |
-
2018
- 2018-06-11 CN CN201810594056.2A patent/CN108961348A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1658567A (en) * | 2005-02-21 | 2005-08-24 | 华东师范大学 | Cooperative plotting method based on internet |
CN106022716A (en) * | 2010-11-04 | 2016-10-12 | 中兴通讯股份有限公司 | Method and system for multi-user cooperative graph editing of mobile terminal |
CN103986759A (en) * | 2014-05-14 | 2014-08-13 | 上海复兰信息科技有限公司 | Multi-person real-time synchronous graphic edition and display method based on network transmission |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11900548B2 (en) | Augmented virtual reality object creation | |
CN106022007B (en) | The cloud platform system and method learning big data and calculating is organized towards biology | |
Flotyński et al. | Ontology‐Based Representation and Modelling of Synthetic 3D Content: A State‐of‐the‐Art Review | |
US20230418799A1 (en) | Volumetric vector node and object based multi-dimensional operating system | |
CN105205164A (en) | Comment information interaction method and device as well as information interaction method and device | |
CN111651418B (en) | Document content downloading method and device, computer equipment and storage medium | |
CN108961348A (en) | Instant picture exchange method based on object-oriented | |
CN111797278A (en) | Method for mapping associated object and relation | |
CN105975259A (en) | Implementation method and device of 3D (Three-dimensional) space user interface | |
KR101447992B1 (en) | Method and system for managing standard model of three dimension for augmented reality | |
CN106503174A (en) | A kind of environment Visualization method and system modeled based on Network Three-dimensional | |
CN112930556A (en) | System and method for integrating third party geometry for visualization of large data sets | |
Hemmings et al. | Livetalk: A framework for collaborative browser-based replicated-computation applications | |
CN103957243A (en) | Virtual tourism method and system | |
CN116578423B (en) | Task processing method, automatic question answering method and image generation method | |
US11789787B2 (en) | Communicating between applications using api mapping | |
Zheng et al. | Big Seismic Data Visualization on Cloud: A Case Study Collaborating with Industry | |
CN115857915B (en) | Object digitizing method for meta-universe system development | |
Wang et al. | Eight times acceleration of geospatial data archiving and distribution on the grids | |
Kolesnikov et al. | Development Of Mapping Applications For Mobile Devices | |
KR20230157886A (en) | Layer-partitioned virtual world system | |
Rustad et al. | Exposing Military Sensor Data using SpatioTemporal Asset Catalog (STAC) | |
CN115248800A (en) | File processing method, computer and readable storage medium | |
Jing et al. | Optimized WebGIS application and research based on three-tier under. Net Environment and distributed Browser/Server architecture | |
Stock et al. | Web-based collaboration and decision making in GIS-built virtual environments |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181207 |
|
RJ01 | Rejection of invention patent application after publication |