Edge side data acquisition method and device, computer equipment and readable storage medium

文档序号:452657 发布日期:2021-12-28 浏览:3次 中文

阅读说明:本技术 边缘侧数据采集方法、装置、计算机设备和可读存储介质 (Edge side data acquisition method and device, computer equipment and readable storage medium ) 是由 罗洪江 吴昊文 周雨迪 刘昊 于 2021-09-30 设计创作,主要内容包括:本申请涉及一种边缘侧数据采集方法、装置、计算机设备和存储介质。所述方法应用于多能源系统,包括:将多能源系统的边缘侧数据采集网络结构中的各数据采集终端,按照不同的传输信道划分为集合;集合中包括采用同一传输信道的多个数据采集终端;传输信道用于数据采集终端将数据传输至边缘侧数据采集网络结构中的数据处理终端;针对各传输信道,根据传输信道的初始信息,构建与传输信道对应的目标集合中各数据采集终端的数据传输总时长的目标函数;根据目标函数确定目标集合中各数据采集终端进行数据采集的优先级,控制目标集合中各数据采集终端按照优先级进行数据采集。采用本方法能够降低了数据传输的延时,且有效提高了数据传输的速率。(The application relates to an edge side data acquisition method and device, computer equipment and a storage medium. The method is applied to a multi-energy system and comprises the following steps: dividing each data acquisition terminal in an edge side data acquisition network structure of the multi-energy system into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure; aiming at each transmission channel, constructing a target function of the total data transmission duration of each data acquisition terminal in a target set corresponding to the transmission channel according to the initial information of the transmission channel; and determining the priority of data acquisition of each data acquisition terminal in the target set according to the target function, and controlling each data acquisition terminal in the target set to acquire data according to the priority. By adopting the method, the time delay of data transmission can be reduced, and the data transmission rate is effectively improved.)

1. An edge side data acquisition method is applied to a multi-energy system, and comprises the following steps:

dividing each data acquisition terminal in an edge side data acquisition network structure of the multi-energy system into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure;

aiming at each transmission channel, constructing a target function of the total data transmission duration of each data acquisition terminal in a target set corresponding to the transmission channel according to the initial information of the transmission channel;

and determining the priority of data acquisition of each data acquisition terminal in the target set according to the target function, and controlling each data acquisition terminal in the target set to acquire data according to the priority.

2. The method according to claim 1, wherein the constructing, for each of the transmission channels, an objective function of a total data transmission duration of each data acquisition terminal in an objective set corresponding to the transmission channel according to initial information of the transmission channel comprises:

constructing a data transmission model of the transmission channel according to the initial information of the transmission channel, wherein the data transmission model is used for representing the time required for any data acquisition terminal in the target set to transmit a data packet by adopting the transmission channel;

the objective function is constructed based on a data transmission model of the transmission channel.

3. The method of claim 2, wherein the constructing the data transmission model of the transmission channel according to the initial information of the transmission channel comprises:

and constructing a data transmission model of the transmission channel based on the channel bandwidth of the transmission channel, the initial size of the data packet transmitted on the transmission channel and the single spectrum sensing time of the transmission channel.

4. The method of claim 2, wherein the constructing the objective function based on the data transmission model of the transmission channel comprises:

and constructing the objective function based on the data transmission model of the transmission channel, the initial spectrum sensing times of the transmission channel and the single spectrum sensing time of the transmission channel.

5. The method according to claim 1, wherein the determining the priority of data acquisition of each data acquisition terminal in the target set according to the objective function comprises:

optimizing the objective function to generate an optimized objective function;

determining the value density of each data acquisition terminal in the target set based on the optimized target function and the total scheduling cost of each data acquisition terminal in the target set;

and determining the priority of data acquisition of each data acquisition terminal in the target set according to the data acquisition remaining time in the current data acquisition period and the value density of each data acquisition terminal in the target set.

6. The method of claim 5, wherein optimizing the objective function to generate an optimized objective function comprises:

optimizing target parameters in the target function by adopting a reinforcement learning algorithm to generate optimized target parameters, wherein the target parameters comprise the initial size of a data packet transmitted on the transmission channel and the initial spectrum sensing times of the transmission channel;

and generating the optimized objective function based on the optimized objective parameters.

7. The method of claim 1, further comprising:

acquiring node hop counts from each data acquisition terminal to the data processing terminal and other data acquisition terminals in the multi-energy system, and establishing a minimum distance matrix according to the node hop counts, wherein the node hop counts comprise one-hop node counts and average hop counts;

and determining the edge side data acquisition network structure of the multi-energy system according to a particle swarm algorithm based on the minimum distance matrix.

8. An edge side data acquisition device, the device comprising:

the system comprises a set dividing module, a data acquisition module and a data acquisition module, wherein the set dividing module is used for dividing each data acquisition terminal in an edge side data acquisition network structure of the multi-energy system into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure;

the target function building module is used for building a target function of the total data transmission duration of each data acquisition terminal in a target set corresponding to each transmission channel according to the initial information of the transmission channel aiming at each transmission channel;

and the data acquisition module is used for determining the priority of data acquisition of each data acquisition terminal in the target set according to the target function and controlling each data acquisition terminal in the target set to acquire data according to the priority.

9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.

Technical Field

The present application relates to the field of data acquisition technologies, and in particular, to a method and an apparatus for acquiring edge side data, a computer device, and a computer-readable storage medium.

Background

At present, the cloud computing technology is rapidly developed, a deep revolution is brought to a comprehensive energy supply system, and new requirements are provided for a computing mode of the comprehensive energy supply system. Although cloud computing provides an efficient computing platform for big data processing, for an integrated energy supply system, in the process of uploading data generated by terminals to the computing platform, the increase speed of network bandwidth is far beyond the increase speed of the data. Therefore, the traditional centralized data acquisition processing mode cannot solve the requirements of transmission delay and response time, and edge calculation is carried out in the application context.

Through the edge calculation mode, functions of acquisition, calculation, storage and the like can be expanded to the network edge side near meters such as water meters, electric meters and natural gas meters of the comprehensive energy supply system, so that the delay of data transmission is reduced, and the rate of data transmission is improved. However, the delay in the conventional edge calculation mode cannot meet the increasingly high low-delay requirement of people on the comprehensive energy supply system.

Disclosure of Invention

In view of the foregoing, it is desirable to provide an edge side data acquisition method, an edge side data acquisition apparatus, a computer device, and a computer readable storage medium capable of improving a data acquisition rate.

An edge side data acquisition method is applied to a multi-energy system, and comprises the following steps:

dividing each data acquisition terminal in an edge side data acquisition network structure of the multi-energy system into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure;

aiming at each transmission channel, constructing a target function of the total data transmission duration of each data acquisition terminal in a target set corresponding to the transmission channel according to the initial information of the transmission channel;

and determining the priority of data acquisition of each data acquisition terminal in the target set according to the target function, and controlling each data acquisition terminal in the target set to acquire data according to the priority.

In one embodiment, the constructing, for each transmission channel, an objective function of a total data transmission duration of each data acquisition terminal in a target set corresponding to the transmission channel according to initial information of the transmission channel includes:

constructing a data transmission model of the transmission channel according to the initial information of the transmission channel, wherein the data transmission model is used for representing the time required for any data acquisition terminal in the target set to transmit a data packet by adopting the transmission channel;

the objective function is constructed based on a data transmission model of the transmission channel.

In one embodiment, the constructing a data transmission model of the transmission channel according to the initial information of the transmission channel includes:

