A data processing method and distributed system

Through the management server using the offline bypass management interface to import the data set in the distributed system and sending switching instructions to the data server, the problem of bandwidth and time-consuming switching of data sets on the data server in the prior art is solved, and efficient and stable data set switching and service provision are achieved.

CN114595290BActive Publication Date: 2025-05-09ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210260683.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2025-05-09
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

When switching the data sets of the data server on the data server, the existing technology occupies the bandwidth of the online data read and write interface of the data server, affecting the efficiency and stability of the data server providing online data services to the outside, and the switching process takes a long time and affects the accuracy of the service.

Method used

The management server obtains the data set to be imported and the group identifier of the data set, uses the offline bypass management interface to import the data set in the distributed system, and sends switching instructions to the data server to realize the switching of the data set.

Benefits of technology

This method decouples the use of online data read and write interfaces on the data server from the data set switching process, avoids the impact of bandwidth usage and efficiency, shortens the switching time, and improves the timeliness and accuracy of the service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114595290B_ABST
    Figure CN114595290B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method and a distributed system. The management server obtains a first data set to be imported and a group identifier of a data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier, and sends a first switching instruction to each data server, the first switching instruction being used to indicate that the data set used for providing online data services to the outside based on the data group will be switched to the first data set according to the first set identifier of the first data set carried by the first switching instruction and the group identifier. Based on the first switching instruction, each data server switches the data set used for providing online data services to the outside based on the data group to the first data set. Through the present application, the process of switching the data set used for providing online data services to the outside based on the data group to the first data set does not affect the stability of the data service end providing "online data services to the outside".
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 data processing method and a distributed system. Background Art

[0002] Currently, all major manufacturers provide online data services to users. Manufacturers can deploy data servers and store data sets required for providing online data services to users in the data servers. In this way, when manufacturers provide online data services to users, the data servers can retrieve the data sets and provide online data services to users based on the data sets. Summary of the invention

[0003] The present application shows a data processing method and a distributed system.

[0004] In a first aspect, a data processing method is shown, which is applied to a distributed system, wherein the distributed system includes a management server and multiple online data servers; the method includes: the management server obtains a first data set to be imported and a group identifier of a data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier; the management server obtains a first switching instruction, the first switching instruction is used to instruct the data server to switch a data set used for providing online data services based on the data group to the first data set according to the first set identifier of the first data set carried by the first switching instruction and the group identifier; the management server sends the first switching instruction to each data server; each data server switches the data set used for providing online data services based on the data group to the first data set according to the first switching instruction.

[0005] In a second aspect, a data processing method is shown, which is applied to a distributed system, wherein the distributed system includes a management server and multiple online data servers; the method is applied to the management server, and the method includes: obtaining a first data set to be imported and a group identifier of a data group to which the first data set belongs, and importing the first data set in the data group in the distributed system in a bypass manner according to the group identifier; the management server obtains a first switching instruction, the first switching instruction being used to instruct the data server to switch a data set used for providing online data services based on the data group to the first data set according to the first set identifier of the first data set carried by the first switching instruction and the group identifier, and sending the first switching instruction to each data server, so that each data server switches the data set used for providing online data services based on the data group to the first data set according to the first switching instruction.

[0006] In a third aspect, a data processing method is shown, which is applied to a distributed system, wherein the distributed system includes a management server and multiple online data servers; the method is applied to the data server, and the method includes: receiving a first switching instruction sent by the management server; the first switching instruction is obtained after the management server obtains a first data set to be imported and a group identifier of a data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier, and the first switching instruction is used to instruct the data server to switch the data set used for providing online data services based on the data group to the first data set according to the first set identifier and group identifier of the first data set carried by the first switching instruction; and according to the first switching instruction, the data set used by the data server to provide online data services based on the data group to the first data set is switched.

[0007] In a fourth aspect, a distributed system is shown, which includes a management server and multiple online data servers; the management server includes a first acquisition module, a second acquisition module and a first sending module; the data server includes a first switching module; the first acquisition module is used to acquire a first data set to be imported and a group identifier of a data group to which the first data set belongs, and import the first data set in the data group in the distributed system in a bypass manner according to the group identifier; the second acquisition module is used to acquire a first switching instruction, and the first switching instruction is used to instruct the data server to switch the data set used for providing online data services to the outside based on the data group to the first data set according to the first set identifier of the first data set carried by the first switching instruction and the group identifier; the first sending module is used to send the first switching instruction to each data server; the first switching module is used to switch the data set used for providing online data services to the outside based on the data group to the first data set according to the first switching instruction.

[0008] In a fifth aspect, a distributed system is shown, which includes a management server and multiple online data servers; the management server includes a first acquisition module, a second acquisition module and a first sending module; the first acquisition module is used for the first data set to be imported and the group identifier of the data group to which the first data set belongs, and the first data set is bypassed in the data group in the distributed system according to the group identifier; the second acquisition module is used to obtain a first switching instruction, and the first switching instruction is used to instruct the data server to switch the data set used for providing online data services based on the data group to the first data set according to the first set identifier of the first data set carried by the first switching instruction and the group identifier; the first sending module is used to send the first switching instruction to each data server, so that each data server switches the data set used for providing online data services based on the data group to the first data set according to the first switching instruction.

[0009] In a sixth aspect, a distributed system is shown, which includes a management server and multiple online data servers; the data server includes a receiving module and a first switching module; the receiving module is used to receive a first switching instruction sent by the management server; the first switching instruction is obtained after the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier, and the first switching instruction is used to instruct the data server to switch the data set used for providing online data services based on the data group to the first data set according to the first set identifier and group identifier of the first data set carried by the first switching instruction; the first switching module is used to switch the data set used by the data server to provide online data services based on the data group to the first data set according to the first switching instruction.

[0010] In a seventh aspect, an electronic device is shown, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method shown in any of the aforementioned aspects.

[0011] In an eighth aspect, a non-temporary computer-readable storage medium is shown. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method shown in any of the aforementioned aspects.

[0012] In a ninth aspect, a computer program product is shown. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform a method as shown in any of the aforementioned aspects.

[0013] Compared with the prior art, this application has the following advantages:

[0014] In one method, the data set used by the data service end to provide online data services based on a data group is the second data set. In order to switch the data set used by the data service end to provide online data services based on the data group from the second data set to the first data set, the data in the first data set can be sent to the data service end online in sequence through the data read and write interface of the data service end. In this way, the data service end can receive the data in the first data set online in sequence based on the data read and write interface of the data service end, and when receiving one of the data in the first data set, the data in the received first data set can be used to replace the corresponding data in the second data set (to import the data in the data service end). After the last data in the received first data set is used to replace the corresponding data in the second data set, the purpose of switching the data set used by the data service end to provide online data services based on the data group to the first data set is completed.

[0015] However, the inventors found that the above method has the following problems:

[0016] On the one hand, the operation of "the data server receives each data in the first data set online in sequence based on the data reading and writing interface of the data server" and the operation of "the data server uses the received data in the first data set to replace the corresponding data in the second data set" are both online operations, which are not independent of the online operations involved in "the data server provides online data services to the outside world" and affect each other.

[0017] Moreover, the interface involved in the operation of "the data server receives each data in the first data set online in sequence based on the data read and write interface of the data server" and "the data server uses the data in the received first data set to replace the corresponding data in the second data set" is the online data read and write interface of the data server, and the interface involved in the online operation involved in "the data server provides online data services to the outside world" is also an online data read and write interface.

[0018] In this way, the operation of "the data server receives each data in the first data set online in sequence based on the data read and write interface of the data server" and the operation of "the data server uses the received data in the first data set to replace the corresponding data in the second data set" occupy the bandwidth of the online data read and write interface of the data server.

[0019] Therefore, the operation of "the data server receives each data in the first data set online in sequence based on the data read and write interface of the data server" and the operation of "the data server uses the received data in the first data set to replace the corresponding data in the second data set" will affect the efficiency of "the data server providing online data services to the outside world" and affect the stability of "the data server providing online data services to the outside world".

[0020] On the other hand, in the above-mentioned method, the process of importing the data in the first data set in the data service end and the process of switching the data set used by the data service end to provide online data services based on the data group to the first data set are coupled together. In addition, when there is a lot of data in the first data set, the earliest completion time and the latest completion time of the completion time of importing each data in the first data set in the data service end are often far apart, that is, the duration of the process of sequentially importing each data in the first data set in the data service end is long, which results in the process of switching the data set used by the data service end to provide online data services based on the data group to the first data set taking a long time.

[0021] In the process of switching the data set used by the data service end to provide online data services based on the data group to the first data set, part of the data in the first data set coexists with part of the data in the second data set. That is, the data service end contains both part of the data in the first data set and part of the data in the second data set, that is, new data and old data coexist.

[0022] When some data in the first data set coexists with some data in the second data set, the data used by the data service end when providing online data services to the outside may be mixed with some data in the first data set and some data in the second data set (that is, mixed with new data and old data). This may affect the online data services provided by the data service end, such as reducing the timeliness of the service or reducing the accuracy of the service results.

[0023] In summary, since the process of switching the data set used by the data service end to provide online data services based on the data group to the first data set takes a long time, the impact on the online data service provided by the data service end is long. The longer the process of online importing the first data set in the data service end is, the greater the degree of impact on the accuracy of the online data service provided by the data service end is.

[0024] In the present application, the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier. The management server obtains a first switching instruction, and the first switching instruction is used to instruct the data server to switch the data set used for providing online data services based on the data group to the first data set according to the first set identifier of the first data set carried by the first switching instruction and the group identifier. The management server sends the first switching instruction to each data server. Each data server receives the first switching instruction. Based on the first switching instruction, each data server switches the data set used for providing online data services based on the data group to the first data set.

[0025] Through the present application, on the one hand, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server imports the first data set in the data group in the distributed system according to the group identifier" are both offline operations, which are independent of and do not affect each other from the online operations involved in "the distributed system provides online data services to the outside world".

[0026] In addition, the interfaces involved in the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server bypass-imports the first data set in the data group in the distributed system according to the group identifier" are both offline bypass management interfaces (for example, the offline bypass management interface of the management server and the offline bypass management interface of the data service end, etc.), while the interfaces involved in the online operation involved in "the distributed system (for example, the data service end in the distributed system) provides online data services to the outside world" are online data reading and writing interfaces (for example, the online data reading and writing interface of the data service end involved, etc.).

[0027] Since the offline bypass management interface of the data server is different from the online data reading and writing interface of the data server, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server bypasses importing the first data set in the data group in the distributed system according to the group identifier" do not use the online data reading and writing interface of the data server in the distributed system, and thus do not occupy the bandwidth of the online data reading and writing interface of the data server in the distributed system.

[0028] Therefore, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server imports the first data set in the data group in the distributed system according to the group identifier" will not affect the efficiency of "the distributed system (such as the data service end in the distributed system) providing online data services to the outside world". It will not affect the stability of "the distributed system (such as the data service end in the distributed system) providing online data services to the outside world".

[0029] On the other hand, in the present application, the process of "each data service end switching the data set used to provide online data services based on the data group to the first data set based on the first switching instruction" is very short and only takes a short time, which is far less than the time required for the process of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier."

[0030] That is, the process of "each data service end switching the data set used for providing online data services based on the data group to the first data set based on the first switching instruction" only takes a short time, which is much shorter than the time taken for switching the data set used by the data service end for providing online data services based on the data group to the first data set in the above-mentioned method.

[0031] The process of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier" is independent of and decoupled from the process of "each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction."

[0032] That is, the time consumed in the process of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier" has no effect on the time consumed in the actual process of "each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction."

[0033] And the operation of "each data service end switches the data set used for providing online data services based on the data group to the outside to the first data set based on the first switching instruction" is performed only after "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier".

[0034] In this way, even if part of the data in the first data set coexists with part of the data in the second data set during the process of "each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction", the duration of the coexistence of part of the data in the first data set and part of the data in the second data set is also very short.

[0035] Therefore, since the process of "each data service end switching the data set used for providing online data services based on the data group to the first data set based on the first switching instruction" is very short, the degree of impact on the data service end's provision of online data services to the outside due to the coexistence of new data and old data is reduced. For example, compared with the above method, the present application improves the timeliness of the service and the accuracy of the service results. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a structural diagram of a distributed system of the present application.

[0037] Figure 2 It is a step flow chart of a data processing method of the present application.

[0038] Figure 3 It is a schematic diagram of a bypass import data set of the present application.

[0039] Figure 4 It is a step flow chart of a data processing method of the present application.

[0040] Figure 5 It is a step flow chart of a data processing method of the present application.

[0041] Figure 6 It is a structural block diagram of a distributed system of the present application.

[0042] Figure 7 It is a structural block diagram of a device of the present application. DETAILED DESCRIPTION

[0043] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0044] Reference Figure 1 , shows a schematic diagram of the structure of a distributed system of the present application, the distributed system includes a management server 01 and multiple online data servers 02. The management server is connected to each data server for communication. Each data server can also be connected to each other for communication.

[0045] In a distributed system, the management server may not provide online data services to the outside world, and the management server is not perceived by the majority of users. The data server can provide online data services to the outside world, and the data server is perceived by the majority of users.

[0046] The management server has an offline bypass management interface. Each data server has an offline bypass management interface and an online data read-write interface that provides online data services to the outside. Each data server can perform offline data interaction with the management server based on its own offline bypass management interface and the offline bypass management interface of the management server. Each data server can perform online data interaction with the user's terminal based on its own data read-write interface. For example, each data server can receive a data request sent by the user's terminal based on its own data read-write interface, and return a data response to the user's terminal based on its own data read-write interface.

[0047] In the present application, the distributed system may include Lindorm (a new generation of non-relational distributed database storage system), which is a distributed system for online processing of massive data, and HBase (an open source non-relational distributed database storage system), etc., which is implemented in Java and runs on the HDFS file system, providing Hadoop with services similar to BigTable scale.

[0048] Among them, data is stored in the distributed system, so as to provide online data services (such as data query services and data storage services, etc.) to the outside through the stored data.

[0049] The data stored in the distributed system for providing online data services externally may be stored in the distributed system in advance, for example, may be stored in the distributed system in advance by the data manufacturer, etc. The data manufacturer may be the same as or different from the manufacturer of the distributed system.

[0050] In a possible scenario, data in a distributed system can be divided into data groups, each of which belongs to a manufacturer, and different data groups belong to different manufacturers. Each data group can include at least one data set, and the distributed system can provide online data services based on the data sets in each data group.

[0051] For example, for any data group in a distributed system, the data group may include at least one data set. When the distributed system provides online data services to the outside based on the data group, one of the data sets in the data group may be used to provide online data services to the outside. For example, the manufacturer to which the data group belongs may add new data sets and delete old data sets in the data group according to actual needs, and may specify data sets in the data group for providing online data services to the outside according to actual needs. When the distributed system provides services to the outside based on the data group, it may provide online data services to the outside based on the data sets in the data group that are specified by the manufacturer for providing online data services to the outside. The same is true for each other data group in the distributed system.

[0052] Multiple data sets in a data group can be regarded as data of the same type, and different data sets in a data group can be regarded as different versions of data of the same type, etc.

[0053] In one example, sometimes a manufacturer may need to add a new data set to a data group in a distributed system, and switch the data set used by the distributed system to provide online data services based on the data group to the newly added data set (to achieve full replacement of the data used to provide online data services based on the data group).

[0054] In this case, the offline method of the present application can be used to replace all the data used to provide online data services based on the data group. Figure 2 , showing a flow chart of a data processing method of the present application, the method applies Figure 1 In the distributed system shown, the method includes:

[0055] In step S101, the management server obtains a first data set to be imported and a group identifier of a data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier.

[0056] The first data set may include a plurality of data.

[0057] In one embodiment of the present application, a distributed system has multiple data groups, one of which is the data group into which a first data group needs to be imported. The data group belongs to a manufacturer. The data group also has a second data group, which includes multiple data. The data set used by the distributed system to provide online data services to the outside world based on this data group can be the second data set.

[0058] However, due to some practical needs, the manufacturer may need to add the first data set to the data group in the distributed system, and switch the data set used by the distributed system to provide online data services based on the data group from the second data set to the first data set.

[0059] In the case where the manufacturer needs to "add a first data set to the data group in the distributed system, and switch the data set used by the distributed system to provide online data services based on the data group from the second data set to the first data set", the manufacturer can import the first data set offline into the data group in the distributed system via the management server, and then control each data server in the distributed system via the management server to switch the data set used by the distributed system to provide online data services based on the data group from the second data set to the first data set.

[0060] Among them, when the manufacturer imports the first data set offline in the data group in the distributed system via the management server, the manufacturer can use the manufacturer's terminal to upload the first data set and the group identifier of the data group to which the first data set belongs to offline to the management server (the data group is the data group to which the first data set needs to be imported). For example, the manufacturer can use the manufacturer's terminal to send the first data set and the group identifier of the data group to the management server based on the offline bypass management interface of the management server. The management server can receive the first data set and the group identifier of the data group uploaded by the manufacturer's terminal offline. For example, the management server can receive the first data set and the group identifier of the data group uploaded by the manufacturer's terminal based on the offline bypass management interface of the management server. Then the management server can bypass import the first data set in the data group in the distributed system according to the group identifier.

[0061] In one example, a distributed system has a database, and a data set can be stored in the database in the distributed system. In this way, when the management server imports the first data set in the data group in the distributed system according to the group identifier, the management server can bypass the establishment of a new database table in the distributed system, and then bypass write each data in the first data set in the new database table, and record the association relationship between the new database table and the data group (the table identifier of the new database table can be the same as the set identifier of the first data set, etc.). Through the association relationship, it can be known that multiple data in the first data set in the new database table belong to the data group, thereby realizing the bypass import of the first data set in the data group in the distributed system.

[0062] There may be a logical association relationship between the data group and the new database table where the first data set is located. In this way, it is equivalent to that there may be a logical association relationship between the data group and the first data set.

[0063] After the first data set is imported offline in the distributed system, the first data set exists in the distributed system, for example, it can exist in the data service end of the distributed system, or it can exist in other devices in the distributed system. Alternatively, the first data set can be concentrated in a certain device in the distributed system (for example, concentrated in a certain data service end in the distributed system), or it can be distributed in more than two devices in the distributed system (for example, distributed in more than two data service ends in the distributed system), etc.

[0064] After the management server imports the first data set in the data group in the distributed system in bypass mode according to the group identifier, the manufacturer can control the distributed system (for example, controlling each data server in the distributed system, etc.) through the management server by means of instructions to switch the data set used for providing online data services based on the data group from the second data set to the first data set. For details, please refer to step S102.

[0065] In the present application, when the management server bypasses importing the first data set in the data group in the distributed system according to the group identifier, the first data set can be bypassed imported into the data group in the distributed system based on a bulk load data import method.

[0066] Among them, bulkload is a method of importing data in large quantities. Before importing data, you can prepare the full amount of data to be imported according to the underlying data structure of the database's file system. When importing data, you can bypass the conventional database write link and load the full amount of data to be imported directly into the file system of the distributed system. Then, the full amount of data to be imported can be imported into the distributed system in a very short time (usually seconds).

[0067] In this way, by importing the first data set in the data group in the distributed system in a bypass manner based on bulkload data import, the rate of bypassing the import of the first data set in the data group in the distributed system can be improved, thereby improving the efficiency of each data service end switching the data set used for providing online data services based on the data group to the first data set based on the first switching instruction.

[0068] Among them, the bulk data import method based on bulkload can be applicable to databases based on LSM-Trees (LogStructured Merge Trees), such as Apache HBase, Apache Cassandra or LevelDB.

[0069] In one example, see Figure 3 , showing a schematic diagram of bypassing the import of a first data set in the data group in a distributed system. In this example, the database for storing the data set may be an LSM-Trees database, and the LSM-Trees database includes multiple data groups, one of which is data group X, and data group X currently includes a second data set. In the LSM-Trees database, each data set may be stored in an SST (Sorted Strings Table) manner. The management server may obtain the first data set and bypass the import of the first data set into the data group in the LSM-Trees database.

[0070] In this embodiment, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server bypasses importing the first data set in the data group in the distributed system according to the group identifier" can be automatically triggered by the distributed system or manually triggered, and this application does not impose any restrictions on this.

[0071] The file system of the distributed system includes the disk file system at the bottom of the database. In the architecture where storage and computing are separated, in a database based on a SAN (Storage Area Network), the bottom file system can be implemented as a bare disk or block device layer. When importing batch data into the database file system, the DB (DataBase) layer can be bypassed and the storage layer can be operated directly.

[0072] In step S102, the management server obtains a first switching instruction, which is used to instruct the data server to switch the data set used for providing online data services based on the data group to the first data set according to the first set identifier of the first data set carried in the first switching instruction and the group identifier.

[0073] In one embodiment, currently, the data set used by each data service end to provide online data services externally through the data group is the second data set, the second data set includes multiple data and the second data set has been imported into the distributed system. In this way, the first switching instruction can be understood as an instruction to switch the data set used for providing online data services externally based on the data group (for example, from the second data set) to the first data set.

[0074] In one embodiment of the present application, the manufacturer can input the first set identifier of the first data set and the group identifier of the data group to which the first data set belongs in the manufacturer's terminal, and then control the manufacturer's terminal to generate a first switching instruction, the first switching instruction at least carrying the first set identifier of the first data set and the group identifier of the data group to which the first data set belongs. The data group to which the first data set belongs is the same as the data group to which the second data set belongs, so that the group identifier of the data group to which the first data set belongs is the same as the group identifier of the data group to which the second data set belongs. Then, the manufacturer's terminal can be controlled to send the first switching instruction to the management server. The management server can receive the first switching instruction sent by the manufacturer's terminal, and then can execute step S103.

[0075] In another embodiment of the present application, for any data set stored in the distributed system, the data set has its own state, and at any time the data set has only one state. The state may include: activation state, archive state, offline state, and import state.

[0076] In the process of importing the data set in the distributed system, the state of the data set may be an import state. When the data set is completely imported into the distributed system, the state of the data set may be switched to an activation state or an archive state (specific switching to an activation state or an archive state may be determined according to actual conditions). When the state of the data set is an activation state, the data service end in the distributed system may provide online data services based on the data set, and when the state of the data set is not an activation state, the data service end in the distributed system may not provide online data services based on the data set. When the state of the data set is an archive state, the data set has been completely imported into the distributed system, but the distributed system does not provide online data services based on the data set. When the state of the data set is an offline state, the data set may be deleted from the distributed system. The state of the data set may be switched from an archive state to an offline state, or from an offline state to an archive state. The state of the data set may be switched from an activation state to an archive state, or from an archive state to an activation state. The state of the data set may be switched from an import state to an activation state. The state of the data set may be switched from an import state to an archive state, or from an archive state to an import state.

[0077] The same is true for every other dataset stored in the distributed system.

[0078] Thus, in another embodiment of the present application, the manufacturer may input a first switching operation to the management server, where the first switching operation is used to set the state of the first data set to an activated state.

[0079] The first switching operation is an operation on the first set identifier of the first data set. In this way, the management server can obtain the first set identifier of the first data set at least according to the first switching operation. Since the first switching operation is used to set the state of the first data set to an activated state, the management server can know according to the first switching operation that it is necessary to switch the data set used by the distributed system to provide online data services based on the data group to which the first data set belongs to the first data set to the first data set.

[0080] Because in step S101, when the management server bypasses importing the first data set in the data group in the distributed system according to the group identifier, the management server bypasses establishing a new database table in the distributed system, and then bypasses writing each data in the first data set into the new database table, and records the association relationship between the new database table and the data group (the table identifier of the new database table may be the same as the set identifier of the first data set, etc.), it can be known through the association relationship that multiple data in the first data set in the new database table belong to the data group.

[0081] In this way, the management server can obtain the group identifier of the data group to which the first data set belongs according to the first set identifier of the first data set and the association relationship. Then the management server can generate a first switching instruction according to at least the first set identifier of the first data set and the group identifier of the data group to which the first data set belongs. Then step S103 can be executed.

[0082] In the present application, the data group to which the first data set belongs is the same as the data group to which the second data set belongs, and thus, the group identifier of the data group to which the first data set belongs is the same as the group identifier of the data group to which the second data set belongs.

[0083] Since there is at most one data set in an activated state in any data group at any time, and since the first switching operation is used to set the state of the first data set to an activated state.

[0084] In this way, after the management server sets the status of the first data set to the activated state according to the first switching operation, the status of the previously activated data set (such as the second data set) in the data group to which the first data set belongs can also be switched from the activated state to the archived state, etc.

[0085] In step S103, the management server sends a first switching instruction to each data server.

[0086] For example, the management server may send a first switching instruction to each data server based on the bypass management interface of each data server.

[0087] In step S104, each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction.

[0088] Each data service end may receive the first switching instruction based on its own bypass management interface, and then switch the data set used for providing online data services based on the data group to the first data set based on the first switching instruction.

[0089] In the present application, since the data service end does not use the bypass management interface of the data service end when providing online data services to the outside, but uses the data reading and writing interface of the data service end, the data service end receives the first switching instruction sent by the management service end based on the bypass management interface of the data service end, which does not occupy the bandwidth of the data reading and writing interface of the data service end, and will not affect the efficiency of the data service end in providing online data services to the outside.

[0090] In one embodiment of the present application, for any one of the multiple data service terminals, the data service terminal maintains a binding relationship between the group identifier of the data group and the set identifier of the data set, and the binding relationship includes multiple corresponding table entries, each of which includes a group identifier and a set identifier, which is used to indicate that the data set used by the distributed system to provide online data to the outside based on the data group corresponding to the group identifier is the data set corresponding to the set identifier. In this way, the data service terminal can use the first set identifier of the first data set in the binding relationship between the group identifier of the data group and the set identifier of the data set to replace the set identifier of the data set corresponding to the group identifier of the data group (for example, it can be the second set identifier of the second data set, etc.). The same is true for each of the other data service terminals in the multiple data service terminals.

[0091] In one embodiment, before using the first set identifier of the first data set to replace the set identifier of the data set corresponding to the group identifier of the data group, in the binding relationship between the group identifier of the data group and the set identifier of the data set, the second set identifier of the second data set corresponds to the group identifier of the data group.

[0092] In this case, assuming that the user needs to access the data in the data group in the distributed system, the user can control the user's terminal to send an access request to the distributed system. The data to be accessed is located in the data group, and one of the data service ends in the distributed system receives the access request based on its own data read and write interface, and then performs routing operations according to some index information carried in the access request, and routes to the data group where the data to be accessed is located.

[0093] The data group includes at least the second data set and may also include other data sets. It is necessary to determine a data set in the data group that is required for providing online data services to the outside based on the data group. For example, the set identifier corresponding to the group identifier of the data group can be searched in the binding relationship between the group identifier of the data group and the set identifier of the data set. The set identifier found is the second set identifier of the second data set. The second data set is the data set required for providing online data services to the outside based on the data group. Then, the data that the user needs to access can be searched in the second data set, and the found data can be returned to the user's terminal based on the data read and write interface of the data service end.

[0094] However, after using the first set identifier of the first data set to replace the set identifier of the data set corresponding to the group identifier of the data group, in the binding relationship between the group identifier of the data group and the set identifier of the data set, the first set identifier of the first data set corresponds to the group identifier of the data group.

[0095] In this case, assuming that the user needs to access the data in the data group in the distributed system, the user can control the user's terminal to send an access request to the distributed system, where the data to be accessed is located in the data group. One of the data service terminals in the distributed system receives the access request based on its own data read and write interface, and then performs routing operations based on some index information carried in the access request, and routes to the data group where the data to be accessed is located.

[0096] The data group includes at least a first data set and a second data set, and may also include other data sets. It is necessary to determine a data set in the data group that is required to provide online data services to the outside based on the data group. For example, the set identifier corresponding to the group identifier of the data group can be searched in the binding relationship between the group identifier of the data group and the set identifier of the data set. The set identifier found is the first set identifier of the first data set. The first data set is the data set required to provide online data services to the outside based on the data group. Then, the data that the user needs to access can be searched in the first data set, and the found data can be returned to the user's terminal based on the data read and write interface of the data server.

[0097] In one method, the data set used by the data service end to provide online data services based on a data group is the second data set. In order to switch the data set used by the data service end to provide online data services based on the data group from the second data set to the first data set, the data in the first data set can be sent to the data service end online in sequence through the data read and write interface of the data service end. In this way, the data service end can receive the data in the first data set online in sequence based on the data read and write interface of the data service end, and when receiving one of the data in the first data set, the data in the received first data set can be used to replace the corresponding data in the second data set (to import the data in the data service end). After the last data in the received first data set is used to replace the corresponding data in the second data set, the purpose of switching the data set used by the data service end to provide online data services based on the data group to the first data set is completed.

[0098] However, the inventors found that the above method has the following problems:

[0099] On the one hand, the operation of "the data server receives each data in the first data set online in sequence based on the data reading and writing interface of the data server" and the operation of "the data server uses the received data in the first data set to replace the corresponding data in the second data set" are both online operations, which are not independent of the online operations involved in "the data server provides online data services to the outside world" and affect each other.

[0100] Moreover, the interface involved in the operation of "the data server receives each data in the first data set online in sequence based on the data read and write interface of the data server" and "the data server uses the data in the received first data set to replace the corresponding data in the second data set" is the online data read and write interface of the data server, and the interface involved in the online operation involved in "the data server provides online data services to the outside world" is also an online data read and write interface.

[0101] In this way, the operation of "the data server receives each data in the first data set online in sequence based on the data read and write interface of the data server" and the operation of "the data server uses the received data in the first data set to replace the corresponding data in the second data set" occupy the bandwidth of the online data read and write interface of the data server.

[0102] Therefore, the operation of "the data server receives each data in the first data set online in sequence based on the data read and write interface of the data server" and the operation of "the data server uses the received data in the first data set to replace the corresponding data in the second data set" will affect the efficiency of "the data server providing online data services to the outside world" and affect the stability of "the data server providing online data services to the outside world".

[0103] On the other hand, in the above-mentioned method, the process of importing the data in the first data set in the data service end and the process of switching the data set used by the data service end to provide online data services based on the data group to the first data set are coupled together. In addition, when there is a lot of data in the first data set, the earliest completion time and the latest completion time of the completion time of importing each data in the first data set in the data service end are often far apart, that is, the duration of the process of sequentially importing each data in the first data set in the data service end is long, which results in the process of switching the data set used by the data service end to provide online data services based on the data group to the first data set taking a long time.

[0104] In the process of switching the data set used by the data service end to provide online data services based on the data group to the first data set, part of the data in the first data set coexists with part of the data in the second data set. That is, the data service end contains both part of the data in the first data set and part of the data in the second data set, that is, new data and old data coexist.

[0105] When some data in the first data set coexists with some data in the second data set, the data used by the data service end when providing online data services to the outside may be mixed with some data in the first data set and some data in the second data set (that is, mixed with new data and old data). This may affect the online data services provided by the data service end, such as reducing the timeliness of the service or reducing the accuracy of the service results.

[0106] In summary, since the process of switching the data set used by the data service end to provide online data services based on the data group to the first data set takes a long time, the impact on the online data service provided by the data service end is long. The longer the process of online importing the first data set in the data service end is, the greater the degree of impact on the accuracy of the online data service provided by the data service end is.

[0107] In the present application, the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier. The management server obtains a first switching instruction, and the first switching instruction is used to instruct the data server to switch the data set used for providing online data services based on the data group to the first data set according to the first set identifier of the first data set carried by the first switching instruction and the group identifier. The management server sends the first switching instruction to each data server. Each data server receives the first switching instruction. Based on the first switching instruction, each data server switches the data set used for providing online data services based on the data group to the first data set.

[0108] Through the present application, on the one hand, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server imports the first data set in the data group in the distributed system according to the group identifier" are both offline operations, which are independent of and do not affect each other from the online operations involved in "the distributed system provides online data services to the outside world".

[0109] In addition, the interfaces involved in the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server bypass-imports the first data set in the data group in the distributed system according to the group identifier" are both offline bypass management interfaces (for example, the offline bypass management interface of the management server and the offline bypass management interface of the data service end, etc.), while the interfaces involved in the online operation involved in "the distributed system (for example, the data service end in the distributed system) provides online data services to the outside world" are online data reading and writing interfaces (for example, the online data reading and writing interface of the data service end involved, etc.).

[0110] Since the offline bypass management interface of the data server is different from the online data reading and writing interface of the data server, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server bypasses importing the first data set in the data group in the distributed system according to the group identifier" do not use the online data reading and writing interface of the data server in the distributed system, and thus do not occupy the bandwidth of the online data reading and writing interface of the data server in the distributed system.

[0111] Therefore, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server imports the first data set in the data group in the distributed system according to the group identifier" will not affect the efficiency of "the distributed system (such as the data service end in the distributed system) providing online data services to the outside world". It will not affect the stability of "the distributed system (such as the data service end in the distributed system) providing online data services to the outside world".

[0112] On the other hand, in the present application, the process of "each data service end switching the data set used to provide online data services based on the data group to the first data set based on the first switching instruction" is very short and only takes a short time, which is far less than the time required for the process of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier."

[0113] That is, the process of "each data service end switching the data set used for providing online data services based on the data group to the first data set based on the first switching instruction" only takes a short time, which is much shorter than the time taken for switching the data set used by the data service end for providing online data services based on the data group to the first data set in the above-mentioned method.

[0114] The process of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier" is independent of and decoupled from the process of "each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction."

[0115] That is, the time consumed in the process of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier" has no effect on the time consumed in the actual process of "each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction."

[0116] And the operation of "each data service end switches the data set used for providing online data services based on the data group to the outside to the first data set based on the first switching instruction" is performed only after "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier".

[0117] In this way, even if part of the data in the first data set coexists with part of the data in the second data set during the process of "each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction", the duration of the coexistence of part of the data in the first data set and part of the data in the second data set is also very short.

