Service switching method and device based on stream processing framework and storage medium
By configuring port addresses and business information in large-scale private cloud scenarios and using job management components and task execution components to perform business switching in the stream processing framework, the complex switching problem from the operation and maintenance side to the operation side is solved, achieving efficient business switching and cost savings.
Patent Information
- Application Number
- CN202411623215.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In large-scale private cloud scenarios, the stream processing framework components on the operation and maintenance side cannot meet the business needs of the operation side. The existing switching method requires redeploying the stream processing framework components and hardware on the operation side, resulting in a complex and costly switching process.
The security operation center sends a switching instruction to the operation side, configures the port address and business information, and the operation side management center creates a job management component and a task execution component, injects the archive file into the stream processing framework image, and deploys the task in an independent operation mode to avoid redeploying the stream processing framework components and hardware.
It realizes business switching at the pure software level, saves user expenses, shortens the switching process, and ensures the normal communication of nodes on the operation side.
Smart Images

Figure CN119496703B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and particularly relates to a service switching method and device based on a stream processing framework and a storage medium. BACKGROUND
[0002] The rapid development of science and technology has brought about a rapid increase in data volume, and the emergence of stream processing frameworks (for example, Flink, Storm, etc.) provides a more suitable solution for processing these massive amounts of data. Stream processing frameworks can be classified into operation and maintenance sides maintained by managers and operation sides used by tenants. For small and medium-sized private cloud scenarios, the components of the stream processing framework can be deployed on the operation and maintenance side to meet the business requirements. However, for large private cloud scenarios, not only is there a large amount of data to be processed, but there are also requirements such as network security isolation between the operation and maintenance side and the operation side, and the network bandwidth of the operation and maintenance side being smaller than that of the operation side, which results in the components of the stream processing framework deployed on the operation and maintenance side being unable to meet the requirements of the operation side business, and instead, the stream processing framework on the operation and maintenance side and the corresponding operation side business need to be switched to the operation side for running.
[0003] Currently, the stream processing framework on the operation and maintenance side and the corresponding operation side business are switched to the operation side for running in the following manner: the components of the stream processing framework are redeployed on the operation side, and the original data of the operation side is received, and after processing, the data is written to the related middleware and storage on the operation side. As can be seen, this switching manner requires redeployment of the components of the stream processing framework on the operation side, and replacement of related hardware on the operation side, and the switching process is relatively complex. SUMMARY
[0004] To solve the above technical problems, the present application provides a service switching method and device based on a stream processing framework and a storage medium, which can reduce the switching process and save user expenses.
[0005] In a first aspect, the present application provides a service switching method based on a stream processing framework, applied to a security operation center, comprising: when it is determined that service switching needs to be performed, sending a switching instruction to an operation side; the switching instruction is used to instruct to create a job management component, the deployment manner of the created job management component when deploying a task corresponding to a to-be-switched business, create a task execution component, and inject an archive file corresponding to the to-be-switched business into a stream processing framework image; obtaining port addresses configured for each node of the operation side for the to-be-switched business, and synchronizing the port addresses to the operation side; determining business information of the to-be-switched business, and synchronizing the business information to a configuration mapping of the operation side.
[0006] In a second aspect, the application provides a service switching method based on a stream processing framework, applied to an operation side management center, comprising: when a custom resource configured by a multi-cluster management system is received, creating a job management component and a task execution component, and injecting an archive file corresponding to a service to be switched into a stream processing framework image; receiving port addresses of each node, and configuring the port addresses of each node; the node is a device called by the operation side when operating a service; receiving service information of the service to be switched, and storing the service information into a configuration mapping; according to the service information, deploying a task corresponding to the service to be switched by the job management component in an independent running mode, and executing; the task corresponding to the service to be switched is executed by relying on the job management component, the task execution component, the archive file, the node, and the service information.
[0007] In a third aspect, the application provides a service switching device based on a stream processing framework, applied to a secure operation center, comprising: a sending module, configured to send a switching instruction to an operation side when it is determined that service switching is needed; the switching instruction is used to instruct to create a job management component, a deployment mode of the created job management component when deploying a task corresponding to a service to be switched, and create a task execution component, and inject an archive file corresponding to the service to be switched into a stream processing framework image; an obtaining module, configured to obtain port addresses configured for each node of the operation side for the service to be switched, and synchronize the port addresses to the operation side; and a determining module, configured to determine service information of the service to be switched, and synchronize the service information to a configuration mapping of the operation side.
[0008] In a fourth aspect, the application provides a service switching device based on a stream processing framework, applied to an operation side management center, comprising: a creating module, configured to, when a custom resource configured by a multi-cluster management system is received, create a job management component and a task execution component, and inject an archive file corresponding to a service to be switched into a stream processing framework image; a configuration module, configured to receive port addresses of each node, and configure the port addresses of each node; the node is a device called by the operation side when operating a service; a storage module, configured to receive service information of the service to be switched, and store the service information into a configuration mapping; and a processing module, configured to, according to the service information, deploy a task corresponding to the service to be switched by the job management component in an independent running mode, and execute; the task corresponding to the service to be switched is executed by relying on the job management component, the task execution component, the archive file, the node, and the service information.
[0009] In a fifth aspect, the application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program is executed by the processor to implement the service switching method based on the stream processing framework of the first aspect or the second aspect.
[0010] In a sixth aspect, the present application provides a computer-readable storage medium, comprising: a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the service switching method based on the stream processing framework as in the first aspect or the second aspect.
[0011] In a seventh aspect, the present application provides a computer program product, comprising: when the computer program product runs on a computer, enabling the computer to implement the service switching method based on the stream processing framework as in the first aspect or the second aspect.
[0012] The technical solution provided by this application offers the following advantages over existing technologies: First, when the security operations center determines that a service switch is necessary, it sends a switch instruction to the operations side, along with the port addresses configured for each node on the operations side for the service to be switched, and the service information of the service to be switched. Subsequently, upon receiving the customized resources, port addresses, and service information, the operations side management center creates a job management component and a task execution component, injects the archived files corresponding to the service to be switched into the stream processing framework image, configures the port addresses for each node, stores the service information in a configuration map, and, based on the service information, deploys and executes the tasks corresponding to the service to be switched using the job management component in a standalone manner. A node is a device invoked by the operations side when running services; the execution of tasks corresponding to the service to be switched relies on the job management component, task execution component, archived files, nodes, and service information. This allows a purely software-based switchover of services from the maintenance side to the operations side, eliminating the need to redeploy all components of the stream processing framework on the operations side and replacing hardware on the operations side. This saves user costs and shortens the switching process. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0015] Figure 1 A flow chart of a service switching method based on a stream processing framework provided in an embodiment of the present application;
[0016] Figure 2 One of the application scenario diagrams of the service switching method based on the stream processing framework provided in an embodiment of the present application;
[0017] Figure 3 Fig. 2 is a schematic diagram of an application scenario of the service switching method based on the stream processing framework provided in the embodiments of the present application;
[0018] Figure 4 Fig. 1 is a schematic diagram of a structure of the service switching device based on the stream processing framework provided in the embodiments of the present application;
[0019] Figure 5 Fig. 2 is a schematic diagram of a structure of the service switching device based on the stream processing framework provided in the embodiments of the present application;
[0020] Figure 6 Fig. 3 is a schematic diagram of a structure of an electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0021] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the solutions of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0022] The stream processing framework provides a more suitable solution for the processing of massive data. The stream processing framework can be a Flink framework, a Storm framework, etc. The embodiments of the present application take the Flink framework as an example for illustration. As a mainstream framework of the stream processing framework, the use process of the Flink framework depends on the related network, middleware and storage architecture of its input upstream and writing downstream. The stream processing framework can be classified into the operation and maintenance side maintained by the administrator and the operation side used by the tenant. In the small and medium-sized private cloud scenario, the operation and maintenance side is dominant, and the upstream data network, middleware and storage architecture to be processed run on the operation and maintenance side. Therefore, the Flink component also needs to be deployed on the operation and maintenance side. In the large private cloud scenario, due to the large-scale data of the tenant business, the security requirement of network isolation of the operation and maintenance side and the network bandwidth of the operation and maintenance side being less than the network bandwidth requirement of the operation side, the Flink component architecture of the operation and maintenance side is difficult to meet the requirement. It is necessary to deploy the Flink components on the operation side to receive the raw data of the operation side, process and write to the related middleware and storage of the operation side. As a cloud provider, both of the two use scenarios need to be considered. At the same time, the user of the small and medium-sized private cloud needs to switch the Flink architecture from the operation and maintenance side to the operation side under the requirement of guaranteeing the continuity of business and security data.
[0023] Currently, the way of switching the stream processing framework and the corresponding operation side business of the operation side to the operation side is to redeploy the components of the stream processing framework on the operation side, receive the original data of the operation side, and write the processed data to the related middleware and storage of the operation side. It can be seen that this switching method needs to redeploy the components of the stream processing framework on the operation side, replace the related hardware on the operation side, and the switching process is complex. In addition, the cloud native Flink relies on the communication between the Flink component and the APIServer of Kubernetes based on the Operator mechanism. When the Flink component is switched to the operation side which is isolated from the Kubernetes network on the operation side, the communication between the Flink component and the Operator also has problems.
[0024] To solve the above problems, the embodiment of the present application provides a business switching method of a stream processing framework, comprising: when the security operation center determines that business switching is needed, sending a switching instruction to the operation side; the switching instruction is used to instruct to create a job management component, the deployment mode of the created job management component when deploying the task corresponding to the business to be switched, create a task execution component, and inject the archive file corresponding to the business to be switched into the stream processing framework image; obtain the port address configured for each node of the operation side for the business to be switched, and synchronize the port address to the operation side; determine the business information of the business to be switched, and synchronize the business information to the configuration mapping of the operation side. The operation side management center creates the job management component and the task execution component when receiving the customized resource configured by the multi-cluster management system, injects the archive file corresponding to the business to be switched into the stream processing framework image, receives the port address of each node, and configures the port address of each node; the node is a device called by the operation side when operating the business; receives the business information of the business to be switched, and stores the business information in the configuration mapping; according to the business information, the job management component is used to deploy the task corresponding to the business to be switched in a separate running mode, and the task is executed; the task execution of the business to be switched relies on the job management component, the task execution component, the archive file, the node, and the business information. In this way, on the one hand, when the business on the operation side is switched to the operation side, pure software level switching can be performed, the user's expenditure is saved, and the switching process is reduced. On the other hand, the port address configured for each node of the operation side for the business to be switched can be configured in advance to ensure the normal communication of each node of the operation side.
[0025] The service switching method based on the stream processing framework provided by the embodiments of the present application can be executed by a service switching device based on the stream processing framework. The service switching device based on the stream processing framework can be hardware or software. When the service switching device based on the stream processing framework is hardware, it can be various electronic devices with the function of running the service switching based on the stream processing framework, including but not limited to mobile phones, computers, computers, tablet computers, and the like. When the service switching device based on the stream processing framework is software, it can be installed in the above-mentioned electronic devices. It can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made herein.
[0026] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced in other manners different from those described herein; obviously, the embodiments described in the specification are only a part of the embodiments of the present application, not all the embodiments.
[0027] Figure 1 The flowchart of the service switching method based on the stream processing framework provided by the embodiments of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the service switching method based on the stream processing framework can include the following steps.
[0028] S11, when determining that service switching is needed, the security operation center sends a switching instruction to the operation side.
[0029] The security operation center (SOC) is a system for managing service switching. As shown in FIG. 2, the security operation center is on the operation and maintenance side in the classification dimension, and can interact with the operation side management center (Flink Operator) of the operation side through the multi-cluster management system (Karmada) of Kubernetes. Figure 2
[0030] First, the security operation center determines whether service switching is needed.
[0031] Specifically, the security operation center can determine whether service switching is needed when at least one of the following switching conditions is met. The switching conditions include: reading a service switching command; the number of tenants on the operation side is greater than a preset threshold; a timer reaches a timing duration. The preset threshold is preset in advance, for example, a default value, or a value set by relevant personnel according to actual conditions.
[0032] In some embodiments, the user can issue a service switching command in the following manner: a storage variable is created in the underlying unit corresponding to the availability zone (AZ) on the operation side, and the service switching command is issued by changing the content in the storage variable. For example, a Kubernetes element configuration mapping (Configmap) with the name soc-default-sysvpc is declared in the availability zone management cell on the operation side, and the service switching command is issued by writing switching data in the Configmap. The switching data at least includes the availability zone of the stream processing framework to be started and the network subnet required for the stream processing framework component to allocate the tenant virtual private cloud (VPC). The stream processing framework can be the Flink framework.
[0033] Subsequently, the security operation center sends a switching instruction to the operation side. The switching instruction is used to instruct the creation of a job management component, the deployment mode of the created job management component when deploying the task corresponding to the service to be switched, the creation of a task execution component, and the injection of the archive file corresponding to the service to be switched into the stream processing framework image.
[0034] Specifically, as shown in Figure 2 The security operation center can interact with the operation side management center on the operation side through the multi-cluster management system. The security operation center can send a switching instruction to the operation side in the following manner: the multi-cluster management system is used to configure a custom resource (Custom Resource) for the operation side to instruct the operation side to create a job management component, the deployment mode of the created job management component when deploying the task corresponding to the service to be switched, the creation of a task execution component, and the injection of the archive file corresponding to the service to be switched into the stream processing framework image.
[0035] For example, as shown in Figure 3 Taking the Flink framework as an example, when the security operation center (SOC) determines that service switching is required, the process of sending a switching instruction to the operation side can be as follows: the user writes switching data in the Configmap to issue a service switching command, the SOC reads the switching data in the Configmap, determines that the user has issued a service switching command, and then sends a switching instruction (including the switching data) to the multi-cluster management system. When the multi-cluster management system receives the switching instruction, it configures a custom resource for the operation side management center according to the switching data, and sends it to the operation side management center to instruct the operation side management center to create a job management component, the deployment mode of the created job management component when deploying the task corresponding to the service to be switched, the creation of a task execution component, and the injection of the archive file corresponding to the service to be switched into the stream processing framework image.
[0036] S12, the operation side management center creates a job management component and a task execution component when receiving the customized resource configured by the multi-cluster management system, and injects an archive file corresponding to the to-be-switched service into a stream processing framework image.
[0037] The customized resource is a resource allocated by the multi-cluster management for creating the job management component and the task execution component according to the switching data; the job management component is a component responsible for management, scheduling and state monitoring of the service; the task execution component is a component responsible for executing specific tasks of the service; and the archive file is a file required by the to-be-switched service. When the stream processing framework is a Flink framework, as shown in Figure 3 , the job management component is a Flink job management component, the task execution component is a Flink task execution component, the archive file is a Jar package, and the stream processing framework image is a Flink image.
[0038] Firstly, the operation side management center creates a job management component and a task execution component according to the customized resource configured by the multi-cluster management system when receiving the customized resource. Secondly, the operation side management center injects an archive file corresponding to the to-be-switched service into a stream processing framework image.
[0039] Specifically, taking the stream processing framework as the Flink framework as an example, as shown in Figure 3As shown, in the Flink framework on the operation and maintenance side, the CR of the stream processing task (FlinkSessionJob) sent by the SOC to the operation and maintenance center (Flink Operator) contains the Jar package required by the task corresponding to the business, and the operation and maintenance center downloads the Jar package from the Kubernets Service provided by the SOC through the network, but the operation side does not contain the SOC component, so it is impossible to issue the CR of the stream processing task (FlinkSessionJob) to achieve this purpose. Therefore, the archive file (i.e. Jar package) required by the business to be switched needs to be injected into the Flink framework image created in advance through the initContainer; the CR of the Flink job management component no longer uses the FlinkDeployment of the Session mode, but uses the FlinkDeployment of the Application mode. Among them, initContainer is a container type in Kubernetes, which is executed before the main application container starts, and is used to initialize the task; the Session mode is a job running mode in the Flink framework, which allows multiple jobs to share the same Flink job management component and cluster resources; the Application mode is another job running mode in the Flink framework, which starts an independent Flink job management component and cluster resources for each job, and is suitable for long-time running applications.
[0040] In some embodiments, before injecting the archive file corresponding to the business to be switched into the stream processing framework image, the business switching method based on the stream processing framework further comprises: establishing a stream processing framework image in the operation side management center.
[0041] S13, the security operation center acquires the port address configured for each node of the operation side for the business to be switched, and synchronizes the port address to the operation side.
[0042] Taking the Flink framework as an example, as shown in FIG. 6, the operation and maintenance center (Flink Operator) of the operation side is responsible for the following operations: Figure 3As shown, in the operation side Flink framework, the Flink job management component and the Flink task execution component can directly interact through the internal Domain Name System (DNS) resolution (service) without pre-setting the corresponding Internet Protocol (IP) address and other network communication information. However, the network plane of the operation side Flink framework is the VPC side, and when the components in the Flink framework need to communicate with other upstream and downstream components of the tenant, such as Kafka and Clickhouse, the IP address that can be accessed by each other must be specified, and can be integrated into the CR supported by the Flink framework. Therefore, the embodiments of the present application obtain the port address configured for each node of the operation side for the to-be-switched service in advance through the security operation center, and synchronize the port address to the operation side.
[0043] Specifically, the port address can be an address pre-configured for each node of the operation side for the to-be-switched service. The way of synchronizing the port address to the operation side can be carrying the configured port address in the switching instruction sent to the multi-cluster management system, and the multi-cluster management system carries the configured port address when configuring the custom resource to the operation side management center. For example, a custom annotation ccos.io / port_pool can be added in the custom resource to solve the problem of accessing the VPC network of each node (such as a pod).
[0044] S14, the operation side management center receives the port address of each node, and configures the port address for each node.
[0045] The node is a device called by the operation side when operating the service.
[0046] Specifically, the operation side management center configures the port address for each node when receiving the port address of each node.
[0047] S15, the security operation center determines the service information of the to-be-switched service, and synchronizes the service information to the configuration mapping of the operation side.
[0048] Taking the Flink framework as an example, as shown in FIG. 2, the Flink framework is deployed in the VPC network of the operation side, and the Flink framework is deployed in the VPC network of the operation side. Figure 3As shown, the operation and maintenance side management center in the Flink framework needs to obtain part of the input from the Mysql on the operation and maintenance side when controlling the Flink task execution component to execute the specific task corresponding to the business, but it is complex and unnecessary to provide the Mysql component on the operation side. Therefore, the security operation center on the operation and maintenance side synchronizes the business information in the Mysql required by the to-be-switched business to the configuration mapping (Configmap) on the operation side, so as to avoid the problem that the lack of business information causes the task to be unable to execute when the operation side executes the specific task of the to-be-processed business.
[0049] Specifically, the security operation center can synchronize the business information to the configuration mapping on the operation side through the multi-cluster management system.
[0050] S16, the operation side management center receives the business information of the to-be-switched business, and stores the business information into the configuration mapping.
[0051] Specifically, when the operation side management center receives the business information of the to-be-switched business, the operation side management center stores the business information into the configuration mapping (Configmap).
[0052] S17, the operation side management center deploys the task corresponding to the to-be-switched business in a separate running mode through the job management component according to the business information, and executes.
[0053] The task corresponding to the to-be-switched business relies on the job management component, the task execution component, the archive file, the node, and the business information.
[0054] Specifically, taking the stream processing framework Flink as an example, since the archive file required by the to-be-switched business in step S12 is injected into the Flink framework image created in advance through the initContainer mode. Therefore, the CR for creating the Flink job management component no longer uses the FlinkDeployment in the Session mode, but uses the FlinkDeployment in the Application mode. This is because the use of initContainer enables the Flink job to perform some customized initialization operations before starting, and each job in the Application mode is independently managed in the life cycle, which can execute specific initialization operations when starting and isolate the influence between different jobs. The Session mode is a shared mode at the cluster level, which is not suitable for custom initialization every time the job starts, because it will affect the operation of the entire cluster.
[0055] In some embodiments, the operations management center stores cached data in local storage devices on the operations side when executing tasks corresponding to the business to be switched. Specifically, the Flink framework on the operations side, when supporting the execution of tasks corresponding to the business, requires object storage to store runtime data for snapshots and aggregated data caching. After switching to the operations side, object storage is no longer available, so the storage location of the cached data is changed to the local (LocalPV) storage device on the operations side.
[0056] In the above solution, first, upon determining that a service switch is necessary, the security operations center sends a switch instruction to the operations side, along with the port addresses configured for each node on the operations side for the service to be switched, and the service information for the service to be switched. Subsequently, upon receiving the customized resources, port addresses, and service information, the operations management center creates a job management component and a task execution component, injects the archived files corresponding to the service to be switched into the stream processing framework image, configures the port addresses for each node, and stores the service information in a configuration map. Based on the service information, the job management component deploys and executes the tasks corresponding to the service to be switched using a standalone operation. Nodes are the devices invoked by the operations side when running services; the execution of tasks corresponding to the service to be switched relies on the job management component, task execution component, archived files, nodes, and service information. This allows for a purely software-based switchover of services from the maintenance side to the operations side, eliminating the need to redeploy all components of the stream processing framework on the operations side and replacing hardware on the operations side. This saves users money and shortens the switching process.
[0057] The embodiment of the present application can divide the functional modules of the service switching device based on the stream processing framework according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing unit. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0058] like Figure 4 As shown, it is a structural diagram of a service switching device based on a stream processing framework provided in an embodiment of the present application, which is applied to a security operation center. The service switching device based on a stream processing framework includes a sending module 51, an acquisition module 52, and a determination module 53.
[0059] The sending module 51 is used to send a switching instruction to the operation side when it is determined that a business switch is required; the switching instruction is used to instruct the creation of a job management component, the deployment method of the created job management component when deploying the task corresponding to the business to be switched, the creation of a task execution component, and the injection of the archive file corresponding to the business to be switched into the stream processing framework image; the acquisition module 52 is used to obtain the port address configured for each node on the operation side for the business to be switched, and synchronize the port address to the operation side; the determination module 53 is used to determine the business information of the business to be switched, and synchronize the business information to the configuration map on the operation side.
[0060] In some embodiments, when at least one of the following switching conditions is met, it is determined that service switching is required; the switching conditions include: reading a service switching command; the number of tenants on the operating side is greater than a preset threshold; the timer reaches the timing duration.
[0061] In some embodiments, the sending module 51 is also used to interact with the operation side through the multi-cluster management system; the sending module 51 is specifically used to configure customized resources for the operation side through the multi-cluster management system to instruct the operation side to create a job management component, the created job management component to deploy the task corresponding to the business to be switched, create a task execution component, and inject the archive file corresponding to the business to be switched into the stream processing framework image.
[0062] The service switching device based on the stream processing framework provided in this embodiment can execute the service switching method based on the stream processing framework provided in the above method embodiment. Its implementation principle and technical effects are similar to those of the above method and will not be repeated here.
[0063] like Figure 5 As shown, a structural diagram of a business switching device based on a stream processing framework provided in an embodiment of the present application is applied to an operation side management center. The business switching device based on a stream processing framework includes a creation module 61, a configuration module 62, a storage module 63, and a processing module 64.
[0064] The creation module 61 is used to create a job management component and a task execution component when receiving customized resources configured by the multi-cluster management system, and inject the archive file corresponding to the business to be switched into the stream processing framework image; the configuration module 62 is used to receive the port address of each node and configure the port address of each node; the node is the device called when the operation side runs the business; the storage module 63 is used to receive the business information of the business to be switched and store the business information in the configuration map; the processing module 64 is used to deploy and execute the tasks corresponding to the business to be switched in an independent operation manner through the job management component according to the business information; the execution of the tasks corresponding to the business to be switched relies on the job management component, the task execution component, the archive file, the node, and the business information.
[0065] In some embodiments, the processing module 64 is further configured to store the buffered data to the operation-side local storage device when performing the task corresponding to the service to be switched.
[0066] The service switching apparatus based on the stream processing framework provided in this embodiment can execute the service switching method based on the stream processing framework provided in the method embodiments, and has similar implementation principles and technical effects, which will not be described here.
[0067] Figure 6 An electronic device according to an example embodiment is shown. The electronic device can include a processor 802 configured to execute application code to implement the service switching method based on the stream processing framework in the present application.
[0068] The processor 802 can be a central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the present application.
[0069] As shown in Figure 6 The electronic device can further include a memory 803. The memory 803 is configured to store the application code for executing the programs of the present application, and is controlled by the processor 802 to execute.
[0070] The memory 803 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited to this. The memory 803 can exist independently and be connected to the processor 802 through a bus 804. The memory 803 can also be integrated with the processor 802.
[0071] As shown in Figure 6As shown, the electronic device can further include a communication interface 801, wherein the communication interface 801, the processor 802, and the memory 803 can be coupled with each other, for example, through the bus 804. The communication interface 801 is configured to interact with other devices, for example, to support information interaction between the electronic device and other devices.
[0072] It should be noted that, Figure 6 The device structure shown in the above embodiments does not constitute a limitation on the electronic device, except Figure 6 The electronic device can include more or fewer components than shown, or combine certain components, or arrange the components differently than shown. The electronic device provided by the embodiments can perform the service switching method based on the stream processing framework provided by the above method embodiments, and the implementation principle and technical effects are similar to those of the above method, which will not be described here.
[0073] The computer readable storage medium provided by the embodiments of the present application stores a computer program, and the computer program is executed by a processor to implement each process of the service switching method based on the stream processing framework in the above method embodiments, and the same technical effects can be achieved. To avoid repetition, details will not be described here.
[0074] The computer readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0075] The computer program product provided by the embodiments of the present application stores a computer program, and the computer program is executed by a processor to implement each process of the service switching method based on the stream processing framework in the above method embodiments, and the same technical effects can be achieved. To avoid repetition, details will not be described here.
[0076] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media having computer usable program code contained therein.
[0077] In this application, the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital data processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0078] In this application, the memory can include non-persistent memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, etc., such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.
[0079] In this application, the computer-readable medium includes a non-transitory and transitory, removable and non-removable storage medium. The storage medium can be implemented by any method or technology for storing information, and the information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer-readable media do not include transitory media, such as modulated data signals and carrier waves.
[0080] It has to be noted that, in the present document, relational terms are intended only to convey a possible relationship between elements or
[0081] The above description is merely that of a specific implementation to enable a person skilled in the art to understand or implement the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A service switching method based on a stream processing framework, applied to a security operation center, characterized in that: include: When it is determined that service switching is required, a switching instruction is sent to the operation side; The switching instruction is used to instruct the creation of a job management component, the deployment method of the created job management component when deploying the task corresponding to the to-be-switched business, the creation of a task execution component, and the injection of the archive file corresponding to the to-be-switched business into the stream processing framework image; Obtaining the port address configured for each node on the operation side for the service to be switched, and synchronizing the port address to the operation side; Determine the service information of the service to be switched, and synchronize the service information to the configuration map on the operation side.
2. The service switching method according to claim 1, wherein: The method further comprises: When at least one of the following switching conditions is met, determining that service switching is required; The switching conditions include: reading a service switching command; the number of tenants on the operation side is greater than a preset threshold; and the timer reaches the timing duration.
3. The service switching method according to claim 1, wherein: The method further comprises: Interact with the operations side through a multi-cluster management system; The sending of the switching instruction to the operation side includes: Customized resources are configured for the operation side through the multi-cluster management system to instruct the operation side to create a job management component. The created job management component deploys the tasks corresponding to the business to be switched, creates a task execution component, and injects the archive files corresponding to the business to be switched into the stream processing framework image.
4. A service switching method based on a stream processing framework, applied to an operation side management center, characterized in that: include: When receiving customized resources configured by the multi-cluster management system, it creates a job management component and a task execution component, and injects the archive files corresponding to the business to be switched into the stream processing framework image; Receive the port address of each node and configure the port address for each node; the node is the device called by the operation side when running the business; Receiving service information of the service to be switched, and storing the service information in a configuration map; According to the business information, the task corresponding to the business to be switched is deployed and executed in an independent running manner through the job management component; the execution of the task corresponding to the business to be switched relies on the job management component, the task execution component, the archive file, the node, and the business information.
5. The service switching method according to claim 4, characterized in that: The method further comprises: When executing the task corresponding to the service to be switched, the cached data is stored in a local storage device on the operation side.
6. A service switching device based on a stream processing framework, applied to a security operation center, characterized in that: include: A sending module is used to send a switching instruction to the operation side when it is determined that a service switching is required; The switching instruction is used to instruct the creation of a job management component, the deployment method of the created job management component when deploying the task corresponding to the to-be-switched business, the creation of a task execution component, and the injection of the archive file corresponding to the to-be-switched business into the stream processing framework image; An acquisition module, configured to acquire the port address configured for each node on the operation side for the service to be switched, and synchronize the port address to the operation side; The determination module is used to determine the service information of the service to be switched and synchronize the service information to the configuration map of the operation side.
7. A service switching device based on a stream processing framework, applied to an operation side management center, characterized in that: include: The creation module is used to create the job management component and task execution component when receiving the customized resources configured by the multi-cluster management system, and inject the archive files corresponding to the business to be switched into the stream processing framework image; A configuration module is used to receive the port address of each node and configure the port address of each node; the node is the device called when the operation side runs the business; A storage module, configured to receive service information of a service to be switched and store the service information in a configuration map; The processing module is used to deploy and execute the tasks corresponding to the to-be-switched business in an independent running manner through the job management component according to the business information; the execution of the tasks corresponding to the to-be-switched business relies on the job management component, the task execution component, the archive file, the node, and the business information.
8. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the service switching method based on a stream processing framework as described in any one of claims 1 to 3, or claims 4 to 5.
9. A computer-readable storage medium, characterized in that include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the service switching method based on the stream processing framework as claimed in any one of claims 1 to 3 or claims 4 to 5 is implemented.
10. A computer program product, characterized in that When the computer program product is run on a computer, the computer is enabled to implement the service switching method based on the stream processing framework according to any one of claims 1 to 3 or claims 4 to 5.
Citation Information
Patent Citations
Node management method and device, electronic equipment and storage medium
CN113760458A
Container-based Internet of Things data batch processing method, processor and storage medium
CN115981789A