and constructing a data transmission model of the transmission channel based on the channel bandwidth of the transmission channel, the initial size of the data packet transmitted on the transmission channel and the single spectrum sensing time of the transmission channel.

In one embodiment, the constructing the objective function based on the data transmission model of the transmission channel includes:

and constructing the objective function based on the data transmission model of the transmission channel, the initial spectrum sensing times of the transmission channel and the single spectrum sensing time of the transmission channel.

In one embodiment, the determining, according to the objective function, the priority of data acquisition by each data acquisition terminal in the target set includes:

optimizing the objective function to generate an optimized objective function;

determining the value density of each data acquisition terminal in the target set based on the optimized target function and the total scheduling cost of each data acquisition terminal in the target set;

and determining the priority of data acquisition of each data acquisition terminal in the target set according to the data acquisition remaining time in the current data acquisition period and the value density of each data acquisition terminal in the target set.

In one embodiment, the optimizing the objective function to generate an optimized objective function includes:

optimizing target parameters in the target function by adopting a reinforcement learning algorithm to generate optimized target parameters, wherein the target parameters comprise the initial size of a data packet transmitted on the transmission channel and the initial spectrum sensing times of the transmission channel;

and generating the optimized objective function based on the optimized objective parameters.

In one embodiment, the method further comprises:

acquiring node hop counts from each data acquisition terminal to the data processing terminal and other data acquisition terminals in the multi-energy system, and establishing a minimum distance matrix according to the node hop counts, wherein the node hop counts comprise one-hop node counts and average hop counts;

and determining the edge side data acquisition network structure of the multi-energy system according to a particle swarm algorithm based on the minimum distance matrix.

An edge side data acquisition device, the device comprising:

the system comprises a set dividing module, a data acquisition module and a data acquisition module, wherein the set dividing module is used for dividing each data acquisition terminal in an edge side data acquisition network structure of the multi-energy system into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure;

the target function building module is used for building a target function of the total data transmission duration of each data acquisition terminal in a target set corresponding to each transmission channel according to the initial information of the transmission channel aiming at each transmission channel;

and the data acquisition module is used for determining the priority of data acquisition of each data acquisition terminal in the target set according to the target function and controlling each data acquisition terminal in the target set to acquire data according to the priority.

A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of the method as above when executing the computer program.

A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as above.

According to the method, the device, the computer equipment and the storage medium for acquiring the edge side data, firstly, each data acquisition terminal in an edge side data acquisition network structure of the multi-energy system is divided into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure; then, aiming at each transmission channel, according to the initial information of the transmission channel, constructing a target function of the total data transmission duration of each data acquisition terminal in a target set corresponding to the transmission channel; and finally, determining the priority of data acquisition of each data acquisition terminal in the target set according to the target function, and controlling each data acquisition terminal in the target set to acquire data according to the priority. According to the method and the device, each data acquisition terminal in the edge side data acquisition network structure is divided into sets according to different transmission channels, one transmission channel is allocated to each target set, a target function of the total data transmission time of each data acquisition terminal in the target set corresponding to the transmission channel is constructed, the target function is optimized to obtain an optimized target function, the optimized target function represents the minimum total data transmission time of the transmission channel, the data transmission delay is further reduced, and the data transmission rate is improved.

Drawings

FIG. 1 is a diagram of an exemplary implementation of an edge side data collection method;

FIG. 2 is a schematic flow chart diagram illustrating a method for edge side data acquisition according to an embodiment;

FIG. 3 is a flow diagram illustrating the steps of constructing an objective function corresponding to a transmission channel in one embodiment;

FIG. 4 is a flowchart illustrating the steps of determining the priority for data acquisition by each data acquisition terminal in the target set according to one embodiment;

FIG. 5 is a flowchart illustrating the steps of optimizing an objective function to generate an optimized objective function according to an embodiment;

FIG. 6 is a schematic flow chart illustrating optimization of target parameters in an objective function by using a reinforcement learning algorithm according to an embodiment;

FIG. 7 is a schematic flow chart illustrating optimization of target parameters in an objective function by a reinforcement learning algorithm according to an embodiment;

FIG. 8 is a schematic flow chart diagram illustrating a method for edge side data acquisition in an exemplary embodiment;

FIG. 9 is a schematic structural diagram of an edge side data acquisition device in one embodiment;

FIG. 10 is a block diagram of an objective function building block in one embodiment;

FIG. 11 is a schematic diagram of the structure of a data acquisition module in one embodiment;

fig. 12 is a schematic structural diagram of an edge side data acquisition device in another embodiment;

FIG. 13 is a diagram illustrating an internal structure of a computer device according to an embodiment.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

The edge side data acquisition method provided by the application can be applied to the application environment shown in fig. 1. As shown in fig. 1, the edge-side data collection network structure of the multi-energy system 100 includes a data processing terminal 120 and a plurality of data collection terminals 140. The data processing terminal 120 is connected to the data acquisition terminals 140 through a wireless communication network. Specifically, the data processing terminal 120 may be configured to receive and process data sent by the data acquisition terminal 140, where the data acquisition terminal 140 includes, but is not limited to, meters such as an electric meter, a water meter, and a natural gas meter in a multi-energy system, and the application is not limited thereto.

Specifically, the method for acquiring edge side data provided by the present application divides each data acquisition terminal 140 in the edge side data acquisition network structure of the multi-energy system 100 into sets according to different transmission channels; the set includes a plurality of data acquisition terminals 140 that employ the same transmission channel; the transmission channel is used for the data acquisition terminal 140 to transmit data to the data processing terminal 120 in the edge side data acquisition network structure; and aiming at each transmission channel, constructing an objective function of the total data transmission time of each data acquisition terminal 140 in the target set corresponding to the transmission channel according to the initial information of the transmission channel, determining the priority of data acquisition of each data acquisition terminal 140 in the target set according to the objective function, and controlling each data acquisition terminal 140 in the target set to acquire data according to the priority.

In one embodiment, as shown in fig. 2, an edge-side data acquisition method is provided, which is described by taking the application environment shown in fig. 1 as an example, and includes steps 220 to 260:

s220, dividing each data acquisition terminal in an edge side data acquisition network structure of the multi-energy system into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure.

Specifically, as shown in fig. 1, the multi-energy system may include, but is not limited to, water meters, electricity meters, natural gas meters, and the like in daily life. The multi-energy system comprises a data processing terminal 120 and a plurality of data acquisition terminals 140, wherein the data processing terminal 120 is connected with the data acquisition terminals 140 through a wireless communication network. Specifically, the data processing terminal 120 may be configured to receive and process data sent by the data acquisition terminal 140, where the data acquisition terminal 140 includes, but is not limited to, meters such as an electric meter, a water meter, and a natural gas meter in a multi-energy system, and the application is not limited thereto.

Further, fig. 1 shows an edge-side data acquisition network structure of the multi-energy system, where the edge-side data acquisition network structure includes a data processing terminal 120 and a data acquisition terminal 140, where the number of the data acquisition terminals 140 may be one or more. Furthermore, an edge measurement data acquisition network structure can be constructed according to the wireless multi-hop network. Wireless multi-hop networks are constructed in the internet by nodes, including devices such as computers and mobile phones, all of which are connected to each other wirelessly and then can forward data to each other through the network. Data hops from node to node until the destination is reached. Data is always available unless all nodes fail, thus making this network topology reliable and scalable. In a wireless multi-hop network, a typical path between an origin node to a destination node is composed of multiple hops, with intermediate nodes on the path acting as forwarding nodes. Thus, a node in a wireless multihop network has two functions, firstly the node can act as an end node to generate or accept data packets, and secondly the node can act as a router to forward data packets from other nodes. The wireless multi-hop network can form any network topology structure through wireless connection, the network does not need fixed infrastructure support, the nodes are generally portable mobile terminal equipment, and the positions of the nodes are acquired through radio equipment to realize the communication of the nodes, so the wireless multi-hop network can be widely applied to the condition that temporary communication is needed but no wired equipment is available.

