CN111107123B - Method and device for continuous transmission in broken network - Google Patents

Method and device for continuous transmission in broken network Download PDF

Info

Publication number
CN111107123B
CN111107123B CN201811270778.9A CN201811270778A CN111107123B CN 111107123 B CN111107123 B CN 111107123B CN 201811270778 A CN201811270778 A CN 201811270778A CN 111107123 B CN111107123 B CN 111107123B
Authority
CN
China
Prior art keywords
data
state
transmitted
network
continuous transmission
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
CN201811270778.9A
Other languages
Chinese (zh)
Other versions
CN111107123A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201811270778.9A priority Critical patent/CN111107123B/en
Publication of CN111107123A publication Critical patent/CN111107123A/en
Application granted granted Critical
Publication of CN111107123B publication Critical patent/CN111107123B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0882Utilisation of link capacity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring

Abstract

The embodiment of the invention provides a disconnected network continuous transmission method, which is applied to electronic equipment provided with an embedded multimedia memory card, and comprises the following steps: acquiring data to be transmitted, and storing the data to be transmitted to a buffer area; judging whether the state of the electronic equipment meets the transmission condition or not; wherein the state of the electronic device includes: network card status and/or remaining capacity status of the buffer; if the data transmission rate does not meet the requirement, adding a continuous transmission mark for the data to be transmitted as continuous transmission data; storing the continuous transmission data into an embedded multimedia memory card; and if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card. According to the scheme, when the state of the electronic equipment does not meet the transmission condition, the data to be transmitted is determined as the data to be continuously transmitted, and after a period of time, the data to be transmitted is uploaded again instead of being directly transmitted under the condition that the electronic equipment is not networked or the network transmission speed is low, so that the data loss is reduced.

Description

