Task scheduling method and device, electronic equipment and storage medium

Through unified authentication and traffic management of task scheduling components, the low authentication efficiency and duplicate development problems caused by technical differences between the middle platform of the business are solved, and the efficient completion of task scheduling and the strategic implementation of the middle platform of the business are achieved.

CN119248436APending Publication Date: 2025-01-03STATE GRID INFORMATION & TELECOMM BRANCH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411122414.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

There are differences in the technical routes, release methods, authentication control and management methods of the existing business middle platform, which makes users unable to obtain the latest service information in a timely manner, which increases the authentication efficiency of the task scheduling process and the repeated development workload, hinders the business. The strategy of the Zhongtai is implemented.

Method used

Through the task scheduling component, unified authentication and traffic management are carried out, task scheduling requests from the business system are received, task scheduling requests are parsed and processed, ensuring access permissions, current limit processing and monitoring recovery policies, and achieving efficient completion of task scheduling.

Benefits of technology

It improves the authentication efficiency of task scheduling, ensures the accurate processing and smooth completion of task scheduling requests, reduces obstacles to duplicate development and management, and enhances the overall value of the business middle platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248436A_ABST
    Figure CN119248436A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method and device, electronic equipment and a storage medium. The method comprises the steps that a task scheduling request sent by at least one service system is received; authenticating the task scheduling request, and in response to determining that the task scheduling request passes the authentication, analyzing the task scheduling request to obtain an access permission corresponding to the task scheduling request; sending a processing request for processing the task scheduling request to a service middle station associated with the access permission; and receiving a task processing result corresponding to the processing request, and sending the task processing result to the service system, thereby solving the technical problem of low authentication efficiency in the task scheduling process in the prior art, and improving the task scheduling efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a task scheduling method, device, electronic device and storage medium. Background Art

[0002] Users can arrange the required services by accessing the business system. Most of the services can be completed by accessing the database through the business system, but some services need to access the business middle platform. The shared services currently released by various business middle platforms have large differences in technical routes, release methods, authentication control, and management methods, resulting in users being unable to obtain the latest service information in a timely manner when using the services of various business middle platforms, and unable to obtain service information through the same channel. The technical routes, connection methods, and authentication methods of various business middle platforms are not unified, resulting in repeated development and repeated adaptation of front-end task applications during the construction process, which increases a lot of workload and fails to bring into play the full value of the business middle platform. It not only reduces the authentication efficiency of the task scheduling process, but also brings corresponding obstacles to the managers, operators, developers, and users of the business middle platform in jointly promoting the implementation of the business middle platform strategy. Summary of the invention

[0003] In view of this, the purpose of the present application is to propose a task scheduling method, device, electronic device and storage medium to overcome all or part of the deficiencies in the prior art.

[0004] Based on the above-mentioned purpose, the present application provides a task scheduling method, which is applied to a task scheduling component, and multiple business systems are communicated and connected with multiple business middle stations through the task scheduling component, including: receiving a task scheduling request sent by at least one business system; authenticating the task scheduling request, and in response to determining that the task scheduling request passes the authentication, parsing the task scheduling request to obtain the access permission corresponding to the task scheduling request; sending a processing request for processing the task scheduling request to the business middle station associated with the access permission; receiving a task processing result corresponding to the processing request, and sending the task processing result to the business system.

[0005] Optionally, the task scheduling request includes at least an application identifier and an encrypted token; the authentication of the task scheduling request includes: searching for a verification key corresponding to the application identifier; generating a verification token based on the task scheduling request and the verification key; and in response to determining that the encrypted token is consistent with the verification token, determining that the task scheduling request has passed the authentication.

[0006] Optionally, the access permission includes a business middle station identifier; the sending of a processing request to process the task scheduling request to the business middle station associated with the access permission includes: searching for the business middle station corresponding to the business middle station identifier in a pre-stored association table, and sending the processing request to the business middle station.

[0007] Optionally, before authenticating the task scheduling request, the method includes: monitoring the traffic corresponding to all task scheduling requests, and in response to determining that the traffic is greater than or equal to a traffic threshold, performing flow limiting processing on all task scheduling requests.

[0008] Optionally, after receiving the task processing result corresponding to the processing request, the method includes: generating a service log corresponding to the task scheduling request based on the task scheduling request and the task processing result, and sending the service log to a cloud server.

[0009] Optionally, the method includes: monitoring the task scheduling component according to a predetermined detection protocol to obtain a monitoring result; in response to determining that the monitoring result is an abnormal monitoring result, searching for a recovery strategy corresponding to the abnormal monitoring result; and restoring the task scheduling component according to the recovery strategy.

[0010] Optionally, before sending a processing request for processing the task scheduling request to a business middle station associated with the access permission, the method includes: in response to detecting a failure in the business middle station associated with the access permission, sending task scheduling failure information to the business system.

[0011] Based on the same inventive concept, the present application also provides a task scheduling device, which is applied to a task scheduling component, and multiple business systems are communicated with multiple business middle stations through the task scheduling component, including: a receiving module, configured to receive a task scheduling request sent by at least one business system; an authentication module, configured to authenticate the task scheduling request, and in response to determining that the task scheduling request passes the authentication, parse the task scheduling request to obtain the access permission corresponding to the task scheduling request; a first sending module, configured to send a processing request for processing the task scheduling request to the business middle station associated with the access permission; a second sending module, configured to receive a task processing result corresponding to the processing request, and send the task processing result to the business system.