Optionally, as shown in fig. 1, the distance between the data acquisition terminal 140 and the data processing terminal 120 is determined by determining the hop count from the data acquisition terminal 140 to the data processing terminal 120, and in addition, the distance between the data acquisition terminal 140 and other data acquisition terminals may also be determined by determining the hop count from the data acquisition terminal 140 to other data acquisition terminals. That is, the fringe data collection network structure of the multi-energy system can be determined by acquiring the node hop count from the data collection terminal 140 to the data processing terminal 120 and other data collection terminals 140.

Further, in the multi-energy system, the data acquisition terminal 140 is connected to the data processing terminal through a wireless communication network, and the data acquisition terminal 140 transmits data to the data processing terminal through a wireless transmission channel. In the edge-side data acquisition network structure shown in fig. 1, the data acquisition terminals 140 have different floor depths, that is, each data acquisition terminal has a corresponding floor depth, for example, as shown in fig. 1, the electric meter 1, the water meter 1 and the natural gas meter 1 are at the same floor depth, and the water meter 2, the natural gas meter 2, the electric meter 2, the natural gas meter 3, the electric meter 2 and the water meter 3 are at another floor depth. When the electric meter 1, the water meter 1, the natural gas meter 1, the water meter 2, the natural gas meter 2, the electric meter 2, the natural gas meter 3, the electric meter 2 and the water meter 3 share the same wireless transmission channel for data transmission, the data sent by each data acquisition terminal can interfere with each other, so that different wireless transmission channels need to be allocated for data acquisition terminals with different layer depths, and the problem of mutual interference of the data acquisition terminals with different layer depths during data transmission can be avoided.

Specifically, the data acquisition terminals 140 are divided into sets according to different wireless transmission channels, where the sets include a plurality of data acquisition terminals using the same transmission channel, for example, the electric meter 1, the water meter 1, and the natural gas meter 1 belong to one set, and the wireless transmission channel 1 is used for data transmission, and the water meter 2, the natural gas meter 2, the electric meter 2, the natural gas meter 3, the electric meter 2, and the water meter 3 belong to another set, and the wireless transmission channel 2 is used for data transmission. Like this at the multi-energy system data acquisition in-process, ammeter 1, water gauge 1 and natural gas table 1 use wireless transmission channel 1 with data transmission to data processing terminal 120, and water gauge 2, natural gas table 2, ammeter 2, natural gas table 3, ammeter 2 and water gauge 3 use wireless transmission channel 2 with data transmission to data processing terminal 120. Therefore, for the data acquisition terminals with different layer depths, the data of the data acquisition terminals with different layer depths are acquired through different wireless transmission channels, so that the problem of data interference when the data acquisition terminals with adjacent layer depths perform data transmission is avoided.

S240, aiming at each transmission channel, according to the initial information of the transmission channel, constructing a target function of the total data transmission duration of each data acquisition terminal in a target set corresponding to the transmission channel.

Specifically, the initial information of the transmission channel includes, but is not limited to, a channel bandwidth of the transmission channel, a size of a data packet transmitted on the transmission channel, a single spectrum sensing time of the transmission channel, and a spectrum sensing frequency of the transmission channel, which is not limited in this application. The channel bandwidth of the transmission channel is the maximum data rate that the channel can reach, and the size of the data packet transmitted on the transmission channel refers to the size of the data packet transmitted when the data acquisition terminal transmits data to the data processing terminal for one time. Before sending data to the data processing terminal, the data acquisition terminal needs to perform spectrum sensing to obtain a currently idle wireless communication channel, and further, the single spectrum sensing time of the transmission channel refers to the time consumed by the data acquisition terminal to perform spectrum sensing once. The frequency spectrum sensing times of the transmission channel refers to the frequency spectrum sensing times required by a plurality of data acquisition terminals in the same set for transmitting data to the data processing terminal by using the same wireless transmission channel.

Optionally, an objective function of the total data transmission duration of each data acquisition terminal in the target set corresponding to the transmission channel is constructed according to the channel bandwidth of the transmission channel, the size of the data packet transmitted on the transmission channel, the single spectrum sensing time of the transmission channel, and the spectrum sensing times of the transmission channel. The target set comprises a plurality of data acquisition terminals which use the same wireless transmission channel for data transmission. The objective function is used for representing the total time consumed by all the data acquisition terminals in the target set to send data to the data processing terminal. That is, different objective functions are provided for data acquisition terminals with different layer depths in the edge side data acquisition network structure. For example, as shown in fig. 1, the electric meter 1, the water meter 1 and the natural gas meter 1 transmit data to the data processing terminal using the wireless transmission channel 1, and the objective function of the wireless transmission channel 1 is the total duration of data transmission of the electric meter 1, the water meter 1 and the natural gas meter 1. The water meter 2, the natural gas meter 2, the electricity meter 2, the natural gas meter 3, the electricity meter 2 and the water meter 3 use the wireless transmission channel 2 to transmit data to the data processing terminal, and then the objective function of the wireless transmission channel 2 is the total data transmission time of the water meter 2, the natural gas meter 2, the electricity meter 2, the natural gas meter 3, the electricity meter 2 and the water meter 3.

And S260, determining the priority of data acquisition of each data acquisition terminal in the target set according to the target function, and controlling each data acquisition terminal in the target set to acquire data according to the priority.

Specifically, the objective function is used to represent the total time consumed by all the data acquisition terminals in the target set to send data to the data processing terminal. By optimizing the target parameters of the target function, the target parameters that minimize the total time consumed by all data acquisition terminals in the target set to send data to the data processing terminal can be obtained, and the target parameters include, but are not limited to, the size of a data packet transmitted on a transmission channel and the frequency spectrum sensing times of the transmission channel. The optimization method of the objective function includes, but is not limited to: machine learning algorithms such as convolutional neural network, antagonistic neural network, and reinforcement learning, which are not limited in this application.

As shown in fig. 1, in the edge data acquisition network structure of the multi-energy system, the electric meter 1, the water meter 1 and the natural gas meter 1 belong to one floor depth, and the water meter 2, the natural gas meter 2, the electric meter 2, the natural gas meter 3, the electric meter 2 and the water meter 3 belong to another floor depth. For data acquisition terminals belonging to the same layer depth, different data acquisition terminals have different delay requirements, for example, the delay requirement of the electric meter 1 for data transmission may be higher than the delay requirement of the water meter 1 for data transmission, and therefore, the priority of data acquisition performed by each data acquisition terminal in the target set needs to be determined to provide corresponding acquisition scheduling services for data with different delay requirements.

Specifically, the priority of data acquisition by each data acquisition terminal in the target set can be determined according to the target function, and the target parameter that minimizes the total time consumed by all the data acquisition terminals in the target set to transmit data to the data processing terminal can be obtained by optimizing the target parameter of the target function, where the target parameter can be the size of a data packet transmitted on a transmission channel and the frequency spectrum sensing times of the transmission channel. The value density of each data acquisition terminal in the target set can be determined based on the size of the data packet transmitted on the transmission channel, the frequency spectrum sensing times of the transmission channel, the channel bandwidth of the transmission channel and the total scheduling cost of each data acquisition terminal in the target set. The total scheduling cost of each data acquisition terminal in the target set is the total cost consumed by each data acquisition terminal for data transmission by using a wireless transmission channel, for example, the cost for data transmission by using the wireless transmission channel. The value density of each data acquisition terminal in the target set is used for representing the important grade of the data acquisition terminal, the higher the value density is, the higher the important grade of the data acquisition terminal is, and the lower the value density is, the lower the important grade of the data acquisition terminal is.