Method and device for continuous transmission in broken network
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method and an apparatus for resuming transmission in a disconnected network.
Background
In some scenarios, data needs to be transmitted in real time through a network, for example, when monitoring places such as a bar and a hotel, a monitoring image needs to be uploaded to a platform in real time through the network, and the platform analyzes and processes the monitoring image.
However, in these scenarios, the network state of the electronic device may not be stable, and data may be transmitted through the network with unstable state, resulting in data loss.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for continuous transmission in a broken network, so as to reduce data loss.
The specific technical scheme is as follows:
the embodiment of the invention provides a disconnected network continuous transmission method, which is applied to electronic equipment and comprises the following steps:
acquiring data to be transmitted, and storing the data to be transmitted to a buffer area;
judging whether the state of the electronic equipment meets a transmission condition or not; wherein the state of the electronic device comprises: network card status and/or buffer remaining capacity status;
if the data to be transmitted does not meet the requirement, adding a continuous transmission mark for the data to be transmitted as continuous transmission data;
storing the continuous transmission data into the embedded multimedia memory card;
and if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card.
Optionally, the determining whether the state of the electronic device satisfies the transmission condition includes:
acquiring a network card state of the electronic device, wherein the network card state comprises: a disconnected state or a connected state;
if the network card state is a networking state, judging that the state of the electronic equipment meets a transmission condition;
and if the network card state is the disconnected network state, judging that the state of the electronic equipment does not meet the transmission condition.
Optionally, the determining whether the state of the electronic device satisfies the transmission condition includes:
acquiring the residual capacity of the buffer area, and judging whether the residual capacity is larger than a preset threshold value;
if so, judging that the state of the electronic equipment meets the transmission condition;
and if not, judging that the state of the electronic equipment does not meet the transmission condition.
Optionally, the determining whether the state of the electronic device satisfies the transmission condition includes:
acquiring a network card state of the electronic device, wherein the network card state comprises: a disconnected state or a connected state;
if the network card state is a networking state, acquiring the residual capacity of the buffer area, and judging whether the residual capacity is larger than a preset threshold value; if so, judging that the state of the electronic equipment meets the transmission condition; if not, judging that the state of the electronic equipment does not meet the transmission condition;
and if the network card state is the disconnected network state, judging that the state of the electronic equipment does not meet the transmission condition.
Optionally, after the obtaining the data to be transmitted and storing the data to be transmitted in the buffer, the method further includes:
detecting whether a safety data memory card is installed in a card slot of the electronic equipment or not;
and if so, backing up the data to be transmitted to the safety data memory card.
Optionally, before the storing the resume data in the embedded multimedia memory card, the method further includes:
the processor acquires the used percentage of the embedded multimedia storage card from the extended register and calculates the write-in quantity of the embedded multimedia storage card;
determining the service life of the embedded multimedia memory card according to the used percentage and the written amount of the embedded multimedia memory card and the amplification factor;
and if the service life is longer than a preset early warning threshold value, judging that the embedded multimedia memory card does not reach an early warning state, and executing the step of storing the continuous transmission data into the embedded multimedia memory card.
Optionally, the following formula is used to determine the service life of the embedded multimedia memory card according to the used percentage and the write-in amount of the embedded multimedia memory card:
WAI=EXT_CSD×C×3000/S
LifeTime=(C×3000)/(L×WAI)×24
the WAI represents an amplification factor, the EXT _ CSD represents the used percentage of the embedded multimedia memory card, the C represents the total capacity of the embedded multimedia memory card, the S represents the total bytes written into the embedded multimedia memory card, the Life time represents the service life of the embedded multimedia memory card, and the L represents the written amount of the embedded multimedia memory card in the last 24 hours.
Optionally, the storing the resume data in the embedded multimedia memory card includes:
encrypting the continuous transmission data, and storing the encrypted continuous transmission data into the embedded multimedia memory card;
the uploading of the continuous transmission data stored in the embedded multimedia memory card comprises the following steps:
and decrypting the continuous transmission data stored in the embedded multimedia memory card, and uploading the decrypted continuous transmission data.
Optionally, after the uploading of the resume data stored in the embedded multimedia memory card, the method further includes:
if the continuously transmitted data are uploaded successfully, the continuously transmitted mark of the continuously transmitted data is changed into a non-continuously transmitted mark.
The embodiment of the invention provides a broken network continuous transmission device, which is applied to electronic equipment and comprises:
the data acquisition module is used for acquiring data to be transmitted and storing the data to be transmitted to a buffer area;
the state judgment module is used for judging whether the state of the electronic equipment meets the transmission condition or not; if not, triggering a continuous transmission data storage module; wherein the state of the electronic device comprises: network card status and/or remaining capacity status of the buffer;
the continuous transmission data storage module is used for adding a continuous transmission mark for the data to be transmitted as continuous transmission data; storing the continuous transmission data into the embedded multimedia memory card;
and the continuous transmission data uploading module is used for uploading continuous transmission data stored in the embedded multimedia memory card if the duration that the electronic equipment does not perform data transmission through the network reaches the preset duration.
Optionally, the state determining module includes:
the first network card state judgment submodule is used for acquiring the network card state of the electronic equipment; if the network card state is the networking state, judging that the state of the electronic equipment meets the transmission condition; and if the network card state is the network disconnection state, judging that the state of the electronic equipment does not meet the transmission condition.
Optionally, the state determining module includes:
the first residual capacity judgment submodule is used for acquiring the residual capacity of the buffer area and judging whether the residual capacity is larger than a preset threshold value; if so, judging that the state of the electronic equipment meets the transmission condition; and if not, judging that the state of the electronic equipment does not meet the transmission condition.
Optionally, the state determining module includes:
the second network card state judgment submodule is used for acquiring the network card state of the electronic equipment, and the network card state comprises: a disconnected state or a connected state; if the network card state is the disconnected state, judging that the state of the electronic equipment does not meet the transmission condition; if the network card state is the networking state, triggering a second residual capacity judgment submodule;
the second residual capacity judgment submodule is used for acquiring the residual capacity of the buffer area and judging whether the residual capacity is larger than a preset threshold value; if so, judging that the state of the electronic equipment meets the transmission condition; and if not, judging that the state of the electronic equipment does not meet the transmission condition.
Optionally, the data obtaining module is further configured to detect whether a secure data memory card is installed in a card slot of the electronic device; and if so, backing up the data to be transmitted to the safety data memory card.
Optionally, the continuous transmission data storage module is further configured to trigger the early warning state determination module;
the early warning state judgment module is used for acquiring the used percentage of the embedded multimedia memory card from the extended register by the processor and calculating the write-in quantity of the embedded multimedia memory card; determining the service life of the embedded multimedia memory card according to the used percentage and the write-in quantity of the embedded multimedia memory card; and if the service life is longer than a preset early warning threshold value, judging that the embedded multimedia memory card does not reach the early warning state, and executing the step of storing the continuously transmitted data into the embedded multimedia memory card.
Optionally, the early warning state determining module is specifically configured to:
determining the service life of the embedded multimedia memory card according to the used percentage and the write-in quantity of the embedded multimedia memory card by using the following formula:
WAI=EXT_CSD×C×3000/S
LifeTime=(C×3000)/(L×WAI)×24
wherein WAI represents an amplification factor, EXT _ CSD represents the used percentage of the embedded multimedia memory card, C represents the total capacity of the embedded multimedia memory card, S represents the total bytes of writing of the embedded multimedia memory card, life time represents the service life of the embedded multimedia memory card, and L represents the writing amount of the embedded multimedia memory card in the last 24 hours.
Optionally, the continuous transmission data storage module is specifically configured to:
encrypting the continuous transmission data, and storing the encrypted continuous transmission data into the embedded multimedia memory card;
the continuous transmission data uploading module is specifically configured to:
and decrypting the continuous transmission data stored in the embedded multimedia memory card, and uploading the decrypted continuous transmission data.
Optionally, the apparatus further comprises:
and the mark modification module is used for modifying the continuous transmission mark of the continuous transmission data into a non-continuous transmission mark if the continuous transmission data is uploaded successfully.
The embodiment of the invention also provides electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the above-mentioned disconnected network continuous transmission methods when executing the program stored in the memory.
The embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method for resuming a disconnected network is implemented.
According to the method and the device for continuous transmission in the disconnected network, provided by the embodiment of the invention, by judging whether the state of the electronic equipment meets the transmission condition or not, if not, a continuous transmission mark is added to the data to be transmitted to serve as continuous transmission data, and the continuous transmission data is stored in the embedded multimedia memory card; if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card; wherein the state of the electronic device comprises: the network card state and/or the residual capacity state of the buffer area, wherein the network card state can reflect whether the electronic equipment is networked, the residual capacity state of the buffer area reflects the data volume of the data to be transmitted which is not uploaded in the buffer area, and if the residual capacity of the buffer area is larger, the current network transmission speed is reflected to be slower, and the transmission requirement of the data cannot be met; therefore, when the state of the electronic equipment does not meet the transmission condition, the data to be transmitted is determined as the data to be continuously transmitted, and the data to be transmitted is uploaded again after a period of time, rather than being directly transmitted under the condition that the electronic equipment is not networked or the network transmission speed is low, so that the data loss is reduced. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a network outage and continuous transmission method according to an embodiment of the present invention;
FIG. 2 is a diagram of the storage format of data stored in the EMMC;
fig. 3 is a schematic flow chart of another method for resuming transmission through a disconnected network according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for continuously transmitting a disconnected network according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In some scenarios, data needs to be transmitted in real time through a network, for example, when monitoring places such as a bar, a hotel, and the like, a monitoring image needs to be uploaded to a platform through the network in real time, and the platform analyzes and processes the monitoring image.
However, the network status of these scenarios may not be stable, and data loss may result from data transmission through the network with unstable status.
In order to solve the above technical problem, the present invention provides a method for resuming network interruption, which can be applied to various electronic devices with Embedded multimedia memory cards installed thereon, such as a computer with an Embedded Multimedia Memory Card (EMMC) installed thereon, a mobile terminal, a webcam, a ball machine, and the like, and is not limited thereto in the embodiments of the present invention.
The method for resuming the disconnected network provided by the embodiment of the invention is generally explained as follows:
acquiring data to be transmitted, and storing the data to be transmitted to a buffer area;
judging whether the state of the electronic equipment meets a transmission condition or not; wherein the state of the electronic device comprises: network card status and/or remaining capacity status of the buffer;
if the transmission data does not meet the requirement, adding a continuous transmission mark for the data to be transmitted as continuous transmission data;
storing the continuous transmission data into the embedded multimedia memory card;
and if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card.
As can be seen from the above, in the disconnected network continuous transmission method provided in the embodiment of the present invention, by determining whether the state of the electronic device satisfies the transmission condition, if not, a continuous transmission flag is added to the data to be transmitted, and the data to be transmitted is used as continuous transmission data and stored in the embedded multimedia memory card; if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card; wherein the state of the electronic device comprises: the network card state and/or the residual capacity state of the buffer area, wherein the network card state can reflect whether the electronic equipment is networked, the residual capacity state of the buffer area reflects the data volume of the data to be transmitted which is not uploaded in the buffer area, and if the residual capacity of the buffer area is larger, the current network transmission speed is reflected to be slower, and the transmission requirement of the data cannot be met; therefore, when the state of the electronic equipment does not meet the transmission condition, the data to be transmitted can be determined as the continuous transmission data, and after a period of time, the data to be transmitted is uploaded again, rather than being directly transmitted under the condition that the electronic equipment is not networked or the network transmission speed is low, so that the data loss is reduced.
The method for resuming transmission of a disconnected network provided by the embodiment of the present invention is described in detail by the following specific embodiments.
As shown in fig. 1, a schematic flow chart of a network interruption and continuous transmission method provided in an embodiment of the present invention is applied to an electronic device installed with an embedded multimedia memory card, and includes the following steps:
s101: and acquiring data to be transmitted, and storing the data to be transmitted to a buffer area.
The data to be transmitted is data to be uploaded to a network by the electronic device, for example, the data to be transmitted may be video data acquired by an electronic device such as a network camera or a dome camera, or document data generated by an electronic device such as a computer or a mobile terminal, and the details are not limited.
After the data to be transmitted is obtained, the data to be transmitted can be stored in a buffer area of the electronic equipment, the data to be transmitted stored in the buffer area is uploaded to a network, and if the data to be transmitted is uploaded successfully, the data to be transmitted stored in the buffer area is deleted. For example, in an electronic device, a buffer may be quantized and allocated to 42 units, and in an initial state, the structure array pointer corresponding to each unit does not point to any address, and if a unit is occupied, it indicates that the electronic device allocates an address to the unit, and the structure array pointer corresponding to the unit points to the address allocated to the unit. After the data to be transmitted is obtained, the unoccupied cells may be determined in the 42 cells, corresponding addresses are allocated to the determined cells, the data to be transmitted is written into the allocated addresses, and each cell may write a group of data to be transmitted.
In one implementation, whether a Secure Digital Memory Card (SD Card) is installed in a Card slot of an electronic device may be detected, and if yes, the data to be transmitted may be stored in the SD Card after the data to be transmitted is acquired, so as to backup the acquired data to be transmitted.
S102: judging whether the state of the electronic equipment meets the transmission condition or not; wherein the state of the electronic device comprises: network card status and/or remaining capacity status of the buffer; if not, S103 is executed.
Further, whether the state of the electronic equipment meets the transmission condition or not can be judged, if yes, when the electronic equipment uploads the data to be transmitted to the network, the probability of transmission failure is low, data loss is not easy to occur, and under the condition, the data to be transmitted can be uploaded; if the transmission failure rate does not meet the requirement, it is considered that when the electronic device uploads the data to be transmitted to the network, the probability of transmission failure is high, and data loss is easy to occur, in this case, the data to be transmitted is not uploaded first, and S103 is executed.
In one implementation manner, whether the state of the electronic device meets the transmission condition may be determined by the network card state of the electronic device. Specifically, the network card status of the electronic device may be obtained first, where the network card status includes a networking status and a network disconnection status, the networking status indicates that the electronic device is well connected to the network, and the network disconnection status indicates that the electronic device is not well connected to the network, or that the electronic device has been disconnected from the network. It can be understood that when the connection condition of the electronic device and the network is good, the possibility of sending errors of the data to be uploaded is low, and when the connection condition of the electronic device and the network is not good or the electronic device is disconnected from the network, the possibility of sending errors of the data to be uploaded is high. In this case, if the network card status is the networking status, it is determined that the status of the electronic device satisfies the transmission condition, and if the network card status is the disconnection status, it is determined that the status of the electronic device does not satisfy the transmission condition.
Alternatively, in another implementation, whether the state of the electronic device satisfies the transmission condition may be determined by the remaining capacity state of the buffer. The data to be transmitted can be uploaded to the network through the buffer, and after the data to be transmitted is uploaded successfully, the data to be transmitted can be deleted from the buffer, the capacity of the buffer can not be occupied, under the condition, whether the residual capacity is larger than a preset threshold value or not can be judged through acquiring the residual capacity of the buffer, so that whether the data to be transmitted is uploaded to the network in time or not is judged, if the residual capacity in the buffer is not larger than the preset threshold value, it is indicated that the current network transmission speed cannot meet the transmission requirement of the data to be transmitted, and a large amount of data to be transmitted is stored in the buffer and cannot be uploaded to the network in time.
For example, the remaining capacity of the buffer may refer to the remaining amount of the memory of the buffer, for example, if the total memory of the buffer is 128MB and the currently occupied capacity is 100MB, the remaining amount of the memory of the buffer is 28MB. Therefore, whether the residual value of the memory of the buffer area is larger than a preset threshold value or not can be judged, if so, the fact that the data to be transmitted in the buffer area can be uploaded to the network in time is shown, the data to be transmitted uploaded to the network cannot be stored in the buffer area and cannot occupy the capacity of the buffer area is shown, under the condition, the fact that the state of the electronic equipment meets the transmission condition can be judged, if not, the fact that the data to be transmitted in the buffer area cannot be uploaded to the network in time but is stored in the buffer area and occupies the capacity of the buffer area is shown, and under the condition, the fact that the state of the electronic equipment does not meet the transmission condition can be judged.
Or, the remaining capacity of the buffer may refer to a memory threshold of the buffer, where the memory threshold of the buffer is a ratio of the number of remaining units of the buffer to the total number of units of the buffer, for example, if the buffer is quantized and divided into 42 sub-units, each sub-unit can only store one picture, and if 20 pictures are currently stored, the remaining 22 units are not occupied, and the memory threshold of the buffer is 55%. In this way, the memory threshold of the buffer area may also be calculated according to the remaining capacity of the buffer area, and whether the memory threshold is greater than the preset threshold is determined, where the preset threshold may be an empirical value, such as 30%. If the memory threshold is greater than the preset threshold, the number of the unoccupied residual units is enough, that is, the data to be transmitted in the buffer area can be uploaded to the network in time, and under the condition, the state of the electronic equipment can be judged to meet the transmission condition; if the memory threshold is not greater than the preset threshold, it indicates that the number of the unoccupied remaining cells is not enough, that is, the data to be transmitted in the buffer cannot be uploaded to the network in time, and in this case, it may be determined that the state of the electronic device does not satisfy the transmission condition.
In another implementation manner, whether the state of the electronic device meets the transmission condition may be determined by the network card state of the electronic device and the remaining capacity state of the buffer area. Specifically, a network card status of the electronic device may be obtained first, where the network card status includes: a disconnected state or a connected state; if the network card state is the networking state, further acquiring the residual capacity of the buffer area, and judging whether the residual capacity is larger than a preset threshold value; if so, judging that the state of the electronic equipment meets the transmission condition; if not, judging that the state of the electronic equipment does not meet the transmission condition; and if the network card state is the disconnected network state, judging that the state of the electronic equipment does not meet the transmission condition.
Or, the remaining capacity of the buffer area may be obtained first, and whether the remaining capacity is greater than the preset threshold value is judged; if the current network card state is greater than the preset network card state, further acquiring a network card state of the electronic device, wherein the network card state comprises: a disconnected state or a connected state; if the network card state is the networking state, judging that the state of the electronic equipment meets the transmission condition; and if the network card state is a disconnected network state or the residual capacity is not greater than a preset threshold value, judging that the state of the electronic equipment does not meet the transmission condition.
The judgment of the network card status of the electronic device and the residual capacity status of the buffer area can be performed simultaneously or sequentially, and is not limited specifically.
S103: adding a continuous transmission mark for the data to be transmitted as continuous transmission data; and storing the continuous transmission data into the embedded multimedia memory card.
If the state of the electronic device does not meet the transmission condition, a continuous transmission mark can be added to the data to be transmitted to serve as continuous transmission data, and then the continuous transmission data are stored in the EMMC.
In some cases, frequent erasing and writing of the EMMC may affect the system code and configuration file stored in the EMMC, resulting in program exception, and in this case, it may be determined whether to store the resume data in the EMMC according to the state of the EMMC, thereby protecting the EMMC.
Specifically, before the continuous transmission data is stored in the EMMC, the state of the EMMC can be acquired, whether the EMMC reaches an early warning state or not is judged, if the EMMC does not reach the early warning state, the EMMC can be stably used without causing program exception, and then the continuous transmission data is stored in the EMMC; if this is achieved, it is indicated that the EMMC may not be used stably, and even cause program exceptions, in which case the set of resume data may be discarded. The service life of the EMMC can be determined according to the write-in quantity and the amplification factor of the EMMC, whether the service life of the EMMC is smaller than a preset early warning threshold value or not is further judged, if yes, the EMMC is judged to reach an early warning state, and if not, the EMMC is judged not to reach the early warning state.
Specifically, in one implementation, the processor may obtain the used percentage of the EMMC through the extension register, the used percentage of the EMMC recorded in the extension register is divided into 10 levels, and each time a level is reached, the amplification factor may be calculated once, so as to calculate the service life of the EMMC. For example, taking two scenes, namely, a video stored by a network camera or a picture stored by a face snapshot machine as an example, in the two scenes, generally, the amplification factor is relatively stable, and 24 hours of data is used in the calculation, and the service life of the EMMC can be determined by using the following formula:
WAI=EXT_CSD×C×3000/S
LifeTime=(C×3000)/(L×WAI)×24
wherein WAI represents the amplification factor, EXT _ CSD represents the used percentage of EMMC, C represents the total capacity of EMMC, S represents the total bytes written for EMMC, life time represents the life of EMMC, and L represents the write capacity of EMMC in the last 24 hours.
In the case that it is determined that the EMMC reaches the warning state, if it is detected that the SD card is installed in the card slot of the electronic device, that is, the data to be transmitted is backed up in the SD card, in one implementation, a continuous transmission flag may be added to the set of data to be transmitted that is determined as continuous transmission data in the SD card, and if the storage capacity of the SD card also reaches the threshold, the set of continuous transmission data is discarded.
In one implementation, the encryption interface may be invoked to encrypt the resume data, and then the encrypted resume data is stored in the EMMC, so that information leakage in the stored resume data may be reduced.
S104: and if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card.
Generally, when data transmission is performed on electronic equipment through a network, data to be transmitted which are acquired in real time are transmitted first, and when the duration of data transmission which is not performed on the electronic equipment through the network reaches a preset duration, it indicates that the data to be transmitted which are not acquired in real time are transmitted currently, and continuous transmission data stored in an embedded multimedia memory card can be uploaded. The preset threshold may be 30 seconds, or may be other empirical values or preset values, which are not limited specifically.
Specifically, the continuous transmission data stored in the EMMC may be uploaded, and then, whether the continuous transmission data is successfully uploaded is determined, and if the continuous transmission data is successfully uploaded, the continuous transmission flag of the continuous transmission data may be directly deleted, or the continuous transmission flag of the continuous transmission data may be modified into the non-continuous transmission flag.
If the SD card is installed in the electronic equipment and the continuous transmission data is stored in the SD card, the continuous transmission data stored in the SD card can be uploaded, then whether the continuous transmission data is successfully uploaded is judged, and if the continuous transmission data is successfully uploaded, the continuous transmission mark of the continuous transmission data can be deleted or modified into the continuous transmission mark. When the continuous transmission data is uploaded, the continuous transmission data can be uploaded in sequence from morning to evening according to the acquisition time of the continuous transmission data, and the continuous transmission data is not deleted after the continuous transmission data is successfully uploaded, so that the query is facilitated.
For example, in an implementation manner, the data to be transmitted may be face pictures, as shown in fig. 2, the data is in a storage format stored in the EMMC, each group of face pictures is stored in a picture pool allocated to the EMMC, information such as a picture sequence number, a picture alarm type, an alarm time, a picture number, a corresponding picture pool offset start address, a picture pool end address, and the like, and flag information indicating whether the group of picture alarm data is a resume data are recorded in the picture index information, where the flag information is 1 when the group of picture alarm data is the resume data, and the flag information is 0 in an initial state or after the group of picture alarm data is successfully uploaded.
When the continuous transmission data is uploaded, the continuous transmission data can be uploaded from the morning to the evening according to the acquisition time of the continuous transmission data, the continuous transmission data can not be deleted after the continuous transmission data is successfully uploaded, and when new continuous transmission data is stored in the EMMC, the oldest stored continuous transmission data in the EMMC can be directly covered.
Further, if the continuous transmission data is encrypted when the continuous transmission data is stored in the EMMC, the decryption interface needs to be called to decrypt the stored continuous transmission data when the continuous transmission data is uploaded, and the decrypted continuous transmission data is uploaded.
As can be seen from the above, in the disconnected network continuous transmission method provided in the embodiment of the present invention, by determining whether the state of the electronic device satisfies the transmission condition, if not, a continuous transmission flag is added to the data to be transmitted, and the data to be transmitted is used as continuous transmission data and stored in the embedded multimedia memory card; if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card; wherein the state of the electronic device comprises: the network card state and/or the residual capacity state of the buffer area, wherein the network card state can reflect whether the electronic equipment is networked, the residual capacity state of the buffer area reflects the data volume of the data to be transmitted which is not uploaded in the buffer area, and if the residual capacity of the buffer area is larger, the current network transmission speed is reflected to be slower, and the transmission requirement of the data cannot be met; therefore, when the state of the electronic equipment does not meet the transmission condition, the data to be transmitted is determined as the data to be continuously transmitted, and the data to be transmitted is uploaded again after a period of time, rather than being directly transmitted under the condition that the electronic equipment is not networked or the network transmission speed is low, so that the data loss is reduced.
As shown in fig. 3, a schematic flow chart of another method for resuming network transmission on a disconnected network according to an embodiment of the present invention is applied to an electronic device with an embedded multimedia memory card installed therein, and includes the following steps:
s301: and acquiring data to be transmitted, and storing the data to be transmitted to a buffer area.
The data to be transmitted is data to be uploaded to a network by the electronic device, for example, the data to be transmitted may be video data acquired by an electronic device such as a network camera or a dome camera, or document data generated by an electronic device such as a computer or a mobile terminal, and the details are not limited.
Generally, after obtaining the data to be transmitted, the data to be transmitted may be stored in a buffer of the electronic device, and then the data to be transmitted stored in the buffer is uploaded to the network, and if the data to be transmitted is uploaded successfully, the data to be transmitted stored in the buffer is deleted. For example, in an electronic device, a buffer may be quantized and allocated to 42 units, and in an initial state, a pointer of a structure array corresponding to each unit does not point to any address, and if a unit is occupied, it indicates that the electronic device allocates an address to the unit, and a pointer of a structure array corresponding to the unit points to the address allocated to the unit. After the data to be transmitted is obtained, the unoccupied cells may be determined in the 42 cells, corresponding addresses are allocated to the determined cells, the data to be transmitted is written into the allocated addresses, and each cell may write a group of data to be transmitted.
S302: and storing the data to be transmitted into the secure data memory card.
In an implementation manner, whether a Secure Digital Memory Card (Secure Digital Memory Card) is installed in a Card slot of an electronic device may be detected, and if so, data to be transmitted may be stored in the SD Card after the data to be transmitted is acquired, so that the acquired data to be transmitted is backed up.
S303: acquiring the network card status of the electronic device, if the network card status is the networking status, executing S304, and if the network card status is the network disconnection status, executing S305.
Specifically, the network card status may be obtained first, where the network card status includes a networking status and a network disconnection status, the networking status indicates that the connection condition of the electronic device and the network is good, and the network disconnection status indicates that the connection condition of the electronic device and the network is not good, or that the electronic device has been disconnected from the network. It can be understood that when the connection condition of the electronic device and the network is good, the possibility of sending errors of the uploaded data to be transmitted is low, and when the connection condition of the electronic device and the network is not good or the electronic device is disconnected from the network, the possibility of sending errors of the uploaded data to be transmitted is high. In this case, if the network card status is the networking status, it is determined that the status of the electronic device satisfies the transmission condition, and if the network card status is the disconnection status, it is determined that the status of the electronic device does not satisfy the transmission condition.
S304: acquiring the residual capacity of the buffer area, and judging whether the residual capacity is greater than a preset threshold value; if the number is larger than the preset value, transmitting data to be transmitted; if not, S305 is executed.
The data to be transmitted can be uploaded to the network through the buffer, and after the data to be transmitted is uploaded successfully, the data to be transmitted can be deleted from the buffer, the capacity of the buffer can not be occupied, under the condition, whether the residual capacity is larger than a preset threshold value or not can be judged through acquiring the residual capacity of the buffer, so that whether the data to be transmitted is uploaded to the network in time or not is judged, if the residual capacity in the buffer is not larger than the preset threshold value, it is indicated that the current network transmission speed cannot meet the transmission requirement of the data to be transmitted, and a large amount of data to be transmitted is stored in the buffer and cannot be uploaded to the network in time.
For example, the remaining capacity of the buffer may refer to the remaining amount of the memory of the buffer, for example, if the total memory of the buffer is 128MB and the currently occupied capacity is 100MB, the remaining amount of the memory of the buffer is 28MB. Therefore, whether the residual value of the memory of the buffer area is larger than a preset threshold value or not can be judged, if so, the data to be transmitted in the buffer area can be timely uploaded to the network under the current network state, the data to be transmitted uploaded to the network cannot be stored in the buffer area, and the capacity of the buffer area cannot be occupied.
Or, the remaining capacity of the buffer may refer to a memory threshold of the buffer, where the memory threshold of the buffer is a ratio of the number of remaining units of the buffer to the total number of units of the buffer, for example, if the buffer is quantized and divided into 42 sub-units, each sub-unit can only store one picture, and if 20 pictures are currently stored, the remaining 22 units are not occupied, and the memory threshold of the buffer is 55%. In this way, the memory threshold of the buffer area may also be calculated according to the remaining capacity of the buffer area, and whether the memory threshold is greater than the preset threshold is determined, where the preset threshold may be an empirical value, such as 30%. If the memory threshold is greater than the preset threshold, the number of the unoccupied residual units is enough, that is, the data to be transmitted in the buffer area can be uploaded to the network in time, and under the condition, the state of the electronic equipment can be judged to meet the transmission condition; if the memory threshold is not greater than the preset threshold, it indicates that the number of the unoccupied remaining cells is not enough, that is, the data to be transmitted in the buffer cannot be uploaded to the network in time, and in this case, it may be determined that the state of the electronic device does not satisfy the transmission condition.
S305: judging whether the embedded multimedia memory card reaches an early warning state or not; if so, executing S307; if not, go to step S306.
In some cases, frequent erasing of the EMMC may affect critical system code and configuration files stored in the EMMC, resulting in program exception, and in this case, it may be determined whether to store the resume data in the EMMC according to the state of the EMMC, thereby protecting the EMMC.
The service life of the EMMC can be determined according to the write-in quantity and the amplification factor of the EMMC, whether the service life of the EMMC is smaller than a preset early warning threshold value or not is further judged, if yes, the EMMC is judged to be in an early warning state, and if not, the EMMC is judged not to be in the early warning state.
Specifically, in one implementation, the used percentage of the EMMC may be obtained through an extension register, the used percentage of the EMMC recorded in the extension register is divided into 10 levels, and each time a level is reached, an amplification factor may be calculated once, so as to calculate the service life of the EMMC. For example, taking two scenes, i.e., a video stored in a network camera or a picture stored in a face capture machine as an example, in the two scenes, generally, the amplification factor is relatively stable, 24 hours of data is used in calculation, and the service life of the EMMC can be determined by using the following formula:
WAI=EXT_CSD×C×3000/S
LifeTime=(C×3000)/(L×WAI)×24
where WAI represents the amplification factor, EXT _ CSD represents the percentage of EMMC that has been used, C represents the total capacity of EMMC, S represents the total bytes written for EMMC, life represents the life of EMMC, and L represents the amount of EMMC that has been written for the last 24 hours.
S306: adding a continuous transmission mark for the data to be transmitted as continuous transmission data; and storing the continuous transmission data into the embedded multimedia memory card.
In this case, the state of the electronic device does not satisfy the transmission condition, and then, a resume flag may be added to the data to be transmitted as resume data, and then, the resume data may be stored in the EMMC.
In one implementation, the encryption interface may be invoked to encrypt the resume data, and then the encrypted resume data is stored in the EMMC, so that information leakage in the stored resume data may be reduced.
S307: in the secure data memory card, a continuous transmission mark is added to the data to be transmitted.
In this case, it indicates that the EMMC may not be stably used, and even cause a program exception, whether an SD card is installed in the card slot of the electronic device may be detected, and if so, a resume flag may be added to the set of to-be-transmitted data stores determined as resume data in the SD card, and if not installed or the storage capacity of the SD card has also reached a threshold, the set of resume data is discarded.
S308: and if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card.
Generally, when data transmission is performed on electronic equipment through a network, data to be transmitted which are acquired in real time are transmitted first, and when the duration of data transmission which is not performed on the electronic equipment through the network reaches a preset duration, it indicates that the data to be transmitted which are not acquired in real time are transmitted currently, and the data to be transmitted stored in the embedded multimedia memory card can be uploaded. The preset threshold may be 30 seconds, or may be other empirical values or preset values, which are not limited specifically.
Specifically, the continuous transmission data stored in the EMMC may be uploaded, and then, whether the continuous transmission data is successfully uploaded is determined, and if the continuous transmission data is successfully uploaded, the continuous transmission flag of the continuous transmission data may be directly deleted, or the continuous transmission flag of the continuous transmission data may be modified into the non-continuous transmission flag.
If the electronic device is provided with the SD card and the continuous transmission data is stored in the SD card, the continuous transmission data stored in the SD card can be uploaded, then whether the continuous transmission data is uploaded successfully or not is judged, and if the continuous transmission data is uploaded successfully, the continuous transmission mark of the continuous transmission data can be deleted or modified into the non-continuous transmission mark. When the continuously transmitted data are uploaded, the continuously transmitted data can be uploaded in sequence from morning to evening according to the acquisition time of the continuously transmitted data, and after the continuously transmitted data are successfully uploaded, the continuously transmitted data are not deleted, so that query is facilitated.
When the continuous transmission data is uploaded, the continuous transmission data can be uploaded from the morning to the evening according to the acquisition time of the continuous transmission data, the continuous transmission data can not be deleted after the continuous transmission data is successfully uploaded, and when new continuous transmission data is stored in the EMMC, the oldest stored continuous transmission data in the EMMC can be directly covered.
Further, if the continuous transmission data is encrypted when being stored in the EMMC, the decryption interface needs to be called to decrypt the stored continuous transmission data when the continuous transmission data is uploaded, and the decrypted continuous transmission data is uploaded.
As can be seen from the above, in the method for resuming transmission in a disconnected network provided in the embodiment of the present invention, by determining whether the state of the electronic device satisfies the transmission condition, if not, adding a resume mark to the data to be transmitted, and storing the resume data in the embedded multimedia memory card as resume data; if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card; wherein the state of the electronic device includes: the network card state and/or the residual capacity state of the buffer area, wherein the network card state can reflect whether the electronic equipment is networked, the residual capacity state of the buffer area reflects the data volume of the data to be transmitted which is not uploaded in the buffer area, and if the residual capacity of the buffer area is larger, the current network transmission speed is reflected to be slower, and the transmission requirement of the data cannot be met; therefore, when the state of the electronic equipment does not meet the transmission condition, the data to be transmitted is determined as the data to be continuously transmitted, and the data to be transmitted is uploaded again after a period of time, rather than being directly transmitted under the condition that the electronic equipment is not networked or the network transmission speed is low, so that the data loss is reduced.
An embodiment of the present invention further provides a device for resuming from a disconnected network, which is applied to an electronic device, and as shown in fig. 4, the device for resuming from a disconnected network provided in an embodiment of the present invention is schematically configured, and the device includes:
a data obtaining module 410, configured to obtain data to be transmitted, and store the data to be transmitted in a buffer;
a state determining module 420, configured to determine whether a state of the electronic device satisfies a transmission condition; if not, triggering the continuous transmission data storage module 430; wherein the state of the electronic device comprises: network card status and/or remaining capacity status of the buffer;
the continuous transmission data storage module 430 is configured to add a continuous transmission mark to the data to be transmitted, and use the continuous transmission mark as continuous transmission data; storing the continuous transmission data into the embedded multimedia memory card;
the resume data uploading module 440 is configured to upload the resume data stored in the embedded multimedia memory card if the duration that the electronic device does not perform data transmission through the network reaches the preset duration.
In one implementation, the state determining module 420 includes:
the first network card status determining submodule 421, configured to obtain a network card status of the electronic device; if the network card state is a networking state, judging that the state of the electronic equipment meets a transmission condition; and if the network card state is the disconnected network state, judging that the state of the electronic equipment does not meet the transmission condition.
In one implementation, the state determining module 420 includes:
a first remaining capacity determining submodule 422, configured to obtain a remaining capacity of the buffer area, and determine whether the remaining capacity is greater than a preset threshold; if so, judging that the state of the electronic equipment meets the transmission condition; and if not, judging that the state of the electronic equipment does not meet the transmission condition.
In one implementation, the state determining module 420 includes:
the second network card status determining submodule 423 is configured to obtain a network card status of the electronic device, where the network card status includes: a disconnected state or a connected state; if the network card state is the disconnected state, judging that the state of the electronic equipment does not meet the transmission condition; if the network card state is the networking state, triggering a second residual capacity judgment submodule;
the second remaining capacity determining submodule 424 is configured to obtain the remaining capacity of the buffer, and determine whether the remaining capacity is greater than a preset threshold; if so, judging that the state of the electronic equipment meets the transmission condition; and if not, judging that the state of the electronic equipment does not meet the transmission condition.
In one implementation manner, the data obtaining module 410 is further configured to detect whether a secure data memory card is installed in a card slot of the electronic device; and if so, backing up the data to be transmitted to the safety data memory card.
In one implementation, the continuous transmission data storage module 430 is further configured to trigger the early warning state determination module 450;
the early warning state judgment module 450 is configured to obtain, by the processor, a used percentage of the embedded multimedia memory card from the extended register, and calculate a write amount of the embedded multimedia memory card; determining the service life of the embedded multimedia memory card according to the used percentage and the write-in quantity of the embedded multimedia memory card; and if the service life is longer than a preset early warning threshold value, judging that the embedded multimedia memory card does not reach an early warning state, and executing the step of storing the continuous transmission data into the embedded multimedia memory card.
In one implementation, the early warning state determining module 450 is specifically configured to:
determining the service life of the embedded multimedia memory card according to the used percentage and the write-in quantity of the embedded multimedia memory card by using the following formula:
WAI=EXT_CSD×C×3000/S
LifeTime=(C×3000)/(L×WAI)×24
wherein WAI represents an amplification factor, EXT _ CSD represents the used percentage of the embedded multimedia memory card, C represents the total capacity of the embedded multimedia memory card, S represents the total bytes of writing of the embedded multimedia memory card, life time represents the service life of the embedded multimedia memory card, and L represents the writing amount of the embedded multimedia memory card in the last 24 hours.
In one implementation, the continuous transmission data storage module 430 is specifically configured to:
encrypting the continuous transmission data, and storing the encrypted continuous transmission data into the embedded multimedia memory card;
the continuous transmission data uploading module 440 is specifically configured to:
and decrypting the continuous transmission data stored in the embedded multimedia memory card, and uploading the decrypted continuous transmission data.
In one implementation, the apparatus further includes:
and a mark modification module 460, configured to modify the continuous transmission mark of the continuous transmission data into a non-continuous transmission mark if the continuous transmission data is successfully uploaded.
As can be seen from the above, the disconnected network continuous transmission device provided in the embodiment of the present invention, by determining whether the state of the electronic device satisfies the transmission condition, if not, adds a continuous transmission flag to the data to be transmitted, and stores the continuous transmission data in the embedded multimedia memory card as the continuous transmission data; if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card; wherein the state of the electronic device includes: the network card state and/or the residual capacity state of the buffer area, wherein the network card state can reflect whether the electronic equipment is networked, the residual capacity state of the buffer area reflects the data volume of the data to be transmitted which is not uploaded in the buffer area, and if the residual capacity of the buffer area is larger, the current network transmission speed is reflected to be slower, and the transmission requirement of the data cannot be met; therefore, when the state of the electronic equipment does not meet the transmission condition, the data to be transmitted is determined as the data to be continuously transmitted, and the data to be transmitted is uploaded again after a period of time, rather than being directly transmitted under the condition that the electronic equipment is not networked or the network transmission speed is low, so that the data loss is reduced.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the following steps when executing the program stored in the memory 503:
acquiring data to be transmitted, and storing the data to be transmitted to a buffer area;
judging whether the state of the electronic equipment meets a transmission condition or not; wherein the state of the electronic device comprises: network card status and/or buffer remaining capacity status;
if the transmission data does not meet the requirement, adding a continuous transmission mark for the data to be transmitted as continuous transmission data;
storing the continuous transmission data into the embedded multimedia memory card;
and if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
As can be seen from the above, in the method for resuming transmission in a disconnected network provided in the embodiment of the present invention, by determining whether the state of the electronic device satisfies the transmission condition, if not, adding a resume mark to the data to be transmitted, and storing the resume data in the embedded multimedia memory card as resume data; if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card; wherein the state of the electronic device comprises: the network card state and/or the residual capacity state of the buffer area, wherein the network card state can reflect whether the electronic equipment is networked, the residual capacity state of the buffer area reflects the data volume of the data to be transmitted which is not uploaded in the buffer area, and if the residual capacity of the buffer area is larger, the current network transmission speed is reflected to be slower, and the transmission requirement of the data cannot be met; therefore, when the state of the electronic equipment does not meet the transmission condition, the data to be transmitted is determined as the data to be continuously transmitted, and the data to be transmitted is uploaded again after a period of time, rather than being directly transmitted under the condition that the electronic equipment is not networked or the network transmission speed is low, so that the data loss is reduced.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the computer-readable storage medium runs on a computer, the computer is caused to execute the method for resuming a network interruption described in any one of the above embodiments.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer, causes the computer to perform the method of blackout continuation as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, the electronic device embodiment and the storage medium embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and in relation to the description, reference may be made to some portions of the description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A disconnected network continuous transmission method is applied to electronic equipment, wherein an embedded multimedia memory card is installed on the electronic equipment, and the method comprises the following steps:
acquiring data to be transmitted, and storing the data to be transmitted to a buffer area;
judging whether the state of the electronic equipment meets a transmission condition or not; wherein the state of the electronic device comprises: network card status and/or remaining capacity status of the buffer;
if the data to be transmitted does not meet the requirement, adding a continuous transmission mark for the data to be transmitted as continuous transmission data;
storing the continuous transmission data into the embedded multimedia memory card;
if yes, transmitting the data to be transmitted which is acquired in real time; and if the duration that the electronic equipment does not transmit data through the network reaches the preset duration, uploading the continuous transmission data stored in the embedded multimedia memory card.
2. The method of claim 1, wherein the determining whether the state of the electronic device satisfies a transmission condition comprises:
acquiring a network card state of the electronic device, wherein the network card state comprises: a disconnected state or a connected state;
if the network card state is a networking state, judging that the state of the electronic equipment meets a transmission condition;
and if the network card state is the disconnected network state, judging that the state of the electronic equipment does not meet the transmission condition.
3. The method of claim 1, wherein the determining whether the state of the electronic device satisfies a transmission condition comprises:
acquiring the residual capacity of the buffer area, and judging whether the residual capacity is larger than a preset threshold value;
if so, judging that the state of the electronic equipment meets the transmission condition;
and if not, judging that the state of the electronic equipment does not meet the transmission condition.
4. The method of claim 1, wherein the determining whether the state of the electronic device satisfies a transmission condition comprises:
acquiring a network card state of the electronic device, wherein the network card state comprises: a disconnected state or a connected state;
if the network card state is a networking state, acquiring the residual capacity of the buffer area, and judging whether the residual capacity is larger than a preset threshold value; if so, judging that the state of the electronic equipment meets the transmission condition; if not, judging that the state of the electronic equipment does not meet the transmission condition;
and if the network card state is the disconnected network state, judging that the state of the electronic equipment does not meet the transmission condition.
5. The method of claim 1, wherein after the obtaining the data to be transmitted and storing the data to be transmitted in a buffer, the method further comprises:
detecting whether a safety data memory card is installed in a card slot of the electronic equipment or not;
if yes, the data to be transmitted are backed up to the safety data memory card.
6. The method of claim 5, wherein prior to said storing said resume data in the embedded multimedia memory card, said method further comprises:
the processor acquires the used percentage of the embedded multimedia storage card from the expansion register and calculates the write-in quantity of the embedded multimedia storage card;
determining the service life of the embedded multimedia memory card according to the used percentage and the write-in quantity of the embedded multimedia memory card;
and if the service life is longer than a preset early warning threshold value, judging that the embedded multimedia memory card does not reach an early warning state, and executing the step of storing the continuous transmission data into the embedded multimedia memory card.
7. The method as claimed in claim 6, wherein the usage life of the embedded multimedia memory card is determined according to the percentage of usage and the writing amount of the embedded multimedia memory card by using the following formula:
WAI=EXT_CSD×C×3000/S
LifeTime=(C×3000)/(L×WAI)×24
wherein WAI represents an amplification factor, EXT _ CSD represents the used percentage of the embedded multimedia memory card, C represents the total capacity of the embedded multimedia memory card, S represents the total bytes of writing of the embedded multimedia memory card, life time represents the service life of the embedded multimedia memory card, and L represents the writing amount of the embedded multimedia memory card in the last 24 hours.
8. The method of claim 1, wherein storing the resume data in an embedded multimedia memory card comprises:
encrypting the continuous transmission data, and storing the encrypted continuous transmission data into the embedded multimedia memory card;
the uploading of the continuous transmission data stored in the embedded multimedia memory card comprises the following steps:
and decrypting the continuous transmission data stored in the embedded multimedia memory card, and uploading the decrypted continuous transmission data.
9. The method according to any one of claims 1 to 8, wherein after the uploading of the resume data stored in the embedded multimedia memory card, the method further comprises:
if the continuously transmitted data are uploaded successfully, the continuously transmitted mark of the continuously transmitted data is changed into a non-continuously transmitted mark.
10. A disconnected network continuous transmission device is characterized in that the disconnected network continuous transmission device is applied to electronic equipment, an embedded multimedia memory card is installed on the electronic equipment, and the disconnected network continuous transmission device comprises:
the data acquisition module is used for acquiring data to be transmitted and storing the data to be transmitted to a buffer area;
the state judgment module is used for triggering the continuous transmission data storage module when judging that the state of the electronic equipment does not meet the transmission condition; the transmission condition is that the electronic equipment is in a networking state and the residual capacity of the buffer area is larger than a preset threshold value;
the continuous transmission data storage module is used for adding a continuous transmission mark for the data to be transmitted as continuous transmission data; storing the continuous transmission data into the embedded multimedia memory card;
and the continuous transmission data uploading module is used for uploading continuous transmission data stored in the embedded multimedia memory card if the duration that the electronic equipment does not perform data transmission through the network reaches the preset duration.
CN201811270778.9A 2018-10-29 2018-10-29 Method and device for continuous transmission in broken network Active CN111107123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811270778.9A CN111107123B (en) 2018-10-29 2018-10-29 Method and device for continuous transmission in broken network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811270778.9A CN111107123B (en) 2018-10-29 2018-10-29 Method and device for continuous transmission in broken network

