Method, apparatus and device for sharing data based on intermediate table and storage medium
Through the data sharing method based on the intermediate table, the problems of data confusion and high failure rate in the process of multi-system and multi-data sharing are solved, and an efficient and orderly data sharing process is achieved.
Patent Information
- Application Number
- CN202310456343.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-04-25
AI Technical Summary
Existing data sharing technologies cannot effectively handle the sharing process of multiple systems and multiple data, resulting in data confusion and high sharing failure rate.
A data sharing method based on an intermediate table is adopted. By responding to data sharing requests, the target data is determined, the data creation time and operation type are obtained, and the data are entered into the intermediate table in the order of data creation time. Data is shared based on the operation type and the preset period, and the target data of the sharing period is determined using the data sharing record table.
It improves the success rate of data sharing, solves the problem of data confusion, and ensures the smoothness and manageability of data sharing by setting a sharing cycle.
Smart Images

Figure CN116521679B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data sharing method, apparatus, device and storage medium based on an intermediate table. Background Art
[0002] Data sharing enables users in different locations, using different computers and software, to access each other's data and perform various operations, calculations, and analyses. Data sharing technology is now widely used to connect different systems, enabling functional and data interaction between them and enabling interactive processes. To achieve better system interaction, each system provides a large amount of data that needs to be shared, and the sharing process across multiple systems is also complex.
[0003] However, existing data sharing technologies cannot handle the sharing process of multiple systems and multiple data, which often leads to problems such as data confusion and high sharing failure rate. Summary of the Invention
[0004] In view of this, the present application provides a data sharing method, device, equipment and storage medium based on an intermediate table, which is used to solve the problems that existing data sharing technology cannot undertake the sharing process of multiple systems and multiple data, often causing data confusion and high sharing failure rate.
[0005] To achieve the above objectives, the following solutions are proposed:
[0006] In a first aspect, a data sharing method based on an intermediate table includes:
[0007] In response to data sharing request instructions initiated by each data sharing party, determine each target data that each data sharing party needs to share;
[0008] Obtain the data creation time, data ID, and operation type of each target data;
[0009] Input the data ID and operation type of each target data into a pre-established intermediate table in the order of data creation time to obtain a first intermediate table;
[0010] Based on the operation type, each target data in the first intermediate table is shared according to a preset sharing cycle, and a sharing result corresponding to each target data is obtained, and the sharing result corresponding to each target data is returned to the first intermediate table; wherein, within each sharing cycle, the first target data to be shared in the sharing cycle is determined in the first intermediate table according to the established data sharing record table; the data sharing record table is composed of the data ID of the last target data shared in each sharing cycle.
[0011] Preferably, the sharing each piece of target data in the first intermediate table according to the preset sharing period based on the operation type comprises:
[0012] For each piece of target data, if the operation type of the piece of target data is addition, the piece of target data is shared as to-be-shared data according to the preset sharing period;
[0013] if the operation type of the piece of target data is deletion, the target data corresponding to the piece of target data that needs to be deleted is determined from the first intermediate table, and the target data that needs to be deleted is deleted according to the preset sharing period.
[0014] Preferably, the sharing each piece of target data in the first intermediate table according to the preset sharing period based on the operation type comprises:
[0015] if the operation type of the piece of target data is modification, the target data corresponding to the piece of target data that needs to be modified is determined;
[0016] The target data corresponding to the piece of target data that needs to be modified is modified by using the piece of target data;
[0017] The modified target data is shared as to-be-shared data according to the preset sharing period.
[0018] Preferably, after the sharing result corresponding to each piece of target data is returned to the first intermediate table, the method further comprises:
[0019] determining whether there is target data with an abnormal sharing result from each piece of target data;
[0020] if there is, each piece of target data with an abnormal sharing result is taken as each piece of abnormal data;
[0021] For each piece of abnormal data, the data sharing party corresponding to the piece of abnormal data is determined;
[0022] an alert instruction is sent to the data sharing party corresponding to the piece of abnormal data, so that the data sharing party corresponding to the piece of abnormal data determines new target data according to the alert instruction.
[0023] Preferably, the sending of the alert instruction to the data sharing party corresponding to the piece of abnormal data, so that the data sharing party corresponding to the piece of abnormal data determines new target data according to the alert instruction comprises:
[0024] determining the sharing failure type of the piece of abnormal data according to the sharing result;
[0025] A warning instruction marked with the sharing failure type is sent to the data sharing party corresponding to the abnormal data, so that the data sharing party corresponding to the abnormal data can determine new target data corresponding to the abnormal data according to the sharing failure type.
[0026] Preferably, in each sharing cycle, determining the first target data to be shared in the sharing cycle in the first intermediate table according to the established data sharing record table includes:
[0027] In each sharing cycle, obtaining the last data ID in the data sharing record table;
[0028] The target data corresponding to the data ID is located in the first intermediate table, and the next target data corresponding to the data ID in the first intermediate table is used as the first target data to be shared in the sharing cycle.
[0029] Preferably, the sharing failure types include: incomplete data, erroneous data, duplicate data and lost data.
[0030] In a second aspect, a data sharing device based on an intermediate table includes:
[0031] A target data determination module, configured to respond to data sharing request instructions initiated by each data sharing party and determine each target data that each data sharing party needs to share;
[0032] A data information acquisition module is used to obtain the data creation time, data ID and operation type of each target data;
[0033] An input module, configured to input the data ID and operation type of each target data into a pre-established intermediate table in the order of data creation time, thereby obtaining a first intermediate table;
[0034] A sharing module is used to share each target data in the first intermediate table according to a preset sharing cycle based on the operation type, obtain a sharing result corresponding to each target data, and return the sharing result corresponding to each target data to the first intermediate table; wherein, in each sharing cycle, the first target data to be shared in the sharing cycle is determined in the first intermediate table according to the established data sharing record table; the data sharing record table is composed of the data ID of the last target data shared in each sharing cycle.
[0035] In a third aspect, a data sharing device based on an intermediate table includes a memory and a processor;
[0036] The memory is used to store programs;
[0037] The processor is used to execute the program to implement the various steps of the data sharing method based on the intermediate table as described in the first aspect.
[0038] In a fourth aspect, a storage medium stores a computer program thereon, wherein when the computer program is executed by a processor, the computer program implements the various steps of the data sharing method based on the intermediate table as described in the first aspect.
[0039] As can be seen from the above technical solution, this application determines the target data that each data sharing party needs to share by responding to the data sharing request instructions initiated by each data sharing party, obtains the data creation time, data ID and operation type of each target data, and then enters the data ID and operation type of each target data into a pre-established intermediate table in the order of data creation time to obtain a first intermediate table. Based on the operation type and according to the preset sharing cycle, each target data in the first intermediate table is shared to obtain the sharing result corresponding to each target data, and then the sharing result corresponding to each target data is returned to the first intermediate table. In each sharing cycle, the first target data to be shared in the sharing cycle is determined in the first intermediate table based on the established data sharing record table; the data sharing record table is composed of the data ID of the last target data shared in each sharing cycle. This solution uses the first intermediate table to store data and shares each target data according to the operation type to improve the success rate of sharing. At the same time, setting a sharing cycle can solve the problem of data confusion that is easy to cause in existing sharing technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0041] Figure 1 An optional flow chart of a data sharing method based on an intermediate table provided in an embodiment of the present application;
[0042] Figure 2 An optional flow chart of a data sharing method based on an intermediate table provided in an embodiment of the present application;
[0043] Figure 3 An optional flow chart of another data sharing method based on an intermediate table provided in an embodiment of the present application;
[0044] Figure 4A schematic diagram of the structure of a data sharing device based on an intermediate table provided in an embodiment of the present application;
[0045] Figure 5 A schematic structural diagram of a data sharing device based on an intermediate table provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0047] Data sharing enables users in different locations, using different computers and software, to access each other's data and perform various operations, calculations, and analyses. Data sharing technology is now widely used to connect different systems, enabling functional and data interaction between them and enabling interactive processes. To achieve better system interaction, each system provides a large amount of data that needs to be shared, and the sharing process across multiple systems is also complex.
[0048] However, existing data sharing technologies cannot handle the sharing process of multiple systems and multiple data, which often leads to problems such as data confusion and high sharing failure rate.
[0049] The embodiment of the present invention provides a data sharing method based on an intermediate table. The method can be applied to various computer terminals or smart terminals. The execution subject can be a processor or server of the computer terminal or smart terminal. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:
[0050] S1: In response to data sharing request instructions initiated by various data sharing parties, determine various target data that each data sharing party needs to share.
[0051] The data sharing parties in this application can be systems or devices that need to share information or interact with data. When each data sharing party needs to share data, it can initiate a request instruction for data sharing. Therefore, in response to the request instruction for data sharing initiated by each data sharing party, the target data that each data sharing party needs to share is determined. Each data sharing party can provide one or more target data, and this embodiment does not limit this. Specifically, the data content in each target data is the specific content that needs to be shared. Other data sharing parties can convert the specific content of the target data into a format according to their own needs to facilitate the subsequent use or processing of the target data.
[0052] S2: Acquire the data creation time, data ID, and operation type of each piece of the target data.
[0053] Each target data has parameter indicators. This application uses data creation time, data ID and operation type. For each target data, the data creation time is the time when the data is created in its corresponding data sharing party, the data ID is the name of the data, and the operation type refers to what kind of operation is performed on the target data, including direct sharing, sharing after modification, etc.
[0054] S3: Input the data ID and operation type of each target data into a pre-established intermediate table in the order of data creation time to obtain a first intermediate table.
[0055] Arrange each target data in a pre-established intermediate table in the order of data creation time. The parameter indicators in the table include data ID and operation type, and may also include other parameter indicators, such as object type, etc., to obtain the first intermediate table.
[0056] The first intermediate table is like a transfer station. Each target data can be placed in the first intermediate table. When each data party requires sharing, the target data in the first intermediate table can be directly taken for sharing. This method can greatly improve the sharing efficiency.
[0057] S4: Based on the operation type, each target data in the first intermediate table is shared according to a preset sharing cycle, and a sharing result corresponding to each target data is obtained, and the sharing result corresponding to each target data is returned to the first intermediate table; wherein, in each sharing cycle, the first target data to be shared in the sharing cycle is determined in the first intermediate table according to the established data sharing record table; the data sharing record table is composed of the data ID of the last target data shared in each sharing cycle.
[0058] In this application, you can set up monitoring-type polling according to the specific situation, that is, divide it into many sharing cycles to share data, for example, each sharing time is ten minutes, and the time interval between each two sharing cycles is 1 minute. Therefore, in each sharing cycle, based on the operation type of each target data, the target data is shared in the order arranged in the first intermediate table, and the sharing result will be obtained after sharing. It should be noted that not all target data will be successfully shared, so after obtaining the sharing result, the sharing result can be fed back to the first intermediate table for subsequent modification and management.
[0059] Specifically, the first target data to be shared in each sharing period is determined according to the data sharing record table. After the last target data in each sharing period is shared, the first target data in the next sharing period is the next data of the last target data in the previous sharing period, and therefore the data ID of the last target data shared in each sharing period is recorded in the data sharing record table.
[0060] From the above technical solution, it can be seen that the application determines the target data to be shared by each data sharing party in response to the request instruction for data sharing initiated by each data sharing party, obtains the data creation time, data ID and operation type of each target data, then inputs the data ID and operation type of each target data into the pre-established intermediate table in the order of the data creation time to obtain a first intermediate table, shares each target data in the first intermediate table based on the operation type and according to a preset sharing period to obtain a sharing result corresponding to each target data, and returns the sharing result corresponding to each target data to the first intermediate table. In each sharing period, the first target data to be shared in the sharing period is determined in the first intermediate table according to the established data sharing record table. The data sharing record table is composed of the data ID of the last target data shared in each sharing period. The present application stores data by using the first intermediate table, and therefore when various systems or devices need to share data with each other, there is no need for high threshold and no need to keep consistent with each other, and it is only necessary to insert data into the first intermediate table. If multiple data sharing parties directly share data, the data may be lost in the sharing process, and the first intermediate table as a transit station can well solve this problem. Sharing each target data according to the operation type improves the success rate of sharing, and setting the sharing period can solve the problem of data confusion in the existing sharing technology. In addition, recording and feeding back the sharing result can facilitate the query of the data state and the maintenance and management.
[0061] In the method provided by the embodiment of the application, the process of sharing each target data in the first intermediate table according to the operation type and the preset sharing period is as shown in Figure 2 The specific description is as follows:
[0062] S41: For each target data, if the operation type of the target data is addition, the target data is shared as to-be-shared data according to the preset sharing period.
[0063] S42: If the operation type of the target data is deletion, determine the target data to be deleted corresponding to the target data from the first intermediate table, and delete the target data to be deleted according to a preset sharing period.
[0064] S43: If the operation type of the target data is modification, determine the target data that needs to be modified corresponding to the target data; use the target data to modify the target data that needs to be modified; and share the modified target data as the data to be shared according to the preset sharing period.
[0065] Specifically, the operation types of the target data may include adding, deleting, modifying, etc., which are not limited in this embodiment.
[0066] When the operation type is new, it indicates that the target data is newly added data to be shared, so the target data can be shared directly without performing other operations.
[0067] When the operation type is delete, it indicates that one or more target data corresponding to the target data that have been inserted into the first intermediate table need to be deleted.
[0068] When the operation type is modification, it indicates that the target corresponds to one or more target data previously inserted into the first intermediate table that need to be modified.
[0069] The above embodiment describes the process of sharing each target data item in the first intermediate table according to a preset sharing period based on the operation type in the present application. In the following embodiment, after returning the sharing result corresponding to each target data item to the first intermediate table, the present application further includes:
[0070] Determine from each piece of target data whether there is target data with an abnormal sharing result;
[0071] If so, each target data item with abnormal sharing result will be treated as abnormal data item;
[0072] For each piece of abnormal data, determine the data sharing party corresponding to the abnormal data;
[0073] A warning instruction is sent to the data sharing party corresponding to the abnormal data, so that the data sharing party corresponding to the abnormal data can determine new target data according to the warning instruction.
[0074] Specifically, after returning the sharing result to the first intermediate table, a unified check can be performed on the sharing results of each target data in the first intermediate table to determine whether there is target data with abnormal sharing results. If so, it is treated as abnormal data.
[0075] Optionally, the sharing result is expressed in digital form. If the sharing result is a negative number, such as -1, -2, it means that the sharing result is abnormal; if the sharing result is 0, it means that the sharing result is not abnormal. Different negative numbers represent different abnormalities. In the above scheme, a warning instruction is sent to the data sharing party corresponding to the abnormal data, so that the data sharing party corresponding to the abnormal data can determine the new target data according to the warning instruction. The process may specifically include: determining the sharing failure type of the abnormal data according to the sharing result; sending a warning instruction marked with the sharing failure type to the data sharing party corresponding to the abnormal data, so that the data sharing party corresponding to the abnormal data can determine the new target data corresponding to the abnormal data according to the sharing failure type. Sharing failure types include: incomplete data, erroneous data, duplicate data, and lost data, etc., which are not limited in this embodiment.
[0076] The above embodiment supplements the solution in this application after returning the sharing results corresponding to each target data to the first intermediate table. The following is a detailed description of the process in this application of determining the first target data that needs to be shared in the sharing cycle in the first intermediate table based on the established data sharing record table within each sharing cycle.
[0077] In each sharing cycle, obtaining the last data ID in the data sharing record table;
[0078] The target data corresponding to the data ID is located in the first intermediate table, and the next target data corresponding to the data ID in the first intermediate table is used as the first target data to be shared in the sharing cycle.
[0079] Optionally, the data sharing method provided in this application can be regarded as being completed and executed by a data processing system, and the process of this method can be as follows: Figure 3 shown.
[0080] and Figure 1 Corresponding to the above method, the embodiment of the present invention further provides a data sharing device based on an intermediate table for Figure 1 In the specific implementation of the method, the data sharing device based on the intermediate table provided by the embodiment of the present invention can be used in a computer terminal or various mobile devices, combined with Figure 4 , introduces the data sharing device based on the intermediate table, such as Figure 4 As shown, the device may include:
[0081] The target data determination module 10 is used to determine the target data that each data sharing party needs to share in response to the data sharing request instruction initiated by each data sharing party;
[0082] The data information acquisition module 20 is used to obtain the data creation time, data ID and operation type of each target data;
[0083] An input module 30 is used to input the data ID and operation type of each target data into a pre-established intermediate table in the order of data creation time to obtain a first intermediate table;
[0084] The sharing module 40 is used to share each target data in the first intermediate table according to a preset sharing cycle based on the operation type, obtain the sharing result corresponding to each target data, and return the sharing result corresponding to each target data to the first intermediate table; wherein, in each sharing cycle, the first target data to be shared in the sharing cycle is determined in the first intermediate table according to the established data sharing record table; the data sharing record table is composed of the data ID of the last target data shared in each sharing cycle.
[0085] As can be seen from the above technical solution, this application determines the target data that each data sharing party needs to share by responding to the data sharing request instructions initiated by each data sharing party, obtains the data creation time, data ID and operation type of each target data, and then enters the data ID and operation type of each target data into a pre-established intermediate table in the order of data creation time to obtain a first intermediate table. Based on the operation type and according to the preset sharing cycle, each target data in the first intermediate table is shared to obtain the sharing result corresponding to each target data, and then the sharing result corresponding to each target data is returned to the first intermediate table. In each sharing cycle, the first target data to be shared in the sharing cycle is determined in the first intermediate table based on the established data sharing record table; the data sharing record table is composed of the data ID of the last target data shared in each sharing cycle. This solution uses the first intermediate table to store data and shares each target data according to the operation type to improve the success rate of sharing. At the same time, setting a sharing cycle can solve the problem of data confusion that is easy to cause in existing sharing technologies.
[0086] In one example, the sharing module 40 may include:
[0087] A new module is used to share each target data as data to be shared according to a preset sharing period if the operation type of the target data is new;
[0088] The deletion module is used to determine the target data to be deleted corresponding to the target data from the first intermediate table if the operation type of the target data is deletion, and delete the target data to be deleted according to a preset sharing period.
[0089] In one example, the sharing module 40 may further include:
[0090] A first sharing submodule is configured to determine target data that needs to be modified and corresponds to the target data if the operation type of the target data is modification;
[0091] The second sharing submodule is used to modify the corresponding target data that needs to be modified using the target data;
[0092] The third sharing submodule is configured to share the modified target data as data to be shared according to a preset sharing period.
[0093] In one example, the apparatus may include:
[0094] A judgment module is used to judge whether there is target data with abnormal sharing results among each target data;
[0095] an abnormal data determination module, configured to treat each target data item with an abnormal sharing result as each abnormal data item, if any;
[0096] A data sharing party determination module is used to determine the data sharing party corresponding to each piece of abnormal data;
[0097] The warning module is used to send a warning instruction to the data sharing party corresponding to the abnormal data, so that the data sharing party corresponding to the abnormal data can determine new target data according to the warning instruction.
[0098] In one example, the warning module may include:
[0099] A sharing failure type determination module is used to determine the sharing failure type of the abnormal data according to the sharing result;
[0100] The new target data determination module is used to send a warning instruction marked with the sharing failure type to the data sharing party corresponding to the abnormal data, so that the data sharing party corresponding to the abnormal data can determine the new target data corresponding to the abnormal data according to the sharing failure type.
[0101] In one example, the sharing module 40 may further include:
[0102] A data ID acquisition module, configured to acquire the last data ID in the data sharing record table within each sharing cycle;
[0103] The positioning module is used to locate the target data corresponding to the data ID in the first intermediate table, and use the next target data corresponding to the data ID in the first intermediate table as the first target data to be shared in the sharing cycle.
[0104] Furthermore, the embodiment of the present application provides a data sharing device based on an intermediate table. Optionally, Figure 5 The hardware structure diagram of the data sharing device based on the intermediate table is shown. Figure 5 The hardware structure of the data sharing device based on the intermediate table may include: at least one processor 01, at least one communication interface 02, at least one memory 03 and at least one communication bus 04.
[0105] In the embodiment of the present application, the number of the processor 01 , the communication interface 02 , the memory 03 , and the communication bus 04 is at least one, and the processor 01 , the communication interface 02 , and the memory 03 communicate with each other through the communication bus 04 .
[0106] The processor 01 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0107] The memory 03 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0108] The memory stores a program, and the processor can call the program stored in the memory. The program is used to execute the following data sharing method based on the intermediate table, including:
[0109] In response to data sharing request instructions initiated by each data sharing party, determine each target data that each data sharing party needs to share;
[0110] Obtain the data creation time, data ID, and operation type of each target data;
[0111] Input the data ID and operation type of each target data into a pre-established intermediate table in the order of data creation time to obtain a first intermediate table;
[0112] share each piece of target data in the first intermediate table according to a preset sharing period based on the operation type, and obtain a sharing result corresponding to each piece of target data, and return the sharing result corresponding to each piece of target data to the first intermediate table; wherein in each sharing period, the first piece of target data that needs to be shared in the sharing period is determined in the first intermediate table according to an established data sharing record table; the data sharing record table is composed of a data ID of the last piece of target data shared in each sharing period.
[0113] Optionally, the refinement function and the expansion function of the program can refer to the description of the intermediate table-based data sharing method in the method embodiment.
[0114] The embodiment of the application further provides a storage medium, which can store a program suitable for processor execution, and when the program runs, controls a device where the storage medium is located to execute the following intermediate table-based data sharing method, comprising:
[0115] in response to a request instruction for data sharing initiated by each data sharing party, determining each piece of target data that needs to be shared by each data sharing party;
[0116] obtaining a data creation time, a data ID and an operation type of each piece of target data;
[0117] inputting the data ID and the operation type of each piece of target data into a pre-established intermediate table according to the chronological order of the data creation time, and obtaining a first intermediate table;
[0118] based on the operation type, sharing each piece of target data in the first intermediate table according to a preset sharing period, and obtaining a sharing result corresponding to each piece of target data, and returning the sharing result corresponding to each piece of target data to the first intermediate table; wherein in each sharing period, the first piece of target data that needs to be shared in the sharing period is determined in the first intermediate table according to an established data sharing record table; the data sharing record table is composed of a data ID of the last piece of target data shared in each sharing period.
[0119] Specifically, the storage medium can be a computer readable storage medium, which can be an electronic storage such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM.
[0120] Optionally, the refinement function and the expansion function of the program can refer to the description of the intermediate table-based data sharing method in the method embodiment.
[0121] In addition, each functional module in various embodiments of the present disclosure can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the functions are realized in the form of a software functional module and sold or used as an independent product, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present disclosure.
[0122] Finally, it should be noted that, in this document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0123] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between various embodiments can be referred to each other.
[0124] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data sharing method based on an intermediate table, characterized in that: include: In response to data sharing request instructions initiated by each data sharing party, determine each target data that each data sharing party needs to share; Obtain the data creation time, data ID, and operation type of each target data; Input the data ID and operation type of each target data into a pre-established intermediate table in the order of data creation time to obtain a first intermediate table; Based on the operation type, each target data in the first intermediate table is shared according to a preset sharing cycle, and a sharing result corresponding to each target data is obtained, and the sharing result corresponding to each target data is returned to the first intermediate table; wherein, within each sharing cycle, the first target data to be shared in the sharing cycle is determined in the first intermediate table according to the established data sharing record table; the data sharing record table is composed of the data ID of the last target data shared in each sharing cycle.
2. The method according to claim 1, characterized in that Sharing each target data item in the first intermediate table based on the operation type according to a preset sharing period includes: For each target data, if the operation type of the target data is adding, the target data is shared as the data to be shared according to the preset sharing period; If the operation type of the target data is deletion, the target data to be deleted corresponding to the target data is determined from the first intermediate table, and the target data to be deleted is deleted according to a preset sharing period.
3. The method according to claim 1, characterized in that Sharing each target data item in the first intermediate table based on the operation type according to a preset sharing period includes: If the operation type of the target data is modification, then determining the target data that needs to be modified corresponding to the target data; Use the target data to modify the corresponding target data that needs to be modified; According to the preset sharing cycle, the modified target data is shared as the data to be shared.
4. The method according to claim 1, wherein After returning the sharing results corresponding to each piece of target data to the first intermediate table, the method further includes: Determine from each piece of target data whether there is target data with an abnormal sharing result; If so, each target data item with abnormal sharing result will be treated as abnormal data item; For each piece of abnormal data, determine the data sharing party corresponding to the abnormal data; A warning instruction is sent to the data sharing party corresponding to the abnormal data, so that the data sharing party corresponding to the abnormal data can determine new target data according to the warning instruction.
5. The method according to claim 4, characterized in that The sending of a warning instruction to the data sharing party corresponding to the abnormal data, so that the data sharing party corresponding to the abnormal data determines new target data according to the warning instruction, includes: According to the sharing result, determine the sharing failure type of the abnormal data; A warning instruction marked with the sharing failure type is sent to the data sharing party corresponding to the abnormal data, so that the data sharing party corresponding to the abnormal data can determine new target data corresponding to the abnormal data according to the sharing failure type.
6. The method according to claim 1, characterized in that In each sharing cycle, determining the first target data to be shared in the sharing cycle in the first intermediate table according to the established data sharing record table includes: In each sharing cycle, obtaining the last data ID in the data sharing record table; The target data corresponding to the data ID is located in the first intermediate table, and the next target data corresponding to the data ID in the first intermediate table is used as the first target data to be shared in the sharing cycle.
7. The method according to claim 5, characterized in that The sharing failure types include: incomplete data, incorrect data, duplicate data and lost data.
8. A data sharing device based on an intermediate table, characterized in that: include: A target data determination module, configured to respond to data sharing request instructions initiated by each data sharing party and determine each target data that each data sharing party needs to share; A data information acquisition module is used to obtain the data creation time, data ID and operation type of each target data; An input module, configured to input the data ID and operation type of each target data into a pre-established intermediate table in the order of data creation time, thereby obtaining a first intermediate table; A sharing module is used to share each target data in the first intermediate table according to a preset sharing cycle based on the operation type, obtain a sharing result corresponding to each target data, and return the sharing result corresponding to each target data to the first intermediate table; wherein, in each sharing cycle, the first target data to be shared in the sharing cycle is determined in the first intermediate table according to the established data sharing record table; the data sharing record table is composed of the data ID of the last target data shared in each sharing cycle.
9. A data sharing device based on an intermediate table, characterized in that: including memory and processor; The memory is used to store programs; The processor is configured to execute the program to implement the various steps of the data sharing method based on the intermediate table according to any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the data sharing method based on the intermediate table according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for dynamically sharing and isolating data
CN102469089A
Cloud platform for achieving distributed isomerous data sharing and data sharing method thereof
CN103607469A