[0118] Therefore, since the process of "each data service end switching the data set used for providing online data services based on the data group to the first data set based on the first switching instruction" is very short, the degree of impact on the data service end's provision of online data services to the outside due to the coexistence of new data and old data is reduced. For example, compared with the above method, the present application improves the timeliness of the service and the accuracy of the service results.

[0119] In another embodiment of the present application, for any one of the multiple data service terminals, after the data service terminal switches the data set (for example, from the second data set) used by the data service terminal to provide online data services to the outside based on the data group to the first data set according to the first switching instruction, the data service terminal can generate first feedback information and send the first feedback information to the management server terminal, for example, sending the first feedback information to the management server terminal based on the bypass management interface of the data service terminal, etc. The first feedback information is used to indicate that the data service terminal has switched the data set (for example, from the second data set) used by the data service terminal to provide online data services to the outside based on the data group to the first data set, so as to inform the management server terminal through the first feedback information that the data service terminal has switched the data set (for example, from the second data set) used by the data service terminal to provide online data services to the outside based on the data group to the first data set. The management server can receive the first feedback information sent by the data server, and can determine through the first feedback information that the data server has switched the data set (e.g., from the second data set) used by the data server to provide online data services based on the data group to the first data set, thereby avoiding the management server from repeatedly sending the first switching instruction to the data server without restraint, thereby saving network resources. The same is true for each of the other data servers in the multiple data servers.

[0120] However, sometimes, for any one of the multiple data service ends, after the management server sends a first switching instruction to the data service end, the data service end may not successfully switch the data set (for example, from the second data set) used by the data service end to provide online data services based on the data group to the first data set.

[0121] For example, the first switching instruction is lost during the transmission process from the management server to the data server, resulting in the data server not receiving the first switching instruction, which in turn causes the data server to be unable to switch the data set (for example, from the second data set) used by the data server to provide online data services based on the data group to the first data set.

[0122] For another example, the data server makes an error in the process of switching the data set (for example, from the second data set) used by the data server to provide online data services based on the data group to the first data set based on the first switching instruction, resulting in the failure to successfully switch the data set (for example, from the second data set) used by the data server to provide online data services based on the data group to the first data set, etc.

[0123] If the data service end fails to successfully switch the data set (for example, from the second data set) used by the data service end to provide online data services based on the data group to the first data set, then the first feedback information will not be generated, nor will the first feedback information be sent to the management server end based on the bypass management interface of the data service end.

[0124] In this way, the management server will not receive the first feedback information sent by the data server.

[0125] It can be seen that in the above situation, if the data service end "fails to successfully switch the data set (for example, from the second data set) used by the data service end to provide online data services based on the data group to the first data set", then the purpose of "the distributed system as a whole switches the data set (for example, from the second data set) used by the distributed system to provide online data services based on the data group to the first data set" cannot be achieved.

[0126] The same is true for each of the other data servers in the plurality of data servers.

[0127] In order to achieve the purpose of "the distributed system as a whole switches the data set (for example, from the second data set) used by the distributed system to provide online data services based on the data group to the first data set", in the present application, it is necessary to switch the data set used by the data service end of the distributed system to provide online data services based on the data group to the first data set (for example, from the second data set).

[0128] In order to achieve the purpose of "the data sets used by the data service end of the distributed system to provide online data services based on the data group are all switched to the first data set (for example, from the second data set)", for any one of the multiple data service ends, within a first preset time after the management server end sends the first switching instruction to the data service end, if the management server end does not receive the first feedback information sent by the data service end according to the first switching instruction, the management server end may send the first switching instruction to the data service end again (for example, sending the first switching instruction to the data service end based on the bypass management interface of the data service end) until the first feedback information sent by the data service end according to the first switching instruction is received.

[0129] On the one hand, by increasing the number of times the first switching instruction is sent to the data server, the probability that the data server can receive the first switching instruction can be increased, thereby enabling the data server to eventually receive the first switching instruction.

[0130] On the other hand, since the data service end will execute the operation of "switching the data set (for example, from the second data set) used by the data service end to provide online data services based on the data group to the first data set according to the first switching instruction" when the data service end receives the first switching instruction, the number of times the data service end executes the operation of "switching the data set (for example, from the second data set) used by the data service end to provide online data services based on the data group to the first data set according to the first switching instruction" is increased, which can increase the probability of successfully switching the data set (for example, from the second data set) used by the data service end to provide online data services based on the data group to the first data set, thereby enabling the data service end to eventually switch the data set (for example, from the second data set) used by the data service end to provide online data services based on the data group to the first data set.

[0131] In this way, the purpose of "the distributed system as a whole switches the data set (for example, from the second data set) used by the distributed system to provide online data services based on the data group to the first data set" can be achieved.

[0132] In the aforementioned embodiment, each data service end receives the first switching instruction, and switches the data set (eg, from the second data set) used for providing online data services based on the data group to the first data set based on the first switching instruction.

[0133] However, sometimes, among multiple data service ends, some data service ends quickly switch the data set used to provide online data services based on the data group to the first data set (for example, from the second data set), while some service ends are a little slower in switching the data set used to provide online data services based on the data group to the first data set (for example, from the second data set).

[0134] That is, the completion times of the multiple data service terminals switching the data set (for example, from the second data set) used to provide online data services based on the data group to the first data set may not be the same.

[0135] In this case, at the completion time when each data service end switches the data set used for providing online data services based on the data group to the first data set (for example, from the second data set), the first completion time is different from the last completion time, and there is a time period between the two. During this time period, the data set used by some data service ends for providing online data services based on the data group is already the first data set, while the data set used by other data service ends for providing online data services based on the data group is still the second data set. This results in a situation where the data sets used by multiple data service ends for providing online data services based on the data group are inconsistent.

[0136] However, the majority of users may still request the distributed system to provide online data services based on the data sets in the data group during this time period. However, in this case, some data service ends provide online data services to some users based on the first data set in the data group, and other data service ends provide online data services to another part of users based on the second data set in the data group. This will lead to the following situation: the data sets used by the distributed system to provide online data services to different users based on the data group during this time period are inconsistent, which may reduce the experience of at least some users.

[0137] In this way, in order to avoid degrading the experience of at least some users, the data set used by the distributed system when providing online data services to different users based on the data group in any time period can be made consistent.

[0138] In order to achieve the purpose of "the distributed system uses the same data set when providing online data services to different users based on the data set in any time period", in another embodiment of the present application, see Figure 4 , the method further comprises:

[0139] Before the management server sends the first switching instruction to each data server, in step S201, the management server generates a closing instruction and sends the closing instruction to each data server. The closing instruction is used to instruct to close the function of providing online data services based on the data group according to the group identifier carried by the closing instruction.

[0140] In one example, the management server may send a shutdown instruction to each data server based on a bypass management interface in each data server.

[0141] In step S202, each data service end respectively closes the function of providing online data service based on the data group corresponding to the group identifier according to the closing instruction.

[0142] In an example, each data service end may receive a shutdown instruction based on its own bypass management interface, and according to the shutdown instruction, shut down its own function of providing online data services based on the data group corresponding to the group identifier.

[0143] The functions of providing online data services to the outside based on the data group corresponding to the group identifier include a data reading function, a data writing function, or both a data reading function and a data writing function.

[0144] Afterwards, each data service end stops providing online data services based on the data group corresponding to the group identifier.

[0145] In step S203, each data service end generates second feedback information and sends the second feedback information to the management service end. The second feedback information is used to indicate that the function of providing online data services based on the data group has been closed.

[0146] In one example, each data service end may send second feedback information to the management service end based on its own bypass management interface, so as to inform the management service end through the second feedback information that the data service end has closed the function of providing online data services based on the data group.

[0147] When the management server receives the second feedback information sent by each data server according to the closing instruction, step S103 is executed again: the management server sends a first switching instruction to each data server.

[0148] And, the method also includes: when the management server receives the first feedback information sent by each data server according to the first switching instruction, in step S301, the management server generates a start instruction and sends the start instruction to each data server, and the start instruction is used to indicate to start the function of providing online data services based on the data group according to the group identifier carried by the start instruction.

[0149] In one example, the management server may send a startup instruction to each data server based on the bypass management interface of each data server.

[0150] When the management server receives the first feedback information sent by each data server according to the first switching instruction, it means that each data server has switched the data set used for providing online data services based on the data group to the first data set (for example, from the second data set). In this way, if the distributed system needs to provide online data services based on the data group, the data set used by each data server in the distributed system to provide online data services based on the data group can all be the first data set, and the data set used by each data server in the distributed system to provide online data services based on the data group is consistent.

[0151] In this way, the management server can generate a startup instruction and send the startup instruction to each data server based on the bypass management interface of each data server.

[0152] In step S302, each data service end starts its own function of providing online data service based on the data group according to the start instruction.

[0153] Afterwards, the data service end may continue to provide online data services to the outside through the data group. For example, the data service end may continue to provide online data services to the outside through the first data set in the data group.

[0154] In one example, each data server may receive a startup instruction sent by the management server based on its own bypass management interface.

[0155] In another embodiment of the present application, within the second preset time after the management server sends the first switching instruction to each data server, if the management server does not receive the first feedback information sent by at least one data server according to the first switching instruction, the management server may execute step S301: the management server generates a startup instruction and sends the startup instruction to each data server, so that the data server can provide online data services based on the second data set in the data group corresponding to the group identifier.

[0156] Through the present application, in the event that the data sets used by each data service end to provide online data services to the outside based on the data group cannot be successfully switched to the first data set, the data sets used by each data service end to provide online data services to the outside based on the data group can be promptly rolled back from the first data set to a previously used data set (such as the second data set, etc.), thereby reducing the duration for which the distributed system cannot provide online data services to the outside based on the data group.

[0157] In the present application, the second preset duration may be greater than the first preset duration.

[0158] After each data service end has respectively switched the data set used for providing online data services based on the data group to the first data set (for example, from the second data set), the data set used by the distributed system when providing online data services based on the data group can be the first data set.

[0159] However, sometimes, according to actual needs, the manufacturer may need to make each service end use the second data set to provide online data services based on the data set instead of the first data set. In this case, each data service end needs to switch the data set used to provide online data services based on the data set to the second data set (for example, from the first data set).

[0160] In this case, the data set used by each data service end to provide online data services based on the data set can be switched to the second data set (for example, from the first data set) in the following manner, see Figure 5 The specific process includes:

[0161] In step S401, the management server obtains a second switching instruction, which is used to instruct the data server to switch the data set used for providing online data services based on the data group to the second data set according to the second set identifier of the second data set carried in the second switching instruction and the group identifier.

[0162] In one embodiment, currently, the data set used by each data service end to provide online data services based on the data group is the first data set, the first data set includes multiple data and the first data set has been imported into the distributed system. Thus, the second switching instruction can be understood as an instruction to switch the data set used to provide online data services based on the data group (for example, from the first data set) to the second data set.

[0163] In one embodiment of the present application, the manufacturer can input the second set identifier of the second data set and the group identifier of the data group to which the second data set belongs in the manufacturer's terminal, and then control the manufacturer's terminal to generate a second switching instruction, the second switching instruction carries at least the second set identifier of the second data set and the group identifier of the data group to which the second data set belongs. The data group to which the second data set belongs is the same as the data group to which the first data set belongs, so that the group identifier of the data group to which the second data set belongs is the same as the group identifier of the data group to which the first data set belongs. Then, the manufacturer's terminal can be controlled to send the second switching instruction to the management server. The management server can receive the second switching instruction sent by the manufacturer's terminal, and then step S402 can be executed.

[0164] Alternatively, in another embodiment of the present application, the manufacturer may input a second switching operation to the management server, where the second switching operation is used to set the state of the second data set to an activated state.

[0165] The second switching operation is an operation on the second set identifier of the second data set. In this way, the management server can obtain the second set identifier of the second data set at least according to the second switching operation. Since the second switching operation is used to set the status of the second data set to an activated state, the management server can know according to the second switching operation that it is necessary to switch the data set used by the distributed system to provide online data services based on the data group to which the second data set belongs to the second data set to the second data set.

[0166] When the management server imports the second data set in the data group in the distributed system in a bypass manner according to the group identifier in advance, the management server establishes a new database table in the distributed system in a bypass manner, and then writes each data in the second data set in the new database table in a bypass manner, and records the association relationship between the new database table and the data group (the table identifier of the new database table can be the same as the set identifier of the second data set, etc.). Through the association relationship, it can be known that multiple data in the second data set in the new database table belong to the data group.

[0167] In this way, the management server can obtain the group identifier of the data group to which the second data set belongs according to the second set identifier of the second data set and the association relationship. Then the management server can generate a first switching instruction according to at least the second set identifier of the second data set and the group identifier of the data group to which the second data set belongs. Then step S402 can be executed.

[0168] Since there is at most one data set in an activated state in any data group at any time, and since the second switching operation is used to set the state of the second data set to an activated state.

[0169] In this way, after the management server sets the status of the second data set to the activated state according to the second switching operation, the status of the previously activated data set (such as the first data set) in the data group to which the second data set belongs can also be switched from the activated state to the archived state, etc.

[0170] In step S402, the management server sends a second switching instruction to each data server.

[0171] For example, the management server may send the second switching instruction to each data server based on the bypass management interface of each data server.

[0172] In step S403, each data service end switches the data set used for providing online data services based on the data group to the second data set based on the second switching instruction.

[0173] Each data service end may receive a second switching instruction based on its own bypass management interface, and then switch the data set used for providing online data services based on the data group to the second data set based on the second switching instruction.

[0174] In the present application, since the data service end does not use the bypass management interface of the data service end when providing online data services to the outside, but uses the data read and write interface of the data service end, the data service end receives the second switching instruction sent by the management server end based on the bypass management interface of the data service end, which does not occupy the bandwidth of the data read and write interface of the data service end, and will not affect the efficiency of the data service end in providing online data services to the outside.

[0175] In one embodiment of the present application, for any one of the multiple data service terminals, the data service terminal maintains a binding relationship between the group identifier of the data group and the set identifier of the data set, and the binding relationship includes multiple corresponding table entries, each of which includes a group identifier and a set identifier, which is used to indicate that the data set used by the distributed system to provide online data to the outside based on the data group corresponding to the group identifier is the data set corresponding to the set identifier. In this way, the data service terminal can replace the set identifier of the data set corresponding to the group identifier of the data group (for example, it can be the first set identifier of the first data set, etc.) with the second set identifier of the second data set in the binding relationship between the group identifier of the data group and the set identifier of the data set. The same is true for each of the other data service terminals in the multiple data service terminals.

[0176] This application supports rolling back the data set used by each data service end to provide online data services based on the data group from the first data set to the previously used data set (such as the second data set, etc.) according to actual needs, thereby increasing the flexibility of selecting the data set used when providing online data services to the outside world.

[0177] In the present application, for any data group in a distributed system, the data group includes multiple data sets, and the order in which each of the multiple data sets is imported into the data group is often different.

[0178] In a possible scenario, the dataset imported into the data group in a later order is often used to switch (replace) the dataset imported into the database in an earlier order. The switch refers to the dataset used by the distributed system to provide online data services based on the data group. For example, the dataset used by the distributed system to provide online data services based on the data group is switched from "the dataset imported into the database in an earlier order" to "the dataset imported into the data group in a later order". That is, when the distributed system provides online data services based on the data group, the "dataset imported into the data group in a later order" is used, and the "dataset imported into the data group in an earlier order" may not be used.

[0179] Thus, in one possible case, after the data set used by the distributed system to provide external online data services based on the data group is switched from "the data set imported into the database in an earlier order" to "the data set imported into the data group in a later order", sometimes "the data set imported into the database in an earlier order" may no longer have an effect. For example, the subsequent distributed system may no longer provide external online data services based on "the data set imported into the database in an earlier order".

[0180] In this case, in order to save storage space of the distributed system, the manufacturer may be supported to delete “the data set imported into the database in the earlier order” from the data group in the distributed system according to actual needs.

[0181] For example, the manufacturer may be supported to input a deletion instruction to the management server, and the management server may obtain the deletion instruction, where the deletion instruction is used to instruct to delete the second data set in the distributed system according to the second set identifier of the second data set carried in the deletion instruction. Then, the management server may delete the second data set in the distributed system according to the deletion instruction.

[0182] Among them, the operation of "the management server obtains the deletion instruction" and the operation of "the management server deletes the second data set in the distributed system in bypass according to the deletion instruction" are both offline operations, which are independent of and do not affect the online operations involved in "the distributed system provides online data services to the outside world".

[0183] In addition, the interfaces involved in the operation of "the management server obtains the deletion instruction" and the operation of "the management server bypasses the second data set in the distributed system according to the deletion instruction" are both offline bypass management interfaces (for example, the offline bypass management interface of the management server, etc.), while the interfaces involved in the online operation of "the distributed system (for example, the data service end in the distributed system) provides online data services to the outside world" are online data reading and writing interfaces (for example, the online data reading and writing interface of the data service end involved, etc.).

[0184] Since the offline bypass management interface of the management server and the online data reading and writing interface of the data server are different interfaces, the operation of "the management server obtains the deletion instruction" and the operation of "the management server bypasses and deletes the second data set in the distributed system according to the deletion instruction" do not use the online data reading and writing interface of the data server in the distributed system, and thus do not occupy the bandwidth of the online data reading and writing interface of the data server in the distributed system.

[0185] Therefore, the operation of "the management server obtains the deletion instruction" and the operation of "the management server deletes the second data set in the distributed system according to the deletion instruction" will not affect the efficiency of "the distributed system (such as the data service end in the distributed system) providing online data services to the outside world". It will not affect the stability of "the distributed system (such as the data service end in the distributed system) providing online data services to the outside world".

[0186] In another embodiment, sometimes a data set may be mistakenly deleted due to human factors. For example, a data set that should not be deleted is deleted in a distributed system, that is, the manufacturer enters a deletion instruction in the management server and the instruction carries the set identifier of the data set that should not be deleted, causing the management server to delete the data set that should not be deleted according to the set identifier in the deletion instruction, which may affect the subsequent distributed system to provide online data services to the outside world.

[0187] For example, the distributed system may need to use the dataset when providing online data services to the outside world. However, since the dataset has been deleted from the distributed system, the distributed system cannot use the dataset when providing online data services to the outside world, and thus cannot provide online data services normally.

[0188] Therefore, in order to avoid the above situation, in another embodiment of the present application, any data set stored in the distributed system has its own state, and at any time, the data set has only one state. The state may include: activation state, archive state, offline state, and import state.

[0189] In the present application, a data set in an offline state may be deleted, while a data set in an activated state, an archived state, an imported state, etc. may not be deleted.

[0190] In this way, when a manufacturer needs to delete a certain data set in the distributed system, the manufacturer can first change the state of the data set to an offline state through the management server, and then delete the data set through the management server.

[0191] For example, for the second data set, the manufacturer may input a second switching operation for switching the state of the second data set from the archive state to the offline state to the management server.

[0192] The management server may receive a second switching operation for switching the state of the second data set from the archive state to the offline state. The management server may then switch the state of the second data set from the archive state to the offline state according to the second switching operation.

[0193] In this way, after the management server obtains the deletion instruction, the management server can obtain the status of the second data set according to the second set identifier in the deletion instruction.

[0194] When the status of the second data set is offline, the management server may delete the second data set in the distributed system according to the deletion instruction.

[0195] Alternatively, when the status of the second data set is not offline, the management server may not delete the second data set in the distributed system according to the deletion instruction, so as to avoid accidental deletion of the second data set.

[0196] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.

[0197] Reference Figure 6, shows a distributed system of the present application, the distributed system includes a management server and multiple online data servers; the management server includes a first acquisition module 11, a second acquisition module 12 and a first sending module 13; the data server includes a first switching module 14; the first acquisition module is used to acquire a first data set to be imported and a group identifier of a data group to which the first data set belongs, and import the first data set in the data group in the distributed system in a bypass manner according to the group identifier; the second acquisition module is used to acquire a first switching instruction, the first switching instruction is used to instruct the data server to switch the data set used for providing online data services based on the data group to the first data set according to the first set identifier of the first data set carried by the first switching instruction and the group identifier; the first sending module is used to send the first switching instruction to each data server; the first switching module is used to switch the data set used for providing online data services based on the data group to the first data set according to the first switching instruction.

[0198] In an optional implementation, the data service end also includes a second sending module; the management service end also includes a determination module; the second sending module is used to generate first feedback information for any one of the multiple data service ends, after the data service end switches the data set used by the data service end to provide online data services based on the data group to the first data set according to the first switching instruction, and send the first feedback information to the management server end, the first feedback information being used to indicate that the data set used by the data service end to provide online data services based on the data group to the first data set has been switched; the determination module is used to determine through the first feedback information that the data set used by the data service end to provide online data services based on the data group to the first data set has been switched.

[0199] In an optional implementation, the first sending module is also used to: for any one of the multiple data service terminals, if the first feedback information sent by the data service terminal according to the first switching instruction is not received within a first preset time period after the first switching instruction is sent to the data service terminal, send the first switching instruction to the data service terminal again until the first feedback information sent by the data service terminal according to the first switching instruction is received.

[0200] In an optional implementation, the management server also includes a third sending module and a fifth sending module; the data server also includes a closing module, a fourth sending module and a starting module; the third sending module is used to generate a closing instruction and send the closing instruction to each data server before sending the first switching instruction to each data server respectively, the closing instruction is used to instruct to close the function of providing online data services based on the data group according to the group identifier carried by the closing instruction; the closing module is used to close the function of providing online data services based on the data group according to the closing instruction; the fourth sending module is used to generate second feedback information and send the second feedback information to the management server respectively, the second feedback The feedback information is used to indicate that the function of providing online data services to the outside based on the data group has been turned off; the first sending module is also used to: after receiving the second feedback information sent by each data service end, send the first switching instruction to each data service end respectively; the fifth sending module is used to generate a start instruction and send the start instruction to each data service end when receiving the first feedback information sent by each data service end according to the first switching instruction respectively, the start instruction is used to indicate to start the function of providing online data services to the outside based on the data group according to the group identifier carried by the start instruction; the start module is used to start the function of providing online data services to the outside based on the data group according to the start instruction.

[0201] In an optional implementation, the fifth sending module is also used to: within a second preset time period after sending the first switching instruction to each data server, if the first feedback information sent by at least one data server according to the first switching instruction is not received, a start instruction is generated and sent to each data server.

[0202] In an optional implementation, the management server also includes a third acquisition module and a sixth sending module; the data server also includes a second switching module; the third acquisition module is used to acquire a second switching instruction, the second switching instruction is used to instruct the data server to switch the data set used for providing online data services to the outside based on the data group to the second data set according to the second set identifier of the second data set carried by the second switching instruction and the group identifier; the sixth sending module is used to send the second switching instruction to each data server; the second switching module is used to switch the data set used for providing online data services to the outside based on the data group to the second data set according to the second switching instruction.

[0203] In an optional implementation, the management server also includes a fourth acquisition module and a deletion module; the fourth acquisition module is used to obtain a deletion instruction, the deletion instruction is used to instruct to delete the second data set in the distributed system according to the second set identifier of the second data set carried by the deletion instruction; the deletion module is used to delete the second data set in the distributed system according to the deletion instruction.

[0204] In the present application, the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier. The management server obtains a first switching instruction, and the first switching instruction is used to instruct the data server to switch the data set used for providing online data services based on the data group to the first data set according to the first set identifier of the first data set carried by the first switching instruction and the group identifier. The management server sends the first switching instruction to each data server. Each data server receives the first switching instruction. Based on the first switching instruction, each data server switches the data set used for providing online data services based on the data group to the first data set.

[0205] Through the present application, on the one hand, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server imports the first data set in the data group in the distributed system according to the group identifier" are both offline operations, which are independent of and do not affect each other from the online operations involved in "the distributed system provides online data services to the outside world".

[0206] In addition, the interfaces involved in the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server bypass-imports the first data set in the data group in the distributed system according to the group identifier" are both offline bypass management interfaces (for example, the offline bypass management interface of the management server and the offline bypass management interface of the data service end, etc.), while the interfaces involved in the online operation involved in "the distributed system (for example, the data service end in the distributed system) provides online data services to the outside world" are online data reading and writing interfaces (for example, the online data reading and writing interface of the data service end involved, etc.).

[0207] Since the offline bypass management interface of the data server is different from the online data reading and writing interface of the data server, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server bypasses importing the first data set in the data group in the distributed system according to the group identifier" do not use the online data reading and writing interface of the data server in the distributed system, and thus do not occupy the bandwidth of the online data reading and writing interface of the data server in the distributed system.

[0208] Therefore, the operation of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs" and the operation of "the management server imports the first data set in the data group in the distributed system according to the group identifier" will not affect the efficiency of "the distributed system (such as the data service end in the distributed system) providing online data services to the outside world". It will not affect the stability of "the distributed system (such as the data service end in the distributed system) providing online data services to the outside world".

[0209] On the other hand, in the present application, the process of "each data service end switching the data set used to provide online data services based on the data group to the first data set based on the first switching instruction" is very short and only takes a short time, which is far less than the time required for the process of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier."

[0210] That is, the process of "each data service end switching the data set used for providing online data services based on the data group to the first data set based on the first switching instruction" only takes a short time, which is much shorter than the time taken for switching the data set used by the data service end for providing online data services based on the data group to the first data set in the above-mentioned method.

[0211] The process of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier" is independent of and decoupled from the process of "each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction."

