CN113556387A - Edge gateway control method, system, device, electronic equipment and storage medium - Google Patents

Edge gateway control method, system, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113556387A
CN113556387A CN202110758546.3A CN202110758546A CN113556387A CN 113556387 A CN113556387 A CN 113556387A CN 202110758546 A CN202110758546 A CN 202110758546A CN 113556387 A CN113556387 A CN 113556387A
Authority
CN
China
Prior art keywords
edge gateway
instruction
gateway control
control instruction
scheduler
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110758546.3A
Other languages
Chinese (zh)
Inventor
王晓晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110758546.3A priority Critical patent/CN113556387A/en
Publication of CN113556387A publication Critical patent/CN113556387A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/10Architectures or entities
    • H04L65/102Gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application discloses an edge gateway control method, a system, a device, electronic equipment and a storage medium, which are applied to an edge gateway control system, wherein the system comprises an edge gateway controller, a scheduler and at least two actuators; the method comprises the following steps: the edge gateway controller analyzes the service instruction to obtain an instruction set containing at least one edge gateway control instruction; the scheduler acquires an instruction set and distributes edge gateway control instructions contained in the instruction set to at least two actuators; the at least two actuators acquire and execute the edge gateway control instruction to obtain an execution result instruction, and forward the obtained execution result instruction to the corresponding edge gateway through the edge gateway controller so as to control the edge gateway based on the execution result instruction, wherein one edge gateway control instruction is distributed to one actuator. The technical scheme of the embodiment of the application can improve the processing speed and the throughput of the control instruction of the edge gateway.

Description

