A data processing method and device

By receiving user access requests in the Flink engine and mapping the user-side file system protocol to the server-side file system protocol, cross-cluster operations are realized, which solves the problem that the Flink engine only supports a single HDFS configuration, improves data processing efficiency and user experience, and Business data and state data storage are separated.

CN114500485BActive Publication Date: 2024-10-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210108295.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-28
Publication Date
2024-10-18
Estimated Expiration
2042-01-28

AI Technical Summary

Technical Problem

The existing Flink engine only supports one HDFS configuration and cannot implement cross-cluster operations or multi-cluster parallel operations, resulting in low data processing efficiency and narrow applicability.

Method used

By receiving user access requests, obtain file system instances, and map them to server-side file system protocols according to the user-side file system protocol to achieve cross-cluster or multi-cluster operations, support multiple file system types and clusters, and separate business data and status data storage .

Benefits of technology

It expands the application scenarios of data processing, improves data processing efficiency, enhances user experience, and ensures the stability and high availability of status data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114500485B_ABST
    Figure CN114500485B_ABST
Patent Text Reader

Abstract

The present invention discloses a data processing method and device, and relates to the field of computer technology. A specific implementation of the method includes: receiving a user access request, wherein the user access request includes configuration information of a file system cluster to be accessed and a user-side file system protocol; obtaining a file system instance, and determining a server-side file system protocol corresponding to the user-side file system protocol according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for executing data processing; based on the server-side file system protocol and the configuration information of the file system cluster to be accessed, accessing the file system cluster to be accessed, and calling the operation method to execute corresponding data processing. This implementation expands the application scenarios of data processing, improves data processing efficiency, and enhances user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data processing method and device. Background Art

[0002] With the rapid development of big data technology, the timeliness requirements for business data processing have gradually increased. More and more businesses are beginning to use real-time computing to accelerate business development. Among them, Flink (an open source stream processing framework) has become a new generation of real-time computing engine due to its high throughput, low latency, and good fault tolerance. Its application scenarios are also gradually increasing.

[0003] Currently, the Flink engine only supports one set of HDFS (Hadoop Distributed File System) configurations. If business users need to read and write their own HDFS, they need to set the configuration of their own clusters. In this way, the state data will also be written to the user's HDFS cluster. The user's cluster may not be highly available, and sometimes it will be shut down for maintenance and data cleanup, which is not user-friendly for state storage.

[0004] There are at least the following problems in the prior art:

[0005] Since the current Flink engine only supports one set of HDFS (Hadoop Distributed File System) configurations, existing data processing methods cannot achieve cross-cluster operations or multi-cluster parallel operations, resulting in low data processing efficiency and narrow applicability of data processing methods based on the Flink engine. Summary of the invention

[0006] In view of this, an embodiment of the present invention provides a data processing method and device, which can map the user-side file system protocol to the server-side file system protocol, thereby realizing cross-cluster operation or multi-cluster parallel operation, expanding the application scenarios of data processing, improving data processing efficiency, and enhancing user experience.

[0007] To achieve the above object, according to one aspect of an embodiment of the present invention, a data processing method is provided, comprising:

[0008] Receiving a user access request, wherein the user access request includes configuration information of a file system cluster to be accessed and a user-side file system protocol;

[0009] Obtain a file system instance, and determine the server-side file system protocol corresponding to the user-side file system protocol according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for executing data processing;

[0010] Based on the server-side file system protocol and the configuration information of the file system cluster to be accessed, the file system cluster to be accessed is accessed, and the operation method is called to perform corresponding data processing.

[0011] Furthermore, before the step of receiving the user access request, the method further includes:

[0012] Receive user access requests through the external interface of the Flink engine; the user access request includes all user-side file system protocols corresponding to the user;

[0013] Get the server file system protocol connected to the Flink engine;

[0014] According to the file system type, configure the mapping relationship between the user-side file system protocol and the server-side file system protocol, and build a file system instance based on the mapping relationship.

[0015] Furthermore, a file system instance is constructed according to the mapping relationship, including:

[0016] Determine the file system type included in the mapping relationship;

[0017] Based on the file system factory corresponding to each file system type, create a file system instance corresponding to the server file system protocol.

[0018] Furthermore, before the step of creating a file system instance corresponding to the server file system protocol, the method further includes:

[0019] Verify whether the mapping relationship is configured correctly;

[0020] If not, update the mapping relationship.