Further, the priority of data acquisition of each data acquisition terminal in the target set is determined according to the remaining data acquisition time in the current data acquisition period and the value density of each data acquisition terminal in the target set. For the remaining data acquisition time in the current data acquisition period, after the current data acquisition period comes, data acquisition of the data acquisition terminal in each layer depth can be started, that is, the data processing terminal continuously receives data sent by the data acquisition terminal after the current data acquisition period comes, and the time from the current time to the end of the current data acquisition period is called the remaining data acquisition time. And determining the priority of data acquisition of each data acquisition terminal in the target set through the remaining data acquisition time in the current data acquisition period and the value density of each data acquisition terminal in the target set.

Further, each data acquisition terminal in the target set performs data acquisition according to priority, for example, as shown in fig. 1, in an edge-side data acquisition network structure of the multi-energy system, the electric meter 1, the water meter 1 and the natural gas meter 1 belong to one layer of depth, a delay requirement of the electric meter 1 on data transmission may be higher than a delay requirement of the water meter 1 on data transmission, that is, a value density of the electric meter 1 is higher than a priority of the water meter 1, and then a priority of the electric meter 1 is higher than a priority of the water meter 1, therefore, in a data acquisition period, the electric meter 1 preferentially transmits data to the data processing terminal through the wireless transmission channel, and after the electric meter 1 transmits data to the data processing terminal, the water meter 1 transmits data to the data processing terminal through the wireless transmission channel. By controlling each data acquisition terminal in the target set to acquire data according to the priority, each data acquisition terminal in the target set can be ensured to effectively acquire data according to the priority order, so that the data acquisition scheduling is prevented from being disordered.

In the edge side data acquisition method, firstly, each data acquisition terminal in an edge side data acquisition network structure of the multi-energy system is divided into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure; then, aiming at each transmission channel, according to the initial information of the transmission channel, constructing a target function of the total data transmission duration of each data acquisition terminal in a target set corresponding to the transmission channel; and finally, determining the priority of data acquisition of each data acquisition terminal in the target set according to the target function, and controlling each data acquisition terminal in the target set to acquire data according to the priority. According to the data transmission method and device, each data acquisition terminal in the edge side data acquisition network structure is divided into sets according to different transmission channels, and the problem of data interference when the data acquisition terminals with the depth of the adjacent layers are used for data transmission can be solved. And aiming at each wireless transmission channel, constructing an objective function of the total data transmission time of each data acquisition terminal in the target set corresponding to the transmission channel, and optimizing the objective function by taking the minimum total data transmission time as a target, thereby reducing the data transmission delay and improving the data transmission rate. In addition, the priority of data acquisition of each data acquisition terminal in the target set is determined, the data acquisition of each data acquisition terminal in the target set is controlled according to the priority, and then the data acquisition of the data acquisition terminals with the same layer depth is performed according to the priority sequence, so that the time delay requirements of different data acquisition terminals on data acquisition are met, and the problem of disorder of data acquisition scheduling is avoided.

In one embodiment, as shown in fig. 3, for each transmission channel, an objective function of the total data transmission duration of each data acquisition terminal in the target set corresponding to the transmission channel is constructed according to the initial information of the transmission channel, including steps 242 to 244:

and S242, constructing a data transmission model of the transmission channel according to the initial information of the transmission channel, wherein the data transmission model is used for representing the time required by any data acquisition terminal in the target set to transmit one data packet by adopting the transmission channel.

Specifically, the initial information of the transmission channel includes, but is not limited to, a channel bandwidth of the transmission channel, an initial size of a data packet transmitted on the transmission channel, and a single spectrum sensing time of the transmission channel. The channel bandwidth of the transmission channel is the maximum data rate that the channel can reach, the initial size of the data packet transmitted on the transmission channel is the size of the data packet sent by the data acquisition terminal when the data acquisition terminal transmits data to the data processing terminal for one time, further, the initial size of the data packet transmitted on the transmission channel is a preset initial value, the size of the data packet transmitted is optimized to obtain the size of the optimized data packet, and the optimized size of the data packet can minimize the time consumed by any data acquisition terminal in the target set to transmit one data packet by using the transmission channel. For the single spectrum sensing time of the transmission channel, before the data acquisition terminal sends data to the data processing terminal, spectrum sensing needs to be performed to obtain the currently idle wireless communication channel, and therefore, the single spectrum sensing time of the transmission channel refers to the time consumed by the data acquisition terminal to perform spectrum sensing once.

Further, a data transmission model of the transmission channel is constructed according to the channel bandwidth of the transmission channel, the initial size of the data packet transmitted on the transmission channel, and the single spectrum sensing time of the transmission channel, wherein the data transmission model is used for representing the time required by any data acquisition terminal in the target set to transmit one data packet by using the transmission channel. Specifically, the data transmission model includes time consumed by any data acquisition terminal in the target set to transmit one data packet in the transmission channel and time consumed by the data acquisition terminal to perform spectrum sensing once.

And S244, constructing an objective function based on the data transmission model of the transmission channel.

Specifically, the data transmission model is used for representing the time required by any data acquisition terminal in the target set to transmit one data packet by adopting a transmission channel, and the data transmission model comprises the time consumed by any data acquisition terminal in the target set to transmit one data packet in the transmission channel and the time consumed by the data acquisition terminal to perform one-time spectrum sensing. And constructing an objective function according to the data transmission model of the transmission channel, the initial spectrum sensing times of the transmission channel and the single spectrum sensing time of the transmission channel. The initial spectrum sensing times of the transmission channel refer to the frequency of spectrum sensing required by a plurality of data acquisition terminals in the same set to transmit data to the data processing terminal by using the same wireless transmission channel. And constructing an objective function according to the data transmission model of the transmission channel, the initial spectrum sensing times of the transmission channel and the single spectrum sensing time of the transmission channel. Further, an objective function is constructed according to the channel bandwidth of the transmission channel, the initial size of the data packet transmitted on the transmission channel, the single spectrum sensing time of the transmission channel and the initial spectrum sensing times of the transmission channel.

In this embodiment of the present application, for each transmission channel, according to the initial information of the transmission channel, constructing an objective function of a total data transmission duration of each data acquisition terminal in a target set corresponding to the transmission channel, includes: constructing a data transmission model of the transmission channel according to the initial information of the transmission channel, wherein the data transmission model is used for representing the time required for any data acquisition terminal in the target set to transmit a data packet by adopting the transmission channel; an objective function is constructed based on a data transmission model of a transmission channel. According to the method and the device, the objective function of the total data transmission time of each data acquisition terminal in the objective set corresponding to the transmission channel is constructed, and the objective function which enables the total data transmission time of the transmission channel data to be minimum is obtained by optimizing the objective function, so that the data transmission delay is reduced, and the data transmission rate is effectively improved.

In one embodiment, constructing a data transmission model of a transmission channel according to initial information of the transmission channel includes: and constructing a data transmission model of the transmission channel based on the channel bandwidth of the transmission channel, the initial size of the data packet transmitted on the transmission channel and the single spectrum sensing time of the transmission channel.