Edge gateway control method, system, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, a system, an apparatus, an electronic device, and a storage medium for controlling an edge gateway.
Background
The edge gateway is a gateway deployed at the edge of a network, and is connected with a physical world and a digital world through functions of network connection, protocol conversion and the like, so that light connection management, real-time data analysis and application management functions are provided. In the related art, an edge gateway controller generally controls an edge gateway based on an edge gateway control instruction, but due to the performance limitation of the edge gateway controller, the processing speed of the edge gateway control instruction is slow, and the throughput is low.
Disclosure of Invention
In order to solve the foregoing technical problem, embodiments of the present application provide a method, a system, an apparatus, an electronic device, and a storage medium for controlling an edge gateway.
According to an aspect of the embodiments of the present application, there is provided an edge gateway control method applied to an edge gateway control system, where the system includes an edge gateway controller, a scheduler, and at least two actuators; the method is performed by the scheduler, the method comprising:
acquiring an instruction set from the edge gateway controller; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing the edge gateway controller based on a service instruction from a service control server;
distributing the edge gateway control instruction contained in the instruction set to the at least two actuators, so that each actuator executes the acquired edge gateway control instruction, forwarding the acquired execution result instruction to a corresponding edge gateway through the edge gateway controller, and controlling the edge gateway based on the execution result instruction; wherein, an edge gateway control instruction is distributed to an executor.
According to an aspect of the embodiments of the present application, there is provided an edge gateway control method applied to an edge gateway control system, where the system includes an edge gateway controller, a scheduler, and at least two actuators; the method is performed by the at least two actuators, respectively, the method comprising:
acquiring an edge gateway control instruction contained in an instruction set distributed by the scheduler; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing the edge gateway controller based on a service instruction from a service control server; wherein, an edge gateway control instruction is distributed to an actuator;
executing the obtained edge gateway control instruction to obtain an execution result instruction;
and sending the execution result instruction to the edge gateway controller so that the edge gateway controller forwards the execution result instruction to a corresponding edge gateway and controls the edge gateway based on the execution result instruction.
According to an aspect of the embodiments of the present application, there is provided an edge gateway control system, including an edge gateway controller, a scheduler, and at least two executors, wherein:
the edge gateway controller acquires a service instruction from a service control server, and analyzes the acquired service instruction to obtain an instruction set comprising at least one edge gateway control instruction;
the scheduler acquires an instruction set from the edge gateway controller and distributes edge gateway control instructions contained in the instruction set to the at least two executors; wherein, an edge gateway control instruction is distributed to an actuator;
the at least two executors respectively obtain the edge gateway control instruction distributed by the scheduler, execute the obtained edge gateway control instruction to obtain an execution result instruction, and send the execution result instruction to the edge gateway controller, so that the edge gateway controller forwards the execution result instruction to a corresponding edge gateway, and the edge gateway is controlled based on the execution result instruction.
According to an aspect of the embodiments of the present application, there is provided an edge gateway control apparatus, which is applied to an edge gateway control system, where the system includes an edge gateway controller, a scheduler, and at least two executors; the apparatus is configured in the scheduler, the apparatus comprising:
a set acquisition module configured to acquire a set of instructions from the edge gateway controller; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing the edge gateway controller based on a service instruction from a service control server;
the scheduling module is configured to distribute the edge gateway control instructions contained in the instruction set to the at least two actuators, so that each actuator executes the obtained edge gateway control instructions to obtain execution result instructions, and forwards the execution result instructions to corresponding edge gateways through the edge gateway controllers, and the edge gateways are controlled based on the execution result instructions; wherein, an edge gateway control instruction is distributed to an executor.
According to an aspect of the embodiments of the present application, there is provided an edge gateway control apparatus, which is applied to an edge gateway control system, where the system includes an edge gateway controller, a scheduler, and at least two executors; the device is respectively configured in the at least two actuators, and comprises:
the instruction acquisition module is configured to acquire an edge gateway control instruction in an instruction set distributed by the scheduler; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing a service instruction from a service control server by the edge gateway controller; wherein, an edge gateway control instruction is distributed to an actuator;
the execution module is configured to execute the obtained edge gateway control instruction to obtain an execution result instruction;
and the control module is configured to send the execution result instruction to the edge gateway controller, so that the edge gateway controller forwards the execution result instruction to a corresponding edge gateway, and the edge gateway is controlled based on the execution result instruction.
According to an aspect of an embodiment of the present application, there is provided an electronic device including:
a memory storing computer readable instructions;
and the processor reads the computer readable instructions stored in the memory to execute the method on the scheduler side or execute the method on the executor side.
According to an aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor of a computer, cause the computer to execute the above-described scheduler-side method or cause the computer to execute the above-described executor-side method.
In the technical scheme provided by the embodiment of the application, on one hand, an edge gateway controller in an edge gateway control system analyzes an edge gateway control instruction from a service instruction, and an actuator executes the edge gateway control instruction to control an edge gateway, so that the edge gateway controller and the edge gateway control instruction are decoupled, the processing speed and the throughput of the edge gateway control instruction are improved, the system has the capability of horizontally expanding the actuator, and the instruction throughput performance of the system is improved; on the other hand, by deploying at least two executors in the system, each executor can execute the edge gateway control instruction, and the processing speed and the throughput of the edge gateway control instruction and the instruction throughput performance of the system are further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a schematic illustration of an implementation environment shown in an exemplary embodiment of the present application;
FIG. 2 is a schematic diagram of an implementation environment incorporating message queuing techniques shown in an exemplary embodiment of the present application;
fig. 3 is a flow chart illustrating an edge gateway control method according to an exemplary embodiment of the present application;
FIG. 4 is a flow chart of step S120 in the embodiment shown in FIG. 3 in an exemplary embodiment;
fig. 5 is a flow chart illustrating an edge gateway control method according to an exemplary embodiment of the present application;
FIG. 6 is an interaction flow diagram in an exemplary embodiment based on the application scenario shown in FIG. 2;
fig. 7 is a block diagram of an edge gateway control apparatus shown in an exemplary embodiment of the present application;
fig. 8 is a block diagram of an edge gateway control apparatus shown in an exemplary embodiment of the present application;
FIG. 9 is a schematic diagram of an electronic device shown in an exemplary embodiment of the present application;
FIG. 10 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should also be noted that: reference to "a plurality" in this application means two or more. "and/or" describe the association relationship of the associated objects, meaning that there may be three relationships, e.g., A and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Before the technical solutions of the embodiments of the present application are described, terms and expressions referred to in the embodiments of the present application are explained, and the terms and expressions referred to in the embodiments of the present application are applied to the following explanations.
Cloud Technology (Cloud Technology): the management method is a management technology for unifying series resources such as hardware, software, network and the like in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data.
Cloud Computing (Cloud Computing): the method is a computing mode, and distributes computing tasks on a resource pool formed by a large number of computers, so that various application systems can acquire computing power, storage space and information services according to needs. The network that provides the resources is referred to as the "cloud". Resources in the "cloud" appear to the user as being infinitely expandable and available at any time, available on demand, expandable at any time, and paid for on-demand.
As a basic capability provider of cloud computing, a cloud computing resource pool (called as an ifas (Infrastructure as a Service) platform for short is established, and multiple types of virtual resources are deployed in the resource pool and are selectively used by external clients.
According to the logic function division, a PaaS (Platform as a Service) layer can be deployed on an IaaS (Infrastructure as a Service) layer, a SaaS (Software as a Service) layer is deployed on the PaaS layer, and the SaaS can be directly deployed on the IaaS. PaaS is a platform on which software runs, such as a database, a web container, etc. SaaS is a variety of business software, such as web portal, sms, and mass texting. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
In the related art, an edge gateway controller generally executes an edge gateway control instruction to control an edge gateway, and due to the performance limitation of the edge gateway controller, the processing speed of the edge gateway control instruction is slow and the throughput is low. Based on this, the embodiment of the present application provides a method and an apparatus for controlling an edge gateway, which can improve the processing speed and throughput of an edge gateway control instruction.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an implementation environment according to an exemplary embodiment of the present application. The implementation environment comprises a service control server 10, an edge gateway 20 and an edge gateway control system comprising an edge gateway controller 30, a scheduler 40 and at least two enforcers 50.
It should be noted that the service control server 10 is a user-oriented server, and is configured to provide a platform participating in the control of the edge gateway 20 for a user, where the user may perform a service operation based on the platform provided by the service control server 10, and the service control server 10 generates a service instruction for controlling the edge gateway 20 based on the service operation of the user. The platform may be a World Wide Web (World Wide Web) Web page or the like. The service control server 10 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.
The edge gateway controller 30 is used for controlling the edge gateway 20, for example, maintaining a long link of the edge gateway and managing access rights of the edge gateway. The edge gateway controller 30 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, middleware service, a domain name service, a security service, a CDN, a big data and artificial intelligence platform, and the like.
The scheduler 40 is deployed on a network node, which may be a physical machine or a virtual machine.
The executor 50 is deployed on a network node, which may be a physical machine or a virtual machine. At least two enforcers 50 may be deployed on the same network node or on different network nodes.
The scheduler 40 and the executor 50 may be deployed on the same network node or may be deployed on different network nodes.
In an embodiment of the present application, a user may perform a service operation on a platform provided by the service control server 10, the service control server 10 generates a service instruction based on the service operation of the user and sends the generated service instruction to the edge gateway controller 30, and the edge gateway controller 30 parses the service instruction to obtain an instruction set including at least one edge gateway control instruction; the scheduler 40 acquires an instruction set from the edge gateway controller 30 and distributes an edge gateway control instruction contained in the instruction set to the at least two executors 50, the at least two executors 50 acquire the edge gateway control instruction sent by the scheduler 40 and execute the acquired edge gateway control instruction to obtain an execution result instruction, and the execution result instruction is forwarded to the corresponding edge gateway 20 through the edge gateway controller 30 to control the edge gateway 20 based on the execution result instruction. Wherein, an edge gateway control instruction is distributed to an executor.
On one hand, in the edge gateway control system, an edge gateway controller analyzes an edge gateway control instruction from a service instruction, and an actuator executes the edge gateway control instruction to control an edge gateway, so that the edge gateway controller and the edge gateway control instruction are decoupled, the processing speed and the throughput of the edge gateway control instruction are improved, the edge gateway controller for analyzing the service instruction and the actuator for executing the edge gateway control instruction can be respectively researched and developed, the research and development modularization and research and development engineering performance are improved, the system has the capability of horizontally expanding the actuator, and the instruction throughput performance of the system is improved; on the other hand, by deploying at least two executors in the system, each executor can execute the edge gateway control instruction, and the processing speed and the throughput of the edge gateway control instruction and the instruction throughput performance of the system are further improved.
In another exemplary embodiment, the edge gateway controller 30 may include a first access module 31, a service instruction parsing module 32, and a second access module 33.
The first access module 31 is configured to provide an interface for performing service interaction with the service control server 10, and manage a link with the service control server 10. The interface may be built based on Http (HyperText Transfer Protocol), TRPC (Transaction Remote Procedure Call), and the like. The service instruction sent by the service control server 10 can be received through the interface provided by the first access module 31.
The service instruction parsing module 32 is configured to obtain a service instruction from the first access module 31, parse the obtained service instruction to obtain an instruction set including at least one edge gateway control instruction, and send the instruction set to the scheduler 40.
The second access module 33 is used for providing an interface for interacting with the edge gateway 20, maintaining a long link with the edge gateway 20, managing access rights of the edge gateway 20, and the like. The link protocol of the second access module 33 and the edge gateway 20 includes, but is not limited to, GRPC (Google Remote Procedure Call), MQTT (Message queue Telemetry Transport), WebSocket, and the like. It should be noted that GRPC is a high-performance open source software framework based on HTTP 2.0 transport layer protocol bearer issued by Google (Google), and provides a method for configuring and hosting network devices, which supports multiple programming languages; WebSocket is a Protocol for full duplex communication over a single TCP (Transmission Control Protocol) connection.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating an implementation environment of the technique of combining message queues according to an exemplary embodiment of the present application. In an embodiment of the present application, the scheduler 40 obtains an instruction set from the edge gateway controller 30, and stores the obtained instruction set in the database 60, the scheduler 40 obtains an edge gateway control instruction contained in the instruction set from the database 60, and sends the obtained edge gateway control instruction to the message queue 70, and the at least two executors 50 obtain the edge gateway control instruction from the message queue 70. Thereby decoupling the scheduler 40 and the executor 50 and increasing the processing speed of the edge gateway control instruction.
The network nodes corresponding to the database 60, and the network nodes corresponding to the executor 50 or the scheduler 40 may be the same or different; the network nodes corresponding to the message queue 70 may be the same as or different from the network nodes corresponding to the executor 50 or the scheduler 40.
In another exemplary embodiment, the database 60 further stores metadata of each edge gateway control instruction in the instruction set, the scheduler 40 may obtain the edge gateway control instruction and the metadata of the edge gateway control instruction contained in the instruction set from the database 60, send the obtained edge gateway control instruction and the metadata thereof to the message queue 70, and the executor 50 obtains the edge gateway control instruction and the metadata thereof from the message queue 70, and execute the edge gateway control instruction based on the metadata of the edge gateway control instruction.
In fig. 1 and 2, the number of the traffic control servers 10, the edge gateways 20, the edge gateway controllers 30, and the schedulers 40 is merely exemplary. There may be any number of traffic control servers 10, edge gateways 20, edge gateway controllers 30, and schedulers 40, as practical.
Fig. 3 is a flow chart illustrating a method of edge gateway control according to an example embodiment. The method may be applied to the implementation environment shown in fig. 1 and specifically executed by the scheduler 40 in the edge gateway control system, which includes the edge gateway controller 30, the scheduler 40 and at least two executors 50 in the embodiment environment shown in fig. 1. The at least two actuators 50 may correspond to different network nodes (i.e., only one actuator may be deployed on one network node), or some of the at least two actuators may correspond to the same network node, some of the at least two actuators may correspond to different network nodes (i.e., one or more actuators may be deployed on one network node), or the at least two actuators 50 may correspond to the same network node. The network node with the executor deployed can be a virtual machine or a physical machine.
As shown in fig. 3, in an exemplary embodiment, the edge gateway control method may include steps S110 to S120, which are described in detail as follows:
step S110, an instruction set from the edge gateway controller is obtained.
The instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing the edge gateway controller based on the service instruction from the service control server.
It should be noted that the database is used to store the instruction set, and the service instruction is used to control the edge gateway. The service control server is a user-oriented server and is used for providing a platform participating in edge gateway control for a user, the user can perform service operation on the platform if the user needs to control the edge gateway, the service control server generates a service instruction for controlling the edge gateway based on the service operation of the user and sends the generated service instruction to the edge gateway controller. The edge gateway control server acquires a service instruction from the service control server, analyzes the acquired service instruction to obtain at least one edge gateway control instruction, and uses the obtained at least one edge gateway control instruction as an instruction set. The scheduler obtains a set of instructions from the edge gateway controller.
The specific way for the scheduler to acquire the information from the edge gateway controller can be determined according to actual conditions. For example, in an exemplary embodiment, the edge gateway controller may send the instruction set to the scheduler after obtaining the instruction set, and the scheduler receives the instruction set sent by the edge gateway controller to obtain the instruction set from the edge gateway controller. In another exemplary embodiment, the scheduler may periodically or in real time access the edge gateway controller to retrieve the instruction set from the edge gateway controller.
Step S120, distributing the edge gateway control instruction contained in the instruction set to at least two actuators, so that each actuator executes the obtained edge gateway control instruction, and forwards the obtained execution result instruction to the corresponding edge gateway through the edge gateway controller, and controls the edge gateway based on the execution result instruction.
After obtaining the instruction set from the edge gateway controller, the scheduler distributes the edge gateway control instructions contained in the instruction set to at least two actuators in the edge gateway control system, each actuator executes the obtained edge gateway control instructions, and forwards the obtained execution result instructions to the corresponding edge gateways through the edge gateway controller, and the edge gateways are controlled based on the execution result instructions.
It should be noted that, in order to avoid repeated execution, an edge gateway control instruction may be distributed to an executor.
In the technical scheme provided by the embodiment of the application, on one hand, an edge gateway controller in an edge gateway control system analyzes an edge gateway control instruction from a service instruction, and an actuator executes the edge gateway control instruction to control an edge gateway, so that the edge gateway controller and the edge gateway control instruction are decoupled, the processing speed and the throughput of the edge gateway control instruction are improved, the system has the capability of horizontally expanding the actuator, and the instruction throughput performance of the system is improved; on the other hand, by deploying at least two executors in the system, each executor can execute the edge gateway control instruction, and the processing speed and the throughput of the edge gateway control instruction and the instruction throughput performance of the system are further improved.
Referring to fig. 4, fig. 4 is a flowchart of step S120 in the embodiment shown in fig. 3 in an exemplary embodiment. As shown in fig. 4, the process of distributing the edge gateway control command included in the command set to at least two executors may include steps S121 to S122, which are described in detail as follows:
step S121, store the instruction set to the database.
Wherein the database is used for storing the instruction set.
In order to realize the decoupling of the scheduler and the executor, after the scheduler acquires the instruction set from the edge gateway controller, the acquired instruction set is stored in a database.
Step S122, obtaining the edge gateway control instruction contained in the instruction set from the database, and sending the obtained edge gateway control instruction to the message queue, so that the at least two executors obtain the edge gateway control instruction from the message queue.
After the instruction set is stored in the database, the scheduler can acquire the edge gateway control instruction contained in the instruction set from the database and send the acquired edge gateway control instruction to the message queue, so that the at least two actuators acquire the edge gateway control instruction from the message queue, and the scheduler and the actuators are decoupled, thereby not only improving the processing speed of the edge gateway control instruction, but also facilitating the parallel expansion of the actuators.
In an exemplary embodiment, the instruction set further includes an execution sequence between the edge gateway control instructions, and the execution sequence between the edge gateway control instructions is obtained by the edge gateway controller through parsing based on the service instruction.
It should be noted that, usually, an association relationship exists between edge gateway control instructions included in one service instruction, and therefore, the edge gateway controller may analyze the service instruction, analyze at least one edge gateway control instruction and an association relationship between edge gateway control instructions from the service instruction, determine an execution sequence between the edge gateway control instructions based on the association relationship, and use the at least one edge gateway control instruction and the execution sequence that are analyzed as an instruction set, that is, the instruction set includes not only at least one edge gateway control instruction but also an execution sequence between the edge gateway control instructions. For example, if 3 edge gateway control instructions are parsed from the service instructions, which are a1-A3, and the execution sequence of a1-A3 is that a2 is executed after a1 is executed, and A3 is executed after a2 is executed, the execution sequence of a1-A3 and a1-A3 are included in the instruction set.
The process of acquiring the edge gateway control instruction contained in the instruction set from the database and sending the acquired edge gateway control instruction to the message queue under the condition that the instruction set further contains an execution sequence of the edge gateway control instruction may include steps S210 to S220, which are described in detail as follows:
step S210, accessing the database to obtain the instruction set stored in the database.
The scheduler may periodically access the database to obtain the instruction set stored in the database, or the scheduler may access the database in real time to obtain the instruction set stored in the database.
Step S220, sequentially obtaining edge gateway control instructions from the instruction set according to an execution sequence between the edge gateway control instructions contained in the instruction set, and sending the obtained edge gateway control instructions to a message queue.
After obtaining the instruction set from the database, the scheduler acquires the edge gateway control instruction with the most advanced execution sequence from the instruction set according to the execution sequence among the edge gateway control instructions contained in the instruction set, sends the acquired edge gateway control instruction to the message queue, acquires the edge gateway control instruction with the next execution sequence from the instruction set, and sends the acquired edge gateway control instruction to the message queue until all the edge gateway control instructions in the instruction set are sent completely, thereby ensuring that the edge gateway control instructions are executed in sequence.
In an exemplary embodiment, the database contains execution state information for the edge gateway control instructions in the instruction set. It should be noted that, the following execution states are included from the time the edge gateway control instruction is stored in the database to the time the edge gateway control instruction is executed by the executor: not sent to the message queue, sent to the message queue but not acquired by the executor, acquired by the executor but not executed, in execution, done. The execution state information is used to characterize the execution state of the edge gateway control instruction, such as whether to send to the message queue, whether to execute, whether to complete execution, and the like.
The process of sequentially acquiring edge gateway control instructions from the instruction set according to the execution sequence among the edge gateway control instructions contained in the instruction set and sending the acquired edge gateway control instructions to the message queue under the condition that the database contains the execution state information of the edge gateway control instructions in the instruction set may include steps S221 to S222, which are described in detail as follows:
step S221, a target edge gateway control instruction is determined from the instruction set according to the execution state information, and the execution state of the target edge gateway control instruction comprises the earliest execution sequence, is not executed and is not sent to the message queue.
In order to ensure that the edge gateway control instruction with the execution sequence before is executed firstly and the edge gateway control instruction with the execution sequence after is executed, the scheduler determines a target edge gateway control instruction from an instruction set stored in the database according to the execution state information contained in the database. Wherein, the execution state of the target edge gateway control instruction comprises the earliest execution sequence, is not executed and is not sent to the message queue. That is, the target edge gateway control instruction is the edge gateway control instruction with the earliest execution order among the edge gateway control instructions in the instruction set, which have not been executed and are not sent to the message queue.
For example, referring to table 1, the database stores a set of instructions B, the set of instructions B represents edge gateway control instructions B1-B5, and the database also stores the execution order and execution status of the edge gateway control instructions B1-B5. As can be seen from table 1, the edge gateway control commands that are not sent to the message queue and are not executed in the edge gateway control commands B1-B5 include edge gateway control command B4 and edge gateway control command B5, where B4 is executed earlier than B5, and therefore B4 is the target edge gateway control command.
Figure BDA0003148193070000121
TABLE 1
In step S222, if it is determined that the edge gateway control instruction whose execution sequence is located before the target edge gateway control instruction is in the execution complete state, the target edge gateway control instruction is sent to the message queue.
In order to ensure that the edge gateway control instruction with the execution sequence in front is executed first and the edge gateway control instruction with the execution sequence in back is executed, the scheduler further determines whether the edge gateway control instruction with the execution sequence in front of the target edge gateway control instruction is in the execution finished state after determining the target edge gateway control instruction, and if the edge gateway control instruction with the execution sequence in front of the target edge gateway control instruction is in the execution finished state, the target edge gateway control instruction is sent to the message queue, so that the edge gateway control instructions are executed according to the execution sequence, and the execution error is avoided. Taking the previous example, the edge gateway control commands B1-B3, whose execution order precedes the target edge gateway control command B4, are in an execution complete state, and therefore, B4 is sent to the message queue.
In order to reduce the resource occupancy rate and reduce the data processing amount, the scheduler may only determine whether the edge gateway control instruction whose execution sequence is one bit before the target edge gateway control instruction is in an execution complete state, and send the target edge gateway control instruction to the message queue if the edge gateway control instruction whose execution sequence is one bit before the target edge gateway control instruction is in the execution complete state. Or, the scheduler may determine whether all edge gateway control instructions whose execution sequence is before the target edge gateway control instruction are in an execution complete state, and send the target edge gateway control instruction to the message queue if all edge gateway control instructions whose execution sequence is before the target edge gateway control instruction are in the execution complete state.
It should be further mentioned that, in an exemplary embodiment, the method for controlling the edge gateway on the scheduler side may further include steps S130 to S140, which are described in detail as follows:
step S130, monitoring the operating states of at least two actuators.
In order to avoid the situation that the control command of the edge gateway is not executed due to the failure of the actuator, the scheduler monitors the working state of each actuator in the edge gateway control system.
Step S140, if it is determined that a first actuator of the at least two actuators fails according to the monitored working state, resending the edge gateway control instruction that is not executed in the first actuator to the actuator of the at least two actuators that does not fail.
If the scheduler monitors that a first actuator in the edge gateway control system fails, the edge gateway control instruction which is not executed and completed in the first actuator is sent to the actuator which does not fail in the edge gateway control system again, so that the actuator which does not fail can execute the edge gateway controller which is not executed and completed in the actuator which fails, and the edge gateway control instruction is guaranteed to be executed.
In an exemplary embodiment, if the scheduler determines that, according to the monitored working state, a first actuator of the at least two actuators does not execute an edge gateway control instruction obtained within a preset time period after obtaining the edge gateway control instruction, it is determined that the first actuator has a fault. It should be noted that the preset time period is a time period for determining whether an actuator fails, and may be flexibly set according to actual needs, for example, set to 1 second, 0.5 second, and the like, in one example, it is assumed that the preset time period is 2 seconds, and if a certain actuator does not execute and complete the edge gateway control instruction within 2 seconds after acquiring the edge gateway control instruction, it is determined that the actuator fails.
The scheduler may access the database, and determine whether the actuator has a fault based on the time that each edge gateway control instruction in the database is acquired by the actuator and the time that the execution is completed.
In an exemplary embodiment, if it is determined that a first actuator of the at least two actuators fails according to the monitored operating state under the condition that the scheduler distributes the edge gateway control instruction to the at least two actuators through the message queue, a process of resending the edge gateway control instruction that is not executed and completed in the first actuator to an actuator of the at least two actuators that does not fail may include: and if the first executor is monitored to have a fault, retransmitting the edge gateway control instruction which is not executed and completed in the first executor to the message queue. Therefore, other schedulers without faults can acquire the edge gateway control instruction which is not executed and completed in the first executor from the message queue, execute the acquired edge gateway control instruction and guarantee that the edge gateway control instruction is executed.
Fig. 5 is a flow chart illustrating a method of edge gateway control according to an example embodiment. The method may be applied to the implementation environment shown in fig. 1 and specifically executed by the executor 50 in the edge gateway control system, that is, each executor 50 may individually execute the method, and the edge gateway control system includes the edge gateway controller 30, the scheduler 40 and at least two executors 50 in the environment of the embodiment shown in fig. 1. The at least two actuators 50 may correspond to different network nodes (i.e., only one actuator may be deployed on one network node), or some of the at least two actuators may correspond to the same network node, some of the at least two actuators may correspond to different network nodes (i.e., one or more actuators may be deployed on one network node), or the at least two actuators 50 may correspond to the same network node. The network node with the executor deployed can be a virtual machine or a physical machine.
As shown in fig. 5, in an exemplary embodiment, the edge gateway control method may include steps S310 to S330, which are described in detail as follows:
step S310, the edge gateway control instruction contained in the instruction set distributed by the scheduler is obtained.
The instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing an edge gateway controller based on a service instruction from a service control server; an edge gateway control instruction is distributed to an executor.
It should be noted that the database is used to store the instruction set, and the service instruction is used to control the edge gateway. The service control server is a user-oriented server and is used for providing a platform participating in edge gateway control for a user, the user can perform service operation on the platform if the user needs to control the edge gateway, the service control server generates a service instruction for controlling the edge gateway based on the service operation of the user and sends the generated service instruction to the edge gateway controller. The edge gateway control server obtains a service instruction from the service control server, analyzes the obtained service instruction to obtain at least one edge gateway control instruction, and uses the obtained at least one edge gateway control instruction as an instruction set. The scheduler acquires an instruction set from the edge gateway controller and distributes edge gateway control instructions contained in the instruction set to at least two executors, wherein one edge gateway control instruction is distributed to one executor. And the executor acquires the edge gateway control instruction distributed by the scheduler.
Step S320, executing the obtained edge gateway control instruction to obtain an execution result instruction.
And the actuator executes the acquired edge gateway control instruction to obtain an execution result instruction.
And step S330, sending the execution result instruction to the edge gateway controller so that the edge gateway controller forwards the execution result instruction to the corresponding edge gateway and controls the edge gateway based on the execution result instruction.
The executor sends the execution result instruction to the edge gateway controller, and the edge gateway controller forwards the execution result instruction to the corresponding edge gateway, so that the edge gateway executes the execution result instruction, and the control of the edge gateway is realized. In this way, the executor does not need to establish a link with the edge gateway separately, thereby saving network resources.
In an exemplary embodiment, in a case that the instruction set is stored in the database by the scheduler, and the edge gateway control instruction contained in the instruction set is obtained from the database by the scheduler and sent to the message queue, step S310 in the embodiment shown in fig. 5 includes: the edge gateway control instruction from the scheduler is extracted from the message queue.
The executor may extract the edge gateway control instruction from the message queue at regular time, or the executor may extract the edge gateway control instruction from the message queue after the execution of one edge gateway control instruction is completed.
In another embodiment, under the condition that the database contains the execution state information of the edge gateway control instruction in the instruction set, after the edge gateway control instruction is completely executed, the executor may update the execution state information corresponding to the completely executed edge gateway control instruction in the database.
In another embodiment, after the edge gateway control instruction from the scheduler is extracted from the message queue, the executor may update the execution state information of the extracted edge gateway control instruction in the database, so that the execution state information in the database accurately reflects the execution state of each edge gateway control instruction, and avoids a situation where the scheduler repeatedly sends the edge gateway control instruction to the message queue.
Referring to FIG. 6, FIG. 6 is an interaction flow diagram in an exemplary embodiment based on the application scenario shown in FIG. 2. As shown in fig. 6, the method mainly includes the following steps:
step S401, the user performs a service operation on a platform provided by the service control server.
The service control server provides a platform for the user to perform service operation, and the user performs service operation on the platform to control the edge gateway.
In step S402, the service control server will generate a service instruction based on the service operation.
And after receiving the service operation of the user, the service control server generates a service instruction based on the service operation.
Step S403, the service control server sends the service instruction to the edge gateway controller.
Step S404, the edge gateway controller parses the service instruction to obtain an instruction set including at least one edge gateway control instruction.
After receiving the service command, the edge gateway controller analyzes at least one edge gateway control command from the service command to obtain a command set.
In step S405, the edge gateway controller sends the instruction set to the scheduler.
In step S406, the scheduler stores the instruction set in the database.
In step S407, the scheduler obtains the edge gateway control instruction included in the instruction set from the database.
In step S408, the scheduler sends the obtained edge gateway control instruction to the message queue.
Step S409, the executor acquires the edge gateway control instruction from the message queue.
In step S410, the executor executes the obtained edge gateway control instruction to obtain an execution result instruction.
In step S411, the executor sends an execution result instruction to the edge gateway controller.
In step S412, the edge gateway controller forwards the execution result command to the corresponding edge gateway.
And the edge gateway controller sends the execution result instruction to the corresponding edge gateway so as to control the edge gateway.
It should be noted that the detailed processes from step S401 to step S412 are all described in the foregoing embodiments, and therefore, the detailed description is not repeated herein.
In this embodiment, the edge gateway controller receives the service command through the service control server, and after parsing at least one edge gateway control command from the service command to obtain a command set, sending the instruction set to a scheduler, distributing the edge gateway control instruction in the instruction set to at least two executors in the system by the scheduler so as to enable the executors to execute the edge gateway control instruction, thereby realizing the decoupling of the execution of the edge gateway controller and the edge gateway control instruction, not only improving the processing speed and the throughput of the edge gateway control instruction, but also leading the edge gateway controller used for analyzing the service instruction and the executor used for executing the edge gateway control instruction to be respectively researched and developed, improving the research and development modularization and the research and development engineering performance, moreover, the system has the capability of horizontally expanding the actuator, and the instruction throughput performance of the system is improved; and the scheduler sends the edge gateway control instruction to the actuator through the message queue, so that the decoupling of the scheduler and the actuator is realized, and the processing speed and the throughput of the edge gateway control instruction are further improved.
An exemplary embodiment of the present application provides an edge gateway control system, including an edge gateway controller, a scheduler, and at least two executors, wherein:
the edge gateway controller obtains a service instruction from the service control server, and analyzes the obtained service instruction to obtain an instruction set containing at least one edge gateway control instruction.
The scheduler acquires an instruction set from the edge gateway controller and distributes edge gateway control instructions contained in the instruction set to at least two actuators; wherein, an edge gateway control instruction is distributed to an executor.
At least two actuators respectively obtain the edge gateway control instruction distributed by the scheduler, execute the obtained edge gateway control instruction to obtain an execution result instruction, and send the execution result instruction to the edge gateway controller, so that the edge gateway controller forwards the execution result instruction to the corresponding edge gateway, and the edge gateway is controlled based on the execution result instruction.
The at least two executors may correspond to the same network node or different network nodes.
Fig. 7 is a block diagram of an edge gateway control apparatus according to an exemplary embodiment of the present application. The device is applied to an edge gateway control system, and the system comprises an edge gateway controller, a scheduler and at least two executors. The apparatus is configured in a scheduler, the apparatus comprising:
a set acquisition module 510 configured to acquire a set of instructions from an edge gateway controller; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing an edge gateway controller based on a service instruction from a service control server; the scheduling module 520 is configured to distribute the edge gateway control instructions contained in the instruction set to at least two actuators, so that each actuator executes the obtained edge gateway control instructions to obtain execution result instructions, and forward the execution result instructions to corresponding edge gateways through the edge gateway controllers, and control the edge gateways based on the execution result instructions; wherein, an edge gateway control instruction is distributed to an executor.
In this embodiment, on one hand, in the edge gateway control system, the edge gateway controller parses an edge gateway control instruction from the service instruction, and the actuator executes the edge gateway control instruction to control the edge gateway, so as to implement the execution decoupling of the edge gateway controller and the edge gateway control instruction, thereby not only improving the processing speed and throughput of the edge gateway control instruction, but also enabling the edge gateway controller for parsing the service instruction and the actuator for executing the edge gateway control instruction to be capable of being separately developed, thereby improving the development modularization and development engineering performance, and enabling the system to have the capability of horizontally expanding the actuator, and improving the instruction throughput performance of the system; on the other hand, by deploying at least two executors in the system, each executor can execute the edge gateway control instruction, and the processing speed and the throughput of the edge gateway control instruction and the instruction throughput performance of the system are further improved.
In another exemplary embodiment, the scheduling module 520 includes:
an instruction storage module configured to store the set of instructions to a database.
And the instruction scheduling module is configured to acquire the edge gateway control instruction contained in the instruction set from the database and send the acquired edge gateway control instruction to the message queue so that the at least two actuators acquire the edge gateway control instruction from the message queue.
In another exemplary embodiment, the instruction set further contains an execution sequence between the edge gateway control instructions, and the execution sequence between the edge gateway control instructions is obtained by the edge gateway controller through analysis based on the service instruction; the instruction scheduling module comprises:
and the access module is configured to access the database to obtain the instruction set stored in the database.
And the instruction distribution module is configured to sequentially acquire the edge gateway control instructions from the instruction set according to the execution sequence among the edge gateway control instructions contained in the instruction set, and send the acquired edge gateway control instructions to the message queue.
In another exemplary embodiment, under the condition that the database contains the execution state information of the edge gateway control instruction in the instruction set, the instruction distribution module includes:
and the target determining module is configured to determine a target edge gateway control instruction from the instruction set according to the execution state information, wherein the execution state of the target edge gateway control instruction comprises the earliest execution sequence, the target edge gateway control instruction is not executed and the target edge gateway control instruction is not sent to the message queue.
And the instruction sending module is configured to send the target edge gateway control instruction to the message queue if the edge gateway control instruction of which the execution sequence is before the target edge gateway control instruction is determined to be in the execution finished state.
In another exemplary embodiment, the apparatus further comprises:
a monitoring module configured to monitor an operating state of at least two actuators.
And the fault processing module is configured to resend the edge gateway control instruction which is not executed and completed in the first actuator to the actuator which is not in fault in the at least two actuators if the fact that the first actuator in the at least two actuators is in fault is determined according to the monitored working state.
In another exemplary embodiment, the fault handling module includes:
and the fault processing submodule is configured to determine that a first actuator of the at least two actuators fails to execute the acquired edge gateway control instruction within a preset time period after the first actuator acquires the edge gateway control instruction according to the monitored working state.
Fig. 8 is a block diagram of an edge gateway control apparatus according to an exemplary embodiment of the present application. The device is applied to an edge gateway control system, and the system comprises an edge gateway controller, a scheduler and at least two executors. The apparatus is respectively configured to at least two actuators in the edge gateway control system (i.e. each actuator in the edge gateway control system is configured with the apparatus), and the apparatus includes:
an instruction obtaining module 610 configured to obtain an edge gateway control instruction in an instruction set distributed by a scheduler; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing a service instruction from the service control server by the edge gateway controller; wherein, an edge gateway control instruction is distributed to an actuator; an execution module 620, configured to execute the obtained edge gateway control instruction to obtain an execution result instruction; the control module 630 is configured to send the execution result instruction to the edge gateway controller, so that the edge gateway controller forwards the execution result instruction to the corresponding edge gateway, and controls the edge gateway based on the execution result instruction.
In another exemplary embodiment, the instruction fetch module 610 includes:
the instruction acquisition submodule is configured to extract an edge gateway control instruction from the scheduler from the message queue; the instruction set is stored to the database by the scheduler, and the edge gateway control instruction contained in the instruction set is acquired from the database by the scheduler and is sent to the message queue.
In another exemplary embodiment, on condition that the database contains the execution state information of the edge gateway control instruction in the instruction set, the apparatus further includes:
and the updating module is configured to update the execution state information corresponding to the executed edge gateway control instruction in the database after the edge gateway control instruction is executed.
It should be noted that the apparatus provided in the foregoing embodiment and the method provided in the foregoing embodiment belong to the same concept, and the specific manner in which each module and unit execute operations has been described in detail in the method embodiment, and is not described again here.
Embodiments of the present application also provide an electronic device, including a processor and a memory, where the memory has stored thereon computer readable instructions, which when executed by the processor, implement the aforementioned method on the scheduler side or the method on the executor side.
Fig. 9 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
It should be noted that the electronic device is only an example adapted to the application and should not be considered as providing any limitation to the scope of use of the application. The electronic device is also not to be construed as requiring reliance on, or necessity of, one or more components of the exemplary electronic device illustrated in fig. 9.
As shown in fig. 9, in an exemplary embodiment, the electronic device includes a processing component 801, a memory 802, a power component 803, a multimedia component 804, an audio component 805, a sensor component 807, and a communication component 808. The above components are not all necessary, and the electronic device may add other components or reduce some components according to its own functional requirements, which is not limited in this embodiment.
The processing component 801 generally controls overall operation of the electronic device, such as operations associated with display, data communication, and log data processing. The processing component 801 may include one or more processors 809 to execute instructions to perform all or a portion of the above-described operations. Further, the processing component 801 may include one or more modules that facilitate interaction between the processing component 801 and other components. For example, the processing component 801 may include a multimedia module to facilitate interaction between the multimedia component 804 and the processing component 801.
The memory 802 is configured to store various types of data to support operation at the electronic device, examples of which include instructions for any application or method operating on the electronic device. The memory 802 stores one or more modules configured to be executed by the one or more processors 809 to perform all or part of the steps of the methods described in the embodiments above.
The power supply component 803 provides power to the various components of the electronic device. The power components 803 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for an electronic device.
The multimedia component 804 includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a TP (touch panel) and an LCD (Liquid Crystal Display). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The audio component 805 is configured to output and/or input audio signals. For example, the audio component 805 includes a microphone configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. In some embodiments, the audio component 805 also includes a speaker for outputting audio signals.
The sensor assembly 807 includes one or more sensors for providing various aspects of status assessment for the electronic device. For example, the sensor assembly 807 may detect an open/closed state of the electronic device, and may also detect a temperature change of the electronic device.
The communication component 808 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device may access a Wireless network based on a communication standard, such as Wi-Fi (Wireless-Fidelity, Wireless network).
It will be appreciated that the configuration shown in fig. 9 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 9, or have different components than shown in fig. 9. Each of the components shown in fig. 9 may be implemented in hardware, software, or a combination thereof.
FIG. 10 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 1600 of the electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 10, computer system 1600 includes a Central Processing Unit (CPU)1601, which can perform various appropriate actions and processes, such as executing the methods in the above-described embodiments, according to a program stored in a Read-Only Memory (ROM) 1602 or a program loaded from a storage portion 1608 into a Random Access Memory (RAM) 1603. In the RAM 1603, various programs and data necessary for system operation are also stored. The CPU 1601, ROM 1602, and RAM 1603 are connected to each other via a bus 1604. An Input/Output (I/O) interface 1605 is also connected to the bus 1604.
The following components are connected to the I/O interface 1605: an input portion 1606 including a keyboard, a mouse, and the like; an output section 1607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage portion 1608 including a hard disk and the like; and a communication section 1609 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1609 performs communication processing via a network such as the internet. The driver 1610 is also connected to the I/O interface 1605 as needed. A removable medium 1611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1610 as necessary, so that a computer program read out therefrom is mounted in the storage portion 1608 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication portion 1609, and/or installed from the removable media 1611. When the computer program is executed by a Central Processing Unit (CPU)1601, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Yet another aspect of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the scheduler-side method, or the executor-side method as before. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist separately without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the methods provided in the various embodiments described above.
The above description is only a preferred exemplary embodiment of the present application, and is not intended to limit the embodiments of the present application, and those skilled in the art can easily make various changes and modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. The edge gateway control method is applied to an edge gateway control system, and the system comprises an edge gateway controller, a scheduler and at least two actuators; the method is performed by the scheduler, the method comprising:
acquiring an instruction set from the edge gateway controller; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing the edge gateway controller based on a service instruction from a service control server;
distributing the edge gateway control instruction contained in the instruction set to the at least two actuators, so that each actuator executes the acquired edge gateway control instruction, forwarding the acquired execution result instruction to a corresponding edge gateway through the edge gateway controller, and controlling the edge gateway based on the execution result instruction; wherein, an edge gateway control instruction is distributed to an executor.
2. The method of claim 1, wherein the method further comprises:
monitoring the working states of the at least two actuators;
and if the fact that the first actuator of the at least two actuators has a fault is determined according to the monitored working state, the edge gateway control instruction which is not executed and completed in the first actuator is sent to the actuator which does not have the fault in the at least two actuators again.
3. The method according to claim 2, wherein if the scheduler determines that a first actuator of the at least two actuators does not execute the acquired edge gateway control command within a preset time period after acquiring the edge gateway control command according to the monitored operating state, it determines that the first actuator has a failure.
4. The method of claim 1, wherein said distributing edge gateway control instructions contained in said instruction set to said at least two executors comprises:
storing the set of instructions to a database;
and acquiring the edge gateway control instruction contained in the instruction set from the database, and sending the acquired edge gateway control instruction to a message queue so that the at least two actuators acquire the edge gateway control instruction from the message queue.
5. The method of claim 4, wherein the instruction set further comprises an execution sequence between edge gateway control instructions, and the execution sequence between the edge gateway control instructions is obtained by the edge gateway controller through parsing based on the service instructions; the obtaining the edge gateway control instruction contained in the instruction set from the database and sending the obtained edge gateway control instruction to a message queue includes:
accessing the database to obtain an instruction set stored in the database;
and according to the execution sequence among the edge gateway control instructions contained in the instruction set, sequentially acquiring the edge gateway control instructions from the instruction set, and sending the acquired edge gateway control instructions to a message queue.
6. The method of claim 5, wherein the database contains execution state information for edge gateway control instructions in the instruction set; the method for sequentially acquiring the edge gateway control instructions from the instruction set according to the execution sequence among the edge gateway control instructions contained in the instruction set and sending the acquired edge gateway control instructions to the message queue includes:
determining a target edge gateway control instruction from the instruction set according to the execution state information, wherein the execution state of the target edge gateway control instruction comprises the earliest execution sequence, is not executed and is not sent to a message queue;
and if the edge gateway control instruction with the execution sequence before the target edge gateway control instruction is determined to be in the execution finished state, sending the target edge gateway control instruction to the message queue.
7. The edge gateway control method is applied to an edge gateway control system, and the system comprises an edge gateway controller, a scheduler and at least two actuators; the method is performed by the at least two actuators, respectively, the method comprising:
acquiring an edge gateway control instruction contained in an instruction set distributed by the scheduler; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing the edge gateway controller based on a service instruction from a service control server; wherein, an edge gateway control instruction is distributed to an actuator;
executing the obtained edge gateway control instruction to obtain an execution result instruction;
and sending the execution result instruction to the edge gateway controller so that the edge gateway controller forwards the execution result instruction to a corresponding edge gateway and controls the edge gateway based on the execution result instruction.
8. The method of claim 7, wherein obtaining the edge gateway control instructions contained in the set of instructions dispatched by the scheduler comprises:
extracting an edge gateway control instruction from the scheduler from a message queue; the instruction set is stored in a database by the scheduler, and the edge gateway control instruction contained in the instruction set is acquired from the database by the scheduler and is sent to the message queue.
9. The method of claim 8, wherein the database contains execution state information for edge gateway control instructions in the instruction set; the method further comprises the following steps:
and after the edge gateway control instruction is executed, updating the execution state information corresponding to the executed edge gateway control instruction in the database.
10. An edge gateway control system comprising an edge gateway controller, a scheduler and at least two actors, wherein:
the edge gateway controller acquires a service instruction from a service control server, and analyzes the acquired service instruction to obtain an instruction set comprising at least one edge gateway control instruction;
the scheduler acquires an instruction set from the edge gateway controller and distributes edge gateway control instructions contained in the instruction set to the at least two executors; wherein, an edge gateway control instruction is distributed to an actuator;
the at least two executors respectively obtain the edge gateway control instruction distributed by the scheduler, execute the obtained edge gateway control instruction to obtain an execution result instruction, and send the execution result instruction to the edge gateway controller, so that the edge gateway controller forwards the execution result instruction to a corresponding edge gateway, and the edge gateway is controlled based on the execution result instruction.
11. The system of claim 10, wherein the at least two actuators correspond to different network nodes.
12. An edge gateway control device is applied to an edge gateway control system, and the system comprises an edge gateway controller, a scheduler and at least two actuators; the apparatus is configured in the scheduler, the apparatus comprising:
a set acquisition module configured to acquire a set of instructions from the edge gateway controller; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing the edge gateway controller based on a service instruction from a service control server;
the scheduling module is configured to distribute the edge gateway control instructions contained in the instruction set to the at least two actuators, so that each actuator executes the obtained edge gateway control instructions to obtain execution result instructions, and forwards the execution result instructions to corresponding edge gateways through the edge gateway controllers, and the edge gateways are controlled based on the execution result instructions; wherein, an edge gateway control instruction is distributed to an executor.
13. An edge gateway control device is applied to an edge gateway control system, and the system comprises an edge gateway controller, a scheduler and at least two actuators; the device is respectively configured in the at least two actuators, and comprises:
the instruction acquisition module is configured to acquire an edge gateway control instruction in an instruction set distributed by the scheduler; the instruction set comprises at least one edge gateway control instruction, and the at least one edge gateway control instruction is obtained by analyzing a service instruction from a service control server by the edge gateway controller; wherein, an edge gateway control instruction is distributed to an actuator;
the execution module is configured to execute the obtained edge gateway control instruction to obtain an execution result instruction;
and the control module is configured to send the execution result instruction to the edge gateway controller, so that the edge gateway controller forwards the execution result instruction to a corresponding edge gateway, and the edge gateway is controlled based on the execution result instruction.
14. An electronic device, comprising:
a memory storing computer readable instructions;
a processor to read computer readable instructions stored by the memory to perform the method of any of claims 1-6, or to perform the method of any of claims 7-9.
15. A computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor of a computer, cause the computer to perform the method of any one of claims 1-6 or cause the computer to perform the method of any one of claims 7-9.
CN202110758546.3A 2021-07-05 2021-07-05 Edge gateway control method, system, device, electronic equipment and storage medium Pending CN113556387A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110758546.3A CN113556387A (en) 2021-07-05 2021-07-05 Edge gateway control method, system, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110758546.3A CN113556387A (en) 2021-07-05 2021-07-05 Edge gateway control method, system, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113556387A true CN113556387A (en) 2021-10-26

Family

ID=78102740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110758546.3A Pending CN113556387A (en) 2021-07-05 2021-07-05 Edge gateway control method, system, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113556387A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115189998A (en) * 2022-07-11 2022-10-14 北京蔚领时代科技有限公司 Method, system and equipment for maintaining server based on PaaS platform
CN115884114A (en) * 2022-11-29 2023-03-31 四川启睿克科技有限公司 Bluetooth mesh control optimization method based on edge calculation

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115189998A (en) * 2022-07-11 2022-10-14 北京蔚领时代科技有限公司 Method, system and equipment for maintaining server based on PaaS platform
CN115189998B (en) * 2022-07-11 2024-05-17 北京蔚领时代科技有限公司 Method, system and equipment for maintaining server based on PaaS platform
CN115884114A (en) * 2022-11-29 2023-03-31 四川启睿克科技有限公司 Bluetooth mesh control optimization method based on edge calculation

Similar Documents

Publication Publication Date Title
CN107590001B (en) Load balancing method and device, storage medium and electronic equipment
JP7112919B2 (en) Smart device task processing method and device
JP7197620B2 (en) Streaming computing method and apparatus based on DAG interactions
JP6164747B2 (en) Method for flow control in a collaborative environment and for reliable communication
CN112069265B (en) Synchronization method of configuration data, business data system, computer system and medium
US10673969B2 (en) Scalable data feed system
CN111506412A (en) Distributed asynchronous task construction and scheduling system and method based on Airflow
CN110716744A (en) Data stream processing method, system and computer readable storage medium
US11381463B2 (en) System and method for a generic key performance indicator platform
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN105183470B (en) A kind of natural language processing system service platform
CN105975351A (en) User behavior message reporting method and apparatus
CN113556387A (en) Edge gateway control method, system, device, electronic equipment and storage medium
CN109117252A (en) Method, system and the container cluster management system of task processing based on container
CN110399236A (en) Adaptation method, device, medium and the electronic equipment of message queue
CN111200606A (en) Deep learning model task processing method, system, server and storage medium
CN113703997A (en) Bidirectional asynchronous communication middleware system integrating multiple message agents and implementation method
CN115794262A (en) Task processing method, device, equipment, storage medium and program product
CN112104679B (en) Method, apparatus, device and medium for processing hypertext transfer protocol request
CN112398669A (en) Hadoop deployment method and device
US10579577B2 (en) Bridge and asynchronous channel based bus to provide UI-to-UI asynchronous communication
CN113472638B (en) Edge gateway control method, system, device, electronic equipment and storage medium
CN112187916B (en) Cross-system data synchronization method and device
CN114301980A (en) Method, device and system for scheduling container cluster and computer readable medium
CN113722115A (en) Method, device, equipment and computer readable medium for calling interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40053595

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination