[go: up one dir, main page]

CN116155817B - Data polling scheduling method, device, equipment and storage medium - Google Patents

Data polling scheduling method, device, equipment and storage medium Download PDF

Info

Publication number
CN116155817B
CN116155817B CN202310165209.2A CN202310165209A CN116155817B CN 116155817 B CN116155817 B CN 116155817B CN 202310165209 A CN202310165209 A CN 202310165209A CN 116155817 B CN116155817 B CN 116155817B
Authority
CN
China
Prior art keywords
data
weight
service flow
queue
weights
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.)
Active
Application number
CN202310165209.2A
Other languages
Chinese (zh)
Other versions
CN116155817A (en
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.)
Electric Power Research Institute of Yunnan Power Grid Co Ltd
Original Assignee
Electric Power Research Institute of Yunnan Power Grid 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 Electric Power Research Institute of Yunnan Power Grid Co Ltd filed Critical Electric Power Research Institute of Yunnan Power Grid Co Ltd
Priority to CN202310165209.2A priority Critical patent/CN116155817B/en
Publication of CN116155817A publication Critical patent/CN116155817A/en
Application granted granted Critical
Publication of CN116155817B publication Critical patent/CN116155817B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • H04W28/09Management thereof
    • H04W28/0925Management thereof using policies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • H04W28/09Management thereof
    • H04W28/0925Management thereof using policies
    • H04W28/0942Management thereof using policies based on measured or predicted load of entities- or links
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a data polling scheduling method, a device, equipment and a storage medium, wherein the method comprises the following steps: determining a data transmission state of each data acquisition device for reflecting a data transmission success rate when the data acquisition device transmits data to the wireless communication device, wherein each data acquisition device corresponds to a service flow queue comprising a plurality of packet data and data addresses of each packet data; determining an initial weight of a service flow queue inversely proportional to the data transmission success rate by utilizing the data transmission success rate; and carrying out weighted polling scheduling processing on the packet data according to the initial weight and the data address of each service flow queue, and determining a target transmission queue of the current data frame. By the method, the target transmission queue of the current data frame can be obtained by carrying out weighted polling scheduling by utilizing the initial weight which is inversely proportional to the success rate of data transmission, so that the polling scheduling of the current data frame is divided into light and heavy urgency according to the weight, and the service transmission efficiency can be improved in a load balancing manner when the service volume is abnormal.

Description

数据的轮询调度方法及装置、设备及存储介质Data polling scheduling method, device, equipment and storage medium

技术领域Technical Field

本发明涉及数据传输技术领域,尤其涉及一种数据的轮询调度方法及装置、设备及存储介质。The present invention relates to the technical field of data transmission, and in particular to a data polling scheduling method and device, equipment and storage medium.

背景技术Background Art

随着嵌入式系统功能不断完善以及市场的不断扩大,多情境下的设备状态感知设备越来越多的应用到终端当中,例如感知设备包括但不限于温度传感器,振动传感器等数据采集装置,终端包括但不限于集中器,能源控制器等具备数据处理能力的电子设备,其中,上述这些传感器通过采集环境变量及时回传数据给终端,实现对终端工作环境状态的监控。如此一来增加了蓝牙载体的链路通信业务量。如果当某一时刻对于环境变量的变化异常,终端需加大业务量对每一个传感器都上报的情况下,势必造成上报异常堵塞等情况。With the continuous improvement of embedded system functions and the continuous expansion of the market, more and more device status sensing devices in multiple scenarios are being applied to terminals. For example, sensing devices include but are not limited to temperature sensors, vibration sensors and other data acquisition devices, and terminals include but are not limited to concentrators, energy controllers and other electronic devices with data processing capabilities. Among them, these sensors collect environmental variables and promptly transmit data back to the terminal to monitor the working environment status of the terminal. This increases the link communication traffic of the Bluetooth carrier. If the change of environmental variables is abnormal at a certain moment, the terminal needs to increase the traffic volume to report to each sensor, which will inevitably cause abnormal reporting and other situations.

因此,亟需一种可以提高传统蓝牙通信链路传输业务量大速率高时,业务传输效率降低的问题技术手段。Therefore, there is an urgent need for a technical means to improve the problem of reduced service transmission efficiency when the traditional Bluetooth communication link transmits a large amount of service at a high rate.

发明内容Summary of the invention

本发明的主要目的在于提供一种数据的轮询调度方法及装置、设备及存储介质,可以解决现有技术中的业务传输效率降低的问题。The main purpose of the present invention is to provide a data polling scheduling method and device, equipment and storage medium, which can solve the problem of reduced business transmission efficiency in the prior art.

为实现上述目的,本发明第一方面提供一种数据的轮询调度方法,所述方法包括:To achieve the above object, the present invention provides a data polling scheduling method in a first aspect, the method comprising:

确定各个数据采集装置的数据传输状态,所述数据传输状态用于反映所述数据采集装置向无线通讯装置传输数据时的数据传输成功率,每个所述数据采集装置对应一个业务流队列,每个业务流队列包括若干分组数据以及各个分组数据的数据地址,所述数据采集装置与所述无线通讯装置之间具有无线通讯连接;Determine the data transmission status of each data acquisition device, the data transmission status is used to reflect the data transmission success rate when the data acquisition device transmits data to the wireless communication device, each of the data acquisition devices corresponds to a service flow queue, each service flow queue includes a number of packet data and a data address of each packet data, and there is a wireless communication connection between the data acquisition device and the wireless communication device;

利用所述数据传输成功率确定所述业务流队列的初始权重,所述初始权重与所述数据传输成功率呈反比;Determining an initial weight of the service flow queue using the data transmission success rate, wherein the initial weight is inversely proportional to the data transmission success rate;

根据各个所述业务流队列的初始权重以及所述数据地址进行各个所述业务流队列的分组数据的加权轮询调度处理,确定当前数据帧的目标传输队列。A weighted round-robin scheduling process is performed on the packet data of each of the service flow queues according to the initial weight of each of the service flow queues and the data address, so as to determine the target transmission queue of the current data frame.

在一种可行实现方式中,所述根据各个所述业务流队列的初始权重以及所述数据地址进行各个所述业务流队列的分组数据的加权轮询调度处理,确定当前数据帧的目标传输队列,包括:In a feasible implementation, performing weighted round-robin scheduling of packet data of each of the service flow queues according to the initial weight of each of the service flow queues and the data address to determine the target transmission queue of the current data frame includes:

确定各个所述初始权重中的最大初始权重对应的目标业务流队列;Determine a target service flow queue corresponding to a maximum initial weight among the initial weights;

将所述目标业务流队列中的第一个数据地址对应的分组数据读取至当前数据帧的预设传输队列,并更新所述目标业务流队列,以及记录轮询次数i=i+1;Read the packet data corresponding to the first data address in the target service flow queue to the preset transmission queue of the current data frame, update the target service flow queue, and record the polling number i=i+1;

利用所述最大初始权重、以及各个所述业务流队列的初始权重进行初始权重更新处理,确定各个所述业务流队列的更新后的初始权重,并返回执行所述确定所述初始权重中的最大权重对应的目标业务流队列的步骤,直至所述轮询次数i等于预设轮询次数阈值,得到当前数据帧的目标传输队列。The initial weight update process is performed using the maximum initial weight and the initial weights of each of the business flow queues to determine the updated initial weights of each of the business flow queues, and the step of determining the target business flow queue corresponding to the maximum weight in the initial weights is returned to execute until the polling number i is equal to the preset polling number threshold, thereby obtaining the target transmission queue of the current data frame.

在一种可行实现方式中,所述初始权重为静态权重与动态权重之和,则所述利用所述数据传输成功率确定所述业务流队列的初始权重,包括:In a feasible implementation, the initial weight is the sum of the static weight and the dynamic weight, and the determining the initial weight of the service flow queue by using the data transmission success rate includes:

利用所述数据传输成功率确实所述静态权重,所述静态权重与所述数据传输成功率呈反比;Determining the static weight by using the data transmission success rate, wherein the static weight is inversely proportional to the data transmission success rate;

利用所述静态权重以及预设的动态权重,确定所述初始权重。The initial weight is determined by using the static weight and the preset dynamic weight.

在一种可行实现方式中,所述利用所述最大初始权重、以及各个所述业务流队列的初始权重进行初始权重更新处理,确定各个所述业务流队列的更新后的初始权重,包括:In a feasible implementation, the using the maximum initial weight and the initial weights of the service flow queues to perform initial weight update processing to determine the updated initial weights of the service flow queues includes:

利用所述最大初始权重以及各个所述初始权重的静态权重和进行所述目标业务流队列的动态权重更新处理,确定所述目标业务流队列更新后的动态权重,所述更新后的动态权重为最大初始权重与所述静态权重和之差;Perform dynamic weight update processing of the target service flow queue by using the maximum initial weight and the static weight sum of each of the initial weights to determine the updated dynamic weight of the target service flow queue, where the updated dynamic weight is the difference between the maximum initial weight and the static weight sum;

利用所述更新后的动态权重、除所述目标业务流队列以外的其余业务流队列的动态权重以及所述静态权重进行初始权重更新处理,确定各个所述业务流队列的更新后的初始权重。The updated dynamic weight, the dynamic weights of the remaining service flow queues except the target service flow queue, and the static weight are used to perform initial weight update processing to determine the updated initial weight of each service flow queue.

在一种可行实现方式中,所述装置无线通讯装置包括蓝牙设备,则所述确定各个数据采集装置的数据传输状态,包括:In a feasible implementation, the device wireless communication device includes a Bluetooth device, and the determining of the data transmission status of each data acquisition device includes:

控制所述蓝牙设备发出广播召读信号;Controlling the Bluetooth device to send a broadcast call signal;

