Business data processing method, system, server and readable storage medium

By using the index server in the business data processing system to shard data and store it in HDFS, the target server automatically loads data from HDFS, solving the problems of poor automation capabilities and waste of memory resources, and improving the stability and scalability of the system.

CN112100152BActive Publication Date: 2024-09-13GUANGZHOU OVERSEAS KANGBAZI NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010959886.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-14
Publication Date
2024-09-13
Estimated Expiration
2040-09-14

AI Technical Summary

Technical Problem

The existing business data processing system has poor automation capabilities, insufficient scalability of the memory database, and the persistence of the Redis storage engine leads to a waste of memory resources and affects the stability of the business data processing system.

Method used

Obtain the original incremental business data through the index server, perform data fragmentation processing, and store it in the distributed file system HDFS. The target server pulls and loads the incremental business data from HDFS according to the data version information to the memory, avoiding manual import. Redis, reduces the waste of memory resources.

Benefits of technology

It improves the automation capabilities and scalability of the business data processing system, reduces the waste of memory resources, and ensures the stability and efficiency of business data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112100152B
    Figure CN112100152B
Patent Text Reader

Abstract

The present application relates to a business data processing method, system, server and readable storage medium. The method includes: the index server obtains the original incremental business data, and performs data sharding on the original incremental business data to obtain incremental sharded business data; the index server processes the incremental sharded business data to obtain incremental business data with a preset data structure, and stores the incremental business data in a distributed file system HDFS; the index server updates the data version information in the target server based on the incremental business data, and sends a data version update notification to the target server; the target server pulls the incremental business data corresponding to the updated data version information from HDFS according to the updated data version information, and loads the incremental business data into the memory for client access. The use of this method can improve the automation capability and scalability of the business data processing system and reduce the waste of memory resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a business data processing method, system, server and readable storage medium. Background Art

[0002] As the business continues to grow, the business data processing system needs to process more and more business data. In the existing business data processing system, the business data of offline data sources needs to be manually imported into storage engines such as Redis (RemoteDictionary server, remote dictionary service) to provide online services.

[0003] Take Redis as an example. Redis is a memory-based in-memory database. Redis data is stored centrally in memory. To avoid data loss caused by sudden downtime, RDB (Redis DataBase, the default persistence method of Redis) will periodically copy the data to the memory and then persist the copied data.

[0004] However, the automation capability of the above-mentioned business data processing system needs to be improved, and the scalability of the in-memory database is poor. The persistence of the Redis storage engine will also lead to a waste of memory resources, which is not conducive to the business data processing system to provide stable online services. Summary of the invention

[0005] Based on this, it is necessary to provide a business data processing method, system, server and readable storage medium that can improve the automation capability and scalability of the business data processing system and reduce the waste of memory resources in response to the above technical problems.

[0006] In a first aspect, a business data processing method is provided, which is applied to a business data processing system, wherein the business data processing system includes an index server and multiple business servers, and the method includes:

[0007] The index server obtains original incremental business data, and performs data slicing on the original incremental business data to obtain incremental slicing business data;

[0008] The index server processes the incremental sharded business data to obtain incremental business data with a preset data structure, and stores the incremental business data in a distributed file system HDFS;

[0009] The index server updates the data version information in the target server based on the incremental business data, and sends a data version update notification to the target server, where the target server is one of the multiple business servers;

[0010] The target server pulls the incremental business data corresponding to the updated data version information from the HDFS according to the updated data version information, and loads the incremental business data into the memory for access by the client.

[0011] In one embodiment, the method further comprises:

[0012] The index server generates first data basic information according to the updated data version information of the incremental business data and the first storage address of the incremental business data in the HDFS;

[0013] Correspondingly, the target server pulls the incremental business data corresponding to the updated data version information from the HDFS according to the updated data version information, including:

[0014] The target server obtains the first data basic information from the index server according to the updated data version information;

[0015] The target server pulls the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address according to the first storage address included in the first data basic information.

[0016] In one embodiment, the index server processes the incremental slice service data to obtain incremental service data having a preset data structure, including:

[0017] The index server processes the incremental sliced ​​business data using a zipper method to obtain the incremental business data having a preset data structure.

[0018] In one embodiment, the business data processing system further includes a data source server, and the method further includes:

[0019] The data source server obtains the original incremental business data, stores the original incremental business data in the HDFS, and sends the second data basic information of the original incremental business data to the index server, where the second data basic information at least includes a second storage address of the original incremental business data in the HDFS;

[0020] Correspondingly, the index server obtains original incremental service data, including:

[0021] The index server pulls the original incremental business data from the HDFS storage location indicated by the second storage address according to the second storage address included in the second data basic information.

[0022] In one embodiment, the method further comprises:

[0023] The index server parses the incremental slice service data according to a preset data format to obtain the parsed incremental slice service data;

[0024] Correspondingly, the index server processes the incremental slice service data to obtain incremental service data having a preset data structure, including:

[0025] The index server processes the parsed incremental sliced ​​business data to obtain the incremental business data with a preset data structure.

[0026] In one embodiment, the method further comprises:

[0027] The target server obtains full data version information, and pulls full business data corresponding to the full data version information from the HDFS according to the full data version information, wherein the full data version information is updated in the target server by the index server based on the full business data;

[0028] The target server loads the full amount of business data into memory for client access.

[0029] In one embodiment, the method further comprises:

[0030] If the target server detects a restart trigger event, it pulls the incremental business data from the HDFS according to the updated data version information, and pulls the full business data from the HDFS according to the full data version information;

[0031] The target server loads the pulled incremental business data and the full business data into the memory for access by the client.

[0032] In one embodiment, the method further comprises:

[0033] The index server obtains the full-sharded business data from the HDFS, where the full-sharded business data is obtained by sharding the original full-sharded business data;

[0034] The index server processes the full amount of sliced ​​business data using an open addressing method to generate the full amount of business data having a preset data structure;

[0035] The index server stores the full amount of business data in the HDFS, and generates the third data basic information according to the full amount of data version information of the full amount of business data and the third storage address;

[0036] Correspondingly, the target server pulls the full business data corresponding to the full data version information from the HDFS according to the full data version information, including:

[0037] The target server obtains the third data basic information from the index server according to the full data version information;

[0038] The target server pulls the full business data corresponding to the full data version information from the HDFS storage location indicated by the third storage address according to the third storage address included in the third data basic information.

[0039] In one embodiment, the method further comprises:

[0040] The index server obtains the sharding mode information of the original full service data, and detects whether the sharding mode information is the same as the local sharding mode information, where the local sharding mode information is related to the number of the multiple service servers;

[0041] If the sharding mode information is the same as the local sharding mode information, the index server executes a step of obtaining the full amount of sharding business data from the HDFS by the index server;

[0042] If the sharding mode information is different from the local sharding mode information, the index server shards the original full business data according to the local sharding mode information to obtain the full sharded business data, and executes the step of the index server obtaining the full sharded business data from the HDFS.

[0043] In one embodiment, the target server includes a first shard data copy and a second shard data copy, the first shard data copy and the second shard data copy are used to provide the same data access service, and the target server loads the incremental business data into a memory, including:

[0044] The target server updates the first shard data copy according to the incremental business data. During the data update process of the first shard data copy, the target server provides data access services through the second shard data copy, and prohibits the first shard data copy from providing data access services during the data update process;

[0045] After the data update of the first shard data copy is completed, the target server updates the data of the second shard data copy according to the incremental business data. During the data update process of the second shard data copy, the target server provides data access services through the first shard data copy after the data update, and prohibits the second shard data copy from providing data access services during the data update process.

[0046] In one embodiment, the method further comprises:

[0047] If the index server receives the data address acquisition request sent by the client, the index server determines the service address of the target server according to the data address acquisition request;

[0048] The index server returns the service address to the client;

[0049] The client sends an access request for the incremental service data to the target server according to the service address;

[0050] The target server receives the access request and responds to the access request based on the incremental business data loaded in the memory.

[0051] In one embodiment, the index server determines the service address of the target server according to the data address acquisition request, including:

[0052] The index server parses the data address acquisition request to obtain a key code corresponding to the data address acquisition request;

