Uplink data transmission method and device

By setting transmission timing methods in traditional Ethernet chips, using hardware timers and counters to achieve precise control of uplink data transmission, the problem of overlapping uplink signals in passive optical networks is solved, cost is reduced, and it does not rely on specially designed PON chips.

CN120017994APending Publication Date: 2025-05-16RUIJIE NETWORKS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311514370.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In passive optical networks, the uplink signals of ONUs may overlap, resulting in the inability to resolve the OLT and need to be solved by specifying transmission time slots. However, the existing technology relies on specially designed PON chips and is costly.

Method used

In traditional Ethernet chips, the transmission timing method is set, and the first timer is set according to the authorization time period through the hardware timer and the counter, and the hardware interrupt is entered in advance to ensure that uplink data transmission is accurately started at the beginning of the authorization time period.

Benefits of technology

It realizes precise control of uplink data transmission on traditional Ethernet chips, avoids interference from other programs, reduces costs, and does not rely on specially designed PON chips.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017994A_ABST
    Figure CN120017994A_ABST
Patent Text Reader

Abstract

The invention discloses an uplink data transmission method and device, and aims to reduce the influence of other operations of user equipment on uplink data transmission and realize high-precision uplink data transmission by setting hardware interruption of the user equipment in advance. The method is applied to user side equipment, and comprises the following steps: when authorization information from local side equipment is received, determining timeout time of a first timer according to a starting moment of an authorization time period indicated in the authorization information; the authorization information is used for indicating the user side equipment to transmit uplink data in an authorization time period; and entering hardware interruption when the first timer reaches the timeout time, and entering an authorized time period at the end moment of the hardware interruption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of optical fiber communication technology, and in particular to a method and device for transmitting uplink data. Background Art

[0002] like Figure 1 As shown, in a passive optical network (PON), an optical line terminal (OLT) is connected to multiple optical network units (ONUs) through a splitter. Therefore, there are multiple different uplink signal transmissions from ONUs to OLT in the network. If the uplink signals sent by each ONU overlap on the line, the OLT will be unable to parse them. Therefore, the OLT needs to specify the transmission time slot of each ONU (that is, the OLT authorizes the ONU), and then each ONU transmits uplink data in its own authorized time slot to achieve the effect of splitting. In the current PON network, in order to realize that each ONU accurately transmits data according to its own transmission time slot, manufacturers need to specially design and produce PON chips that meet the PON technical requirements, so that the PON technology can be implemented at the MAC layer with the help of the PON chip. This implementation method is relatively costly. Summary of the invention

[0003] The present application provides a method and device for transmitting uplink data, which no longer relies on a specially designed PON chip to achieve accurate transmission of uplink data, but instead sets a transmission timing method in a traditional Ethernet chip to achieve timely data transmission in a traditional Ethernet scenario.

[0004] In a first aspect, the present application proposes a method for transmitting uplink data, which is applied to a user terminal device, comprising:

[0005] Upon receiving authorization information from a central office device, determining a timeout time of a first timer according to a start time of an authorization time period indicated in the authorization information; the authorization information is used to instruct the user terminal device to transmit uplink data within the authorization time period;

[0006] When the first timer reaches the timeout period, a hardware interrupt is entered, and when the hardware interrupt ends, the authorization time period is entered.

[0007] In the related art, if the user terminal device performs other operations or programs at the start time of the authorized time period, the time for transmitting uplink data will be delayed. In order to avoid the problem of delayed start of data transmission caused by other operations and programs, the present application proposes to enter the hardware interrupt in advance before the start time of the authorized time period, and the user terminal device will not perform any other operations after entering the hardware interrupt. Then, at the end time of the hardware interrupt, enter the authorized time period to start transmitting uplink data. Based on this solution, the process of transmitting uplink data by the user terminal device will not be affected by other programs, avoiding the problem of delayed transmission and realizing accurate control of uplink data transmission time.

[0008] In some embodiments, the set duration is determined according to the maximum duration allowed by the hardware interrupt, and the end time of the hardware interrupt is the start time of the authorized time period; and determining the timeout time of the first timer according to the start time of the authorized time period indicated in the authorization information includes:

[0009] Determine a timeout period of the first timer according to a time difference between the starting time and the first time, and a duration of the hardware interrupt;

[0010] The first moment is the Precision Time Protocol (PTP) time determined when the authorization information is received.

[0011] Since there is an offset between the local time of the user terminal device and the Precision Time Protocol (PTP) time, there is also an error in directly using the local time to set the first timer. Based on this, the present application proposes to determine the PTP time corresponding to the current time when it is necessary to calculate and set the timer, and set it using the PTP time to eliminate the error caused by the deviation between the local time and the PTP time.

[0012] In some embodiments, the method further comprises:

[0013] Periodically obtain the Precision Time Protocol (PTP) time and use the obtained PTP time to synchronize the local time;

[0014] The first moment is determined in the following manner:

[0015] The first time is obtained by correcting the time when the authorization information is received according to the cycle for obtaining the PTP time, the most recently obtained PTP time, and the local time when the most recently obtained PTP time is obtained.

[0016] The solution of periodically synchronizing the local time will cause a deviation between the local time and the PTP time within the cycle time. In order to solve this problem, the present application proposes a method for correcting the local time in real time. Since the synchronization of the local time and the PTP time is performed periodically, the deviation between the local time and the PTP time can be determined at the time of synchronization, and the deviation value at each moment in a cycle can be calculated in proportion, so as to realize the real-time correction of the local time.

[0017] In some embodiments, the end time of reaching the hardware interrupt is determined in the following manner:

[0018] Determine a first target count value corresponding to the starting moment according to a time difference between the starting moment and the first moment, and a count value of a counter corresponding to the first moment;

[0019] When the first timer times out, it is started to determine whether the counter has reached the first target technical count value, and when the counter reaches the first target count value, it is determined that the end time of the hardware interrupt has arrived.

[0020] Since a round of timing has just ended when the hardware interrupt is entered, if a timer is used to determine whether the hardware interrupt ends (that is, the start time of the authorized time period), the timer needs to be reset again when the hardware interrupt is entered. Resetting the timer takes a certain amount of time, and the duration of the hardware interrupt is relatively short, generally at the microsecond level. In order to avoid the problem that the timer has not been set after the hardware interrupt ends, the present application proposes to use a counter to determine whether the start time of the authorized time period has arrived. The value of the counter corresponding to the start time is determined according to the time difference between the authorization start time and the first time, so that when the counter reaches a certain value, the transmission of uplink data can be started.

[0021] In some embodiments, after determining the timeout period of the first timer, the method further includes:

[0022] Determine a second target count value corresponding to an end time in the authorized time period according to the first target count value and the authorized time period;

[0023] When the counter reaches the second target count value, the transmission of uplink data is stopped.

[0024] Based on the above scheme, after starting to transmit uplink data, a counter is used to determine whether the transmission end time has been reached, so as to achieve accurate control to stop transmitting uplink data. Stopping the transmission in time can reduce the impact on other operations of the device.

[0025] In some embodiments, after entering the hardware interrupt and before reaching the end time of the hardware interrupt, the method further includes:

[0026] The uplink data to be transmitted and the instructions required for transmitting the uplink data are read from the main memory, and the read uplink data and the instructions are stored in a cache.

[0027] Based on the above solution, the corresponding data and instructions are loaded from the main memory into the cache after the hardware interruption to avoid the cold start affecting the precise control of the transmission time.

[0028] In some embodiments, before determining a second target count value corresponding to an end time in the authorized time period according to the first target count value and the authorized time period, it is determined that the length of the authorized time period is less than a set threshold.

[0029] Based on the above solution, when it is determined that the authorized time period is short, a counter is used to determine whether the transmission end time has been reached, thereby avoiding the problem of inaccurate timer usage in a short period of time.

[0030] In some embodiments, after determining the timeout period of the first timer, the method further includes:

[0031] When starting to transmit uplink data, a second timer is set according to the authorization time period, and when the second timer reaches a timeout, the transmission of uplink data is stopped. The length of the authorization time period is not less than a set threshold.

[0032] Based on the above solution, when the authorized time period is long, a timer may be used to determine whether the transmission end time has been reached.

[0033] In some embodiments, the first timer is a hardware timer of the user terminal device.

[0034] In some embodiments, the counter is a hardware counter of the user terminal device.

[0035] Using hardware timers and hardware counters can improve the accuracy of timing and counting.

[0036] In a second aspect, the present application proposes a transmission device for uplink data, the device is applied to a user terminal device, or the device is the user terminal device, and the device includes:

[0037] A communication unit, configured to receive authorization information from a central office device; the authorization information is used to instruct the user terminal device to transmit uplink data within an authorized time period;

[0038] a processing unit, configured to, upon receiving the authorization information, determine a timeout time of the first timer according to a start time of the authorization time period indicated in the authorization information;

[0039] The processing unit is further configured to enter a hardware interrupt when the first timer reaches a timeout period, and enter the authorized time period at the end of the hardware interrupt.

[0040] In some embodiments, the duration of the hardware interruption is less than the maximum duration allowed by the hardware interruption, and the end time of the hardware interruption is the start time of the authorized time period; the processing unit is specifically used to:

[0041] Determine a timeout period of the first timer according to a time difference between the starting time and the first time, and a duration of the hardware interrupt;

[0042] The first moment is the Precision Time Protocol (PTP) time determined when the authorization information is received.

[0043] In some embodiments, the processing unit is further used to periodically obtain the Precision Time Protocol (PTP) time, and use the obtained PTP time to synchronize the local time;

[0044] The processing unit, when determining the first moment, is specifically configured to:

[0045] The first time is obtained by correcting the time when the authorization information is received according to the cycle for obtaining the PTP time, the most recently obtained PTP time, and the local time when the most recently obtained PTP time is obtained.

[0046] In some embodiments, the processing unit, when determining that the hardware interrupt end time has arrived, is specifically configured to:

[0047] Determine a first target count value corresponding to the starting moment according to a time difference between the starting moment and the first moment, and a count value of a counter corresponding to the first moment;

[0048] When the first timer times out, it is started to determine whether the counter has reached the first target technical count value, and when the counter reaches the first target count value, it is determined that the end time of the hardware interrupt has arrived.

[0049] In some embodiments, the processing unit is further configured to:

[0050] The uplink data to be transmitted and the instructions required for transmitting the uplink data are read from the main memory, and the read uplink data and the instructions are stored in a cache.

[0051] In some embodiments, the processing unit is further configured to:

[0052] Determine a second target count value corresponding to an end time in the authorized time period according to the first target count value and the authorized time period;

[0053] When the counter reaches the second target count value, uplink data transmission is stopped; and the length of the authorization time period is less than a set threshold.

[0054] In some embodiments, the processing unit is further configured to:

[0055] When starting to transmit uplink data, a second timer is set according to the authorized time period, and when the second timer reaches a timeout period, the transmission of uplink data is stopped; the length of the authorized time period is not less than a set threshold.

[0056] In some embodiments, the first timer is a hardware timer of the user terminal device.

[0057] In some embodiments, the counter is a hardware counter of the user terminal device.

[0058] In a third aspect, an electronic device is provided, the electronic device comprising a controller and a memory. The memory is used to store computer-executable instructions, and the controller executes the computer-executable instructions in the memory to use hardware resources in the controller to perform the operation steps of any possible implementation method of the first aspect.

[0059] In a fourth aspect, a computer-readable storage medium is provided, in which instructions are stored, and when the computer-readable storage medium is run on a computer, the computer executes the above-mentioned methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0061] Figure 1 A schematic diagram of an optical network architecture;

[0062] Figure 2 A schematic diagram of the architecture of a communication system provided in an embodiment of the present application;

[0063] Figure 3 A schematic diagram of a flow chart of an uplink data transmission method provided in an embodiment of the present application;

[0064] Figure 4A A schematic diagram of a timing relationship of uplink data transmission provided in an embodiment of the present application;

[0065] Figure 4B A schematic diagram of another timing relationship of uplink data transmission provided in an embodiment of the present application;

[0066] Figure 5 A schematic diagram of another timing relationship of uplink data transmission provided in an embodiment of the present application;

[0067] Figure 6 A schematic diagram of another timing relationship of uplink data transmission provided in an embodiment of the present application;

[0068] Figure 7 A schematic diagram of the comparison between PTP time and local time provided in an embodiment of the present application;

[0069] Figure 8 A schematic diagram of the structure of a user terminal device provided in an embodiment of the present application;

[0070] Fig. 9 A schematic diagram of the structure of an uplink data transmission device provided in an embodiment of the present application;

[0071] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0073] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented using sequences other than those illustrated or described herein.

[0074] In the traditional splitting scheme, in order to enable each ONU to accurately transmit uplink data according to its own transmission time slot, the manufacturer needs to use a special chip based on the PON protocol to achieve this. However, the traditional Ethernet chip that realizes splitting through software configuration is limited by the non-real-time operating system (such as the Linux system), and the response time depends on the system load. It is impossible to achieve accurate time control, and there may be problems such as overlap of the actual transmission time slots of two ONUs, or waste of transmission time slots. In order to realize that data can be accurately transmitted according to the time period authorized by the local equipment based on the Ethernet chip of the user-end device, the present application proposes a method for transmitting uplink data. The ONU sets a timer according to the authorization time of the OLT to enter the hardware interrupt in advance, control the transmission of the uplink data, and thus avoid the influence of the system load on the transmission of the uplink data. The scheme of the present application realizes accurate ONU uploading data in the scenario of traditional Ethernet chips.

[0075] In order to facilitate understanding of the solution of the present application, the communication system to which the present application is applicable is introduced below. Figure 2 , is a schematic diagram of the architecture of a communication system provided in an embodiment of the present application. Figure 2 As shown, the communication system to which the present application is applicable includes an Ethernet central office device, an Ethernet user terminal device and an ODN. The Ethernet central office device is connected to multiple Ethernet user terminal devices through the ODN. Among them, the ODN is mainly composed of three parts: a light source, an optical fiber and an optical signal receiver. The light source can be a laser, which is used to generate an optical signal, and the optical signal is transmitted to the Ethernet central office device or multiple Ethernet user terminal devices through the optical fiber. The optical signal receiver is used to receive an optical signal from the Ethernet central office device or the Ethernet user terminal device. The Ethernet central office device is used to connect the optical fiber trunk line, and is a device for the Ethernet entrance and the intranet entrance and exit. Exemplarily, the Ethernet central office device can also be called an OLT device. The Ethernet central office device is used to allocate transmission time slots for uplink data to each Ethernet user terminal device, and receive uplink data sent by each Ethernet user terminal device in its respective transmission time slot.

[0076] It should be noted that the above Figure 2 The communication system shown is only an example, and the present application does not limit the number of Ethernet client devices included in the communication system. Figure 2 The Ethernet central office equipment included in the description is referred to as the central office equipment, and the Ethernet user-end equipment is referred to as the user-end equipment.

[0077] Below, based on Figure 2 The communication system architecture shown in the figure introduces the solution of the present application. Figure 3 , is a flow chart of an uplink data transmission method provided in an embodiment of the present application. Optionally, Figure 3The method flow shown can be Figure 2 The process may be executed by any user terminal device, or by specific components included in the user terminal device, such as a processing chip, a CPU, a processing thread, etc. included in the user terminal device. Figure 3 The method flow shown specifically includes:

[0078] 301, receiving authorization information from the local end device.

[0079] The authorization information is used to instruct the user terminal device to transmit uplink data within the authorization time period. The authorization time period is a certain time period in the future, and the authorization time period can also be called an authorized transmission time slot. The authorization time period includes a start time and an end time, which are used to indicate the time when the user terminal device can start transmitting uplink data and end transmitting uplink data.

[0080] Exemplarily, the local device may periodically send authorization information, for example, before each data transmission cycle begins, to indicate the transmission time slot occupied by the user-end device during the data transmission cycle. The transmission time slot occupied by the user-end device is the authorized time period.

[0081] 302. Determine a timeout period of a first timer according to a start time of the authorization time period.

[0082] The time when the first timer reaches the timeout time is before the start time, and the first timer is used to determine the time of the hardware interrupt. That is, before the start time, the hardware interrupt is entered in advance to ensure that no other program occupies resources and affects the start of data transmission at the start time. As an optional method, the first timer can use the hardware timer of the user terminal device, so that the hardware interrupt can be controlled when the timeout time is reached.

[0083] 303, when the first timer times out, a hardware interrupt is entered, and when the hardware interrupt ends, an authorized time period is entered.

[0084] The duration of the hardware interruption is less than the maximum duration allowed by the hardware interruption, and the end time of the hardware interruption is the start time of the authorized time period. Exemplarily, when setting the first timer, the sum of the timeout time of the first timer and the duration of the hardware interruption is equal to the time from the start time, so after the first timer times out, the hardware interruption occurs, the hardware interruption lasts for a certain period of time, and the end time of the hardware interruption is the start time of the authorized time period. Therefore, when the hardware interruption ends, it can be considered that the start time has been reached, and uplink data can be transmitted.

[0085] In some cases, the user-end device is executing other code operations or executing other programs at the start time of the authorized time period, resulting in the user-end device being unable to transmit uplink data on time and requiring delayed upload. Based on this, the present application proposes entering a hardware interrupt within a period of time before the start time, during which the user-end device will not perform any other operations. Furthermore, the end time of the hardware interrupt is the start time of the authorized time period, and the transmission of uplink data is started at the end of the hardware interrupt. Based on this solution, the process of uplink data transmission by the user-end device will not be affected by other programs, thus avoiding the problem of delayed transmission and achieving precise control of the uplink data transmission time.

[0086] In some embodiments, a hardware interrupt can be performed when the transmission start time is reached. For example, a timer timeout can be set according to the time difference between the time when the authorization information is received and the start time of the authorization time period. Then, when the timer reaches the timeout time, a hardware interrupt and uplink data transmission can be performed at the same time. For example, see Figure 4A As shown, the hardware interrupt and the start of the transfer are performed at the same time. However, when the hardware interrupt time (or the start of the transfer time) is reached, if the thread executing the data transfer is processing a hardware interrupt caused by other operations, then the start of the transfer time will be delayed. For example, see Figure 4B As shown, the theoretical interruption time and the theoretical start transmission time are the timeout time of the set timer, but the actual start transmission time will be delayed due to other hardware interruptions, so that the accurate control of the uplink data transmission time cannot be achieved. In view of this, the present application proposes to advance the hardware interruption time, and the advance time is determined by the maximum time allowed by the hardware interruption, so that the uplink data can still be accurately transmitted even in the presence of other hardware interrupt interference.

[0087] Exemplarily, the time of entering the hardware interrupt can be determined by setting a timer, such as using a hardware timer, so that when the hardware timer reaches the timeout period, the hardware interrupt is entered. For ease of description, the timer used to determine the time of entering the hardware interrupt is referred to as the first timer.

[0088] When setting the timeout period of the first timer, it can be determined based on the time difference between the start moment and the first moment, and the duration of the hardware interruption. The first moment is the PTP time determined when the authorization information is received, and the user terminal device calculates and sets the first timer at the first moment. Exemplarily, the user terminal device may first calculate the time difference between the start moment and the first moment, such as the calculated time difference is 10 minutes. Further, the user terminal device may calculate the difference between the time difference and the duration of the hardware interruption, and use the difference as the timeout period of the first timer. For example, the time difference between the start moment and the first moment is 10 minutes, and the duration of the hardware interruption is 2 minutes, then the timeout period of the first timer is 8 minutes. When the first timer reaches the timeout period, it enters a hardware interrupt, and the end moment of the hardware interruption is the start moment, thereby starting to transmit uplink data at the start moment. As an example, see Figure 5 , showing the timing relationship between hardware interrupts and the start time.

[0089] In some embodiments, since the duration of the hardware interrupt is short, generally at the microsecond level, there will be errors in using the timer again after the hardware interrupt to determine whether the hardware interrupt end time (that is, whether the start time of the authorized time period has been reached). Therefore, the present application proposes to determine the value of the counter corresponding to the start time according to the time difference between the start time of the authorized time period and the first time, so that when the counter reaches the determined value, it can be determined that the hardware interrupt end time has been reached and the transmission of uplink data can be started. For example, it can be determined according to the time difference that when the counter value is the first target count value, the transmission of uplink data is started when the hardware interrupt end time has been reached. Exemplarily, the counter is defined to increase by one bit per second, the time difference between the first moment and the start time is 100s, and the count value of the counter corresponding to the first moment is 1200, then it can be determined that the first target count value corresponding to the start time is 1300. Further, after entering the hardware interrupt, it can be cyclically determined whether the count value of the counter reaches 1300, and the transmission of uplink data is started when the counter reaches 1300. Exemplarily, the counter introduced in the above embodiment can adopt the hardware counter of the user terminal device, for example, the count counter of the CPU coprocessor of the MT7621 platform can be adopted, and the precision of the counter is half of the CPU clock frequency. Taking the clock frequency of 880MHz as an example, the precision of the count counter is 1 / 440us, and the precision is 2.3ns. After the hardware interruption, the CPU is in an idling state, and the value of the counter is read cyclically and judged whether it reaches the first target count value corresponding to the starting time. And when the first target count value is reached, the transmission of uplink data is started.

[0090] Before transmitting uplink data, the Media Access Control (MAC) layer and the output optical port need to be activated. The activation operation includes operations on registers and operations on input / output (I / O) interfaces. In some cases, such as when the code is executed for the first time or jumps to a new code block, a cold start may occur, that is, the instructions required to transmit data are not stored in the cache. Therefore, the operations performed on the registers and I / O interfaces cannot take effect immediately, and the corresponding data and instructions need to be read from the main memory, which takes longer than reading directly from the cache. Based on this, the present application proposes reading data and instructions from the main memory when entering a hardware interrupt, and storing the read data and instructions in the cache. Therefore, when the hardware interrupt ends, the data and instructions have been cached and direct data transmission can be achieved, reducing the delay caused by cache misses of data or instructions during data transmission. For example, see Figure 6 , showing the timing relationship between hardware interrupts, pre-stored data and instructions, and initiating transfers.

[0091] In some embodiments, after determining the start time, the end transmission time may be further determined according to the length of the authorized time period. In one possible scenario, if the authorized time period is long, the timer may be set and started again after starting to transmit uplink data to determine the end transmission time. For example, after starting to transmit uplink data, a second timer may be set, and the timeout period of the second timer is the authorized time period. Furthermore, when the second timer reaches the timeout period, the transmission of uplink data is stopped.

[0092] In another possible scenario, the authorized time period is short, and there will be errors in using a timer to determine whether the end transmission time has been reached. Therefore, the present application proposes to determine the end transmission time by a counter. For example, the first target count value corresponding to the start time of the authorized time period can be obtained, and the count value that the counter increases from the start time to the end transmission time can be determined according to the length of the authorized time period, and the sum of the determined count value and the first target count value is used as the second target count value, and the second target count value is the count value of the counter corresponding to the end transmission time. For example, continuing the example in the above embodiment, the first target count value is 1300, and the length of the authorized time period is 10s, then the count value that the corresponding counter increases during the authorized time period is 10. Furthermore, the second target count value can be determined based on the count value that increases during the authorized time period and the first target count value, that is, the second target count value is 1300+10=1310. Further, the transmission of uplink data can be stopped when the counter reaches 1310.

[0093] In order to improve the accuracy of data transmission time, the present application proposes to determine the PTP time corresponding to the current moment when the authorization information is received, and use the determined PTP time to update the local time (i.e., the first moment introduced in the above embodiment). The PTP protocol is a protocol used to synchronize clocks throughout a computer network. On a local area network, it can achieve sub-microsecond clock accuracy, making it suitable for measurement and control systems. Therefore, the user-end device periodically synchronizes PTP time and local time, that is, periodically obtains PTP time, and uses the obtained PTP time to synchronize local time. In this way, there will be a certain deviation between the local time and PTP time within a cycle time. For example, see Figure 7 , showing a schematic diagram comparing PTP time and local time. In order to solve the problems existing in periodic synchronization, the present application proposes to calculate the deviation value between the local time and the PTP time at the time of synchronization, calculate the deviation value at each moment in the cycle time according to the ratio, and realize real-time correction of the local time. For example, when the user-end device receives the authorization information, it can use the synchronization cycle, the PTP time obtained when the most recent synchronization is performed, and the local time when the most recent synchronization is performed to correct the current local time to obtain the first moment. As an example, the first moment can be calculated using the following formula (1):

[0094] curr_ptp=(curr_tik-last_tik)*offset / cycle+last_ptp Formula (1)

[0095] Among them, curr_ptp is the first moment, curr_tik is the current local time, last_tik is the local time when the synchronization was last performed, offset is the deviation between the PTP time obtained during the last synchronization and the local time when the synchronization was last performed, cycle is the cycle of synchronization, and last_ptp is the PTP time obtained during the last synchronization.

[0096] As an example, the steps performed by the user terminal device described in the above embodiments may be performed by a specific module in the user terminal device. For example, the structural diagram of the user terminal device can be seen in FIG. Figure 8, which includes an authorization scheduling module, an authorization time module, a platform adaptation module and a hardware timer. Exemplarily, the authorization scheduling module can be used to receive authorization information from the local device, and set the corresponding hardware timer according to the authorization time period included in the authorization information and the current PTP time indication of the authorization time module, and when the timer reaches the timeout time, transmit the uplink data by calling the interface in the platform adaptation module. The authorization time module is used to calculate the PTP time according to the local time, for example, the first moment can be calculated by the above formula (1), and the first moment is provided to the authorization scheduling module. The authorization time module is also used to set the hardware timer according to the instructions of the authorization scheduling module. The platform adaptation module is used to provide a unified operation interface, such as providing an interface for performing uplink data transmission. It should be noted that, Figure 8 It is only an example, and each module shown therein is only introduced as a functionality and does not constitute a limitation on the structure of the user terminal device.

[0097] Based on the same concept as the above method, see Fig. 9 , is an uplink data transmission device 900 provided in an embodiment of the present application. The device 900 is used to execute the steps disclosed in the above-mentioned method embodiments. In order to avoid repetition, they will not be described here. The device 900 includes: a communication unit 901 and a processing unit 902.

[0098] The communication unit 901 is used to receive authorization information from the central office device; the authorization information is used to instruct the user terminal device to transmit uplink data within the authorized time period;

[0099] The processing unit 902 is configured to determine a timeout time of a first timer according to a start time of an authorization time period indicated in the authorization information when the authorization information is received;

[0100] The processing unit 902 is further configured to enter a hardware interrupt when the first timer reaches a timeout period, and enter the authorized time period at the end of the hardware interrupt.

[0101] In some embodiments, the duration of the hardware interruption is less than the maximum duration allowed by the hardware interruption, and the end time of the hardware interruption is the start time of the authorized time period; the processing unit 902 is specifically used to:

[0102] Determine a timeout period of the first timer according to a time difference between the starting time and the first time, and a duration of the hardware interrupt;

[0103] The first moment is the Precision Time Protocol (PTP) time determined when the authorization information is received.

[0104] In some embodiments, the processing unit 902 is further used to periodically obtain the Precision Time Protocol PTP time, and use the obtained PTP time to synchronize the local time;

[0105] The processing unit 902, when determining the first moment, is specifically configured to:

[0106] The first time is obtained by correcting the time when the authorization information is received according to the cycle for obtaining the PTP time, the most recently obtained PTP time, and the local time when the most recently obtained PTP time is obtained.

[0107] In some embodiments, when determining that the hardware interrupt end time has arrived, the processing unit 902 is specifically configured to:

[0108] Determine a first target count value corresponding to the starting moment according to a time difference between the starting moment and the first moment, and a count value of a counter corresponding to the first moment;

[0109] When the first timer times out, it is started to determine whether the counter has reached the first target technical count value, and when the counter reaches the first target count value, it is determined that the end time of the hardware interrupt has arrived.

[0110] In some embodiments, the processing unit 902 is further configured to:

[0111] The uplink data to be transmitted and the instructions required for transmitting the uplink data are read from the main memory, and the read uplink data and the instructions are stored in a cache.

[0112] In some embodiments, the processing unit 902 is further configured to:

[0113] Determine a second target count value corresponding to an end time in the authorized time period according to the first target count value and the authorized time period;

[0114] When the counter reaches the second target count value, uplink data transmission is stopped; and the length of the authorization time period is less than a set threshold.

[0115] In some embodiments, the processing unit 902 is further configured to:

[0116] When starting to transmit uplink data, a second timer is set according to the authorized time period, and when the second timer reaches a timeout period, the transmission of uplink data is stopped; the length of the authorized time period is not less than a set threshold.

[0117] In some embodiments, the first timer is a hardware timer of the user terminal device.

[0118] In some embodiments, the counter is a hardware counter of the user terminal device.

[0119] Fig.10 The electronic device 1000 in the embodiment of the present application may further include a communication interface 1003, which is, for example, a network port. The electronic device may transmit data through the communication interface 1003. For example, the communication interface 1003 may implement the above Fig. 9 The functions of the communication unit 901 introduced in .

[0120] In the embodiment of the present application, the memory 1002 stores instructions that can be executed by at least one controller 1001. The at least one controller 1001 can be used to execute each step in the above method by executing the instructions stored in the memory 1002. For example, the controller 1001 can implement the above Fig. 9 The function of the processing unit 902 in.

[0121] Among them, the controller 1001 is the control center of the electronic device, which can use various interfaces and lines to connect various parts of the entire electronic device, by running or executing instructions stored in the memory 1002 and calling data stored in the memory 1002. Optionally, the controller 1001 may include one or more processing units, and the controller 1001 may integrate an application controller and a modem controller, wherein the application controller mainly processes the operating system and application programs, etc., and the modem controller mainly processes wireless communications. It is understandable that the above-mentioned modem controller may not be integrated into the controller 1001. In some embodiments, the controller 1001 and the memory 1002 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.

[0122] The controller 1001 may be a general controller, such as a central processing unit (CPU), a digital signal controller, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general controller may be a microcontroller or any conventional controller, etc. The step of adjusting the bandwidth of the data transmission channel during data transmission disclosed in the embodiments of the present application may be performed directly by a hardware controller, or may be performed by a combination of hardware and software modules in the controller.

[0123] The memory 1002 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 1002 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (English: Random Access Memory, referred to as: RAM), a static random access memory (English: Static Random Access Memory, referred to as: SRAM), a programmable read-only memory (English: Programmable Read Only Memory, referred to as: PROM), a read-only memory (English: Read Only Memory, referred to as: ROM), an electrically erasable programmable read-only memory (English: Electrically Erasable Programmable Read-Only Memory, referred to as: EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 1002 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1002 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0124] By designing and programming the controller 1001, for example, the code corresponding to the method introduced in the above embodiment can be solidified into the chip, so that the chip can execute the steps of the above method during operation. How to design and program the controller 1001 is a technology well known to those skilled in the art and will not be repeated here.

[0125] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0126] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a controller of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the controller of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0129] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0130] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for transmitting uplink data, characterized in that: The method is applied to a user terminal device, and the method comprises: Upon receiving authorization information from a central office device, determining a timeout time of a first timer according to a start time of an authorization time period indicated in the authorization information; the authorization information is used to instruct the user terminal device to transmit uplink data within the authorization time period; When the first timer reaches the timeout period, a hardware interrupt is entered, and when the hardware interrupt ends, the authorization time period is entered.

2. The method according to claim 1, characterized in that The duration of the hardware interruption is less than the maximum duration allowed by the hardware interruption, and the end time of the hardware interruption is the start time of the authorized time period; and determining the timeout time of the first timer according to the start time of the authorized time period indicated in the authorization information includes: Determine a timeout period of the first timer according to a time difference between the starting time and the first time, and a duration of the hardware interrupt; The first moment is the Precision Time Protocol (PTP) time determined when the authorization information is received.

3. The method according to claim 2, characterized in that The method further comprises: Periodically obtain the Precision Time Protocol (PTP) time and use the obtained PTP time to synchronize the local time; The first moment is determined in the following manner: The first time is obtained by correcting the time when the authorization information is received according to the cycle for obtaining the PTP time, the most recently obtained PTP time, and the local time when the most recently obtained PTP time is obtained.

4. The method according to claim 2 or 3, characterized in that: The end time of reaching the hardware interrupt is determined in the following manner: Determine a first target count value corresponding to the starting moment according to a time difference between the starting moment and the first moment, and a count value of a counter corresponding to the first moment; When the first timer times out, it is started to determine whether the counter has reached the first target technical count value, and when the counter reaches the first target count value, it is determined that the end time of the hardware interrupt has arrived.

5. The method according to claim 4, characterized in that After determining the timeout period of the first timer, the method further includes: Determine a second target count value corresponding to the end time of the authorized time period according to the first target count value and the authorized time period; When the counter reaches the second target count value, the transmission of uplink data is stopped.

6. The method according to any one of claims 1 to 3, characterized in that: After entering the hardware interrupt and before reaching the end time of the hardware interrupt, the method further includes: The uplink data to be transmitted and the instructions required for transmitting the uplink data are read from the main memory, and the read uplink data and the instructions are stored in a cache.

7. The method according to any one of claims 1 to 3, characterized in that: After determining the timeout period of the first timer, the method further includes: When starting to transmit uplink data, a second timer is set according to the authorized time period, and when the second timer reaches a timeout period, the transmission of uplink data is stopped.

8. A transmission device for uplink data, characterized in that: The device is applied to a user terminal device, or the device is the user terminal device, and the device includes: A communication unit, configured to receive authorization information from a central office device; the authorization information is used to instruct the user terminal device to transmit uplink data within an authorized time period; a processing unit, configured to, upon receiving the authorization information, determine a timeout time of the first timer according to a start time of the authorization time period indicated in the authorization information; The processing unit is further configured to enter a hardware interrupt when the first timer reaches a timeout period, and enter the authorized time period at the end of the hardware interrupt.

9. An electronic device, characterized in that: The electronic device comprises a controller and a memory, The memory is used to store computer programs or instructions; The controller is used to execute the computer program or instructions in the memory so that the method according to any one of claims 1 to 7 is executed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called by a computer, the computer executes the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Uplink data transmission method and apparatus, and electronic device and storage medium

    EP4811813A1