接收各个数据采集装置返回的所述广播召读信号的召读回复结果,所述召读回复结果至少包括数据采集装置的设备类型、信号强度以及信噪比;Receiving a call-reading reply result of the broadcast call-reading signal returned by each data acquisition device, wherein the call-reading reply result at least includes a device type, a signal strength, and a signal-to-noise ratio of the data acquisition device;

根据所述设备类型、信号强度以及信噪比,确定各个数据采集装置的数据传输状态。The data transmission status of each data acquisition device is determined according to the device type, signal strength and signal-to-noise ratio.

在一种可行实现方式中,所述方法还包括:In a feasible implementation, the method further includes:

统计不同业务流的业务流请求数量,所述业务流请求数量用于反映所述业务流的数据读取需求;Counting the number of business flow requests of different business flows, where the number of business flow requests is used to reflect the data reading demand of the business flow;

根据所述业务流请求数量确定所述第二权重的预设值。The preset value of the second weight is determined according to the number of business flow requests.

在一种可行实现方式中,所述数据采集装置用于采集电力设备的运行数据,则所述方法还包括:In a feasible implementation, the data acquisition device is used to collect operating data of the power equipment, and the method further includes:

将所述目标传输队列上传至预设上位机,所述上位机用于根据所述目标传输队列进行数据分析,确定所述电力设备的运行状态。The target transmission queue is uploaded to a preset host computer, and the host computer is used to perform data analysis based on the target transmission queue to determine the operating status of the power equipment.

为实现上述目的,本发明第二方面提供一种数据的轮询调度装置,所述装置包括:To achieve the above object, the second aspect of the present invention provides a data polling scheduling device, the device comprising:

状态确定模块:用于确定各个数据采集装置的数据传输状态,所述数据传输状态用于反映所述数据采集装置向无线通讯装置传输数据时的数据传输成功率,每个所述数据采集装置对应一个业务流队列,每个业务流队列包括若干分组数据以及各个分组数据的数据地址,所述数据采集装置与所述无线通讯装置之间具有无线通讯连接;A state determination module is used to determine the data transmission state of each data acquisition device, wherein the data transmission state is used to reflect the data transmission success rate when the data acquisition device transmits data to the wireless communication device. Each of the data acquisition devices corresponds to a service flow queue, each service flow queue includes a plurality of packet data and a data address of each packet data, and a wireless communication connection is provided between the data acquisition device and the wireless communication device.

权重确定模块:用于利用所述数据传输成功率确定所述业务流队列的初始权重,所述初始权重与所述数据传输成功率呈反比;A weight determination module: used to determine the initial weight of the service flow queue using the data transmission success rate, wherein the initial weight is inversely proportional to the data transmission success rate;

轮询调度模块:用于根据各个所述业务流队列的初始权重以及所述数据地址进行各个所述业务流队列的分组数据的加权轮询调度处理,确定当前数据帧的目标传输队列。Polling scheduling module: used to perform weighted polling scheduling processing on the packet data of each service flow queue according to the initial weight of each service flow queue and the data address, and determine the target transmission queue of the current data frame.

为实现上述目的,本发明第三方面提供一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如第一方面及任一可行实现方式所示步骤。To achieve the above-mentioned purpose, the third aspect of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps shown in the first aspect and any feasible implementation method.

为实现上述目的,本发明第四方面提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如第一方面及任一可行实现方式所示步骤。To achieve the above-mentioned purpose, the fourth aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps shown in the first aspect and any feasible implementation method.

采用本发明实施例,具有如下有益效果:The embodiments of the present invention have the following beneficial effects:

本发明提供一种数据的轮询调度方法,方法包括:确定各个数据采集装置的数据传输状态,数据传输状态用于反映数据采集装置向无线通讯装置传输数据时的数据传输成功率,每个数据采集装置对应一个业务流队列,每个业务流队列包括若干分组数据以及各个分组数据的数据地址,数据采集装置与无线通讯装置之间具有无线通讯连接;利用数据传输成功率确定业务流队列的初始权重,初始权重与数据传输成功率呈反比;根据各个业务流队列的初始权重以及数据地址进行各个业务流队列的分组数据的加权轮询调度处理,确定当前数据帧的目标传输队列。通过上述方式,可以根据数据采集装置的数据传输状态来得到业务流队列的初始权重,进而通过初始权重进行加权轮询调度处理,得到当前数据帧的目标传输队列,可以在业务量异常时,实现按照初始权重分轻重缓急的加权轮询调度,实现了负载均衡,提升了业务传输效率。The present invention provides a data polling scheduling method, the method comprising: determining the data transmission state of each data acquisition device, the data transmission state is used to reflect the data transmission success rate when the data acquisition device transmits data to the wireless communication device, each data acquisition device corresponds to a service flow queue, each service flow queue includes a plurality of packet data and the data address of each packet data, and there is a wireless communication connection between the data acquisition device and the wireless communication device; using the data transmission success rate to determine the initial weight of the service flow queue, the initial weight is inversely proportional to the data transmission success rate; performing weighted polling scheduling processing on the packet data of each service flow queue according to the initial weight and data address of each service flow queue, and determining the target transmission queue of the current data frame. Through the above method, the initial weight of the service flow queue can be obtained according to the data transmission state of the data acquisition device, and then the weighted polling scheduling processing is performed according to the initial weight to obtain the target transmission queue of the current data frame. When the business volume is abnormal, the weighted polling scheduling can be realized according to the initial weight to prioritize the business flow queue, so as to achieve load balancing and improve the business transmission efficiency.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

其中:in:

图1为本发明实施例中一种数据的轮询调度系统的结构框图;FIG1 is a structural block diagram of a data polling scheduling system according to an embodiment of the present invention;

图2为本发明实施例中一种数据的轮询调度方法的流程图;FIG2 is a flow chart of a method for polling and scheduling data in an embodiment of the present invention;

图3为本发明实施例中一种业务流队列的轮询调度示意图;3 is a schematic diagram of polling scheduling of a service flow queue in an embodiment of the present invention;

图4为本发明实施例中一种数据的轮询调度方法的另一流程图;FIG4 is another flow chart of a data polling scheduling method according to an embodiment of the present invention;

图5为本发明实施例中一种数据的轮询调度装置的结构框图;FIG5 is a structural block diagram of a data polling scheduling device according to an embodiment of the present invention;

图6为本发明实施例中计算机设备的结构框图。FIG. 6 is a structural block diagram of a computer device in an embodiment of the present invention.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

请参阅图1,图1为本发明实施例中一种数据的轮询调度系统的结构框图,如图1所示数据的轮询调度系统包括数据采集装置、无线通讯装置102以及上位机103,数据采集装置、无线通讯装置102以及上位机103之间具有无线通讯连接,其中,数据采集装置可以为多个,因此,数据采集装置包括数据采集装置1011、数据采集装置1012、数据采集装置1013、……、数据采集装置101n;进一步的,数据采集装置用于对采集对象进行数据采集,数据采集装置包括但不限于电信号采集装置、温度采集装置、压力采集装置以及流量采集装置等等,采集对象包括但不限于变压器等电力设施;无线通讯装置102用于提供无线通讯连接通道,以使采集数据可以进行无线传输,该无线通讯装置可以为蓝牙通信模块;上位机用于接收采集数据,对采集数据进行监控、分析等等数据处理,比如,通过数据监控分析采集对象的运行状态信息,知晓运行情况。Please refer to Figure 1, which is a structural block diagram of a data polling and scheduling system in an embodiment of the present invention. As shown in Figure 1, the data polling and scheduling system includes a data acquisition device, a wireless communication device 102 and a host computer 103. There is a wireless communication connection between the data acquisition device, the wireless communication device 102 and the host computer 103. There can be multiple data acquisition devices. Therefore, the data acquisition device includes a data acquisition device 1011, a data acquisition device 1012, a data acquisition device 1013, ..., a data acquisition device 101n; further, the data acquisition device is used to collect data from the collection object, and the data acquisition device includes but is not limited to an electrical signal collection device, a temperature collection device, a pressure collection device, and a flow collection device, etc. The collection object is not limited to power facilities such as transformers; the wireless communication device 102 is used to provide a wireless communication connection channel so that the collected data can be wirelessly transmitted, and the wireless communication device can be a Bluetooth communication module; the host computer is used to receive the collected data, monitor and analyze the collected data, and other data processing, for example, the operation status information of the collection object is analyzed through data monitoring to know the operation status.

请参阅图2,图2为本发明实施例中一种数据的轮询调度方法的流程图,如图2所示方法包括如下步骤:Please refer to FIG. 2 , which is a flow chart of a data polling scheduling method according to an embodiment of the present invention. As shown in FIG. 2 , the method includes the following steps:

201、确定各个数据采集装置的数据传输状态,所述数据传输状态用于反映所述数据采集装置向无线通讯装置传输数据时的数据传输成功率,每个所述数据采集装置对应一个业务流队列,每个业务流队列包括若干分组数据以及各个分组数据的数据地址,所述数据采集装置与所述无线通讯装置之间具有无线通讯连接;201. Determine the data transmission status of each data acquisition device, wherein the data transmission status is used to reflect the data transmission success rate when the data acquisition device transmits data to the wireless communication device, each of the data acquisition devices corresponds to a service flow queue, each service flow queue includes a plurality of packet data and a data address of each packet data, and a wireless communication connection is established between the data acquisition device and the wireless communication device;