[0012] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.

[0013] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method as described above.

[0014] As can be seen from the above, the task scheduling method, device, electronic device and storage medium provided by the present application, the method includes receiving a task scheduling request sent by at least one business system. Authenticating the task scheduling request improves the authentication efficiency of task scheduling, and in response to determining that the task scheduling request passes the authentication, parsing the task scheduling request to obtain the access rights corresponding to the task scheduling request, ensuring that the access scope of the task scheduling request can be accurately found. Sending a processing request for processing the task scheduling request to the business middle station associated with the access rights to ensure that the task scheduling request can be accurately processed. Receiving the task processing result corresponding to the processing request, and sending the task processing result to the business system, ensures the smooth completion of task scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 A flowchart of a task scheduling method according to an embodiment of the present application;

[0017] Figure 2 A schematic diagram of a business system architecture using a business middle platform according to an embodiment of the present application;

[0018] Figure 3 A schematic diagram of the structure of a task scheduling device according to an embodiment of the present application;

[0019] Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0021] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0022] As described in the background technology section, users access the business system to arrange the required business. Most of the business can be completed by accessing the database through the business system, but some of the business needs to access the business middle platform to complete. The shared services currently released by various business middle platforms have large differences in technical routes, release methods, authentication control, and management methods, resulting in users being unable to obtain the latest service information in a timely manner when using the services of various business middle platforms, and unable to obtain service information through the same channel. The technical routes, interconnection methods, and authentication methods of various business middle platforms are not unified, resulting in repeated development and repeated adaptation of foreground task applications during the construction process, which increases a lot of workload and fails to bring into play the full value of the business middle platform. It not only reduces the authentication efficiency of the task scheduling process, but also brings corresponding obstacles to the managers, operators, developers, and users of the business middle platform in jointly promoting the implementation of the business middle platform strategy.

[0023] It should be noted that the business system is a set of software applications that can support the daily operational activities of an enterprise. It integrates various business processes and functions, including finance, human resources, supply chain management, customer relationship management, etc., to help enterprises improve the efficiency and management level of business processes. Business middle platform is a concept of enterprise IT architecture, which aims to integrate and reuse (share) the common needs of various business lines, and precipitate relatively stable and shareable business service capabilities to support fast-changing business system needs. The core advantages of the business middle platform include reducing complexity, improving flexibility, accelerating innovation, reducing costs, and improving customer experience. It supports various applications of the enterprise through unified data and processes, and concentrates core capabilities to improve the coordination and efficiency of business processes. The design of the business middle platform usually adopts a service-oriented architecture, splitting different business functions into independent services to improve flexibility and scalability, and implementing API management strategies to ensure secure access and use of functions.

[0024] In view of this, the present application embodiment proposes a task scheduling method, referring to Figure 1 , applied to the task scheduling component, multiple business systems are connected to multiple business middle platforms through the task scheduling component, including the following steps:

[0025] Step 101: Receive a task scheduling request sent by at least one business system.

[0026] In this step, there are differences in the shared services published by different business middle stations. In order to overcome the above differences, the task scheduling component is used as a task scheduling transfer station between the business system and the business middle station, and the shared services of the business middle station are standardized in the task scheduling component. When the business system has a demand for task scheduling, the business system sends a task scheduling request to the task scheduling component. For example, Figure 2 As shown, the user sends a task scheduling instruction to the business system through the user gateway, and the business system generates a business scheduling demand. It should be noted that multiple business systems can send task scheduling requests to the task scheduling component at the same time. Therefore, the task scheduling component receives a task scheduling request sent by at least one business system.

[0027] It should be noted that the business system and the business middle station need to be registered with the task scheduling component in advance so that the business system and the business middle station can communicate with the task scheduling component smoothly. The task scheduling component supports the following centralized service types, namely REST (Representational State Transfer) service, subscription service, Webservice service, and Web Socket service. REST service is a common service based on HTTP request and REST style. This type of service is the mainstream and common service. At present, major business middle stations basically provide service interfaces to the outside world in accordance with the REST style. Subscription service is a message-based service. It manages subscription services by uniformly managing the relationship between service producers and consumers and message topics. When the subscription service is registered with the task scheduling component, the corresponding message topic, message content description, message trigger factors and other information need to be allocated to facilitate the subscriber to understand the value of the message. When a message is generated, it is sent by the task scheduling component to the message queue or HTTP callback of each message subscription application. Webservice service is a common service in SG-ERP (State Grid Corporation Enterprise Resource Planning System). The task scheduling component manages the existing Webservice services uniformly and provides unified service access control. It also performs registration and release management of Webservice services. In addition, the task scheduling component provides an interface conversion service to convert the Webservice interface into a REST interface, which is also registered with the task scheduling component, making it convenient for the business system to select the required access method. WebSocket service is a streaming service type. The task scheduling component authenticates and proxies the service connection, thereby realizing the unified management of WebSocket services. Among them, WebSocket for user message push is not within this scope. The task scheduling component also supports the control of interface data permissions. When registering the interface, select the dimension to which the data permission belongs. When the business system applies, it can select the dimension to be used. For example, there are 28 data dimensions (headquarters and 27 provincial (municipal) companies). When the business system applies to use the interface, it must select one or more of the 28 dimensions (based on actual business). After the approval process is passed, when the business system accesses the data permission interface, the gateway automatically adds the value of the permission granted by the dimension parameter, which is used for data permission identification in the business middle station. Among them, the gateway is divided into a service gateway, a user gateway, a two-level through gateway, and an interface conversion service (used to provide webservice conversion to REST interface). The gateway is deployed under the corresponding business middle station tenant to provide a unified entrance for the business middle station. According to business needs, each middle station can deploy a service gateway (mandatory) and a user gateway (used to proxy application access requests).

[0028] The service routing capability is the core capability of the task scheduling component to support the outside world. The routing mode of the service is the main difference between the current business platforms. It has the greatest impact on the use of the business system and is the key capability of the unified service entrance. The default routing rules are standardized by the unified service scheduling specification. Service routing is divided into public routing rules and custom routing rules. The public routing rule is the rule mode adopted by the system by default. It adopts the mode of microservice encoding in the first segment of the path context, followed by the microservice interface path. For example, the http: / / gw.sgcc.com.cn / yx-customer-service / customer / info interface, where yx-customer-service is the encoding of the microservice, and the subsequent customer / info is the actual path of the interface in the code. Custom rules are used to meet the personalized needs of the business system for URL (uniform resource locator, unified resource locator system), and the path rewriting mode is adopted to meet the path requirements of the business system. For example, the context of the power grid resource platform is / WMCenter, but according to the path rule of the microservice context, it is impossible for all power grid resource platform services to be implemented in the same microservice, so it is necessary to support URL rewriting. Rewrite rules support URL and header information, and can be matched arbitrarily to meet the multi-version requirements of Huayun version-power grid resource center. Considering the matching performance issues, in principle, the number of routing rules for each gateway tenant should not exceed 1,000.

[0029] Step 102: authenticating the task scheduling request. In response to determining that the task scheduling request passes the authentication, parsing the task scheduling request to obtain access rights corresponding to the task scheduling request.

[0030] In this step, authentication refers to verifying whether the business system has the right to access the business middle platform, and also reflects the ability of the task scheduling component to identify applications. The task scheduling component can authenticate all task scheduling requests according to unified authentication rules, perform security verification on the business system that makes the task scheduling request, and improve the authentication efficiency of task scheduling. If the task scheduling request passes the authentication, it means that the business system that issued the task scheduling request has the ability to access the business middle platform, ensuring the security of access. The task scheduling request is parsed to obtain the access rights of the task scheduling request to ensure that the access scope of the task scheduling request can be accurately found.

[0031] Step 103: Send a processing request for processing the task scheduling request to the business middle station associated with the access permission.

[0032] In this step, the access permission reflects the access scope of the task scheduling request, that is, the business middle station that needs to process the task scheduling request sends a processing request for processing the task scheduling request to the business middle station to ensure that the task scheduling request can be processed accurately.

[0033] It should be noted that the task scheduling component carries the full amount of the middle platform service call request forwarding work. The traffic and concurrency of each business scenario are quite different. If all traffic is borne by a gateway cluster, it is easy to cause mutual interference between different businesses, which is not conducive to the promotion and application of the task scheduling component. It is necessary to use tenant isolation technology to separate the service scheduling of different middle platforms. The task scheduling component also provides business-related data management such as application registration, service directory, and call log, and data isolation is required. Tenant isolation in the task scheduling component refers to the deployment of a unified scheduling gateway with independent resources for different business middle platforms, and the isolation of tenant resources from other business middle platforms in physical resources. Avoid the mutual influence of different business middle platforms on unified service scheduling. In terms of specific implementation: the gateway component uses physical isolation technology to achieve traffic isolation, that is, the following deployment method is adopted: the gateway is deployed to the tenant space of each business domain, and its isolation is guaranteed by the cloud platform. The gateway and the business domain are deployed in a one-to-one binding manner, and the registration center of the middle platform and the application itself is connected for service routing, and an independent entrance is established through the secondary domain name method. The traffic of each business middle platform and application service is separated from each other, and the traffic passes through different gateway clusters to reach the business middle platform and application service. The configuration and monitoring of each gateway are the responsibility of the task scheduling component, which opens up the configuration and monitoring collection channels with each gateway through the message bus and Redis.

[0034] Step 104: Receive a task processing result corresponding to the processing request, and send the task processing result to the business system.

[0035] In this step, the task scheduling component receives the task processing result corresponding to the processing request and sends the task processing result to the business system, ensuring the smooth completion of task scheduling.

[0036] Through the above scheme, a task scheduling request sent by at least one business system is received. The task scheduling request is authenticated to improve the authentication efficiency of task scheduling. In response to determining that the task scheduling request passes the authentication, the task scheduling request is parsed to obtain the access rights corresponding to the task scheduling request, ensuring that the access scope of the task scheduling request can be accurately found. A processing request for processing the task scheduling request is sent to the business middle station associated with the access rights to ensure that the task scheduling request can be accurately processed. The task processing result corresponding to the processing request is received, and the task processing result is sent to the business system to ensure the smooth completion of task scheduling.

[0037] In some embodiments, the task scheduling request includes at least an application identifier and an encrypted token; the authentication of the task scheduling request includes: looking up a verification key corresponding to the application identifier; generating a verification token based on the task scheduling request and the verification key; in response to determining that the encrypted token is consistent with the verification token, determining that the task scheduling request has passed the authentication.

[0038] In this embodiment, authentication is the ability of the task scheduling component to identify the business application required for the task scheduling request. The process of the unified service scheduling component obtaining the business application through the encrypted token is called authentication. After receiving the task scheduling request, the task scheduling request includes an application identifier. The verification key of the business system can be found according to the application identifier. Through a predetermined encryption algorithm, a verification token is generated based on the task scheduling request and the verification key. When the encrypted token is consistent with the verification token, it means that the task scheduling request has not been tampered with, and it is determined that the task scheduling request has passed the authentication. This embodiment unifies the authentication method, and there is no need to adapt multiple authentication methods, thereby ensuring efficient authentication.

[0039] Application authentication returns the ability of tokens through the application appid and secret information. This function is integrated with unified permissions, and the scheduling task scheduling component proxies this ability. Authentication uses the State Grid standard OAuth2 protocol for token interaction and communication. Business applications come from unified permissions. For applications that exist on the digital capability opening platform but are not in the unified permissions, the digital capability opening platform synchronizes permissions and issues keys based on permissions.

[0040] In some embodiments, the access permission includes a business middle station identifier; the processing request sent to the business middle station associated with the access permission to process the task scheduling request includes: searching for the business middle station corresponding to the business middle station identifier in a pre-stored association table, and sending the processing request to the business middle station.

[0041] In this embodiment, different business middle stations can perform different tasks, so it is necessary to determine the platform that processes the task scheduling request. The access rights include the business middle station identifier, through which the business middle station identifier can be used to find the business middle station corresponding to the business middle station identifier in the pre-stored association table, and the processing request can be sent to the business middle station, ensuring that the task scheduling request can be accurately processed.

[0042] It should be noted that the object accessed by the application, that is, the registered business middle platform, is subject to access rights control. The authorization of service rights can be managed in the task scheduling component, and the process approval and authorization of the services and interfaces that the application applies to access are carried out. After approval, the approval permission data is synchronized to the scheduling gateway for permission authorization control of the original data.

[0043] In some embodiments, before authenticating the task scheduling request, the method includes: monitoring the traffic corresponding to all task scheduling requests, and in response to determining that the traffic is greater than or equal to a traffic threshold, performing flow limiting processing on all task scheduling requests.

[0044] In this embodiment, the task scheduling component supports access and calls of various types of middle platforms, and the service traffic is relatively large. In order to ensure the high availability of the service scheduling component, traffic monitoring is implemented from four dimensions, including network province, middle platform, application, and service interface. When the traffic is greater than or equal to the traffic threshold, all task scheduling requests are subject to flow limiting, and microservice governance methods such as service degradation and service fuse are used to ensure the reliability of the task scheduling component. According to the needs of the business middle platform service, the user's business system is subject to flow limiting control. After the flow limiting conditions are met, a fast failure return is performed. The flow limiting rules must support flow limiting control according to the interface and microservice dimensions. After all task scheduling requests are flow limited, the task scheduling component implements the threshold configuration of the service, supports dynamic activation and dynamic adjustment of thresholds, supports the configuration function of distinguishing core and non-core applications and services, and flows the service flow on demand, giving priority to ensuring the high availability of core functions. The task scheduling component uses Alibaba's open source Sentinel component as a current limiting and fuse solution. By using Sentinel global current limiting, priority-based current limiting can be implemented. For example, when the overall traffic volume is large, non-core services and non-core applications are given priority for current limiting.

[0045] Before the traffic reaches the traffic threshold, in response to determining that the traffic reaches the critical value of the traffic threshold, the critical value of the traffic threshold is less than the traffic threshold. The unified service scheduling component mainly schedules the gateway to fully evaluate the throughput of the middle platform service interface, and automatically adjusts the response capabilities of the service routing and authentication resources through the unified service scheduling elastic scaling strategy according to the business needs of the business system. Define the scaling configuration and scaling strategy according to business needs, reduce the workload of manually adjusting gateway resources repeatedly to cope with business changes and peak pressure, and help enterprises save resources and labor costs. The task scheduling component can evaluate the current resource usage based on the CPU resource usage and service traffic. When the load is high, the scheduling gateway is automatically expanded to meet the peak requests. When the peak drops, the scheduling gateway is automatically reduced to reduce the occupation of physical resources and achieve elastic scaling capabilities. At present, the Huawei version and the Alibaba version of the State Grid Cloud both support elastic scaling capabilities through CPU memory resources, but do not support the elastic scaling mode through traffic. In the unified service scheduling component, only the gateway needs the ability to elastically scale, and the gateway is an IO-intensive application with low fluctuations in CPU and memory resources. Therefore, an elastic scaling interface is provided through the existing cloud platform, and the scheduling component itself completes the elastic scaling of traffic analysis.

[0046] In some embodiments, after receiving the task processing result corresponding to the processing request, the method includes: generating a service log corresponding to the task scheduling request based on the task scheduling request and the task processing result, and sending the service log to a cloud server.

[0047] In this embodiment, a service log is generated through the task scheduling request and the task processing result to record the entire scheduling process corresponding to the task scheduling request. The service log is the basis for the task scheduling component to provide operational analysis data in the later stage, and is the main value-added capability of the task scheduling component. Sending the service log to the cloud server for storage not only saves its own memory, but also facilitates subsequent analysis based on the service log. It should be noted that the gateway of the task scheduling component should record the log asynchronously, and the performance of the service agent will not be affected by the log record. By writing the log to a file, and then using the cloud server to collect the data of the log file to the corresponding system for analysis.

[0048] For example, the cloud server can be a State Grid Cloud Huawei component or a State Grid Cloud Alibaba component:

[0049] (1) State Grid Cloud Huawei Edition

[0050] The log management component of the Huawei version of State Grid Cloud is LTS (Log Tank Service). It supports the configuration of log collection paths, realizes the collection and storage of access logs, and supports open log search through API interfaces. LTS collects log data through ICAgent. After the log data of the host and cloud service is reported to the cloud log service, it can support 30 days of storage. For log data that needs to be stored for a long time, the cloud log service provides a dump function, which can dump the log to the object storage service (OBS) or the data access service (DIS) for long-term storage. The log retrieval function can be used to query the required logs in massive logs, support original log query analysis, and can also perform SQL query and analysis on structured logs. By configuring word segmentation, the log content can be segmented into multiple words according to the word segmentation character, and the segmented words can be used for search when searching logs.

[0051] (2) The Alibaba version of State Grid Cloud uses the Tlog component to collect asynchronous logs. The Jstorm component cleans and processes the collected log data, stores the statistical data in the storage data, and stores the detailed data in ES for building monitoring links and detailed queries.

[0052] In some embodiments, the method includes: monitoring the task scheduling component according to a predetermined detection protocol to obtain a monitoring result; in response to determining that the monitoring result is an abnormal monitoring result, searching for a recovery strategy corresponding to the abnormal monitoring result; and restoring the task scheduling component according to the recovery strategy.

[0053] In this embodiment, the task scheduling component serves as the call forwarding channel of the business middle station. It is of utmost importance to ensure the normal and stable operation of the forwarding. The timely handling and rapid recovery of the component's own faults is a key technical point. According to the predetermined detection protocol, the task scheduling component is monitored to obtain the monitoring result, ensuring that it is accurately determined whether the task scheduling component has a fault. In the case where the monitoring result is an abnormal monitoring result, the recovery strategy corresponding to the abnormal monitoring result is found, and the task scheduling component is restored according to the recovery strategy, ensuring that the task scheduling component has an automatic recovery function when encountering a fault.

[0054] The predetermined detection protocol can be a K8S (Kubernetes, application software) probe detection protocol. The scheduling components are all deployed in a containerized manner. The containerized application can use the K8S probe technology to monitor the running status of the component POD (Pod is the smallest resource management component in kubernetes). The POD that detects a fault can be automatically offline in time, and the service can be restored by automatically restarting the POD instance. K8S provides two probes (i.e., liveness probe and readiness probe) to monitor the running status and health of the Pod. Liveness probe (livenessProbe): used to determine whether the container is healthy. If the health condition is not met, then Kubelet (Kubelet is an agent component on the kubernetes working node) will determine whether the Pod needs to be restarted according to the restartPolicy (restart policy) set in the Pod. Readiness probe (readinessProbe): used to determine whether the program in the container is alive (or healthy). Only when the program (service) is normal, the container begins to provide network access to the outside (startup is complete and ready).

[0055] K8S supports multiple detection protocols such as TCP and HTTP. HTTP is commonly used in Web systems. The status code returned by HTTP is used to determine whether it is normal. When the status code is greater than or equal to 200 and less than 400, it is considered normal. Other status codes indicate abnormality. K8S will shut down the faulty node and restart the new instance according to the predetermined strategy. The scheduling components are deployed in a containerized manner, making full use of K8S's probe strategy for liveness. When necessary, K8S restarts some nodes to ensure component availability and reduce manual operations. The scheduling component needs to have built-in httpGet livenessProbe and readinessProbe detection interfaces. The readinessProbe interface is opened and returns a 200 status code after the component is successfully started, notifying K8S that the component is ready to start; the livenessProbe interface determines whether the current node is running normally by checking the running status of memory, threads, locks, etc. If normal, it returns a 200 status, otherwise it returns 400.

[0056] The task scheduling component should not only focus on satisfying the enterprise middle office service opening and management capabilities, but also have basic service monitoring integration capabilities, and should be able to meet the adaptation technical capabilities for different cloud platforms, such as the Alibaba version and Huawei version of the State Grid Cloud. Basic service monitoring capabilities include monitoring of key components of the enterprise service bus, monitoring of service calls, monitoring of service call logs, and monitoring of service call links. The cloud platform provides a complete set of monitoring solutions to monitor the health of services. The components monitor the health of services in the gateway logs, and the cloud platform monitors the health of services in the detection solution and provides monitoring results and data.

[0057] (1) State Grid Cloud Huawei Edition Monitoring

[0058] The service is AOM (Application Operations Management), which supports real-time monitoring of applications and related cloud resources, collects and associates resource indicators, logs and events to analyze application health status, and supports alarm and data visualization functions. AOM uses ICAgent (consistent with LTS) to collect indicator data. Applications deployed by Servicestage and CCE will install the collector by default. ICAgent supports automatic collection of application information, including process name, application name, container name, Kubernetes pod name, etc. Monitoring services mainly include application monitoring, host monitoring, and indicator monitoring, and support alarm center and dashboard display: Application monitoring is monitoring for applications, and supports monitoring of application resource usage, trends and alarms. Application monitoring adopts a layer-by-layer drill-down design, and the hierarchical relationship includes: application list -> application details -> component details -> instance details -> container details -> process details. In the detail pages of each level, AOM associates resource-related alarms, logs and the status of the host, and displays detailed information about alarms and hosts. Indicator monitoring supports hundreds of monitoring indicators and second-level monitoring for clusters, virtual machines, networks, disks, databases, applications, containers, and businesses. It provides an indicator monitoring interface to retrieve indicators and displays them on the indicator tree through the hierarchical relationship of resources. The hierarchical relationship is: cluster->service->instance->container / process. It supports displaying resource data through curve graphs, digital graphs, and TopN charts. Key indicators of important resources can be added to the dashboard for real-time monitoring. By creating threshold rules for key resource indicators, threshold alarms are generated when indicator data meets the threshold conditions. Alarms and events are notified to operation and maintenance personnel through emails, text messages, etc.

[0059] (2) State Grid Cloud Alibaba Edition Monitoring

[0060] Provides professional service monitoring components ARMS, which can quickly and conveniently build business monitoring capabilities with second-level response based on application and business customization. Data collection: ARMS supports log capture through configuration. Task definition: Define tasks such as real-time processing, data storage, display analysis, data API and alarm through task configuration, so as to define your own application scenarios. Directly monitor business through application monitoring preset scenarios. Application scenarios: In addition to custom monitoring, ARMS also has preset monitoring scenarios that can be used directly, such as application monitoring. Deeply customized business monitoring: Real-time monitoring alarms and dashboards with business attributes can be deeply customized as needed. Business scenarios include e-commerce scenarios, logistics scenarios, and air travel scenarios. Application performance and exception monitoring: Application performance management (APM) capabilities for performance exception monitoring and call chain query of distributed applications. Unified alarm and reporting platform: A unified alarm and reporting platform that integrates custom monitoring and application monitoring. Application performance and failure: Contains functions such as application topology, exception capture, distributed or local call stack, and log holographic troubleshooting. In-depth customized business monitoring: supports multiple data source access, real-time computing and storage orchestration, alarm and report customization, API data export and other functions.

[0061] In some embodiments, before sending a processing request to a business middle station associated with the access permission to process the task scheduling request, the method includes: in response to detecting a failure in the business middle station associated with the access permission, sending task scheduling failure information to the business system.

[0062] In this embodiment, when the backend service of the gateway proxy fails, the gateway and the business system that calls the faulty service are protected to perform fast failure return, reduce resource calls, and protect the faulty service from being overwhelmed by traffic when it is restarted to a certain extent. It supports viewing the current fuse status of all services, the latest 5-minute service quality information such as service response time and service success rate, and manual fuses can be performed based on these indicators. Service fuse rules are fused according to microservices. For manually registered services, rule fuses are performed in the manner of address + port + context, and fuse groups can be configured.

[0063] In another embodiment provided by the present application, the task scheduling component adopts two-level service penetration, and the two-level service penetration is realized by using the scheduling gateway of the headquarters and the network province respectively. Each business application only communicates with the scheduling gateway of the province (city), and does not directly access the middle office service of the opposite headquarters (province and city). Improve the security and manageability of two-level access. The gateway of the task scheduling component uses a two-level mutual trust protocol to proxy the service for two-level penetration, which is one of the functions that the task scheduling component must provide. The two-level penetration should be transparent to the business application, shield the differences between the penetrations, and digest the differences within the task scheduling component. It is necessary to add a mutual trust mechanism when making interface calls between all unified task scheduling components. Mutual trust adopts a digest signature algorithm. The caller adds encryption parameters to the request header, and the called party performs a signature check on the request source message header (head) to verify whether the request end is legal. The task scheduling component adopts an internal and external network penetration design. The penetration design recommends the use of an information security network isolation device logic type, and through the penetration capability of the isolation device service, authorized access to the application of the information external network. In terms of business application maintenance, it supports extranet applications. When in use, the interface for the extranet application is authorized. After the authorization is approved, the access request from the information security network isolation device is marked as an extranet application, and the requests for the extranet are separately protected and audited. Therefore, in terms of usage, there is no difference between the extranet business system and the intranet business system.

[0064] In order to avoid the impact of version updates on the normal operation of the task scheduling component, the task scheduling component adopts a gray release strategy, also known as canary release, which is to deploy the old version V1 and the new version V2 of the application in the environment at the same time. Business requests can be routed to the services of version V1 and V2 respectively using strategies such as traffic ratio and request parameters. Through the customized gray release strategy, the traffic proportion of versions V1 and V2 can be quickly adjusted until all traffic is switched to the new version. Gray release can customize the traffic proportion of the new version application when releasing a new version of the application, and gradually complete the full launch of the new version of the application, to maximize the control of the business interruption risk caused by the release of the new version, reduce the impact of the failure, and support rapid rollback. As the unified entrance of each business middle platform, the task scheduling component should also ensure the availability of the task middle platform when upgrading its own components. Through gray release technology, the task scheduling component is guaranteed to run stably and reliably, avoiding the inability of the task middle platform to forward normally due to the upgrade, and preventing the upper-layer application from being interrupted. The unified service scheduling component uses the gray release function of the cloud platform to realize the gray upgrade of the scheduling component. During the operation and maintenance phase, it is necessary to formulate reasonable grayscale release and traffic switching strategies for different components. Currently, both the Huawei version and the Alibaba version of State Grid Cloud support grayscale release capabilities, enabling version upgrades without affecting business capabilities.

[0065] In another embodiment provided by the present application, for old business systems that are difficult to transform, a multi-protocol adaptation solution can be used to carry out point-to-point middle-office gateway transformation, and the task scheduling component adapts and implements the authentication and routing logic of the relevant middle-office gateway, supporting the business system to access the unified service scheduling component without transformation, shortening the parallel operation cycle, and realizing the rapid management of the middle-office service calls of the business system, avoiding the slow overall work progress caused by the slow transformation of some old systems. The relevant old business systems are gradually transformed in the subsequent business middle-office operation work to realize the enterprise-level unified and standardized management of the business system calling the middle-office service.

[0066] According to the logic of the unified service scheduling gateway supporting each business middle platform to achieve the goal of unified management, the four major business middle platforms are specifically investigated as follows: First of all, it must be emphasized that there is only one set of specifications and standards for the task scheduling component. All new applications must be implemented in accordance with the unified specifications and standards. However, in the implementation path, the task scheduling component is used to support the authentication protocol of the current four major business middle platforms to reduce the difficulty of implementation and improve the implementation progress. Achievement goals: The gateway supports multiple business middle platform protocols, application management and permission management are managed synchronously, and the circuit breaker and current limiting capabilities are uniformly supported, and the log record usage analysis is unified. Implementation steps: (1) Application data unification: Merge the business systems corresponding to each business middle platform and import the different business systems into the enterprise service scheduling component. This process inevitably generates dirty data. For example, if a business system calls multiple business middle platforms, duplication will occur. (2) Unified permission management: Sort out all the interface information of the current four major business middle platforms, register them all in the task scheduling component, and import them into the unified service scheduling component based on usage or the permission relationship exported from the business middle platform. (3) Gateway deployment and pilot phase: Deploy the unified service dispatch gateway to the business middle platform, using a step-by-step cutting approach, first cutting some applications, observing that there are no problems in operation, and then cutting the entire platform. At present, according to the information and data provided by the four major business middle platforms, there are no obvious conflicts and problems in the power grid resource middle platform, project management middle platform, and financial management middle platform. Further refinement is required in the execution phase to be fully confirmed. Some business logic functions of the customer service business middle platform are implemented on the gateway. This part of the function does not belong to the gateway capabilities, such as protocol conversion capabilities. These functions need to be split from the customer service middle platform to business service implementation. Adaptation development requires each middle platform to make technical explanations, including detailed design and source code, to ensure that the adaptation work is efficient and error-free.

[0067] This embodiment also includes a management backend, a service micro-portal, and data distribution. The management backend is used to configure gateway tenants, register and publish services, and the online permission approval process. The service micro-portal is used to provide an interface and query information for the service catalog to the digital capability open platform for integration. Data distribution, task scheduling component data classification configuration data, log data, analysis data. The configuration data and analysis data are stored in the relational database MySQL, and the log data is stored in ES (Elastic Search) and State Grid Cloud components according to the cloud platform for data analysis. The configuration data mainly includes interface data, interface version data, interface test data, service data, service, application data, application permission data, permission approval process data, etc.

[0068] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.

[0069] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0070] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a task scheduling device.

[0071] refer to Figure 3 The task scheduling device is applied to the task scheduling component, and multiple business systems are connected to multiple business middle stations through the task scheduling component, including:

[0072] The receiving module 10 is configured to receive a task scheduling request sent by at least one business system.

[0073] The authentication module 20 is configured to authenticate the task scheduling request, and in response to determining that the task scheduling request passes the authentication, parse the task scheduling request to obtain access rights corresponding to the task scheduling request.

[0074] The first sending module 30 is configured to send a processing request for processing the task scheduling request to the business middle station associated with the access authority.

[0075] The second sending module 40 is configured to receive a task processing result corresponding to the processing request, and send the task processing result to the business system.

[0076] Through the above-mentioned device, a task scheduling request sent by at least one business system is received. The task scheduling request is authenticated to improve the authentication efficiency of task scheduling. In response to determining that the task scheduling request passes the authentication, the task scheduling request is parsed to obtain the access rights corresponding to the task scheduling request, ensuring that the access scope of the task scheduling request can be accurately found. A processing request for processing the task scheduling request is sent to the business middle station associated with the access rights to ensure that the task scheduling request can be accurately processed. The task processing result corresponding to the processing request is received, and the task processing result is sent to the business system to ensure the smooth completion of task scheduling.

[0077] In some embodiments, the authentication module 20 is further configured so that the task scheduling request includes at least an application identifier and an encrypted token; searches for a verification key corresponding to the application identifier; generates a verification token based on the task scheduling request and the verification key; and in response to determining that the encrypted token is consistent with the verification token, determines that the task scheduling request has passed the authentication.

[0078] In some embodiments, the first sending module 30 is further configured so that the access permission includes a business middle station identifier; searches for the business middle station corresponding to the business middle station identifier in a pre-stored association table, and sends the processing request to the business middle station.

[0079] In some embodiments, a first monitoring module is also included, which is configured to monitor the traffic corresponding to all task scheduling requests before authenticating the task scheduling requests, and perform flow limiting processing on all task scheduling requests in response to determining that the traffic is greater than or equal to the traffic threshold.

[0080] In some embodiments, a generation module is also included, which is configured to generate a service log corresponding to the task scheduling request based on the task scheduling request and the task processing result after receiving the task processing result corresponding to the processing request, and send the service log to the cloud server.

[0081] In some embodiments, a second monitoring module is also included, which is configured to monitor the task scheduling component according to a predetermined detection protocol to obtain a monitoring result; in response to determining that the monitoring result is an abnormal monitoring result, find a recovery strategy corresponding to the abnormal monitoring result; and restore the task scheduling component according to the recovery strategy.

[0082] In some embodiments, a third sending module is also included, and the third sending module is configured to send task scheduling failure information to the business system in response to detecting a failure in the business middle station associated with the access permission before sending a processing request for processing the task scheduling request to the business middle station associated with the access permission.

[0083] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0084] The device of the above embodiment is used to implement the corresponding task scheduling method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0085] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the task scheduling method described in any of the above embodiments is implemented.

[0086] Figure 4 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0087] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0088] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0089] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0090] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0091] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0092] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0093] The electronic device of the above embodiment is used to implement the corresponding task scheduling method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0094] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the task scheduling method described in any of the above embodiments.

[0095] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0096] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the task scheduling method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0097] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the task scheduling method described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.

[0098] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0099] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0100] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0101] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.

Claims

1. A task scheduling method, characterized in that: Applied to the task scheduling component, multiple business systems communicate and connect with multiple business middle platforms through the task scheduling component, including: Receiving a task scheduling request sent by at least one business system; authenticating the task scheduling request, and in response to determining that the task scheduling request passes the authentication, parsing the task scheduling request to obtain access rights corresponding to the task scheduling request; Sending a processing request for processing the task scheduling request to a business middle station associated with the access permission; Receive a task processing result corresponding to the processing request, and send the task processing result to the business system.

2. The method according to claim 1, characterized in that The task scheduling request includes at least an application identifier and an encrypted token; The authenticating the task scheduling request includes: Finding the verification key corresponding to the application identifier; Based on the task scheduling request and the verification key, generating a verification token; In response to determining that the encrypted token is consistent with the verification token, it is determined that the task scheduling request passes the authentication.

3. The method according to claim 1, characterized in that The access rights include the business platform identification; The sending a processing request for processing the task scheduling request to the business middle station associated with the access permission includes: The business middle station corresponding to the business middle station identifier is searched in a pre-stored association table, and the processing request is sent to the business middle station.

4. The method according to claim 1, characterized in that: Before authenticating the task scheduling request, the method includes: The traffic corresponding to all task scheduling requests is monitored, and in response to determining that the traffic is greater than or equal to a traffic threshold, flow limiting processing is performed on all task scheduling requests.

5. The method according to claim 1, characterized in that After receiving the task processing result corresponding to the processing request, the method includes: Based on the task scheduling request and the task processing result, a service log corresponding to the task scheduling request is generated, and the service log is sent to the cloud server.

6. The method according to claim 1, characterized in that The method comprises: According to a predetermined detection protocol, the task scheduling component is monitored to obtain a monitoring result; In response to determining that the monitoring result is an abnormal monitoring result, searching for a recovery strategy corresponding to the abnormal monitoring result; The task scheduling component is restored according to the recovery strategy.

7. The method according to claim 1, characterized in that Before sending a processing request for processing the task scheduling request to a business middle station associated with the access authority, the method includes: In response to detecting that a failure exists in the business middle platform associated with the access authority, information about task scheduling failure is sent to the business system.

8. A task scheduling device, characterized in that: Applied to the task scheduling component, multiple business systems communicate and connect with multiple business middle platforms through the task scheduling component, including: A receiving module, configured to receive a task scheduling request sent by at least one business system; an authentication module, configured to authenticate the task scheduling request, and in response to determining that the task scheduling request passes the authentication, parse the task scheduling request to obtain access rights corresponding to the task scheduling request; A first sending module is configured to send a processing request for processing the task scheduling request to a business middle station associated with the access authority; The second sending module is configured to receive a task processing result corresponding to the processing request, and send the task processing result to the business system.

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

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.