A single-chip microcomputer data transmission method and single-chip microcomputer

By acquiring discrete and conflicting data sequences of the transmission channel, determining the channel delay and load model, calculating scheduling weights, and achieving load balancing scheduling, the problems of congestion and data loss in sensor data transmission are solved, and data transmission efficiency and stability are improved.

CN115278781BActive Publication Date: 2025-11-18SHENZHEN ANXINTAI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210923702.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-02
Publication Date
2025-11-18
Estimated Expiration
2042-08-02

AI Technical Summary

Technical Problem

In the industrial manufacturing sector, sensor data transmission suffers from problems such as data transmission channel blockage and data loss, affecting data transmission efficiency and stability.

Method used

By acquiring discrete data sequences and conflicting data sequences from multiple data transmission channels, the channel delay and load model are determined, scheduling weights are calculated, load balancing scheduling is achieved, and the stability and security of data transmission are ensured.

Benefits of technology

It improves data transmission efficiency and ensures the stability and security of multi-channel data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115278781B_ABST
    Figure CN115278781B_ABST
Patent Text Reader

Abstract

The application provides a single-chip microcomputer data transmission method and single-chip microcomputer, which obtains the basic load of each data transmission channel by obtaining the discrete data sequence of each data transmission channel in multiple data transmission channels to obtain the conflict data sequence of each data transmission channel to obtain the load gain of each data transmission channel caused by the conflict transaction, determines the channel time delay of each data transmission channel, constructs the channel load model of multiple data transmission channels, calculates the scheduling weight of each data transmission channel in the load balancing mode, and schedules the data transmission transaction of multiple data transmission channels according to the scheduling weight, so that the data transmission efficiency is high, and the stability and safety of multiple-channel data transmission can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a single-chip microcomputer data transmission method and single-chip microcomputer. BACKGROUND

[0002] With the development of the Internet of Things and wireless sensing technology, the demand for connecting a large number of sensors for data collection to realize concurrent reading and writing of massive data is becoming more and more widespread. In particular, in the field of industrial manufacturing, real-time monitoring of the working state and working parameters of various industrial manufacturing equipment in a large-scale manufacturing environment through various sensors is a necessary means to ensure the safe, efficient and stable operation of industrial production. In the prior art, the transmission of data collected by sensors often leads to data congestion in some data transmission channels due to transaction conflicts, affecting data transmission efficiency, and in serious cases, even causing data loss. SUMMARY

[0003] The present application is based on the above problems, and proposes a single-chip microcomputer data transmission method and single-chip microcomputer, which has the characteristics of high data transmission efficiency and can ensure the stability and security of multi-channel data transmission.

[0004] Therefore, the first aspect of the present application proposes a single-chip microcomputer data transmission method, comprising:

[0005] obtaining the discrete data sequence of each data transmission channel in the multiple data transmission channels to obtain the basic load of each data transmission channel;

[0006] obtaining the conflict data sequence of each data transmission channel to obtain the load gain of each data transmission channel caused by conflict transactions;

[0007] determining the channel delay of each data transmission channel;

[0008] constructing a channel load model of the multiple data transmission channels;

[0009] calculating the scheduling weight of each data transmission channel in the load balancing mode;

[0010] scheduling the data transmission transactions of the multiple data transmission channels according to the scheduling weight.

[0011] Further, in the single-chip microcomputer data transmission method described above, the step of obtaining the discrete data sequence of each data transmission channel in the multiple data transmission channels to obtain the basic load of each transmission channel comprises:

[0012] obtaining the discrete data sequence x itwherein 1≤i≤n, 1≤t≤T, n is the number of data transmission channels, and T is the time corresponding to the terminal value in the discrete data sequence;

[0013] calculating the base load of each data transmission channel

[0014] Further, in the single-chip microcomputer data transmission method, the step of obtaining the conflict data sequence of each data transmission channel to obtain the load gain of each data transmission channel caused by the conflict transaction specifically includes:

[0015] obtaining the conflict data sequence x′ of each data transmission channel in the multiple data transmission channels it′ wherein 1≤i≤n, 0≤t′≤T′, n is the number of data transmission channels, and T′ is the time corresponding to the terminal value in the conflict data sequence;

[0016] calculating the load gain of the data transmission channel

[0017] Further, in the single-chip microcomputer data transmission method, the step of determining the channel delay of each data transmission channel specifically includes:

[0018] determining the average value of the discrete data sequence of each data transmission channel

[0019] Further, in the single-chip microcomputer data transmission method, the step of determining the channel delay of each data transmission channel specifically includes:

[0020] determining the data dispersion of each data transmission channel

[0021] Further, in the single-chip microcomputer data transmission method, the step of determining the channel delay of each data transmission channel specifically includes:

[0022] determining the channel delay of the corresponding data transmission channel according to the base load, the load gain, and the data dispersion of each data transmission channel

[0023] Further, in the single-chip microcomputer data transmission method, the step of constructing the channel load model of the multiple data transmission channels specifically includes:

[0024] constructing the channel load model according to the channel delay

[0025] Further, in the single-chip microcomputer data transmission method, the step of calculating the scheduling weight of each data transmission channel in the load balancing mode specifically includes:

[0026] determining the total load of the system at time T

[0027] Further, in the single-chip microcomputer data transmission method described above, the step of calculating the scheduling weight of each data transmission channel in the load balancing mode specifically comprises:

[0028] calculating the scheduling weight of each data transmission channel at time T according to the channel load model

[0029] The second aspect of the present application provides a single-chip microcomputer, comprising a processing module, a storage module, a clock module and a communication module, the communication module comprises a data input end and a data output end, the data input end comprises a plurality of data input channels connected with different data acquisition devices respectively, for collecting data from the data acquisition devices, the data output end is connected with a data acquisition server, for writing the data collected from the data acquisition devices into the data acquisition server or a database connected therewith, and the processing module is configured to execute a computer program stored in the storage module to implement the method described in the first aspect.

[0030] The present application provides a single-chip microcomputer data transmission method and a single-chip microcomputer, by obtaining the discrete data sequence of each data transmission channel in the multiple data transmission channels to obtain the basic load of each data transmission channel, obtaining the conflict data sequence of each data transmission channel to obtain the load gain of each data transmission channel caused by the conflict transaction, determining the channel delay of each data transmission channel, constructing a channel load model of the multiple data transmission channels, calculating the scheduling weight of each data transmission channel in the load balancing mode, and scheduling the data transmission transaction of the multiple data transmission channels according to the scheduling weight, which has the characteristics of high data transmission efficiency, and can guarantee the stability and security of multi-channel data transmission. BRIEF DESCRIPTION OF DRAWINGS

[0031] Figure 1 is a flowchart of a single-chip microcomputer data transmission method provided by an embodiment of the present application;

[0032] Figure 2 is a schematic block diagram of a single-chip microcomputer provided by an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0034] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details set forth in this description. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the present application.

[0035] In the description of the present application, the term "a plurality of" refers to two or more, unless otherwise explicitly defined. The terms "upper", "lower", and the like, indicate relative positions or orientation relationships based on the positions or orientation relationships shown in the drawings, and are merely for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. The terms "connected", "mounted", "fixed", and the like should be interpreted broadly, for example, "connected" can be fixed connection, or detachable connection, or integral connection; can be directly connected, or indirectly connected through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances. In addition, the terms "first", "second", and the like are merely for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features limited by "first", "second", and the like can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0036] In the description of the present application, the terms "one embodiment", "some embodiments", "a specific embodiment", and the like, mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present description, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0037] A single-chip microcomputer data transmission method and a single-chip microcomputer according to some embodiments of the present application are described below with reference to the accompanying drawings.

[0038] As shown in Figure 1 A first aspect of the present application proposes a single-chip microcomputer data transmission method, comprising:

[0039] Obtaining the discrete data sequence of each data transmission channel in the plurality of data transmission channels to obtain the basic load of each data transmission channel;

[0040] Obtaining the conflict data sequence of each data transmission channel to obtain the load gain of each data transmission channel caused by the conflict transaction;

[0041] determining a channel delay of each of the data transmission channels;

[0042] constructing a channel load model of the multiple data transmission channels;

[0043] calculating a scheduling weight of each of the data transmission channels in a load balancing mode;

[0044] scheduling data transmission transactions of the multiple data transmission channels according to the scheduling weight.

[0045] Specifically, one data transmission of any data transmission channel is defined as a transaction, and each transaction is bound with a time point t as the execution time of the transaction. When transactions executed by two or more data transmission channels at the same time point t are written to the same target, the transactions executed by the two or more data transmission channels are determined as conflict transactions. When a transaction is determined as a conflict transaction, the submission of a subsequent conflict transaction is rejected at the data collection server side, and the corresponding conflict transaction is rolled back, so that the corresponding data collection device re-submits the transaction after waiting for a certain time. In the technical solution of the above embodiment, the channel delay of the data transmission channel is used to construct a channel load model, so that the scheduling weight of each data transmission channel in a load balancing mode is calculated based on the load model, thereby realizing efficient transmission of multiple-channel data and guaranteeing the stability and security of data transmission.

[0046] Further, in the above single-chip data transmission method, the step of obtaining a discrete data sequence of each data transmission channel in the multiple data transmission channels to obtain the basic load of each transmission channel specifically includes:

[0047] obtaining a discrete data sequence x it of each data transmission channel in the multiple data transmission channels, where 1≤i≤n, 1≤t≤T, n is the number of data transmission channels, and T is the time point corresponding to the end value in the discrete data sequence;

[0048] calculating a basic load P

[0049] In the above embodiment, it is assumed that the ith data transmission channel submits T data transmission transactions in a period of time, each data transmission transaction is bound with a time point t, and the amount of data transmitted is x it , so that the basic load P iT of the ith data transmission channel from time point 1 to time point T can be calculated.

[0050] Further, in the above single-chip data transmission method, the step of obtaining a conflict data sequence of each of the data transmission channels to obtain the load gain of each of the data transmission channels caused by conflict transactions specifically includes:

[0051] obtaining a conflict data sequence x' of each data transmission channel in the multiple data transmission channels it′ , wherein 1≤i≤n, 0≤t'≤T', n is the number of data transmission channels, T' is the time corresponding to the end value in the conflict data sequence;

[0052] calculating the load gain of the data transmission channel

[0053] The occurrence of the conflict transaction is random, and in an extreme case, the T data transmission transactions are all non-conflict transactions or all conflict transactions, so the value range of T' is 0≤T'≤T, and the conflict data sequence x' it′ is a subset of the discrete data sequence x it .

[0054] Further, in the single-chip microcomputer data transmission method, the step of determining the channel delay of each data transmission channel specifically comprises:

[0055] determining the average value of the discrete data sequence of each data transmission channel

[0056] Further, in the single-chip microcomputer data transmission method, the step of determining the channel delay of each data transmission channel specifically comprises:

[0057] determining the data dispersion of each data transmission channel

[0058] Further, in the single-chip microcomputer data transmission method, the step of determining the channel delay of each data transmission channel specifically comprises:

[0059] determining the channel delay of the corresponding data transmission channel according to the basic load, the load gain and the data dispersion of each data transmission channel

[0060] Further, in the single-chip microcomputer data transmission method, the step of constructing the channel load model of the multiple data transmission channels specifically comprises:

[0061] constructing the channel load model according to the channel delay

[0062] In the technical solution of the above embodiment, the channel delay of each data transmission channel is calculated by using the discrete data sequence not containing conflict transactions, and the channel load model is constructed by using the channel delay. For a business scenario without conflict transactions or with a small number of conflict transactions, the above embodiment can simplify the data processing steps and save the computing resources of the device.

[0063] In another embodiment of the present application, the step of determining the channel latency of each of the data transmission channels specifically comprises:

[0064] determining the average value of the discrete data sequence of each of the data transmission channels

[0065] determining the data dispersion of each of the data transmission channels

[0066] determining the channel latency of the corresponding data transmission channel according to the base load, the load gain and the data dispersion of each of the data transmission channels

[0067] Further, in the above-mentioned single-chip data transmission method, the step of constructing the channel load model of the multiple data transmission channels specifically comprises:

[0068] constructing the channel load model according to the channel latency

[0069] The technical solution of the above-mentioned embodiment can truly reflect the real load of each data transmission channel, and can more accurately realize the scheduling of each data transmission channel in a service scenario where the channel load gain is high due to conflict services.

[0070] Further, in the above-mentioned single-chip data transmission method, the step of calculating the scheduling weight of each of the data transmission channels in the load balancing mode specifically comprises:

[0071] determining the total system load at T time

[0072] Further, in the above-mentioned single-chip data transmission method, the step of calculating the scheduling weight of each of the data transmission channels in the load balancing mode specifically comprises:

[0073] calculating the scheduling weight of each of the data transmission channels at T time according to the channel load model

[0074] Further, in the above-mentioned single-chip data transmission method, before the step of scheduling the data transmission transactions of the multiple data transmission channels according to the scheduling weight, it further comprises:

[0075] according to the load gain ΔP of the data transmission channel iT′ configuring the scheduling offset compensation of each data transmission channel wherein τ is the load gain pre-coefficient, and 0<τ<1, t0 is the preset offset compensation base.

[0076] The transaction submission time of each data channel is dynamically offset by using the scheduling offset compensation, and when the load gain of a certain data transmission channel is greater than the preset proportion of the basic load, the scheduling offset compensation value is negative, so that the transaction submission time of the data transmission channel is advanced, thereby reducing the probability of conflict transactions.

[0077] As shown in Figure 2 The second aspect of the application provides a single-chip microcomputer, comprising a processing module, a storage module, a clock module and a communication module, the communication module comprises a data input end and a data output end, the data input end comprises a plurality of data input channels connected with different data acquisition devices respectively, for collecting data from the data acquisition devices, the data output end is connected with a data acquisition server, for writing the data collected from the data acquisition devices into the data acquisition server or a database connected therewith, and the processing module is configured to execute a computer program stored in the storage module to implement the method of the first aspect.

[0078] The application provides a single-chip microcomputer data transmission method and a single-chip microcomputer, which acquires discrete data sequences of each data transmission channel in a plurality of data transmission channels to obtain the basic load of each data transmission channel, acquires conflict data sequences of each data transmission channel to obtain the load gain of each data transmission channel caused by conflict transactions, determines the channel time delay of each data transmission channel, constructs a channel load model of the plurality of data transmission channels, calculates the scheduling weight of each data transmission channel in a load balancing mode, and schedules data transmission transactions of the plurality of data transmission channels according to the scheduling weight, so that the data transmission efficiency is high, and the stability and security of multi-channel data transmission are guaranteed.

[0079] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0080] In accordance with the practices of the present invention, these embodiments have been described in relation to the above-described embodiments, which are intended to be illustrative only and not restrictive of the invention. Obviously, many modifications and variations of this invention can be effected without departing from the scope of the novel concept of the disclosure. No limitation with respect to the specific implementation techniques and applications presented thereby should be inferred into the scope of the invention, as understood by those skilled in the art. The specification and drawings should be regarded as illustrative only and in no way limiting of the scope of the invention as defined by the appended claims and equivalents thereof.

Claims

1. A microcontroller data transmission method, characterized in that, include: Obtain the discrete data sequence of each data transmission channel in the multiple data transmission channels to obtain the basic load of each data transmission channel; Obtain the conflict data sequence for each of the data transmission channels to obtain the load gain of each of the data transmission channels caused by conflicting transactions; Determine the channel delay for each of the data transmission channels; Construct a channel load model for multiple data transmission channels; Calculate the scheduling weight of each of the data transmission channels in load balancing mode; Data transmission transactions across multiple data transmission channels are scheduled based on scheduling weights; The steps for determining the channel delay of each of the data transmission channels specifically include: Based on the base load P of each of the data transmission channels iT Load gain ΔP iT′ and data dispersion σ iT Determine the channel delay of the corresponding data transmission channel. Where 1≤i≤n, 1≤t≤T, n is the number of data transmission channels, T is the time corresponding to the end value in the discrete data sequence, and T′ is the time corresponding to the end value in the conflicting data sequence.

2. The microcontroller data transmission method according to claim 1, characterized in that, The specific steps for obtaining the discrete data sequence of each data transmission channel in multiple data transmission channels to obtain the basic load of each transmission channel include: Obtain the discrete data sequence x for each data transmission channel in the multi-data transmission channel. it ; The base load of each of the data transmission channels is calculated.

3. The microcontroller data transmission method according to claim 2, characterized in that, The step of obtaining the conflict data sequence for each of the data transmission channels to determine the load gain of each data transmission channel caused by the conflicting transactions specifically includes: Obtain the conflicting data sequence x′ for each data transmission channel in the multi-data transmission channel. it′ ; The load gain of the data transmission channel is calculated.

4. The microcontroller data transmission method according to claim 3, characterized in that, The steps for determining the channel delay of each of the data transmission channels specifically include: Determine the average value of the discrete data sequence for each of the data transmission channels.

5. The microcontroller data transmission method according to claim 4, characterized in that, The steps for determining the channel delay of each of the data transmission channels specifically include: Determine the data dispersion of each of the data transmission channels.

6. The microcontroller data transmission method according to claim 1, characterized in that, The specific steps for constructing a channel load model for multiple data transmission channels include: Construct a channel load model based on the channel delay.

7. The microcontroller data transmission method according to claim 6, characterized in that, The steps for calculating the scheduling weight of each data transmission channel in load balancing mode specifically include: Determine the total system load at time T 8. The microcontroller data transmission method according to claim 7, characterized in that, The steps for calculating the scheduling weight of each data transmission channel in load balancing mode specifically include: The scheduling weight of each data transmission channel at time T is calculated based on the channel load model.

9. A microcontroller, characterized in that, The system includes a processing module, a storage module, a clock module, and a communication module. The communication module includes a data input terminal and a data output terminal. The data input terminal includes multiple data input channels connected to different data acquisition devices for acquiring data from the data acquisition devices. The data output terminal is connected to a data acquisition server for writing the data acquired from the data acquisition devices into the data acquisition server or a database connected to it. The processing module is configured to execute a computer program stored in the storage module to implement the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Link delay control-based light load balancing method for multipath network

    CN104935524A