Publications (2)

Publication Number Publication Date
CN111107123A CN111107123A (en) 2020-05-05
CN111107123B true CN111107123B (en) 2022-10-04

Family

ID=70419522

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811270778.9A Active CN111107123B (en) 2018-10-29 2018-10-29 Method and device for continuous transmission in broken network

Country Status (1)

Country Link
CN (1) CN111107123B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112203050B (en) * 2020-09-30 2022-09-06 普联技术有限公司 Method and device for continuously transmitting video
CN112512016A (en) * 2021-02-05 2021-03-16 智道网联科技(北京)有限公司 Data transmission method, device and system based on intelligent traffic and storage medium
CN114281724B (en) * 2021-12-10 2024-01-02 深圳市欧瑞博科技股份有限公司 Data transmission method and device and electronic equipment
CN114666322A (en) * 2022-03-22 2022-06-24 通号智慧城市研究设计院有限公司 Breakpoint resume method and device and electronic equipment
US20240020017A1 (en) * 2022-03-24 2024-01-18 Qisda (Suzhou) Co., Ltd. Monitoring method and apparatus for electronic device, and electronic device
CN115037786B (en) * 2022-08-09 2022-11-01 北京航天驭星科技有限公司 Method for improving data transmission efficiency and related equipment
CN116347435B (en) * 2023-01-05 2024-01-23 深圳市昂星科技有限公司 Driving data acquisition method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102811344A (en) * 2011-12-08 2012-12-05 苏州科达科技有限公司 Control method and device for improving storage stability in video monitoring system
CN103546536A (en) * 2013-08-28 2014-01-29 北京清控人居环境研究院有限公司 Internet of things system of sewage treatment plant

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4341616B2 (en) * 2005-12-02 2009-10-07 ソニー株式会社 Network camera system and network camera control program
CN103136160B (en) * 2011-12-01 2016-06-29 中车青岛四方机车车辆股份有限公司 Buffer memory continuous transmission method and the system of data break point is transmitted between railway vehicle device
US10122640B2 (en) * 2015-01-26 2018-11-06 LiveQoS Inc. Minimal buffer network arbiter
CN106790445A (en) * 2016-12-02 2017-05-31 乐视控股(北京)有限公司 Data transmission method, device and electronic equipment based on Samba agreements
CN107451268B (en) * 2017-08-03 2020-12-15 爱普(福建)科技有限公司 Real-time database-oriented method for continuous transmission in disconnected network
CN107846309A (en) * 2017-10-20 2018-03-27 深圳益邦阳光有限公司 Suspension data forward method, electronic equipment and storage medium based on remote monitoring

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102811344A (en) * 2011-12-08 2012-12-05 苏州科达科技有限公司 Control method and device for improving storage stability in video monitoring system
CN103546536A (en) * 2013-08-28 2014-01-29 北京清控人居环境研究院有限公司 Internet of things system of sewage treatment plant

Also Published As

Publication number Publication date
CN111107123A (en) 2020-05-05

Similar Documents

Publication Publication Date Title
CN111107123B (en) Method and device for continuous transmission in broken network
CN102541689B (en) Protecting data during different connectivity states
CN111913667B (en) OSD blocking detection method, system, terminal and storage medium based on Ceph
CN112988683A (en) Data processing method and device, electronic equipment and storage medium
CN109496292B (en) Disk management method, disk management device and electronic equipment
TW201447826A (en) Security monitoring device with network and record function and failure detecting and repairing method for storage device thereof
US20140109242A1 (en) Data protecting method, mobile communication device, and memory storage device
US11755447B2 (en) Predictive performance indicator for storage devices
KR100812332B1 (en) Apparatus and Method for managing Contents
CN110221932B (en) Computer and control method thereof
CN116820898B (en) Method and system for monitoring running state of eMMC and computer readable storage medium
CN105453518B (en) Synchronization of metering networks
KR100923456B1 (en) Apparatus and method for managementing digital right management contents in portable terminal
US11106779B2 (en) Method and system for improved data control and access
CN115407943A (en) Memory dump file generation method, device and equipment and readable storage medium
US10216456B2 (en) Estimating mount time completion in file systems
US9053006B2 (en) Method for memory management
CN113485872A (en) Fault processing method and device and distributed storage system
CN111008389B (en) Data processing method and device based on file system in satellite
CN109426589B (en) File repair method and device
US10956080B2 (en) Erasure of data from a memory of a data storage apparatus by identifying available free space in the memory and iteratively writing a sequence of files decreasing size to the memory using a file-based protocol
CN113467698A (en) Writing method and device based on file system, computer equipment and storage medium
CN111625502A (en) Data reading method and device, storage medium and electronic device
CN108664366B (en) Data transmission method and device and server
CN111488315A (en) Data storage method and device, electronic equipment and readable 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