[0053] The index server determines, according to the key code, from the multiple service servers, a service address of the target server corresponding to the key code.

[0054] In a second aspect, a business data processing system is provided, the business data processing system comprising an index server and a plurality of business servers, the target server being one of the plurality of business servers;

[0055] The index server is used to obtain original incremental business data, and perform data slicing on the original incremental business data to obtain incremental slicing business data, process the incremental slicing business data to obtain incremental business data with a preset data structure, and store the incremental business data in a distributed file system HDFS;

[0056] The index server is further used to update the data version information in the target server based on the incremental business data, and send a data version update notification to the target server;

[0057] The target server is used to pull the incremental business data corresponding to the updated data version information from the HDFS according to the updated data version information, and load the incremental business data into the memory for client access.

[0058] In a third aspect, a server is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the business data processing method as described in the first aspect when executing the computer program.

[0059] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the business data processing method as described in the first aspect above is performed.

[0060] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0061] In the business data processing system of the embodiment of the present application, after the index server obtains the original incremental business data, it performs data sharding on the original incremental business data to obtain the incremental sharded business data. The index server processes the incremental sharded business data to obtain the incremental business data with a preset data structure, and stores the incremental business data in HDFS. In this way, automatic storage and update of the incremental business data is achieved, and through data sharding, the incremental sharded business data after sharding is processed and distributedly stored in HDFS, which can realize distributed management of the original incremental business data. Even if the business data increases dramatically, distributed management of the business data can be realized through data sharding, thereby enhancing the scalability of the business data processing system. Then, the index server is based on the incremental The business data updates the data version information in the target server, and sends a data version update notification to the target server. The target server pulls the incremental business data corresponding to the updated data version information from HDFS according to the updated data version information, and loads the incremental business data into the memory for client access. In this way, the target server automatically pulls the incremental business data directly from HDFS according to the updated data version information, and loads the pulled incremental business data into the memory for client access, realizing the automatic loading of incremental business data and improving the automation capability of the business data processing system. This avoids the problem of poor automation capability of the business data processing system caused by the need to manually import business data into Redis in the memory in the traditional technology to provide online access. In addition, the embodiment of the present application stores the incremental business data in HDFS, and the target server automatically pulls the incremental business data and loads it into the memory, without the need to manually import the incremental business data into Redis, so there is no need to implement persistence based on Redis's RDB, thereby avoiding the waste of memory caused by the need for RDB to copy a copy of the business data in the memory to the memory and then persist the copied data. Therefore, the embodiment of the present application also reduces the waste of memory resources of the target server, which is conducive to providing stable online services. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 An application environment diagram of a business data processing method in an embodiment;

[0063] Figure 2 is a flowchart of a method for processing business data in one embodiment;

[0064] Figure 3 The following is a schematic diagram of an exemplary business data two-sharding process;

[0065] Figure 4 A flowchart of service discovery performed by an index server in one embodiment;

[0066] Figure 5A schematic diagram of an exemplary index server performing service discovery;

[0067] Figure 6 is a flowchart of a method for processing business data in one embodiment;

[0068] Figure 7 is a flowchart of a method for processing business data in one embodiment;

[0069] Figure 8 A flowchart of building a database for an index server in one embodiment;

[0070] Fig. 9 A flowchart of index server database building during service expansion and contraction in one embodiment;

[0071] Fig.10 A flowchart of a target server loading incremental business data into a memory in one embodiment;

[0072] Fig.11 is an exemplary schematic diagram of sharding data;

[0073] Fig.12 is a flowchart of a method for processing business data in one embodiment;

[0074] Fig.13 is a schematic diagram of an exemplary component-based business data processing system;

[0075] Fig.14 FIG. 4 is a diagram showing the internal structure of a server in one embodiment. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0077] Below, the implementation environment involved in the business data processing method provided in the embodiment of the present application will be briefly described.

[0078] The implementation environment includes a business data processing system, which may include Figure 1 The data source server 101, index server 102, multiple business servers and HDFS (Hadoop Distributed File System) 104 shown in the figure need to be explained. Figure 1 The target server 103 is shown only as an example, and the target server 103 is one of the multiple service servers.

[0079] Among them, the data source server 101 can communicate with the index server 102 and the HDFS 104 through the network, the index server 102 can communicate with the data source server 101, the target server 103, the HDFS 104 and the client 105 through the network, and the target server 103 can communicate with the index server 102, the HDFS 104 and the client 105 through the network.

[0080] Among them, the data source server 101 and the index server 102 can be a single server or a server cluster composed of multiple servers. The data source server 101, the index server 102 and the target server 103 can be tower servers, rack servers, blade servers, high-density servers, single-way servers, dual-way servers or multi-way servers, etc. The client 105 can be a personal computer, a laptop computer, a media player, a smart TV, a smart phone, a tablet computer and a portable wearable device, etc., and the embodiments of the present application do not make specific limitations on this.

[0081] In one embodiment, Figure 2 As shown, a business data processing method is provided, which is applied to Figure 1 The business data processing system shown in the figure is used as an example for explanation. The business data processing system may include an index server and multiple business servers, and the target server is a business server in the multiple business servers. The method includes steps 201, 202, 203 and 204:

[0082] Step 201: The index server obtains original incremental business data, and performs data slicing on the original incremental business data to obtain incremental slicing business data.

[0083] In the business data processing system, there is a large amount of offline business data. The index server processes these business data accordingly, then builds a database for the processed business data and stores the processed business data in a distributed manner in HDFS (Hadoop Distributed File System). The target server can directly pull these processed business data from HDFS and load them into memory for client access.

[0084] As time goes by, the business data processing system will continuously generate new business data, that is, original incremental business data. The index server obtains the original incremental business data and performs data sharding on the original incremental business data to obtain incremental sharded business data. In a possible implementation, the index server can divide the original incremental business data into multiple shards through map-reduce tasks. In this way, each shard can be distributedly stored in HDFS after being processed by the index server, thereby realizing distributed management of the original incremental business data.

[0085] See also Figure 3 , Figure 3 FIG. 1 shows an exemplary schematic diagram of a business data two-sharding process. Figure 3 As shown, the index server divides the original incremental business data into two shards through the map-reduce task, and each shard is an incremental shard business data.

[0086] Step 202: The index server processes the incremental sharded business data to obtain incremental business data with a preset data structure, and stores the incremental business data in a distributed file system HDFS.

[0087] In an embodiment of the present application, the index server processes the incremental sharded business data before storing it, and processes the incremental sharded business data to obtain incremental business data with a preset data structure. The preset data structure can be in the form of a hash table, for example, which is conducive to quick search of incremental business data.

[0088] In a possible implementation of step 202, the index server may process the incremental sliced ​​business data using a zipper method to obtain incremental business data having a preset data structure.

[0089] The zipper method is also called the chain address method. The zipper method is to put the keyword (synonym) values ​​with the same hash address in the same single linked list (synonym linked list). The index server uses the zipper method to hash the incremental sharding business data and generate incremental business data corresponding to the incremental sharding business data. The incremental business data generated by the zipper method supports modification and insertion, so that the incremental business data can be automatically updated.

[0090] The index server processes the incremental sharded business data, obtains the incremental business data with a preset data structure, and stores the incremental business data in the distributed file system HDFS. In this way, the automatic storage and update of the incremental business data is realized. Through data sharding, the incremental sharded business data after sharding is processed and distributedly stored in HDFS, which can realize the distributed management of the original incremental business data. Even if the business data increases dramatically, the distributed management of the business data can be realized through data sharding, which enhances the scalability of the business data processing system.

[0091] Step 203: The index server updates the data version information in the target server based on the incremental business data, and sends a data version update notification to the target server.

[0092] The target server is one of the multiple business servers.

[0093] After the index server stores the incremental business data in HDFS, it updates the data version information of the incremental business data to the target server and sends a data version update notification to the target server, prompting the target server to pull the incremental business data from HDFS based on the data version information of the incremental business data.

[0094] In the embodiment of the present application, the data version information may represent the version information of the service data. For example, the data version information of the incremental service data may be the version number of the incremental service data.

