Data processing method, device, electronic device and computer readable medium
By synchronizing full data to cloud services in the data center and incremental data to the client, network overhead and data consistency issues when accessing the database with high concurrency are solved, enabling efficient and accurate data services and rapid problem troubleshooting and repair. .
Patent Information
- Application Number
- CN201810783276.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-07-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2038-07-17
AI Technical Summary
The existing technology cannot effectively reduce network overhead when dealing with high concurrent access to the database, and it is difficult to ensure data consistency. Especially when there are a large number of clients or a large number of requests, it can easily lead to problems of full database links and data inconsistency. .
Obtain full data or incremental data from the database through the data center, synchronize the full data to the cloud service, and synchronize the incremental data to the client. The client only reads the incremental data from the data center through the version number, avoiding direct access to the database. And all data and version numbers are stored in cloud services for easy management and repair.
It effectively reduces network overhead, prevents database links from being full, achieves accurate and fast data service, avoids complex data expansion methods, and manages all data through cloud services, quickly troubleshoots and repairs erroneous data, and ensures data consistency. .
Smart Images

Figure CN110795495B
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of Internet technology, and in particular, to a data processing method, device, electronic device, and computer-readable medium. Background Art
[0002] At present, with the increase in users, the concurrency of service requests to access the database is getting larger and larger, and the requirements for access speed are getting faster and faster. Whether accessing the database through services or through a unified cache middleware, network overhead cannot be avoided, which will increase network overhead.
[0003] In order to solve the problem of network overhead, the required data can be directly stored in the service memory, which can well meet the requirements of access speed and improve the concurrent processing speed. However, storing the required data directly in the service memory will inevitably cause various problems, such as consistency problems.
[0004] Therefore, the technical solutions in the prior art still need to be improved.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The present disclosure provides a data processing method, device, electronic device and computer-readable medium to solve the above technical problems.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to one aspect of the present disclosure, there is provided a data processing method, comprising:
[0009] The data center obtains full data or incremental data from the database;
[0010] Synchronize the full data and the corresponding version number to the cloud service so that the cloud service stores the full data and the version number;
[0011] The incremental data and the version number corresponding to the incremental data are synchronized to the client through the remote procedure call protocol RPC service.
[0012] In one embodiment of the present disclosure, the data center obtains full data or incremental data from the database including:
[0013] Determine whether a version number exists in the data center, and determine whether the version number exists or not;
[0014] If the judgment result is that it does not exist, the full amount of data is obtained from the database for the first time, and the full amount of data and the corresponding version number are stored in the memory of the data center;
[0015] If the judgment result is that it exists, obtaining corresponding incremental data from the database according to the version number, and storing the incremental data in the memory of the data center;
[0016] The version number is the timestamp of obtaining full data or incremental data from the database.
[0017] In one embodiment of the present disclosure, after the data center obtains the full amount of data from the database, the method further includes:
[0018] Storing the full amount of data stored in the memory of the data center in combination with the corresponding version number into a local file of the data center;
[0019] The full amount of data is verified, and if the verification passes, the full amount of data and the corresponding version number are synchronized to the cloud service.
[0020] In one embodiment of the present disclosure, after the data center obtains the incremental data from the database, the method further includes:
[0021] Storing the incremental data stored in the memory of the data center in a local file of the data center;
[0022] The original full data stored in the local file of the data center is combined with the incremental data and the corresponding version number to form new full data, and the new full data is stored in the local file of the data center.
[0023] In one embodiment of the present disclosure, synchronizing the full amount of data and the version number to the cloud service includes:
[0024] The data center synchronizes the full data and the corresponding version number obtained for the first time or the new full data and the corresponding version number to the cloud service.
[0025] In one embodiment of the present disclosure, after synchronizing the incremental data and the version number corresponding to the incremental data to the client through the remote procedure call protocol RPC service, the method further includes:
[0026] The client obtains the full data and the corresponding version number from the cloud service;
[0027] Verify the full data with the full data already stored in the local file of the client, and obtain new full data according to the verification result;
[0028] The new full data and the corresponding version number are stored in the local file of the client.
[0029] In one embodiment of the present disclosure, it also includes:
[0030] If the client is restarted, the client attempts to load the full data and the corresponding version number stored in the local file of the client after the restart; if the loading fails, the client obtains the full data and the corresponding version number from the cloud service, and obtains incremental data from the data center through the RPS service, and stores the incremental data in the client's memory.
[0031] According to another aspect of the present disclosure, there is provided a data processing device, comprising:
[0032] A data acquisition module, configured to enable the data center to acquire full data or incremental data from a database;
[0033] A full data synchronization module is configured to synchronize the full data and the corresponding version number to a cloud service so that the cloud service stores the full data and the version number;
[0034] The incremental synchronization module is configured to synchronize the incremental data and the version number corresponding to the incremental data to the client through the remote procedure call protocol RPC service.
[0035] According to yet another aspect of the present disclosure, an electronic device is provided, comprising a processor; and a memory storing instructions for the processor to control the method steps as described above.
[0036] According to another aspect of the present disclosure, a computer-readable medium is provided, on which computer-executable instructions are stored. When the executable instructions are executed by a processor, the method steps described above are implemented.
[0037] According to the data processing method, device, electronic device and computer-readable medium provided by the embodiments of the present disclosure, on the one hand, by adding a data center, the data is first read out from the database, and then the full data and incremental data are treated separately, that is, the full data is synchronized to the cloud service, and the incremental data is synchronized to the client, so that the client only needs to read the incremental data from the data center based on the version number of the current existing data, which can prevent the database link from being full due to too many clients or too much requested data. During the whole process, only the data center accesses the database and obtains incremental data, and the client no longer directly accesses the database. When the client access volume is too large, effective and accurate data services can be provided by expanding the data center, avoiding complex and expensive data expansion methods. On the other hand, since the full data and the corresponding version number are stored in the cloud service, the problem of inconsistency between the full data and the database data caused by the client writing the full data directly to the local file of the client can be avoided; and the cloud service can facilitate the management of the full data, and can quickly troubleshoot problems and quickly repair erroneous data. This solution does not use hardware or middleware, which can reduce network overhead.
[0038] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.
[0040] Figure 1 A system architecture diagram of a data processing method and device provided in one embodiment of the present disclosure is shown.
[0041] Figure 2 A flow chart of a data processing method provided in an embodiment of the present disclosure is shown.
[0042] Figure 3 An embodiment of the present disclosure is shown Figure 2 Flowchart of step S210 in FIG.
[0043] Figure 4 An embodiment of the present disclosure is shown Figure 2 Flowchart of step S230 in FIG.
[0044] Figure 5 A data flow diagram in combination with a system architecture in an embodiment of the present disclosure is shown.
[0045] Figure 6 An overall flow chart of data processing steps in an embodiment of the present disclosure is shown.
[0046] Figure 7 A schematic diagram of a data processing device provided in another embodiment of the present disclosure is shown.
[0047] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure and suitable for implementing the embodiment of the present application is shown. DETAILED DESCRIPTION
[0048] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0049] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0050] Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0051] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0052] In the relevant embodiments of the present disclosure, the unified solution for distributed memory can be that each client directly connects to the database for data synchronization, and then persists the full amount of data locally, and then synchronizes incremental data through the database. This solution. If all clients are directly connected to the database to update the local memory, first of all, if the number of clients gradually increases, the database will become a bottleneck for service expansion. When the number of clients is too large or the amount of requested data is too large, the database link will be fully occupied, so the number of clients carried is limited. In addition, since each service is directly connected to the database and then persists the local file, each service needs to store the full file locally, and then the service loads it from the local. The problem caused by this is that if there is an inconsistency in the data, it is difficult to check, and the full files of each service need to be downloaded and compared, which also brings many problems to data repair.
[0053] In addition, it can also be achieved through hardware or middleware (such as Redis). Using hardware to make all clients have consistent memory, such as the data bus to achieve consistency of memory for each service, is not only costly, but also requires the data bus to be connected or disconnected at the same time for expansion and reduction, which makes the lines complicated; in addition, it will have a strong dependence on hardware. If the data bus fails, it will cause various inconsistency problems. Using middleware for unified storage will inevitably generate network overhead and affect performance.
[0054] Based on the above, it is necessary to provide a unified memory solution for distributed systems, which can effectively and accurately update the memory without affecting service performance and ensure the consistency of memory data in the distributed system.
[0055] Figure 1 A system architecture diagram of a data processing method and device provided in one embodiment of the present disclosure is shown.
[0056] like Figure 1 As shown, the system architecture 100 may include a database 101, a data center 102, a cloud service 103, and a client 104. In addition, the system architecture also includes a network, which is used to provide a medium for communication links between the database and the data center, between the data center and the cloud service, between the data center and the client, and between the cloud service and the client. The network may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. In the system architecture 100, the data center 102 and the client 104 are both clustered, namely, a data center service cluster and a client cluster.
[0057] Based on the above system architecture, Figure 2 A flowchart of a data processing method provided in an embodiment of the present disclosure is shown. Figure 1 The data center in the system architecture shown includes the following steps:
[0058] like Figure 2 As shown, in step S210, the data center obtains full data or incremental data from the database.
[0059] like Figure 2 As shown, in step S220, the full data and the corresponding version number are synchronized to the cloud service so that the cloud service stores the full data and the version number.
[0060] like Figure 2 As shown, in step S230, the incremental data and the version number corresponding to the incremental data are synchronized to the client through the Remote Procedure Call Protocol (RPC) service.
[0061] The data processing method provided by the embodiment of the present disclosure first reads the data from the database through the data center, and then treats the full data and the incremental data separately, that is, synchronizes the full data to the cloud service, and synchronizes the incremental data to the client, so that the client only needs to read the incremental data from the data center based on the version number of the current existing data, which can prevent the database link from being full due to an excessive number of clients or an excessive amount of requested data. During the whole process, only the data center accesses the database and obtains incremental data, and the client no longer directly accesses the database. When the client access volume is too large, effective and accurate data services can be provided by expanding the data center, avoiding complex and expensive data expansion methods.
[0062] The following combination Figure 2 The flowchart shown introduces the data processing method provided by the present disclosure in detail, which is as follows:
[0063] In step S210, the data center obtains full data or incremental data from the database.
[0064] In one embodiment of the present disclosure, unlike the prior art, the database is not accessed directly by the client to obtain data, but the database is accessed through the data center.
[0065] Figure 3 A flow chart showing data acquisition by a data center includes the following steps:
[0066] like Figure 3As shown, in step S310, it is determined whether there is a version number in the data center, and the determination result is whether it exists or not. If the determination result is not, it means that it is the first startup, and the process goes to step S320. If the determination result is yes, the process goes to step S330.
[0067] The version number is the timestamp when the full data or incremental data is obtained from the database. Since the data is transmitted and stored successively from the database, data center, cloud service and client, time inconsistencies between different components in the architecture system are avoided. At the same time, in order to avoid time inconsistencies between data centers and clients, the timestamp of data obtained from the database is used as the version number. This timestamp is unique and is generated when the full data is generated. Therefore, the version number can be paired with the data file. In this way, when memory data is lost, the incremental data can be re-obtained from the version number node through the full data file and version number, avoiding missing data and quickly recovering data.
[0068] like Figure 3 As shown, in step S320, the full amount of data is obtained from the database, and the full amount of data and the corresponding version number are stored in the memory of the data center, and then the process goes to step S340.
[0069] like Figure 3 As shown, in step S330, corresponding incremental data is obtained from the database according to the version number, and the incremental data is stored in the memory of the data center.
[0070] like Figure 3 As shown, in step S340, the RPC service data is updated according to the data in the memory of the data center, that is, the incremental data is synchronized to the client.
[0071] based on Figure 3 In the steps shown, the data center uses a timed trigger mechanism to obtain full data or incremental data from the database. After the timed trigger task, the data center loads the data files after the current version number from the database DB according to the version number, writes it to the memory of the data center, and updates the RPC service data in the memory. If there is no version number, it means that it is the first startup, and the full data needs to be loaded from the DB and then written to the memory (that is, the memory of the data center).
[0072] In one embodiment of the present disclosure, after the data center obtains the full amount of data from the database in step S320, the following further includes:
[0073] The full amount of data stored in the memory of the data center is stored in the local file of the data center in combination with the corresponding version number by using a timed trigger mechanism. Then, the full amount of data is verified, and if the verification passes, the full amount of data and the corresponding version number are synchronized to the cloud service.
[0074] A hash algorithm (such as MD5) can be used for verification, specifically by comparing the current MD5 value of the local file with the standard MD5 value to verify whether it is correct and complete, so as to ensure that the latest full data and the corresponding version number are written to the cloud service.
[0075] In one embodiment of the present disclosure, after the data center obtains the incremental data from the database in step S330, the following further steps are included:
[0076] First, the incremental data stored in the memory of the data center is stored in the local file of the data center; secondly, the original full data stored in the local file of the data center is combined with the incremental data and the corresponding version number to form new full data, and the new full data is stored in the local file of the data center.
[0077] In step S220, the full data and the corresponding version number are synchronized to the cloud service so that the cloud service stores the full data and the version number.
[0078] In one embodiment of the present disclosure, synchronizing the full amount of data and the version number to the cloud service includes:
[0079] The data center synchronizes the full data and the corresponding version number obtained for the first time or the new full data and the corresponding version number to the cloud service.
[0080] In step S230, the incremental data and the version number corresponding to the incremental data are synchronized to the client through the remote procedure call protocol RPC service.
[0081] In one embodiment of the present disclosure, Figure 4 The following steps are shown after step S230 in this embodiment synchronizes the incremental data and the version number corresponding to the incremental data to the client through the remote procedure call protocol RPC service, including the following steps:
[0082] like Figure 4 As shown, in step S410, the client obtains the full data and the corresponding version number from the cloud service.
[0083] like Figure 4As shown, in step S420, the full data is verified with the full data stored in the local file of the client, and new full data is obtained according to the verification result.
[0084] like Figure 4 As shown, in step S430, the new full data and the corresponding version number are stored in a local file of the client.
[0085] Based on the above Figure 4 The steps shown always store the latest full data and the corresponding version number in the client's local file. The client accesses the data center through the RPC range according to the startup time in the memory or the version number after the last incremental update, and updates the incremental data in the local memory. In addition, the client periodically obtains the full data and the corresponding version number from the cloud service, updates the local full data file and version file, and ensures that the full file can be loaded normally from the local if the cloud service is abnormal at the next startup.
[0086] In one embodiment of the present disclosure, after step S230, the method further includes:
[0087] If the client is restarted, the client attempts to load the full data and the corresponding version number stored in the local file of the client after the restart; if the loading fails, the client obtains the full data and the corresponding version number from the cloud service, and obtains the incremental data from the data center through the RPC service, and stores the incremental data in the client's memory; if the loading is successful, the full data and the corresponding version number stored in the local file of the client can be directly loaded.
[0088] In this way, when the client is working normally and has not been restarted, the client obtains the full data by accessing the cloud service and stores it in the client's local file, and obtains the incremental data from the data center through the RPC service and stores it in the client's memory. However, if the client is restarted for some reason, the full data and the corresponding version number in the client's local file will be loaded first after the restart. If the record fails, it will be loaded directly from the cloud service, and the incremental data will be obtained from the data center through the RPC service regularly to update the client's memory, thereby ensuring the data consistency of each client in the client cluster.
[0089] Based on the above, Figure 5 Combined with the data flow diagram of the system architecture, the data processing method in the embodiment of the present disclosure is described in detail:
[0090] like Figure 5 As shown, in step S501, data is acquired periodically to update the cache of the data center.
[0091] like Figure 5 As shown, in step S502, full data and version numbers are synchronized periodically.
[0092] like Figure 5 As shown, in step S503, the RPC service synchronizes incremental data.
[0093] like Figure 5 As shown, in step S504, full data and version numbers are obtained periodically.
[0094] pass Figure 5 The system architecture and the corresponding data flow transmission direction are shown. In this system architecture, the data center can prevent the DB from becoming a bottleneck for cluster expansion, and prevent the database link from being full due to excessive number of clients and excessive amount of requested data. Through the data center, only the services in the data center can access the DB, and the client no longer directly accesses the DB, realizing the free expansion of the client. The role of the cloud service in the system architecture is to serve as a persistent data warehouse for full data files and version numbers, avoiding the client from writing the full data files directly to the client locally, which is easy to cause the inconsistency of the full data files. After using the cloud service, the full data files are managed uniformly, which can facilitate and quickly troubleshoot data problems in memory, and can also quickly repair the memory data in each service by repairing the data of the cloud service. The client is the server, and the client needs to obtain full data and incremental data. The full data is obtained by accessing the cloud service and can be written to the local file without restarting. The incremental data in the server memory is incrementally updated by accessing the RPC service to ensure the data consistency of each server.
[0095] Figure 6 The overall flow chart showing the above data processing steps includes the following steps:
[0096] like Figure 6 As shown, in step S601, the data center obtains data from the DB, including the first startup of full data file generation and subsequent incremental data acquisition.
[0097] like Figure 6 As shown, in step S602, the data center periodically writes the data in the memory to the local file, and uses the MD5 check to ensure that all the data is successfully written to the cloud service.
[0098] like Figure 6 As shown, in step S603, the data center provides an RPC service for incremental data to provide services for the client.
[0099] like Figure 6As shown, in step S604, the client cluster starts to load full data from the cloud service for the first time, writes it to the local file, and periodically accesses the RPC service of the data center to update the data in the client memory.
[0100] like Figure 6 As shown, in step S605, the client service obtains full data from the cloud service at a regular interval, and compares and verifies it with the MD5 of the local file, and writes the latest full data and the corresponding version number into the local file.
[0101] like Figure 6 As shown, in step S606, if the client is restarted, the local full amount and the corresponding version number are first loaded. If the acquisition fails, it is loaded directly from the cloud service, and then the client's memory is updated regularly through the RPC service.
[0102] In addition, Figure 6 Based on the steps shown, in the case of an abnormality in the data center, if a data center service in the data center service cluster is abnormal, other data centers can normally provide RPC services and scheduled updates of full files; in the case of all abnormalities in the data center servers, the client will just not update the incremental data normally for a certain period of time. After the data center is restored, the incremental RPC service can be accurately continued to be provided according to the full data file and version number in the cloud service, and no data will be missed. In the case of an abnormality in the cloud service, the client can continue to access the data center regularly through the full data and corresponding version number in the local file to provide memory services; the data center can continue to provide incremental data services, but it is temporarily unable to update the full data. After the cloud service is restored, the data center can continue to write the latest full data and the corresponding version number to the cloud service, allowing the client to continue to update the local full data and the corresponding version number, and no data will be missed.
[0103] It should be noted that in this system architecture, cloud services and RPC service calls can be customized, and memory services are performed by pairing version numbers with full data. This solves the problem of memory data consistency being difficult to locate and repair, avoids dependence on unified memory hardware and the network overhead of cache middleware, and provides a unified memory solution in a distributed system with a sound failover mechanism.
[0104] In summary, the data processing method provided by the embodiment of the present disclosure, on the one hand, reads the data from the database by adding a data center, and then treats the full data and the incremental data separately, that is, synchronizes the full data to the cloud service, and synchronizes the incremental data to the client, so that the client only needs to read the incremental data from the data center based on the version number of the current existing data, which can prevent the database link from being full due to too many clients or too much requested data. During the whole process, only the data center accesses the database and obtains the incremental data, and the client no longer directly accesses the database. When the client access volume is too large, effective and accurate data services can be provided by expanding the data center, avoiding complex and expensive data expansion methods. On the other hand, since the full data and the corresponding version number are stored in the cloud service, the problem of inconsistency between the full data and the database data caused by the client writing the full data directly to the local file of the client can be avoided; and the cloud service can facilitate the management of the full data, and can quickly troubleshoot problems and quickly repair erroneous data. This solution does not use hardware or middleware, which can reduce network overhead.
[0105] Figure 7 A schematic diagram of a data processing device provided in another embodiment of the present disclosure is shown. As shown in FIG7 , the device 700 includes: a data acquisition module 710 , a full synchronization module 720 and an incremental synchronization module 730 .
[0106] The data acquisition module 710 is configured for the data center to obtain full data or incremental data from the database; the full synchronization module 720 is configured to synchronize the full data and the corresponding version number to the cloud service so that the cloud service stores the full data and the version number; the incremental synchronization module 730 is configured to synchronize the incremental data and the version number corresponding to the incremental data to the client through the remote procedure call protocol RPC service.
[0107] The functions of each module in the device refer to the relevant description in the above method embodiment, which will not be repeated here.
[0108] In summary, the data processing device provided by the embodiment of the present disclosure, on the one hand, reads the data from the database by adding a data center, and then treats the full data and the incremental data separately, that is, synchronizes the full data to the cloud service, and synchronizes the incremental data to the client, so that the client only needs to read the incremental data from the data center based on the version number of the current existing data, which can prevent the database link from being full due to too many clients or too much requested data. During the whole process, only the data center accesses the database and obtains the incremental data, and the client no longer directly accesses the database. When the client access volume is too large, effective and accurate data services can be provided by expanding the data center, avoiding complex and expensive data expansion methods. On the other hand, since the full data and the corresponding version number are stored in the cloud service, the problem of inconsistency between the full data and the database data caused by the client writing the full data directly to the local file of the client can be avoided; and the cloud service can facilitate the management of the full data, and can quickly troubleshoot problems and quickly repair erroneous data. This solution does not use hardware or middleware, which can reduce network overhead.
[0109] On the other hand, the present disclosure further provides an electronic device, including a processor and a memory, wherein the memory stores an operation instruction for the processor to control the following method:
[0110] The data center obtains full data or incremental data from the database; synchronizes the full data and the corresponding version number to the cloud service so that the cloud service stores the full data and the version number; and synchronizes the incremental data and the version number corresponding to the incremental data to the client through the remote procedure call protocol RPC service.
[0111] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 suitable for implementing an electronic device of an embodiment of the present application. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0112] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 807 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0113] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0114] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 809, and / or installed from a removable medium 811. When the computer program is executed by a central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present application are executed.
[0115] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0116] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0117] The units involved in the embodiments described in the present application may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor includes a sending unit, an acquisition unit, a determination unit, and a first processing unit. Among them, the names of these units do not constitute a limitation on the units themselves in certain circumstances, for example, the sending unit may also be described as a "unit that sends a picture acquisition request to the connected server."
[0118] On the other hand, the present disclosure also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes the following method steps:
[0119] The data center obtains full data or incremental data from the database; synchronizes the full data and the corresponding version number to the cloud service so that the cloud service stores the full data and the version number; and synchronizes the incremental data and the version number corresponding to the incremental data to the client through the remote procedure call protocol RPC service.
[0120] It should be clearly understood that the present disclosure describes how to form and use specific examples, but the principles of the present disclosure are not limited to any details of these examples. On the contrary, based on the teachings of the contents disclosed in the present disclosure, these principles can be applied to many other embodiments.
[0121] The exemplary embodiments of the present disclosure are specifically shown and described above. It should be understood that the present disclosure is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present disclosure is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.
Claims
1. A data processing method, characterized in that: include: The data center obtains full data or incremental data from the database, wherein the data center and the database are connected via a network; Synchronize the full data and the corresponding version number to the cloud service so that the cloud service stores the full data and the version number; The incremental data and the version number corresponding to the incremental data are synchronized to the client through the remote procedure call protocol RPC service; The data center obtains full data or incremental data from the database including: Determine whether a version number exists in the data center, and determine whether the version number exists or not; If the judgment result is that it does not exist, obtaining the full amount of data from the database for the first time, and storing the full amount of data and the corresponding version number in the memory of the data center; If the judgment result is that it exists, obtaining corresponding incremental data from the database according to the version number, and storing the incremental data in the memory of the data center; The version number is the timestamp of obtaining full data or incremental data from the database.
2. The data processing method according to claim 1, characterized in that: After the data center obtains the full amount of data from the database, the following steps are also performed: Storing the full amount of data stored in the memory of the data center in combination with the corresponding version number into a local file of the data center; The full amount of data is verified, and if the verification passes, the full amount of data and the corresponding version number are synchronized to the cloud service.
3. The data processing method according to claim 1, characterized in that: After the data center obtains the incremental data from the database, the following steps are also performed: Storing the incremental data stored in the memory of the data center in a local file of the data center; The original full data stored in the local file of the data center is combined with the incremental data and the corresponding version number to form new full data, and the new full data is stored in the local file of the data center.
4. The data processing method according to claim 3, characterized in that: Synchronizing the full amount of data and version number to the cloud service includes: The data center synchronizes the full data and the corresponding version number obtained for the first time or the new full data and the corresponding version number to the cloud service.
5. The data processing method according to claim 2, characterized in that: Synchronizing the full amount of data and version number to the cloud service includes: The data center synchronizes the full data and the corresponding version number obtained for the first time or the new full data and the corresponding version number to the cloud service.
6. The data processing method according to claim 1, characterized in that: After synchronizing the incremental data and the version number corresponding to the incremental data to the client through the remote procedure call protocol RPC service, the method further includes: The client obtains the full data and the corresponding version number from the cloud service; Verify the full data with the full data already stored in the local file of the client, and obtain new full data according to the verification result; The new full data and the corresponding version number are stored in the local file of the client.
7. The data processing method according to claim 6, characterized in that: Also includes: If the client is restarted, the client attempts to load the full amount of data and the corresponding version number stored in the local file of the client after the restart; If the loading fails, the client obtains the full data and the corresponding version number from the cloud service, obtains the incremental data from the data center through the RPS service, and stores the incremental data in the memory of the client.
8. A data processing device, characterized in that: include: The data acquisition module is configured to enable a data center to acquire full data or incremental data from a database, wherein the data center and the database are connected via a network; wherein the data center acquires full data or incremental data from the database including: Determine whether a version number exists in the data center, and determine whether the version number exists or not; If the judgment result is that it does not exist, obtaining the full amount of data from the database for the first time, and storing the full amount of data and the corresponding version number in the memory of the data center; If the judgment result is that it exists, obtaining corresponding incremental data from the database according to the version number, and storing the incremental data in the memory of the data center; The version number is the timestamp of obtaining full data or incremental data from the database; A full data synchronization module is configured to synchronize the full data and the corresponding version number to a cloud service so that the cloud service stores the full data and the version number; The incremental synchronization module is configured to synchronize the incremental data and the version number corresponding to the incremental data to the client through the remote procedure call protocol RPC service.
9. An electronic device, characterized in that: include: processor; A memory storing the method steps for the processor to control according to any one of claims 1 to 7.
10. A computer-readable medium having computer-executable instructions stored thereon, characterized in that: When the executable instructions are executed by a processor, the method steps according to any one of claims 1 to 7 are implemented.