Specifically, the transmission channel is configured such that the initial information includes a channel bandwidth of the transmission channel, an initial size of a data packet transmitted on the transmission channel, and a single spectrum sensing time of the transmission channel. The channel bandwidth of the transmission channel refers to the maximum data rate that the channel can reach, and the size of the data packet transmitted on the transmission channel refers to the size of the data packet sent by the data acquisition terminal when the data acquisition terminal performs data transmission for one time to the data processing terminal, wherein the initial size of the data packet transmitted on the transmission channel is a preset parameter, and the final size of the data packet transmitted on the transmission channel is obtained by optimizing the initial size of the data packet transmitted on the transmission channel. For the single spectrum sensing time of the transmission channel, before the data acquisition terminal sends data to the data processing terminal, spectrum sensing needs to be performed to obtain the currently idle wireless communication channel, and therefore, the single spectrum sensing time of the transmission channel refers to the time consumed by the data acquisition terminal to perform spectrum sensing once.

Further, a data transmission model of the transmission channel is constructed based on the channel bandwidth of the transmission channel, the initial size of the data packet transmitted on the transmission channel, and the single spectrum sensing time of the transmission channel. The data transmission model of the transmission channel is used for representing the time required for any data acquisition terminal in the target set to transmit one data packet by adopting the transmission channel. As shown in fig. 1, for the electric meter 1, the water meter 1 and the natural gas meter 1, the electric meter 1, the water meter 1 and the natural gas meter 1 are data acquisition terminals belonging to the same layer depth, and therefore, the electric meter 1, the water meter 1 and the natural gas meter 1 use the same wireless transmission channel to transmit data to the data processing terminal. Aiming at the wireless transmission channel used by the electric meter 1, the water meter 1 and the natural gas meter 1, the data transmission model of the wireless transmission channel is the time required for any data acquisition terminal in the electric meter 1, the water meter 1 and the natural gas meter 1 to adopt the wireless transmission channel to transmit a data packet. Specifically, the data transmission model of the transmission channel may be represented as:

wherein the content of the first and second substances,indicating the time, M, required for the transmission of a data packet on the ith radio transmission channeliIndicating the size, W, of the data packet transmitted by the i-th radio transmission channeliIndicating the channel bandwidth, T, of the ith radio transmission channelsRepresenting the single spectrum sensing time of the ith wireless transmission channel. In the formula (1), the data transmission model of the transmission channel represents the time required by any data acquisition terminal in the target set to transmit one data packet by using the transmission channel according to the channel bandwidth of the transmission channel, the size of the data packet transmitted on the transmission channel, and the single spectrum sensing time of the transmission channel. Any of the target set may be obtained by the channel bandwidth of the transmission channel and the size of the data packets transmitted on the transmission channelThe time consumed by a data acquisition terminal for transmitting a data packet in a transmission channel, therefore, the data transmission model of the transmission channel includes the time consumed by any data acquisition terminal in the target set for transmitting a data packet in the transmission channel and the time consumed by the data acquisition terminal for performing spectrum sensing once.

In this embodiment of the present application, constructing a data transmission model of a transmission channel according to initial information of the transmission channel includes: and constructing a data transmission model of the transmission channel based on the channel bandwidth of the transmission channel, the initial size of the data packet transmitted on the transmission channel and the single spectrum sensing time of the transmission channel. The data transmission model of the transmission channel comprises the time consumed by any data acquisition terminal in the target set for transmitting a data packet in the transmission channel and the time consumed by the data acquisition terminal for carrying out spectrum sensing once, so that the data transmission model of the transmission channel can be used for representing the time required by any data acquisition terminal in the target set for transmitting a data packet by adopting the transmission channel. By optimizing the data transmission model, the objective function which enables the total data transmission time of the transmission channel to be minimum can be obtained, so that the data transmission delay is reduced, and the data acquisition rate of the data acquisition terminal is improved.

In one embodiment, constructing the objective function based on a data transmission model of the transmission channel includes: and constructing an objective function based on a data transmission model of the transmission channel, the initial spectrum sensing times of the transmission channel and the single spectrum sensing time of the transmission channel.

Specifically, a data transmission model of the transmission channel is constructed according to the channel bandwidth of the transmission channel, the size of a data packet transmitted on the transmission channel, and the single spectrum sensing time of the transmission channel. The data transmission model is used for representing the time required for any data acquisition terminal in the target set to transmit a data packet by adopting a transmission channel. The spectrum sensing times of the transmission channel refer to the frequency of spectrum sensing required by a plurality of data acquisition terminals in the same set to transmit data to the data processing terminal by using the same wireless transmission channel. The initial frequency spectrum sensing times of the transmission channel are preset parameters, and the final frequency spectrum sensing times of the transmission channel are obtained by optimizing the initial frequency spectrum sensing times of the transmission channel.

Further, an objective function is constructed based on a data transmission model of the transmission channel, the initial spectrum sensing times of the transmission channel and the single spectrum sensing time of the transmission channel. The objective function is used for representing the total time consumed by all the data acquisition terminals in the target set to send data to the data processing terminal. As shown in fig. 1, for the electric meter 1, the water meter 1 and the natural gas meter 1, the electric meter 1, the water meter 1 and the natural gas meter 1 are data acquisition terminals belonging to the same layer depth, and therefore, the electric meter 1, the water meter 1 and the natural gas meter 1 use the same wireless transmission channel to transmit data to the data processing terminal. For the wireless transmission channels used by the electric meter 1, the water meter 1 and the natural gas meter 1, the objective function of the wireless transmission channel is the total time required for all data acquisition terminals in the electric meter 1, the water meter 1 and the natural gas meter 1 to adopt the wireless transmission channel to transmit data packets. Specifically, the objective function may be expressed as:

wherein, T (i)minRepresents the total time, X, consumed by all data acquisition terminals in the target set to send data to the data processing terminaliRepresenting the number of spectrum sensing of the transmission channel. In the formula (2), Xi-1 represents the number of successful spectrum sensing of the transmission channel, that is, XiThe-1 is the number of times that the data acquisition terminal successfully obtains the idle wireless transmission channel by operating the spectrum sensing, and it can be understood that the data acquisition terminal does not obtain the idle wireless transmission channel when operating the ith spectrum sensing, and at this time, the data acquisition terminal cannot transmit data to the data processing terminal. In the formula (2), the objective function represents that all data acquisition terminals in the target set send data to the data acquisition terminals according to the data transmission model, the frequency spectrum sensing times of the transmission channel and the single frequency spectrum sensing time of the transmission channelAccording to the total time consumed by the terminal.

In the embodiment of the present application, constructing an objective function based on a data transmission model of a transmission channel includes: and constructing an objective function based on a data transmission model of the transmission channel, the initial spectrum sensing times of the transmission channel and the single spectrum sensing time of the transmission channel. The objective function is used for representing the total time consumed by all the data acquisition terminals in the target set for sending data to the data processing terminal, and the objective function which enables the total data transmission duration of the transmission channel to be the minimum can be obtained by optimizing the objective function, so that the data transmission delay is reduced, and the data acquisition rate of the data acquisition terminals is improved.

In one embodiment, as shown in fig. 4, determining the priority of data acquisition by each data acquisition terminal in the target set according to the objective function includes steps 262 to 266:

and S262, optimizing the objective function to generate the optimized objective function.

Specifically, an objective function is constructed according to a data transmission model of a transmission channel, the frequency spectrum sensing times of the transmission channel, and the single frequency spectrum sensing time of the transmission channel. The data transmission model of the transmission channel is constructed according to the channel bandwidth of the transmission channel, the size of a data packet transmitted on the transmission channel and the single spectrum sensing time of the transmission channel. Therefore, the objective function includes a channel bandwidth of the transmission channel, a size of a data packet transmitted on the transmission channel, a single spectrum sensing time of the transmission channel, and a spectrum sensing number of the transmission channel. The target function is used for representing the total time consumed by all the data acquisition terminals in the target set for transmitting data to the data processing terminal, the target parameters of the target function are optimized to obtain optimized target parameters, the optimized target parameters can enable the total time consumed by all the data acquisition terminals in the target set for transmitting the data to the data processing terminal to be the minimum, and therefore the data transmission rate from the data acquisition terminals to the data processing terminal is improved.

The target parameters of the objective function include the size of a data packet transmitted on a transmission channel and the frequency spectrum sensing times of the transmission channel, and the method for optimizing the target parameters of the objective function includes, but is not limited to, a neural network and reinforcement learning, which is not limited in this application. And optimizing the target parameters of the target function to obtain the optimized target parameters, namely obtaining the size of the data packet transmitted on the optimized transmission channel and the frequency spectrum sensing times of the transmission channel. The size of the data packet transmitted on the optimized transmission channel and the frequency spectrum sensing times of the transmission channel can minimize the total time consumed by all the data acquisition terminals in the target set to transmit the data to the data processing terminal.

And S264, determining the value density of each data acquisition terminal in the target set based on the optimized target function and the total scheduling cost of each data acquisition terminal in the target set.

Specifically, the optimized objective function is used for representing the minimum time required for all the data acquisition terminals in the objective set to send data to the data processing terminal. The total scheduling cost of each data acquisition terminal in the target set is the total cost consumed by each data acquisition terminal for data transmission by using a wireless transmission channel, such as the cost for data transmission by using the wireless transmission channel. The value density of each data acquisition terminal in the target set is used for representing the important grade of the data acquisition terminal, the higher the value density is, the higher the important grade of the data acquisition terminal is, and the lower the value density is, the lower the important grade of the data acquisition terminal is. As shown in fig. 1, the electric meter 1, the water meter 1 and the natural gas meter 1 belong to one layer depth, but different data collection tasks have different importance levels, that is, the value density of the electric meter 1, the water meter 1 and the natural gas meter 1 is different. For example, the meter 1 may have a higher level of importance for data transmission than the meter 1, and thus the meter 1 may have a higher density of value than the meter 1.

Further, based on the optimized objective function and the total scheduling cost of each data acquisition terminal in the target set, determining the value density of each data acquisition terminal in the target set, where the value density of each data acquisition terminal in the target set may be represented as:

Wi=(T(i)min+Ei)×10 (3)

wherein, WiRepresenting the value density of each data acquisition terminal in the ith set, T (i)minRepresents the minimum time required for all data acquisition terminals in the ith set to send data to the data processing terminal, EiAnd the total scheduling cost of each data acquisition terminal in the ith set is represented. In the formula (3), the minimum time T (i) required for all the data acquisition terminals in the ith set to transmit data to the data processing terminal is the value density of each data acquisition terminal in the ith setminAnd the total scheduling cost E of each data acquisition terminal in the ith setiJointly deciding, wherein the minimum time T (i) required for all the data acquisition terminals in the ith set to send data to the data processing terminalminIs an optimized objective function.

S266, determining the priority of data acquisition of each data acquisition terminal in the target set according to the remaining data acquisition time in the current data acquisition period and the value density of each data acquisition terminal in the target set.

Specifically, for the remaining data acquisition time in the current data acquisition period, after the current data acquisition period comes, data acquisition of the data acquisition terminal in each layer depth may be started, that is, the data processing terminal continuously receives data sent by the data acquisition terminal after the current data acquisition period comes, and the time from the current time to the end of the current data acquisition period is referred to as the remaining data acquisition time. The value density of each data acquisition terminal in the target set is used for representing the important grade of the data acquisition terminal, the higher the value density is, the higher the important grade of the data acquisition terminal is, and the lower the value density is, the lower the important grade of the data acquisition terminal is.

Further, the priority of data acquisition of each data acquisition terminal in the target set is determined according to the remaining data acquisition time in the current data acquisition period and the value density of each data acquisition terminal in the target set. The priority is used for representing the data acquisition sequence of each data acquisition terminal in the target set. To ammeter 1, water gauge 1 and natural gas table 1, ammeter 1, water gauge 1 and natural gas table 1 are the data acquisition terminal who belongs to same number of layers degree of depth, consequently, ammeter 1, water gauge 1 and natural gas table 1 use same wireless transmission channel with data transmission to data processing terminal. However, different data collection tasks have different levels of importance, that is, the value densities of the electricity meter 1, the water meter 1 and the natural gas meter 1 are different, and further, the priorities of the electricity meter 1, the water meter 1 and the natural gas meter 1 are also different. For example, the delay requirement of the electric meter 1 for data transmission may be higher than the delay requirement of the water meter 1 for data transmission, and therefore, the priority of the electric meter 1 is higher than that of the water meter 1. Further, the priority of data acquisition of each data acquisition terminal in the target set is determined based on the remaining data acquisition time in the current data acquisition period and the value density of each data acquisition terminal in the target set, wherein the value density of each data acquisition terminal in the target set is determined by the optimized objective function and the total scheduling cost of each data acquisition terminal in the target set. Therefore, the priority list of data acquisition performed by each data acquisition terminal in the target set may be represented as:

Zi=(bi,T(i)min,Ei,Wi) (4)

wherein Z isiA priority list indicating data collection by each data collection terminal in the ith set, biRepresenting the remaining time of data acquisition in the current data acquisition cycle for the ith set, T (i)minAnd the minimum time required for all the data acquisition terminals in the ith set to send the data to the data processing terminal is represented. EiRepresents the total scheduling cost, W, of each data acquisition terminal in the ith setiRepresenting each data acquisition in the ith setValue density of the terminal. In the formula (4), the priority list Z for each data acquisition terminal in the ith set to acquire dataiCollecting the residual time b of the data in the current data collecting period by the ith setiMinimum time T (i) required for all data acquisition terminals in the ith set to send data to the data processing terminalminAnd the total scheduling cost E of each data acquisition terminal in the ith setiAnd the value density W of each data acquisition terminal in the ith setiJointly deciding, wherein the minimum time T (i) required for all the data acquisition terminals in the ith set to send data to the data processing terminalminIs an optimized objective function. The priority may specifically be determined using the following equation:

Zi=(Wi-bi-1)×(Wi-bi-2)/2+Wi (5)

from equation (5), it can be seen that the value density W passes through each data acquisition terminal in the ith setiAnd the residual time b of data acquisition in the current data acquisition period of the ith setiAnd constructing a priority list Z for each data acquisition terminal in the ith set to acquire dataiAnd then determining the priority of data acquisition of each data acquisition terminal in the ith set.

In the embodiment of the present application, determining the priority of data acquisition by each data acquisition terminal in a target set according to an objective function includes: optimizing the objective function to generate an optimized objective function; determining the value density of each data acquisition terminal in the target set based on the optimized target function and the total scheduling cost of each data acquisition terminal in the target set; and determining the priority of data acquisition of each data acquisition terminal in the target set according to the data acquisition remaining time in the current data acquisition period and the value density of each data acquisition terminal in the target set. By optimizing the objective function, the objective function which enables the total data transmission time of the transmission channel to be the minimum can be obtained, so that the data transmission delay is reduced, and the data acquisition rate of the data acquisition terminal is improved. In addition, the data acquisition priority of each data acquisition terminal in the target set is determined, so that each data acquisition terminal performs data acquisition tasks of each layer depth according to the priority sequence in the layer depth, the data acquisition terminals of each layer depth can schedule the data with high priority according to different delay requirements, and corresponding acquisition scheduling services are provided for the data with different delay requirements.

In one embodiment, as shown in fig. 5, optimizing the objective function to generate the optimized objective function includes step 340 of step 320:

and S320, optimizing the target parameters in the target function by adopting a reinforcement learning algorithm to generate the optimized target parameters, wherein the target parameters comprise the initial size of the data packet transmitted on the transmission channel and the initial spectrum sensing times of the transmission channel.

Specifically, the target parameters in the target function are optimized to generate optimized target parameters. Specifically, a reinforcement learning algorithm is adopted to optimize target parameters in the target function, and optimized target parameters are generated. Reinforcement learning, also known as refinish learning, evaluation learning or reinforcement learning, is one of the paradigms and methodologies of machine learning, and is used to describe and solve the problem that an agent achieves maximum return or achieves a specific goal through learning strategies in the process of interacting with the environment. Briefly, reinforcement learning is a cyclic process in which an agent takes action to change its state and thus obtain rewards for interacting with the environment.

Specifically, the target parameter in the objective function is the size of the data packet transmitted on the transmission channel and the frequency spectrum sensing times of the transmission channel. Therefore, the size of the data packet transmitted on the transmission channel and the frequency spectrum sensing times of the transmission channel are the action set in the reinforcement learning, and the objective function is the state set in the reinforcement learning. Fig. 6 is a schematic flowchart of an embodiment of a process for optimizing a target parameter in an objective function by using a reinforcement learning algorithm, as shown in fig. 6, the process for optimizing the target parameter in the objective function by using the reinforcement learning algorithm to generate an optimized target parameter includes steps 322 to 328:

s322, constructing a neural network, initializing a parameter set in the neural network, and initializing a variable n to be 1;

specifically, the neural network may be a BP (back propagation) neural network, which is a multi-layer feedforward network trained according to an error inverse propagation algorithm and is one of the most widely applied neural network models at present, and the BP network may learn and store a large number of input-output pattern mapping relationships without disclosing a mathematical equation describing the mapping relationships in advance. As shown in fig. 6, first, an internal parameter set θ of the neural network is initialized, and an initialization variable n is 1, where the variable n is an outer loop of the neural network.

S324, initializing variable t to 0, and initializing action setWill initialize the action setInputting into a neural network, the output of which is a set of statesObtaining reward value r (t +1)n

Specifically, as shown in fig. 6, after the initialization variable n is 1, the initialization variable t is 0, the variable t is an inner loop of the neural network, and the initial action set is randomly given Set of actions representing the ith transport channel in the t-th inner loop of the n-th outer loop, said set of actionsIncluding the ith passThe size of the data packet transmitted on the transmission channel and the frequency spectrum sensing times of the transmission channel.Representing the input action set of the ith transmission channel to the neural network at the t inner loop in the n outer loopSet of states of the output of the neural network, said set of statesIncluding the objective function of the ith transport channel. r (t +1)nRepresenting the reward value fed back by the neural network when the t inner loops in the nth outer loop are completely finished, and further, in the process of reinforcement learning, the neural network stores the training track tau in the training processn,τnRepresenting the training track of the neural network when the t inner loops in the nth outer loop are completely finished, wherein the training track comprises the input action set of the neural network in the t inner loopsOutputting state set to neural network in t inner loopAnd the reward value r (t +1) fed back by the neural network when the t times of inner-layer circulation are completely finishedn

S326, judging the reward value r (t +1) fed back by the neural network when the inner layer circulation is completely finished for t timesnIf the number of the inner-layer loops is greater than the preset reward expectation value R, as shown in fig. 6, if the reward value fed back by the neural network is greater than the preset reward expectation value R when all the inner-layer loops are completed for t times, jumping out of the training process of the inner-layer loops, continuing the next step, and if not, making the variable t equal to t +1, and continuing the training process of the inner-layer loops.

S328, as shown in fig. 6, when the outer loop is performed, optimizing the parameter set θ in the neural network through a policy optimization algorithm to make the variable N equal to N +1, and continuing the training process of the outer loop until the variable N is greater than the preset iteration parameter N, at this time, completing the training process of the objective function to obtain the optimized objective function, that is, obtaining the optimized objective parameter, that is, the size of the data packet transmitted on the transmission channel and the frequency spectrum sensing number of the transmission channel, through optimizing the objective function.

And S340, generating an optimized objective function based on the optimized objective parameters.

Specifically, the target parameter of the objective function includes the size of the data packet transmitted on the transmission channel and the frequency spectrum sensing times of the transmission channel, the optimized target parameter is obtained by optimizing the objective function, and the optimized objective function is generated based on the size of the data packet transmitted on the optimized transmission channel and the frequency spectrum sensing times of the transmission channel, and the optimized objective function can minimize the total data transmission duration of the transmission channel.

In this embodiment of the present application, optimizing the objective function to generate an optimized objective function includes: optimizing target parameters in the target function by adopting a reinforcement learning algorithm to generate optimized target parameters, wherein the target parameters comprise the initial size of a data packet transmitted on the transmission channel and the initial spectrum sensing times of the transmission channel; and generating an optimized objective function based on the optimized objective parameters. The method and the device adopt a reinforcement learning algorithm to optimize the objective function to obtain the optimized objective function, and the optimized function can minimize the total data transmission time of a transmission channel, so that the data transmission rate of the data acquisition terminal is reduced.

In one embodiment, as shown in fig. 7, a method for acquiring edge data further includes steps 420 to 440:

and S420, acquiring node hop counts from each data acquisition terminal to the data processing terminal and other data acquisition terminals in the multi-energy system, and establishing a minimum distance matrix according to the node hop counts, wherein the node hop counts comprise one-hop node counts and average hop counts.

Specifically, as shown in fig. 1, the multi-energy system includes a data processing terminal and a plurality of data acquisition terminals, and determines a distance between the data acquisition terminal and the data processing terminal by determining a hop count from the data acquisition terminal to the data processing terminal, and may also determine a distance between the data acquisition terminal and another data acquisition terminal by determining a hop count from the data acquisition terminal to another data acquisition terminal. That is to say, the edge measurement data acquisition network structure of the multi-energy system can be determined by acquiring node hops from the data acquisition terminal to the data processing terminal and other data acquisition terminals, wherein the node hops include a one-hop node number and an average hop number, the one-hop node number represents the number of the data processing terminals adjacent to the data acquisition terminal and other data acquisition terminals, and the average hop number represents the average hop number from the data acquisition terminal to the data processing terminals and other data acquisition terminals. Through the number of one-hop nodes and the average hop count from each data acquisition terminal to the data processing terminal and other data acquisition terminals in the multi-energy system, a minimum distance matrix can be established:

D=(H,V) (6)

wherein D represents the minimum distance matrix of each data acquisition terminal in the multi-energy system, H represents the number of one-hop nodes of each data acquisition terminal in the multi-energy system, and V represents the average hop number of each data acquisition terminal in the multi-energy system. In the formula (6), a minimum distance matrix of each data acquisition terminal in the multi-energy system is established through the number of one-hop nodes and the average hop count of each data acquisition terminal in the multi-energy system, and a space model of the minimum distance of the multi-energy system is established according to the minimum distance matrix.

And S440, determining the edge side data acquisition network structure of the multi-energy system according to a particle swarm algorithm based on the minimum distance matrix.

Specifically, the minimum distance matrix comprises the number of one-hop nodes and the average hop count of each data acquisition terminal in the multi-energy system, a space model of the minimum distance of the multi-energy system is established according to the minimum distance matrix, and then an edge side data acquisition network structure of the multi-energy system is determined according to a particle swarm algorithm, wherein the particle swarm algorithm is a random search algorithm based on group cooperation.

In this embodiment of the present application, the edge side data acquisition method further includes: acquiring node hop counts from each data acquisition terminal to a data processing terminal and other data acquisition terminals in the multi-energy system, and establishing a minimum distance matrix according to the node hop counts, wherein the node hop counts comprise one-hop node counts and average hop counts; and determining the edge side data acquisition network structure of the multi-energy system according to the particle swarm algorithm based on the minimum distance matrix. According to the method, the minimum distance matrix of each data acquisition terminal in the multi-energy system is firstly established, then the edge side data acquisition network structure of the multi-energy system is determined based on the particle swarm optimization, and a network structure basis is provided for data acquisition of the data acquisition terminals in the multi-energy system.

In a specific embodiment, as shown in fig. 8, there is provided an edge side data acquisition method, including steps 501 to 508:

s501, node hop counts from each data acquisition terminal to the data processing terminal and other data acquisition terminals in the multi-energy system are obtained, and a minimum distance matrix is established according to the node hop counts, wherein the node hop counts comprise one-hop node counts and average hop counts; and determining the edge side data acquisition network structure of the multi-energy system according to the particle swarm algorithm based on the minimum distance matrix.

S502, dividing each data acquisition terminal in an edge side data acquisition network structure of the multi-energy system into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure.

S503, constructing a data transmission model of the transmission channel based on the channel bandwidth of the transmission channel, the initial size of the data packet transmitted on the transmission channel and the single spectrum sensing time of the transmission channel, wherein the data transmission model is used for representing the time required by any data acquisition terminal in the target set to transmit one data packet by adopting the transmission channel.

S504, constructing an objective function based on a data transmission model of the transmission channel, the initial spectrum sensing times of the transmission channel and the single spectrum sensing time of the transmission channel.

S505, optimizing target parameters in the target function by adopting a reinforcement learning algorithm to generate optimized target parameters, wherein the target parameters comprise the initial size of a data packet transmitted on a transmission channel and the initial spectrum sensing times of the transmission channel; and generating an optimized objective function based on the optimized objective parameters.

S506, determining the value density of each data acquisition terminal in the target set based on the optimized target function and the scheduling total cost of each data acquisition terminal in the target set.

And S507, determining the priority of data acquisition of each data acquisition terminal in the target set according to the remaining data acquisition time in the current data acquisition period and the value density of each data acquisition terminal in the target set.

And S508, controlling each data acquisition terminal in the target set to acquire data according to the priority based on the priority of data acquisition of each data acquisition terminal in the target set.

In the embodiment of the application, each data acquisition terminal in the edge side data acquisition network structure is divided into sets according to different transmission channels, so that the problem of data interference when the data acquisition terminals with the depth of the adjacent layers transmit data can be avoided. And aiming at each wireless transmission channel, constructing an objective function of the total data transmission time of each data acquisition terminal in the target set corresponding to the transmission channel, and optimizing the objective function by taking the minimum total data transmission time as a target, thereby reducing the data transmission delay and improving the data transmission rate. In addition, the priority of data acquisition of each data acquisition terminal in the target set is determined, the data acquisition of each data acquisition terminal in the target set is controlled according to the priority, and then the data acquisition of the data acquisition terminals with the same layer depth is performed according to the priority sequence, so that the time delay requirements of different data acquisition terminals on data acquisition are met, and the problem of disorder of data acquisition scheduling is avoided.

It should be understood that although the various steps in the flow charts of fig. 2-8 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-8 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.

In one embodiment, as shown in fig. 9, there is provided an edge side data acquisition apparatus 600 including: a set partitioning module 620, an objective function constructing module 640, and a data collecting module 660, wherein:

the set dividing module 620 is configured to divide each data acquisition terminal in the edge side data acquisition network structure of the multi-energy system into sets according to different transmission channels; the set comprises a plurality of data acquisition terminals adopting the same transmission channel; the transmission channel is used for the data acquisition terminal to transmit data to the data processing terminal in the edge side data acquisition network structure;

an objective function constructing module 640, configured to construct, for each transmission channel, an objective function of the total data transmission duration of each data acquisition terminal in the target set corresponding to the transmission channel according to the initial information of the transmission channel;

the data acquisition module 660 is configured to determine, according to the target function, a priority for performing data acquisition on each data acquisition terminal in the target set, and control each data acquisition terminal in the target set to perform data acquisition according to the priority.

In one embodiment, as shown in FIG. 10, the objective function building module 640 includes: a data transmission model building unit 642 and an objective function generating unit 644, wherein:

the data transmission model constructing unit 642 is configured to construct a data transmission model of the transmission channel according to the initial information of the transmission channel, where the data transmission model is used to represent a time required for any data acquisition terminal in the target set to transmit one data packet by using the transmission channel;

an objective function generating unit 644, configured to construct an objective function based on the data transmission model of the transmission channel.

In one embodiment, the data transmission model constructing unit 642 is further configured to construct the data transmission model of the transmission channel based on the channel bandwidth of the transmission channel, the initial size of the data packet transmitted on the transmission channel, and the single spectrum sensing time of the transmission channel.

In one embodiment, the objective function generating unit 644 is further configured to construct an objective function based on the data transmission model of the transmission channel, the initial spectrum sensing times of the transmission channel, and the single spectrum sensing time of the transmission channel.

In one embodiment, as shown in fig. 11, the data collection module 660 includes: an objective function optimization unit 662, a cost density generation unit 664, and a priority determination unit 666, wherein:

an objective function optimization unit 662, configured to optimize an objective function and generate an optimized objective function;

the value density generating unit 664 is used for determining the value density of each data acquisition terminal in the target set based on the optimized target function and the total scheduling cost of each data acquisition terminal in the target set;

the priority determining unit 666 is configured to determine, according to the remaining data acquisition time in the current data acquisition period and the value density of each data acquisition terminal in the target set, a priority for performing data acquisition by each data acquisition terminal in the target set.

In one embodiment, the objective function optimization unit 662 is further configured to optimize an objective parameter in the objective function by using a reinforcement learning algorithm, and generate an optimized objective parameter, where the objective parameter includes an initial size of a data packet transmitted on a transmission channel and an initial spectrum sensing number of the transmission channel; and generating an optimized objective function based on the optimized objective parameters.

In one embodiment, as shown in fig. 12, an edge side data acquisition apparatus 600 further includes: a minimum distance matrix construction module 720 and a data collection network construction module 740, wherein:

the minimum distance matrix building module 720 is used for obtaining node hops from each data acquisition terminal to the data processing terminal and other data acquisition terminals in the multi-energy system, and building a minimum distance matrix according to the node hops, wherein the node hops comprise one-hop node number and average hop number;

and the data acquisition network construction module 740 is configured to determine an edge side data acquisition network structure of the multi-energy system according to a particle swarm algorithm based on the minimum distance matrix.

For specific definition of the edge side data acquisition device, reference may be made to the definition of the edge side data acquisition method above, and details are not described here. Each module in the edge-side data acquisition device may be implemented in whole or in part by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.

In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 13. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing the edge side data acquisition data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an edge side data acquisition method.

Those skilled in the art will appreciate that the architecture shown in fig. 13 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.

The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the edge-side data acquisition method.

A computer program product containing instructions which, when run on a computer, cause the computer to perform an edge side data acquisition method.

Any reference to memory, storage, database, or other medium used by embodiments of the present application may include non-volatile and/or volatile memory. Suitable non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).

The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

29页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种可穿戴设备的数据传输方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!