[0095] Step 204 , the target server pulls the incremental business data corresponding to the updated data version information from HDFS according to the updated data version information, and loads the incremental business data into the memory for access by the client.

[0096] After the target server receives the data version update notification sent by the index server, it pulls the incremental business data corresponding to the updated data version information from HDFS based on the updated data version information (that is, the data version information of the incremental business data updated to the target server by the index server).

[0097] In a possible implementation, after the index server stores the incremental business data in HDFS, the index server may also generate first data basic information based on the updated data version information of the incremental business data and the first storage address of the incremental business data in HDFS, wherein the updated data version information is used by the target server to obtain the first data basic information based on the updated data version information, and the first data basic information is used by the target server to pull the incremental business data according to the HDFS storage location indicated by the first storage address. The target server may implement the process of step 204 by executing the following steps A11 and A12:

[0098] Step A11: The target server obtains the first data basic information from the index server according to the updated data version information.

[0099] Step A12: The target server pulls the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address according to the first storage address included in the first data basic information.

[0100] In this way, when the target server pulls the incremental business data corresponding to the updated data version information from HDFS based on the updated data version information, it can obtain the first data basic information from the index server based on the updated data version information, and then pull the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address included in the first data basic information.

[0101] After the target server pulls the incremental business data from HDFS, it automatically loads the incremental business data into the target server's memory. This achieves automatic loading of incremental business data and improves the automation capability of the business data processing system.

[0102] If the target server receives an access request for the incremental business data sent by the client, the target server responds to the data access request based on the incremental business data in the memory, allowing the client to access the incremental business data loaded into the memory. In this way, the offline business data is automatically converted into online services, thereby improving the efficiency of business data processing.

[0103] Optionally, the target server of the embodiment of the present application can be deployed in a container cluster such as kubernetes. Taking kubernetes as an example, the target server, as a service node in kubernetes, provides data access services to the client by starting the container deployed in the pod in the target server. When the container is running, it can provide the client with services such as reading and writing incremental business data.

[0104] Optionally, the index server can also be deployed in Kubernetes. The index server performs service discovery through consul, which is an open source tool developed based on the GO language. It mainly provides service registration, service discovery and configuration management functions for distributed and service-oriented systems.

[0105] In one possible implementation, see Figure 4 The process of service discovery by the index server through consul may include Figure 4 Step 401, step 402, step 403 and step 404 shown:

[0106] Step 401: If the index server receives a data address acquisition request sent by a client, the index server determines the service address of the target server according to the data address acquisition request.

[0107] The client sends a data address acquisition request to the index server to obtain the address of the accessible business server. The index server determines the target server for providing services to the client from multiple business servers through consul.

[0108] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of an exemplary index server performing service discovery. Figure 5 As shown, the server can be a business server. Consul regularly performs health checks on each server to detect whether each server is operating normally, adds the normally operating servers to the server list, and removes the non-operating servers from the server list to ensure that the business servers in the server list can provide services normally.

[0109] The index server obtains the service address of the normally running server from consul. The service address can be in the form of IP:Port. The index server can establish a mapping relationship between each key code and each service address. Different key codes correspond to different service addresses. The key code can be in the form of a string.

[0110] In a possible implementation, the index server can parse the data address acquisition request to obtain the key code corresponding to the data address acquisition request. The index server determines the service address of the target server corresponding to the key code from multiple business servers based on the key code and the established mapping relationship, so as to implement the process of determining the target server for providing services to the client from multiple business servers through consul. The index server of the embodiment of the present application performs service discovery through consul, realizes the decoupling of the client and the business server, and improves the efficiency of business processing.

[0111] Step 402: The index server returns the service address to the client.

[0112] Step 403: The client sends an access request for incremental business data to the target server according to the service address.

[0113] Step 404: The target server receives the access request and responds to the access request based on the incremental business data loaded in the memory.

[0114] After the index server determines the service address of the target server from multiple business servers, the index server returns the service address to the client. The client sends an access request for incremental business data to the service address. After receiving the access request, the target server responds to the data access request based on the incremental business data loaded in the memory, so that the client can access the incremental business data. As an implementation method, the client can access the business data from the target server through the http-proxy interface.

[0115] In an embodiment of the present application, the client can send a data address acquisition request including a key code, and obtain the service address of the target server returned from the index server. The client can then access the incremental business data in the target server based on the service address, thereby realizing the client's kv (key-value) query access.

[0116] In other embodiments, the index server may also establish a vector database when building a database, so that the client can implement vector-based business data query access, which is not specifically limited here.

[0117] In the business data processing system of the embodiment of the present application, after the index server obtains the original incremental business data, it shards the original incremental business data to obtain the incremental sharded business data. The index server processes the incremental sharded business data to obtain the incremental business data with a preset data structure, and stores the incremental business data in HDFS. In this way, the automatic storage of the incremental business data is realized, and the distributed management of the original incremental business data can be realized through data sharding, and even if the business data increases dramatically, the distributed management of the business data can be realized through data sharding, thereby enhancing the scalability of the business data processing system. Then, the index server is based on the incremental business The target server updates the data version information in the target server according to the updated data version information, and sends a data version update notification to the target server. The target server pulls the incremental business data corresponding to the updated data version information from HDFS according to the updated data version information, and loads the incremental business data into the memory for client access. In this way, the target server automatically pulls the incremental business data directly from HDFS according to the updated data version information, and loads the pulled incremental business data into the memory for client access, realizing the automatic loading of incremental business data and improving the automation capability of the business data processing system. This avoids the problem of poor automation capability of the business data processing system caused by the need to manually import business data into Redis in the memory in the traditional technology to provide online access. In addition, the embodiment of the present application stores the incremental business data in HDFS, and the target server automatically pulls the incremental business data and loads it into the memory, without the need to manually import the incremental business data into Redis, so there is no need to implement persistence based on Redis's RDB, thereby avoiding the waste of memory caused by the need for RDB to copy a copy of the business data in the memory to the memory and then persist the copied data. Therefore, the embodiment of the present application also reduces the waste of memory resources of the target server, which is conducive to providing stable online services.

[0118] In one embodiment, based on the above Figure 2 The embodiment shown in the figure is related to how the index server obtains the original incremental business data and how the index server normalizes the incremental business data. The business data processing system of this embodiment also includes a data source server, such as Figure 6 As shown, the business data processing method provided in this embodiment also includes step 205:

[0119] Step 205: The data source server obtains the original incremental business data, stores the original incremental business data in HDFS, and sends the second data basic information of the original incremental business data to the index server.

[0120] Among them, the second data basic information at least includes the second storage address of the original incremental business data in HDFS.

[0121] Correspondingly, step 201 may include: Figure 6 Steps shown in 2011:

[0122] Step 2011: The index server pulls the original incremental business data from the HDFS storage location indicated by the second storage address according to the second storage address included in the second data basic information, and performs data sharding on the original incremental business data to obtain incremental sharded business data.

[0123] Please continue to see Figure 6 After step 2011, the business data processing method provided in this embodiment may further include step 206:

[0124] Step 206: The index server parses the incremental shard service data according to a preset data format to obtain the parsed incremental shard service data.

[0125] In an embodiment of the present application, the index server performs data sharding on the original incremental business data, and after obtaining the incremental sharded business data, the index server can parse the incremental sharded business data according to a preset data format to obtain the parsed incremental sharded business data. The preset data format can be, for example, Protobuf format.

[0126] Correspondingly, step 202 may include: Figure 6 Steps shown 2021:

[0127] In step 2021, the index server processes the parsed incremental sharded business data to obtain incremental business data with a preset data structure, and stores the incremental business data in HDFS.

[0128] The index server can use the zipper method to perform hash processing on the parsed incremental sharding business data to generate incremental business data to implement the process of step 202. In this way, the parsed incremental sharding business data are all in a unified data format, and the user obtains structured data, achieving the purpose of normalizing the data. The problem of difficult data maintenance caused by complex data sources and diverse data definitions in traditional technologies is avoided. This embodiment reduces the difficulty of maintaining incremental business data.

[0129] In one embodiment, based on the above Figure 2The embodiment shown in the figure is related to the process of how the target server provides client access based on the full amount of business data, and how the target server restores the business data when the target server is restarted. In the embodiment of the present application, the full amount of business data can be historical business data, and the incremental business data is the newly added business data.

