WO2020192733A1 - 定时任务配置方法、服务器、系统和计算机可读存储介质 - Google Patents
定时任务配置方法、服务器、系统和计算机可读存储介质 Download PDFInfo
- Publication number
- WO2020192733A1 WO2020192733A1 PCT/CN2020/081398 CN2020081398W WO2020192733A1 WO 2020192733 A1 WO2020192733 A1 WO 2020192733A1 CN 2020081398 W CN2020081398 W CN 2020081398W WO 2020192733 A1 WO2020192733 A1 WO 2020192733A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- task
- timing task
- timing
- server
- terminal device
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000001960 triggered effect Effects 0.000 claims abstract description 32
- 238000012544 monitoring process Methods 0.000 claims abstract description 9
- 238000013480 data collection Methods 0.000 claims description 22
- 230000007246 mechanism Effects 0.000 claims description 19
- 238000005259 measurement Methods 0.000 claims description 12
- 238000012545 processing Methods 0.000 claims description 12
- 230000005540 biological transmission Effects 0.000 claims description 5
- 240000007087 Apium graveolens Species 0.000 description 41
- 235000015849 Apium graveolens Dulce Group Nutrition 0.000 description 41
- 235000010591 Appio Nutrition 0.000 description 41
- 238000007726 management method Methods 0.000 description 18
- 238000010586 diagram Methods 0.000 description 10
- 230000002159 abnormal effect Effects 0.000 description 9
- 238000004458 analytical method Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 238000007405 data analysis Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 239000000284 extract Substances 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 238000013475 authorization Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000013523 data management Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 241000283973 Oryctolagus cuniculus Species 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
Definitions
- the present disclosure relates to the technical field of the Internet of Things, and in particular to a method, a server, a system, and a computer-readable storage medium for configuring a timing task for an Internet of Things device.
- the Internet of Things is an important part of the new generation of information technology, and its English name is "The Internet of Things". As the name suggests, the Internet of Things is the Internet of things connected. This has two meanings: First, the core and foundation of the Internet of Things is still the Internet, which is an extended and expanded network based on the Internet; second, its user end extends and extends to any item and item to carry out information Exchange and communication.
- the Internet of Things is the "Internet of Things Connected”.
- the Internet of Things is widely used in the integration of networks through intelligent perception, recognition technology and pervasive computing, and is therefore known as the third wave of the development of the world's information industry after computers and the Internet.
- the Internet of Things is the application expansion of the Internet. The Internet of Things is not so much a network as it is a business and an application.
- a method for configuring a timed task on a server side including: obtaining a timed task created according to business requirements; monitoring whether the timed task is triggered; When triggered, an instruction related to the timing task is sent to the Internet of Things terminal subsystem to instruct the Internet of Things terminal subsystem to perform the timing task.
- the method further includes: when the timed task is triggered, using a task executor of the server to execute business logic processing corresponding to the timed task, and generate instructions related to the timed task.
- the method further includes: using a distributed task queue mechanism to configure a timing task trigger unit and configure a task execution unit as a task executor of the server.
- the method further includes: using a timing task trigger unit to trigger the timing task; and using an intermediary in a distributed task queue mechanism to obtain the timing task triggered by the timing task trigger unit.
- monitoring whether the timed task is triggered includes: monitoring by the task execution unit whether the intermediary has acquired the timed task triggered by the timed task triggering unit, so as to determine whether the timed task is triggered .
- sending the instruction related to the timing task to the IoT terminal subsystem includes: sending the instruction related to the timing task to the IoT terminal subsystem via the message middleware of the service interface layer .
- the message middleware of the service interface layer is a message middleware based on a message queue telemetry transmission protocol; wherein, the Internet of Things terminal subsystem includes a gateway device and a terminal device;
- the message middleware at the service interface layer sends instructions related to the timing task to the IoT terminal subsystem so that the IoT terminal subsystem executes the timing task including: the message middleware at the service interface layer communicates with the The instructions related to the timing task are sent to the gateway device, so that the gateway device controls the terminal device to perform operations corresponding to the instructions related to the timing task and receive information from the terminal device.
- timing task includes: data collection or switch control of the terminal device.
- the instructions related to the timing task include: numerical value collection instructions and/or status collection instructions, the value collection instructions are used to collect various measurement data of the terminal equipment, and the status collection instructions are used to collect the terminal equipment Data on the on/off state of various switches in the terminal; and switch control instructions, which are used to control the on/off state of various switches in the terminal device.
- the method further includes: receiving information from the terminal device from the gateway device through the message middleware of the service interface layer, and storing it in the result storage unit (Backend), wherein the information from the terminal device
- the device information includes: measurement data of the terminal device and/or data of the open or closed state of various switches in the terminal device.
- the method further includes: obtaining the execution record of the timing task from the result storage unit (Backend) for analysis, and judging whether the server is required to perform further operations according to a preset logic.
- the method further includes: managing timed tasks through a background management platform, where the background management platform is used to add, delete, modify, and query timed tasks according to user-defined editing rules. At least one operation.
- a server including a processor; and a memory, configured to store computer-executable instructions that, when run by the processor, cause the processor to perform the method described above .
- a system for performing timing tasks including: a server; an IoT terminal subsystem, which receives instructions related to the timing task from the server and returns information to the server, the IoT terminal
- the subsystem includes: a gateway device, which controls the terminal device to perform operations corresponding to the instruction related to the timing task according to the instruction related to the timing task received from the server, and returns the information from the terminal device to the The server; terminal device, the terminal device communicates with the gateway device, performs operations corresponding to instructions related to timing tasks under the control of the gateway device, and reports information to the gateway device.
- Fig. 1 shows the steps of a method for configuring a timed task on the server side according to an embodiment of the present disclosure.
- Fig. 2 shows the steps of a method for configuring a timed task based on a distributed task queue (Celery) mechanism on the server side according to another embodiment of the present disclosure.
- Fig. 3 shows the steps of a method for configuring a timing task based on the Celery mechanism on the server side according to another embodiment of the present disclosure.
- Fig. 4 shows a schematic diagram of a system for executing timing tasks according to an embodiment of the present disclosure.
- FIG. 5 shows a schematic diagram of the operation flow of the system of FIG. 4 when performing a timing task of data collection according to an embodiment of the present disclosure.
- FIG. 6 shows a schematic diagram of the operation flow of the system of FIG. 4 when a timing task of switch control is executed according to an embodiment of the present disclosure.
- Fig. 7 shows a schematic diagram of a server for configuring timing tasks according to an embodiment of the present disclosure.
- Fig. 8 shows a schematic diagram of a background management platform for managing timing tasks according to an embodiment of the present disclosure.
- the Internet of Things terminal devices include, for example, sensors (such as wireless sensors, smart sensors, etc.), meters, and Internet of Things. Switches, power electronic equipment, etc. For example, the value of each sensor as a terminal device is collected regularly to determine whether each sensor is working normally, and the audio is regularly turned on to play wake-up music every working day.
- the timing function can be implemented in the terminal device or the Internet of Things gateway to control the terminal device to perform tasks on a regular basis, but this method cannot remotely control the terminal device timing, and it cannot conveniently manage, schedule and control the timing according to actual business needs. task.
- the present disclosure proposes a method and system for realizing the configuration of timed tasks on the server side.
- FIG. 4 shows a schematic diagram of a system 400 for executing timing tasks according to an embodiment of the present disclosure.
- the system for performing timing tasks includes: a server 401; and an IoT terminal subsystem 402.
- the IoT terminal subsystem may include, for example, a gateway device 4021 and a terminal device 4022.
- Fig. 1 shows the steps of a method 100 for configuring a scheduled task on the server side according to an embodiment of the present disclosure.
- step S110 timed tasks created according to business requirements are acquired.
- timing tasks can include: data collection or switch control of terminal equipment (that is, time data collection of various meters, switches, power electronic equipment, etc. as terminal equipment, and the open/close state of various switches. Collection of switch status, and timing control of the on/off status of various switches).
- step S120 it is monitored whether the timing task is triggered.
- step S130 when the timing task is triggered, the server sends instructions related to the timing task to the IoT terminal subsystem to instruct the IoT terminal subsystem to execute the corresponding timing task.
- the server sends instructions related to timing tasks to the IoT terminal subsystem via the message middleware of the service interface layer.
- the message middleware at the service interface layer includes, for example, a message middleware based on the message queue telemetry transmission MQTT protocol (for ease of description, it may be called "message middleware MQTT").
- the task executor on the server side when it is determined that the timed task is triggered, the task executor on the server side is used to execute the business logic processing corresponding to the timed task and generate instructions related to the timed task.
- the task executor on the server side Through the above method of configuring timed tasks on the server side, it is possible to create timed tasks for terminal devices according to requirements, so as to further realize the configuration of related timed tasks of terminal devices on the server side to manage, schedule and control the timed tasks.
- Fig. 2 shows the steps of a method for configuring a timed task based on a distributed task queue (Celery) mechanism on the server side according to an embodiment of the present disclosure.
- step 210 is the same as step 110.
- a distributed task queue (Celery) mechanism is used in the server to configure the timing task trigger unit (Celery Beat) and configure the task execution unit as the task executor ( Celery Work).
- Celery is a distributed task scheduling module developed using Python, so for a large number of systems built using Python, it can be said to be seamless and easy to use.
- the Python language is gaining attention nowadays. Its clear and concise syntax makes debugging easier, and it has some powerful architectures that can express very complex logic. It has a very powerful framework that supports asynchronous such as Eventlet NetWorking Library.
- Python can save a lot of time during program development because it does not require compilation and linking and is easy to debug.
- the Celery mechanism focuses on real-time processing tasks and also supports timing scheduling of tasks.
- the Celery mechanism includes a timing task trigger unit (Celery Beat), a task execution unit (Celery Work), a middleman (Broker), and a result memory (Backend).
- the timing task of the Celery mechanism is first created in the configuration, and then the timing task trigger unit (Celery Beat) is run to trigger.
- the timed task trigger unit (Celery Beat) can trigger the timed task according to the time zone in settings.py; the broker receives the sent message (ie task) and stores the task in the queue, due to the Celery mechanism itself Queue services are not provided, so Rabbit MQ, Zookeeper, and Redis are usually used to implement brokers.
- the task execution unit (Celery Work) is a processing unit that executes tasks.
- the timing task trigger module (Celery Beat) and the task execution unit (Celery Work) can have a one-to-one correspondence, and according to specific task requirements, the timing task trigger module (Celery Beat) and the task execution unit (Celery Work) ) Can be multiple.
- step S230 the timing task triggered by the timing task trigger unit (Celery Beat) is used to trigger the timing task created according to the business requirements, and the middleman (Broker) is used to obtain the timing task triggered by the timing task trigger unit (Celery Beat).
- timing tasks may include: data collection or switch control of terminal equipment.
- the triggered timed task will be sent to the broker (Broker).
- step S240 the task execution unit (Celery Work) monitors whether the broker (Broker) has acquired the timing task triggered by the timing task trigger unit (Celery Beat).
- step S250 if the task execution unit (Celery Work) monitors that the broker (Broker) obtains the timing task triggered by the timing task trigger unit (Celery Beat), then the business logic processing corresponding to the timing task is performed.
- the method further includes the following steps.
- step S260 the server sends an instruction to the gateway device to instruct the gateway device to control the terminal device to perform an operation corresponding to the instruction related to the timing task.
- the message middleware of the service interface layer includes, for example, a message middleware based on the MQTT protocol of message queue telemetry transmission.
- instructions related to timed tasks include i) data collection instructions: numeric value collection instructions and/or status collection instructions. Numerical value collection instructions are used to collect various measurement data of terminal equipment, and status collection instructions are used to collect various terminal equipment. Data on the open/closed state of such switches; and ii) switch control instructions, which are used to control the switching of the open/closed states of various switches in the terminal device.
- the gateway device controlling the terminal device to perform operations corresponding to the instructions related to the timing task includes: when the instruction related to the timing task is a data collection instruction, the gateway device receives the instruction, parses the instruction, and communicates with the terminal device (for example, temperature sensor) communication, control the terminal device to report the measured data, and the gateway device collects the measurement data of the terminal device; alternatively, when the terminal device measurement data operation needs to be started by the outside, the gateway device It is also possible to send a start signal to the terminal device to control the terminal device to start data measurement and control the terminal device to report the measured data.
- the terminal device For example, temperature sensor
- controlling the terminal device by the gateway device to perform operations corresponding to the instructions related to the timing task also includes: when the instruction related to the timing task is a switch control instruction, the gateway device receives the instruction, parses the instruction, and sends the instruction to the terminal as the terminal The designated switch of the device sends control information to control the switch state.
- the gateway device additionally receives data collection instructions related to the timing tasks of data collection from the server after the switch state is switched, for example, state collection instructions, similarly, the control is used to collect switch state data
- the terminal device (for example, a current sensor used to measure the current flowing through the switch) reports the switch state data of the switch.
- the Celery mechanism greatly facilitates the configuration of timing tasks for IoT terminal devices, and the combination of Python and message middleware MQTT also realizes the control command scheduling of IoT terminal devices, thus realizing Lightweight message push, better control of the resource overhead of the entire system, especially combining the characteristics of python and message middleware MQTT, to achieve low protocol overhead, low power consumption, tolerance to unstable networks and firewall It is fault-tolerant and supports a large number of concurrent (millions of connections) and different client platforms.
- Fig. 3 shows the steps of a method 300 for configuring a timing task based on the Celery mechanism on the server side according to another embodiment of the present disclosure.
- Steps S310-S360 shown in FIG. 3 are similar to steps S210-S260 of the method shown in FIG. 2, and therefore will not be described in detail here.
- the gateway device can return the data reported by the terminal device to the server. For example, when the server sends an instruction including a data collection instruction to the IoT terminal subsystem, the gateway device needs to report and collect the data reported by the terminal device. The data is returned to the server, so the method also includes the following steps.
- step S370 the server receives information from the terminal device via the gateway device (for example, the collected measurement data of the terminal device and/or the open/closed state data of various switches in the terminal device), and stores it in the server side
- the result storage unit for example, a task execution unit (Celery Work) on the server side is used to store it in the result storage unit.
- step S380 the data analysis module on the server side obtains the execution record of the timing task from the result storage unit (Backend) for analysis, and determines whether the server (for example, its internal alarm module) is required for further processing according to the preset logic. operating.
- the data analysis module extracts records of temperature data collected during the execution of timed tasks from the result storage unit (Backend) for analysis, and determines whether the temperature data is abnormal (for example, the collected temperature data exceeds The threshold is abnormal); for another example, the data analysis module extracts from the result storage unit (Backend) the record of the state data of the audio control switch collected after the execution of the timing task (switch control) for analysis, according to the preset Logic to determine whether the state of the switch is correct (for example, it is incorrect when the state of the switch is not preset by the user). If it is determined that the temperature data is abnormal or the state of the switch is incorrect, the "further operation" may include, for example, providing alarm data to the user interface through the alarm interface of the alarm module of the server
- the method may also optionally include: managing timed tasks through a background management platform; wherein, the background management platform is used to add and add timed tasks according to user-defined editing rules. At least one of delete, modify, and query.
- the background management platform shown in Figure 8 can be used to manage various timing tasks.
- the method analyzes the execution records of timing tasks on the server side, thereby realizing automatic alarms in abnormal situations, improving safety and user experience.
- This method can also add, edit, delete, and update different timed tasks through a dedicated management platform, and can associate timed tasks with configuration management, so that three modes of multi-process, Eventlet and Gevent can be selected for concurrent execution ;
- the dedicated management platform can also provide a variety of task types to facilitate task grouping, splitting and invocation, and support a variety of message agents and storage backends; in terms of user experience, it provides a user interface to enable users to perform timing tasks (such as Whether the execution is successful, the current execution status, the time taken to execute the task, etc.) have a relatively intuitive understanding.
- the IoT terminal subsystem 402 receives instructions related to timing tasks from the server and returns information (including instructions or data, etc.) to the server.
- the gateway device 4021 in the IoT terminal subsystem 402 controls the terminal device 4022 to perform operations corresponding to the instructions related to the timing task according to the instructions related to the timing task received from the server 401, and returns the information from the terminal device To the server 401;
- the terminal device 4022 communicates with the gateway device 4021, and performs operations corresponding to instructions related to timing tasks under the control of the gateway device 4021, and reports information to the gateway device 4021.
- a service interface between the server 401 and the IoT terminal subsystem 402 for transferring information (including instructions or data, etc.) between the server and the IoT terminal subsystem 402.
- a programmable controller is also included between the gateway device 4021 and the terminal device 4022, which is used to integrate multiple terminal devices, so as to collect their data and report to the gateway device and control them on and off.
- PLC programmable controller
- PLC and multiple terminal devices integrated with it can be regarded as terminal devices.
- FIG. 5 shows a schematic diagram of the operation flow of the system of FIG. 4 when performing a timing task of data collection according to an embodiment of the present disclosure.
- the process of configuring the timing task on the server side is similar to the method described according to FIG. 2 and FIG. 3, and will not be described in detail here.
- the timing task is the data collection of the terminal equipment, including value collection and status collection.
- the value collection is mainly to collect the readings of various measuring meters and the meter readings of various power electronic equipment.
- the status collection mainly It is the open/closed state of various switches.
- the task execution unit (Celery Work) on the server side performs business logic processing and starts to send instructions related to the timing task to the message middleware MQTT of the business interface layer.
- the message middleware MQTT passes the instructions to the gateway device through the message queue mechanism.
- the gateway device needs to communicate with the server to perform login and authorization verification, which mainly authenticates the user's identity and authorization of the gateway device.
- the gateway device is responsible for communicating with the server.
- the gateway device supports the features of mainstream industrial control protocols and customized special protocols, and realizes local calculation through strategy rule calculation and application deployment and distribution, which improves the control capability and real-time performance of the device.
- the gateway device also has rich interfaces and convenient Deploy to support communication with 4G, 3G, PPPOE, Wi-Fi networks, digital I/O input and output, serial ports and other terminals, and then provide different access solutions for different applications.
- a PLC can also be set between them, but the PLC is not If necessary, it is also feasible to use other types of intermediate controllers or gateway devices to directly control each terminal device.
- the gateway device channel is usually configured in advance to ensure that the address of each terminal device integrated by the PLC can have a dedicated channel to communicate with the server.
- the configuration items of the gateway device channel mainly have four aspects:
- the IoT gateway device and measuring point configuration module used to configure the device protocol and measuring point address under the gateway device. Mainly adopt industrial protocols such as Modbus and RS232;
- the IoT gateway device acquisition module according to the configured IoT device and measuring point information, periodically reads the measuring point data of the IoT device;
- the timing reporting module of the IoT gateway device is used to upload the collected data to the message center regularly.
- the message center includes the message middleware MQTT of the embodiment of the present disclosure.
- the IoT gateway device control module is connected with the message center module to control the controlled device and issue control instructions.
- the gateway device After the gateway device receives the instructions from the message middleware MQTT and parses the instructions related to the timing task, it starts to control the PLC to report the collected terminal device (sensor, meter, etc.) data and send it back to the server.
- the gateway device can also send a start signal to the terminal device by controlling the PLC, so that the PLC controls the terminal device to start data measurement, and then the PLC measures the data of the terminal device Collect, report to the gateway device, and finally send it back to the server.
- the gateway device finally transfers the collected terminal device data back to the server via the message middleware MQTT, and then the task execution unit on the server side records it in the result storage (Backend).
- the data analysis module on the server side extracts the execution records of the timed tasks (for example, the records of temperature data collected during the execution of the timed tasks) from the result storage for analysis, and determines whether these records are abnormal according to the preset logic (for example, If the collected temperature data exceeds the threshold, it will be abnormal), if it is abnormal, the alarm data will be provided to the user interface through the alarm interface.
- FIG. 6 shows a schematic diagram of the operation flow of the system of FIG. 4 when a timing task of switch control is executed according to an embodiment of the present disclosure.
- the process of configuring the timing task on the server side is similar to the method described according to FIG. 2 and FIG. 3, and will not be described in detail here.
- the timing task is the switch control of the terminal device of the Internet of Things, and the switch control mainly controls the switching of the on/off states of various switches.
- the task execution unit (Celery Work) on the server side performs business logic processing and starts to send instructions related to the timing task to the message middleware MQTT of the business interface layer.
- the message middleware MQTT passes the instruction to the gateway device through the message queue mechanism.
- the gateway device parses the instruction and sends the control information corresponding to the instruction to the PLC.
- the PLC controls the on/off state of the designated switch among the integrated switches according to the control information. Switch.
- the switch state data of the terminal device can be collected. Specifically, when the switch status data of the terminal device needs to be collected to determine whether the switch is normal, it is also necessary to trigger the timing task of data collection from the server side and generate a data collection instruction. At this time, the steps are as follows.
- the gateway device starts to control the PLC to transmit the collected terminal device data back to the server after receiving the data collection instruction (for example, via the message middleware MQTT, and finally back to the server), and then the server's task execution unit records To the result storage (Backend).
- the data analysis module of the server extracts the execution record of the timing task (for example, the record of the collected switch state data) from the result storage for analysis, and judges the execution record according to the preset logic Whether it is abnormal, if abnormal, the alarm data is provided to the user interface through the alarm interface of the alarm unit on the server side.
- FIG. 7 is a schematic diagram of a server according to an embodiment of the present disclosure. Since the operation performed by the server of this embodiment is the same as the details of the method described above with reference to FIGS. 1-3, a detailed description of the same content is omitted here for simplicity.
- the server includes a processor 701 and a memory 702. It should be noted that although the server in FIG. 7 is shown as including only two devices, this is only illustrative, and the server may also include one or more other devices, or be divided according to the functions of each part.
- the server can be regarded as six modules including login module, authority management module, IoT gateway and device management module, IoT data management module, database module, and timed task module.
- the login module is used for gateway devices and cloud platform users. Login authentication; user authority management module, used to identify user role authority management, data authority management; IoT gateway and device management module, used for users to add, modify, delete, configure each IoT gateway and IoT device, and configure at the same time Configuration of device protocol and measuring point address under the gateway; IoT data management module, used to display and count the data of each gateway and IoT devices under the gateway; database module, used to store and backup records of data information in the system;
- the timing task module is used to create different timer tasks for business requirements to achieve different business purposes. Since the specific structures of these devices or modules are known to those skilled in the art, detailed descriptions thereof are omitted here.
- the memory 702 is used to store computer-executable instructions, which, when run by the processor, cause the processor to perform the steps of the method described above.
- the method includes: obtaining a timed task created according to business requirements; monitoring whether the timed task is triggered; and sending instructions related to the timed task to the Internet of Things terminal subsystem to instruct the Internet of Things terminal subsystem to perform the timed task.
- the task executor on the server side is used to execute the business logic processing corresponding to the timed task, and to generate the information related to the timed task for the IoT terminal subsystem Instructions. Then, for example, via the message middleware of the business interface layer, the instructions related to the timing task are sent to the IoT terminal subsystem.
- the method further includes using the distributed task queue Celery mechanism to configure a timing task trigger unit (Celery Beat) and configure a task execution unit (Celery Work) as a task executor of the server.
- a timing task trigger unit Celery Beat
- a task execution unit Celery Work
- the method further includes: using a timing task trigger unit (Celery Beat) to trigger the timing task; and using a broker in the Celery mechanism of a distributed task queue to obtain the timing task triggered by the timing task trigger unit (Celery Beat). Timed tasks.
- a timing task trigger unit (Celery Beat) to trigger the timing task
- a broker in the Celery mechanism of a distributed task queue to obtain the timing task triggered by the timing task trigger unit (Celery Beat). Timed tasks.
- monitoring whether the timing task is triggered includes: monitoring by the task execution unit (Celery Work) whether the broker has acquired the timing task triggered by the timing task trigger unit (Celery Beat), thereby determining the timing task Whether it is triggered.
- sending the instruction related to the timing task to the IoT terminal subsystem includes: sending the instruction related to the timing task to the IoT terminal subsystem via the message middleware of the service interface layer.
- the message middleware of the business interface layer may be a message middleware based on the MQTT protocol of message queue telemetry transmission.
- the IoT terminal subsystem includes a gateway device and terminal equipment; sending instructions related to the timing task to the IoT terminal subsystem includes: sending instructions related to the timing task through the message middleware of the service interface layer To the gateway device.
- the timing task includes: data collection or switch control of terminal equipment.
- the instructions related to timing tasks include: numerical value acquisition instructions and/or status acquisition instructions.
- Numerical value acquisition instructions are used to collect various measurement data of terminal equipment, and status acquisition instructions are used to collect various types of switches in terminal equipment.
- Open/closed state data is used to control the switching of the open/closed states of various switches in the terminal device.
- the method further includes: receiving information from a terminal device from a gateway device, and storing it in a result storage unit (Backend) using a task execution unit (Celery Work), wherein the information from the terminal device includes: terminal device The measurement data and/or the open or closed state data of various switches in the terminal equipment.
- the method further includes: obtaining the execution record of the timing task from the result storage unit (Backend) for analysis, and judging whether the server is required to perform further operations according to a preset logic.
- the method further includes: managing timed tasks through a background management platform; wherein the background management platform is used to implement at least one operation of adding, deleting, modifying and querying timed tasks according to editing rules defined by the user.
- a computer-readable medium which stores computer-executable instructions, which, when run by a processor, cause the processor to perform the steps of the aforementioned method.
- Python language is used in the present disclosure to configure timing tasks on the server side, those skilled in the art can understand that other programming languages can also be used to implement the same timing task configuration for IoT terminal devices on the server side.
- Figures 1-3 respectively describe steps executed in a specific order for the purposes of illustration and discussion, the method of the present disclosure is not limited to the specific illustrated order or arrangement. Without departing from the scope of the present disclosure, the various steps of the above method may be omitted, rearranged, combined and/or adjusted in various ways.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
Claims (14)
- 一种用于在服务器侧配置定时任务的方法,包括:获取根据业务需求而创建的定时任务;监控所述定时任务是否被触发;在所述定时任务被触发时,向物联网终端子系统发送与所述定时任务相关的指令,以指示物联网终端子系统执行所述定时任务。
- 如权利要求1所述的方法,还包括:在所述定时任务被触发时,利用服务器的任务执行器执行与所述定时任务对应的业务逻辑处理,并产生与所述定时任务相关的指令。
- 如权利要求1或2所述的方法,还包括:使用分布式任务队列机制来配置定时任务触发单元并且配置作为所述服务器的任务执行器的任务执行单元。
- 根据权利要求3所述的方法,还包括:利用定时任务触发单元触发所述定时任务;以及利用分布式任务队列机制中的中间人来获取由定时任务触发单元触发的所述定时任务。
- 如权利要求4所述的方法,其中,所述监控所述定时任务是否被触发包括:由任务执行单元监控中间人是否获取了由定时任务触发单元触发的所述定时任务,从而判断所述定时任务是否被触发。
- 如权利要求3所述的方法,其中,向物联网终端子系统发送与所述定时任务相关的指令包括:经由业务接口层的消息中间件向物联网终端子系统发送与所述定时任务相关的指令。
- 根据权利要求6所述的方法,其中,所述业务接口层的消息中间件为基于消息队列遥测传输协议的消息中间件;其中,所述物联网终端子系统包括网关设备和终端设备;所述向物联网终端子系统发送与所述定时任务相关的指令,以指示物联网终端子系统执行所述定时任务包括:通过该业务接口层的消息中间件将与所述定时任务相关的指令发送到网关设备,以指示网关设备控制终端设备进行对应于与所述定时任务相关的指令的操作并且接收来自终端设备的信息。
- 如权利要求1-2和4-7任一项所述的方法,其中,所述定时任务包括:终端设备的数据采集或开关控制。
- 如权利要求8所述的方法,其中,与所述定时任务相关的指令包括:数据采集指令,其包括数值采集指令和/或状态采集指令,所述数值采集指令用于采集终端设备的测量数据,所述状态采集指令用于采集终端设备中的各类开关的开启/闭合状态的数据;和开关控制指令,其用于控制终端设备中的各类开关的开启或闭合状态的切换。
- 如权利要求7所述的方法,还包括:通过该业务接口层的消息中间件从网关设备接收来自终端设备的信息,并将其存储到结果存储单元中,其中,所述来自终端设备的信息包括:终端设备的测量数据和/或终端设备中的各类开关的开启或闭合状态的数据。
- 如权利要求10所述的方法,还包括:从所述结果存储单元中获取定时任务的执行记录并进行分析,并且根据预设的逻辑来判断是否需要服务器进行进一步操作。
- 如权利要求1-2和4-7任一项所述的方法,还包括:通过后台管理平台管理所述定时任务;其中,所述后台管理平台被用于实现对定时任务进行增添、删除、修改和查询中的至少一项操作。
- 一种服务器,包括处理器;和存储器,用于存储计算机可执行指令,所述计算机可执行指令在被处理器运行时使得所述处理器执行如权利要求1-12任一项所述的方法。
- 一种用于执行定时任务的系统,包括:如权利要求13所述的服务器;物联网终端子系统,从服务器接收与定时任务相关的指令并向服务器返回信息,所述物联网终端子系统包括:网关设备,所述网关设备根据从服务器接收的与定时任务相关的指令,控制终端设备进行对应于所述与所述定时任务相关的指令的操作,并将来自终端设备的信息返回到所述服务器;终端设备,所述终端设备与所述网关设备通信,在网关设备的控制下进行对应于与所述定时任务相关的指令的操作,并向所述网关设备上报信息。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910238659.3A CN109951559A (zh) | 2019-03-27 | 2019-03-27 | 定时任务配置方法、服务器、系统和计算机可读存储介质 |
CN201910238659.3 | 2019-03-27 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020192733A1 true WO2020192733A1 (zh) | 2020-10-01 |
Family
ID=67012007
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/081398 WO2020192733A1 (zh) | 2019-03-27 | 2020-03-26 | 定时任务配置方法、服务器、系统和计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109951559A (zh) |
WO (1) | WO2020192733A1 (zh) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112783618A (zh) * | 2020-12-30 | 2021-05-11 | 银盛支付服务股份有限公司 | 一种任务调度监控系统、计算机设备及存储介质 |
CN113726644A (zh) * | 2021-08-31 | 2021-11-30 | 中冶华天南京工程技术有限公司 | 智能网关数据采集的方法与系统 |
CN113760583A (zh) * | 2021-09-18 | 2021-12-07 | 苏州利成汇志软件科技有限公司 | 物联数据智能集中处理服务平台 |
CN114124643A (zh) * | 2021-11-10 | 2022-03-01 | 中盈优创资讯科技有限公司 | 一种基于PaaS的网络设备流量采集方法及装置 |
CN114338767A (zh) * | 2021-12-23 | 2022-04-12 | 睿云联(厦门)网络通讯技术有限公司 | 基于数据流的物联网终端设备的网络管理方法及系统 |
CN115623518A (zh) * | 2022-12-15 | 2023-01-17 | 阿里巴巴达摩院(杭州)科技有限公司 | 任务处理方法、平台、系统、设备和存储介质 |
CN116028544A (zh) * | 2023-03-30 | 2023-04-28 | 山东爱特云翔计算机有限公司 | 基于openstack的定时任务动态添加方法 |
WO2023077637A1 (zh) * | 2021-11-03 | 2023-05-11 | 中科智城(广州)信息科技有限公司 | 一种基于mqtt协议的集中控制器控制方法、系统及设备 |
CN116527718A (zh) * | 2023-06-02 | 2023-08-01 | 广州达谙信息科技有限公司 | 一种工业物联网网关的数据采集方法及其系统 |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109951559A (zh) * | 2019-03-27 | 2019-06-28 | 京东方光科技有限公司 | 定时任务配置方法、服务器、系统和计算机可读存储介质 |
CN110807637A (zh) * | 2019-11-05 | 2020-02-18 | 腾讯科技(深圳)有限公司 | 一种业务处理方法、智能终端及存储介质 |
CN110837592B (zh) * | 2019-11-08 | 2021-01-26 | 京东数字科技控股有限公司 | 数据归档的方法、装置和计算机可读存储介质 |
CN113411226A (zh) * | 2020-03-16 | 2021-09-17 | 北京奇虎科技有限公司 | 路由器分布式自动化测试方法、系统、存储介质及其计算机设备 |
CN111835842B (zh) | 2020-07-02 | 2023-02-28 | 远景智能国际私人投资有限公司 | 网关资源的更新方法、装置及物联网控制平台 |
CN112416701B (zh) * | 2020-09-07 | 2023-02-17 | 上海哔哩哔哩科技有限公司 | 业务数据的监控方法、装置、计算机设备和可读存储介质 |
CN113190777A (zh) * | 2021-03-31 | 2021-07-30 | 北京达佳互联信息技术有限公司 | 数据更新方法、装置、电子设备、存储介质及产品 |
CN113282398A (zh) * | 2021-06-29 | 2021-08-20 | 杭州洋驼网络科技有限公司 | 轻量级任务触发系统及业务生态系统 |
CN114510282B (zh) * | 2021-12-15 | 2024-02-13 | 北京达佳互联信息技术有限公司 | 一种自动化应用的运行方法、装置、设备以及存储介质 |
CN114650310B (zh) * | 2022-03-11 | 2023-03-14 | 腾讯科技(深圳)有限公司 | 基于物联网的设备控制方法、装置、电子设备及存储介质 |
CN115333939A (zh) * | 2022-07-27 | 2022-11-11 | 青岛海尔空调电子有限公司 | 支持边缘计算的物联网网关的运行控制方法、设备及介质 |
CN115515169B (zh) * | 2022-11-22 | 2023-06-09 | 天津通信广播集团有限公司 | 一种工业数据采集网关的数据转发方法 |
CN116744141B (zh) * | 2023-06-01 | 2024-03-19 | 杭州研智科技有限公司 | 一种统一多种协议的物联网网关 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106487895A (zh) * | 2016-10-14 | 2017-03-08 | 深圳市欧瑞博电子有限公司 | 定时控制方法和装置 |
US20170093975A1 (en) * | 2015-09-26 | 2017-03-30 | Arun Raghunath | Technologies for managing data object requests in a storage node cluster |
CN108762931A (zh) * | 2018-05-31 | 2018-11-06 | 康键信息技术(深圳)有限公司 | 基于分布式调度系统的任务调度方法、服务器及存储介质 |
CN109298951A (zh) * | 2018-08-21 | 2019-02-01 | 平安科技(深圳)有限公司 | Celery任务的执行方法及终端设备 |
CN109951559A (zh) * | 2019-03-27 | 2019-06-28 | 京东方光科技有限公司 | 定时任务配置方法、服务器、系统和计算机可读存储介质 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107623613A (zh) * | 2017-09-13 | 2018-01-23 | 微赫智能科技(上海)有限公司 | 智慧家庭系统 |
CN109361560A (zh) * | 2018-01-24 | 2019-02-19 | 广州Tcl智能家居科技有限公司 | 一种集群节点通讯处理方法、系统、存储介质及服务器 |
-
2019
- 2019-03-27 CN CN201910238659.3A patent/CN109951559A/zh active Pending
-
2020
- 2020-03-26 WO PCT/CN2020/081398 patent/WO2020192733A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170093975A1 (en) * | 2015-09-26 | 2017-03-30 | Arun Raghunath | Technologies for managing data object requests in a storage node cluster |
CN106487895A (zh) * | 2016-10-14 | 2017-03-08 | 深圳市欧瑞博电子有限公司 | 定时控制方法和装置 |
CN108762931A (zh) * | 2018-05-31 | 2018-11-06 | 康键信息技术(深圳)有限公司 | 基于分布式调度系统的任务调度方法、服务器及存储介质 |
CN109298951A (zh) * | 2018-08-21 | 2019-02-01 | 平安科技(深圳)有限公司 | Celery任务的执行方法及终端设备 |
CN109951559A (zh) * | 2019-03-27 | 2019-06-28 | 京东方光科技有限公司 | 定时任务配置方法、服务器、系统和计算机可读存储介质 |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112783618A (zh) * | 2020-12-30 | 2021-05-11 | 银盛支付服务股份有限公司 | 一种任务调度监控系统、计算机设备及存储介质 |
CN113726644A (zh) * | 2021-08-31 | 2021-11-30 | 中冶华天南京工程技术有限公司 | 智能网关数据采集的方法与系统 |
CN113726644B (zh) * | 2021-08-31 | 2023-07-25 | 中冶华天南京工程技术有限公司 | 智能网关数据采集的方法与系统 |
CN113760583A (zh) * | 2021-09-18 | 2021-12-07 | 苏州利成汇志软件科技有限公司 | 物联数据智能集中处理服务平台 |
WO2023077637A1 (zh) * | 2021-11-03 | 2023-05-11 | 中科智城(广州)信息科技有限公司 | 一种基于mqtt协议的集中控制器控制方法、系统及设备 |
CN114124643A (zh) * | 2021-11-10 | 2022-03-01 | 中盈优创资讯科技有限公司 | 一种基于PaaS的网络设备流量采集方法及装置 |
CN114124643B (zh) * | 2021-11-10 | 2023-08-01 | 中盈优创资讯科技有限公司 | 一种基于PaaS的网络设备流量采集方法及装置 |
CN114338767A (zh) * | 2021-12-23 | 2022-04-12 | 睿云联(厦门)网络通讯技术有限公司 | 基于数据流的物联网终端设备的网络管理方法及系统 |
CN114338767B (zh) * | 2021-12-23 | 2023-11-24 | 睿云联(厦门)网络通讯技术有限公司 | 基于数据流的物联网终端设备的网络管理方法及系统 |
CN115623518A (zh) * | 2022-12-15 | 2023-01-17 | 阿里巴巴达摩院(杭州)科技有限公司 | 任务处理方法、平台、系统、设备和存储介质 |
CN116028544A (zh) * | 2023-03-30 | 2023-04-28 | 山东爱特云翔计算机有限公司 | 基于openstack的定时任务动态添加方法 |
CN116028544B (zh) * | 2023-03-30 | 2023-06-23 | 山东爱特云翔计算机有限公司 | 基于openstack的定时任务动态添加方法 |
CN116527718A (zh) * | 2023-06-02 | 2023-08-01 | 广州达谙信息科技有限公司 | 一种工业物联网网关的数据采集方法及其系统 |
Also Published As
Publication number | Publication date |
---|---|
CN109951559A (zh) | 2019-06-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020192733A1 (zh) | 定时任务配置方法、服务器、系统和计算机可读存储介质 | |
US10429092B2 (en) | Asynchronous reporting system | |
US10854059B2 (en) | Wireless sensor network | |
EP3111433B1 (en) | Wireless sensor network | |
US20180248968A1 (en) | Remote access gateway configurable control system | |
US10992494B2 (en) | Gateway round-robin system | |
CN106549863B (zh) | 一种物联网网关、终端及其协议自适应方法和装置 | |
CN103973815A (zh) | 一种跨数据中心存储环境统一监控方法 | |
CN112764835A (zh) | 基于边缘计算的电力物联网传感设备配置微服务系统及方法 | |
WO2012088905A1 (zh) | 一种通讯网络系统及通讯设备的巡检子系统和巡检方法 | |
CN113609048B (zh) | 一种电力物联网云边业务协同交互方法 | |
US10514713B2 (en) | Mailbox data storage system | |
CN102932431A (zh) | 一种基于消息路由的状态监测数据接口配置方法 | |
EP2908498B1 (en) | Integrated application generating system and method for internet of things terminal | |
CN114095311A (zh) | 电力物联网网关、电力系统及配置新增电力设备的方法 | |
Ali et al. | Redfish-Nagios: A Scalable Out-of-Band Data Center Monitoring Framework Based on Redfish Telemetry Model | |
Wang et al. | An Edge Computing Based Gateway for WIA-PA Networks | |
CN116743886A (zh) | 基于物联网的工业控制设备数据采集系统 | |
CN114884844B (zh) | 流量录制方法及系统 | |
CN114691373B (zh) | 边缘计算设备接口通信方法、边缘节点设备及存储介质 | |
CN107920347A (zh) | 一种终端设备的数据处理方法及系统、设备 | |
CN109688142B (zh) | 一种工业控制系统网络中威胁管理方法和系统 | |
CN108446131B (zh) | 一种atm机固件升级方法、装置、设备及存储介质 | |
WO2023116276A1 (zh) | 故障处理方法、装置、电子设备及存储介质 | |
Zhang et al. | Serial Communication Card and Emergency Technology in Internet of Things [J] |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20777499 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20777499 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24/02/2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20777499 Country of ref document: EP Kind code of ref document: A1 |