CN111988240B - Data transmission method and device, electronic equipment and storage medium - Google Patents

Data transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111988240B
CN111988240B CN202010732600.2A CN202010732600A CN111988240B CN 111988240 B CN111988240 B CN 111988240B CN 202010732600 A CN202010732600 A CN 202010732600A CN 111988240 B CN111988240 B CN 111988240B
Authority
CN
China
Prior art keywords
data
transmitted
sent
queue
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010732600.2A
Other languages
Chinese (zh)
Other versions
CN111988240A (en
Inventor
陆涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Naura Microelectronics Equipment Co Ltd
Original Assignee
Beijing Naura Microelectronics Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Naura Microelectronics Equipment Co Ltd filed Critical Beijing Naura Microelectronics Equipment Co Ltd
Priority to CN202010732600.2A priority Critical patent/CN111988240B/en
Publication of CN111988240A publication Critical patent/CN111988240A/en
Application granted granted Critical
Publication of CN111988240B publication Critical patent/CN111988240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a data transmission method, a device, an electronic device and a storage medium, which are applied to a lower computer in a semiconductor device, wherein the method comprises the following steps: acquiring at least one piece of data to be transmitted and a data priority of each piece of data to be transmitted according to subscription information transmitted by an upper computer in the semiconductor device, wherein the data priority is positively correlated with a real-time transmission requirement level of the corresponding data to be transmitted; storing each data to be transmitted into a queue matched with the data priority of the data to be transmitted; and sequentially sending the data to be sent stored in the queue to the upper computer according to the sequence of the queue priority of the queue from high to low. In this way, the lower computer in the semiconductor device preferentially transmits the data to be transmitted with higher data priority, and the data priority is positively correlated with the real-time transmission requirement level of the corresponding data to be transmitted, that is, the lower computer can preferentially transmit the data to be transmitted with higher real-time transmission requirement level.

Description

Data transmission method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data sending method, a data sending device, an electronic device, and a storage medium.
Background
In some scenarios, multiple hardware devices need to be controlled in a unified manner through device control software, so that the hardware devices are monitored.
For example, the device control software may be divided into an upper computer and a lower computer, where the lower computer obtains data to be sent of the hardware device, stores the data to be sent to the tail of the queue, and sends the data to be sent stored in the queue to the upper computer according to the sequence from the head of the queue to the tail of the queue, and further, the upper computer processes the received data to be sent, so as to monitor the hardware device.
However, in the above manner, the lower computer generally transmits the data to be transmitted to the upper computer for processing according to the acquisition sequence of the data to be transmitted, and different requirements of the upper computer on different data to be transmitted are ignored.
Disclosure of Invention
In order to solve the technical problems, the application shows a data sending method which is applied to a lower computer to timely send out data to be sent with higher real-time sending requirement level according to the level of the requirement level for carrying out real-time sending on different data to be sent.
In a first aspect, the present application shows a data transmission method applied to a lower computer in a semiconductor device, where the method includes:
acquiring at least one piece of data to be transmitted and a data priority of each piece of data to be transmitted according to subscription information transmitted by an upper computer in semiconductor equipment, wherein the data priority is positively correlated with a real-time transmission requirement level of the corresponding data to be transmitted;
storing each data to be transmitted into a queue matched with the data priority of the data to be transmitted;
and sequentially sending the data to be sent stored in the queue to the upper computer according to the sequence of the queue priority of the queue from high to low.
Optionally, after the sequentially sending the data to be sent stored in the queue to the upper computer, the method further includes:
determining the data to be transmitted which is failed to be transmitted as target data to be transmitted;
judging whether the number of times of failure in sending the target data to be sent is larger than a preset threshold value, deleting the target data to be sent if the number of times of failure in sending the target data to be sent is larger than the preset threshold value, and storing the target data to be sent into a queue matched with the data priority of the target data to be sent again if the number of times of failure in sending the target data to be sent is not larger than the preset threshold value.
Optionally, the storing each data to be sent in a queue matched with the data priority of the data to be sent includes:
storing each data to be transmitted to the tail of a queue matched with the data priority of the data to be transmitted;
the step of sequentially sending the data to be sent stored in the queue to the upper computer according to the order of the queue priority of the queue from high to low, includes:
sequentially sending the data to be sent stored in the queue to the upper computer from the head of the queue to the tail of the queue according to the sequence of the queue priority of the queue from high to low;
the re-storing the target data to be sent in a queue matched with the data priority of the target data to be sent comprises the following steps:
and re-storing the target data to be sent to the head of a queue matched with the data priority of the target data to be sent.
Optionally, the acquiring at least one data to be sent and the data priority of each data to be sent according to the subscription information sent by the upper computer in the semiconductor device includes:
receiving the subscription information sent by the upper computer, wherein the subscription information comprises at least one subscription data item and the data priority of the data in each subscription data item, and the data priority is positively correlated with the real-time sending requirement level of the data in the corresponding subscription data item;
monitoring each subscription data item according to the subscription information;
and taking the data in the changed subscription data item as the data to be sent, and determining the data priority of the data to be sent according to the subscription information.
In a second aspect, the present application shows a data transmission apparatus applied to a lower computer in a semiconductor device, the apparatus including:
the acquisition module is used for acquiring at least one piece of data to be transmitted and the data priority of each piece of data to be transmitted according to subscription information transmitted by an upper computer in the semiconductor equipment, wherein the data priority is positively correlated with the corresponding real-time transmission requirement level of the data to be transmitted;
the storage module is used for storing each data to be sent acquired by the acquisition module into a queue matched with the data priority of the data to be sent;
and the sending module is used for sequentially sending the data to be sent stored in the queue by the storage module to the upper computer according to the sequence of the queue priority of the queue from high to low.
Optionally, the apparatus further includes:
the determining module is used for determining the data to be transmitted, which is failed to be transmitted, as target data to be transmitted after the transmitting module sequentially transmits the data to be transmitted stored in the queue to the upper computer;
the judging and processing module is used for judging whether the number of times of the transmission failure of the target data to be transmitted, which is determined by the determining module, is larger than a preset threshold, deleting the target data to be transmitted if the number of times of the transmission failure of the target data to be transmitted is larger than the preset threshold, and storing the target data to be transmitted into a queue matched with the data priority of the target data to be transmitted if the number of times of the transmission failure of the target data to be transmitted is not larger than the preset threshold.
Optionally, the storage module is specifically configured to store each data to be sent to a tail of a queue matched with a data priority of the data to be sent;
the sending module is specifically configured to send the data to be sent stored in the queue to the upper computer sequentially from the head of the queue to the tail of the queue according to the order of the queue priority of the queue from high to low;
the judging and processing module is specifically configured to restore the target data to be sent to a queue head of a queue matched with the data priority of the target data to be sent when it is determined that the number of times of failure in sending the target data to be sent is not greater than the preset threshold.
Optionally, the acquiring module includes:
the receiving unit is used for receiving the subscription information sent by the upper computer, wherein the subscription information comprises at least one subscription data item and the data priority of the data in each subscription data item, and the data priority is positively correlated with the real-time sending requirement level of the data in the corresponding subscription data item;
the monitoring unit is used for monitoring each subscription data item according to the subscription information received by the receiving unit;
and the determining unit is used for taking the data in the changed subscription data items monitored by the monitoring unit as the data to be sent, and determining the data priority of the data to be sent according to the subscription information.
In a third aspect, the present application shows an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor performing the steps of any of the data transmission methods described above.
In a fourth aspect, the present application shows a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of any of the data transmission methods described above.
Compared with the prior art, the application has the following advantages:
the lower computer in the semiconductor device stores the data to be sent into the queue with the matched data priority, and then preferentially sends the data to be sent stored in the queue with higher priority, namely preferentially sends the data to be sent with higher priority, and the data priority is positively correlated with the real-time sending requirement level of the corresponding data to be sent, namely the higher the real-time sending requirement level of the data to be sent is, the higher the data priority is, namely, the lower computer can preferentially send the data to be sent with higher real-time sending requirement level.
Drawings
FIG. 1 is a flow chart of steps of a data transmission method of the present application;
FIG. 2 is a flow chart of steps of another data transmission method of the present application;
fig. 3 is a block diagram of a data transmission apparatus of the present application;
fig. 4 is a schematic structural view of an electronic device of the present application.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings.
Referring to fig. 1, a step flow chart of a data transmission method of the present application is shown, and the method is applied to a lower computer in a semiconductor device, and may specifically include the following steps:
s101: and acquiring at least one piece of data to be transmitted and the data priority of each piece of data to be transmitted according to subscription information transmitted by an upper computer in the semiconductor device, wherein the data priority is positively correlated with the real-time transmission requirement level of the corresponding data to be transmitted.
The upper computer is a computer that can directly send out control commands by a person, and is generally a PC (Personal Computer ) on which various information can be displayed. The lower computer is a computer for directly controlling equipment to acquire equipment conditions, and is generally a PLC (Programmable Logic Controller ) or a single chip microcomputer, etc.
In this step, the lower computer determines when to acquire which data as the data to be transmitted according to the subscription information sent by the upper computer. The upper computer may directly send the subscription information, or may send the subscription information to the lower computer through the message middleware or other interfaces, which is not limited in this application.
In one implementation manner, the subscription information may include at least one subscription data item and a data priority of data in each subscription data item, and the data priority is positively related to a real-time transmission requirement level of data in the corresponding subscription data item, that is, the higher the real-time transmission requirement level of data in the subscription data item is, the higher the data priority of data in the subscription data item is.
Therefore, the lower computer can monitor each subscription data item according to the subscription information, after the data in the subscription data item changes, the data in the changed subscription data item is used as the data to be sent, and the data of other subscription data items without data change are not required to be acquired, so that the workload of the lower computer is reduced. And the data to be sent is the data of the subscription data item, then the lower machine can directly determine the data priority of the data to be sent according to the data priority of the data of the subscription data item in the subscription information.
In another implementation manner, the subscription information may include a preset time rule, and the lower computer may periodically acquire, according to the preset time rule, each item of data of the hardware device as the data to be sent. For example, the lower computer may acquire each item of data of the hardware device once at intervals of a preset time interval as data to be transmitted, or acquire each item of data of the hardware device once every time when time reaches any fixed time point according to a preset fixed time point as data to be transmitted, or the like.
In this application, each data to be transmitted may include any one or more types of information, for example, alarm information, device status information, control information, modulation information, data information, and the like of a hardware device. The real-time sending requirement level of the data to be sent including different information is also different, for example, if the data to be sent includes task feedback information, the real-time sending requirement level of the data to be sent is higher, and it can be understood that each program is divided into a plurality of threads, each thread is divided into a plurality of tasks, and the lower computer needs to acquire and feed back the task feedback information of each task to the upper computer in time to monitor the real-time running condition of each program.
In this case, the data priority is positively correlated with the corresponding real-time transmission request level of the data to be transmitted, which may mean that the data priority of the data to be transmitted corresponds to the real-time transmission request level one by one, for example, if the real-time transmission request level of the data to be transmitted is classified into three levels of high, medium and low, the data priority thereof also corresponds to the three levels of high, medium and low, respectively.
Or in another case, the data priority is positively related to the corresponding real-time transmission requirement level of the data to be transmitted, which may also mean that the data priority is matched with the real-time transmission requirement level according to a preset first matching rule, for example, if the real-time transmission requirement level of the data to be transmitted includes five levels and the data priority thereof includes only two high and low levels, only the data to be transmitted with the highest real-time transmission requirement level may be preset to be matched with the high data priority, and all the data to be transmitted with other real-time transmission requirement levels are matched with the low data priority.
S102: and storing each data to be transmitted into a queue matched with the data priority of the data to be transmitted.
In this step, the lower computer determines, for each data to be transmitted, a queue matching the data priority of the data to be transmitted from a plurality of queues in the lower computer, and then stores the data to be transmitted into the determined queues, wherein each queue has a queue priority, and the queue priority of the queue is positively correlated with the data priority of the data to be transmitted stored in the queue.
In one implementation, the queue priority of each queue and the corresponding relationship between the queue priority and the data priority may be preset, where the queue priority of each queue is different. In this way, the data to be sent with different data priorities can be stored in the matched queues according to the corresponding relation between the queue priorities and the data priorities.
For example, the queue priorities may correspond to the data priorities one by one, e.g., if the data priorities are high, medium, and low, the queue priorities also correspond to the high, medium, and low levels, respectively. Alternatively, the data priority may be matched with the queue priority according to a preset second matching rule, for example, if the data priority is divided into five levels and the queue priority is divided into only two levels, it may be preset that only the highest data priority will be matched with the highest queue priority and the other data priorities will be matched with the low queue priority.
Alternatively, in another implementation manner, the lower computer may also use a queue storing data with the same data priority as the data to be sent as a queue matching the data priority of the data to be sent, and use the data priority of the data to be sent stored in the queue as the queue priority of the queue.
In this step, each data to be sent may be stored in a queue tail of a queue matching with a data priority of the data to be sent, so that the data to be sent may be sequentially stored in the queue matching with the data priority from the head of the queue to the tail of the queue according to the acquired time sequence.
S103: and sequentially sending the data to be sent stored in the queue to the upper computer according to the sequence of the queue priority of the queue from high to low.
In this step, the lower computer sequentially transmits the data to be transmitted stored in the plurality of queues to the upper computer according to the order of the queue priorities of the plurality of queues from high to low, that is, the data to be transmitted stored in the queue with higher queue priority is transmitted to the upper computer first, and the data to be transmitted stored in the queue with lower queue priority is transmitted to the upper computer after being transmitted to the upper computer.
The data to be sent in the same queue may be sequentially sent to the upper computer according to the sequence from the head of the queue to the tail of the queue, i.e. according to the acquired time sequence, that is, the data to be sent acquired first is sent to the upper computer, and then the data to be sent acquired later is sent to the upper computer.
In this way, the data to be transmitted, which has the highest data priority and is acquired first, is preferentially transmitted to the upper computer, and the data priority of each data to be transmitted is positively correlated with the real-time transmission requirement level of the data to be transmitted, that is, the data to be transmitted, which has the highest real-time transmission requirement level, is preferentially transmitted to the upper computer according to the sequence of the acquisition time.
In the application, after the lower computer sends the data to be sent stored in the queue to the upper computer, the data to be sent which is failed to send can be determined as target data to be sent, then, whether the number of times of failure in sending the target data to be sent is greater than a preset threshold value is judged, if so, the target data to be sent is deleted, and if not, the target data to be sent is restored to the queue matched with the data priority of the target data to be sent.
Therefore, when the number of times of transmission failure of a certain data to be transmitted is more, the lower computer does not transmit the data to be transmitted any more, other data to be transmitted can be continuously and sequentially transmitted, the abnormal data to be transmitted is prevented from being transmitted continuously and repeatedly, the possibility of occurrence of data transmission blockage is reduced, and data abnormality caused by network disconnection in a short time can be reduced.
Under the condition that the number of times of failure in sending the target data to be sent is not larger than a preset threshold, the lower computer can restore the target data to be sent to the head of a queue matched with the data priority of the target data to be sent, so that the target data to be sent is still sent to the upper computer at first as the data to be sent with the highest data priority and the earliest acquisition time, and the real-time sending requirement of the upper computer on the data to be sent is met as much as possible.
In view of the foregoing, in the data transmission method provided by the present application, the lower computer in the semiconductor device stores the data to be transmitted into the queue with the matched data priority, so that the data to be transmitted stored in the queue with the higher priority is preferentially transmitted, that is, the data to be transmitted with the higher priority is preferentially transmitted, and the data priority is positively related to the real-time transmission requirement level of the corresponding data to be transmitted, that is, the higher the real-time transmission requirement level of the data to be transmitted is, the higher the data priority is, that is, the lower computer can preferentially transmit the data to be transmitted with the higher real-time transmission requirement level.
Referring to fig. 2, a flowchart of steps of another data transmission method of the present application is shown, where the method is applied to a lower computer in a semiconductor device, and may specifically include the following steps:
s201: and receiving subscription information sent by an upper computer in the semiconductor equipment, wherein the subscription information comprises at least one subscription data item and data priority of data in each subscription data item, and the data priority is positively correlated with the real-time sending requirement level of the data in the corresponding subscription data item.
That is, the higher the real-time transmission requirement level of the data in the subscription data item, the higher the data priority of the data in the subscription data item.
The data of the subscription data item can comprise any one or more kinds of information, such as alarm information, device state information, control information, modulation information, data information and the like of the hardware device. The real-time sending requirement level of the data of the subscription data item including different information is also different, for example, if the data of the subscription data item includes task feedback information, the real-time sending requirement level of the data of the subscription data item is higher, it can be understood that each program is divided into a plurality of threads, each thread is divided into a plurality of tasks, and the lower computer needs to acquire and feed back the task feedback information of each task to the upper computer in time to monitor the real-time running condition of each program.
In this step, the lower computer determines when to acquire which data as the data to be transmitted according to the subscription information sent by the upper computer. The upper computer may directly send the subscription information, or may send the subscription information to the lower computer through the message middleware or other interfaces, which is not limited in this application.
S202: each subscription data item is monitored according to the subscription information.
S203: and taking the data in the changed subscription data items as data to be sent, and determining the data priority of the data to be sent according to the subscription information.
The lower computer can monitor each subscription data item according to the subscription information, after the data in the subscription data item changes, the data in the changed subscription data item is used as the data to be sent, and the data of other subscription data items without data change do not need to be acquired, so that the workload of the lower computer is reduced. And the data to be sent is the data of the subscription data item, then the lower machine can directly determine the data priority of the data to be sent according to the data priority of the data of the subscription data item in the subscription information.
S204: each data to be transmitted is stored to the tail of a queue matching the data priority of the data to be transmitted.
The processing procedures of S204 and S102 are the same, and reference may be made to the processing procedure of S102, which is not described in detail in this application.
S205: and sequentially sending the data to be sent stored in the queue to the upper computer from the head of the queue to the tail of the queue according to the sequence of the queue priority of the queue from high to low.
In this way, the data to be transmitted, which has the highest data priority and is acquired first, is preferentially transmitted to the upper computer, and the data priority of each data to be transmitted is positively correlated with the real-time transmission requirement level of the data to be transmitted, that is, the data to be transmitted, which has the highest real-time transmission requirement level, is preferentially transmitted to the upper computer according to the sequence of the acquisition time.
S206: and determining the data to be transmitted with transmission failure as target data to be transmitted, judging whether the number of times of transmission failure of the target data to be transmitted is greater than a preset threshold, if so, executing S207, and if not, executing S208.
S207: the target data to be transmitted is deleted, and then step S205 is continued to be executed.
Therefore, when the number of times of transmission failure of a certain data to be transmitted is more, the lower computer does not transmit the data to be transmitted any more, other data to be transmitted can be continuously and sequentially transmitted, the abnormal data to be transmitted is prevented from being transmitted continuously and repeatedly, the possibility of occurrence of data transmission blockage is reduced, and data abnormality caused by network disconnection in a short time can be reduced.
In this embodiment, after deleting the target data to be transmitted, the data to be transmitted continues to be transmitted in order until the queue is empty.
S208: and re-storing the target data to be sent to the head of a queue matched with the data priority of the target data to be sent.
Therefore, the target data to be transmitted is still transmitted to the upper computer at first as the data to be transmitted with highest data priority and earliest acquisition time, and the real-time transmission requirement of the upper computer on the data to be transmitted is met as much as possible.
In view of the foregoing, in the data transmission method provided by the present application, the lower computer in the semiconductor device stores the data to be transmitted into the queue with the matched data priority, so that the data to be transmitted stored in the queue with the higher priority is preferentially transmitted, that is, the data to be transmitted with the higher priority is preferentially transmitted, and the data priority is positively related to the real-time transmission requirement level of the corresponding data to be transmitted, that is, the higher the real-time transmission requirement level of the data to be transmitted is, the higher the data priority is, that is, the lower computer can preferentially transmit the data to be transmitted with the higher real-time transmission requirement level.
It should be noted that, for the sake of simplicity of description, the method embodiments are all described as a series of combinations of actions, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may take place in other order or simultaneously in accordance with the present application. Further, those skilled in the art will appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts referred to are not necessarily required for the present application.
Referring to fig. 3, a block diagram of a data transmission apparatus of the present application is shown, where the apparatus is applied to a lower computer in a semiconductor device, and may specifically include the following modules:
an obtaining module 310, configured to obtain at least one data to be sent and a data priority of each data to be sent according to subscription information sent by an upper computer in the semiconductor device, where the data priority is positively related to a real-time sending requirement level of the corresponding data to be sent;
a storage module 320, configured to store each data to be sent acquired by the acquisition module 310 into a queue that matches a data priority of the data to be sent;
and the sending module 330 is configured to send the data to be sent, which is stored in the queue by the storage module, to the upper computer sequentially according to the order of the queue priority of the queue from high to low.
In one implementation, the apparatus further comprises:
a determining module 340, configured to determine, as target data to be transmitted, data to be transmitted that fails to be transmitted after the transmitting module 330 sequentially transmits the data to be transmitted stored in the queue to the upper computer;
the judging and processing module 350 is configured to judge whether the number of times of transmission failure of the target data to be transmitted determined by the determining module is greater than a preset threshold, delete the target data to be transmitted if the number of times of transmission failure is greater than the preset threshold, and restore the target data to be transmitted to a queue matched with the data priority of the target data to be transmitted if the number of times of transmission failure is not greater than the preset threshold.
In one implementation, the storage module 320 is specifically configured to store each data to be sent to a tail of a queue that matches a data priority of the data to be sent;
the sending module 330 is specifically configured to send, sequentially from the head of the queue to the tail of the queue, data to be sent stored in the queue to the host computer according to the order of the queue priority of the queue from high to low;
the determining processing module 350 is specifically configured to restore the target data to be sent to the head of the queue matching the data priority of the target data to be sent when it is determined that the number of times of sending failure of the target data to be sent is not greater than the preset threshold.
In one implementation, the acquisition module 310 includes:
the receiving unit is used for receiving subscription information sent by the upper computer, wherein the subscription information comprises at least one subscription data item and the data priority of the data in each subscription data item, and the data priority is positively correlated with the real-time sending requirement level of the data in the corresponding subscription data item;
the monitoring unit is used for monitoring each subscription data item according to the subscription information received by the receiving unit;
the determining unit is used for taking the data in the changed subscription data items monitored by the monitoring unit as data to be sent, and determining the data priority of the data to be sent according to the subscription information.
In view of the above, in the data transmission device provided by the present application, the lower computer in the semiconductor device stores the data to be transmitted into the queue with the matched data priority, so that the data to be transmitted stored in the queue with the higher priority is preferentially transmitted, that is, the data to be transmitted with the higher priority is preferentially transmitted, and the data priority is positively related to the real-time transmission requirement level of the corresponding data to be transmitted, that is, the higher the real-time transmission requirement level of the data to be transmitted is, the higher the data priority is, that is, the lower computer can preferentially transmit the data to be transmitted with the higher real-time transmission requirement level.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The embodiment of the invention also provides an electronic device, as shown in fig. 4, which comprises a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401, when executing the program stored in the memory 403, implements the following steps:
acquiring at least one piece of data to be transmitted and a data priority of each piece of data to be transmitted according to subscription information transmitted by an upper computer in the semiconductor device, wherein the data priority is positively correlated with a real-time transmission requirement level of the corresponding data to be transmitted;
storing each data to be transmitted into a queue matched with the data priority of the data to be transmitted;
and sequentially sending the data to be sent stored in the queue to the upper computer according to the sequence of the queue priority of the queue from high to low.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
From the above, it can be seen that, in the electronic device provided by the embodiment of the present invention, the lower computer in the semiconductor device stores the data to be sent into the queue with the matched data priority, so that the data to be sent stored in the queue with the higher priority is preferentially sent, that is, the data to be sent with the higher priority is preferentially sent, and the data priority is positively related to the real-time sending requirement level of the corresponding data to be sent, that is, the higher the real-time sending requirement level of the data to be sent is, the higher the data priority is, that is, the lower computer can preferentially send the data to be sent with the higher real-time sending requirement level.
In yet another embodiment of the present invention, a computer storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the data transmission method according to any of the above embodiments.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has described in detail a data transmission method, apparatus, electronic device and storage medium provided in the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A data transmission method applied to a lower computer in a semiconductor device, the method comprising:
acquiring at least one piece of data to be transmitted and a data priority of each piece of data to be transmitted according to subscription information transmitted by an upper computer in semiconductor equipment, wherein the data priority is positively correlated with a real-time transmission requirement level of the corresponding data to be transmitted; the real-time transmission requirement level of the data to be transmitted comprising different information is also different; if the data to be sent comprises task feedback information, the real-time sending requirement level of the data to be sent is higher;
storing each data to be transmitted into a queue matched with the data priority of the data to be transmitted;
sequentially sending the data to be sent stored in the queue to the upper computer according to the sequence of the queue priority of the queue from high to low;
the subscription information includes a preset time rule, and the obtaining at least one data to be sent includes:
and the lower computer periodically acquires various data of the hardware equipment according to the preset time rule, and the data are used as data to be transmitted.
2. The method of claim 1, wherein after the sequentially sending the data to be sent stored in the queue to the host computer, the method further comprises:
determining the data to be transmitted which is failed to be transmitted as target data to be transmitted;
judging whether the number of times of failure in sending the target data to be sent is larger than a preset threshold value, deleting the target data to be sent if the number of times of failure in sending the target data to be sent is larger than the preset threshold value, and storing the target data to be sent into a queue matched with the data priority of the target data to be sent again if the number of times of failure in sending the target data to be sent is not larger than the preset threshold value.
3. The method of claim 2, wherein storing each of the data to be transmitted in a queue matching a data priority of the data to be transmitted comprises:
storing each data to be transmitted to the tail of a queue matched with the data priority of the data to be transmitted;
the step of sequentially sending the data to be sent stored in the queue to the upper computer according to the order of the queue priority of the queue from high to low, includes:
sequentially sending the data to be sent stored in the queue to the upper computer from the head of the queue to the tail of the queue according to the sequence of the queue priority of the queue from high to low;
the re-storing the target data to be sent in a queue matched with the data priority of the target data to be sent comprises the following steps:
and re-storing the target data to be sent to the head of a queue matched with the data priority of the target data to be sent.
4. The method of claim 1, wherein the obtaining at least one data to be sent and the data priority of each data to be sent according to subscription information sent by an upper computer in the semiconductor device comprises:
receiving the subscription information sent by the upper computer, wherein the subscription information comprises at least one subscription data item and the data priority of the data in each subscription data item, and the data priority is positively correlated with the real-time sending requirement level of the data in the corresponding subscription data item;
monitoring each subscription data item according to the subscription information;
and taking the data in the changed subscription data item as the data to be sent, and determining the data priority of the data to be sent according to the subscription information.
5. A data transmission apparatus applied to a lower computer in a semiconductor device, the apparatus comprising:
the acquisition module is used for acquiring at least one piece of data to be transmitted and the data priority of each piece of data to be transmitted according to subscription information transmitted by an upper computer in the semiconductor equipment, wherein the data priority is positively correlated with the corresponding real-time transmission requirement level of the data to be transmitted; the real-time transmission requirement level of the data to be transmitted comprising different information is also different; if the data to be sent comprises task feedback information, the real-time sending requirement level of the data to be sent is higher;
the storage module is used for storing each data to be sent acquired by the acquisition module into a queue matched with the data priority of the data to be sent;
the sending module is used for sequentially sending the data to be sent stored in the queue by the storage module to the upper computer according to the sequence of the queue priority of the queue from high to low;
the subscription information comprises a preset time rule, and the acquisition module is further used for the lower computer to periodically acquire various data of the hardware equipment according to the preset time rule to serve as data to be transmitted.
6. The apparatus of claim 5, wherein the apparatus further comprises:
the determining module is used for determining the data to be transmitted, which is failed to be transmitted, as target data to be transmitted after the transmitting module sequentially transmits the data to be transmitted stored in the queue to the upper computer;
the judging and processing module is used for judging whether the number of times of the transmission failure of the target data to be transmitted, which is determined by the determining module, is larger than a preset threshold, deleting the target data to be transmitted if the number of times of the transmission failure of the target data to be transmitted is larger than the preset threshold, and storing the target data to be transmitted into a queue matched with the data priority of the target data to be transmitted if the number of times of the transmission failure of the target data to be transmitted is not larger than the preset threshold.
7. The apparatus according to claim 6, wherein the storage module is specifically configured to store each of the data to be sent to a tail of a queue matching a data priority of the data to be sent;
the sending module is specifically configured to send the data to be sent stored in the queue to the upper computer sequentially from the head of the queue to the tail of the queue according to the order of the queue priority of the queue from high to low;
the judging and processing module is specifically configured to restore the target data to be sent to a queue head of a queue matched with the data priority of the target data to be sent when it is determined that the number of times of failure in sending the target data to be sent is not greater than the preset threshold.
8. The apparatus of claim 5, wherein the acquisition module comprises:
the receiving unit is used for receiving the subscription information sent by the upper computer, wherein the subscription information comprises at least one subscription data item and the data priority of the data in each subscription data item, and the data priority is positively correlated with the real-time sending requirement level of the data in the corresponding subscription data item;
the monitoring unit is used for monitoring each subscription data item according to the subscription information received by the receiving unit;
and the determining unit is used for taking the data in the changed subscription data items monitored by the monitoring unit as the data to be sent, and determining the data priority of the data to be sent according to the subscription information.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the data transmission method according to any one of claims 1 to 4 when executing the program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the data transmission method according to any of claims 1 to 4.
CN202010732600.2A 2020-07-27 2020-07-27 Data transmission method and device, electronic equipment and storage medium Active CN111988240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010732600.2A CN111988240B (en) 2020-07-27 2020-07-27 Data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010732600.2A CN111988240B (en) 2020-07-27 2020-07-27 Data transmission method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111988240A CN111988240A (en) 2020-11-24
CN111988240B true CN111988240B (en) 2024-03-29

Family

ID=73444292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010732600.2A Active CN111988240B (en) 2020-07-27 2020-07-27 Data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111988240B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113329091B (en) * 2021-06-04 2022-08-26 杭州网易云音乐科技有限公司 Data management method and device, storage medium and electronic equipment
CN113992597B (en) * 2021-09-13 2024-01-23 广州番禺电缆集团有限公司 Cable monitoring data reporting method, device, equipment and storage medium
CN113992602B (en) * 2021-09-13 2023-08-04 广州番禺电缆集团有限公司 Cable monitoring data uploading method, device, equipment and storage medium
CN115063961A (en) * 2022-05-13 2022-09-16 西门子(中国)有限公司 Alarm acquisition method, computing device and computer readable medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018110A (en) * 2006-02-10 2007-08-15 中兴通讯股份有限公司 A retransfer scheduling method of the HARQ protocol based on the retransfer time
CN102769533A (en) * 2011-05-04 2012-11-07 北京北方微电子基地设备工艺研究中心有限责任公司 Data processing method and data processing device
CN103149885A (en) * 2011-12-06 2013-06-12 沈阳中科博微自动化技术有限公司 Lower-power-dissipation industrial wireless network data transmission device and application method thereof
CN105024892A (en) * 2015-06-09 2015-11-04 上海冉能自动化科技有限公司 A method and system realizing wireless communication between an instrument and a host computer
CN107171892A (en) * 2017-06-08 2017-09-15 中国电子信息产业集团有限公司第六研究所 A kind of cross-platform data communication means and system based on QT
CN108124002A (en) * 2017-12-01 2018-06-05 北京明朝万达科技股份有限公司 A kind of data transmission method for uplink and device
CN108631959A (en) * 2017-03-24 2018-10-09 华为技术有限公司 Communication means, data cell and control unit
CN109547357A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 Transmission method, device, equipment and the medium of data information in a kind of storage system
CN110944358A (en) * 2018-09-25 2020-03-31 华为技术有限公司 Data transmission method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018110A (en) * 2006-02-10 2007-08-15 中兴通讯股份有限公司 A retransfer scheduling method of the HARQ protocol based on the retransfer time
CN102769533A (en) * 2011-05-04 2012-11-07 北京北方微电子基地设备工艺研究中心有限责任公司 Data processing method and data processing device
CN103149885A (en) * 2011-12-06 2013-06-12 沈阳中科博微自动化技术有限公司 Lower-power-dissipation industrial wireless network data transmission device and application method thereof
CN105024892A (en) * 2015-06-09 2015-11-04 上海冉能自动化科技有限公司 A method and system realizing wireless communication between an instrument and a host computer
CN108631959A (en) * 2017-03-24 2018-10-09 华为技术有限公司 Communication means, data cell and control unit
CN107171892A (en) * 2017-06-08 2017-09-15 中国电子信息产业集团有限公司第六研究所 A kind of cross-platform data communication means and system based on QT
CN108124002A (en) * 2017-12-01 2018-06-05 北京明朝万达科技股份有限公司 A kind of data transmission method for uplink and device
CN110944358A (en) * 2018-09-25 2020-03-31 华为技术有限公司 Data transmission method and device
CN109547357A (en) * 2018-12-03 2019-03-29 郑州云海信息技术有限公司 Transmission method, device, equipment and the medium of data information in a kind of storage system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄海峰,孙小菡,张明德,丁东.光纤工业网络中实时数据传输方法的研究.应用科学学报.2001,(第04期),全文. *

Also Published As

Publication number Publication date
CN111988240A (en) 2020-11-24

Similar Documents

Publication Publication Date Title
CN111988240B (en) Data transmission method and device, electronic equipment and storage medium
US11144330B2 (en) Algorithm program loading method and related apparatus
US10127093B1 (en) Method and apparatus for monitoring a message transmission frequency in a robot operating system
CN107404540B (en) Data synchronization method and device
CN109033814B (en) Intelligent contract triggering method, device, equipment and storage medium
CN109995612B (en) Service inspection method and device and electronic equipment
CN104346264A (en) System and method for processing system event logs
WO2019034095A1 (en) Software processing method and apparatus, electronic device and computer-readable storage medium
CN115102887A (en) Cluster node monitoring method and related equipment
CN111682977A (en) Method and device for processing exception of network equipment, storage medium and network equipment
CN114531373A (en) Node state detection method, node state detection device, equipment and medium
CN111078480B (en) Exception recovery method and server
CN113965494A (en) Method for fault detection and role selection in a redundant process network
CN111259299A (en) Data processing method, data processing device, computer equipment and storage medium
CN116701123A (en) Task early warning method, device, equipment, medium and program product
CN116431313A (en) Scheduling method, device, equipment and medium for polling task
CN110825023A (en) Data interaction method and system between PLC remote modules
CN112148420B (en) Abnormal task processing method based on container technology, server and cloud platform
CN110928684B (en) Method and system for realizing connection pool under multi-HiveServer 2 server scene
CN112084014A (en) Data processing method, device, equipment and medium
CN114661432A (en) Task scheduling method, device, equipment and storage medium
CN107577546B (en) Information processing method and device and electronic equipment
CN110955579A (en) Ambari-based large data platform monitoring method
CN109857700B (en) FPGA switching method, device, system, electronic equipment and medium
CN115150249B (en) Storage system alarm method, device, equipment and storage medium

Legal Events

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