[0130] See also Figure 7 , the target server can execute Figure 7 Steps 701 and 702 shown implement a process of providing client access based on full business data:

[0131] Step 701: The target server obtains full data version information, and pulls full business data corresponding to the full data version information from HDFS based on the full data version information.

[0132] The full data version information is updated by the index server in the target server based on the full business data.

[0133] In the embodiment of the present application, the full business data may be obtained after the index server performs corresponding processing on the original full business data, such as sharding processing, hash processing, etc. After the index server performs corresponding processing on the original full business data, the obtained full business data is stored in HDFS.

[0134] The index server updates the full data version information of the full business data to the target server and notifies the target server to pull the full business data. The target server then pulls the full business data corresponding to the full data version information from HDFS based on the full data version information.

[0135] Step 702: The target server loads all the business data into the memory for access by the client.

[0136] The target server loads the full amount of business data into memory. When the client accesses the full amount of business data and / or incremental business data, the target server can provide services to the client based on the business data loaded in memory. In this way, offline business data is automatically converted into online services, which improves the efficiency of business processing.

[0137] Please continue to see Figure 7 , the target server can execute Figure 7 Steps 703 and 704 shown implement the process of restoring business data when the target server is restarted:

[0138] Step 703: If the target server detects a restart trigger event, it pulls incremental business data from HDFS according to the updated data version information, and pulls full business data from HDFS according to the full data version information.

[0139] Step 704: The target server loads the pulled incremental business data and full business data into the memory for access by the client.

[0140] In an embodiment of the present application, if the target server unexpectedly crashes or other conditions occur, causing the target server to restart, the target server re-obtains the full data version information and the updated data version information from the index server. The target server pulls the incremental business data from HDFS based on the updated data version information, and pulls the full business data from HDFS based on the full data version information.

[0141] The target server loads the pulled incremental business data and full business data into memory. When the client accesses the full business data and / or incremental business data, the target server can provide services to the client based on the business data loaded in memory. In this way, even if the target server is restarted, data will not be lost.

[0142] In traditional technology, in order to avoid business data loss when the server is restarted, data persistence is generally performed through Redis's RDB, which causes the problem of double memory usage during data persistence, resulting in a waste of memory resources. In the embodiment of the present application, after the target server is restarted, business data can be pulled from HDFS based on the updated data version information and the full data version information, thereby eliminating the need to occupy additional memory of the target server for data persistence, saving memory resources of the target server.

[0143] In one embodiment, based on the above Figure 7 The embodiment shown, see Figure 8 This embodiment involves the process of indexing the entire business data database. Figure 8 As shown, the process may include step 801, step 802 and step 803:

[0144] Step 801: The index server obtains the full amount of sharded business data from HDFS.

[0145] In an embodiment of the present application, the business data processing system also includes a data source server. In one possible implementation, the data source server exports full-sharded business data, which is obtained after data sharding the original full-shard business data. The data source server pushes the full-sharded business data to HDFS.

[0146] In another possible implementation, the data source server exports the original full business data, and the data source server can push the original full business data to HDFS. Thereafter, the index server shards the original full business data to obtain full sharded business data, and stores the full business data in HDFS.

[0147] In this way, the index server can obtain the full amount of sharded business data from HDFS.

[0148] Step 802: The index server processes the full amount of sharded business data using an open addressing method to generate full amount of business data with a preset data structure.

[0149] The preset data structure may be in the form of a hash table, for example. The open addressing method is a method of handling conflicts, which starts from the unit where the conflict occurs, finds a free storage unit from the hash table in a certain order, and stores the conflicting element to be inserted into the unit.

[0150] In the embodiment of the present application, the index server uses an open addressing method to perform hash processing on the full shard business data to generate full business data corresponding to the full shard business data. The full business data generated by the open addressing method is compact, which is conducive to reducing the storage space occupied by the full business data.

[0151] Step 803: The index server stores the full business data in HDFS, and generates the third data basic information according to the full data version information of the full business data and the third storage address.

[0152] Among them, the full data version information is used by the target server to obtain the third data basic information according to the full data version information, and the third data basic information is used by the target server to pull the full business data corresponding to the full data version information according to the HDFS storage location indicated by the third storage address, thereby realizing the construction of a database for the full business data.

[0153] In a possible implementation, after step 803, the target server may implement the process of step 701 by executing the following steps A21 and A22:

[0154] Step A21: The target server obtains the third data basic information from the index server according to the full data version information.

[0155] Step A22: The target server pulls the full business data corresponding to the full data version information from the HDFS storage location indicated by the third storage address according to the third storage address included in the third data basic information.

[0156] In the embodiment of the present application, after the index server stores the full amount of business data in HDFS, the index server generates the third data basic information according to the full data version information of the full amount of business data and the third storage address, and the index server updates the data version information in the target server and notifies the target server to pull the data. The target server obtains the full data version information, and obtains the third data basic information corresponding to the full data version information from the index server according to the full data version information. Then, the target server pulls the full amount of business data corresponding to the full data version information from the HDFS storage location indicated by the third storage address according to the third storage address included in the third data basic information.

[0157] In this way, by building a database for the full amount of offline business data in HDFS, the target server automatically pulls the full amount of business data from HDFS and loads it into the memory to provide data access services, thus realizing the automatic database building of offline business data and achieving the effect of automatic conversion of offline business data into online services.

[0158] Optionally, after step 801, the service data processing method of this embodiment may further include step A31:

[0159] Step A31: The index server parses the full-volume sharded business data according to a preset data format to obtain the parsed full-volume sharded business data.

[0160] In the embodiment of the present application, after the index server obtains the full shard service data from HDFS, the index server parses the full shard service data according to a preset data format to obtain the parsed full shard service data. The preset data format may be, for example, Protobuf (Google Protocol Buffer).

[0161] Correspondingly, the index server can implement the process of step 802 by using an open addressing method to perform hash processing on the parsed full shard business data to generate full business data. In this way, the parsed full shard business data are all in a unified data format, and the user gets structured data, achieving the purpose of normalizing the data. This avoids the problem of difficult data maintenance caused by complex data sources and diverse data definitions in traditional technologies. This embodiment reduces the difficulty of maintaining full business data.

[0162] In one embodiment, based on the above Figure 8 The embodiment shown, see Fig. 9 This embodiment involves the process of how the target server builds a database for offline business data during the service expansion and contraction process. Fig. 9 As shown, the process may include the following steps:

[0163] Step 901: The index server obtains the sharding mode information of the original full business data, and detects whether the sharding mode information is the same as the stored local sharding mode information.

[0164] In actual application scenarios, as the business changes, it is often necessary to expand or reduce the number of business servers. After the expansion or reduction, the number of business servers in the business data processing system will change.

[0165] Taking into account the above-mentioned expansion and contraction situations, in an embodiment of the present application, the index server first obtains the sharding mode information of the original full business data before building the database, and detects whether the sharding mode information is the same as the stored local sharding mode information. The local sharding mode information is related to the number of multiple business servers. For example, the local sharding mode information can be the number of business servers in the business data processing system after expansion and contraction.

[0166] Take the expansion scenario as an example. For example, the index server shards the original full business data into 2 shards. Then, the sharding information of the original full business data obtained by the index server is 2. After the expansion, the number of business servers in the business data processing system is 4, and the index server detects whether 2 and 4 are the same.

[0167] If the sharding mode information is the same as the local sharding mode information, then the sharding mode representing the original full business data and the number of business servers after expansion and contraction match, and the index server executes steps 801, 802, and 803 as described above to build a database for the offline business data.

[0168] If the sharding mode information is different from the local sharding mode information, it indicates that the sharding mode of the original full business data is sharded according to the number of business servers before expansion or contraction. Therefore, the original full business data needs to be re-sharded to match the number of business servers after expansion or contraction. The index server then executes step 902:

[0169] In step 902, the index server performs data sharding on the original full business data according to the local sharding method information to obtain full sharded business data.

[0170] The server shards the original full business data according to the local sharding method information, that is, it re-shards the original full business data according to the number of machines after expansion and contraction to obtain the full sharded business data. The index server stores the full sharded business data in HDFS.

