Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defect of wasting the power service traffic caused by independently transmitting the first service and the second service in the prior art, thereby providing a method and a system for optimizing the power service traffic, and the specific technical scheme is as follows:
a service information transmission method comprises the following steps:
judging whether the starting time of a first service is in the starting time period of a second service, wherein the second service is a discontinuous time service, and the starting time period of the second service comprises service duration and multiple sections of idle time;
if the starting time of the first service is within the starting time of the second service, judging whether the sum of the total duration of the second service and the total duration of the first service is not greater than the starting time period of the second service;
and if the sum of the duration of the second service and the duration of the first service is not greater than the initial time period of the first service, inserting the first service into the idle time of the second service for transmission.
The method above, wherein the first service is a time continuous service or a non-time continuous service or a combination thereof; and/or a plurality of idle times of the second service are equal or unequal.
The foregoing method, where the first service is a time-continuous service, and the first service is transmitted while being interspersed in an idle time of the second service, includes:
searching first idle time which is longer than or equal to the duration of the first service in the idle time of the second service;
and the first service is transmitted by interspersing the first idle time.
In the above method, where the first service is a non-time continuous service, the multiple idle times of the second service are equal, and the first service is transmitted by interleaving the idle times of the second service, the method includes:
dividing the first service into a plurality of first service subtasks with the same duration, wherein the duration of the first service subtasks is not more than any idle time of the second service;
and sequentially inserting the first service subtasks into the idle time of the second service corresponding to the first service subtasks for transmission according to the sequence of the first service from beginning to end.
In the above method, where the first service is a non-time continuous service, the multiple idle times of the second service are different, and the first service is transmitted by interleaving the idle times of the second service, the method includes:
dividing the first service into first service subtasks corresponding to idle time one by one according to the sequence of the idle time, wherein the duration of the first service subtasks is less than or equal to the idle time of the corresponding second service;
and inserting the first service subtask into the idle time of the second service corresponding to the first service subtask for transmission.
In the above method, where the first service includes a time continuous service and a non-time continuous service, and the idle time of the second service is equal, the first service is interspersed in the idle time of the second service for transmission, and the method includes:
searching a first idle time with the duration longer than or equal to the duration of the time continuous service in the idle time of the second service;
transmitting the time continuous service in the first idle time;
dividing a non-time continuous service in the first service into a plurality of first service subtasks, wherein the duration of each first service subtask is less than or equal to each second idle time corresponding to the second service;
and according to the time sequence of the second service idle time, the first service subtasks are inserted into the second idle time of the second service from beginning to end for transmission.
In the above method, where the first service includes a time continuous service and a non-time continuous service, and the idle time of the second service is different, the transmitting the first service by interspersing the first service in the idle time of the second service includes:
selecting idle time which is greater than or equal to the duration of the time continuous service for the time continuous service and transmitting the time continuous service;
and sequentially dividing and transmitting the non-time continuous service in the first service according to the idle time after the idle time for transmitting the time continuous service, wherein the duration of the divided non-time continuous service is not more than the idle time for transmitting the non-time continuous service.
In the foregoing method, the second service includes a plurality of periodic services, and an idle time is set between two adjacent periodic services.
Meanwhile, the invention also provides a service information transmission device, which comprises:
the first judging unit is used for judging whether the starting time of the first service is positioned in the starting time period of a second service, wherein the second service is discontinuous in time, and the starting time period of the second service comprises service duration and idle time;
a second judging unit, configured to judge whether a sum of a total duration of the second service and a total duration of the first service is not greater than an initial time period of the second service if the initial time of the first service is within the initial time of the second service;
and the transmission unit is used for inserting the first service into the idle time of the second service for transmission if the sum of the duration of the second service and the duration of the first service is not greater than the initial time period of the first service.
In the service information transmission apparatus, the transmission unit further includes a third determining unit, so as to determine whether the idle time of the second service meets the requirement of the duration time of the first service.
The technical scheme of the invention has the following advantages:
1. according to the service information transmission method and device provided by the invention, the first service is inserted into the idle time of the second service for transmission, so that the flow and the bandwidth of the power service are saved, and the power service information transmission network is optimized to a great extent.
2. The method and the device for transmitting the service information judge the type of the first service before transmission, and adopt different methods to insert the first service into the idle time of the second service for transmission according to the different types of the first service, so that the method and the device have high applicability.
Example 1
The present embodiment provides a service information transmission method, as shown in fig. 1, which includes the following steps:
s1: judging whether the starting time of the first service is in the starting time period of the second service, wherein the second service is discontinuous in time, the starting time period of the second service comprises service duration and multiple idle times, the starting time of the first service in the starting time period of the second service means that the starting time of the first service is not earlier than the starting time of the second service, and meanwhile, the ending time of the first service is not later than the ending time of the second service.
S2: if the starting time of the first service is within the starting time of the second service, judging whether the sum of the total duration of the second service and the total duration of the first service is not greater than the starting time period of the second service, wherein the judgment is to ensure that the transmission of the first service and the second service is finished within the starting time period of the second service.
S3: and if the sum of the duration of the second service and the duration of the first service is not greater than the initial time period of the first service, inserting the first service into the idle time of the second service for transmission.
According to the service information transmission method, the first service is inserted into the idle time of the second service for transmission, so that the flow and the bandwidth of the power service are saved, and the power service information transmission network is optimized to a great extent. In the above embodiment, the first service is a time continuous service or a non-time continuous service or a combination of a time continuous service and a non-time continuous service, and multiple idle times in the second service are equal or unequal, the service information transmission method does not impose too much restrictions on the types of the first service and the second service, and is suitable for multiple time discontinuous services, and multiple types of the first service can be transmitted during the idle time of the time discontinuous service, so that the service information transmission method of the present invention has high applicability, in this embodiment, before the first service is inserted into the idle time of the second service for transmission, it is necessary to determine the type of the first service and determine whether the idle time of the second service is equal or not:
if the first service is a time continuous service, the step of inserting the first service into the idle time of the second service for transmission comprises the following steps:
firstly, searching first idle time which is greater than or equal to the duration of the first service in the idle time of the second service according to the time sequence;
and secondly, the first service is inserted into the first idle time for transmission.
In this step, before the time-continuous first service is inserted into the idle time of the second service for transmission, the first idle time meeting the requirement of the duration is searched for the first service, so as to effectively avoid the technical defect that the transmission of the first service is incomplete.
If the first service is a non-time continuous service and the multiple idle time of the second service are equal, the first service is inserted into the idle time of the second service for transmission, and the method comprises the following steps:
firstly, dividing a first service into a plurality of first service subtasks with the same duration, wherein the duration of the first service subtasks is not more than any idle time of a second service;
and then, sequentially inserting the first service subtasks into idle time of the second service corresponding to the first service subtasks for transmission according to the sequence of the first service from the beginning to the end.
Non-time continuous service, that is, the service can be split and transmitted, and the duration of the split sub-service is determined according to the size of the idle time, that is, once there is idle time in the second service, the transmission can be performed, the amount of the transmitted first service traffic is determined according to the size of the idle time, and it is only necessary to complete the transmission of the first service in a specified time period, specifically, the idle time of the second service is sorted according to the time sequence, the first service is divided into a plurality of first service sub-tasks according to the sequence from head to tail, and each first service sub-task is transmitted in the idle time corresponding to it, for example: and arranging the third first service subtasks sequenced according to the sequence of the first services to be transmitted in the third idle time sequenced according to the time sequence.
If the first service is a non-time continuous service and the multiple idle time of the second service is unequal, the first service is inserted into the idle time of the second service for transmission, and the method comprises the following steps:
dividing the first service into first service subtasks corresponding to the idle time one by one according to the sequence of the idle time, wherein the duration of the first service subtasks is less than or equal to the idle time of the corresponding second service;
and inserting the first service subtask into the idle time of the second service corresponding to the first service subtask for transmission.
In this step, a non-time-continuous first service is inserted into idle time of a second service with unequal idle time for transmission, the first service is sequentially divided into a plurality of first service subtasks from beginning to end according to the length of the idle time of the second service, the duration of each first service subtask is not longer than the duration of the idle time corresponding to the first service subtask, specifically, the idle time in the second service is sequenced according to the time sequence, the first service is divided into the first service subtasks corresponding to the idle time sequenced according to the time sequence from beginning to end according to the sequence from the beginning to the end, and the duration of each first service subtask is determined according to the idle time corresponding to the first service subtask.
If the first service comprises a time continuous service and a non-time continuous service and the idle time of the second service is equal, inserting the first service into the idle time of the second service for transmission, comprising:
firstly, searching first idle time with duration longer than or equal to duration of time continuous service in first service in idle time of second service;
secondly, inserting the time continuous service into the first idle time for transmission;
and thirdly, dividing the non-time continuous service in the first service into a plurality of first service subtasks, wherein the duration of each first service subtask is less than or equal to each second idle time corresponding to the second service.
In this step, the first service includes a time continuous service and a non-time continuous service, and the time continuous service must be transmitted within a period of idle time, and cannot be split for transmission, in this embodiment, a first idle time is first allocated to the time continuous service in the first service, if the idle time does not satisfy the duration length of the time continuous service in the first service, the non-time continuous service is not determined, otherwise, the time continuous service in the first service is first transmitted, and then a second idle time is allocated to the non-time continuous service in the first service.
If the first service comprises a time continuous service and a non-time continuous service and the idle time of the second service is unequal, the first service is inserted into the idle time of the second service for transmission, and the method comprises the following steps:
firstly, selecting a first idle time which is not less than the duration of a time continuous service in a first service and transmitting the time continuous service;
and secondly, dividing and transmitting the non-time continuous service in the first service in sequence according to the length of a second idle time after the idle time of the transmission time continuous service, wherein the duration of the divided non-time continuous service is not longer than the length of the second idle time of the transmission time continuous service.
In this step, the idle time in the second service is not equal, first, a first idle time meeting the requirement of the duration is searched for the time-continuous service in the first service, then, the first service is divided into a plurality of first service subtasks according to the length of a second idle time after the first idle time, the second idle time is not less than the duration of the first service subtasks transmitted by the first service subtasks, and here, if the first idle time meeting the time-continuous service is not searched for, the idle time is not scheduled for the non-time-continuous service in the first service for transmission.
In this embodiment, the second service includes a plurality of periodic services, and idle time is set between two adjacent periodic services, that is, the first service is transmitted by interleaving the idle time between two adjacent periodic services, so that a waste phenomenon caused by allocating an independent bandwidth for the first service and the second service for transmission is effectively avoided, and a bandwidth for transmitting service information is optimized to a great extent.
As a specific implementation, an example of an application is as follows:
(1) setting a periodic service type as α, an elastic service type as β, a background service type as gamma, a trigger start time point as s, a trigger end time point as e, a duration as t, and a service duration as tl
(2) When β traffic occupies a network fragment of α traffic for transmission, it is necessary to ensure that an available α traffic trigger time period is within a β traffic trigger time period, and meanwhile, the network fragment of the available α traffic needs to meet the transmission needs of β traffic in a time dimension, that is, to meet:
wherein n is 0,1,2.
(3) When the gamma service occupies α network fragments for service transmission, it is necessary to ensure that the available α service triggering time period is within the gamma service triggering time period, and at the same time, the network fragments for α service are necessary to meet the transmission requirement of the gamma service in the time dimension, and due to the sharable property of the gamma service, more than one cycle of α service may be spanned within the gamma service triggering time period, that is, it is satisfied:
wherein n is 0,1,2, and δ is 1,2,3.
(4) When α, β and gamma services are transmitted simultaneously, because β 0 service is not fragmentable, a periodic network fragment of α service preferentially matches β 1 service, when β service cannot trigger a matching condition, gamma service is continuously matched, when gamma service cannot be matched, optimization of the network fragment at this time fails, when β service triggers matching, the rest network fragments continuously match gamma service, at this time, it is required to ensure that after β service is matched, available α service triggering time period is within gamma service triggering time period interval, meanwhile, network fragments of available α service need to meet transmission requirement of gamma service in time dimension, because β service has been matched, at this time, β service triggering time start time is determined as s'βTrigger end time will be determined to be e'βAnd satisfies the following conditions:
at this time, the γ service needs to satisfy:
(5) setting the matching conditions of the three types of services as corresponding functions, and setting the following conditions:
is a P (α) which is,
the matching process of α, β and gamma services is shown in fig. 2.
The method is realized by a software defined network mode and is integrated in an SDN controller in an algorithm mode. The method is suitable for a scene that the power service with the periodic transmission characteristic and the cut-off time driving characteristic multiplexes a transmission channel of the power communication network. The power periodic service, the elastic service and the background service have the predicted triggering time and duration. The idle time of the periodic service is a fixed reference value, and the elastic service and the background service need to be matched with the reference value. The elastic traffic has an off-time driving characteristic but cannot be transmitted in segments, and therefore, it is necessary to preferentially match the idle time of the periodic traffic. Background class traffic has a cut-off event driven characteristic and can be transmitted in segments, thus matching the periodic traffic idle time last.
According to the scheme, the transmission attributes of various electric power services with different time characteristics are predefined by using a software defined network mode, and the off-time driving type services are transmitted by being inserted into the idle bandwidth of the periodic services, so that the maximum concurrent data volume of a transmission channel is effectively controlled, network fragments are reduced, the use efficiency of the transmission channel is improved, and the problem of repeated construction caused by low resource utilization rate of an electric power communication network is solved.