A data transmission method, device, storage medium and electronic device
By distinguishing and prioritizing the processing of unsuccessful uploads in edge smart devices, and using real-time and historical data channels for priority uploading, the data transmission interruption caused by network instability is solved, and the real-timeness and system efficiency of data transmission are improved.
Patent Information
- Application Number
- CN202210170672.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-02-24
AI Technical Summary
In the data transmission from edge intelligent devices to the center, the network environment is unstable, resulting in data transmission interruption, and the disconnection-network transmission solution increases system overhead and affects real-time performance, and fails to effectively handle the conflict between large amounts of historical data on real-time data.
By distinguishing successful and unsuccessful uploads, the real-time data channel and historical data channel are used for priority uploading, ensuring that real-time data takes precedence over historical data, using the kafka message subscription system to prioritize real-time data transmission when network quality is poor, and upload according to the data importance level and time priority level.
It improves the real-time data transmission and the efficiency of the overall business system, avoids data duplication and loss, reduces system performance overhead, and ensures timely processing of key data.
Smart Images

Figure CN114520999B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular, to a data transmission method, device, storage medium, and electronic device. Background Art
[0002] Many AI devices are deployed at the edge, close to roadside sensors, cameras, and other terminals. They analyze and process raw data at the edge, eliminating the need to upload large amounts of raw data from the edge to the central server, thereby conserving network bandwidth. However, this operating mode requires that data processed by edge intelligent devices be accurately, reliably, and fully uploaded to the central server to ensure the effectiveness and integrity of the overall business.
[0003] The rapid development of technology has brought about an explosion of big data, and the network environment is becoming increasingly challenging. In particular, data transmission from edge smart devices to the central end often faces problems such as insufficient bandwidth due to network congestion and data transmission interruptions due to unstable network communications.
[0004] Therefore, a reasonable mechanism needs to be adopted to enable edge smart devices to identify data that has not been uploaded to the central server in the event of a network interruption, and retransmit it in time after the network is restored to ensure that the data transmitted to the central end is not missed or duplicated.
[0005] Currently, a common solution for resuming data transfers during network outages is to prepare another storage device and place all the data that could not be transferred due to the network outage on a dedicated storage device. Once the network is restored, the data in that storage device is uploaded. This solution requires a dedicated storage area or device for resuming data transfers during network outages and involves moving data between folders, increasing system overhead.
[0006] Furthermore, existing solutions only consider resuming data transmission during network disconnections. They fail to consider that if a large amount of historical data needs to be retransmitted, this historical data will conflict with the real-time data being uploaded. Edge servers will then allocate significant resources to processing the historical data, leaving them with no time to process the real-time data, thus putting the cart before the horse. In this scenario, resuming data transmission during network disconnections will impact the real-time performance of the entire business system. Summary of the Invention
[0007] In view of this, embodiments of the present invention provide a data transmission processing method, apparatus, storage medium, and electronic device to at least partially solve the above-mentioned problems.
[0008] According to a first aspect of an embodiment of the present invention, a data transmission method is provided, including:
[0009] Get the data to be uploaded;
[0010] Uploading the data to be uploaded, and marking the successfully uploaded data as successfully uploaded data and the unsuccessfully uploaded data as unsuccessfully uploaded data, so as to distinguish the successfully uploaded data from the unsuccessfully uploaded data when storing them locally;
[0011] Continuously obtain new data to be uploaded as real-time data, take the unsuccessfully uploaded data as historical data, and upload the real-time data and the historical data through the real-time data channel and the historical data channel, wherein the uploaded real-time data and the historical data are received by the terminal.
[0012] In other examples, continuously acquiring new data to be uploaded as real-time data, using the unsuccessfully uploaded data as historical data, and uploading the real-time data and the historical data through a real-time data channel and a historical data channel, wherein the terminal receives the uploaded real-time data and the historical data, further comprising:
[0013] Continuously acquiring new event data as real-time data and treating the unsuccessfully uploaded data as historical data;
[0014] The real-time data and the historical data are uploaded according to priority levels through the real-time data channel and the historical data channel.
[0015] In other examples, uploading the real-time data and the historical data according to priority levels through the real-time data channel and the historical data channel includes:
[0016] When the network quality is less than a preset quality, confirming that the priority level of the real-time data is greater than the priority level of the historical data;
[0017] Based on the fact that the priority level of the real-time data is greater than the priority level of the historical data, the real-time data channel is preferentially called to upload the real-time data, and then the historical data channel is called to upload the historical data.
[0018] In some other examples, before the step of: when the network quality is less than the preset quality, confirming that the priority level of the real-time data is greater than the priority level of the historical data, the method further includes: confirming the network quality, wherein when the network quality is less than the preset quality, the network quality is confirmed to be poor; otherwise, the network quality is confirmed to be good;
[0019] Uploading the real-time data and the historical data according to priority levels through the real-time data channel and the historical data channel also includes:
[0020] When the network quality is poor, confirming that the priority level of the real-time data is greater than the priority level of the historical data; when the network quality is good, confirming that the priority level of the real-time data is equal to the priority level of the historical data;
[0021] Based on the fact that the priority level of the real-time data is greater than the priority level of the historical data, the real-time data channel is called first to upload the real-time data, and then the historical data channel is called to upload the historical data; based on the fact that the priority level of the real-time data is equal to the priority level of the historical data, the real-time data channel is called at the same time to upload the real-time data, and the historical data channel is called to upload the historical data.
[0022] In other examples, uploading the real-time data and the historical data according to priority levels through the real-time data channel and the historical data channel includes:
[0023] The real-time data and the historical data are uploaded according to time priority through the real-time data channel and the historical data channel.
[0024] In other examples, obtaining data to be uploaded includes:
[0025] Get the data to be uploaded;
[0026] The data to be uploaded are marked according to the importance level to obtain data to be uploaded of different importance levels.
[0027] In other examples, uploading the real-time data and the historical data according to priority levels through the real-time data channel and the historical data channel includes:
[0028] The real-time data and the historical data are uploaded according to the data importance level through the real-time data channel and the historical data channel.
[0029] According to a second aspect of an embodiment of the present invention, there is provided a data transmission device, including:
[0030] The acquisition module is used to obtain the data to be uploaded;
[0031] a first uploading module, configured to upload the data to be uploaded, and mark the successfully uploaded data as successfully uploaded data and the unsuccessfully uploaded data as unsuccessfully uploaded data, so as to distinguish the successfully uploaded data from the unsuccessfully uploaded data when storing them locally;
[0032] The second uploading module is used to continuously obtain new data to be uploaded as real-time data, and use the unsuccessfully uploaded data as historical data, and upload the real-time data and the historical data through the real-time data channel and the historical data channel, wherein the uploaded real-time data and the historical data are received by the terminal.
[0033] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0034] According to a fourth aspect of an embodiment of the present invention, an electronic device is further provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0035] In the solution of the embodiment of the present invention, by acquiring the data to be uploaded, uploading the data to be uploaded, marking the successfully uploaded data as successfully uploaded data and the unsuccessfully uploaded data as unsuccessfully uploaded data, so as to distinguish the successfully uploaded data from the unsuccessfully uploaded data when storing them locally, continuously acquiring new data to be uploaded as real-time data, treating the unsuccessfully uploaded data as historical data, and uploading the real-time data and the historical data through the real-time data channel and the historical data channel, wherein the uploaded real-time data and the historical data are received by the terminal, so that the real-time data takes precedence over the historical data when uploading the data, thereby improving the real-time performance of the data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0037] Figure 1 is a hardware structure block diagram of a mobile terminal according to a data transmission method of an embodiment of the present invention;
[0038] Figure 2 is a flow chart of a data transmission method according to an embodiment of the present invention;
[0039] Figure 3 It is a structural block diagram of a data transmission device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.
[0041] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with embodiments.
[0042] It should be noted that the terms "first", "second", etc. in the description 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.
[0043] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG is a hardware structure block diagram of a mobile terminal of a data transmission method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data. The mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0044] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a data transmission method in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0045] Transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, configured to communicate with the Internet wirelessly.
[0046] In order to better solve the problems raised in the above background technology, the present invention discloses a data transmission method, device, storage medium and electronic device, which will be described in detail one by one in the following embodiments.
[0047] See also Figure 2 , Figure 2 A flowchart of a data transmission method provided according to an embodiment of this specification is shown, which specifically includes the following steps:
[0048] S202, obtaining data to be uploaded;
[0049] According to an embodiment of the present invention, step S202 includes: acquiring event data through an edge terminal (edge smart device), and using the event data as data to be uploaded.
[0050] The edge intelligent device is an edge processor connected to an information collection device, configured to acquire and analyze the raw data collected by the information collection device to obtain the event data. The information collection device includes, but is not limited to, laser radars, sensors, video cameras, and other devices configured to collect video or images of traffic or roads.
[0051] The event data is the result of analyzing and processing the raw data collected by the information collection device by the edge intelligent device. For example, the edge intelligent device may be equipped with multiple algorithmic models for identifying traffic events, which analyze and organize the raw data using these algorithmic models to generate the event data. The event data must be uploaded to the central terminal (terminal) for management personnel to review and implement appropriate management measures.
[0052] As mentioned in the background technology, many artificial intelligence devices are installed at the edge close to road sensors, cameras and other terminals, and complete the analysis and processing of original data at the edge, avoiding the need to upload a large amount of original data from the edge to the center, saving network bandwidth.
[0053] According to another embodiment of the present invention, optionally, in step S202, the data to be uploaded is the original data that the user end needs to upload to the central end. Different from the previous embodiment, the data to be uploaded in this embodiment is the original data that the user end needs to upload rather than the event data processed by the edge processor. At this time, the central end can be a data storage end (cloud) for storing a large amount of data resources uploaded by the user end for subsequent use by the user.
[0054] S204, uploading the data to be uploaded, and marking the successfully uploaded data as successfully uploaded data and the unsuccessfully uploaded data as unsuccessfully uploaded data, so as to distinguish the successfully uploaded data from the unsuccessfully uploaded data when storing them locally;
[0055] Understandably, when uploading the data to be uploaded, there are various situations where the data upload may fail, for example, due to a network interruption. The existing technology places the untransmittable data in a specific storage device and then uploads the data from that storage device when the network is restored. This solution requires a specific storage area or device for the network interruption resume function and also involves moving data between folders, increasing system overhead and the risk of data omission.
[0056] In the embodiments provided by the present invention, by marking successfully uploaded data as successfully uploaded and unsuccessfully uploaded data as unsuccessfully uploaded, both successfully uploaded and unsuccessfully uploaded data can be stored in a single database. This allows for differentiation based on the different attributes of the marked files, without the need for separation into two physical storage areas. This reduces system performance overhead and avoids the need for local file transfers.
[0057] S206, continuously acquiring new data to be uploaded as real-time data, taking the unsuccessfully uploaded data as historical data, uploading the real-time data and the historical data through the real-time data channel and the historical data channel, wherein the uploaded real-time data and the historical data are received by the terminal.
[0058] It is understood that in the embodiments provided herein, the real-time data is uploaded via the real-time data channel, and the historical data is uploaded via the historical data channel. That is, the real-time data and the historical data are uploaded to the terminal via their respective data channels without affecting each other. This process can effectively avoid data duplication and data loss.
[0059] In some other examples, step 202 further includes:
[0060] S2022, obtaining data to be uploaded;
[0061] S2024: Mark the data to be uploaded according to the importance level to obtain data to be uploaded of different importance levels.
[0062] Optionally, the data to be uploaded at different importance levels can be used to confirm the data that needs to be uploaded first when the data to be uploaded needs to be uploaded again due to an unsuccessful upload.
[0063] Optionally, by using the data to be uploaded at different importance levels, when the data to be uploaded needs to be uploaded simultaneously with new data to be uploaded due to unsuccessful upload, the data that needs to be uploaded first can be confirmed.
[0064] Optionally, the data to be uploaded is marked according to the importance level to obtain data to be uploaded of different importance levels, including: marking the data to be uploaded according to the importance level through a deep learning network to obtain data to be uploaded of different importance levels.
[0065] Among them, different importance levels of data to be uploaded are marked, and the deep learning network is trained with the data after the marked importance levels. By inputting the acquired data to be uploaded into the trained deep learning network, the data to be uploaded with marked importance levels, i.e., the data to be uploaded with different importance levels, is output.
[0066] In some other examples, step 206 further includes:
[0067] S2062, continuously acquiring new event data as real-time data, and treating the unsuccessfully uploaded data as historical data;
[0068] S2064: Upload the real-time data and the historical data according to priority levels through the real-time data channel and the historical data channel.
[0069] Among them, in step S2064, the real-time data and the historical data are uploaded according to the priority level through the real-time data channel and the historical data channel, so that when the amount of uploaded data is large, the data with higher priority level can be uploaded first, thereby improving the work efficiency of the overall business system.
[0070] In some other examples, preferably, step 2064 further includes:
[0071] S20642, when the network quality is less than a preset quality, confirming that the priority level of the real-time data is greater than the priority level of the historical data;
[0072] S20644: Based on the fact that the priority level of the real-time data is greater than the priority level of the historical data, the real-time data channel is preferentially called to upload the real-time data, and then the historical data channel is called to upload the historical data.
[0073] It can be understood that in the above-mentioned embodiment provided by the present invention, in order to prevent the excessive amount of historical data to be transmitted from affecting the upload of real-time data and causing network congestion, the data to be uploaded is prioritized, that is, real-time data takes precedence over historical data when transmitted over the network.
[0074] In other embodiments, when the network quality is less than the preset quality, it can be understood that the threshold of the preset quality can be set according to the specific situation. The preset quality can be set to a higher value, which is greater than the optimal network quality value. In other words, as long as the network is connected, the priority of the real-time data is determined to be greater than the priority of the historical data. The preset quality can be set to a normal value, which is less than the optimal network quality value. In other words, when the network is connected, whether to push real-time data first or push both real-time data and historical data can be determined based on the quality of the network. This situation will be specifically explained through embodiments below.
[0075] In some other embodiments, further, the step S20642: when the network quality is less than the preset quality, confirming that the priority level of the real-time data is greater than the priority level of the historical data, further includes a step:
[0076] S20641, confirming the network quality, wherein if the network quality is less than a preset quality, the network quality is confirmed to be poor, otherwise the network quality is confirmed to be good;
[0077] Optionally, step S20642 further includes: when the network quality is poor, confirming that the priority level of the real-time data is greater than the priority level of the historical data; when the network quality is good, confirming that the priority level of the real-time data is equal to the priority level of the historical data;
[0078] Among them, optionally, the step S20644 also includes: based on the priority level of the real-time data being greater than the priority level of the historical data, preferentially calling the real-time data channel to upload the real-time data, and then calling the historical data channel to upload the historical data; based on the priority level of the real-time data being equal to the priority level of the historical data, simultaneously calling the real-time data channel to upload the real-time data, and calling the historical data channel to upload the historical data.
[0079] It is worth mentioning that, preferably, a Kafka message subscription system is used for communication between the edge (edge intelligent device) and the terminal (data receiving end). The Kafka message subscription system can partition the data to be uploaded by attributes, continuously obtain new data to be uploaded as real-time data (real-time data partition), and use the unsuccessfully uploaded data as historical data (historical data partition). When it is confirmed that the network quality is poor, the real-time data channel is preferentially called to upload the real-time data, and then the historical data channel is called to upload the historical data. When the network quality is good, the real-time data channel is called to upload the real-time data and the historical data channel is called to upload the historical data simultaneously. Correspondingly, the terminal server also preferentially subscribes to messages within the real-time data partition to process related data, thereby more effectively utilizing the terminal's capabilities, preventing a large amount of historical data from blocking the terminal's reception and processing of real-time data, and prioritizing the real-time nature of the service.
[0080] In other examples, preferably, the step 2064 further includes: uploading the real-time data and the historical data according to time priority through the real-time data channel and the historical data channel.
[0081] The real-time data and historical data are uploaded according to their time priority. This can solve the problem that the current market solutions only consider the implementation of resuming transmission after network disconnection, but do not consider that if a large amount of data needs to be retransmitted, the historical data will conflict with the real-time uploaded data. The platform server will allocate a large amount of resources to process the historical data and will have no time to process the real-time uploaded data. This improves the real-time performance of the overall business system. In addition, among the historical data, the more recent the time, the higher the priority, so as to ensure the real-time nature of the data as much as possible.
[0082] In some other examples, the step 2064 further includes: uploading the real-time data and the historical data according to the data importance level through the real-time data channel and the historical data channel.
[0083] Among them, uploading the real-time data and the historical data according to the data importance level can solve the data upload delay caused by the historical data having a lower time priority than the real-time data. If the historical data is event data such as a major traffic accident, the optimal event processing time will be delayed due to the time priority lag. Uploading the real-time data and the historical data according to the data importance level can solve the above problem, making the overall business system more efficient and more in line with the needs of traffic application scenarios.
[0084] The methods according to the above embodiments can be implemented using software plus the necessary general-purpose hardware platform. Hardware is also an option, but in many cases the former is the preferred implementation method. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, computer, server, or network device) to execute the methods described in the various embodiments of the present invention.
[0085] In this embodiment, a data transmission device is also provided, which is used to implement the corresponding data transmission methods in the aforementioned multiple method embodiments and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here. In addition, the functional implementation of each module of the data processing device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be described in detail here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0086] According to another embodiment of the present invention, Figure 3 , provides a data transmission device, comprising:
[0087] An acquisition module 30 is used to acquire data to be uploaded;
[0088] a first uploading module 40 for uploading the data to be uploaded, marking the successfully uploaded data as successfully uploaded data and marking the unsuccessfully uploaded data as unsuccessfully uploaded data, so as to distinguish the successfully uploaded data from the unsuccessfully uploaded data when storing them locally;
[0089] The second uploading module 50 is used to continuously obtain new data to be uploaded as real-time data, and use the unsuccessfully uploaded data as historical data, and upload the real-time data and the historical data through the real-time data channel and the historical data channel, wherein the uploaded real-time data and the historical data are received by the terminal.
[0090] In some other examples, the acquisition module 30 further includes:
[0091] An acquisition unit 31 is used to acquire data to be uploaded;
[0092] The marking unit 32 is configured to mark the data to be uploaded according to the importance level, so as to obtain data to be uploaded of different importance levels.
[0093] Optionally, the data to be uploaded at different importance levels can be used to confirm the data that needs to be uploaded first when the data to be uploaded needs to be uploaded again due to an unsuccessful upload.
[0094] Optionally, by using the data to be uploaded at different importance levels, when the data to be uploaded needs to be uploaded simultaneously with new data to be uploaded due to unsuccessful upload, the data that needs to be uploaded first can be confirmed.
[0095] Optionally, the data to be uploaded is marked according to the importance level to obtain data to be uploaded of different importance levels, including: marking the data to be uploaded according to the importance level through a deep learning network to obtain data to be uploaded of different importance levels.
[0096] Among them, different importance levels of data to be uploaded are marked, and the deep learning network is trained with the data after the marked importance levels. By inputting the acquired data to be uploaded into the trained deep learning network, the data to be uploaded with marked importance levels, i.e., the data to be uploaded with different importance levels, is output.
[0097] In some other examples, the second uploading module 50 further includes:
[0098] A continuous acquisition unit 51 is used to continuously acquire new event data as real-time data and to use the unsuccessfully uploaded data as historical data;
[0099] The uploading unit 52 is configured to upload the real-time data and the historical data according to priority levels through the real-time data channel and the historical data channel.
[0100] In some other examples, preferably, the uploading unit 52 further includes:
[0101] A priority confirmation unit 521 is configured to confirm that the priority of the real-time data is greater than the priority of the historical data when the network quality is less than a preset quality;
[0102] The uploading subunit 522 is configured to preferentially call the real-time data channel to upload the real-time data, and then call the historical data channel to upload the historical data, based on the fact that the priority level of the real-time data is greater than the priority level of the historical data.
[0103] It can be understood that in the above-mentioned embodiment provided by the present invention, in order to prevent the excessive amount of historical data to be transmitted from affecting the upload of real-time data and causing network congestion, the data to be uploaded is prioritized, that is, real-time data takes precedence over historical data when transmitted over the network.
[0104] In other embodiments, when the network quality is less than the preset quality, it can be understood that the threshold of the preset quality can be set according to the specific situation. The preset quality can be set to a higher value, which is greater than the optimal network quality value. In other words, as long as the network is connected, the priority of the real-time data is determined to be greater than the priority of the historical data. The preset quality can be set to a normal value, which is less than the optimal network quality value. In other words, when the network is connected, whether to push real-time data first or push both real-time data and historical data can be determined based on the quality of the network. This situation will be specifically explained through embodiments below.
[0105] In some other embodiments, further, the uploading unit 52 further includes:
[0106] A network quality confirmation unit 521 is configured to confirm the network quality, wherein when the network quality is less than a preset quality, the network quality is confirmed to be poor, otherwise the network quality is confirmed to be good;
[0107] Optionally, in the priority confirmation unit 521: when the network quality is poor, confirming that the priority level of the real-time data is greater than the priority level of the historical data; when the network quality is good, confirming that the priority level of the real-time data is equal to the priority level of the historical data;
[0108] Among them, optionally, the upload sub-unit 522 is specifically as follows: based on the priority level of the real-time data being greater than the priority level of the historical data, the real-time data channel is preferentially called to upload the real-time data, and then the historical data channel is called to upload the historical data; based on the priority level of the real-time data being equal to the priority level of the historical data, the real-time data channel is simultaneously called to upload the real-time data, and the historical data channel is simultaneously called to upload the historical data.
[0109] In other examples, preferably, the uploading unit 52 specifically uploads the real-time data and the historical data according to time priority through the real-time data channel and the historical data channel.
[0110] The real-time data and historical data are uploaded according to their time priority. This can solve the problem that the current market solutions only consider the implementation of resuming transmission after network disconnection, but do not consider that if a large amount of data needs to be retransmitted, the historical data will conflict with the real-time uploaded data. The platform server will allocate a large amount of resources to process the historical data and will have no time to process the real-time uploaded data. This improves the real-time performance of the overall business system. In addition, among the historical data, the more recent the time, the higher the priority, so as to ensure the real-time nature of the data as much as possible.
[0111] In other examples, the uploading unit 52 specifically uploads the real-time data and the historical data according to the data importance levels through the real-time data channel and the historical data channel.
[0112] Among them, uploading the real-time data and the historical data according to the data importance level can solve the data upload delay caused by the historical data having a lower time priority than the real-time data. If the historical data is event data such as a major traffic accident, the optimal event processing time will be delayed due to the time priority lag. Uploading the real-time data and the historical data according to the data importance level can solve the above problem, making the overall business system more efficient and more in line with the needs of traffic application scenarios.
[0113] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.
[0114] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0115] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0116] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0117] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0118] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0119] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A data transmission method, characterized in that: include: Acquire event data through an edge smart device, and determine the event data as data to be uploaded. The edge smart device is an edge processor connected to an information collection device, and the event data is result data obtained by the edge smart device after analyzing and processing raw data collected by the information collection device; Uploading the data to be uploaded, marking the successfully uploaded data as successfully uploaded data and the unsuccessfully uploaded data as unsuccessfully uploaded data, so as to distinguish the successfully uploaded data from the unsuccessfully uploaded data when locally stored, training a deep learning network using the data marked with importance levels, inputting the data to be uploaded into the trained deep learning network, and outputting the data to be uploaded marked with different importance levels; A Kafka message subscription system is used for communication between the edge intelligent device and the terminal. The data to be uploaded is partitioned by attribute through the Kafka message subscription system, new data to be uploaded is continuously acquired as real-time data, and the unsuccessfully uploaded data is used as historical data. The real-time data and the historical data are uploaded through a real-time data channel and a historical data channel. The uploaded real-time data and the historical data are received by the terminal, and the terminal server preferentially subscribes to messages in the real-time data partition. The method also includes: when the network quality is less than the preset quality, the priority level of the real-time data is greater than the priority level of the historical data, the real-time data channel is first called to upload the real-time data, and then the historical data channel is called to upload the historical data; when the network quality is greater than or equal to the preset quality, the priority level of the real-time data is equal to the priority level of the historical data, and the real-time data channel is called to upload the real-time data, and the historical data channel is called to upload the historical data at the same time.
2. The method according to claim 1, characterized in that Continuously acquiring new data to be uploaded as real-time data, taking the unsuccessfully uploaded data as historical data, and uploading the real-time data and the historical data through a real-time data channel and a historical data channel, wherein the terminal receives the uploaded real-time data and the historical data, further comprising: Continuously acquiring new event data as the real-time data, and using the unsuccessfully uploaded data as the historical data; The real-time data and the historical data are uploaded according to priority levels through the real-time data channel and the historical data channel.
3. The method according to claim 2, characterized in that Uploading the real-time data and the historical data according to the priority level through the real-time data channel and the historical data channel includes: The real-time data and the historical data are uploaded according to time priority through the real-time data channel and the historical data channel.
4. The method according to claim 2, characterized in that Get the data to be uploaded, including: Get the data to be uploaded; The data to be uploaded are marked according to the importance level to obtain data to be uploaded of different importance levels.
5. The method according to claim 4, characterized in that Uploading the real-time data and the historical data according to the priority level through the real-time data channel and the historical data channel includes: The real-time data and the historical data are uploaded according to the data importance level through the real-time data channel and the historical data channel.
6. A data transmission device, characterized in that: include: An acquisition module is configured to acquire event data through an edge intelligent device, and determine the event data as data to be uploaded. The edge intelligent device is an edge processor connected to an information acquisition device, and the event data is result data obtained by the edge intelligent device after analyzing and processing the raw data collected by the information acquisition device; a first uploading module, configured to upload the data to be uploaded, mark the successfully uploaded data as successfully uploaded data, and mark the unsuccessfully uploaded data as unsuccessfully uploaded data, so as to distinguish the successfully uploaded data from the unsuccessfully uploaded data when locally stored, obtain event data through an edge intelligent device, and determine the event data as the data to be uploaded, wherein the edge intelligent device is an edge processor connected to an information collection device, and the event data is result data obtained by the edge intelligent device after analyzing and processing the raw data information collected by the information collection device; A second uploading module is configured to use a Kafka message subscription system to communicate between the edge intelligent device and the terminal, partition the data to be uploaded by attributes through the Kafka message subscription system, continuously obtain new data to be uploaded as real-time data, and use the unsuccessfully uploaded data as historical data. The real-time data and the historical data are uploaded through a real-time data channel and a historical data channel, wherein the uploaded real-time data and the historical data are received by the terminal, and the terminal server preferentially subscribes to messages in the real-time data partition; The device is also used to: when the network quality is less than the preset quality, the priority level of the real-time data is greater than the priority level of the historical data, and the real-time data channel is first called to upload the real-time data, and then the historical data channel is called to upload the historical data; when the network quality is greater than or equal to the preset quality, the priority level of the real-time data is equal to the priority level of the historical data, and the real-time data channel is called to upload the real-time data, and the historical data channel is called to upload the historical data at the same time.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 5 when executed.
8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Transmission analysis method and device for real-time continuous electrocardiogram data
CN107822624A
Vehicle-mounted network streaming data optimization method and device
CN110417680A
Data transmission method and device in IoT system, equipment and storage medium
CN111031094A