[0171] After re-sharding, based on step 902, the index server executes steps 801, 802 and 803 as above to build a database for the offline business data.

[0172] In the embodiment of the present application, the index server can automatically build the database according to the expansion and contraction conditions when building the database, thereby realizing the automatic management of offline business data and better meeting the actual business needs for expansion and contraction.

[0173] In one embodiment, in the above Figure 2 Based on the embodiment shown, see Fig.10 , this embodiment relates to the process of the target server loading incremental business data into the memory. In the embodiment of the present application, the target server includes a first shard data copy and a second shard data copy, and the first shard data copy and the second shard data copy are used to provide the same data access service. Fig.10 As shown, the process may include step 2041 and step 2042:

[0174] Step 2041, the target server updates the first shard data copy according to the incremental business data. During the data update process of the first shard data copy, the target server provides data access services through the second shard data copy, and prohibits the first shard data copy from providing data access services during the data update process.

[0175] In the embodiment of the present application, each node has multiple copies, and the node is a business server. The first shard data copy and the second shard data copy can be two copies of the incremental business data of the previous version (assuming it is called historical incremental business data), and both copies provide access services to the historical incremental business data.

[0176] If the historical incremental business data is updated, the updated data is the incremental business data of the embodiment of the present application. After the target server obtains the incremental business data, it needs to load the incremental business data into the memory to update the historical incremental business data with the incremental business data.

[0177] In the embodiment of the present application, the target server will update the shard data copies one by one, thus ensuring that at least one shard data copy can provide services.

[0178] As an implementation method, the target server is deployed in Kubernetes, and the first shard data copy and the second shard data copy provide external services through different pods. When the target server updates the data of the first shard data copy according to the incremental business data, the target server changes the state of the pod corresponding to the first shard data copy from running to stopped running to prohibit the first shard data copy from providing data access services during the data update process. If there is an access request from the client, the target server provides data access services to the client through the pod corresponding to the second shard data copy.

[0179] Step 2042, after the data update of the first shard data copy is completed, the target server updates the data of the second shard data copy according to the incremental business data. During the data update of the second shard data copy, the target server provides data access services through the first shard data copy after the data update, and prohibits the second shard data copy from providing data access services during the data update process.

[0180] After the target server completes updating the data of the first shard data copy according to the incremental business data, the target server updates the data of the second shard data copy according to the incremental business data.

[0181] Similarly, the target server changes the status of the pod corresponding to the second shard data copy from running to stopped running to prohibit the second shard data copy from providing data access services during the data update process. If there is an access request from the client, the target server provides data access services to the client through the pod corresponding to the first shard data copy after the data is updated. As a result, the online business will not be affected during the process of loading into the memory, ensuring the service quality of the online service and avoiding the problem of unstable service caused by providing external services while updating business data in traditional technologies.

[0182] See also Fig.11 , Fig.11 is an exemplary schematic diagram of shard data. Fig.11 As shown, shard 1 and shard 2 can be different business shard data, for example, shard 1 and shard 2 can be different incremental business data. Shard 1 is loaded into the memory of the first business server by the first business server, and shard 2 is loaded into the memory of the second business server by the second business server. Pod:0 and pod:1 are two shard data copies of shard 1, and pod:2 and pod:3 are two shard data copies of shard 2.

[0183] During the data update process, the first business server updates pod:0 and provides services through pod:1, and the second business server updates pod:2 and provides services through pod:3. The timestamps of pod:1 and pod:3 are consistent, that is, the data version information is consistent, for example, both are 20200401.

[0184] After pod:0 and pod:2 are updated, the data version information of pod:0 and pod:2 are updated to the latest version information, for example, updated to 20200402, the first business server updates pod:1 and the second business server updates pod:3, so that the updated pod:0 and pod:2 provide services.

[0185] Therefore, for the same batch of data access, the business data processing system is based on version control. Each accessed business server provides a shard data copy with the same timestamp (data version information) for client access, thereby ensuring that the same batch of data access accesses the same version of business data, ensuring consistency of data access.

[0186] In one embodiment, see Fig.12 , provides a flowchart of a business data processing method, which can be applied to Figure 1 In the implementation environment shown. Fig.12 As shown, the method may include the following steps:

[0187] Step 1001: The data source server exports the full amount of sharded business data, and the data source server pushes the full amount of sharded business data to HDFS.

[0188] The full-volume sharded business data is obtained by sharding the original full-volume business data.

[0189] Step 1002: The data source server obtains original incremental business data, stores the original incremental business data in HDFS, and sends the second data basic information of the original incremental business data to the index server.

[0190] The second data basic information at least includes a second storage address of the original incremental business data; the data source server can continuously obtain the original incremental business data.

[0191] Step 1003: The index server pulls the original incremental business data from the HDFS storage location indicated by the second storage address according to the second storage address included in the second data basic information, and performs data sharding on the original incremental business data to obtain incremental sharded business data.

[0192] Step 1004: The index server obtains the sharding mode information of the original full business data and the original incremental business data, and detects whether the sharding mode information is the same as the local sharding mode information.

[0193] Step 1005: If they are the same, the index server parses the full shard business data according to a preset data format to obtain the parsed full shard business data.

[0194] Step 1006: The index server processes the parsed full-volume sharded business data using an open addressing method to generate full-volume business data with a preset data structure.

[0195] Step 1007, the index server stores the full business data in HDFS, generates the third data basic information according to the full data version information of the full business data and the third storage address, and notifies the target server to pull the data.

[0196] Step 1008: The target server obtains the full data version information, and obtains the third data basic information corresponding to the full data version information from the index server based on the full data version information.

[0197] Step 1009: The target server pulls the full business data corresponding to the full data version information from the HDFS storage location indicated by the third storage address according to the third storage address included in the third data basic information.

[0198] Step 1010: The index server parses the incremental shard service data according to a preset data format to obtain the parsed incremental shard service data.

[0199] Step 1011: The index server processes the parsed incremental sharded business data using a zipper method to generate incremental business data with a preset data structure.

[0200] Step 1012: The index server stores the incremental business data in HDFS, and generates first data basic information according to the updated data version information of the incremental business data and the first storage address of the incremental business data in HDFS.

[0201] Step 1013: The index server updates the data version information in the target server based on the incremental business data, and sends a data version update notification to the target server.

[0202] Step 1014: If the target server receives the data version update notification sent by the index server, it obtains the first data basic information from the index server according to the updated data version information.

[0203] Step 1015: The target server pulls the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address according to the first storage address included in the first data basic information.

[0204] Step 1016: The target server loads the full business data and incremental business data into memory for access by the client.

[0205] During the process of the target server loading the incremental business data into the memory, the target server updates the data of the first shard data copy according to the incremental business data. During the process of updating the data of the first shard data copy, the target server provides data access services through the second shard data copy, and prohibits the first shard data copy from providing data access services during the data update process; the target server includes the first shard data copy and the second shard data copy, and the first shard data copy and the second shard data copy are used to provide the same data access service.

[0206] After the data update of the first shard data copy is completed, the target server updates the data of the second shard data copy according to the incremental business data. During the data update of the second shard data copy, the target server provides data access services through the first shard data copy after the data update, and prohibits the second shard data copy from providing data access services during the data update process.

[0207] Step 1017, if the index server receives a data address acquisition request sent by the client, the index server parses the data address acquisition request and obtains a key code corresponding to the data address acquisition request. The index server determines the service address of the target server corresponding to the key code from multiple business servers based on the key code, and the index server returns the service address to the client.

[0208] Step 1018: The client sends a request for accessing business data to the target server according to the service address.

[0209] Step 1019: If the target server receives a request for accessing business data sent by the client, it responds to the data access request based on the full business data and / or incremental business data in the memory.

[0210] Step 1020: If the target server detects a restart trigger event, it pulls incremental business data from HDFS according to the updated data version information, and pulls full business data from HDFS according to the full data version information.

[0211] Step 1021: The target server loads the pulled incremental business data and full business data into memory for client access.

