Specific embodiment
The embodiment of the present invention provides a kind of data sharing method and system, the control unit of window, can be realized between window
Data sharing, make the user do not need to interrupt the operation to window, it will be able to update the data of the window.
Fig. 1 is please referred to, data sharing method one embodiment includes in the embodiment of the present invention:
101, when basic data data have update, the control unit synchronized update of first window is buffered in the second window
Basic data data in control unit;
In the present embodiment, when basic data data have update, the control unit of first window can be cached with synchronized update
The basic data data in the control unit of the second window, in practical applications, the basic data data can be support system
Business uses relatively fixed, and common data, such as:In accounting system, basic data data may include:Section
Mesh number evidence, voucher word, in JXC System, basic data data may include:Supplier, client, commodity, warehouse, basis
Data can also need often to need locally to search for generally in user, when drop-down menu, business operation, system list process
The data of calling, such as:Bookkeeping voucher, buying order, sales slip, requisition slip, report query etc..
102, the control unit of first window is updated the basic data mark in the control unit of the second window, makes
When obtaining user's opening third window, the control unit of third window is obtained according to the corresponding basic data mark of mark of third window
Take basic data data.
In the present embodiment, the control unit of first window can basic data mark in the control unit to the second window
It is updated, wherein basic data mark is used to indicate whether basic data data have update, in practical applications, work as user
When opening third window, the control unit of the third window obtains base according to the corresponding basic data mark of mark of third window
Plinth data.
It should be noted that the control unit of the window in the embodiment of the present invention is processor(CPU, Central
Processing Unit)The object for calling the source code of the window to be presented, the data for being buffered in the control unit of window are to be somebody's turn to do
What window control unit can be read is stored in the data in data storage.
In the present embodiment, when basic data data have update, the control unit synchronized update of first window is buffered in
The control unit of basic data data in the control unit of two windows, first window is updated basic data mark, so that
When user opens third window, the control unit of third window is obtained according to the corresponding basic data mark of mark of third window
The data sharing between window has been achieved in basic data data, makes the user do not need to interrupt the operation to window, it will be able to update
The data of the window.
In order to make it easy to understand, below with a specific example to being described in the data sharing method of the embodiment of the present invention,
Referring to Fig. 2, another embodiment of data sharing method includes in the embodiment of the present invention:
201, the control unit of the second window is identified the window of basic data data correlation, generates basic data mark
Know the object of array;
In the present embodiment, the control unit of the second window can be identified the window of basic data data correlation, raw
At the object of basic data mark array, wherein basic data identifies array and includes:The mark of the window of basic data data correlation
Know and the corresponding basic data of the mark of window identifies, third window is the window with basic data data correlation, for example, basic
The associated window of data includes:C1, C2, C3, basic data data are Data1, when Data1 does not update, window
Identify corresponding basic data mark and be set as false, the basic data mark array generated at this time be Data1Related=
{C1:false,C2:false,C3:false}.
202, whether the control unit judgement basis data of first window has update, if so, 203 are thened follow the steps,
If it is not, thening follow the steps 209;
In the present embodiment, whether the control unit judgement basis data of first window has update, if there is update, holds
Row step 203 thens follow the steps 209 if not updating, in practical applications, the control unit storage basis money of first window
Expect data, after user modifies or updates to the basic data data in first window, the control unit of first window
It may determine that basic data data have update.
203, the control unit synchronized update of first window is buffered in basic data data in the control unit of the second window;
In the present embodiment, when basic data data have update in step 202, the control unit of first window can be same
Step, which updates, is buffered in basic data data in the control unit of the second window, and in practical applications, which can be with
To support that it is relatively fixed that system business uses, and common data, such as:In accounting system, basic data data
May include:Subject data, voucher word, in JXC System, basic data data may include:Supplier, client, quotient
Product, warehouse, basic data data can also be to need local to search for generally, drop-down menu, business operation, make single process in user
When, the data for needing often to call, such as:Bookkeeping voucher, buying order, sales slip, requisition slip, report query etc..
204, the control unit of first window is updated the basic data mark in the control unit of the second window;
In the present embodiment, the control unit of first window can basic data mark in the control unit to the second window
It is updated, for example, the basic data mark array in the control unit of the second window is Data1Related={ C1:false,
C2:false,C3:False }, basic data mark false is updated by the control unit of first window, the second window after update
Basic data mark array in the control unit of mouth is Data1Related={ C1:true,C2:true,C3:true}.
205, when user opens third window, in the control unit judgement basis Data Identification array of third window whether
There is the mark of itself, if so, thening follow the steps 206, if not having, thens follow the steps 210;
In the present embodiment, when user opens third window, the control unit of third window may determine that the second window
Whether itself mark is had in basic data mark array in control unit, for example, third window is identified as C1, basic number
It is Data1Related={ C1 according to mark array:true,C2:true,C3:True }, the control unit of third window determines at this time
There is the mark of itself in basic data mark array in the control unit of second window, thens follow the steps 206.
206, in the control unit judgement basis Data Identification array of third window third window the corresponding basis of mark
Whether Data Identification has update, if there is update, thens follow the steps 207, if not updating, thens follow the steps 209;
In the present embodiment, the control unit of third window may determine that the basic data mark in the control unit of the second window
The basic data known in array has identified whether update, for example, third window is identified as C1, basic data mark array is
Data1Related={C1:true,C2:true,C3:True }, wherein the corresponding basic data of C1 is identified as true, third window
The control unit of mouth determines that basic data is identified with update, thens follow the steps 207.
It should be noted that basic data mark is used to indicate whether basic data data have update, basic data mark
Can be number, character, array or object, herein without limitation.
207, the control unit of third window reacquires the basic data data in the control unit caching of the second window;
In the present embodiment, after the control unit judgement basis Data Identification of step 206 third window has update, third window
The control unit of mouth can reacquire the basic data data in the control unit caching of the second window.
208, the basic data in the control unit of the second window is identified third in array by the control unit of first window
The corresponding basic data mark of window ID is updated;
In the present embodiment, after step 207, the control unit of first window can will be in the control unit of the second window
Basic data mark array in third window ID corresponding basic data mark be updated, for example, the mark of third window
Knowing is C1, and it is Data1Related={ C1 that basic data, which identifies array,:true,C2:true,C3:True }, the control of first window
The corresponding true of C1 is changed to false by unit processed, and updated basic data mark array is Data1Related={ C1:
false,C2:true,C3:true}.
209, when user opens third window, the content in third window is presented in the control unit of third window;
In the present embodiment, when the judging result in step 202 or step 206 is no, if user opens third window, the
The content in third window is directly presented in the control unit of three windows.
210, the control unit of third window reads the basic data data of caching in the control unit of the second window;
211, the control unit of the second window is inserted into the mark of third window in basic data mark array.
In the present embodiment, there is no the mark of third window, third window in judgement basis Data Identification array in step 205
The control unit of mouth can read the basic data data of caching, the then control of the second window in the control unit of the second window
Unit processed can be inserted into the mark of third window in basic data mark array.
It should be noted that first window and third window are the child window under the second window.
In the present embodiment, the control unit of the second window is identified the window of basic data data correlation, generates base
Whether the control unit judgement basis data of the object of plinth Data Identification array, first window has update, and is having update
When, the control unit synchronized update of first window is buffered in basic data data in the control unit of the second window, and to second
Basic data mark in the control unit of window is updated, when user opens third window, the control list of third window
Whether member has update by the variation that basic data identifies come judgement basis data, and has update in basic data data
When, the control unit of third window can re-read the basic data data being buffered under the control unit of the second window, this
Sample, when user opens the window of each basic data data correlation, and when basic data data update, each basic data
The window of data correlation can individually read the basic data data being buffered under the control unit of the second window, realize
Data sharing between window makes the user do not need to interrupt the operation to window, it will be able to the data of the window is updated, to reduce
The refresh operation of user.
The control unit of the window of the embodiment of the present invention for executing above-mentioned data sharing method is illustrated below,
Referring to FIG. 3, in the embodiment of the present invention window control unit one embodiment, the control unit of the window is first window
When control unit, including:
Judgment module 301 and update module 302;
Whether judgment module 301 has update for judgement basis data;
Update module 302 is when being for the judging result in judgment module 301, and synchronized update is buffered in the second window
Control unit in basic data data;
Update module 302, the basic data mark being also used in the control unit to the second window are updated, so that with
When third window is opened at family, the control unit of third window obtains base according to the corresponding basic data mark of mark of third window
Plinth data.
In the present embodiment, whether 301 judgement basis data of judgment module has update, and update module 302 is judging mould
The judging result of block 301 is when being, synchronized update is buffered in basic data data in the control unit of the second window, and to second
Basic data mark in the control unit of window is updated, when so that user opening third window, the control of third window
Unit obtains basic data data according to the corresponding basic data mark of mark of third window, and the number between window has been achieved
According to sharing, make the user do not need to interrupt the operation to window, it will be able to update the data of the window.
In order to better understand the above embodiments, below between the friendship the modules for including in the control unit of window
Mutually the data interactive mode in the control unit of window is illustrated, it is same referring to Fig. 3, window in the embodiment of the present invention
Another embodiment of control unit, when the control unit of window is the control unit of first window, including:
Judgment module 301 and update module 302.
Whether 301 judgement basis data of judgment module has update, the control unit judgement basis data of first window
Whether data have update, if there is update, judging result is sent to update module 302, if not updating and opening in user
When third window, then judging result is informed to the control unit of third window, so that the control unit of third window is directly presented
Content in third window, in practical applications, the control unit of first window store basic data data, when user is first
After the basic data data are modified or updated in window, the control unit of first window may determine that basic data data
There is update.
The judging result that update module 302 receives judgment module 301 is when being, synchronized update is buffered in the second window
Basic data data in control unit, in practical applications, the basic data data can for support system business use compared with
To be fixed, and common data, such as:In accounting system, basic data data may include:Subject data, voucher
Word, in JXC System, basic data data may include:Supplier, client, commodity, warehouse, basic data data may be used also
Think user need it is local search for generally, drop-down menu, business operation, make single process when, the data for needing often to call, example
Such as:Bookkeeping voucher, buying order, sales slip, requisition slip, report query etc..
Update module 302 is updated the basic data mark in the control unit of the second window, so that user opens
When third window, the control unit of third window obtains basis money according to the corresponding basic data mark of mark of third window
Data are expected, for example, the basic data mark array in the control unit of the second window is Data1Related={ C1:false,
C2:false,C3:False }, basic data mark false is updated by update module 302, the control of the second window after update
Basic data mark array in unit processed is Data1Related={ C1:true,C2:true,C3:True }, when user opens
When third window, the control unit of third window is obtained according to the corresponding basic data mark true of mark C1 of third window should
Basic data data.
Then update module 302 is after third window obtains the basic data data, by the control unit of the second window
In basic data mark array in third window ID corresponding basic data mark be updated, wherein basic data mark
Know in array and includes:The mark of the window of basic data data correlation and the corresponding basic data mark of the mark of window, third
Window is the window with basic data data correlation, for example, third window is identified as C1, basic data mark array is
Data1Related={C1:true,C2:true,C3:True }, the corresponding true of C1 is changed to by the control unit of first window
False, updated basic data mark array is Data1Related={ C1:false,C2:true,C3:true}.
In the present embodiment, whether the control unit of window has update by 301 judgement basis data of judging unit, and
When basic data data have update, 302 synchronized update of updating unit is buffered in basic data in the control unit of the second window
Data, and the basic data mark in the control unit of the second window is updated, when so that user opening third window, the
The control unit of three windows obtains the basic data data according to the corresponding basic data mark of mark of third window, in this way,
When user opens the window of each basic data data correlation, and when basic data data update, each basic data number
The basic data data being buffered under the control unit of the second window can be individually read according to associated window, realize window
Data sharing between mouthful, makes the user do not need to interrupt the operation to window, it will be able to the data of the window are updated, to reduce use
The refresh operation at family.
The control unit of the window of the embodiment of the present invention for executing above-mentioned data sharing method is illustrated below,
Referring to Fig. 4, in the embodiment of the present invention window control unit one embodiment, the control unit of window is the control of the second window
When unit processed, including:
Cache module 401 and update module 402;
Cache module 401, for caching basic data data;
Update module 402, the updated basic data data that the control unit for receiving first window is sent, and it is same
Step is updated in cache module 401, so that the control unit of third window is according to the third window in the control unit of the second window
The corresponding basic data mark of the mark of mouth obtains basic data data.
In the present embodiment, cache module 401 caches basic data data, and update module 402 receives the control of first window
The updated basic data data that unit is sent, and synchronized update is into cache module 401, so that the control list of third window
Member obtains basic data data according to the corresponding basic data mark of mark of the third window in the control unit of the second window,
The data sharing between window has been achieved, has made the user do not need to interrupt the operation to window, it will be able to update the data of the window.
In order to better understand the above embodiments, below between the friendship the modules for including in the control unit of window
Mutually the data interactive mode in the control unit of window is illustrated, referring to Fig. 5, in the embodiment of the present invention window control
Another embodiment of unit, when the control unit of window is the control unit of the second window, including:
Cache module 501, execution module 502 and update module 503.
Cache module 501 caches basic data data.
Execution module 502 is identified the window of basic data data correlation, generates pair of basic data mark array
As, wherein basic data identifies array and includes:The mark of the window of basic data data correlation and the corresponding base of the mark of window
Plinth Data Identification, third window is the window with basic data data correlation, for example, the window packet of basic data data correlation
It includes:C1, C2, C3, basic data data are Data1, when Data1 does not update, the corresponding basic data mark of the mark of window
Knowledge is set as false, and the basic data mark array that execution module 403 generates at this time is Data1Related={ C1:false,
C2:false,C3:false}.
Update module 503 receives the updated basic data data that the control unit of first window is sent, and synchronizes more
Newly into cache module 501, so that the control unit of third window is according to the third window in the control unit of the second window
It identifies corresponding basic data mark and obtains basic data data, in practical applications, which can be support
System business uses relatively fixed, and common data, such as:In accounting system, basic data data be can wrap
It includes:Subject data, voucher word, in JXC System, basic data data may include:Supplier, client, commodity, warehouse,
Basic data data can also need to need locally to search for generally in user, when drop-down menu, business operation, system list process
The data often called, such as:Bookkeeping voucher, buying order, sales slip, requisition slip, report query etc..
It should be noted that first window and third window are the child window under the second window.
In the present embodiment, cache module 501 caches basic data data, and execution module 502 is to basic data data correlation
Window be identified, generate basic data mark array object, update module 503 receive first window control unit hair
Updated basic data data sent, and synchronized update is into cache module 501 so that the control unit of third window according to
The mark of third window in the control unit of second window corresponding basic data mark obtains basic data data, in this way when
When user opens the window of each basic data data correlation, and when basic data data update, each basic data data
Associated window can individually read the basic data data being buffered under the control unit of the second window, realize window
Between data sharing, make the user do not need to interrupt the operation to window, it will be able to the data of the window are updated, to reduce user
Refresh operation.
The control unit of the window of the embodiment of the present invention for executing above-mentioned data sharing method is illustrated below,
Its basic logical structure refers to Fig. 6, and control unit one embodiment of window, the control unit of window are in the embodiment of the present invention
When the control unit of third window, including:
Obtain module 601;
Module 601 is obtained, is used for when user opens third window, according to the third window in the control unit of the second window
The corresponding basic data mark of the mark of mouth obtains basic data data;
Wherein, basic data data buffer storage is in the control unit of the second window.
In the present embodiment, when user opens third window, obtain in control unit of the module 601 according to the second window
The corresponding basic data mark of the mark of third window obtains basic data data, wherein basic data data buffer storage is in second
In the control unit of window, the data sharing between window has been achieved, has made the user do not need to interrupt the operation to window, it will be able to
Update the data of the window.
In order to better understand the above embodiments, below between the friendship the modules for including in the control unit of window
Mutually the data interactive mode in the control unit of window is illustrated, referring to Fig. 7, in the embodiment of the present invention window control
Another embodiment of unit, when the control unit of window is the control unit of third window, including:
First judgment module 701 obtains module 702 and the second judgment module 703.
When user opens third window, first judgment module 701 judges the basic number in the control unit of the second window
According to the mark for whether having itself in mark array, and when there is no self identification, judging result is sent to and obtains module 702,
When there is self identification, judging result is sent to the second judgment module 703, wherein basic data mark array includes:Basis
The mark of the associated window of data and the corresponding basic data mark of the mark of window, third window are and basic data number
According to associated window, for example, third window is identified as C1, it is Data1Related={ C1 that basic data, which identifies array,:true,
C2:true,C3:True }, first judgment module 701 determines that the basic data in the control unit of the second window identifies number at this time
There is the mark of itself in group.
Module 702 is obtained when it is no for receiving the judging result of the transmission of first judgment module 701, in the control of the second window
The basic data data of caching are read in unit processed, and inform that the control unit of the second window is inserted in basic data mark array
Enter the mark of third window.
Second judgment module 703 is when the judging result for receiving the transmission of first judgment module 701 is to be, judgement basis number
Update has been identified whether according to the basic data in mark array, if there is update, judging result is informed and obtains module 702, if
It does not update, then judging result is informed to the control unit of third window, so that when user opens third window, third window
Control unit the content in third window is presented, for example, third window is identified as C1, basic data mark array is
Data1Related={C1:true,C2:true,C3:True }, wherein the corresponding basic data of C1 is identified as true, third window
The control unit of mouth determines that basic data is identified with update.
It should be noted that basic data mark is used to indicate whether basic data data have update, basic data mark
Can be number, character, array or object, herein without limitation.
Obtaining module 702 and receiving the judging result of the second judgment module 703 transmission is when being, to reacquire in the second window
Mouthful control unit caching basic data data, and inform the control unit of first window by the basic data in the second window
The corresponding basic data mark of third window ID is updated in mark array.
In the present embodiment, the control unit of window is by first judgment module 701, when user opens third window, the
One judgment module 701 judges the mark for whether having itself in the mark array of the basic data in the control unit of the second window, the
Two judgment modules 703 are when the judging result for receiving the transmission of first judgment module 701 is to be, judgement basis Data Identification array
In basic data identified whether update, if there is update, it is slow to obtain the control unit that module 702 is reacquired in the second window
The basic data data deposited, in this way when user opens the window of each basic data data correlation, and in basic data data
When update, the window of each basic data data correlation, which can individually be read, to be buffered under the control unit of the second window
Basic data data realize the data sharing between window, make the user do not need to interrupt the operation to window, it will be able to update the window
The data of mouth, to reduce the refresh operation of user.
The data-sharing systems of the embodiment of the present invention for executing above-mentioned data sharing method are illustrated below, are asked
Refering to Fig. 8, data-sharing systems one embodiment in the embodiment of the present invention, including:
The control unit 803 of the control unit 801 of first window, the control unit 802 of the second window and third window;
The control unit 801 of second window, for caching basic data data;
The control unit 802 of first window, for when basic data data have update, synchronized update to be buffered in the second window
Basic data data in the control unit of mouth, and the basic data mark in the control unit of the second window is updated;
The control unit 803 of third window, for being corresponded to according to the mark of third window when user opens third window
Basic data mark obtain basic data data.
In the present embodiment, the control unit 801 of the second window caches basic data data, when basic data data have update
When, 802 synchronized update of control unit of first window is buffered in basic data data in the control unit of the second window, and to
Basic data mark in the control unit of two windows is updated, when user opens third window, the control of third window
Unit 803 obtains basic data data according to the corresponding basic data mark of mark of third window, has been achieved between window
Data sharing, make the user do not need to interrupt the operation to window, it will be able to update the data of the window.
In order to better understand the above embodiments, below between the interaction each unit for including in data-sharing systems
Data interactive mode in data-sharing systems is illustrated, please equally refering to Fig. 8, data sharing system in the embodiment of the present invention
Another embodiment of uniting includes:
The control unit 803 of the control unit 801 of first window, the control unit 802 of the second window and third window;
The control unit 801 of second window is identified the window of basic data data correlation, and generates basic data
Identify the object of array, wherein basic data identifies array and includes:The mark of the window of basic data data correlation and window
Corresponding basic data mark is identified, third window is the window with basic data data correlation, for example, basic data data are closed
The window of connection includes:C1, C2, C3, basic data data are Data1, and when Data1 does not update, the mark of window is corresponding
Basic data mark is set as false, and the basic data mark array generated at this time is Data1Related={ C1:false,
C2:false,C3:false}.
Whether the 801 judgement basis data of control unit of first window has update, in practical applications, first window
Control unit 801 store basic data data, when user modifies to the basic data data in first window or more
After new, the control unit 801 of first window may determine that basic data data have update.
If there is update, 801 synchronized update of control unit of first window is buffered in the control unit 802 of the second window
Judging result, when user opens third window, is informed the control list of third window if not updating by basic data data
Member 803, the content in third window, in practical applications, the basic data number is presented in the control unit 803 of third window at this time
According to can be relatively fixed, and common data of supporting that system business uses, such as:In accounting system, basis money
Expect that data may include:Subject data, voucher word, in JXC System, basic data data may include:Supplier, visitor
Family, commodity, warehouse, basic data data can also for user need it is local search for generally, drop-down menu, business operation, system
When single process, the data for needing often to call, such as:Bookkeeping voucher, buying order, sales slip, requisition slip, report query etc..
801 synchronized update of control unit of first window is buffered in basic data number in the control unit 802 of the second window
According to later, the control unit 801 of first window is updated the basic data mark in the control unit 802 of the second window,
For example, the basic data mark array in the control unit 802 of the second window is Data1Related={ C1:false,C2:
false,C3:False }, basic data mark false is updated by the control unit 801 of first window, and updated second
Basic data mark array is Data1Related={ C1 in the control unit 802 of window:true,C2:true,C3:true}.
When user opens third window, in the 803 judgement basis Data Identification array of control unit of third window whether
There is the mark of itself, for example, third window is identified as C1, it is Data1Related={ C1 that basic data, which identifies array,:true,
C2:true,C3:True }, the control unit 803 of third window determines the basic number in the control unit 802 of the second window at this time
According to the mark for having itself in mark array.
If the control unit 803 of third window reads slow in the control unit 802 of the second window without self identification
The basic data data deposited, and inform the control unit 802 of the second window without the mark of third window, the second window at this time
Control unit 802 is inserted into the mark of third window in basic data mark array.
If there is self identification, the mark of third window in the control unit judgement basis Data Identification array of third window
Corresponding basic data has identified whether update, for example, third window is identified as C1, basic data mark array is
Data1Related={C1:true,C2:true,C3:True }, wherein the corresponding basic data of C1 is identified as true, third window
The control unit 803 of mouth determines that basic data is identified with update, if there is update, the control unit 803 of third window obtains again
The basic data data in the caching of control unit 802 of the second window are taken, then the control unit 803 of third window informs first
The control unit 801 of window has reacquired the basic data data of caching.
It should be noted that basic data mark is used to indicate whether basic data data have update, basic data mark
Can be number, character, array or object, herein without limitation.
Then the control unit 801 of first window will be the in the basic data mark array in the control unit of the second window
The corresponding basic data mark of three window IDs is updated, for example, third window is identified as C1, basic data identifies array
For Data1Related={ C1:true,C2:true,C3:True }, the control unit 801 of first window is by the corresponding true of C1
It is changed to false, updated basic data mark array is Data1Related={ C1:false,C2:true,C3:true}.
It should be noted that first window and third window are the child window under the second window.
In the present embodiment, the control unit 802 of the second window is identified the window of basic data data correlation, generates
Basic data identifies the object of array, and whether the 801 judgement basis data of control unit of first window has update, and is having
When update, 801 synchronized update of control unit of first window is buffered in basic data number in the control unit 802 of the second window
According to, and the basic data mark in the control unit of the second window 802 is updated, when user opens third window, the
Whether the control unit 803 of three windows has update by the variation that basic data identifies come judgement basis data, and in base
When plinth data has update, the control unit 803 of third window can re-read the control unit for being buffered in the second window
Basic data data under 802, in this way, when user opens the window of each basic data data correlation, and in basic data
When data update, the window of each basic data data correlation can individually read the control unit for being buffered in the second window
Basic data data under 802, realize the data sharing between window, make the user do not need to interrupt the operation to window, it will be able to
The data of the window are updated, to reduce the refresh operation of user.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before
Stating embodiment, invention is explained in detail, those skilled in the art should understand that:It still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.