Data processing method and program product
Patent Information
- Application Number
- CN202611115383.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本发明提供了一种数据处理方法及程序产品,以解决相关技术中因网络环境的不确定性,导致云边端在在线与离线状态切换时极易引发业务处理中断以及云边数据不一致,影响数据处理的可靠性与连续性的问题
[0008]根据本发明的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的数据处理方法。
Smart Images

Figure CN122933684A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of cloud computing and edge computing technology, and in particular to a data processing method and program product. Background Technology
[0002] With the rapid development of the Internet of Things, the Industrial Internet, and smart terminals, cloud-edge-device collaborative computing architecture has been widely adopted.
[0003] In related technologies, the network connection between the cloud and edge computing nodes is not real-time and reliable. The uncertainty of the network environment leads to significant shortcomings in switching between online and offline states. When edge computing nodes encounter network outages or weak network fluctuations, they often cannot independently maintain the continuous operation of services, which can easily lead to the interruption of local business logic. At the same time, during the connection recovery process, local data loss and inconsistencies between cloud and edge data are prone to occur, seriously affecting the reliability and continuity of data processing. Therefore, there is an urgent need for a data processing method to improve the reliability of data processing. Summary of the Invention
[0004] This invention provides a data processing method and program product to solve the problem in related technologies that the uncertainty of the network environment can easily cause business processing interruptions and data inconsistencies between the cloud and edge when switching between online and offline states, thus affecting the reliability and continuity of data processing.
[0005] According to one aspect of the present invention, a data processing method is provided, the method comprising: The system receives business application packages and business data from the cloud and distributes them to edge computing nodes. The edge computing nodes include a state-aware switching engine, a serverless execution engine, an edge application package repository, and an edge database. In response to the edge computing node receiving a service request, the state-aware switching engine determines the operating mode of the edge computing node and sends the operating mode to the serverless execution engine; The serverless execution engine loads the business package from the edge package repository based on the business request, determines the data access path according to the operating mode, obtains the business data corresponding to the business request based on the data access path, and performs the processing operation of the business request based on the business package and the business data; wherein, the data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud.
[0006] According to another aspect of the present invention, a data processing apparatus is provided, the apparatus comprising: The delivery module is used to receive business application packages and business data through the cloud and deliver the business application packages and business data to edge computing nodes; wherein, the edge computing node includes a state-aware switching engine, a serverless execution engine, an edge application package repository, and an edge database; The operation mode determination module is used to respond to the edge computing node receiving a service request, determine the operation mode of the edge computing node through the state awareness switching engine, and send the operation mode to the serverless execution engine; The processing module is configured to load the business package from the edge package repository based on the business request through the serverless execution engine, determine the data access path according to the running mode, obtain the business data corresponding to the business request based on the data access path, and perform the processing operation of the business request based on the business package and the business data; wherein, the data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud.
[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the data processing method according to any embodiment of the present invention.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the data processing method described in any embodiment of the present invention.
[0009] According to another aspect of the present invention, embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the data processing method as described in any of the embodiments of this disclosure.
[0010] The technical solution of this invention firstly receives business program packages and business data through the cloud and distributes them to edge computing nodes. Each edge computing node includes a state-aware switching engine, a serverless execution engine, an edge program package repository, and an edge database. Unified operation and maintenance management and batch distribution of business resources are performed through the cloud, avoiding management chaos caused by decentralized maintenance of multiple edge nodes. Next, in response to a business request received by the edge computing node, the state-aware switching engine determines the operating mode of the edge computing node and sends the operating mode to the serverless execution engine. The state-aware switching engine enables network and node condition awareness and operating mode decision-making, providing a decision basis for subsequent data access path switching and achieving layered decoupling between network state awareness and business execution. Finally, through... The serverless execution engine loads the business package from the edge package repository based on the business request, determines the data access path according to the operating mode, obtains the business data corresponding to the business request based on the data access path, and executes the processing operation of the business request based on the business package and the business data. The data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud. The serverless execution engine enables on-demand loading and elastic operation of business resources, while intelligently selecting the data access path according to the operating mode. This ensures low-latency response to business requests while balancing global data consistency and storage costs, achieving complete separation of program data and seamless switching of data access paths. This ensures uninterrupted business execution and greatly improves data processing efficiency and reliability.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart of a data processing method provided according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of a data processing method provided according to Embodiment 2 of the present invention; Figure 3This is a schematic diagram of channel isolation management in a data processing method according to Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of a business program package and business data synchronization in a data processing method according to Embodiment 2 of the present invention; Figure 5 This is a schematic diagram of the operation mode switching of a data processing method according to Embodiment 2 of the present invention; Figure 6 This is a schematic diagram of the data access path switching process during the online mode to offline mode change of a data processing method provided in Embodiment 2 of the present invention; Figure 7 This is a schematic diagram illustrating the data access path switching process during the offline mode to online mode change of a data processing method according to Embodiment 2 of the present invention; Figure 8 This is a schematic diagram of the structure of the data access abstraction layer of a data processing method according to Embodiment 2 of the present invention; Figure 9 This is a schematic diagram of a hot update process for a data processing method according to Embodiment 2 of the present invention; Figure 10 This is a schematic diagram illustrating seamless switching of data access paths in a data processing method according to Embodiment 2 of the present invention; Figure 11 This is a schematic diagram of the structure of a data processing device according to Embodiment 3 of the present invention; Figure 12 This is a schematic diagram of the structure of an electronic device that implements the data processing method of the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0016] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0017] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0018] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0019] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0020] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0021] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0022] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.
[0023] Example 1 Figure 1 This is a flowchart illustrating a data processing method provided in Embodiment 1 of the present invention. This embodiment is applicable to processing data related to business requests. The method can be executed by a data processing device, which can be implemented in hardware and / or software, optionally through an electronic device such as a mobile terminal, PC, or server. Figure 1 As shown, the method may specifically include: S110. Receive business application packages and business data through the cloud, and distribute the business application packages and business data to edge computing nodes; wherein, the edge computing node includes a state-aware switching engine, a serverless execution engine, an edge application package repository, and an edge database.
[0024] In this embodiment of the invention, the cloud can be a platform for deploying core business logic and storing master data to achieve centralized data processing and management. A business application package can be understood as a collection of program files that encapsulate business processing logic. Business data can be data records related to the execution of business programs, such as business parameter data, business configuration information, and business operation log data. Edge computing nodes are deployed close to the business terminal and can be understood as edge computing and storage units used to achieve localized real-time computing and response.
[0025] Optionally, the edge computing node may include, but is not limited to, multiple components such as a state-aware switching engine and a serverless execution engine. The state-aware switching engine can be a functional engine used to perceive the network connection status between the edge computing node and the cloud in real time, and dynamically and seamlessly switch between online and offline modes based on a preset state machine model. When the state-aware switching engine detects a change in network status, it can automatically adjust the data access path without interrupting the currently executing business requests, thus achieving complete transparency of mode switching to the business layer. The serverless execution engine, deployed within the edge computing node, can be used to dynamically load business application packages according to business requests and uniformly access business data stored locally or in the cloud through a data access abstraction layer, thereby achieving consistency of business logic in online and offline modes. The serverless execution engine can select to access a local database or a cloud database based on the current operating mode through the data access abstraction layer, thereby achieving consistent execution of the same business logic in online and offline modes. The edge computing node may include an independent edge package repository and an edge database. The edge package repository can be a localized storage repository deployed on the edge computing node, used for independently storing synchronized packages. The edge database can be a localized database deployed on the edge computing node, used for independently storing synchronized copies of business data. The edge package repository and edge database can adopt a separate storage architecture and support independent program updates and independent data synchronization.
[0026] Specifically, the edge package repository can independently store business applications synchronized from the cloud. It stores program files and their metadata hierarchically by organization name and version number through a hierarchical directory, and uses soft link technology to point to the currently used version, thereby realizing rapid version switching. At the same time, the root directory also maintains an independent index file for recording and retrieving package version information, realizing decoupled management of program version and subsequent data version.
[0027] Specifically, the edge database independently stores business data synchronized from the cloud. Multiple data tables are used to achieve independent data storage and version tracking and management: First, business data tables can be set up, each with a primary key to identify unique data entries. Specific business content is stored in JSON format. A new data version field is set to distinguish it from the program version. A synchronization status field is configured to differentiate between three synchronization states: synchronized, pending synchronization, and data conflict. The update time on the cloud side and the local update time automatically filled by the local node are recorded separately. Next, a data version tracking summary table can be set up, using the table name as the primary key. It records the latest data version number of each business data table and the time of the last cloud data synchronization, managing the version iteration and cloud synchronization progress of various business data within the edge database.
[0028] Optionally, business application packages and business data can be received via the cloud and then distributed to edge computing nodes.
[0029] Based on the above solution, optionally, the step of sending the business application package and the business data to the edge computing node includes: sending the business application package to the edge application package repository of the edge computing node based on the application synchronization channel, and sending the business data to the edge database of the edge computing node based on the data synchronization channel.
[0030] The program synchronization channel can be understood as a communication link between the cloud and edge computing nodes for transmitting and synchronizing business program packages and their version information. It can employ independent storage space and an independent version index for independently managing the release, incremental updates, and integrity verification of business program packages. The data synchronization channel can be understood as a communication link between the cloud and edge computing nodes for transmitting and synchronizing business data. It can employ independent storage space and independent data version tracking for independently managing incremental synchronization, full synchronization, and conflict resolution of business data.
[0031] Optionally, the program synchronization channel and the data synchronization channel are independent of each other, and can employ different synchronization strategies, version management, and transmission mechanisms to achieve complete decoupling synchronization between the program and the data. Specifically, program package versions and data versions can be managed separately. Program packages can use semantic version numbers, and data can use timestamp version numbers, with the two version systems being independent of each other. A compatibility matrix between program package versions and data versions can be maintained, recording the range of data versions compatible with each program package version. Furthermore, independent rollback of program packages and independent rollback of data are supported. Rollback of program packages does not affect synchronized data, and rollback of data does not affect loaded program packages.
[0032] Optionally, business application packages can be transmitted to the edge application package repository of the edge computing node through the application synchronization channel, and business data can be transmitted to the edge database of the edge computing node through the data synchronization channel. The two channels operate independently and do not interfere with each other.
[0033] Specifically, the program synchronization channel can be used to monitor version release events of the cloud package repository and compare the version differences between the edge computing node and the cloud. If a version difference exists, the business package can be transmitted to the edge package repository of the edge computing node through the program synchronization channel. The data structure of the business package may include, but is not limited to, package ID, package name, semantic version number, file checksum (SHA256), file size, compatible data version range, release event, and information such as whether it has been released (PUBLISHED), deprecated (DEPRECATED), or rolled back (ROLLBACK).
[0034] Specifically, the data synchronization channel can be used to monitor the backend database Binlog to identify data change events, capture INSERT / UPDATE / DELETE operations, and then detect data modification conflicts between the cloud and edge computing nodes. If a conflict exists, the business data is transmitted to the edge database of the edge computing node through the data synchronization channel to achieve incremental synchronization and conflict resolution. The structure of the data change event may include a unique event ID, the INSERT / UPDATE / DELETE operation, the table name, the change timestamp, the data before the change, the data after the change, the primary key value, and the data version number.
[0035] Optionally, the program synchronization channel can adopt a reliable file transfer protocol, supporting large file chunked transmission, breakpoint resumption, and integrity verification, with a transmission frequency of on-demand triggering or periodic checks; the data synchronization channel can adopt a message queue-based streaming transmission protocol, supporting real-time incremental synchronization, batch aggregation transmission, and conflict detection, with a transmission frequency of near real-time or configurable interval incremental synchronization; when the two channels share network bandwidth, a Quality of Service (QoS) policy can be used to ensure that the data synchronization channel has a higher priority than the program synchronization channel.
[0036] Optionally, the differences between the program synchronization channel and the data synchronization channel can be shown in Table 1: Table 1 Optionally, such as Figure 3 As shown, the edge computing node may also include a channel isolation manager, which can ensure physical and logical isolation between the program synchronization channel and the data synchronization channel. That is, the two channels use independent network connections and transmission queues, and the two channels adopt independent version systems and synchronization strategies. Furthermore, the failure of program package synchronization does not affect data synchronization, and the failure of data synchronization does not affect program package synchronization. The scope of the fault impact is controllable, and QoS isolation is implemented. By limiting bandwidth, the priority of the data synchronization channel is ensured to be higher than that of the program synchronization channel.
[0037] Furthermore, the edge computing node may also include a local change queue for caching package status changes and data changes, respectively. The change queue may contain independent program status reporting queues and data change upload queues. The program status reporting queue can be used to store package running status, loading status, and exception information, and is uploaded via a program synchronization channel. The data change upload queue can be used to store INSERT / UPDATE / DELETE operations on business data, and is uploaded via a data synchronization channel.
[0038] The dual-channel isolation and synchronization architecture enables complete separation of programs and data. Programs can be hot-updated independently without affecting business data, and data can be synchronized independently without depending on program version. Program synchronization failure does not affect data synchronization, and data synchronization failure does not affect program operation.
[0039] Based on the above scheme, optionally, the cloud includes a cloud package repository and a cloud database. After receiving the business package and business data through the cloud, the process includes: registering the business package to the cloud package repository and storing the business data in the cloud database.
[0040] Specifically, a cloud-based application package repository can be a centralized application storage repository deployed in the cloud, used to store business application packages. A cloud-based database can be a centralized database deployed in the cloud, used to store business master data.
[0041] Specifically, a cloud-based package repository and a cloud-based database can be established on the cloud. Business packages can be registered in the cloud-based package repository, and business data can be stored in the cloud-based database. The package version and the data version adopt an independent version number system.
[0042] S120. In response to the edge computing node receiving a service request, the operating mode of the edge computing node is determined through the state-aware switching engine, and the operating mode is sent to the serverless execution engine.
[0043] The service request can be a service processing request initiated to the edge computing node. The operating mode can be a working state mode determined based on the network status of the edge computing node.
[0044] Optionally, the state-aware switching engine can continuously monitor the network connection status and maintain the current operating mode state machine. The state machine can include three states: online mode, offline mode, and switching mode. In response to the edge computing node receiving a service request, the operating mode of the edge computing node can be determined and the operating mode can be sent to the serverless execution engine.
[0045] The state-aware switching engine enables dynamic and seamless switching between online and offline modes. When the network state changes during business execution, there is no need to interrupt or restart, and the data access path is automatically adapted and switched.
[0046] S130. The serverless execution engine loads the business package from the edge package repository based on the business request, and determines the data access path according to the running mode, obtains the business data corresponding to the business request based on the data access path, and performs the processing operation of the business request based on the business package and the business data; wherein, the data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud.
[0047] The data access path can be understood as the target link for retrieving business data, used to clarify the source of data acquisition. The data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud.
[0048] Optionally, in response to the edge computing node receiving a service request, the serverless execution engine can load the service package from the edge package repository based on the service request, and determine the data access path based on the current operating mode information provided by the state-aware switching engine. Based on the data access path, the service data corresponding to the service request can be obtained. Furthermore, the processing operation of the service request can be performed based on the extracted service package and service data.
[0049] Based on the above scheme, optionally, such as Figure 8 As shown, the serverless execution engine includes a data access abstraction layer. The step of determining the data access path according to the running mode and obtaining the business data corresponding to the business request based on the data access path includes: providing a data access interface for the business program package through the data access abstraction layer, receiving the running mode sent by the state-aware switching engine, determining the data access path according to the running mode, and switching the routing configuration of the data access abstraction layer to the data access path to obtain the business data.
[0050] The data access abstraction layer can be used to shield data storage differences and provide a unified data access interface for upper-layer business application packages, namely, an application programming interface (API) that is independent of the operating mode.
[0051] Optionally, a data access abstraction layer can be used to provide a data access interface for business application packages. When a business application package accesses business data through this interface, it does not need to care about the current operating mode and can directly query the data through this interface. The data access abstraction layer receives the operating mode sent by the state-aware switching engine, determines the data access path according to the operating mode, and switches the routing configuration of the data access abstraction layer to the determined data access path to obtain business data.
[0052] Furthermore, when the operating mode is switched, the data access abstraction layer can temporarily store business requests to achieve request buffering, and can be executed directly in online mode, while recording data changes for subsequent synchronization in offline mode, thus achieving automatic adaptation according to the operating mode.
[0053] By setting up a data access abstraction layer, business application packages can access data without needing to know whether they are in online or offline mode. They can access data uniformly through the data access interface provided by the data access abstraction layer, reducing development complexity. Mode switching is completely transparent to business code. It achieves atomicity of switching, with each switching operation either succeeding completely or rolling back completely, eliminating data access anomalies caused by intermediate states. At the same time, switching is recoverable. If a switching fails, it will automatically roll back to the previous mode and record the reason for the switching failure for subsequent diagnosis.
[0054] Optionally, the serverless execution engine also includes a class loader management module. The class loader management module can create an independent class loader instance for each business application package through a hierarchical Java Virtual Machine (JVM) class loading architecture that supports class loading isolation, thereby achieving isolated execution of the application packages. The top layer of the architecture can adopt the JVM's native parent delegation class loading system, which includes the bootstrap class loader, platform class loader, and application class loader in a top-down order. The application class loader delegates downwards to the serverless engine's custom class loader as a unified parent loader, and then the custom class loader derives and generates independent and isolated business package class loader instances, creating a separate class loader for each business application package, thereby achieving loading isolation of class resources and environment differentiation between multiple business application packages.
[0055] Optionally, the serverless execution engine further includes a hot update module, used to replace and update the program package without downtime after receiving a new version package, and the package update process is independent of the data synchronization process, so that the business data synchronization operation of the data synchronization channel is not affected by any part of the hot update process; such as Figure 9 As shown, the specific hot update process is as follows: The program synchronization channel pushes the new version program package to the serverless engine. After the engine downloads and verifies that the program package is correct, it creates a brand new class loader. The new class loader preloads the class files corresponding to the new version program package. Subsequent newly connected business requests directly call the new version program package for execution. At the same time, it waits for all the existing unfinished business requests carried by the old class loader to be processed. After the old business requests are completed, the old class loader is unloaded. The business program package is upgraded without downtime without interrupting the overall service operation.
[0056] Optionally, when performing a package update operation, the program synchronization channel continues its update operation normally, and the business flow of the data synchronization channel remains unaffected. When performing a data synchronization operation, the data synchronization channel completes the data synchronization task between the cloud and edge computing nodes normally, and the program synchronization channel's synchronization process is unaffected by this operation. If a program synchronization failure occurs, the program synchronization channel will automatically execute a retry or version rollback strategy, while the data synchronization channel continues to operate normally and is unaffected by the failure. If the data synchronization channel experiences a synchronization failure, it will handle the fault by retrying or caching the data to be synchronized locally. The program synchronization channel will not experience any operational anomalies due to this failure. The two channels independently execute their business and exception fallback logic, achieving strong isolation between program distribution and data synchronization.
[0057] Optionally, a multi-level architecture supporting cloud-regional edge computing nodes-local edge computing nodes can be built to achieve layered data synchronization; data demand can be predicted based on business access patterns, and the corresponding data can be synchronized to edge computing nodes in advance before the business initiates access; can perform canary release of program packages, selecting some edge computing nodes to conduct pilot verification of new version program packages, and then performing batch push to all nodes after verification; can realize automatic degradation of edge computing nodes, automatically switching to a lightweight and simplified business version when the hardware resources of the edge computing node are insufficient to support the original business logic, avoiding service unavailability; can realize data compression synchronization, performing differential compression processing on the synchronized data to reduce network bandwidth consumption; and can provide a visual panel to intuitively present the real-time status of program and data synchronization of all edge computing nodes, facilitating operation and maintenance management and fault diagnosis.
[0058] Optionally, key performance constraints can be pre-built to quantify the operational capabilities of cloud-edge collaborative data processing. These performance constraints may include at least one of the following: the latency of incremental data synchronization from the cloud to the edge computing node under normal network conditions must be controlled within 5 seconds; the time taken for the business application package to complete its first loading on the edge computing node must not exceed 500 milliseconds; the entire process of hot update switching of the application package version must not exceed 2 seconds; the local message queue of the edge computing node must support caching at least 1 million business requests to support offline operation; the eventual consistency guarantee ratio of data between the cloud and the edge computing node must reach 99.99%; and the overall service availability, including offline operation time, must not be less than 99.9%.
[0059] By organically combining data synchronization with Serverless dynamic loading, consistent management of programs and data under the cloud-edge-device architecture is achieved, providing a reliable, efficient, and low-cost solution for distributed applications in unstable network scenarios.
[0060] The technical solution of this invention firstly receives business program packages and business data through the cloud and distributes them to edge computing nodes. Each edge computing node includes a state-aware switching engine, a serverless execution engine, an edge program package repository, and an edge database. Unified operation and maintenance management and batch distribution of business resources are performed through the cloud, avoiding management chaos caused by decentralized maintenance of multiple edge nodes. Next, in response to a business request received by the edge computing node, the state-aware switching engine determines the operating mode of the edge computing node and sends the operating mode to the serverless execution engine. The state-aware switching engine enables network and node condition awareness and operating mode decision-making, providing a decision basis for subsequent data access path switching and achieving layered decoupling between network state awareness and business execution. Finally, through... The serverless execution engine loads the business package from the edge package repository based on the business request, determines the data access path according to the operating mode, obtains the business data corresponding to the business request based on the data access path, and executes the processing operation of the business request based on the business package and the business data. The data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud. The serverless execution engine enables on-demand loading and elastic operation of business resources, while intelligently selecting the data access path according to the operating mode. This ensures low-latency response to business requests while balancing global data consistency and storage costs, achieving complete separation of program data and seamless switching of data access paths. This ensures uninterrupted business execution and greatly improves data processing efficiency and reliability.
[0061] Example 2 Figure 2 This is a flowchart illustrating a data processing method provided in Embodiment 2 of the present invention. It further describes the process of determining the operating mode of an edge computing node through a state-aware switching engine, and determining the data access path based on the operating mode. Detailed implementation methods can be found in the description of this embodiment. Technical features that are the same as or similar to those in the foregoing embodiments will not be repeated here. Figure 2 As shown, the method may specifically include: S210. Receive business application packages and business data through the cloud, and distribute the business application packages and business data to edge computing nodes; wherein, the edge computing node includes a state-aware switching engine, a serverless execution engine, an edge application package repository, and an edge database.
[0062] S220. In response to the edge computing node receiving a service request, obtain the dimensional scores of the network status corresponding to the edge computing node in multiple dimensions, and determine the network status score based on the dimensional scores in multiple dimensions.
[0063] In this context, network status can be understood as the operational status of the communication network between edge computing nodes and the cloud. Dimensional scores can be quantitative values determined for each network status dimension according to preset scoring rules, used to quantify network quality in a single dimension. The overall network status score can be a comprehensive quantitative score calculated by integrating the dimensional scores of all network dimensions, used to determine the communication quality between the cloud and edge computing nodes.
[0064] Optionally, a state-aware switching engine can be used to evaluate network connection quality in real time based on multiple network state dimensions such as heartbeat detection, latency measurement, packet loss rate, and bandwidth assessment. This determines the dimensional scores of the network state across these dimensions, and generates a network state score based on these scores. Specifically, heartbeat detection can be used to periodically send heartbeat packets to detect connection liveness; for example, a timeout exceeding 3 seconds can be set to indicate a link anomaly. Latency measurement can calculate the link's round-trip time (RTT), for example, a latency greater than 500 milliseconds can be set as a reference threshold. Packet loss rate can calculate the percentage of data packets lost during transmission; for example, a packet loss rate exceeding 10% can be set as a reference threshold. Bandwidth assessment can calculate the remaining available bandwidth of the link; for example, available bandwidth less than 100Kbps can be set as a reference threshold. This multi-dimensional quantitative evaluation enables a comprehensive and refined assessment of the network communication status between edge computing nodes and the cloud.
[0065] Specifically, when multiple dimensions include heartbeat detection, latency measurement, packet loss rate, and bandwidth assessment, the network status score can be calculated based on the following formula: NetworkHealthScore=w1×HeartbeatScore+w2×LatencyScore+w3×PacketLossScore+w4×BandwidthScore; Among them, NetworkHealthScore represents the network status score; HeartbeatScore represents the score for the heartbeat detection dimension, with 100 for a normal heartbeat and 0 for a timeout; LatencyScore represents the score for the latency measurement dimension, with higher scores for lower latency, up to a maximum of 100; PacketLossScore represents the score for the packet loss rate dimension, with higher scores for lower packet loss, up to a maximum of 100; BandwidthScore represents the score for the bandwidth assessment dimension, with higher scores for higher bandwidth, up to a maximum of 100; w1, w2, w3, w4: represent the weight coefficients for each network status dimension, for example, they can be set to 0.4, 0.3, 0.2, 0.1.
[0066] S230. Determine the operating mode based on the network status score, online threshold, and offline threshold, and send the operating mode to the serverless execution engine.
[0067] The online threshold can be a scoring standard used to determine whether an edge computing node can normally connect to the cloud for online mode. The offline threshold can be a scoring standard used to determine whether an edge computing node cannot normally connect to the cloud for offline mode.
[0068] Based on the above scheme, optionally, determining the operating mode according to the network status score, online threshold, and offline threshold includes: determining the operating mode as offline mode in response to the network status score being less than the offline threshold; determining the operating mode as online mode in response to the network status score being greater than the online threshold; and determining the operating mode as switching mode in response to the network status score changing from greater than the online threshold to less than the offline threshold or the network status score changing from less than the offline threshold to greater than the online threshold.
[0069] Offline mode can be understood as a working mode where the network status score of the edge computing node is below the lower threshold, communication with the cloud is interrupted or the communication quality is extremely poor, and it can only rely on local storage data to operate. Online mode can be understood as a working mode where the network status score of the edge computing node is above the upper threshold, communication with the cloud is normal and the link is stable, and it can access cloud storage data normally. Switching mode can be understood as a working state where the network status score of the edge computing node crosses the upper or lower threshold, and the operating mode is transitioning from online to offline or offline to online.
[0070] Optionally, the operating mode corresponding to the edge computing node can be determined based on the state transition of the operating mode according to the network status score, online threshold and offline threshold.
[0071] Specifically, such as Figure 5 As shown, in response to the network status score being less than the offline threshold, the operating mode is determined to be offline mode; in response to the network status score being greater than the online threshold, the operating mode is determined to be online mode; in response to the network status score changing from greater than the online threshold to less than the offline threshold or the network status score changing from less than the offline threshold to greater than the online threshold, the operating mode is determined to be a switching mode, which may include an online-to-offline switching mode (SWITCHING_TO_OFFLINE) and an offline-to-online switching mode (SWITCHING_TO_ONLINE).
[0072] S240. The serverless execution engine loads the business package from the edge package repository based on the business request, and determines the data access path according to the running mode, obtains the business data corresponding to the business request based on the data access path, and performs the processing operation of the business request based on the business package and the business data; wherein, the data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud.
[0073] Based on the above scheme, optionally, determining the data access path according to the operating mode includes: determining the data access path as an edge database in response to the operating mode being offline mode; determining the data access path as a cloud database in response to the operating mode being online mode; determining the data access path as a cloud database in response to the operating mode being in a switching mode and the network status score changing from greater than the upper threshold to less than the lower threshold; and determining the data access path as a cloud database in response to the operating mode being in a switching mode and the network status score changing from less than the lower threshold to greater than the upper threshold.
[0074] Specifically, in response to the operating mode being offline (i.e., network unavailable), the data access path is determined to be an edge database; in response to the operating mode being online (i.e., network normal), the data access path is determined to be a cloud database; in response to the operating mode being in a switching mode and the network status score changing from greater than the upper online threshold to less than the lower online threshold (i.e., in the process of switching from online to offline), the data access path is determined to switch from the cloud database to the edge database; in response to the operating mode being in a switching mode and the network status score changing from less than the lower online threshold to greater than the upper online threshold (i.e., in the process of switching from offline to online), the data access path is determined to switch from the edge database to the cloud database.
[0075] When the state-aware switching engine detects a change in network status, it can dynamically switch the data access path without interrupting the current business requests, smoothly transitioning subsequent data read and write requests to the new data source.
[0076] Optionally, based on the above scheme, the method further includes: in response to the operating mode being a switching mode and the data access path switching from a cloud database to an edge database or from an edge database to a cloud database, stopping the reception of new service requests, storing the service requests received before the switch to a switching buffer queue, switching to the data access path after determining that the data access path to be switched to is available, and processing the service requests in the switching buffer queue in sequence after the data access path switch is completed, and resuming the reception of service requests.
[0077] The switching cache queue can be understood as a cache queue that temporarily stores pending business requests during the data access path switching process of edge computing nodes, in order to avoid loss of business requests and ensure the orderly processing of business requests.
[0078] Optionally, request buffering, path switching, and state synchronization operations can be performed during mode switching to ensure that ongoing business requests are not interrupted during the switching process and that new requests are smoothly routed to the correct data source.
[0079] Specifically, such as Figure 6 As shown, assuming the offline threshold is 40, in response to the operating mode being in a switching state, and the data access path switching from the cloud database to the edge database, when the network status score is detected to be lower than the offline threshold, the state machine is notified to change the operating mode from online mode to offline mode in a switching state. Then, the switching executor initiates the offline mode switching operation. First, the request buffer mode can be enabled, and all subsequent new business requests are stored in the switching buffer queue through the data access abstraction layer and are no longer processed immediately. Next, it continuously queries and waits for all currently executing old business requests to be completed. After all old business requests have been completed, a hot switch of the data access path is performed, changing the data access data source from the cloud database to the edge database, and synchronously updating the routing configuration inside the data access abstraction layer. Finally, the backlogged business requests in the switching buffer queue are retrieved one by one, and the corresponding business requests are read and processed according to the edge local database. After all cached business requests have been processed, the switching executor informs the state machine to complete the switch, and the state machine finally locks the node to offline mode. The entire switching process is completely unaware of the front-end business requests, achieving transparent and uninterrupted switching on the business side.
[0080] Specifically, such as Figure 7As shown, assuming the online threshold is 70, in response to the operating mode being in a switching state, and the data access path switching from the edge database to the cloud database, when the network status score is detected to be higher than the online threshold, the state machine is notified to change the operating mode from offline mode to online mode in a switching state. Then, the switching executor initiates the online mode switching operation. First, the request buffer mode can be enabled, and all subsequent new business requests are stored in the switching buffer queue through the data access abstraction layer and are no longer processed immediately. Next, the data synchronization channel is triggered to upload the data change content generated locally by the edge computing node in the offline stage. After all the local incremental data has been uploaded to the cloud and synchronized, a hot switch of the data access path is performed, changing the data access data source from the edge database to the cloud database, and the routing configuration inside the data access abstraction layer is updated synchronously. Finally, the backlogged business requests in the switching buffer queue are retrieved one by one, and the cloud database is used to complete the data reading and business processing of the corresponding business requests. After all cached business requests have been processed, the switching executor informs the state machine to complete the switch, and the state machine finally locks the node to online mode, realizing a transparent and uninterrupted switching on the business side.
[0081] Optionally, data changes generated in offline mode can be cached in a local change queue. After switching to online mode, they can be incrementally transmitted back to the cloud through the data synchronization channel. The update status of the business application package can be reported independently through the application synchronization channel.
[0082] like Figure 10 As shown, when the operating mode is online, business request 1 first initiates a data query request through the data access abstraction layer. The data access abstraction layer directly connects to the cloud database to complete the query interaction. During this process, the state-aware switching engine detects a decline in network quality and switches the operating mode from ONLINE to SWITCHING_TO_OFFLINE. The request buffering mechanism is immediately activated, and the subsequent data query request initiated by business request 2 will be stored in the buffer queue. The original query task of the cloud database that was previously being executed is completed normally and returns the query results, which are then sent back to business request 1 through the data access abstraction layer. The entire process is uninterrupted. After all historical requests are completed, the access path is switched. The data access abstraction layer switches the data source to the edge local database, processes the buffered requests in the queue in sequence, retrieves data from the edge local database, and returns the results to business request 2. Finally, the state-aware switching engine updates the operating mode to OFFLINE. The entire switching process is completely transparent to the upper-layer business and will not cause business service interruption.
[0083] When an anomaly occurs during the switching process, a rollback operation can be automatically performed. Optionally, based on the above solution, the method further includes: in response to the switching time of the data access path exceeding a preset switching time, performing a rollback operation to restore the operating mode and data access path before the switch; in response to the connection failure of the data access path after the switch, performing a rollback operation to use the data access path before the switch; and in response to the number of cached requests in the switching buffer queue exceeding a preset threshold during the switching process, accepting the failure of some service requests and immediately completing the data access path switching.
[0084] The preset switching timeout can be a pre-configured maximum allowed duration threshold for switching data access paths, used to determine if the switching process has timed out. The rollback operation can be understood as a recovery operation that cancels the current switching process and restores the operating mode and data access path to their pre-switching state when an anomaly such as a timeout or connection failure occurs. The preset quantity threshold can be a pre-configured maximum number of business requests that the switching buffer queue can hold, used to determine if the queue cache is overloaded.
[0085] The technical solution of this invention firstly obtains the dimensional scores of the network status corresponding to the edge computing node in multiple dimensions, and determines the network status score based on the dimensional scores in multiple dimensions. By comprehensively considering the dimensional scores in multiple dimensions, the current network status of the edge computing node can be comprehensively and accurately characterized, avoiding the one-sidedness that may be caused by a single indicator evaluation, and providing objective and reliable data support for subsequent mode switching. Next, the operating mode is determined according to the network status score, the online threshold, and the offline threshold. By combining the network status score and the online and offline thresholds, the operating mode can be intelligently and smoothly determined and switched, effectively avoiding frequent switching caused by network status fluctuations at critical points, thereby ensuring the stability and continuity of service processing of the edge computing node.
[0086] Example 3 Figure 11 This is a schematic diagram of a data processing apparatus provided in Embodiment 3 of the present invention. This apparatus is used to execute the data processing method provided in any of the above embodiments. This apparatus and the data processing methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the data processing apparatus can be found in the embodiments of the above data processing methods. Figure 11 As shown, the device includes: a distribution module 310, an operating mode determination module 320, and a processing module 330.
[0087] The distribution module 310 is used to receive business application packages and business data through the cloud and distribute the business application packages and business data to the edge computing node; wherein the edge computing node includes a state-aware switching engine, a serverless execution engine, an edge application package repository, and an edge database; the operating mode determination module 320 is used to determine the operating mode of the edge computing node through the state-aware switching engine in response to the edge computing node receiving a business request, and send the operating mode to the serverless execution engine; the processing module 330 is used to load the business application package from the edge application package repository based on the business request through the serverless execution engine, determine a data access path according to the operating mode, obtain the business data corresponding to the business request based on the data access path, and perform the processing operation of the business request based on the business application package and the business data; wherein the data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud.
[0088] The technical solution of this invention firstly involves the distribution module 310 receiving business packages and business data from the cloud and then distributing them to edge computing nodes. Each edge computing node includes a state-aware switching engine, a serverless execution engine, an edge package repository, and an edge database. Unified operation and maintenance management and batch distribution of business resources are achieved through the cloud, avoiding management chaos caused by dispersed maintenance of multiple edge nodes. Next, in response to a business request received by the edge computing node, the operating mode determination module 320 determines the operating mode of the edge computing node through the state-aware switching engine and sends the operating mode to the serverless execution engine. The state-aware switching engine enables network and node condition awareness and operating mode decision-making, providing a basis for subsequent data access path switching and achieving layered decoupling between network state awareness and business execution. Finally, based on the serverless execution engine, the processing module 330 loads the business package from the edge package repository according to the business request, determines the data access path according to the operating mode, obtains the business data corresponding to the business request based on the data access path, and executes the processing operation of the business request based on the business package and the business data. The data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud. The serverless execution engine enables on-demand loading and elastic operation of business resources, while intelligently selecting the data access path according to the operating mode. This ensures low-latency response to business requests while balancing global data consistency and storage costs, achieving complete separation of program data and seamless switching of data access paths, ensuring uninterrupted business execution and greatly improving data processing efficiency and reliability.
[0089] Based on the above scheme, optionally, the distribution module 310 includes: a distribution submodule, used to distribute the business program package to the edge program package repository of the edge computing node based on the program synchronization channel, and to distribute the business data to the edge database of the edge computing node based on the data synchronization channel.
[0090] Based on the above scheme, optionally, the operation mode determination module 320 includes: a network status score determination submodule, used to obtain the dimensional scores of the network status corresponding to the edge computing node in multiple dimensions, and determine the network status score based on the dimensional scores in multiple dimensions; and an operation mode determination submodule, used to determine the operation mode according to the network status score, the online threshold, and the offline threshold.
[0091] Based on the above scheme, optionally, the operating mode determination submodule includes: a first mode determination unit, used to determine the operating mode as offline mode in response to the network status score being less than the offline threshold; a second mode determination unit, used to determine the operating mode as online mode in response to the network status score being greater than the online threshold; and a third mode determination unit, used to determine the operating mode as switching mode in response to the network status score changing from greater than the online threshold to less than the offline threshold or the network status score changing from less than the offline threshold to greater than the online threshold.
[0092] Based on the above scheme, optionally, the processing module 330 includes: a first path determination submodule, used to determine the data access path as an edge database in response to the operating mode being offline mode; a second path determination submodule, used to determine the data access path as a cloud database in response to the operating mode being online mode; a third path determination submodule, used to determine the data access path to switch from a cloud database to an edge database in response to the operating mode being switching mode and the network status score changing from greater than the upper threshold to less than the lower threshold; and a fourth path determination submodule, used to determine the data access path to switch from an edge database to a cloud database in response to the operating mode being switching mode and the network status score changing from less than the lower threshold to greater than the upper threshold.
[0093] Optionally, based on the above solution, the device further includes: a service request caching module, configured to, in response to the operating mode being a switching mode and the data access path switching from a cloud database to an edge database or from an edge database to a cloud database, stop receiving new service requests and store the service requests received before the switch to a switching buffer queue; after determining that the data access path to be switched to is available, switch to that data access path; and after the data access path switch is completed, process the service requests in the switching buffer queue in sequence and resume receiving service requests.
[0094] Based on the above scheme, optionally, the device further includes: a first rollback module, used to perform a rollback operation to restore the operating mode and the data access path before the switch when the switching time of the data access path exceeds a preset switching time; a second rollback module, used to perform a rollback operation to use the data access path before the switch when the connection of the data access path after the switch fails; and a threshold switching module, used to immediately complete the data access path switch when the number of cached requests in the switching buffer queue exceeds a preset threshold during the switching process, and can accept the failure of some service requests.
[0095] Based on the above scheme, optionally, the serverless execution engine includes a data access abstraction layer, and the processing module 330 includes: a routing configuration submodule, used to provide a data access interface for the business application package through the data access abstraction layer, receive the running mode sent by the state-aware switching engine, determine the data access path according to the running mode, and switch the routing configuration of the data access abstraction layer to the data access path to obtain business data.
[0096] Based on the above solution, optionally, the cloud includes a cloud package repository and a cloud database, and the device further includes: a cloud storage module, used to register the business package to the cloud package repository and store the business data in the cloud database after receiving the business package and business data through the cloud.
[0097] The data processing apparatus provided in the embodiments of the present invention can execute the data processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0098] Example 4 Figure 12A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0099] like Figure 12 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0100] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0101] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as data processing methods.
[0102] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0103] In some embodiments, the data processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the data processing method by any other suitable means (e.g., by means of firmware).
[0104] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0105] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0106] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0107] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0108] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0109] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0110] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0111] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A data processing method, characterized in that, include: The system receives business application packages and business data from the cloud and distributes them to edge computing nodes. The edge computing nodes include a state-aware switching engine, a serverless execution engine, an edge application package repository, and an edge database. In response to the edge computing node receiving a service request, the state-aware switching engine determines the operating mode of the edge computing node and sends the operating mode to the serverless execution engine. The serverless execution engine loads the business package from the edge package repository based on the business request, determines the data access path according to the operating mode, obtains the business data corresponding to the business request based on the data access path, and performs the processing operation of the business request based on the business package and the business data; wherein, the data access path is used to access the edge database located on the edge computing node or the cloud database located in the cloud.
2. The data processing method according to claim 1, characterized in that, The step of sending the business application package and the business data to the edge computing node includes: The service application package is distributed to the edge application package repository of the edge computing node based on the application synchronization channel, and the service data is distributed to the edge database of the edge computing node based on the data synchronization channel.
3. The data processing method according to claim 1, characterized in that, The step of determining the operating mode of the edge computing node through the state-aware switching engine includes: Obtain the dimensional scores of the network status corresponding to the edge computing node in multiple dimensions, and determine the network status score based on the dimensional scores in multiple dimensions; The operating mode is determined based on the network status score, online threshold, and offline threshold.
4. The data processing method according to claim 3, characterized in that, The step of determining the operating mode based on the network status score, online threshold, and offline threshold includes: If the network status score is less than the offline threshold, the operating mode is determined to be offline mode. If the network status score is greater than the online threshold, the operating mode is determined to be online mode; In response to the network status score changing from greater than the upper threshold to less than the lower threshold, or the network status score changing from less than the lower threshold to greater than the upper threshold, the operating mode is determined to be a switching mode.
5. The data processing method according to claim 4, characterized in that, Determining the data access path based on the operating mode includes: In response to the operating mode being offline, the data access path is determined to be an edge database; In response to the operating mode being online, the data access path is determined to be a cloud database; In response to the operating mode being switched to a switching mode and the network status score changing from greater than the upper threshold to less than the lower threshold, it is determined that the data access path is switched from the cloud database to the edge database; In response to the operating mode being switched to a switching mode and the network status score changing from less than the offline threshold to greater than the online threshold, it is determined that the data access path is switched from the edge database to the cloud database.
6. The data processing method according to claim 5, characterized in that, The method further includes: In response to the operating mode being switched, and the data access path being switched from the cloud database to the edge database or from the edge database to the cloud database, the receiving of new service requests is stopped, and the service requests received before the switch are stored in the switch buffer queue. After determining that the data access path to be switched to is available, the system switches to that data access path. After the data access path switch is completed, the service requests in the switch buffer queue are processed in sequence, and the receiving of service requests is resumed.
7. The data processing method according to claim 4, characterized in that, The method further includes: If the switching time of the data access path exceeds the preset switching time, a rollback operation is performed to restore the operating mode and the data access path before the switch. If the data access path after the switch fails to connect, a rollback operation is performed to use the data access path before the switch. If the number of cached requests in the switching buffer queue exceeds a preset threshold during the switching process, and some service requests fail, the data access path switching can be completed immediately.
8. The data processing method according to claim 1, characterized in that, The serverless execution engine includes a data access abstraction layer. The step of determining the data access path based on the operating mode and obtaining the business data corresponding to the business request based on the data access path includes: The data access abstraction layer provides a data access interface for the business application package, receives the operating mode sent by the state-aware switching engine, determines the data access path according to the operating mode, and switches the routing configuration of the data access abstraction layer to the data access path to obtain business data.
9. The data processing method according to claim 1, characterized in that, The cloud includes a cloud package repository and a cloud database. After receiving the business package and business data through the cloud, the process includes: The business application package is registered to the cloud application package repository, and the business application data is stored in the cloud database.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the data processing method as described in any one of claims 1-9.