[0212] In the embodiment of the present application, as an implementation method, the index server may include a delta sharding component and a peta update component, and the index server executes the steps of the index server based on the multiple components. The target server may include a consul component and a controller component, and the target server executes the steps of the target server based on the multiple components.

[0213] The index server, target server, data source server, HDFS, and each component can be accessed through interfaces. Fig.13 , Fig.13 This is a schematic diagram of an exemplary component-based business data processing system. The client accesses the server through petaclient. The data interaction process based on the interface between the index server, target server, data source server, HDFS and each component is as follows:

[0214] 1) The data source server ts exports the full sharded business data base, and ts pushes the full sharded business data to HDFS.

[0215] 2) ts obtains the original incremental business data delta, stores the original incremental business data in HDFS, and calls the add_delta_file interface of the index server to send the second data basic information of the original incremental business data to the index server.

[0216] Among them, the second data basic information at least includes the second storage address of the original incremental business data, and ts can continuously obtain the original incremental business data.

[0217] 3) Delta sharding periodically accesses the index server, obtains the basic information of the second data through the get_delta_sharding_file interface and the set_delta_sharding_file_working interface, runs the Map / Reduce task to shard the original incremental business data, and obtains the incremental shard business data after sharding. Delta sharding stores the incremental shard business data in HDFS, and calls add_delta_sharded_file to push the file information of the incremental shard business data to the index server. The file information of the incremental shard business data includes the data version information and storage path information of the incremental shard business data.

[0218] 4) Before building the database, peta update calls the add_and_get_shard_count interface of the index server to obtain the sharding information of the original full business data and the original incremental business data, and checks whether the sharding information is the same as the local sharding information.

[0219] 5) If they are the same, peta update parses the full shard business data according to the preset data format to obtain the parsed full shard business data. peta update uses an open addressing method to process the parsed full shard business data to generate full business data with a preset data structure. peta update stores the full business data in HDFS, and generates the third data basic information based on the full data version information of the full business data and the third storage address.

[0220] 6) peta update parses the incremental sharding business data according to a preset data format to obtain the parsed incremental sharding business data. peta update uses a zipper method to process the parsed incremental sharding business data to generate incremental business data with a preset data structure. peta update stores the incremental business data in HDFS, and generates the first data basic information according to the updated data version information of the incremental business data and the first storage address.

[0221] 7) peta update updates the data version information on consul and notifies the controller to pull data.

[0222] 8) The controller calls the get_base_and_delta_file_list of the index server to obtain the full data version information, and obtains the third data basic information corresponding to the full data version information from the index server according to the full data version information. The controller pulls the full business data corresponding to the full data version information from the HDFS storage location indicated by the third storage address included in the third data basic information.

[0223] 9) The controller calls get_base_and_delta_file_list of the index server to obtain the updated data version information. The controller obtains the first data basic information corresponding to the updated data version information from the index server according to the updated data version information. The controller pulls the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address included in the first data basic information.

[0224] 10) The controller triggers the server to load data. The server loads the full business data and incremental business data into memory for client access.

[0225] During the process of the server loading the incremental business data into the memory, the server updates the first shard data copy according to the incremental business data. During the process of updating the first shard data copy, the server provides data access services through the second shard data copy, and prohibits the first shard data copy from providing data access services during the data update process. The server includes the first shard data copy and the second shard data copy, and the first shard data copy and the second shard data copy are used to provide the same data access service.

[0226] After the data update of the first shard data copy is completed, the server updates the data of the second shard data copy according to the incremental business data. During the data update of the second shard data copy, the server provides data access services through the updated first shard data copy, and prohibits the second shard data copy from providing data access services during the data update process.

[0227] 11) If the index server receives a data address acquisition request sent by the client, the index server parses the data address acquisition request and obtains a key code corresponding to the data address acquisition request. The index server determines the service address of the target server corresponding to the key code from multiple business servers based on the key code.

[0228] 12) The index server returns the service address to the client.

[0229] 13) The client sends an access request for incremental business data to the server based on the service address.

[0230] 14) If the server receives a request for access to business data from the client, it responds to the data access request based on the full business data and / or incremental business data in the memory.

[0231] 15) If the controller detects a restart trigger event, it pulls incremental business data from HDFS based on the updated data version information, and pulls full business data from HDFS based on the full data version information.

[0232] 16) The controller triggers the server to reload data. The server loads the pulled incremental business data and full business data into memory for client access.

[0233] It should be understood that, although the various steps in the above flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowchart may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0234] In one embodiment, a business data processing system is provided, the business data processing system comprising an index server and a plurality of business servers, the target server being one of the plurality of business servers;

[0235] The index server is used to obtain original incremental business data, and perform data slicing on the original incremental business data to obtain incremental slicing business data, process the incremental slicing business data to obtain incremental business data with a preset data structure, and store the incremental business data in a distributed file system HDFS;

[0236] The index server is further used to update the data version information in the target server based on the incremental business data, and send a data version update notification to the target server;

[0237] The target server is used to pull the incremental business data corresponding to the updated data version information from the HDFS according to the updated data version information, and load the incremental business data into the memory for client access.

[0238] In one embodiment, the index server is further used to generate first data basic information according to the updated data version information of the incremental business data and the first storage address of the incremental business data in the HDFS;

[0239] Correspondingly, the target server is specifically used to obtain the first data basic information from the index server according to the updated data version information; and according to the first storage address included in the first data basic information, pull the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address.

[0240] In one embodiment, the index server is specifically used to process the incremental sliced ​​business data using a zipper method to obtain the incremental business data having a preset data structure.

[0241] In one embodiment, the business data processing system further includes a data source server, which is used to obtain the original incremental business data, store the original incremental business data in the HDFS, and send the second data basic information of the original incremental business data to the index server, where the second data basic information at least includes a second storage address of the original incremental business data in the HDFS;

[0242] Correspondingly, the index server is specifically used to pull the original incremental business data from the HDFS storage location indicated by the second storage address according to the second storage address included in the second data basic information.

[0243] In one embodiment, the index server is specifically used to parse the incremental sliced ​​business data according to a preset data format to obtain parsed incremental sliced ​​business data; and process the parsed incremental sliced ​​business data to obtain the incremental business data with a preset data structure.

[0244] In one embodiment, the target server is also used to obtain full data version information, and based on the full data version information, pull the full business data corresponding to the full data version information from the HDFS, and the full data version information is updated in the target server by the index server based on the full business data; the target server is also used to load the full business data into memory for client access.

[0245] In one embodiment, if a restart trigger event is detected, the target server is also used to pull the incremental business data from the HDFS according to the updated data version information, and pull the full business data from the HDFS according to the full data version information; and load the pulled incremental business data and the full business data into the memory for client access.

[0246] In one embodiment, the index server is further used to obtain full-slice business data from the HDFS, where the full-slice business data is obtained after data slicing of the original full-slice business data; process the full-slice business data using an open addressing method to generate the full-slice business data with a preset data structure; store the full-slice business data in the HDFS, and generate third data basic information according to the full data version information of the full-slice business data and the third storage address;

[0247] Correspondingly, the target server is specifically used to obtain the third data basic information from the index server according to the full data version information; and according to the third storage address included in the third data basic information, pull the full business data corresponding to the full data version information from the HDFS storage location indicated by the third storage address.

[0248] In one embodiment, the index server is also used to obtain the sharding mode information of the original full business data, and detect whether the sharding mode information is the same as the local sharding mode information, and the local sharding mode information is related to the number of the multiple business servers; if the sharding mode information is the same as the local sharding mode information, the index server executes the step of the index server obtaining the full sharded business data from the HDFS; if the sharding mode information is different from the local sharding mode information, the index server performs data sharding on the original full business data according to the local sharding mode information, obtains the full sharded business data, and executes the step of the index server obtaining the full sharded business data from the HDFS.

[0249] In one embodiment, the target server includes a first shard data copy and a second shard data copy, the first shard data copy and the second shard data copy are used to provide the same data access service, and the target server is specifically used to update the first shard data copy according to the incremental business data. During the data update of the first shard data copy, the target server provides data access services through the second shard data copy, and prohibits the first shard data copy from providing data access services during the data update process; after the data update of the first shard data copy is completed, the target server updates the second shard data copy according to the incremental business data. During the data update of the second shard data copy, the target server provides data access services through the first shard data copy after the data update, and prohibits the second shard data copy from providing data access services during the data update process.