[0021] Furthermore, before the step of creating a file system instance corresponding to the server file system protocol based on the file system factory corresponding to each file system type, the method further includes:

[0022] Find the corresponding file system factory from the cache according to the file system type;

[0023] If not found, create the corresponding file system factory.

[0024] Furthermore, the server-side file system protocol includes at least one file system type, and each file system type corresponds to at least one cluster.

[0025] According to two aspects of an embodiment of the present invention, there is provided a data processing device, including:

[0026] A receiving module, used for receiving a user access request, wherein the user access request includes configuration information of the file system cluster to be accessed and a user-side file system protocol;

[0027] The file system instance acquisition module is used to acquire the file system instance and determine the server-side file system protocol corresponding to the user-side file system protocol according to the file system instance; wherein the file system instance includes the mapping relationship between the user-side file system protocol and the server-side file system protocol and the operation method for executing data processing;

[0028] The data processing module is used to access the file system cluster to be accessed based on the server file system protocol and the configuration information of the file system cluster to be accessed, and call the operation method to perform corresponding data processing.

[0029] Furthermore, the method further includes a file system instance construction module, which is used, before the step of receiving a user access request, to:

[0030] Receive user access requests through the external interface of the Flink engine; the user access request includes all user-side file system protocols corresponding to the user;

[0031] Get the server file system protocol connected to the Flink engine;

[0032] According to the file system type, configure the mapping relationship between the user-side file system protocol and the server-side file system protocol, and build a file system instance based on the mapping relationship.

[0033] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, including:

[0034] one or more processors;

[0035] a storage device for storing one or more programs,

[0036] When one or more programs are executed by one or more processors, the one or more processors implement any of the above-mentioned data processing methods.

[0037] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above-mentioned data processing methods is implemented.

[0038] An embodiment of the above invention has the following advantages or beneficial effects: because it adopts the method of receiving a user access request, wherein the user access request includes the configuration information of the file system cluster to be accessed and the user-side file system protocol; obtaining a file system instance, and determining the server-side file system protocol corresponding to the user-side file system protocol according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for performing data processing; based on the server-side file system protocol and the configuration information of the file system cluster to be accessed, accessing the file system cluster to be accessed, and calling the operation method to perform corresponding data processing technical means, thereby overcoming the technical problem that in the existing data processing method, the data processing efficiency is low due to the inability to realize cross-cluster operation or multi-cluster parallel operation, and the applicability of the data processing method based on the Flink engine is narrow, thereby achieving the technical effect of mapping the user-side file system protocol to the server-side file system protocol, thereby realizing cross-cluster operation or multi-cluster parallel operation, expanding the application scenarios of data processing, improving data processing efficiency, and enhancing user experience.

[0039] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0041] Figure 1 is a schematic diagram of the main flow of a data processing method provided according to a first embodiment of the present invention;

[0042] Figure 2a is a schematic diagram of the main flow of a data processing method provided according to a second embodiment of the present invention;

[0043] Figure 2b yes Figure 2a A schematic diagram of the main process of configuring the mapping relationship in the method;

[0044] Figure 3 is a schematic diagram of main modules of a data processing device provided according to an embodiment of the present invention;

[0045] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0046] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0048] Figure 1 is a schematic diagram of the main flow of the data processing method provided according to the first embodiment of the present invention; Figure 1 As shown, the data processing method provided by the embodiment of the present invention mainly includes:

[0049] Step S101: receiving a user access request, wherein the user access request includes configuration information of a file system cluster to be accessed and a user-side file system protocol.

[0050] Specifically, the user-side file system protocol refers to a file system protocol customized by the user-side, and the configuration information of the file system cluster to be accessed mainly includes configuration information such as an access address, a user name, and a user password for accessing the corresponding file system cluster.

[0051] Further, according to an embodiment of the present invention, before the step of receiving a user access request, the method further includes:

[0052] Receive user access requests through the external interface of the Flink engine; the user access request includes all user-side file system protocols corresponding to the user;

[0053] Get the server file system protocol connected to the Flink engine;

[0054] According to the file system type, configure the mapping relationship between the user-side file system protocol and the server-side file system protocol, and build a file system instance based on the mapping relationship.

[0055] According to an embodiment of the present invention, the server-side file system protocol includes at least one file system type, and the number of clusters corresponding to each file system type is at least one.

[0056] Through the above settings, the server's initialization process before executing user access is implemented. By responding to user access requests, a file system instance is constructed, and the mapping relationship between the user-side file system corresponding to the user to be accessed and the server-side file system protocol is determined. This helps to determine the corresponding server-side file system based on the mapping relationship in the file system instance after receiving the user access request. Cross-cluster operations or multi-cluster parallel operations can be implemented, which expands the application scenarios of data processing and improves data processing efficiency.

[0057] At the same time, since the Flink engine in the existing method only supports one set of HDFS (Hadoop Distributed File System) configuration, the business data and state data are stored in the same cluster, which affects the maintenance and use of data and reduces the data processing efficiency. Through the above settings, since the server supports multiple file system types and multiple file system clusters, the user-side file system protocol can instruct file systems of different types or different clusters to store business data and state data respectively, realizing the separation of business data cluster and state data cluster, so that when maintaining the business data cluster, the state data cluster is guaranteed not to be disturbed, and the stability and high availability of the state data are guaranteed.

[0058] Preferably, according to an embodiment of the present invention, constructing a file system instance according to the mapping relationship includes:

[0059] Determine the file system type included in the mapping relationship;

[0060] Based on the file system factory corresponding to each file system type, create a file system instance corresponding to the server file system protocol.

[0061] After configuring the mapping between the user-side file system protocol and the server-side file system protocol, you need to build one or more file system types supported by the Flink engine on the server side and build a file system instance to ensure the normal operation of data processing.

[0062] Furthermore, before the step of creating a file system instance corresponding to the server file system protocol, the method further includes:

[0063] Verify whether the mapping relationship is configured correctly;

[0064] If not, update the mapping relationship.

[0065] The above steps are a fallback strategy of an embodiment of the present invention. The embodiment of the present invention currently mainly supports HDFS (Hadoop file system), AWS S3 (Amazon Simple Storage Service, a network-oriented storage service) and commonly used file systems. If the file system type corresponding to the user-defined file system protocol is not supported on the server side, it is necessary to send feedback information to the user and update the mapping relationship according to the user's adjustment.

[0066] Exemplarily, according to an embodiment of the present invention, before the step of creating a file system instance corresponding to the server file system protocol based on the file system factory corresponding to each file system type, the step further includes:

[0067] Find the corresponding file system factory from the cache according to the file system type;

[0068] If not found, create the corresponding file system factory.

[0069] Through the above settings, it is determined that the file system factory on the server side is built, which helps to obtain the file system factory class and call the creation method ((create) method) of the file system factory class to create the corresponding file system instance.

[0070] Step S102, obtaining a file system instance, and determining a server-side file system protocol corresponding to a user-side file system protocol according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for executing data processing.

[0071] Specifically, according to an embodiment of the present invention, the server implements the construction of a file system instance during user access, and obtains the file system instance in response to a data processing request sent by the user during data processing, which helps to map the user-side file system protocol indicated in the data processing request to the server-side file system protocol, thereby achieving cross-cluster or multi-cluster access and executing responsive data operation processing. Through the above settings, data processing efficiency is improved and user experience is enhanced.

[0072] Step S103: based on the server file system protocol and the configuration information of the file system cluster to be accessed, the file system cluster to be accessed is accessed, and the operation method is called to perform corresponding data processing.

[0073] According to the technical solution of the embodiment of the present invention, a user access request is received, wherein the user access request includes the configuration information of the file system cluster to be accessed and the user-side file system protocol; a file system instance is obtained, and the server-side file system protocol corresponding to the user-side file system protocol is determined according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for performing data processing; based on the server-side file system protocol and the configuration information of the file system cluster to be accessed, the file system cluster to be accessed is accessed, and the operation method is called to perform corresponding data processing. Therefore, the technical problem that the data processing efficiency is low and the applicability of the data processing method based on the Flink engine is narrow due to the inability to realize cross-cluster operation or multi-cluster parallel operation in the existing data processing method is overcome, thereby achieving the technical effect of mapping the user-side file system protocol to the server-side file system protocol, thereby realizing cross-cluster operation or multi-cluster parallel operation, expanding the application scenarios of data processing, improving data processing efficiency, and enhancing user experience.

[0074] Figure 2a is a schematic diagram of the main flow of the data processing method provided according to the second embodiment of the present invention; Figure 2a As shown, the data processing method provided by the embodiment of the present invention mainly includes:

[0075] Step S201, receiving a user access request through the external interface of the Flink engine, and obtaining the server-side file system protocol connected to the Flink engine; wherein the user access request includes all user-side file system protocols corresponding to the user.

[0076] Specifically, the user-side file system protocol refers to a file system protocol customized by the user; the server-side file system protocol refers to a file system protocol supported by the server.

[0077] Step S202: According to the file system type, a mapping relationship between the user-side file system protocol and the server-side file system protocol is configured.

[0078] According to an embodiment of the present invention, by adding a cluster file system binding configuration item (apus.fs.ext.scheme.bind), the user-defined file system protocol UDS (user defined scheme) included in the user access request is bound to the server-side file system protocol (scheme) according to the file system type to obtain a mapping relationship between the two (for example, if the user-side file system protocol is hdfs1, the corresponding server-side file system protocol is hdfs, and a binding relationship / mapping relationship (apus.fs.ext.scheme.bind.hdfs1:hdfs) is obtained). Figure 2b The schematic diagram of configuring the mapping relationship between the user-side file system protocol and the server-side file system protocol is shown, where "hdfs2: / / hdfsConfig2, hdfs1: / / hdfsConfig1, hdfs: / / hdfsConfig, s3: / / s3 Config, s3-1: / / s3Config-1, s3-2: / / s3 Config-2" are all user-defined file system protocols, where hdfs2, hdfs1, and hdfs all represent hdfs file systems of different clusters, and are therefore mapped to the hdfs server-side file system protocol. Through the above settings, the mapping relationship between the user-side file system protocol and the server-side file system protocol is configured in combination with the file system type, so that after receiving a user access request, the corresponding server-side file system can be determined according to the mapping relationship, so as to achieve cross-cluster operation or multi-cluster parallel operation, expand the application scenarios of data processing, and improve data processing efficiency.

[0079] Step S203, determining the file system types included in the mapping relationship; and creating a file system instance corresponding to the server-side file system protocol based on the file system factory corresponding to each file system type.

[0080] Specifically, according to an embodiment of the present invention, when the FileSystem.get() method is called, it is determined whether the corresponding file system factory (FileSystemFactory) is created based on the protocol part (scheme) indicated by the configuration information of the file system cluster to be accessed in the user access request (specifically the Uniform Resource Identifier (URI), a character string used to identify the name of an Internet resource). If not, it is necessary to create the file system factory first.

[0081] If the configuration information in the user access request (i.e. the full resource identifier (URI) is hdfs1: / / user / state, the corresponding server-side file system protocol will be determined as hdfs based on the mapping relationship. Then hdfs is used as the key to search for the corresponding file system factory (FileSystemFactory) in the cached map. If it is not found, it means that the file system factory has not been created yet, so the file system factory is created first. After obtaining the file system factory, the corresponding file system instance is created by calling the creation method of the file system factory class.

[0082] Further, according to an embodiment of the present invention, before the step of creating a file system instance corresponding to the server file system protocol, the method further includes:

[0083] Verify whether the mapping relationship is configured correctly;

[0084] If not, update the mapping relationship.

[0085] According to an embodiment of the present invention, taking the HDFS file system as an example, the creation operation is implemented by the Hadoop file system factory (HadoopFsFactory). Before creation, the creation method of the Hadoop file system factory is called to obtain the user-defined file system protocol, the server-side file system protocol and the mapping relationship between the two again for verification. If the verification is incorrect, the HDFS file system extension configuration parameter apus.fs.ext.config.hdfs1.xxx (whose format matches the configuration of the HDFS1 (user-defined file system protocol) cluster, and the configuration information after apus.fs.ext.config.hdfs1. is intercepted as the key, and the corresponding value is value, and the server-side HDFS configuration object (HdfsConfiguration) corresponding to the user-defined file system protocol is generated to update the mapping relationship.

[0086] On the other hand, the above steps are a fallback strategy of an embodiment of the present invention. The embodiment of the present invention currently mainly supports HDFS (Hadoop file system), AWS S3 (Amazon Simple Storage Service, a network-oriented storage service) and commonly used file systems. If the file system type corresponding to the user-defined file system protocol is not supported on the server side, it is necessary to send feedback information to the user and update the mapping relationship according to the user's adjustment.

[0087] Since the Flink engine in the existing method only supports one set of HDFS (Hadoop Distributed File System) configuration, business data and state data are stored in the same cluster, which affects data maintenance and use and reduces data processing efficiency. Through the above settings, since the server supports multiple file system types and multiple file system clusters, the user-side file system protocol can instruct file systems of different types or clusters to store business data and state data respectively, realizing the separation of business data cluster and state data cluster, so that when maintaining the business data cluster, the state data cluster is guaranteed not to be disturbed, and the stability and high availability of the state data are guaranteed.

[0088] Step S204: receiving a user access request, wherein the user access request includes configuration information of the file system cluster to be accessed and a user-side file system protocol.

[0089] Specifically, the user-side file system protocol refers to a file system protocol customized by the user-side, and the configuration information of the file system cluster to be accessed mainly includes configuration information such as an access address, a user name, and a user password for accessing the corresponding file system cluster.

[0090] Step S205, obtaining a file system instance, and determining a server-side file system protocol corresponding to the user-side file system protocol according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for executing data processing;

[0091] Specifically, according to an embodiment of the present invention, the server implements the construction of a file system instance during user access, and obtains the file system instance in response to a data processing request sent by the user during data processing, which helps to map the user-side file system protocol indicated in the data processing request to the server-side file system protocol, thereby achieving cross-cluster or multi-cluster access and executing responsive data operation processing. Through the above settings, data processing efficiency is improved and user experience is enhanced.

[0092] Step S206: based on the server file system protocol and the configuration information of the file system cluster to be accessed, the file system cluster to be accessed is accessed, and the operation method is called to perform corresponding data processing.

[0093] According to the technical solution of the embodiment of the present invention, a user access request is received, wherein the user access request includes the configuration information of the file system cluster to be accessed and the user-side file system protocol; a file system instance is obtained, and the server-side file system protocol corresponding to the user-side file system protocol is determined according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for performing data processing; based on the server-side file system protocol and the configuration information of the file system cluster to be accessed, the file system cluster to be accessed is accessed, and the operation method is called to perform corresponding data processing. Therefore, the technical problem that the data processing efficiency is low and the applicability of the data processing method based on the Flink engine is narrow due to the inability to realize cross-cluster operation or multi-cluster parallel operation in the existing data processing method is overcome, thereby achieving the technical effect of mapping the user-side file system protocol to the server-side file system protocol, thereby realizing cross-cluster operation or multi-cluster parallel operation, expanding the application scenarios of data processing, improving data processing efficiency, and enhancing user experience.

[0094] Figure 3 is a schematic diagram of main modules of a data processing device provided according to an embodiment of the present invention; Figure 3 As shown, the data processing device 300 provided in this embodiment of the present invention mainly includes:

[0095] The receiving module 301 is used to receive a user access request, wherein the user access request includes configuration information of the file system cluster to be accessed and a user-side file system protocol.

[0096] Specifically, the user-side file system protocol refers to a file system protocol customized by the user-side, and the configuration information of the file system cluster to be accessed mainly includes configuration information such as an access address, a user name, and a user password for accessing the corresponding file system cluster.

[0097] Furthermore, the method further includes a file system instance construction module, which is used, before the step of receiving a user access request, to:

[0098] Receive user access requests through the external interface of the Flink engine; the user access request includes all user-side file system protocols corresponding to the user;

[0099] Get the server file system protocol connected to the Flink engine;

[0100] According to the file system type, configure the mapping relationship between the user-side file system protocol and the server-side file system protocol, and build a file system instance based on the mapping relationship.

[0101] According to an embodiment of the present invention, the server-side file system protocol includes at least one file system type, and the number of clusters corresponding to each file system type is at least one.

[0102] Through the above settings, the server's initialization process before executing user access is implemented. By responding to user access requests, a file system instance is constructed, and the mapping relationship between the user-side file system corresponding to the user to be accessed and the server-side file system protocol is determined. This helps to determine the corresponding server-side file system based on the mapping relationship in the file system instance after receiving the user access request. Cross-cluster operations or multi-cluster parallel operations can be implemented, which expands the application scenarios of data processing and improves data processing efficiency.

[0103] At the same time, since the Flink engine in the existing method only supports one set of HDFS (Hadoop Distributed File System) configuration, the business data and state data are stored in the same cluster, which affects the maintenance and use of data and reduces the data processing efficiency. Through the above settings, since the server supports multiple file system types and multiple file system clusters, the user-side file system protocol can instruct file systems of different types or different clusters to store business data and state data respectively, realizing the separation of business data cluster and state data cluster, so that when maintaining the business data cluster, the state data cluster is guaranteed not to be disturbed, and the stability and high availability of the state data are guaranteed.

[0104] Preferably, according to an embodiment of the present invention, the file system instance construction module is further used for:

[0105] Determine the file system type included in the mapping relationship;

[0106] Based on the file system factory corresponding to each file system type, create a file system instance corresponding to the server file system protocol.

[0107] After configuring the mapping between the user-side file system protocol and the server-side file system protocol, you need to build one or more file system types supported by the Flink engine on the server side and build a file system instance to ensure the normal operation of data processing.

[0108] Furthermore, before the step of creating a file system instance corresponding to the server-side file system protocol, the file system instance construction module is further used to:

[0109] Verify whether the mapping relationship is configured correctly;

[0110] If not, update the mapping relationship.

[0111] The above steps are a fallback strategy of an embodiment of the present invention. The embodiment of the present invention currently mainly supports HDFS (Hadoop file system), AWS S3 (Amazon Simple Storage Service, a network-oriented storage service) and commonly used file systems. If the file system type corresponding to the user-defined file system protocol is not supported on the server side, it is necessary to send feedback information to the user and update the mapping relationship according to the user's adjustment.

[0112] Exemplarily, according to an embodiment of the present invention, before the step of creating a file system instance corresponding to the server-side file system protocol based on the file system factory corresponding to each file system type, the file system instance construction module is further used to:

[0113] Find the corresponding file system factory from the cache according to the file system type;

[0114] If not found, create the corresponding file system factory.

[0115] Through the above settings, it is determined that the file system factory on the server side is built, which helps to obtain the file system factory class and call the creation method ((create) method) of the file system factory class to create the corresponding file system instance.

[0116] The file system instance acquisition module 302 is used to acquire the file system instance and determine the server-side file system protocol corresponding to the user-side file system protocol according to the file system instance; wherein the file system instance includes the mapping relationship between the user-side file system protocol and the server-side file system protocol and the operation method for performing data processing.

[0117] Specifically, according to an embodiment of the present invention, the server implements the construction of a file system instance during user access, and obtains the file system instance in response to a data processing request sent by the user during data processing, which helps to map the user-side file system protocol indicated in the data processing request to the server-side file system protocol, thereby achieving cross-cluster or multi-cluster access and executing responsive data operation processing. Through the above settings, data processing efficiency is improved and user experience is enhanced.

[0118] The data processing module 303 is used to access the file system cluster to be accessed based on the server file system protocol and the configuration information of the file system cluster to be accessed, and call the operation method to perform corresponding data processing.

[0119] According to the technical solution of the embodiment of the present invention, a user access request is received, wherein the user access request includes the configuration information of the file system cluster to be accessed and the user-side file system protocol; a file system instance is obtained, and the server-side file system protocol corresponding to the user-side file system protocol is determined according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for performing data processing; based on the server-side file system protocol and the configuration information of the file system cluster to be accessed, the file system cluster to be accessed is accessed, and the operation method is called to perform corresponding data processing. Therefore, the technical problem that the data processing efficiency is low and the applicability of the data processing method based on the Flink engine is narrow due to the inability to realize cross-cluster operation or multi-cluster parallel operation in the existing data processing method is overcome, thereby achieving the technical effect of mapping the user-side file system protocol to the server-side file system protocol, thereby realizing cross-cluster operation or multi-cluster parallel operation, expanding the application scenarios of data processing, improving data processing efficiency, and enhancing user experience.

[0120] Figure 4 An exemplary system architecture 400 is shown to which the data processing method or data processing device according to the embodiment of the present invention can be applied.

[0121] like Figure 4 As shown, the system architecture 400 may include terminal devices 401, 402, 403, a network 404 and a server 405 (this architecture is only an example, and the components included in the specific architecture may be adjusted according to the specific application). The network 404 is used to provide a medium for a communication link between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0122] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as data processing applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0123] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0124] The server 405 may be a server that provides various services, such as a server that processes data (for example only) received from the user using the terminal devices 401, 402, and 403. The server may analyze and process the received user access request and other data, and feed back the processing result (for example, the processing result after executing the corresponding data processing) to the terminal device.

[0125] It should be noted that the data processing method provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the data processing device is generally disposed in the server 405 .

[0126] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0127] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 5 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0128] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0129] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0130] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0131] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0132] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0133] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as follows: a processor includes a receiving module, a file system instance acquisition module, and a data processing module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the receiving module may also be described as a "module for receiving user access requests."

[0134] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: receiving a user access request, wherein the user access request includes the configuration information of the file system cluster to be accessed and the user-side file system protocol; obtaining a file system instance, and determining the server-side file system protocol corresponding to the user-side file system protocol according to the file system instance; wherein the file system instance includes the mapping relationship between the user-side file system protocol and the server-side file system protocol and the operation method for performing data processing; based on the server-side file system protocol and the configuration information of the file system cluster to be accessed, access the file system cluster to be accessed, and call the operation method to perform corresponding data processing.

[0135] According to the technical solution of the embodiment of the present invention, a user access request is received, wherein the user access request includes the configuration information of the file system cluster to be accessed and the user-side file system protocol; a file system instance is obtained, and the server-side file system protocol corresponding to the user-side file system protocol is determined according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for performing data processing; based on the server-side file system protocol and the configuration information of the file system cluster to be accessed, the file system cluster to be accessed is accessed, and the operation method is called to perform corresponding data processing. Therefore, the technical problem that the data processing efficiency is low and the applicability of the data processing method based on the Flink engine is narrow due to the inability to realize cross-cluster operation or multi-cluster parallel operation in the existing data processing method is overcome, thereby achieving the technical effect of mapping the user-side file system protocol to the server-side file system protocol, thereby realizing cross-cluster operation or multi-cluster parallel operation, expanding the application scenarios of data processing, improving data processing efficiency, and enhancing user experience.

[0136] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data processing method, characterized in that: include: Receiving a user access request, wherein the user access request includes configuration information of a file system cluster to be accessed and a user-side file system protocol; Acquire a file system instance, and determine a server-side file system protocol corresponding to the user-side file system protocol according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for performing data processing; Based on the server-side file system protocol and the configuration information of the file system cluster to be accessed, access the file system cluster to be accessed, and call the operation method to perform corresponding data processing; Before the step of receiving the user access request, the method further includes: Receive a user access request through the external interface of the Flink engine; wherein the user access request includes all user-side file system protocols corresponding to the user; Get the server file system protocol connected to the Flink engine; According to the file system type, a mapping relationship between the user-side file system protocol and the server-side file system protocol is configured, and a file system instance is constructed according to the mapping relationship.

2. The data processing method according to claim 1, characterized in that: The step of constructing a file system instance according to the mapping relationship includes: Determining the file system type included in the mapping relationship; Based on the file system factory corresponding to each file system type, create a file system instance corresponding to the server file system protocol.

3. The data processing method according to claim 2, characterized in that: Before the step of creating a file system instance corresponding to the server file system protocol, the method further includes: Verify whether the mapping relationship is configured accurately; If not, the mapping relationship is updated.

4. The data processing method according to claim 2, characterized in that: Before the step of creating a file system instance corresponding to the server file system protocol based on the file system factory corresponding to each file system type, the step further includes: Searching for a corresponding file system factory from a cache according to the file system type; If not found, create the corresponding file system factory.

5. The data processing method according to claim 1, characterized in that: The server-side file system protocol includes at least one file system type, and each file system type corresponds to at least one cluster.

6. A data processing device, characterized in that: include: A receiving module, configured to receive a user access request, wherein the user access request includes configuration information of a file system cluster to be accessed and a user-side file system protocol; A file system instance acquisition module, used to acquire a file system instance, and determine a server-side file system protocol corresponding to the user-side file system protocol according to the file system instance; wherein the file system instance includes a mapping relationship between the user-side file system protocol and the server-side file system protocol and an operation method for performing data processing; A data processing module, used to access the file system cluster to be accessed based on the server file system protocol and the configuration information of the file system cluster to be accessed, and call the operation method to perform corresponding data processing; The file system instance construction module is used, before the step of receiving the user access request, to: receive the user access request through the external interface of the Flink engine; wherein the user access request includes all the user-side file system protocols corresponding to the user; obtain the server-side file system protocol connected to the Flink engine; configure the mapping relationship between the user-side file system protocol and the server-side file system protocol according to the file system type, and construct the file system instance according to the mapping relationship.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Distributed file system management method, device and corresponding file system

    CN101944124A

  • Method and system for realizing mutual access of hadoop file system hdfs and object storage s3 data

    CN111708738A