[0212] That is, the time consumed in the process of "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier" has no effect on the time consumed in the actual process of "each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction."

[0213] And the operation of "each data service end switches the data set used for providing online data services based on the data group to the outside to the first data set based on the first switching instruction" is performed only after "the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier".

[0214] In this way, even if part of the data in the first data set coexists with part of the data in the second data set during the process of "each data service end switches the data set used for providing online data services based on the data group to the first data set based on the first switching instruction", the duration of the coexistence of part of the data in the first data set and part of the data in the second data set is also very short.

[0215] Therefore, since the process of "each data service end switching the data set used for providing online data services based on the data group to the first data set based on the first switching instruction" is very short, the degree of impact on the data service end's provision of online data services to the outside due to the coexistence of new data and old data is reduced. For example, compared with the above method, the present application improves the timeliness of the service and the accuracy of the service results.

[0216] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0217] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, the electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes a server, a gateway, a sub-device, etc., and the sub-device is an Internet of Things device or other device.

[0218] The embodiments of the present disclosure may be implemented as an apparatus configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the apparatus may include electronic devices such as servers (clusters), terminal devices such as IoT devices, and the like.

[0219] Figure 7 An exemplary apparatus 1300 that can be used to implement various embodiments described in this application is schematically shown.

[0220] For one embodiment, Figure 7 An exemplary apparatus 1300 is shown having one or more processors 1302, a control module (chip set) 1304 coupled to at least one of the (one or more) processors 1302, a memory 1306 coupled to the control module 1304, a non-volatile memory (NVM) / storage device 1308 coupled to the control module 1304, one or more input / output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1304.

[0221] The processor 1302 may include one or more single-core or multi-core processors, and the processor 1302 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1300 can be used as a server device such as a gateway described in the embodiments of the present application.

[0222] In some embodiments, the device 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM / storage device 1308) having instructions 1314 and one or more processors 1302 configured to execute the instructions 1314 in combination with the one or more computer-readable media to implement a module to perform the actions described in the present disclosure.

[0223] For one embodiment, the control module 1304 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1302 and / or any suitable device or component in communication with the control module 1304 .

[0224] The control module 1304 may include a memory controller module to provide an interface to the memory 1306. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0225] The memory 1306 may be used, for example, to load and store data and / or instructions 1314 for the device 1300. For one embodiment, the memory 1306 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 1306 may include a double data rate quad synchronous dynamic random access memory (DDR4 SDRAM).

[0226] For one embodiment, control module 1304 may include one or more input / output controllers to provide an interface to NVM / storage device 1308 and input / output device(s) 1310 .

[0227] For example, NVM / storage 1308 may be used to store data and / or instructions 1314. NVM / storage 1308 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0228] NVM / storage device 1308 may include storage resources that are physically part of the device on which apparatus 1300 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 1308 may be accessed via input / output device(s) 1310 over a network.

[0229] (One or more) input / output devices 1310 may provide an interface for the apparatus 1300 to communicate with any other appropriate device, and the input / output device 1310 may include a communication component, a phonetic component, a sensor component, etc. The network interface 1312 may provide an interface for the apparatus 1300 to communicate through one or more networks, and the apparatus 1300 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0230] For one embodiment, at least one of the processor(s) 1302 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be packaged together with the logic of one or more controllers of the control module 1304 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with the logic of one or more controllers of the control module 1304. For one embodiment, at least one of the processor(s) 1302 may be integrated on the same die with the logic of one or more controllers of the control module 1304 to form a system-on-chip (SoC).

[0231] In various embodiments, the device 1300 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 1300 may have more or fewer components and / or a different architecture. For example, in some embodiments, the device 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0232] An embodiment of the present application provides an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, enable the electronic device to execute one or more methods described in the present application.

[0233] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0234] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0235] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of the processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable information processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable information processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0236] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable information processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0237] These computer program instructions can also be loaded onto a computer or other programmable information processing terminal device so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0238] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0239] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0240] The above is a detailed introduction to a data processing method and a distributed system provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data processing method, applied to a distributed system, wherein the distributed system includes a management server and multiple online data servers; the method comprises: The management server obtains a first data set to be imported and a group identifier of a data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier; The management server obtains a first switching instruction, where the first switching instruction is used to instruct the data server to switch a data set used for providing online data services externally based on the data group to the first data set according to the first set identifier of the first data set and the group identifier carried in the first switching instruction; The management server sends a first switching instruction to each data server; Each data service end switches the data set used for providing online data services externally based on the data group to the first data set according to the first switching instruction.

2. The method according to claim 1, further comprising: For any one of the multiple data service terminals, after the data service terminal switches the data set used by the data service terminal to provide online data services based on the data group to the first data set according to the first switching instruction, the data service terminal generates first feedback information and sends the first feedback information to the management service terminal, where the first feedback information is used to indicate that the data set used by the data service terminal to provide online data services based on the data group to the first data set has been switched; The management server determines through the first feedback information that the data set used by the data server to provide online data services based on the data group has been switched to the first data set.

3. The method according to claim 2, further comprising: For any one of the multiple data service ends, within a first preset time period after the management server sends a first switching instruction to the data service end, if the management server end does not receive first feedback information sent by the data service end according to the first switching instruction, the management server end sends the first switching instruction to the data service end again until the management server end receives first feedback information sent by the data service end according to the first switching instruction.

4. The method according to claim 2, further comprising: Before the management server sends the first switching instruction to each data server, the management server generates a closing instruction and sends the closing instruction to each data server, where the closing instruction is used to instruct to close the function of providing online data services based on the data group according to the group identifier carried by the closing instruction; Each data service end closes the function of providing online data services based on the data group according to the closing instruction; Each data service end generates second feedback information respectively and sends the second feedback information to the management service end, where the second feedback information is used to indicate that the function of providing online data services based on the data group has been turned off; After the management server receives the second feedback information sent by each data server, the management server executes the step of sending a first switching instruction to each data server respectively; And, when the management server receives the first feedback information sent by each data server according to the first switching instruction, the management server generates a startup instruction and sends the startup instruction to each data server, where the startup instruction is used to instruct to start the function of providing online data services based on the data group according to the group identifier carried by the startup instruction; Each data service end starts the function of providing online data services based on the data group according to the start instruction.

5. The method according to claim 4, further comprising: Within a second preset time period after the management server sends the first switching instruction to each data server, if the management server does not receive the first feedback information sent by at least one data server according to the first switching instruction, the management server executes the step of generating a start instruction and sending the start instruction to each data server.

6. The method according to claim 1, further comprising: The management server obtains a second switching instruction, where the second switching instruction is used to instruct the data server to switch a data set used for providing online data services externally based on the data group to a second data set according to a second set identifier of the second data set carried in the second switching instruction and the group identifier; The management server sends a second switching instruction to each data server; Each data service end switches the data set used for providing online data services externally based on the data group to the second data set according to the second switching instruction.

7. The method according to claim 1, further comprising: The management server obtains a deletion instruction, where the deletion instruction is used to instruct to delete the second data set in the distributed system according to the second set identifier of the second data set carried in the deletion instruction; The management server deletes the second data set in the distributed system according to the deletion instruction.

8. A data processing method, applied to a distributed system, wherein the distributed system includes a management server and multiple online data servers; The method is applied to a management server, and the method includes: Acquire a first data set to be imported and a group identifier of a data group to which the first data set belongs, and import the first data set in the data group in the distributed system in a bypass manner according to the group identifier; The management server obtains a first switching instruction, where the first switching instruction is used to instruct the data server to switch a data set used for providing online data services externally based on the data group to the first data set according to the first set identifier of the first data set and the group identifier carried in the first switching instruction; A first switching instruction is sent to each data service end, so that each data service end switches a data set used for providing online data services based on the data group to the first data set according to the first switching instruction.

9. A data processing method, applied to a distributed system, wherein the distributed system includes a management server and multiple online data servers; The method is applied to a data service end, and the method comprises: receiving a first switching instruction sent by the management server; the first switching instruction is obtained after the management server obtains the first data set to be imported and the group identifier of the data group to which the first data set belongs, and imports the first data set in the data group in the distributed system in a bypass manner according to the group identifier, and the first switching instruction is used to instruct the data server to switch the data set used for providing online data services externally based on the data group to the first data set according to the first set identifier and the group identifier of the first data set carried by the first switching instruction; According to the first switching instruction, the data set used by the data service end to provide online data services externally based on the data group is switched to the first data set.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 9 are implemented.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Multi-data-center online management system and management method based on Internet of Things

    CN110798362A

  • Distributed data storage cluster switching method and switching instruction sending method and device

    CN111865632A