[0250] In one embodiment, the index server is further configured to, upon receiving a data address acquisition request sent by the client, determine the service address of the target server according to the data address acquisition request; the index server returns the service address to the client; the client sends an access request for the incremental business data to the target server according to the service address;

[0251] The target server is also used to receive the access request and respond to the access request based on the incremental business data loaded in the memory.

[0252] In one embodiment, the index server is specifically used to parse the data address acquisition request to obtain a key code corresponding to the data address acquisition request; and determine the service address of the target server corresponding to the key code from the multiple business servers based on the key code.

[0253] For the specific definition of the business data processing system, please refer to the definition of the business data processing method above, which will not be repeated here. Each module in the above business data processing system can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the server in hardware form, or can be stored in the memory in the server in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0254] In one embodiment, a server is provided, whose internal structure diagram can be as follows: Fig.14 As shown. The server includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the server is used to provide computing and control capabilities. The memory of the server includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the server is used to store business data processing data. The network interface of the server is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business data processing method is implemented.

[0255] Those skilled in the art will understand that Fig.14 The structure shown in the figure is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied. The specific server may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0256] In one embodiment, a server is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0257] Acquire original incremental business data, and perform data slicing on the original incremental business data to obtain incremental slicing business data;

[0258] Processing the incremental sharded business data to obtain incremental business data with a preset data structure, and storing the incremental business data in a distributed file system HDFS;

[0259] Updating data version information in the target server based on the incremental business data, and sending a data version update notification to the target server;

[0260] Among them, the target server is a business server among the multiple business servers, and the data version update notification is used to notify the target server, pull the incremental business data corresponding to the updated data version information from the HDFS according to the updated data version information, and load the incremental business data into the memory for client access.

[0261] In one embodiment, the processor further implements the following steps when executing the computer program:

[0262] The first data basic information is generated according to the updated data version information of the incremental business data and the first storage address of the incremental business data in the HDFS; wherein the first data basic information is used by the target server to obtain the first data basic information from the index server according to the updated data version information; the first data basic information is used by the target server to pull the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address included in the first data basic information.

[0263] In one embodiment, the processor further implements the following steps when executing the computer program:

[0264] The incremental sliced ​​business data is processed by a zipper method to obtain the incremental business data having a preset data structure.

[0265] In one embodiment, the business data processing system further includes a data source server, which is used to obtain the original incremental business data, store the original incremental business data in the HDFS, and send the second data basic information of the original incremental business data to the index server, where the second data basic information at least includes a second storage address of the original incremental business data in the HDFS;

[0266] Correspondingly, the processor further implements the following steps when executing the computer program:

[0267] According to the second storage address included in the second data basic information, the original incremental business data is pulled from the HDFS storage location indicated by the second storage address.

[0268] In one embodiment, the processor further implements the following steps when executing the computer program:

[0269] Parsing the incremental sliced ​​service data according to a preset data format to obtain the parsed incremental sliced ​​service data;

[0270] The parsed incremental sliced ​​business data is processed to obtain the incremental business data with a preset data structure.

[0271] In one embodiment, the target server is used to obtain full data version information, and based on the full data version information, pulls the full business data corresponding to the full data version information from the HDFS, and the full data version information is updated by the index server in the target server based on the full business data; the target server loads the full business data into memory for client access.

[0272] In one embodiment, the target server is used to pull the incremental business data from the HDFS according to the updated data version information and pull the full business data from the HDFS according to the full data version information if a restart trigger event is detected;

[0273] The target server loads the pulled incremental business data and the full business data into the memory for access by the client.

[0274] In one embodiment, the processor further implements the following steps when executing the computer program:

[0275] Obtaining full-volume sharded business data from the HDFS, wherein the full-volume sharded business data is obtained by sharding the original full-volume business data;

[0276] Processing the full amount of sliced ​​business data using an open addressing method to generate the full amount of business data having a preset data structure;

[0277] The full amount of business data is stored in the HDFS, and the third data basic information is generated according to the full data version information of the full amount of business data and the third storage address;

[0278] Among them, the third basic information of data is used by the target server to obtain the third basic information of data from the index server according to the full data version information; the target server pulls the full business data corresponding to the full data version information from the HDFS storage location indicated by the third storage address included in the third basic information of data.

[0279] In one embodiment, the processor further implements the following steps when executing the computer program:

[0280] Obtaining sharding mode information of the original full service data, and detecting whether the sharding mode information is the same as local sharding mode information, wherein the local sharding mode information is related to the number of the multiple service servers;

[0281] If the sharding mode information is the same as the local sharding mode information, the index server is executed to obtain the full amount of sharding business data from the HDFS;

[0282] If the sharding mode information is different from the local sharding mode information, the original full business data is sharded according to the local sharding mode information to obtain the full sharded business data, and the index server is executed to obtain the full sharded business data from the HDFS.

[0283] In one embodiment, the target server includes a first shard data copy and a second shard data copy, the first shard data copy and the second shard data copy are used to provide the same data access service, and the target server is specifically used to update the first shard data copy according to the incremental business data. During the data update of the first shard data copy, the target server provides data access services through the second shard data copy, and prohibits the first shard data copy from providing data access services during the data update process; after the data update of the first shard data copy is completed, the target server updates the second shard data copy according to the incremental business data. During the data update of the second shard data copy, the target server provides data access services through the first shard data copy after the data update, and prohibits the second shard data copy from providing data access services during the data update process.

[0284] In one embodiment, the processor further implements the following steps when executing the computer program:

[0285] If a data address acquisition request sent by the client is received, determining the service address of the target server according to the data address acquisition request;

[0286] The service address is returned to the client; the service address is used by the client to send an access request for the incremental business data to the target server according to the service address; the target server receives the access request and responds to the access request based on the incremental business data loaded in the memory.

[0287] In one embodiment, the processor further implements the following steps when executing the computer program:

[0288] Parsing the data address acquisition request to obtain a key code corresponding to the data address acquisition request;

[0289] According to the key code, a service address of the target server corresponding to the key code is determined from the multiple service servers.

[0290] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0291] Acquire original incremental business data, and perform data slicing on the original incremental business data to obtain incremental slicing business data;

[0292] Processing the incremental sharded business data to obtain incremental business data with a preset data structure, and storing the incremental business data in a distributed file system HDFS;

[0293] Updating data version information in the target server based on the incremental business data, and sending a data version update notification to the target server;

[0294] Among them, the target server is a business server among the multiple business servers, and the data version update notification is used to notify the target server, pull the incremental business data corresponding to the updated data version information from the HDFS according to the updated data version information, and load the incremental business data into the memory for client access.

[0295] In one embodiment, the computer program, when executed by a processor, further implements the following steps:

[0296] The first data basic information is generated according to the updated data version information of the incremental business data and the first storage address of the incremental business data in the HDFS; wherein the first data basic information is used by the target server to obtain the first data basic information from the index server according to the updated data version information; the first data basic information is used by the target server to pull the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address included in the first data basic information.

[0297] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0298] The incremental sliced ​​business data is processed by a zipper method to obtain the incremental business data having a preset data structure.

[0299] In one embodiment, the business data processing system further includes a data source server, which is used to obtain the original incremental business data, store the original incremental business data in the HDFS, and send the second data basic information of the original incremental business data to the index server, where the second data basic information at least includes a second storage address of the original incremental business data in the HDFS;

[0300] Correspondingly, when the computer program is executed by the processor, the following steps are also implemented:

[0301] According to the second storage address included in the second data basic information, the original incremental business data is pulled from the HDFS storage location indicated by the second storage address.

[0302] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0303] Parsing the incremental sliced ​​service data according to a preset data format to obtain the parsed incremental sliced ​​service data;

[0304] The parsed incremental sliced ​​business data is processed to obtain the incremental business data with a preset data structure.

[0305] In one embodiment, the target server is used to obtain full data version information, and based on the full data version information, pulls the full business data corresponding to the full data version information from the HDFS, and the full data version information is updated by the index server in the target server based on the full business data; the target server loads the full business data into memory for client access.