需要说明的是,该方法既可以应用于终端,也可以应用于服务器,本实施例以应用于终端举例说明,终端包括但不限于台式终端或移动终端,移动终端具体可以是手机、平板电脑、笔记本电脑等中的至少一种,服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现,上述数据采集装置有多个,每个数据采集装置按照预设采样周期对采集对象进行数据采集,采集到的数据会进行缓存生成业务流队列,每个数据采集装置一一对应一个业务流队列FQn,比如电信号采集装置对应一个电信号业务流队列、温度采集装置对应一个温度业务流队列、压力采集装置对应一个压力业务流队列以及流量采集装置对应一个流量业务流队列。其中,每个业务流队列由按照采样周期得到的采样数据组成,采样数据也可叫做业务流队列的分组数据,请参阅图3,图3为本发明实施例中一种业务流队列的轮询调度示意图,图3中包括四个业务流队列:业务流队列FQ1、业务流队列FQ2、业务流队列FQ3以及业务流队列FQ4,以及通过上述四个业务流队列得到的目标传输队列DQ1,其中,业务流队列FQ1包括分组数据A1及分组数据A2……;业务流队列FQ2包括分组数据B1及分组数据B2……;业务流队列FQ3包括分组数据C1及分组数据C2……;业务流队列FQ4包括分组数据D1及分组数据D2……;目标传输队列DQ1包括分组数据B1、分组数据A1、分组数据B1、分组数据C1……;其中,业务流队列FQn的分组数据是与其对应的数据采集装置采集得到,目标传输队列DQ1的分组数据是采用本实施所示的数据的轮询调度方法得到的。It should be noted that the method can be applied to both terminals and servers. This embodiment is illustrated by applying to terminals. The terminals include but are not limited to desktop terminals or mobile terminals. The mobile terminals can specifically be at least one of mobile phones, tablet computers, laptop computers, etc. The server can be implemented with an independent server or a server cluster composed of multiple servers. There are multiple data acquisition devices, each of which collects data on the collection object according to a preset sampling period. The collected data will be cached to generate a business flow queue. Each data acquisition device corresponds to a business flow queue FQn one by one. For example, an electrical signal acquisition device corresponds to an electrical signal business flow queue, a temperature acquisition device corresponds to a temperature business flow queue, a pressure acquisition device corresponds to a pressure business flow queue, and a flow acquisition device corresponds to a flow business flow queue. Wherein, each business flow queue is composed of sampled data obtained according to a sampling period, and the sampled data can also be called the packet data of the business flow queue. Please refer to Figure 3, which is a polling scheduling diagram of a business flow queue in an embodiment of the present invention. Figure 3 includes four business flow queues: business flow queue FQ1, business flow queue FQ2, business flow queue FQ3 and business flow queue FQ4, and a target transmission queue DQ1 obtained by the above four business flow queues, wherein the business flow queue FQ1 includes packet data A1 and packet data A2...; the business flow queue FQ2 includes packet data B1 and packet data B2...; the business flow queue FQ3 includes packet data C1 and packet data C2...; the business flow queue FQ4 includes packet data D1 and packet data D2...; the target transmission queue DQ1 includes packet data B1, packet data A1, packet data B1, packet data C1...; wherein, the packet data of the business flow queue FQn is collected by the corresponding data collection device, and the packet data of the target transmission queue DQ1 is obtained by using the polling scheduling method of the data shown in this embodiment.

示例性的,图3中第一个队列FQ1是电信号业务,里面的每一个元素A1、A2等为电信号传感器输出的数据的地址;第二个队列FQ2是温度业务,里面的每一个元素B1、B2等为温度传感器输出的数据的地址;同理,队列FQ3和FQ4分别是压力业务队列和流量业务队列。总结来说:每个业务对应为一个业务队列,队列的元素为对应业务的数据地址,每个数据地址都存有对应的分组数据。各业务队列,按照事先定义的各业务权重通过加权轮询算法排序并发送到离开队列,而空业务队列不参与排序和发送。For example, the first queue FQ1 in Figure 3 is an electrical signal service, and each element A1, A2, etc. in it is the address of the data output by the electrical signal sensor; the second queue FQ2 is a temperature service, and each element B1, B2, etc. in it is the address of the data output by the temperature sensor; similarly, queues FQ3 and FQ4 are pressure service queues and flow service queues, respectively. In summary: each service corresponds to a service queue, and the elements of the queue are the data addresses of the corresponding services, and each data address stores the corresponding packet data. Each service queue is sorted by a weighted polling algorithm according to the pre-defined service weights and sent to the departure queue, while the empty service queue does not participate in the sorting and sending.

可以理解的是,图3以一个目标传输队列DQ1为例对本实施例进行说明,但本申请对上述目标传输队列DQ1数量不作限定,目标传输队列DQ1的数量可以为多个。It is understandable that FIG. 3 illustrates this embodiment by taking one target transmission queue DQ1 as an example, but the present application does not limit the number of the target transmission queues DQ1 , and the number of the target transmission queues DQ1 may be multiple.

进一步的,为了提升多个数据采集装置进行数据传输时的业务传输效率,需要确定各个数据采集装置的数据传输状态,该数据传输状态用于反映所述数据采集装置向无线通讯装置传输数据时的数据传输成功率,以此确定多个数据采集装置进行数据传输时,各个数据采集装置的数据传输是否会出现异常。进一步的,数据传输成功率与通信成功率呈正比,因此,可以通过通信成功率来衡量数据传输成功率,具体参考下式:Furthermore, in order to improve the business transmission efficiency when multiple data acquisition devices perform data transmission, it is necessary to determine the data transmission status of each data acquisition device, which is used to reflect the data transmission success rate when the data acquisition device transmits data to the wireless communication device, so as to determine whether the data transmission of each data acquisition device will be abnormal when multiple data acquisition devices perform data transmission. Furthermore, the data transmission success rate is proportional to the communication success rate. Therefore, the data transmission success rate can be measured by the communication success rate. For details, refer to the following formula:

通信成功率=(发送次数-CRC失败次数)/发送次数×100%。Communication success rate = (number of transmissions - number of CRC failures) / number of transmissions × 100%.

202、利用所述数据传输成功率确定所述业务流队列的初始权重,所述初始权重与所述数据传输成功率呈反比;202. Determine an initial weight of the service flow queue using the data transmission success rate, where the initial weight is inversely proportional to the data transmission success rate;

进一步的,通过步骤201确定的数据传输成功率来为不同的业务流队列赋予不同的初始权重,初始权重与数据传输成功率呈反比,比较各个数据采集装置的数据传输成功率,如果某个数据采集装置的数据传输成功率较高,则该数据采集装置的初始权重相比其他数据采集装置的初始权重赋值较低,反之,如果某个数据采集装置的数据传输成功率较低,则该数据采集装置的初始权重相比其他数据采集装置的初始权重赋值较高。其中初始权重用于反映业务流队列的数据传输资源,初始权重越高数据传输资源越多。Furthermore, different initial weights are assigned to different service flow queues through the data transmission success rate determined in step 201. The initial weight is inversely proportional to the data transmission success rate. The data transmission success rates of various data acquisition devices are compared. If the data transmission success rate of a certain data acquisition device is higher, the initial weight of the data acquisition device is lower than the initial weights of other data acquisition devices. Conversely, if the data transmission success rate of a certain data acquisition device is lower, the initial weight of the data acquisition device is higher than the initial weights of other data acquisition devices. The initial weight is used to reflect the data transmission resources of the service flow queue. The higher the initial weight, the more data transmission resources.

需要说明的是,如果当某一时刻对于环境变量的变化异常,终端需加大业务量对每一个传感器都上报的情况下,势必造成上报异常堵塞等情况。这时数据量大的业务流队列的数据传输成功率会低于其他数据量小的,通过步骤202进行赋予权重处理后,其会拥有较高初始权重,得到更多数据传输资源,以此实现负载均衡。It should be noted that if the terminal needs to increase the traffic volume to report to each sensor due to abnormal changes in environmental variables at a certain moment, it will inevitably cause abnormal reporting congestion, etc. At this time, the data transmission success rate of the service flow queue with a large data volume will be lower than that of other service flow queues with a small data volume. After the weighting process is performed in step 202, it will have a higher initial weight and obtain more data transmission resources, thereby achieving load balancing.

203、根据各个所述业务流队列的初始权重以及所述数据地址进行各个所述业务流队列的分组数据的加权轮询调度处理,确定当前数据帧的目标传输队列。203. Perform weighted round-robin scheduling of the packet data of each of the service flow queues according to the initial weight of each of the service flow queues and the data address, and determine a target transmission queue for the current data frame.

进而,可以通过不同业务流队列的不同初始权重输出其数据地址,以实现数据传输,具体的,根据各个所述业务流队列的初始权重以及所述数据地址进行各个所述业务流队列的分组数据的加权轮询调度处理,确定当前数据帧的目标传输队列,比如,初始权重高的业务流队列获得的数据传输资源较多,初始权重低的业务流队列获得的数据传输资源较多。Furthermore, the data addresses of different service flow queues can be output through different initial weights to achieve data transmission. Specifically, weighted polling scheduling processing is performed on the packet data of each service flow queue according to the initial weight of each service flow queue and the data address to determine the target transmission queue of the current data frame. For example, a service flow queue with a high initial weight obtains more data transmission resources, and a service flow queue with a low initial weight obtains more data transmission resources.

示例性的,传统蓝牙通信链路传输模式下,在业务量大,速率高时,会导致业务传输效率降低。当队列数据十分庞大且链路速率较高时,存在很多的空队列,它们不需要转发。因此,在存在上述情况下,采用本申请的方法,通过将业务数据进行分发的时采用队列进行缓存存储,并将其根据不同的业务进行编号,采用轮询算法,建立单独的离开队列(传输队列DQ)用来存储非空队列输出的分组数据的数据地址。针对不同物理参量的传感器可以区分为不同的业务。Exemplarily, in the traditional Bluetooth communication link transmission mode, when the business volume is large and the rate is high, the business transmission efficiency will be reduced. When the queue data is very large and the link rate is high, there are many empty queues that do not need to be forwarded. Therefore, in the presence of the above situation, the method of the present application is adopted, by distributing the business data using queues for cache storage, and numbering them according to different businesses, using a polling algorithm, and establishing a separate departure queue (transmission queue DQ) to store the data address of the packet data output by the non-empty queue. Sensors for different physical parameters can be divided into different businesses.

轮询调度方法虽然一定程度上给每个非空业务流队列相同的服务机会,但是当一些队列的业务量较高较重时,让其获得更多的传输机会比较困难,且该传输信号的通信成功率较低。而加权轮询调度算法,会在相同的业务流下,会赋予更高权重W,从而可以获得与权重匹配的传输资源,比如发送该队列的W个分组数据,按照轻重缓急给不同的队列分配不同的服务量从而达到高业务量下的负载均衡。通过设置平滑加权轮询算法,不断的业务信息采集,如果环境状态不变,会产生很多重复消息而导致数据冗余,使得传输效率降低,设置消息缓存机制、休眠模式等。Although the polling scheduling method gives each non-empty business flow queue the same service opportunity to a certain extent, it is difficult for some queues to obtain more transmission opportunities when the business volume is high and heavy, and the communication success rate of the transmission signal is low. The weighted polling scheduling algorithm will give a higher weight W to the same business flow, so that transmission resources matching the weight can be obtained. For example, W packet data of the queue are sent, and different service volumes are allocated to different queues according to the urgency to achieve load balancing under high business volume. By setting a smooth weighted polling algorithm, continuous business information collection, if the environmental state remains unchanged, many duplicate messages will be generated, resulting in data redundancy, reducing transmission efficiency, setting message cache mechanism, sleep mode, etc.

需要说明的是,根据蓝牙链路的数据发送规则,传感器业务来临时,每一个蓝牙数据采集业务输出端不仅需要配置缓存,还需要进行业务调度。为了提高蓝牙数据传输的稳定性与效率,传统轮询调度可以给每个非空业务相同的服务机会,但当一些队列的业务量较重或蓝牙信号的传输成功率较低时,要让其获得更多的传输机会比较困难。因此在轮询基础上加一个加权轮询系统使每个非空业务流队列,每一个FQ(业务流)都有一个与之相关联的整数权重Wi,当服务到队列i时,发送该队列的Wi个分组业务,提高不同队列分配不同的终端业务量。It should be noted that according to the data transmission rules of the Bluetooth link, when the sensor service comes, each Bluetooth data acquisition service output terminal not only needs to configure the cache, but also needs to perform service scheduling. In order to improve the stability and efficiency of Bluetooth data transmission, traditional polling scheduling can give each non-empty service the same service opportunity, but when the service volume of some queues is heavy or the transmission success rate of Bluetooth signals is low, it is difficult to allow them to obtain more transmission opportunities. Therefore, a weighted polling system is added on the basis of polling so that each non-empty service flow queue and each FQ (service flow) have an integer weight Wi associated with it. When the service is sent to queue i, the Wi packet services of the queue are sent to improve the allocation of different terminal services to different queues.

进一步的,加权轮询调度通过添加两个离开队列(预设传输队列)以及权重计数器存储的预设权值(初始权重),两个离开队列一个处于激活状态,另一个处于备用状态,负责安排下一个数据帧传输。在业务需求大时,在一轮业务流开始时,计数器初始一个权重,然后两个非空队列按照权重值轮流服务。Furthermore, weighted round-robin scheduling adds two departure queues (preset transmission queues) and the preset weights (initial weights) stored in the weight counter. One of the two departure queues is in an active state, and the other is in a standby state, responsible for arranging the next data frame transmission. When the service demand is large, at the beginning of a round of service flow, the counter initializes a weight, and then the two non-empty queues take turns to serve according to the weight value.

本发明提供一种数据的轮询调度方法,方法包括:确定各个数据采集装置的数据传输状态,数据传输状态用于反映数据采集装置向无线通讯装置传输数据时的数据传输成功率,每个数据采集装置对应一个业务流队列,每个业务流队列包括若干分组数据以及各个分组数据的数据地址,数据采集装置与无线通讯装置之间具有无线通讯连接;利用数据传输成功率确定业务流队列的初始权重,初始权重与数据传输成功率呈反比;根据各个业务流队列的初始权重以及数据地址进行各个业务流队列的分组数据的加权轮询调度处理,确定当前数据帧的目标传输队列。通过上述方式,可以根据数据采集装置的数据传输状态来得到业务流队列的初始权重,进而通过初始权重进行加权轮询调度处理,得到当前数据帧的目标传输队列,可以在业务量异常时,实现按照初始权重分轻重缓急的加权轮询调度,实现了负载均衡,提升了业务传输效率。The present invention provides a data polling scheduling method, the method comprising: determining the data transmission state of each data acquisition device, the data transmission state is used to reflect the data transmission success rate when the data acquisition device transmits data to the wireless communication device, each data acquisition device corresponds to a service flow queue, each service flow queue includes a plurality of packet data and the data address of each packet data, and there is a wireless communication connection between the data acquisition device and the wireless communication device; using the data transmission success rate to determine the initial weight of the service flow queue, the initial weight is inversely proportional to the data transmission success rate; performing weighted polling scheduling processing on the packet data of each service flow queue according to the initial weight and data address of each service flow queue, and determining the target transmission queue of the current data frame. Through the above method, the initial weight of the service flow queue can be obtained according to the data transmission state of the data acquisition device, and then the weighted polling scheduling processing is performed according to the initial weight to obtain the target transmission queue of the current data frame. When the business volume is abnormal, the weighted polling scheduling can be realized according to the initial weight to prioritize the business flow queue, so as to achieve load balancing and improve the business transmission efficiency.

请参阅图4,图4为本发明实施例中一种数据的轮询调度方法的另一流程图,如图4所示方法包括如下步骤:Please refer to FIG. 4, which is another flow chart of a data polling scheduling method according to an embodiment of the present invention. As shown in FIG. 4, the method includes the following steps:

401、确定各个数据采集装置的数据传输状态,所述数据传输状态用于反映所述数据采集装置向无线通讯装置传输数据时的数据传输成功率,每个所述数据采集装置对应一个业务流队列,每个业务流队列包括若干分组数据以及各个分组数据的数据地址,所述数据采集装置与所述无线通讯装置之间具有无线通讯连接;401. Determine the data transmission status of each data acquisition device, wherein the data transmission status is used to reflect the data transmission success rate when the data acquisition device transmits data to the wireless communication device, each of the data acquisition devices corresponds to a service flow queue, each service flow queue includes a plurality of packet data and a data address of each packet data, and a wireless communication connection is established between the data acquisition device and the wireless communication device;

需要说明的是,步骤401的内容与图2所示步骤201的内容相似,为避免重复此处不作赘述,具体可参阅图2所示步骤201的内容。It should be noted that the content of step 401 is similar to the content of step 201 shown in FIG. 2 , and is not described here to avoid repetition. For details, please refer to the content of step 201 shown in FIG. 2 .

在一种可行实现方式中,所述装置无线通讯装置包括蓝牙设备,则步骤401可以包括步骤P01-P03:In a feasible implementation, the device wireless communication device includes a Bluetooth device, and step 401 may include steps P01-P03:

P01、控制所述蓝牙设备发出广播召读信号;P01, controlling the Bluetooth device to send a broadcast call signal;

P02、接收各个数据采集装置返回的所述广播召读信号的召读回复结果,所述召读回复结果至少包括数据采集装置的设备类型、信号强度以及信噪比;P02, receiving the call-reading reply result of the broadcast call-reading signal returned by each data acquisition device, wherein the call-reading reply result at least includes the device type, signal strength and signal-to-noise ratio of the data acquisition device;

P03、根据所述设备类型、信号强度以及信噪比,确定各个数据采集装置的数据传输状态。P03. Determine the data transmission status of each data acquisition device according to the device type, signal strength and signal-to-noise ratio.

需要说明的是,为了提高数据传输状态确定的准确性,可以通过控制蓝牙设备实时发出广播召读信号,对数据传输状态进行判断,该广播召读信号用于获取数据采集装置的设备类型、信号强度以及信噪比等等与信号传输相关的信号传输特征的广播召读结果,通过各个数据采集装置返回的广播召读信号的召读回复结果,接收各个数据采集装置返回的广播召读信号的至少包括数据采集装置的设备类型、信号强度以及信噪比等能反映蓝牙传感器通信状态的信号量的召读回复结果;根据设备类型、信号强度、信噪比及相关通信成功率等通信状态信号量,确定各个数据采集装置的数据传输状态。It should be noted that in order to improve the accuracy of determining the data transmission status, the data transmission status can be judged by controlling the Bluetooth device to send a broadcast call signal in real time. The broadcast call signal is used to obtain the broadcast call result of the signal transmission characteristics related to the signal transmission, such as the device type, signal strength and signal-to-noise ratio of the data acquisition device, and the call reply result of the broadcast call signal returned by each data acquisition device. The broadcast call signal returned by each data acquisition device at least includes the device type of the data acquisition device, signal strength and signal-to-noise ratio, etc., which can reflect the communication status of the Bluetooth sensor. The data transmission status of each data acquisition device is determined according to the communication status signal quantities such as the device type, signal strength, signal-to-noise ratio and related communication success rate.

结合传感器设备类型,信号强度,以及信噪比等参数衡量蓝牙通信成功率,相应做出初始权重的设定,通信成功率低的给予高权重,相应轮询的次数增加,提升终端整体的模拟量采集效果。The Bluetooth communication success rate is measured by combining parameters such as sensor device type, signal strength, and signal-to-noise ratio, and the initial weight is set accordingly. A high weight is given to devices with low communication success rates, and the number of polling times is increased accordingly to improve the overall analog quantity acquisition effect of the terminal.

示例性的,在一轮业务周期中,通过蓝牙设备的广播召读,识别出不同传感器的不同状态量,例如设备类型,信号强度RSSI,信噪比等,召读回复结果通过状态字写入终端蓝牙设备存储区,根据不同采集装置的信号发射状态,设置初始权重,假如B设备(温度传感器)信号召读回的数据中表征信号强度4、信噪比10db,说明该信号通信成功率较低,则设定B设备业务初始权重为最大,如此一来,在该轮业务周期的轮询调度时B设备的采集次数相应增加,从而达到均衡采集,并且全方位数据采集的目的。Exemplarily, in one business cycle, different status quantities of different sensors are identified through the broadcast call of the Bluetooth device, such as device type, signal strength RSSI, signal-to-noise ratio, etc. The call reply result is written into the terminal Bluetooth device storage area through the status word, and the initial weight is set according to the signal transmission status of different acquisition devices. If the data recalled from the signal of device B (temperature sensor) shows a signal strength of 4 and a signal-to-noise ratio of 10db, indicating that the signal communication success rate is low, the initial weight of the B device service is set to the maximum. In this way, the number of collection times of device B increases accordingly during the polling scheduling of this business cycle, thereby achieving balanced collection and all-round data collection.

402、利用所述数据传输成功率确定所述业务流队列的初始权重,所述初始权重与所述数据传输成功率呈反比;402. Determine an initial weight of the service flow queue using the data transmission success rate, where the initial weight is inversely proportional to the data transmission success rate;

需要说明的是,步骤402与图2所示步骤202内容相似,为避免重复此处不作赘述,具体可参阅图2所示步骤202内容。It should be noted that step 402 is similar to step 202 shown in FIG. 2 , and is not described here to avoid repetition. For details, please refer to the content of step 202 shown in FIG. 2 .

在一种可行实现方式中,所述初始权重为静态权重与动态权重之和,则步骤402可以包括步骤I01-I02:In a feasible implementation, the initial weight is the sum of the static weight and the dynamic weight, and step 402 may include steps I01-I02:

I01、利用所述数据传输成功率确实所述静态权重,所述静态权重与所述数据传输成功率呈反比;I01. Determine the static weight by using the data transmission success rate, wherein the static weight is inversely proportional to the data transmission success rate;

I02、利用所述静态权重以及预设的动态权重,确定所述初始权重。I02. Determine the initial weight using the static weight and the preset dynamic weight.

需要说明的是,为了保证当前数据帧的每一次轮询调度时初始权重的准确性,因此,将初始权重W分为静态权重Weight以及动态权重currentWeight两部分,初始权重为静态权重与动态权重之和,其中,静态权重不会因为每次轮询调度而改变,静态权重与所述数据传输成功率呈反比,利用所述数据传输成功率确实所述静态权重,而动态权重随着每次轮询调度会有所变化,使得每轮询调度一次初始权重就会变化一次,其中,首次轮询调度的动态权重可以是预先设置的,动态权重的预设值可以为0。It should be noted that in order to ensure the accuracy of the initial weight in each polling scheduling of the current data frame, the initial weight W is divided into two parts: static weight Weight and dynamic weight currentWeight. The initial weight is the sum of the static weight and the dynamic weight, wherein the static weight will not change due to each polling scheduling, and the static weight is inversely proportional to the data transmission success rate. The static weight is confirmed by the data transmission success rate, and the dynamic weight will change with each polling scheduling, so that the initial weight will change once each polling scheduling, wherein the dynamic weight of the first polling scheduling can be pre-set, and the preset value of the dynamic weight can be 0.

在一种可行实现方式中,动态权重的初始值也可以不设为0,动态权重的预设值还可以根据不同业务流队列的业务流请求的需求量来设置,故方法还包括下述步骤U01-U02:In a feasible implementation, the initial value of the dynamic weight may not be set to 0, and the preset value of the dynamic weight may also be set according to the demand for service flow requests of different service flow queues, so the method further includes the following steps U01-U02:

U01、统计不同业务流的业务流请求数量,所述业务流请求数量用于反映所述业务流的数据读取需求;U01. Count the number of service flow requests of different service flows, where the number of service flow requests is used to reflect the data reading requirements of the service flows;

U02、根据所述业务流请求数量确定所述第二权重的预设值。U02. Determine a preset value of the second weight according to the number of business flow requests.

需要说明的是,不同的业务流请求需量不同,所以可以给不同的数据采集装置配置不同的动态权重,,按照不同的业务请求分配好初始动态权重。具体的,统计不同业务流的业务流请求数量,所述业务流请求数量用于反映所述业务流的数据读取需求;根据所述业务流请求数量确定所述第二权重的预设值。示例性的,业务流请求数量多那么业务流的数据读取需求就高,进而可以将对应的业务流队列的动态权重的预设值(预设值也即初始值)设置较高数值;业务流请求数量少那么业务流的数据读取需求就少,进而可以将对应的业务流队列的动态权重的预设值(预设值也即初始值)设置较低数值。在此距离不作具体限定。It should be noted that different business flow request requirements are different, so different dynamic weights can be configured for different data acquisition devices, and initial dynamic weights can be assigned according to different business requests. Specifically, the number of business flow requests for different business flows is counted, and the number of business flow requests is used to reflect the data reading requirements of the business flows; the preset value of the second weight is determined according to the number of business flow requests. Exemplarily, if the number of business flow requests is large, the data reading requirements of the business flows are high, and then the preset value (preset value is also the initial value) of the dynamic weight of the corresponding business flow queue can be set to a higher value; if the number of business flow requests is small, the data reading requirements of the business flows are small, and then the preset value (preset value is also the initial value) of the dynamic weight of the corresponding business flow queue can be set to a lower value. No specific limitation is made here.

403、确定各个所述初始权重中的最大初始权重对应的目标业务流队列;403. Determine a target service flow queue corresponding to a maximum initial weight among the initial weights;

404、将所述目标业务流队列中的第一个数据地址对应的分组数据读取至当前数据帧的预设传输队列,并更新所述目标业务流队列,以及记录轮询次数i=i+1;404. Read the packet data corresponding to the first data address in the target service flow queue to the preset transmission queue of the current data frame, update the target service flow queue, and record the polling number i=i+1;

需要说明的是,为了保证业务传输效率,本申请是根据初始权重的大小进行每次轮询调度的数据读取,以此得到当前数据帧的目标传输队列,具体的,由于初始权重与数据传输成功率呈反比,而数据传输成功率与数据量压力呈反比,因此,首先要确定各个初始权重中的最大初始权重对应的目标业务流队列,得到数据压力最大的目标业务流队列,进行本次轮询调度的数据读取,也即将目标业务流队列的分组数据传输至预设传输队列,由于数据已经传输至预设传输队列,因此需要更新目标业务流队列,并且并将轮询次数i+1,记录轮询次数i=i+1。其中,轮询次数i的初始值可以0或1等等,在此不作限定。It should be noted that in order to ensure the efficiency of business transmission, the present application performs data reading for each polling schedule according to the size of the initial weight, so as to obtain the target transmission queue of the current data frame. Specifically, since the initial weight is inversely proportional to the data transmission success rate, and the data transmission success rate is inversely proportional to the data volume pressure, it is necessary to first determine the target business flow queue corresponding to the maximum initial weight among the initial weights, obtain the target business flow queue with the greatest data pressure, and perform data reading for this polling schedule, that is, to transmit the packet data of the target business flow queue to the preset transmission queue. Since the data has been transmitted to the preset transmission queue, it is necessary to update the target business flow queue, and record the polling number i=i+1 by setting the polling number i+1. Among them, the initial value of the polling number i can be 0 or 1, etc., which is not limited here.

405、利用所述最大初始权重、以及各个所述业务流队列的初始权重进行初始权重更新处理,确定各个所述业务流队列的更新后的初始权重,并返回执行所述确定所述初始权重中的最大权重对应的目标业务流队列的步骤,直至所述轮询次数i等于预设轮询次数阈值,得到当前数据帧的目标传输队列。405. Perform initial weight update processing using the maximum initial weight and the initial weights of each of the service flow queues to determine the updated initial weights of each of the service flow queues, and return to execute the step of determining the target service flow queue corresponding to the maximum weight in the initial weights until the polling number i is equal to the preset polling number threshold, thereby obtaining the target transmission queue of the current data frame.

进一步的,由于每次轮询调度之后,目标业务流队列的数据会发生变化,因此,需要更新下一次轮询调度时的初始权重,在本实施例中,一个数据帧的轮询调度周期内,静态权重始终不变,动态权重随轮询次数增加而动态改变。具体的,利用所述最大初始权重、以及各个所述业务流队列的初始权重进行初始权重更新处理,确定各个所述业务流队列的更新后的初始权重,并返回执行所述确定所述初始权重中的最大权重对应的目标业务流队列的步骤,直至所述轮询次数i等于预设轮询次数阈值,得到当前数据帧的目标传输队列,其中,该预设轮询次数阈值为一个数据帧对应的轮询调度周期内的轮询次数最大值,可以为10次或20次等等,可以基于实际情况进行设置,本申请在此不作限定。Furthermore, since the data of the target service flow queue will change after each polling scheduling, it is necessary to update the initial weight for the next polling scheduling. In this embodiment, the static weight remains unchanged during the polling scheduling cycle of a data frame, and the dynamic weight changes dynamically as the number of polling times increases. Specifically, the initial weight update process is performed using the maximum initial weight and the initial weights of each of the service flow queues to determine the updated initial weights of each of the service flow queues, and the step of determining the target service flow queue corresponding to the maximum weight in the initial weight is returned to execute until the polling number i is equal to the preset polling number threshold, and the target transmission queue of the current data frame is obtained, wherein the preset polling number threshold is the maximum polling number in the polling scheduling cycle corresponding to a data frame, which can be 10 times or 20 times, etc., and can be set based on actual conditions, and this application is not limited here.

在一种可行实现方式中,步骤405可以包括步骤Y01-Y02:In a feasible implementation, step 405 may include steps Y01-Y02:

Y01、利用所述最大初始权重以及各个所述初始权重的静态权重和进行所述目标业务流队列的动态权重更新处理,确定所述目标业务流队列更新后的动态权重,所述更新后的动态权重为最大初始权重与所述静态权重和之差;Y01, using the maximum initial weight and the static weight sum of each of the initial weights to perform dynamic weight update processing on the target service flow queue, and determining the updated dynamic weight of the target service flow queue, wherein the updated dynamic weight is the difference between the maximum initial weight and the static weight sum;

Y02、利用所述更新后的动态权重、除所述目标业务流队列以外的其余业务流队列的动态权重以及所述静态权重进行初始权重更新处理,确定各个所述业务流队列的更新后的初始权重。Y02. Perform initial weight update processing using the updated dynamic weights, the dynamic weights of the remaining service flow queues except the target service flow queue, and the static weights to determine the updated initial weights of each service flow queue.

其中,由于每次轮询仅输出最大初始权重对应的目标业务流队列的分组数据地址,因此,每次数据输出之后,需要通过步骤Y01先对该目标业务流队列的动态权重进行更新,示例性的,该目标业务流队列的动态权重的更新可以为最大初始权重与各个初始权重的权重和之差。最后通过步骤Y02利用所述更新后的动态权重、除所述目标业务流队列以外的其余业务流队列的动态权重以及所述静态权重进行初始权重更新处理,确定各个所述业务流队列的更新后的初始权重。Among them, since each polling only outputs the packet data address of the target service flow queue corresponding to the maximum initial weight, after each data output, it is necessary to first update the dynamic weight of the target service flow queue through step Y01. Exemplarily, the update of the dynamic weight of the target service flow queue can be the difference between the maximum initial weight and the sum of the weights of each initial weight. Finally, step Y02 is used to perform initial weight update processing using the updated dynamic weight, the dynamic weights of the remaining service flow queues except the target service flow queue, and the static weight to determine the updated initial weights of each service flow queue.

继续以图3为例,四个业务流队列分别为业务流队列FQ1至FQ4,其中,动态权重currentWeight均为0、静态权重weight分别为:【3,5,1,1】;Continuing with FIG. 3 as an example, the four service flow queues are service flow queues FQ1 to FQ4, wherein the dynamic weights currentWeight are all 0, and the static weights weight are respectively: [3, 5, 1, 1];

进一步的,初始权重W=动态权重currentWeight+静态权重weight,故初始权重W分别为:【3,5,1,1】,由于静态权重不变,故权重大小的判断也可以看做动态权重大小的判断,其中,动态权重currentWeight=动态权重currentWeight+静态权重weight,由于初始的动态权重为0,那么此时动态权重currentWeight为【3,5,1,1】,此时,最大初始权重MaxcurrentWeight为5,故目标业务流队列为业务流队列FQ2;Furthermore, the initial weight W = dynamic weight currentWeight + static weight weight, so the initial weights W are: [3, 5, 1, 1] respectively. Since the static weights do not change, the judgment of the weight size can also be regarded as the judgment of the dynamic weight size, where the dynamic weight currentWeight = dynamic weight currentWeight + static weight weight. Since the initial dynamic weight is 0, the dynamic weight currentWeight is [3, 5, 1, 1] at this time. At this time, the maximum initial weight MaxcurrentWeight is 5, so the target service flow queue is the service flow queue FQ2;

故第一次轮询调度时:输出FQ2的分组数据B1,进而更新其动态权重currentWeight,令动态权重currentWeight=最大初始权重MaxcurrentWeight-静态权重和sum(Weight)=5-(3+5+1+1)=-5,此时更新后的动态权重为【-5】,此时各个业务流队列的动态权重暂时变为【3,-5,1,1】;Therefore, during the first round-robin scheduling, the packet data B1 of FQ2 is output, and its dynamic weight currentWeight is updated, and the dynamic weight currentWeight = the maximum initial weight MaxcurrentWeight - the static weight sum(Weight) = 5 - (3 + 5 + 1 + 1) = -5. At this time, the updated dynamic weight is [-5]. At this time, the dynamic weights of each service flow queue temporarily become [3, -5, 1, 1].

