Big data storage service sharing method, device, computer equipment and storage medium
Through the big data storage service sharing method, the problems of low operation and maintenance efficiency and repetitive development of big data storage technology for various business systems in the e-commerce field are solved, enabling quick start-up and flexible use of storage services, and reducing costs and complexity. .
Patent Information
- Application Number
- CN202110457297.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-27
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-04-27
AI Technical Summary
In the field of e-commerce, due to the lack of mature technical support, various business systems are difficult to quickly locate problems related to big data storage, resulting in low operation and maintenance efficiency, high repetitive learning and development costs, and each system needs to independently understand and manage big data clusters. technology and grammar.
Provides a big data storage service sharing method that reduces the complexity of big data storage technology by obtaining message data, determining the data operation type, obtaining pre-configured target work unit configuration information, assembling the operation message and sending it to the target storage cluster. Access difficulty enables each service user to use big data storage services without special development.
It realizes that each service user is almost unaware of big data related technologies and syntax, quickly gets started with big data storage services, reduces development difficulty and cost, increases flexibility, supports dynamic configuration of storage clusters and indexes, and realizes online imperceptible switching. and extensions.
Smart Images

Figure CN113220759B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of big data applications, and in particular to a big data storage service sharing method, apparatus, computer equipment and storage medium. Background Art
[0002] In the field of e-commerce, a large amount of data is generated every day, and ordinary databases can hardly support tens or hundreds of billions of data. Therefore, a set of big data storage methods has become an indispensable choice for various business systems. At present, there are many categories of big data related technologies, and the usage methods and difficulty are different. Most of the practices of various systems in the industry are for each system to independently conduct research, learning, development and operation and maintenance, which will lead to a lot of duplication of work, and improper use of some technologies may also bring a series of problems.
[0003] At present, some common problems encountered by various systems include at least the following:
[0004] (1) Not understanding big data related technologies, such as ES, HBase and other technical features and syntax, development requires a lot of effort to master them;
[0005] (2) Due to the lack of mature technical support, when some exceptions occur, it is impossible to quickly locate the problem, resulting in low operation and maintenance efficiency. Some problems can be avoided directly in the development stage, but they are brought online and not known until the problem occurs;
[0006] (3) For the same type of technology, each system must be repeatedly learned and developed, resulting in a waste of labor costs;
[0007] (4) There is a dedicated big data department to provide management, construction, and operation and maintenance of big data clusters, but the clusters are still used by various business systems. Problems in the process can only be discovered by the users. Each user needs to understand the technology and related features, as well as the grammatical rules. Each system also needs to be developed independently. Summary of the invention
[0008] In view of the shortcomings of the prior art, the present invention provides a big data storage service sharing method, apparatus, computer equipment and storage medium. The embodiments of the present invention can reduce the access difficulty of big data storage technology. Service users are almost unaware of the relevant technologies and syntax of big data. They only need to implement standardized interfaces to use the big data storage service without the need for special development.
[0009] According to a first aspect, the present invention provides a big data storage service sharing method. In one embodiment, the method includes:
[0010] Obtain message data from any service user, including operation information and work unit call code;
[0011] Determine the data operation type corresponding to the message data;
[0012] Obtain target work unit configuration information pre-configured by the service user corresponding to the work unit call code, and determine the target storage cluster according to the target work unit configuration information;
[0013] Assemble the operation information into an operation message that meets the message format requirements of the target storage cluster according to the data operation type corresponding to the message data;
[0014] The operation message is sent to the target storage cluster, and upon receiving feedback information returned by the target storage cluster after processing the operation message, the service user is responded to according to the feedback information.
[0015] In one embodiment, the message data from any service user is an interface message sent by the service user by calling a standardized real-time operation interface, or a middleware message pushed by the service user to the message middleware.
[0016] In one embodiment, if the message data is an interface message sent by the service user by calling a standardized real-time operation interface, the step of determining the data operation type corresponding to the message data includes:
[0017] The data operation type corresponding to the real-time operation interface called by the service user is determined, and the data operation type corresponding to the real-time operation interface is determined as the data operation type corresponding to the message data.
[0018] In one embodiment, if the message data is a middleware message pushed by the service user to the message middleware, the message data also includes an event type. Accordingly, the step of determining the data operation type corresponding to the message data includes: determining the data operation type corresponding to the event type as the data operation type corresponding to the message data.
[0019] In one embodiment, the target work unit configuration information includes target storage cluster determination information and target index determination information; the step of determining the target storage cluster according to the target work unit configuration information includes:
[0020] Determine a target storage cluster from multiple storage clusters according to the target storage cluster determination information, and obtain a cluster connection of the target storage cluster from a cluster connection factory;
[0021] The steps of sending the operation message to the target storage cluster include:
[0022] Determine a target index in a target storage cluster according to the target index determination information;
[0023] The operation message is sent to the target index through the cluster connection of the target storage cluster.
[0024] In one embodiment, the target index determination information includes index routing rules and index designation information; and the step of determining the target index in the target storage cluster according to the target index determination information includes:
[0025] Determine multiple indexes in the target storage cluster corresponding to the index specified information;
[0026] An index is determined from multiple indexes as a target index according to the index routing rule.
[0027] In one embodiment, each middleware message further includes a service user identifier and a business identifier; the method further includes:
[0028] According to the service user identifier and business identifier included in each middleware message in the message middleware, the data flow of each business of each service user is counted to determine the target business whose data flow meets the diversion conditions;
[0029] Distribute the middleware message corresponding to the target business to the cache middleware;
[0030] An asynchronous thread is started to process the middleware message in the cache middleware, and the data processing rate of the asynchronous thread is lower than the thread used to process the middleware message in the message middleware.
[0031] According to a second aspect, the present invention provides a big data storage service sharing device. In one embodiment, the device includes:
[0032] A message data acquisition module is used to acquire message data from any service user, the message data includes operation information and work unit call code;
[0033] A data operation type determination module, used to determine the data operation type corresponding to the message data;
[0034] A target storage cluster determination module is used to obtain target work unit configuration information pre-configured by the service user corresponding to the work unit call code, and determine the target storage cluster according to the target work unit configuration information;
[0035] An operation message assembly module, used to assemble the operation information into an operation message that meets the message format requirements of the target storage cluster according to the data operation type corresponding to the message data;
[0036] The response module is used to send the operation message to the target storage cluster, and when receiving the feedback information returned by the target storage cluster after processing the operation message, respond to the service user according to the feedback information.
[0037] According to a third aspect, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above method embodiments when executing the computer program.
[0038] According to a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above method embodiments are implemented.
[0039] In an embodiment of the present invention, a service system including an adapter control center and multiple storage clusters is pre-built to provide big data storage services for various service users. Each service user only needs to implement the general interface provided by the service system and configure the corresponding work unit configuration information for each general interface implemented through the work unit configuration function provided by the service system to access the service system. In this way, big data storage technology can be applied without the need to specially develop a big data storage system, thereby reducing the difficulty of access to big data storage technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 An application environment diagram of a big data storage service sharing method in an embodiment;
[0041] Figure 2 A schematic diagram of a configuration page of a working unit in one embodiment;
[0042] Figure 3 A schematic diagram of a message format of a data writing interface in one embodiment;
[0043] Figure 4 A schematic diagram of a process of a big data storage service sharing method in one embodiment;
[0044] Figure 5 It is a structural block diagram of a big data storage service sharing device in one embodiment;
[0045] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] The present invention provides a method for sharing a big data storage service. In one embodiment, the method can be applied to Figure 1In the application environment shown. Among them, the service system integrates and encapsulates common big data storage technologies such as Elasticsearch and Hbase, as well as business logic for managing, operating and monitoring different storage clusters. It is connected to each service user through the adapter control center. The adapter control center has developed a set of standard and universal rsf interfaces (i.e., real-time operation interfaces, the purpose of rsf is to provide an efficient remote service access method) for each service user to call. Different interfaces are used to provide different services. For example, the service provided by the data write interface is only a data storage service, and the service provided by the query interface is only a data query service. The type and number of interfaces can be developed according to specific application scenarios. This embodiment does not limit this. Each service user can implement the corresponding interface according to its own business needs to obtain the corresponding service. Some service users may have multiple businesses. Since each business has its own characteristics, in order to more flexibly obtain the services of the service system, the service user can implement the corresponding interface for each business according to the business needs of each business. For example, if business A needs to store data, then the data write interface is implemented for business A, and business B needs to query data, then the query interface is implemented for business B.
[0048] In addition to implementing the corresponding interface for the business, the service user also needs to configure the work unit for each interface implemented by the business through the work unit configuration function provided by the adapter control center. In the work unit, the service user can configure which storage cluster and index the data that the business needs to operate belongs to, and if there are multiple indexes in the storage cluster, which index routing rule should be used to find the target index, etc. Taking the case where the business needs to call the data write interface to store data as an example, the service user can configure the work unit for the business to specify which index in which storage cluster the data of the business is to be written, and when there are multiple indexes in the storage cluster, which index routing rule should be used to determine the index to write the data. In addition, when the business needs to expand the index or switch the storage cluster, it only needs to change the relevant configuration in the work unit corresponding to the business to take effect in real time. Each work unit will correspond to a globally unique identifier (i.e., the work unit call code), which can be determined by agreement between the service user and the adapter control center. The configuration information corresponding to each work unit (i.e., the work unit configuration information) is stored in the adapter control center (of course, it can also be stored in other locations, which is not limited in this embodiment). Exemplarily, the configuration page of the work unit and the fields that need to be configured therein can be as follows Figure 2As shown, the fields that need to be configured include "call code", "business description", "system" (i.e., service user identifier), "priority", "cluster" (cluster identifier, used to determine the target storage cluster), "routing rule" (i.e., index routing rule), "index alias" and "index details" (i.e., index detail list). The fields that need to be configured in the work unit can be adjusted according to the actual application scenario.
[0049] The configuration information of the work unit corresponding to the interface implemented by any business can be flexibly modified, which is conducive to timely adjustments by various service users based on various business needs. Examples of scenarios for various needs are as follows:
[0050] Scenario 1: When the data of a certain business of the service user needs to be stored in the storage cluster, the data of the business can be stored in one index at the beginning. Later, it is found that one index cannot meet the storage requirements and multiple indexes need to be created or a new index needs to be switched. At this time, you only need to create a new index in the storage cluster and configure the index identifier (such as the index name) of the new index to the work unit. Remove the old index identifier from the work unit to complete the switch. The service user will not be aware of the whole process.
[0051] Scenario 2: When the storage cluster used to store data for a certain business needs to be replaced by a newly built storage cluster due to insufficient storage space, but the old storage cluster still needs to provide query services, the service user only needs to configure a new work unit for the data write interface implemented by the business, and configure the cluster ID of the new storage cluster to the new work unit. In this way, the business data will be stored in the new storage cluster, and the work unit corresponding to the query interface does not need to be changed. The configured cluster ID is still the cluster ID of the old storage cluster, so that the old storage cluster can still provide historical data search to the outside world.
[0052] Scenario 3: When the index of a certain business is created on an annual basis, such as one index per year from 2013 to 2020, after 2021, the index data from 2013 to 2015 is no longer intended to be queried by the hot service, but is changed to be queried using the historical query interface. At this time, the work unit of the interface providing the hot service query can be modified, that is, the index corresponding to 2013-2015 can be directly removed from the index detail list in the work unit, a new work unit can be configured for the historical query interface, and the indexes from 2013 to 2015 can be added to the index detail list in the new work unit to complete the switching between cold and hot data queries.
[0053] After the service user implements the interface for the business and configures the work unit for the interface, the interface can be called to send the business data to the adapter control center, and the adapter control center will process it in real time. It should be noted that the different types of interfaces provided by the adapter control center (for example, there may be types such as add, delete, query and modify, where add, delete, query and modify refer to data writing, data deletion, data query and data update) have corresponding fixed message formats. The formulation of the specific message format can be adjusted according to the scene requirements. This embodiment does not limit this. For example, the message format of the data writing interface can be as follows: Figure 3 As shown in the figure, the "input parameter" part is the format of the message data sent by the service user to the adapter control center through the data writing interface, and the "output parameter" part is the format of the message data sent by the adapter control center when responding to the service user. For descriptions of various fields in the message data, such as "syscode", please refer to Figure 3 ; It is understandable that, since different interfaces are used to provide different services, different interfaces require different input parameters (there will be multiple fields of information in a message, and an input parameter is a message field). For example, the query interface requires the service user to send "sql" (that is, the query statement field), while the data writing interface does not require the service user to send the input parameter.
[0054] The service system can also set up message middleware, so that in addition to directly sending message data to it through the interface provided by the adapter control center, the service user can also push the message data into the message middleware, and the adapter control center will automatically consume the message data in the message middleware.
[0055] The message data pushed to the message middleware by the service user and the message data sent through the interface provided by the adapter control center both contain the work unit call code. Therefore, after the adapter control center obtains the message data, it can obtain the work unit configuration information corresponding to the work unit call code, and then perform the corresponding processing flow according to the work unit configuration information.
[0056] Among them, the service system can be for each service user. Each service user does not need to develop a big data storage system by itself. It only needs to send the message data directly to the adapter control center through a standardized interface, or push the message data to the message middleware to indirectly send the message data to the adapter control center. The adapter control center will process the message data received through the standardized interface and the message data in the message middleware.
[0057] The above-mentioned service users can be business systems inside or outside the enterprise; the number of message middleware can be adjusted according to the specific application scenario, and can be one or more, which can be implemented with kafka middleware; the storage cluster can be implemented with common databases such as ElasSticsearch and Hbase, and the number of storage clusters in the service system can also be adjusted according to the specific application scenario, which is not limited in this embodiment; the adapter control center can be implemented with an independent server or a server cluster composed of multiple servers.
[0058] The following method is applied to Figure 1 The adapter control center in the example is used to illustrate this method. Figure 4 As shown, the method comprises the following steps:
[0059] S110: Acquire message data from any service user, where the message data includes operation information and a work unit calling code.
[0060] S120: Determine the data operation type corresponding to the message data.
[0061] S130: Acquire target work unit configuration information pre-configured by the service user corresponding to the work unit call code, and determine a target storage cluster according to the target work unit configuration information.
[0062] S140: Assembling the operation information into an operation message that meets the message format requirements of the target storage cluster according to the data operation type corresponding to the message data.
[0063] S150: Send the operation message to the target storage cluster, and when receiving feedback information returned by the target storage cluster after processing the operation message, respond to the service user according to the feedback information.
[0064] In traditional practices, developers need to understand development technology before development, and the development cycle can be as short as a few days or as long as dozens of days. However, this embodiment can reduce the difficulty of access to big data storage technology by building a service system that can be shared by various service users and providing work unit configuration functions. Each service user has almost no perception of the relevant technology and syntax of big data. Through standardized interfaces, the service system can be called to provide corresponding big data storage services. Developers of various service users can quickly get started and basically understand how to request calls in a few minutes. In addition, the configuration function also increases flexibility. As the amount of data increases, it is inevitable to expand the index of the storage cluster in the later stage, and even switch the storage cluster. The existing practices are to change the program, publish, and migrate data. In this embodiment, each service user can achieve the effect of instantly switching the storage cluster and index by dynamically configuring the work unit of the relevant business, which can basically achieve online non-stop and imperceptible operation.
[0065] The method is described in detail below.
[0066] In this embodiment, the message data from any service user can be a message sent by the service user by calling a standardized real-time operation interface (i.e., an interface message), or a message pushed by the service user to the message middleware (i.e., a middleware message). Although the message formats corresponding to different interfaces and the message formats of the interfaces of the message middleware are different, they all contain operation information and work unit call codes. It should be noted that the operation information can be information of one or more fields in the message, and the operation information in the messages of different interfaces is also different.
[0067] Exemplarily, the interface type of the real-time operation interface called by any service user is a data write interface, a data deletion interface, a query interface or a data update interface; if the interface type of the real-time operation interface called by the service user is a data write interface, the operation information contained in the interface message is the data to be written (i.e., the data that needs to be stored in the storage cluster); if the interface type of the real-time operation interface called by the service user is a data deletion interface, the operation information contained in the interface message is the data determination information to be deleted (i.e., the information used to determine the data to be deleted); if the interface type of the real-time operation interface called by the service user is a query interface, the operation information contained in the interface message is query instruction information (i.e., query SQL statement. In addition, query syntax type may also be included in some scenarios); if the interface type of the real-time operation interface called by the service user is a data update interface, the operation information contained in the interface message is the data determination information to be updated (i.e., the information used to determine the data to be updated) and the data to be written.
[0068] After the adapter control center obtains the message data, it needs to determine the data operation type corresponding to the message data to prepare for the subsequent generation of the operation message. Since the message data can be a message sent in real time by the service user through the real-time operation interface, or it can be a message asynchronously pushed into the message middleware by the service user, the adapter control center will have different processing logic for different sources of message data. If the message data is an interface message sent by the service user by calling a standardized real-time operation interface, the step of determining the data operation type corresponding to the message data includes: determining the data operation type corresponding to the real-time operation interface called by the service user, and determining the data operation type corresponding to the real-time operation interface as the data operation type corresponding to the message data. Exemplarily, the data operation types corresponding to the data write interface, the data delete interface, the query interface and the data update interface can be data write type, data delete type, data query type, and data update type. If the message data is a middleware message pushed by the service user to the message middleware, because the interface pushed into the message middleware is universal, the message data also includes an event type to inform the adapter control center what operation to do with the message data. For example, the event type can include four types: initialization init, insert, update, and delete. Different event types are like different types of real-time operation interfaces provided by the adapter control center (such as insert corresponding to data write type, update corresponding to data delete type). The adapter control center will automatically perform corresponding processing according to different event types. Accordingly, the step of determining the data operation type corresponding to the message data includes: determining the data operation type corresponding to the event type as the data operation type corresponding to the message data.
[0069] Determine the data operation type corresponding to the message data, obtain the target work unit configuration information pre-configured by the service user corresponding to the work unit call code, determine the target storage cluster according to the target work unit configuration information, and assemble the operation information into an operation message that meets the message format requirements of the target storage cluster according to the data operation type corresponding to the message data.
[0070] Taking the storage cluster as an ES cluster (i.e., a storage cluster implemented with Elasticsearch) as an example, in ES, an index is similar to a data table that stores data. In this example, the target work unit configuration information will include target storage cluster determination information and target index determination information (information used to determine the target index), wherein each storage cluster in the service system is assigned a unique cluster identifier, so the target storage cluster determination information can be the cluster identifier of the storage cluster. Based on this, the step of determining the target storage cluster according to the target work unit configuration information may include: determining the target storage cluster from multiple storage clusters according to the target storage cluster determination information, and obtaining the cluster connection of the target storage cluster from the cluster connection factory. The step of sending an operation message to the target storage cluster may include: determining the target index in the target storage cluster according to the target index determination information; and sending the operation message to the target index through the cluster connection of the target storage cluster.
[0071] The cluster connection factory is used to store the cluster connections (database connections) of each storage cluster. Cluster connections are relatively valuable resources, and resources can be easily reused through the cluster connection factory.
[0072] Furthermore, each work unit can support the configuration of multiple indexes. For example, in a data storage scenario, if the amount of data is large, the service user will usually build multiple indexes by year, generally one per year, so there will be many indexes, but when the data comes in, each piece of data can only be written to one of the indexes. To determine which index to write to, it is necessary to determine an index from the multiple indexes to store the data according to the pre-established index routing rules. Therefore, the target index determination information may include index routing rules and index designation information; accordingly, the step of determining the target index in the target storage cluster according to the target index determination information may include: determining multiple indexes corresponding to the index designation information in the target storage cluster; determining an index from the multiple indexes as the target index according to the index routing rules. Among them, the index routing rules pre-defined in the adapter control center may include single index rules, index rules by year, index rules by month, and index rules by modulus. Each set of index rules encapsulates a set of corresponding input and output parameter formats. When calling the interface, the service user can directly convert the format of the index routing rule data into the format required by the adapter control center through the pre-encapsulated tool method.
[0073] Furthermore, the index designation information may be an index alias and / or an index detail list, where the index alias is an abbreviation of specific identifiers of a plurality of indexes, and the index detail list includes a plurality of indexes configured by the service user and desired to be operated. For example, four indexes are established monthly in the storage cluster, and their specific identifiers are log_month_01, log_month_02, log_month_03 and log_month_04. The index alias of these four indexes can be log_month. Taking the data storage scenario as an example, if the service user wants to store the data of a certain business in the above four indexes, it can only configure the index alias when configuring the work unit corresponding to the business, or configure the index alias and the index detail list at the same time (that is, configure the specific identifiers of the four indexes in the index detail list). If the service user only wants to store the data of a certain business in the above partial indexes such as log_month_01 and log_month_02, then it is necessary to configure the index alias and configure log_month_01 and log_month_02 in the index detail list, so that the adapter control center can call the routing engine corresponding to the index routing rule to calculate an index from the multiple indexes corresponding to the index detail list as the target index.
[0074] The message data sent by the service user to the adapter control center is assembled according to the message format specified by the adapter control center, which does not meet the message format requirements of the target storage cluster. Therefore, the adapter control center needs to reassemble the operation information in the message data into a message that meets the message format requirements of the target storage cluster according to the data operation type (i.e., an operation message). For example, if the data operation type of the message data is a data write type, then the data to be written in the message data needs to be assembled into a message requesting data storage, and then the operation message is sent to the target storage cluster. After receiving the operation message, the target storage cluster will perform corresponding processing based on the operation message, such as storing data, deleting data, updating data, or querying data, and then feedback the processed information (such as notification information of successful storage, queried data) to the adapter control center, so that the adapter control center can respond to the service user based on the feedback information, that is, feedback the corresponding message to the service user.
[0075] In one embodiment, each middleware message also includes a service user identifier and a business identifier; accordingly, the method also includes: based on the service user identifier and business identifier included in each middleware message in the message middleware, statistics are collected on the data traffic of each business of each service user to determine the target business whose data traffic meets the diversion conditions; the middleware messages corresponding to the target business are distributed to the cache middleware; and an asynchronous thread is started to process the middleware messages in the cache middleware, the data processing rate of the asynchronous thread being lower than the thread used to process the middleware messages in the message middleware.
[0076] In this embodiment, generally a large amount of data of different services will be stored in a big data storage cluster. Considering some special application scenarios, such as the collective burst of traffic during the promotion of e-commerce systems, and the storage cluster capacity is limited, it is easy to cause the storage cluster to be unavailable in this scenario. For this reason, this embodiment adds an intelligent diversion function to the service system. By presetting the threshold, when the data of various services are pushed to the message middleware, the data traffic of various services will be monitored in real time. When the comprehensive traffic of the service reaches the preset threshold, the service is determined as the target service, and its data is diverted to the cache middleware, such as another kafka middleware for buffering data, so as to ensure the stability of each storage cluster. Further, the middleware message can also include priority information, so that the data of high-priority services can be processed first according to the priority of each service, and the data of low-priority services can be processed later. For the message data in the cache middleware, an asynchronous thread can be started (the number of concurrent asynchronous threads can be set according to the specific scenario) for consumption. It should be noted that the asynchronous thread needs to be rate controlled to prevent concurrency from blocking the storage cluster.
[0077] At present, different services may be blocked during peak traffic periods. To address this problem, either some services are stopped from writing in advance or flow control is used to intercept the traffic. Either method requires a lot of human effort to operate, and data must be supplemented afterwards. The intelligent diversion function of this implementation can automatically divert part of the traffic according to the carrying capacity of each storage cluster, the traffic size, and the level of each service, thereby staggering consumption and significantly reducing the risk of unavailability caused by peak pressure on the storage cluster.
[0078] Figure 4 FIG. 1 is a flow chart of a method for sharing a big data storage service in one embodiment. Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 4At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0079] Based on the same inventive concept, the present invention also provides a big data storage service sharing device. Figure 5 As shown, the big data storage service sharing device includes the following modules:
[0080] The message data acquisition module 110 is used to acquire message data from any service user, the message data including operation information and work unit call code;
[0081] A data operation type determination module 120, configured to determine a data operation type corresponding to the message data;
[0082] The target storage cluster determination module 130 is used to obtain the target work unit configuration information pre-configured by the service user corresponding to the work unit call code, and determine the target storage cluster according to the target work unit configuration information;
[0083] An operation message assembly module 140, configured to assemble the operation information into an operation message that meets the message format requirements of the target storage cluster according to the data operation type corresponding to the message data;
[0084] The response module 150 is used to send the operation message to the target storage cluster, and when receiving feedback information returned by the target storage cluster after processing the operation message, respond to the service user according to the feedback information.
[0085] In one embodiment, the message data from any service user is an interface message sent by the service user by calling a standardized real-time operation interface, or a middleware message pushed by the service user to the message middleware.
[0086] In one embodiment, if the message data is an interface message sent by the service user by calling a standardized real-time operation interface, the data operation type determination module is specifically used to determine the data operation type corresponding to the real-time operation interface called by the service user, and determine the data operation type corresponding to the real-time operation interface as the data operation type corresponding to the message data.
[0087] In one embodiment, if the message data is a middleware message pushed by the service user to the message middleware, the message data also includes an event type. Accordingly, the data operation type determination module is specifically used to determine the data operation type corresponding to the event type as the data operation type corresponding to the message data.
[0088] In one embodiment, the target work unit configuration information includes target storage cluster determination information and target index determination information; a target storage cluster determination module is specifically used to determine a target storage cluster from multiple storage clusters according to the target storage cluster determination information, and obtain a cluster connection of the target storage cluster from a cluster connection factory;
[0089] The response modules include:
[0090] A target index determination submodule, used to determine a target index in a target storage cluster according to the target index determination information;
[0091] The operation message sending submodule is used to send the operation message to the target index through the cluster connection of the target storage cluster.
[0092] In one embodiment, the target index determination information includes index routing rules and index designation information;
[0093] The target index determination submodule is specifically used to determine multiple indexes corresponding to the index designation information in the target storage cluster, and determine one index from the multiple indexes as the target index according to the index routing rule.
[0094] In one embodiment, each middleware message further includes a service user identifier and a business identifier; the device further includes:
[0095] The target business determination module is used to count the data flow of each business of each service user according to the service user identifier and business identifier included in each middleware message in the message middleware, and determine the target business whose data flow meets the diversion condition;
[0096] The distribution module is used to distribute the middleware messages corresponding to the target business to the cache middleware;
[0097] The asynchronous processing module is used to start an asynchronous thread to process the middleware message in the cache middleware, and the data processing rate of the asynchronous thread is lower than the thread used to process the middleware message in the message middleware.
[0098] For the specific limitations of the big data storage service sharing device, please refer to the limitations of the big data storage service sharing method above, which will not be repeated here. Each module in the above-mentioned big data storage service sharing device can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0099] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as work unit configuration information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for sharing a big data storage service is implemented.
[0100] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0101] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0102] Obtain message data from any service user, the message data including operation information and work unit call code; determine the data operation type corresponding to the message data; obtain the target work unit configuration information pre-configured by the service user corresponding to the work unit call code, and determine the target storage cluster according to the target work unit configuration information; assemble the operation information into an operation message that meets the message format requirements of the target storage cluster according to the data operation type corresponding to the message data; send the operation message to the target storage cluster, and upon receiving the feedback information returned by the target storage cluster after processing the operation message, respond to the service user according to the feedback information.
[0103] In one embodiment, the message data from any service user is an interface message sent by the service user by calling a standardized real-time operation interface, or a middleware message pushed by the service user to the message middleware.
[0104] If the message data is an interface message sent by the service user by calling a standardized real-time operation interface, the processor executes a computer program to determine the data operation type corresponding to the message data, and also implements the following steps: determine the data operation type corresponding to the real-time operation interface called by the service user, and determine the data operation type corresponding to the real-time operation interface as the data operation type corresponding to the message data.
[0105] If the message data is a middleware message pushed by the service user to the message middleware, the message data also includes an event type. Accordingly, when the processor executes a computer program to determine the data operation type corresponding to the message data, the following steps are also implemented: the data operation type corresponding to the event type is determined as the data operation type corresponding to the message data.
[0106] In one embodiment, the target work unit configuration information includes target storage cluster determination information and target index determination information; when the processor executes a computer program to determine the target storage cluster according to the target work unit configuration information, the following steps are also implemented: determining the target storage cluster from multiple storage clusters according to the target storage cluster determination information, and obtaining the cluster connection of the target storage cluster from the cluster connection factory. Accordingly, the processor executes the computer program to implement the step of sending the operation message to the target storage cluster, including: determining the target index in the target storage cluster according to the target index determination information; and sending the operation message to the target index through the cluster connection of the target storage cluster.
[0107] In one embodiment, the target index determination information includes index routing rules and index designation information; when the processor executes a computer program to determine the target index in the target storage cluster according to the target index determination information, the processor further implements the following steps:
[0108] Determine multiple indexes in the target storage cluster corresponding to the index specified information; and determine one index from the multiple indexes as the target index according to the index routing rule.
[0109] In one embodiment, each middleware message further includes a service user identifier and a business identifier; the processor executes the computer program to further implement the following steps:
[0110] According to the service user identifier and business identifier included in each middleware message in the message middleware, the data traffic of each business of each service user is counted to determine the target business whose data traffic meets the diversion conditions; the middleware messages corresponding to the target business are distributed to the cache middleware; and an asynchronous thread is started to process the middleware messages in the cache middleware. The data processing rate of the asynchronous thread is lower than the thread used to process the middleware messages in the message middleware.
[0111] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0112] Obtain message data from any service user, the message data including operation information and work unit call code; determine the data operation type corresponding to the message data; obtain the target work unit configuration information pre-configured by the service user corresponding to the work unit call code, and determine the target storage cluster according to the target work unit configuration information; assemble the operation information into an operation message that meets the message format requirements of the target storage cluster according to the data operation type corresponding to the message data; send the operation message to the target storage cluster, and upon receiving the feedback information returned by the target storage cluster after processing the operation message, respond to the service user according to the feedback information.
[0113] In one embodiment, the message data from any service user is an interface message sent by the service user by calling a standardized real-time operation interface, or a middleware message pushed by the service user to the message middleware.
[0114] If the message data is an interface message sent by the service user by calling a standardized real-time operation interface, the computer program is executed by the processor, and when the data operation type corresponding to the message data is determined, the following steps are also implemented: determine the data operation type corresponding to the real-time operation interface called by the service user, and determine the data operation type corresponding to the real-time operation interface as the data operation type corresponding to the message data.
[0115] If the message data is a middleware message pushed by the service user to the message middleware, the message data also includes an event type. Accordingly, when the computer program is executed by the processor and the data operation type corresponding to the message data is determined, the following steps are also implemented: the data operation type corresponding to the event type is determined as the data operation type corresponding to the message data.
[0116] In one embodiment, the target work unit configuration information includes target storage cluster determination information and target index determination information; when the computer program is executed by the processor, the target storage cluster is determined according to the target work unit configuration information, and the following steps are also implemented: the target storage cluster is determined from multiple storage clusters according to the target storage cluster determination information, and the cluster connection of the target storage cluster is obtained from the cluster connection factory. Accordingly, the computer program is executed by the processor, and the step of sending the operation message to the target storage cluster includes: determining the target index in the target storage cluster according to the target index determination information; and sending the operation message to the target index through the cluster connection of the target storage cluster.
[0117] In one embodiment, the target index determination information includes index routing rules and index designation information; when the computer program is executed by a processor, the following steps are also implemented when determining the target index in the target storage cluster according to the target index determination information:
[0118] Determine multiple indexes in the target storage cluster corresponding to the index specified information; and determine one index from the multiple indexes as the target index according to the index routing rule.
[0119] In one embodiment, each middleware message further includes a service user identifier and a business identifier; when the computer program is executed by the processor, the following steps are also implemented:
[0120] According to the service user identifier and business identifier included in each middleware message in the message middleware, the data traffic of each business of each service user is counted to determine the target business whose data traffic meets the diversion conditions; the middleware messages corresponding to the target business are distributed to the cache middleware; and an asynchronous thread is started to process the middleware messages in the cache middleware. The data processing rate of the asynchronous thread is lower than the thread used to process the middleware messages in the message middleware.
[0121] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0122] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0123] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A big data storage service sharing method, characterized in that: The method is applied to an adapter control center in a service system, and the adapter control center is connected to multiple service users; the method includes: Acquire message data from any service user, the message data including operation information and work unit call code; the message data from any service user is an interface message sent by the service user by calling a standardized real-time operation interface, or a middleware message pushed by the service user to the message middleware; Determining a data operation type corresponding to the message data; Acquire target work unit configuration information pre-configured by the service user corresponding to the work unit call code, and determine a target storage cluster from a plurality of storage clusters included in the service system according to the target work unit configuration information; Assembling the operation information into an operation message that meets the message format requirements of the target storage cluster according to the data operation type corresponding to the message data; Sending the operation message to the target storage cluster, and upon receiving feedback information returned by the target storage cluster after processing the operation message, responding to the service user according to the feedback information; Each middleware message also includes a service user identifier and a business identifier; the method further includes: According to the service user identifier and the business identifier included in each middleware message in the message middleware, statistics are collected on the data flow of each business of each service user to determine the target business whose data flow meets the diversion condition; Distribute the middleware message corresponding to the target business to the cache middleware; An asynchronous thread is started to process the middleware message in the cache middleware, and the data processing rate of the asynchronous thread is lower than that of the thread used for processing the middleware message in the message middleware.
2. The method according to claim 1, characterized in that If the message data is an interface message sent by the service user by calling a standardized real-time operation interface, the step of determining the data operation type corresponding to the message data includes: The data operation type corresponding to the real-time operation interface called by the service user is determined, and the data operation type corresponding to the real-time operation interface is determined as the data operation type corresponding to the message data.
3. The method according to claim 1, characterized in that If the message data is a middleware message pushed by the service user to the message middleware, the message data also includes an event type. Accordingly, the step of determining the data operation type corresponding to the message data includes: determining the data operation type corresponding to the event type as the data operation type corresponding to the message data.
4. The method according to claim 1, characterized in that The target work unit configuration information includes target storage cluster determination information and target index determination information; The step of determining a target storage cluster from a plurality of storage clusters included in the service system according to the target work unit configuration information comprises: Determine a target storage cluster from multiple storage clusters according to the target storage cluster determination information, and obtain a cluster connection of the target storage cluster from a cluster connection factory; The step of sending the operation message to the target storage cluster includes: Determine a target index in the target storage cluster according to the target index determination information; The operation message is sent to the target index through the cluster connection of the target storage cluster.
5. The method according to claim 4, characterized in that The target index determination information includes index routing rules and index designation information; The step of determining the target index in the target storage cluster according to the target index determination information includes: Determine a plurality of indexes in the target storage cluster corresponding to the index specifying information; An index is determined from the multiple indexes as a target index according to the index routing rule.
6. A device for implementing the big data storage service sharing method according to claim 1, characterized in that: The device comprises: A message data acquisition module, used to acquire message data from any service user, wherein the message data includes operation information and a work unit call code; A data operation type determination module, used to determine the data operation type corresponding to the message data; A target storage cluster determination module is used to obtain target work unit configuration information pre-configured by the service user corresponding to the work unit call code, and determine a target storage cluster according to the target work unit configuration information; An operation message assembling module, used to assemble the operation information into an operation message that meets the message format requirements of the target storage cluster according to the data operation type corresponding to the message data; The response module is used to send the operation message to the target storage cluster, and when receiving feedback information returned by the target storage cluster after processing the operation message, respond to the service user according to the feedback information.
7. A computer 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 computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Server, message processing method, and computer readable storage medium
CN109194495A
Data storage method and device, computer equipment and storage medium
CN110764700A