[0306] In one embodiment, the target server is used to pull the incremental business data from the HDFS according to the updated data version information and pull the full business data from the HDFS according to the full data version information if a restart trigger event is detected;

[0307] The target server loads the pulled incremental business data and the full business data into the memory for access by the client.

[0308] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0309] Obtaining full-volume sharded business data from the HDFS, wherein the full-volume sharded business data is obtained by sharding the original full-volume business data;

[0310] Processing the full amount of sliced ​​business data using an open addressing method to generate the full amount of business data having a preset data structure;

[0311] The full amount of business data is stored in the HDFS, and the third data basic information is generated according to the full data version information of the full amount of business data and the third storage address;

[0312] Among them, the third basic information of data is used by the target server to obtain the third basic information of data from the index server according to the full data version information; the target server pulls the full business data corresponding to the full data version information from the HDFS storage location indicated by the third storage address included in the third basic information of data.

[0313] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0314] Obtaining sharding mode information of the original full service data, and detecting whether the sharding mode information is the same as local sharding mode information, wherein the local sharding mode information is related to the number of the multiple service servers;

[0315] If the sharding mode information is the same as the local sharding mode information, the index server is executed to obtain the full amount of sharding business data from the HDFS;

[0316] If the sharding mode information is different from the local sharding mode information, the original full business data is sharded according to the local sharding mode information to obtain the full sharded business data, and the index server is executed to obtain the full sharded business data from the HDFS.

[0317] In one embodiment, the target server includes a first shard data copy and a second shard data copy, the first shard data copy and the second shard data copy are used to provide the same data access service, and the target server is specifically used to update the first shard data copy according to the incremental business data. During the data update of the first shard data copy, the target server provides data access services through the second shard data copy, and prohibits the first shard data copy from providing data access services during the data update process; after the data update of the first shard data copy is completed, the target server updates the second shard data copy according to the incremental business data. During the data update of the second shard data copy, the target server provides data access services through the first shard data copy after the data update, and prohibits the second shard data copy from providing data access services during the data update process.

[0318] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0319] If a data address acquisition request sent by the client is received, determining the service address of the target server according to the data address acquisition request;

[0320] The service address is returned to the client; the service address is used by the client to send an access request for the incremental business data to the target server according to the service address; the target server receives the access request and responds to the access request based on the incremental business data loaded in the memory.

[0321] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0322] Parsing the data address acquisition request to obtain a key code corresponding to the data address acquisition request;

[0323] According to the key code, a service address of the target server corresponding to the key code is determined from the multiple service servers.

[0324] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0325] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0326] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A business data processing method, characterized in that: Applied to a business data processing system, the business data processing system includes an index server and multiple business servers, and the method includes: The index server obtains original incremental business data, and performs data slicing on the original incremental business data to obtain incremental slicing business data; The index server processes the incremental sharded business data using a zipper method to obtain incremental business data with a preset data structure, and stores the incremental business data in a distributed file system HDFS; The index server updates the data version information in the target server based on the incremental business data, and sends a data version update notification to the target server, where the target server is one of the multiple business servers; The index server generates first data basic information according to the updated data version information of the incremental business data and the first storage address of the incremental business data in the HDFS; The target server obtains the first data basic information from the index server based on the updated data version information, and according to the first storage address included in the first data basic information, pulls the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address, and loads the incremental business data into the memory for client access.

2. The method according to claim 1, characterized in that The business data processing system further includes a data source server, and the method further includes: The data source server obtains the original incremental business data, stores the original incremental business data in the HDFS, and sends the second data basic information of the original incremental business data to the index server, where the second data basic information at least includes the second storage address of the original incremental business data in the HDFS; Correspondingly, the index server obtains original incremental service data, including: The index server pulls the original incremental business data from the HDFS storage location indicated by the second storage address according to the second storage address included in the second data basic information.

3. The method according to claim 1, characterized in that The method further comprises: The index server parses the incremental slice service data according to a preset data format to obtain the parsed incremental slice service data; Correspondingly, the index server processes the incremental slice service data to obtain incremental service data having a preset data structure, including: The index server processes the parsed incremental sliced ​​business data to obtain the incremental business data with a preset data structure.

4. The method according to claim 1, characterized in that: The method further comprises: The target server obtains full data version information, and pulls full business data corresponding to the full data version information from the HDFS according to the full data version information, wherein the full data version information is updated in the target server by the index server based on the full business data; The target server loads the full amount of business data into memory for client access.

5. The method according to claim 4, characterized in that The method further comprises: If the target server detects a restart trigger event, it pulls the incremental business data from the HDFS according to the updated data version information, and pulls the full business data from the HDFS according to the full data version information; The target server loads the pulled incremental business data and the full business data into the memory for access by the client.

6. The method according to claim 4, characterized in that The method further comprises: The index server obtains the full-sharded business data from the HDFS, where the full-sharded business data is obtained by sharding the original full-sharded business data; The index server processes the full amount of sliced ​​business data using an open addressing method to generate the full amount of business data having a preset data structure; The index server stores the full amount of business data in the HDFS, and generates the third data basic information according to the full amount of data version information of the full amount of business data and the third storage address; Correspondingly, the target server pulls the full business data corresponding to the full data version information from the HDFS according to the full data version information, including: The target server obtains the third data basic information from the index server according to the full data version information; The target server pulls the full business data corresponding to the full data version information from the HDFS storage location indicated by the third storage address according to the third storage address included in the third data basic information.

7. The method according to claim 6, characterized in that The method further comprises: The index server obtains the sharding mode information of the original full service data, and detects whether the sharding mode information is the same as the local sharding mode information, where the local sharding mode information is related to the number of the multiple service servers; If the sharding mode information is the same as the local sharding mode information, the index server executes a step of obtaining the full amount of sharding business data from the HDFS by the index server; If the sharding mode information is different from the local sharding mode information, the index server shards the original full business data according to the local sharding mode information to obtain the full sharded business data, and executes the step of the index server obtaining the full sharded business data from the HDFS.

8. The method according to claim 1, characterized in that The target server includes a first shard data copy and a second shard data copy, the first shard data copy and the second shard data copy are used to provide the same data access service, and the target server loads the incremental business data into a memory, including: The target server updates the first shard data copy according to the incremental business data. During the data update process of the first shard data copy, the target server provides data access services through the second shard data copy, and prohibits the first shard data copy from providing data access services during the data update process; After the data update of the first shard data copy is completed, the target server updates the data of the second shard data copy according to the incremental business data. During the data update process of the second shard data copy, the target server provides data access services through the first shard data copy after the data update, and prohibits the second shard data copy from providing data access services during the data update process.

9. The method according to claim 1, characterized in that: The method further comprises: If the index server receives the data address acquisition request sent by the client, the index server determines the service address of the target server according to the data address acquisition request; The index server returns the service address to the client; The client sends an access request for the incremental service data to the target server according to the service address; The target server receives the access request and responds to the access request based on the incremental business data loaded in the memory.

10. The method according to claim 9, characterized in that The index server determines the service address of the target server according to the data address acquisition request, including: The index server parses the data address acquisition request to obtain a key code corresponding to the data address acquisition request; The index server determines, according to the key code, from the multiple service servers, a service address of the target server corresponding to the key code.

11. A business data processing system, characterized in that: The business data processing system includes an index server and multiple business servers, and the target server is one of the multiple business servers; The index server is used to obtain original incremental business data, and perform data slicing on the original incremental business data to obtain incremental slicing business data, process the incremental slicing business data using a zipper method to obtain incremental business data with a preset data structure, and store the incremental business data in a distributed file system HDFS; The index server is further configured to update data version information in a target server based on the incremental business data, and send a data version update notification to the target server, wherein the target server is one of the multiple business servers; The index server is further configured to generate first data basic information according to the updated data version information of the incremental business data and the first storage address of the incremental business data in the HDFS; The target server is used to obtain the first data basic information from the index server according to the updated data version information, and according to the first storage address included in the first data basic information, pull the incremental business data corresponding to the updated data version information from the HDFS storage location indicated by the first storage address, and load the incremental business data into the memory for client access.

12. A server comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.