进而更新每个业务流队列的初始权重,也即初始权重W=动态权重currentWeight+静态权重weight;也即FQ1的初始权重更新为【3+3=6】,FQ2的初始权重更新为【(-5)+5=0】,FQ3的初始权重更新为【1+1=2】,FQ4的初始权重更新为【(1+1=2】,最后,初始权重W为【6,0,2,2】。Then, the initial weight of each service flow queue is updated, that is, the initial weight W = dynamic weight currentWeight + static weight weight; that is, the initial weight of FQ1 is updated to [3+3=6], the initial weight of FQ2 is updated to [(-5)+5=0], the initial weight of FQ3 is updated to [1+1=2], and the initial weight of FQ4 is updated to [(1+1=2], and finally, the initial weight W is [6, 0, 2, 2].

进一步的,第二次轮询调度时,目标业务流队列为FQ1,重复上述过程,最后,本次数据传输后,初始权重W为【-1,5,3,3】。以此类推直到达到轮询次数的最大值,则结束当前数据帧的数据轮询调度。Furthermore, in the second round of polling scheduling, the target service flow queue is FQ1, and the above process is repeated. Finally, after this data transmission, the initial weight W is [-1, 5, 3, 3]. This process is repeated until the maximum number of polling times is reached, and the data polling scheduling of the current data frame ends.

示例性的,可以参考表1,表1示出了四个业务流队列在预设轮询次数阈值为10次的情况下各个初始权重的更新过程,表1中初始的动态权重currentWeight为0,静态权重weight为3,5,1,1,Max(currentWeight)标志最大初始权重,由于静态权重不变,故该最大权重实质也可以看做动态权重的最大,初始权重的更新也可看做动态权重的更新,result表示目标业务流队列的分组数据,sum(Weight)表示静态权重和,表1如下:For example, reference may be made to Table 1, which shows the updating process of each initial weight of four service flow queues when the preset polling number threshold is 10 times. In Table 1, the initial dynamic weight currentWeight is 0, the static weight weight is 3, 5, 1, 1, and Max (currentWeight) marks the maximum initial weight. Since the static weight remains unchanged, the maximum weight can actually be regarded as the maximum dynamic weight. The update of the initial weight can also be regarded as the update of the dynamic weight. Result represents the packet data of the target service flow queue, and sum (Weight) represents the static weight sum. Table 1 is as follows:

表1Table 1

需要说明的是,初始状态:A(3),B(5),C(1),D(1),其中,A:电信号;B:温度;C:压力;D:流量,可以看出,当进行完10次轮询后,开始进入下一个循环,因此一遍轮询后的业务流应该是:BABCABDBAB这一帧,得到当前数据帧的目标传输队列,其中,B温度这一业务占比最大。进而可以动态的实现按照初始权重分轻重缓急的进行数据输出,最后实现了目标传输队列的分组数据B有5个、分组数据A有3个、分组数据C以及D均有5个,每个业务的权重比A:B:C:D=3:5:1:1,达到重点关注的某个采集器采集数据量最多,且可以按需调整动态权重分配,达到业务负载均衡的目的,提高终端的蓝牙传感器采集稳定性。It should be noted that the initial state is: A(3), B(5), C(1), D(1), where A: electrical signal; B: temperature; C: pressure; D: flow. It can be seen that after 10 pollings, the next cycle begins. Therefore, the business flow after one polling should be: BABCABDBAB frame, and the target transmission queue of the current data frame is obtained, among which the business of B temperature accounts for the largest proportion. Then, the data output can be dynamically realized according to the initial weight. Finally, the target transmission queue has 5 packets of data B, 3 packets of data A, and 5 packets of data C and D. The weight ratio of each business is A:B:C:D=3:5:1:1, so that the data collected by a certain collector is the largest, and the dynamic weight distribution can be adjusted as needed to achieve the purpose of business load balancing and improve the stability of terminal Bluetooth sensor collection.

在一种可行实现方式中,所述数据采集装置用于采集电力设备的运行数据,则所述方法还包括:将所述目标传输队列上传至预设上位机,所述上位机用于根据所述目标传输队列进行数据分析,确定所述电力设备的运行状态。In a feasible implementation, the data acquisition device is used to collect operating data of the power equipment, and the method also includes: uploading the target transmission queue to a preset host computer, and the host computer is used to perform data analysis based on the target transmission queue to determine the operating status of the power equipment.

可以理解的是,得到上述目标传输队列之后,可以将目标传输队列上传至预设上位机,以在采集对象为电力设备时,对其运行数据进行数据分析,监控运行状态。在运行状态异常时可以进行预警。不同于传统数据收集的载波通信,采用蓝牙统计分析模型分析,其中通过记录各个蓝牙传感器的环境量对台区运行状态进行分析,通过各项数据排查台区运行安全隐患。蓝牙系统组网收集各个传感器设备的特征状态信息,如温度,湿度,环境运行安全状态。蓝牙通信技术支持移动互联网。各采集模块以蓝牙螺旋天线实现对温度数据的接收,通过数据总线与上位机串口相连,并将处理过的各类参数数据上传至上位机。例如温度参数,无线网络通信模块蓝牙组网后,将温度接收模块与多个温度采集模块进行无线组网,传输在各自的业务流。It is understandable that after obtaining the above-mentioned target transmission queue, the target transmission queue can be uploaded to the preset host computer, so that when the collection object is the power equipment, its operation data can be analyzed and the operation status can be monitored. An early warning can be issued when the operation status is abnormal. Different from the carrier communication of traditional data collection, the Bluetooth statistical analysis model is used for analysis, in which the operation status of the substation is analyzed by recording the environmental quantities of each Bluetooth sensor, and the hidden safety hazards of the substation operation are checked through various data. The Bluetooth system network collects characteristic status information of each sensor device, such as temperature, humidity, and environmental operation safety status. Bluetooth communication technology supports mobile Internet. Each acquisition module receives temperature data with a Bluetooth spiral antenna, is connected to the serial port of the host computer through a data bus, and uploads the processed various parameter data to the host computer. For example, for temperature parameters, after the wireless network communication module Bluetooth networking, the temperature receiving module is wirelessly networked with multiple temperature acquisition modules and transmitted in their respective business flows.

进一步的,为了在一个新数据帧开始传输时,每个计数器都会初始化它的权重。当一个新数据分组到达时,如果它是队列中的第一个分组且该队列计数器为零,就将该队列的编号写入尾部。如果它不是队列中的第一个分组,就仅将其存储地址加入相应的业务流队列尾部。Furthermore, each counter will initialize its weight when a new data frame starts to be transmitted. When a new data packet arrives, if it is the first packet in the queue and the queue counter is zero, the queue number is written to the tail. If it is not the first packet in the queue, only its storage address is added to the tail of the corresponding service flow queue.

本发明提供一种数据的轮询调度方法,方法包括:确定各个数据采集装置的数据传输状态,数据传输状态用于反映数据采集装置向无线通讯装置传输数据时的数据传输成功率,每个数据采集装置对应一个业务流队列,每个业务流队列包括若干分组数据以及各个分组数据的数据地址,数据采集装置与无线通讯装置之间具有无线通讯连接;利用数据传输成功率确定业务流队列的初始权重,初始权重与数据传输成功率呈反比;确定各个初始权重中的最大初始权重对应的目标业务流队列;将目标业务流队列中的第一个数据地址对应的分组数据读取至当前数据帧的预设传输队列,并更新目标业务流队列,以及记录轮询次数i=i+1;利用最大初始权重、以及各个业务流队列的初始权重进行初始权重更新处理,确定各个业务流队列的更新后的初始权重,并返回执行确定初始权重中的最大权重对应的目标业务流队列的步骤,直至轮询次数i等于预设轮询次数阈值,得到当前数据帧的目标传输队列。通过上述方式,可以实现业务流队列的加权轮询调度,根据数据采集装置的数据传输状态来得到业务流队列的初始权重,进而通过初始权重进行加权轮询调度处理,得到当前数据帧的目标传输队列,可以在业务量异常时,实现按照初始权重分轻重缓急的加权轮询调度,实现了负载均衡,提升了业务传输效率。The present invention provides a data polling scheduling method, which includes: determining the data transmission status of each data acquisition device, the data transmission status is used to reflect the data transmission success rate when the data acquisition device transmits data to a wireless communication device, each data acquisition device corresponds to a business flow queue, each business flow queue includes a plurality of packet data and the data address of each packet data, and there is a wireless communication connection between the data acquisition device and the wireless communication device; using the data transmission success rate to determine the initial weight of the business flow queue, the initial weight is inversely proportional to the data transmission success rate; determining the target business flow queue corresponding to the maximum initial weight among the initial weights; reading the packet data corresponding to the first data address in the target business flow queue to the preset transmission queue of the current data frame, and updating the target business flow queue, and recording the polling number i=i+1; using the maximum initial weight and the initial weight of each business flow queue to perform initial weight update processing, determine the updated initial weight of each business flow queue, and return to execute the step of determining the target business flow queue corresponding to the maximum weight among the initial weights, until the polling number i is equal to the preset polling number threshold, and the target transmission queue of the current data frame is obtained. Through the above method, weighted polling scheduling of business flow queues can be implemented. The initial weight of the business flow queue is obtained according to the data transmission status of the data acquisition device, and then weighted polling scheduling is performed according to the initial weight to obtain the target transmission queue of the current data frame. When the business volume is abnormal, weighted polling scheduling can be implemented according to the initial weight to prioritize the business flows, thereby achieving load balancing and improving business transmission efficiency.

请参阅图5,图5为本发明实施例中一种数据的轮询调度装置的结构框图,如图5所示装置包括:Please refer to FIG. 5 , which is a structural block diagram of a data polling scheduling device according to an embodiment of the present invention. As shown in FIG. 5 , the device includes:

状态确定模块501:用于确定各个数据采集装置的数据传输状态,所述数据传输状态用于反映所述数据采集装置向无线通讯装置传输数据时的数据传输成功率,每个所述数据采集装置对应一个业务流队列,每个业务流队列包括若干分组数据以及各个分组数据的数据地址,所述数据采集装置与所述无线通讯装置之间具有无线通讯连接;The state determination module 501 is used to determine the data transmission state of each data acquisition device, and the data transmission state is used to reflect the data transmission success rate when the data acquisition device transmits data to the wireless communication device. Each of the data acquisition devices corresponds to a service flow queue, and each service flow queue includes a plurality of packet data and a data address of each packet data. There is a wireless communication connection between the data acquisition device and the wireless communication device.

权重确定模块502:用于利用所述数据传输成功率确定所述业务流队列的初始权重,所述初始权重与所述数据传输成功率呈反比;A weight determination module 502 is configured to determine an initial weight of the service flow queue using the data transmission success rate, wherein the initial weight is inversely proportional to the data transmission success rate;

轮询调度模块503:用于根据各个所述业务流队列的初始权重以及所述数据地址进行各个所述业务流队列的分组数据的加权轮询调度处理,确定当前数据帧的目标传输队列。The polling scheduling module 503 is used to perform weighted polling scheduling processing on the packet data of each service flow queue according to the initial weight of each service flow queue and the data address, and determine the target transmission queue of the current data frame.

需要说明的是,图5所示装置中各模块的作用与图2所示方法的步骤内容相似,为避免重复此处不作赘述,具体可参阅图2所示方法的步骤内容。It should be noted that the functions of each module in the device shown in FIG. 5 are similar to the steps of the method shown in FIG. 2 , and are not described here to avoid repetition. For details, please refer to the steps of the method shown in FIG. 2 .

本发明提供一种数据的轮询调度方法,方法包括:状态确定模块:用于确定各个数据采集装置的数据传输状态,数据传输状态用于反映数据采集装置向无线通讯装置传输数据时的数据传输成功率,每个数据采集装置对应一个业务流队列,每个业务流队列包括若干分组数据以及各个分组数据的数据地址,数据采集装置与无线通讯装置之间具有无线通讯连接;权重确定模块:用于利用数据传输成功率确定业务流队列的初始权重,初始权重与数据传输成功率呈反比;轮询调度模块:用于根据各个业务流队列的初始权重以及数据地址进行各个业务流队列的分组数据的加权轮询调度处理,确定当前数据帧的目标传输队列。通过上述方式,可以根据数据采集装置的数据传输状态来得到业务流队列的初始权重,进而通过初始权重进行加权轮询调度处理,得到当前数据帧的目标传输队列,可以在业务量异常时,实现按照初始权重分轻重缓急的加权轮询调度,实现了负载均衡,提升了业务传输效率。The present invention provides a data polling scheduling method, the method includes: a state determination module: used to determine the data transmission state of each data acquisition device, the data transmission state is used to reflect the data transmission success rate when the data acquisition device transmits data to the wireless communication device, each data acquisition device corresponds to a business flow queue, each business flow queue includes a number of packet data and the data address of each packet data, and there is a wireless communication connection between the data acquisition device and the wireless communication device; a weight determination module: used to determine the initial weight of the business flow queue using the data transmission success rate, and the initial weight is inversely proportional to the data transmission success rate; a polling scheduling module: used to perform weighted polling scheduling processing of the packet data of each business flow queue according to the initial weight and data address of each business flow queue, and determine the target transmission queue of the current data frame. Through the above method, the initial weight of the business flow queue can be obtained according to the data transmission state of the data acquisition device, and then the weighted polling scheduling processing is performed according to the initial weight to obtain the target transmission queue of the current data frame. When the business volume is abnormal, the weighted polling scheduling can be realized according to the initial weight to prioritize the business flow queue, so as to achieve load balancing and improve the business transmission efficiency.

图6示出了一个实施例中计算机设备的内部结构图。该计算机设备具体可以是终端,也可以是服务器。如图6所示,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,存储器包括非易失性存储介质和内存储器。该计算机设备的非易失性存储介质存储有操作系统,还可存储有计算机程序,该计算机程序被处理器执行时,可使得处理器实现上述方法。该内存储器中也可储存有计算机程序,该计算机程序被处理器执行时,可使得处理器执行上述方法。本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。FIG6 shows an internal structure diagram of a computer device in an embodiment. The computer device may be a terminal or a server. As shown in FIG6 , the computer device includes a processor, a memory and a network interface connected via a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program, which, when executed by the processor, enables the processor to implement the above method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute the above method. It will be appreciated by those skilled in the art that the structure shown in FIG6 is only a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

在一个实施例中,提出了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行图2或图4所示方法的步骤。In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method shown in FIG. 2 or FIG. 4 .

在一个实施例中,提出了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行图2或图4所示方法的步骤。In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the method shown in FIG. 2 or FIG. 4 .

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims (7)

1. A method for scheduling polling of data, the method comprising:
Determining a data transmission state of each data acquisition device, wherein the data transmission state is used for reflecting the data transmission success rate when the data acquisition devices transmit data to the wireless communication device, each data acquisition device corresponds to a service flow queue, each service flow queue comprises a plurality of packet data and data addresses of each packet data, and the data acquisition devices are in wireless communication connection with the wireless communication device;
determining an initial weight of the service flow queue by utilizing the data transmission success rate, wherein the initial weight is inversely proportional to the data transmission success rate;
and carrying out weighted polling scheduling processing on the packet data of each service flow queue according to the initial weight of each service flow queue and the data address, and determining a target transmission queue of the current data frame, wherein the method comprises the following steps:
determining a target service flow queue corresponding to the maximum initial weight in the initial weights;
reading packet data corresponding to a first data address in the target service flow queue to a preset transmission queue of a current data frame, updating the target service flow queue, and recording polling times i=i+1;
performing initial weight updating processing by using the maximum initial weight and the initial weight of each service flow queue, determining the updated initial weight of each service flow queue, and returning to the step of executing the target service flow queue corresponding to the maximum initial weight in the determined initial weights until the polling frequency i is equal to a preset polling frequency threshold value, so as to obtain a target transmission queue of the current data frame;
Wherein, if the initial weight is the sum of the static weight and the dynamic weight, determining the initial weight of the service flow queue by using the data transmission success rate includes:
Utilizing the data transmission success rate to truly the static weight, wherein the static weight is inversely proportional to the data transmission success rate;
determining the initial weight by utilizing the static weight and a preset dynamic weight;
The step of updating the initial weights by using the maximum initial weights and the initial weights of the service flow queues, and determining the updated initial weights of the service flow queues comprises the following steps:
Determining updated dynamic weights of the target service flow queues by utilizing the maximum initial weights, static weights of the initial weights and dynamic weight updating processing of the target service flow queues, wherein the updated dynamic weights are differences between the maximum initial weights and the static weights;
Performing initial weight updating processing by using the updated dynamic weights, the dynamic weights of the rest business flow queues except the target business flow queue and the static weights, and determining updated initial weights of the business flow queues;
And the updated dynamic weight of each business flow queue in the rest business flow queues is the sum of the current dynamic weight and the static weight of the business flow queues.
2. The method of claim 1, wherein the wireless communication device comprises a bluetooth device, and wherein the determining the data transmission status of each data acquisition device comprises:
Controlling the Bluetooth equipment to send out a broadcast calling signal;
Receiving a recall reply result of the broadcast recall signal returned by each data acquisition device, wherein the recall reply result at least comprises the equipment type, the signal strength and the signal-to-noise ratio of the data acquisition device;
and determining the data transmission state of each data acquisition device according to the equipment type, the signal strength and the signal-to-noise ratio.
3. The method according to claim 1, wherein the method further comprises:
counting the service flow request quantity of different service flows, wherein the service flow request quantity is used for reflecting the data reading requirement of the service flows;
And determining the preset value of the dynamic weight according to the service flow request quantity.
4. The method of claim 1, wherein the data acquisition device is configured to acquire operational data of the electrical device, and the method further comprises:
Uploading the target transmission queue to a preset upper computer, wherein the upper computer is used for carrying out data analysis according to the target transmission queue and determining the running state of the power equipment.
5. A data polling scheduling apparatus, the apparatus comprising:
A state determination module: the method comprises the steps that the method is used for determining the data transmission state of each data acquisition device, the data transmission state is used for reflecting the data transmission success rate when the data acquisition devices transmit data to the wireless communication device, each data acquisition device corresponds to one service flow queue, each service flow queue comprises a plurality of packet data and data addresses of each packet data, and the data acquisition devices are in wireless communication connection with the wireless communication device;
And a weight determining module: the method comprises the steps of determining initial weights of the service flow queues by utilizing the data transmission success rate, wherein the initial weights are inversely proportional to the data transmission success rate;
And a polling scheduling module: the target transmission queue of the current data frame is determined by carrying out weighted polling scheduling processing on the packet data of each service flow queue according to the initial weight of each service flow queue and the data address;
The polling scheduling module is specifically configured to determine a target service flow queue corresponding to a maximum initial weight in the initial weights; reading packet data corresponding to a first data address in the target service flow queue to a preset transmission queue of a current data frame, updating the target service flow queue, and recording polling times i=i+1; performing initial weight updating processing by using the maximum initial weight and the initial weight of each service flow queue, determining the updated initial weight of each service flow queue, and returning to the step of executing the target service flow queue corresponding to the maximum initial weight in the determined initial weights until the polling frequency i is equal to a preset polling frequency threshold value, so as to obtain a target transmission queue of the current data frame;
Wherein, the initial weight is the sum of the static weight and the dynamic weight, and the weight determining module is specifically configured to: utilizing the data transmission success rate to truly the static weight, wherein the static weight is inversely proportional to the data transmission success rate; determining the initial weight by utilizing the static weight and a preset dynamic weight;
The step of updating the initial weights by using the maximum initial weights and the initial weights of the service flow queues, and determining the updated initial weights of the service flow queues comprises the following steps: determining updated dynamic weights of the target service flow queues by utilizing the maximum initial weights, static weights of the initial weights and dynamic weight updating processing of the target service flow queues, wherein the updated dynamic weights are differences between the maximum initial weights and the static weights; performing initial weight updating processing by using the updated dynamic weights, the dynamic weights of the rest business flow queues except the target business flow queue and the static weights, and determining updated initial weights of the business flow queues; and the updated dynamic weight of each business flow queue in the rest business flow queues is the sum of the current dynamic weight and the static weight of the business flow queues.
6. A computer readable storage medium storing a computer program, which when executed by a processor causes the processor to perform the steps of the method according to any one of claims 1 to 4.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program which, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 4.
CN202310165209.2A 2023-02-24 2023-02-24 Data polling scheduling method, device, equipment and storage medium Active CN116155817B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310165209.2A CN116155817B (en) 2023-02-24 2023-02-24 Data polling scheduling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310165209.2A CN116155817B (en) 2023-02-24 2023-02-24 Data polling scheduling method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116155817A CN116155817A (en) 2023-05-23
CN116155817B true CN116155817B (en) 2024-09-24

Family

ID=86361641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310165209.2A Active CN116155817B (en) 2023-02-24 2023-02-24 Data polling scheduling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116155817B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602254A (en) * 2019-10-08 2019-12-20 腾讯科技(深圳)有限公司 Method, device and system for realizing load balance

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7646717B1 (en) * 2004-10-29 2010-01-12 Marvell International Ltd. Method and apparatus for packet scheduling
CN1921444B (en) * 2005-08-24 2011-11-30 上海原动力通信科技有限公司 Method for classified package dispatching and resource distributing based on service quality, and communication device
KR100853695B1 (en) * 2007-04-23 2008-08-25 한국과학기술원 Multi queue based wifi device
US20120327948A1 (en) * 2011-06-22 2012-12-27 Lsi Corporation Adjustment of negative weights in weighted round robin scheduling
CN107733689A (en) * 2017-09-15 2018-02-23 西南电子技术研究所(中国电子科技集团公司第十研究所) Dynamic weighting polling dispatching strategy process based on priority
CN109547362A (en) * 2019-01-16 2019-03-29 郑州云海信息技术有限公司 A kind of array dispatching method, system and electronic equipment and storage medium
US11240294B2 (en) * 2019-08-23 2022-02-01 Samsung Electronics Co., Ltd. Systems and methods for spike detection and load balancing resource management
CN112102063B (en) * 2020-08-31 2024-05-14 深圳前海微众银行股份有限公司 Data request method, device, equipment, platform and computer storage medium
CN113434282B (en) * 2021-07-20 2024-03-26 支付宝(杭州)信息技术有限公司 Method and device for issuing and outputting control of stream computing task
CN115150340B (en) * 2022-06-29 2023-10-27 武汉烽火技术服务有限公司 Method and device for dynamically adjusting message queue weight

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602254A (en) * 2019-10-08 2019-12-20 腾讯科技(深圳)有限公司 Method, device and system for realizing load balance

Also Published As

Publication number Publication date
CN116155817A (en) 2023-05-23

Similar Documents

Publication Publication Date Title
US11888744B2 (en) Spin-leaf network congestion control method, node, system, and storage medium
CN109921962A (en) Bandwidth Measurement Method, device, computer readable storage medium and computer equipment
CN111835562A (en) Log uploading method, log query method and log query system
CN106340176A (en) Intelligent electricity meter information sharing method, intelligent electricity meter and acquisition router
CN112085282B (en) Community traffic forecasting method and server
CN112671633B (en) Binary detection heartbeat interval system and method based on BP neural network prediction
CN107707612B (en) Method and device for evaluating resource utilization rate of load balancing cluster
CN114071547B (en) QoE measurement configuration method, device and storage medium
CN116155817B (en) Data polling scheduling method, device, equipment and storage medium
CN119815397B (en) A 5G Ethernet switch testing method and system
CN107464571B (en) A method, device and system for data quality assessment
CN116669080A (en) Repeated complaint early warning method, device and storage medium
CN113472674B (en) Flow control method and device, storage medium and electronic equipment
CN119865848B (en) Information age performance index determining method, device, medium, equipment and product
CN119789143A (en) Method and device for dynamically distributing mesh sub-machine bandwidth based on FTTR
CN115396345A (en) Flow measuring method, device and related equipment
CN108388475A (en) A kind of method and system based on terminal type provisioning API resource
CN118900431A (en) A Wi-SUN communication emergency deduplication dynamic weighted QoS management method, medium and terminal
CN115333917A (en) CDN anomaly detection method and device
CN115242720A (en) Connection method, device, electronic device and storage medium for persistent connection service
CN115515171A (en) SA network load forecasting method, device and electronic equipment
JP2022541730A (en) Network transmission control method and device
CN115664600B (en) Data remote interaction detection and management system based on data analysis
CN118201025B (en) Networking method, device, equipment and storage medium of Wi-Fi-based mesh network
CN120935083A (en) Distributed network dial testing system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant