Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The data transmission method, device, computer equipment and computer readable storage medium provided by the embodiment of the application aim at solving the technical problem that in the traditional technology, the wearable equipment is easy to generate unstable transmission such as data loss in the process of transmitting various acquired data to a user terminal. The following will specifically describe the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems by means of examples and with reference to the accompanying drawings. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
The data transmission method provided by the embodiment of the present application may be applied to an application environment as shown in fig. 1, specifically, to the user terminal 101. As shown in fig. 1, if the user terminal 101 detects that the wearable device 102 is online, detecting whether the data transmission rate between the user terminal 101 and the wearable device 102 is lower than a preset threshold; if the data transmission rate is not lower than the preset threshold, the user terminal 101 controls the wearable device 102 to send video data and positioning information to the user terminal 101; if the data transmission rate is lower than the preset threshold, the user terminal 101 controls the wearable device 102 to send positioning information to the user terminal 101, and prohibits the wearable device 102 from sending video data to the user terminal 101. The user terminal 101 may be, but is not limited to, a smart phone, a tablet computer, and a portable wearable device. It can be understood that the data transmission method provided in the method embodiment described below may also be applied to a server, and may also be applied to a system including a user terminal and a server, and implemented through interaction between the user terminal and the server.
It should be noted that, in the data transmission method provided in the embodiment of the present application, the execution body may be a data transmission device, and the data transmission device may be implemented as part or all of the user terminal by software, hardware, or a combination of software and hardware. In the following method embodiments, the execution subject is a user terminal as an example.
Fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application. The embodiment relates to a specific implementation process of controlling transmission data by a user terminal according to a data transmission rate with a wearable device. As shown in fig. 2, the data transmission method of the present embodiment may include the steps of:
step S100, if the wearable device is detected to be online, detecting whether the data transmission rate between the user terminal and the wearable device is lower than a preset threshold value.
In this embodiment, the wearable device may be a neck massager, an eye massager, or other wearable massage devices, and in other embodiments, the wearable device may also be other wearable electronic devices with data acquisition functions, which is not limited herein.
If the user terminal detects that the wearable device is online, that is, the user terminal and the wearable device can normally perform data transmission, the user terminal detects whether the data transmission rate between the user terminal and the wearable device is lower than a preset threshold, and as an implementation mode, the user terminal can detect the data transmission rate between the user terminal and the wearable device through a pre-written rate detection program or through rate detection software installed by the user terminal.
The user terminal compares the detected data transmission rate between the user terminal and the wearable device with a preset threshold, and the preset threshold can be set automatically according to actual requirements when in implementation, for example, the user terminal can set the data transmission rate capable of ensuring smooth receiving of video data as the preset threshold, which is not particularly limited herein.
Step S200, if the data transmission rate is not lower than the preset threshold, controlling the wearable device to send video data and positioning information to the user terminal.
In this embodiment, if the user terminal detects that the data transmission rate between the user terminal and the wearable device is not lower than the preset threshold, the user terminal indicates that the data transmission environment between the user terminal and the wearable device is good, the data transmission rate can meet the transmission requirement of video data, and the user terminal controls the wearable device to send the video data and positioning information to the user terminal.
As an implementation manner, when detecting that the data transmission rate between the user terminal and the wearable device is not lower than the preset threshold, the user terminal may send an instruction to the wearable device to instruct the wearable device to send video data and positioning information to the user terminal.
In this embodiment, the positioning information may be current position information of the wearable device, the video data may be usage video data of the wearable device acquired by the video acquisition device, and the video acquisition device may be disposed in the wearable device, or may be separately disposed and in communication connection with the wearable device, which is not specifically limited herein; the user terminal can monitor the use standard condition of the wearable equipment and the use safety condition of the user through the video data, and the like.
Step S300, if the data transmission rate is lower than a preset threshold, the wearable device is controlled to send positioning information to the user terminal, and the wearable device is prohibited from sending video data to the user terminal.
If the user terminal detects that the data transmission rate between the user terminal and the wearable device is lower than the preset threshold, the user terminal indicates that the data transmission environment between the user terminal and the wearable device is poor, and smooth receiving of video data cannot be ensured.
As an implementation manner, when the user terminal detects that the data transmission rate between the user terminal and the wearable device is lower than a preset threshold, the user terminal can send an instruction to the wearable device to instruct the wearable device to send only positioning information to the user terminal but not video data, so that when the data transmission rate between the user terminal and the wearable device is lower than the preset threshold, the positioning information of the wearable device is kept to be received, and basic position management of the wearable device is realized; when the data transmission rate between the user terminal and the wearable device is not lower than the preset threshold, the video data can be connected, and the wearable device is subjected to more refined use management, so that reasonable and efficient utilization of the data transmission rate is realized.
In this embodiment, as an implementation manner, the user terminal may periodically detect whether the data transmission rate between the user terminal and the wearable device is lower than a preset threshold, that is, the user terminal detects whether the data transmission rate between the user terminal and the wearable device is lower than the preset threshold according to a preset time period, so that the user terminal may implement dynamic data transmission control according to the change of the data transmission rate between the user terminal and the wearable device, ensure smooth transmission of transmission data, and avoid the problem of unstable data transmission between the user terminal and the wearable device.
In the embodiment, if the wearable device is detected to be online, whether the data transmission rate between the user terminal and the wearable device is lower than a preset threshold value or not is detected; if the data transmission rate is not lower than the preset threshold, controlling the wearable device to send video data and positioning information to the user terminal; if the data transmission rate is lower than a preset threshold, controlling the wearable device to send positioning information to the user terminal, and prohibiting the wearable device from sending video data to the user terminal; therefore, when the data transmission rate between the user terminal and the wearable equipment meets the requirement, namely is not lower than a preset threshold value, the user terminal receives video data and positioning information; when the data transmission rate between the user terminal and the wearable device is lower than a preset threshold, the user terminal only keeps receiving the positioning information of the wearable device, so that video jamming or data loss caused by accessing video data when the data transmission rate is lower is avoided, the stability of data transmission between the wearable device and the user terminal is improved, and the efficient utilization of data transmission resources is realized.
Fig. 3 is a flowchart of a data transmission method according to another embodiment. On the basis of the embodiment shown in fig. 2, as shown in fig. 3, the data transmission method of this embodiment further includes, after step S200, step S410, step S420 and step S430, specifically:
In step S410, it is detected whether or not the video frame in the video data has a black screen phenomenon, and the video frame having the black screen phenomenon is taken as a target frame.
In this embodiment, after receiving video data sent by the wearable device, the user terminal detects whether a video frame in the video data has a black screen phenomenon, and if the video frame is detected to have the black screen phenomenon, the video frame having the black screen phenomenon is taken as a target frame.
In actual video compression, various algorithms are adopted to reduce the data capacity, for example, in the MPEG (Moving Picture Experts Group ) encoding process, the pictures (i.e. frames) of the video data are divided into I, P, B three types, I is a key frame, P is a differential frame, B is a bidirectional differential frame, I frame is the complete reservation of the picture of the present frame, P frame represents the difference between the present frame and the previous key frame (or P frame), and B frame records the difference between the present frame and the previous and subsequent frames. In this embodiment, for example, the video data includes consecutive video frames: ipbpbbpipbppbpipb.
In step S420, it is detected whether the similarity between the key frame of the first frame and the key frame of the second frame is greater than a first similarity threshold.
The key frame of the first frame, the key frame of the second frame, and the target frame are sequentially adjacent in time sequence.
In this embodiment, to more clearly illustrate the time sequence relationship between the key frame of the first frame, the key frame of the second frame, and the target frame, the above example is continued, for example, the video data includes consecutive video frames as follows: ipbpbbpipbppbpippb, in the video data, if a key frame of a first frame is a first I frame of all key frames in the video data, the key frame of a second frame is a second I frame of all key frames in the video data, and the target frame is a third I frame of all key frames in the video data; if the key frame of the first frame is the second I frame of all key frames in the video data, the key frame of the second frame is the third I frame of all key frames in the video data, the target frame is the fourth I frame of all key frames in the video data, and so on. Namely, every two of the key frame of the first frame, the key frame of the second frame and the target frame are provided with P frames and/or B frames, but no other key frame exists between the key frame of the first frame and the key frame of the second frame and between the key frame of the second frame and the target frame, and the key frame of the first frame, the key frame of the second frame and the target frame are sequentially adjacent in time sequence of the key frames.
In this embodiment, as an implementation manner, the user terminal may set a cloud memory and a cloud comparator, and the video data is stored in the cloud memory, where the video data may be uploaded to the cloud memory by the user terminal or may be uploaded to the cloud memory by the wearable device, which is not limited herein. If the user terminal detects that the target frame in the video data has a black screen phenomenon, the similarity between the key frame of the first frame and the key frame of the second frame is detected through the cloud comparator.
The user terminal obtains a detection result of the cloud comparator, namely, the similarity between the key frame of the first frame and the key frame of the second frame, and then detects whether the similarity between the key frame of the first frame and the key frame of the second frame is larger than a first similarity threshold value or not; for example, the similarity between the key frame of the first frame and the key frame of the second frame detected by the cloud comparator is 96%, the first similarity threshold is set to 95% in this embodiment, and the user terminal can determine that the similarity between the key frame of the first frame and the key frame of the second frame is greater than the first similarity threshold by comparing the similarity between the key frame of the first frame and the key frame of the second frame with the first similarity threshold. In other embodiments, the first similarity threshold may be set according to the actual implementation situation.
In other embodiments, as an implementation manner, the user terminal may further extract a color histogram of a key frame of the first frame and a color histogram of a key frame of the second frame, and obtain a similarity between the key frame of the first frame and the key frame of the second frame by comparing the color histogram of the key frame of the first frame and the color histogram of the key frame of the second frame, where the color histogram describes a proportion of different colors in the entire image.
In step S430, if the similarity between the key frame of the first frame and the key frame of the second frame is greater than the first similarity threshold, the key frame of the target frame is replaced with the key frame of the second frame.
If the user terminal detects that the similarity between the key frame of the first frame and the key frame of the second frame is larger than the first similarity threshold, the key frame of the second frame is called from the cloud memory, the key frame of the target frame is replaced by the key frame of the second frame, namely, the key frame at the moment on the target frame is called as the key frame at the moment of replacing the black screen, so that the black screen phenomenon of the target frame is repaired.
The embodiment detects whether a video frame in video data has a black screen phenomenon or not, and takes the video frame with the black screen phenomenon as a target frame; detecting whether the similarity between the key frame of the first frame and the key frame of the second frame is larger than a first similarity threshold; the key frame of the first frame, the key frame of the second frame and the target frame are adjacent in sequence; if the similarity between the key frame of the first frame and the key frame of the second frame is greater than a first similarity threshold, replacing the key frame of the target frame with the key frame of the second frame; therefore, if the condition of video data blacking appears, the user terminal can repair the blacking phenomenon of the video data, so that data loss caused by the blacking phenomenon of the video data is avoided, and the data transmission stability between the wearable equipment and the user terminal is further improved.
Fig. 4 is a flowchart of a data transmission method according to another embodiment. On the basis of the embodiment shown in fig. 2, as shown in fig. 4, the data transmission method of this embodiment further includes, after step S200, step S510, step S520 and step S530, specifically:
in step S510, it is detected whether the video frame in the video data has a splash screen phenomenon, and the video frame having the splash screen phenomenon is used as a target frame.
In this embodiment, after receiving video data sent by the wearable device, the user terminal detects whether a video frame in the video data has a screen-splash phenomenon, and if the video frame is detected to have the screen-splash phenomenon, the video frame having the screen-splash phenomenon is taken as a target frame.
In step S520, it is detected whether the similarity between the difference frame of the first frame and the difference frame of the second frame is greater than a second similarity threshold.
The difference frame of the first frame, the difference frame of the second frame, and the target frame are sequentially adjacent in time sequence.
In this embodiment, to more clearly describe the time sequence relationship between the difference frame of the first frame, the difference frame of the second frame, and the target frame, the above example is continued, for example, the video data includes consecutive video frames as follows: ipbpbbpipbppbpippb, in the video data, if the difference frame of the first frame is a first P frame of all the difference frames in the video data, the difference frame of the second frame is a second P frame of all the difference frames in the video data, and the target frame is a third P frame of all the difference frames in the video data; if the difference frame of the first frame is the second P frame of all the difference frames in the video data, the difference frame of the second frame is the third P frame of all the difference frames in the video data, the target frame is the fourth P frame of all the difference frames in the video data, and so on. Namely, the difference frame of the first frame, the difference frame of the second frame, and the target frame are sequentially adjacent in the timing of the difference frame.
In this embodiment, as an implementation manner, the user terminal may set a cloud memory and a cloud comparator, and the video data is stored in the cloud memory, where the video data may be uploaded to the cloud memory by the user terminal or may be uploaded to the cloud memory by the wearable device, which is not limited herein. If the user terminal detects that the target frame in the video data has the screen-display phenomenon, the cloud comparator is used for detecting the similarity between the difference frame of the first frame and the difference frame of the second frame.
The user terminal obtains a detection result of the cloud comparator, namely, the similarity between the difference frame of the first frame and the difference frame of the second frame, and then detects whether the similarity between the difference frame of the first frame and the difference frame of the second frame is larger than a second similarity threshold; for example, the similarity between the difference frame of the first frame and the difference frame of the second frame detected by the cloud comparator is 97%, the second similarity threshold is set to 94% in this embodiment, and the user terminal may determine that the similarity between the difference frame of the first frame and the difference frame of the second frame is greater than the second similarity threshold by comparing the similarity between the difference frame of the first frame and the difference frame of the second frame with the second similarity threshold. In other embodiments, the second similarity threshold may be set by itself according to the actual implementation.
In step S530, if the similarity between the difference frame of the first frame and the difference frame of the second frame is greater than the second similarity threshold, the difference frame of the target frame is replaced with the difference frame of the second frame.
If the user terminal detects that the similarity between the difference frame of the first frame and the difference frame of the second frame is larger than a second similarity threshold, the difference frame of the second frame is called from the cloud memory, the difference frame of the target frame is replaced by the difference frame of the second frame, namely, the difference frame at the moment on the target frame is called as the difference frame at the moment of replacing the screen, and the screen-display phenomenon of the target frame is repaired.
The embodiment detects whether the video frames in the video data have the screen-display phenomenon or not, and takes the video frames with the screen-display phenomenon as target frames; detecting whether the similarity between the difference frame of the first frame and the difference frame of the second frame is greater than a second similarity threshold; the difference frame of the first frame, the difference frame of the second frame and the target frame are adjacent in sequence; if the similarity between the difference frame of the first frame and the difference frame of the second frame is greater than a second similarity threshold, replacing the difference frame of the target frame with the difference frame of the second frame; therefore, when the video data is in the screen display condition, the user terminal can repair the screen display phenomenon of the video data, so that the data loss caused by the screen display phenomenon of the video data is avoided, and the data transmission stability between the wearable equipment and the user terminal is further improved.
Fig. 5 is a flowchart of a data transmission method according to another embodiment. On the basis of the embodiment shown in fig. 2, as shown in fig. 5, step S600 is further included before step S100 in this embodiment, specifically:
step S600, detecting whether the wearable device is online.
In this embodiment, the user terminal detects whether the wearable device is online, and as an implementation manner, the user terminal may send a response instruction to the wearable device, and if response feedback of the wearable device to the response instruction is received within a preset time period, it is determined that the wearable device is online, and the preset time period is set to, for example, 5 seconds.
In other embodiments, in order to ensure the online detection reliability of the wearable device, as an implementation manner, the user terminal may further send the response instruction to the wearable device again after receiving the response feedback of the wearable device to the response instruction within a preset time period, and determine that the wearable device is online if receiving the response feedback of the wearable device to the response instruction again within the preset time period.
If the user terminal detects that the wearable equipment is online, detecting whether the data transmission rate between the user terminal and the wearable equipment is lower than a preset threshold value, so that resource waste caused by detecting the data transmission rate of the offline wearable equipment is avoided.
Fig. 6 is a flowchart of a data transmission method according to another embodiment. On the basis of the embodiment shown in fig. 5, as shown in fig. 6, step S600 of this embodiment includes step S610, step S620, and step S630, specifically:
in step S610, a first feedback information acquisition request is sent to a cloud server.
The first feedback information acquisition request is used for indicating the cloud server to return first feedback information of the wearable device.
In this embodiment, the user terminal detects whether the wearable device is online by calling feedback information of the wearable device from the cloud server. Specifically, the user terminal sends a first feedback information acquisition request to the cloud server, where the first feedback information acquisition request may include an identification code of the wearable device.
The first feedback information may be device location and device status information uploaded to the cloud server by the wearable device, and the first feedback information may be that the user terminal instructs the wearable device to upload to the cloud server through an uploading instruction, or may be that the wearable device uploads to the cloud server by itself through a set timing uploading task, which is not limited specifically.
Step S620, if the first feedback information is received, after a preset time interval, a second feedback information obtaining request is sent to the cloud server.
The second feedback information acquisition request is used for indicating the cloud server to return second feedback information of the wearable device.
If the user terminal downloads the first feedback information from the cloud server, after the interval is preset, a second feedback information acquisition request is sent to the cloud server, so that the reliability of online detection of the wearable equipment is ensured.
In step S630, if the second feedback information is received, it is determined that the wearable device is online.
If the user terminal receives the second feedback information, the wearable equipment is determined to be online; if the wearable equipment is online, the user terminal detects whether the data transmission rate between the user terminal and the wearable equipment is lower than a preset threshold value; if the data transmission rate is not lower than the preset threshold, controlling the wearable device to send video data and positioning information to the user terminal; if the data transmission rate is lower than a preset threshold, controlling the wearable device to send positioning information to the user terminal, and prohibiting the wearable device from sending video data to the user terminal; therefore, when the wearable equipment is on line, the user terminal can track the positioning information of the wearable equipment at least, and the user terminal can detect in time, when the data transmission rate meets the requirement, the video data is connected, and the efficient utilization of the data transmission resources between the user terminal and the wearable equipment is realized.
Fig. 7 is a flowchart of a data transmission method according to another embodiment. On the basis of the embodiment shown in fig. 6, as shown in fig. 7, step S620 of this embodiment further includes step S640 and step S650, specifically:
in step S640, if the second feedback information is not received, it is determined that the wearable device is offline.
In this embodiment, the user terminal sends a first feedback information acquisition request to the cloud server, if the first feedback information is received, the first feedback information includes positioning information of the wearable device, and after a preset time interval, the user terminal sends a second feedback information acquisition request to the cloud server, and if the second feedback information is not received, the wearable device is determined to be offline. The first feedback information is final response feedback information of the wearable device, and the positioning information included in the first feedback information is final positioning of the wearable device before offline.
In this embodiment, as an implementation manner, if the user terminal does not receive the second feedback information, after the preset time interval, the user terminal may send the feedback information obtaining request to the cloud server again to determine that the wearable device is offline.
Step S650, transmitting the positioning information of the wearable device included in the first feedback information to the target terminal bound by the wearable device.
After the wearable device is determined to be offline, the user terminal sends the positioning information of the wearable device, which is included in the first feedback information, to a target terminal bound with the wearable device, wherein the target terminal can be a contact terminal reserved by a purchaser purchasing the wearable device and recorded by a cloud server, so that the purchaser can be reminded, and the wearable device is prevented from being lost.
Fig. 8 is a flowchart of a data transmission method according to another embodiment. On the basis of the embodiment shown in fig. 2, as shown in fig. 8, step S200 of this embodiment includes step S210, step S220, and step S230, specifically:
step S210, if the data transmission rate is not lower than a preset threshold, acquiring first reporting information of a video acquisition device corresponding to the wearable device from a cloud server.
In this embodiment, if the data transmission rate between the user terminal and the wearable device is not lower than the preset threshold, that is, the data transmission rate between the user terminal and the wearable device satisfies the condition of video data transmission, the user terminal performs online detection on the video acquisition device.
In this embodiment, the video acquisition device may be disposed in the wearable device, or may be disposed separately and in communication with the wearable device, where the wearable device acquires video data through the video acquisition device.
The user terminal obtains first reporting information of the video acquisition device corresponding to the wearable device from the cloud server, wherein the reporting information can be state information of the video acquisition device, and the like, and the user terminal sends an instruction to the wearable device to instruct the video acquisition device to report to the cloud server.
Step S220, if the second report information of the video acquisition device is acquired from the cloud server at intervals of a preset time period, determining that the video acquisition device is on line.
If the user terminal acquires first reporting information of the video acquisition device corresponding to the wearable equipment from the cloud server, the user terminal acquires second reporting information of the video acquisition device from the cloud server again at intervals of a preset time period, and if the second reporting information is acquired, the user terminal determines that the video acquisition device is online.
Step S230, controlling the wearable device to send video data and positioning information to the user terminal.
After the video acquisition device is determined to be online, the user terminal controls the wearable equipment to send video data and positioning information to the user terminal, and particularly controls the wearable equipment to send the positioning information to the user terminal and the video data acquired by the wearable equipment through the video acquisition device.
Therefore, if the user terminal detects that the data transmission rate between the user terminal and the wearable equipment is not lower than a preset threshold value, acquiring first reporting information of a video acquisition device corresponding to the wearable equipment from a cloud server, and if second reporting information of the video acquisition device is acquired from the cloud server at intervals of a preset time period, determining that the video acquisition device is online, and controlling the wearable equipment to send video data and positioning information to the user terminal; the video data can be successfully obtained when the data transmission rate is not lower than the preset threshold value, and the stability of data transmission between the wearable equipment and the user terminal is improved.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described above may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with at least a part of the sub-steps or stages of other steps or other steps.
In one embodiment, as shown in fig. 9, there is provided a data transmission apparatus including:
a first detection module 10, configured to detect whether a data transmission rate between the user terminal and the wearable device is lower than a preset threshold;
a transmission control module 20, configured to control the wearable device to send video data and positioning information to the user terminal if the data transmission rate is not lower than the preset threshold;
the transmission control module 20 is further configured to control the wearable device to send the positioning information to the user terminal and prohibit the wearable device from sending the video data to the user terminal if the data transmission rate is lower than the preset threshold.
Optionally, the apparatus further comprises:
the black screen detection module is used for detecting whether a black screen phenomenon exists in video frames in the video data or not, and taking the video frames with the black screen phenomenon as target frames;
the key frame similarity detection module is used for detecting whether the similarity between the key frame of the first frame and the key frame of the second frame is larger than a first similarity threshold value; the first frame, the second frame and the target frame are adjacent in sequence;
And the black screen restoration module is used for replacing the key frame of the target frame with the key frame of the second frame if the similarity between the key frame of the first frame and the key frame of the second frame is larger than the first similarity threshold value.
Optionally, the apparatus further comprises:
the video display detection module is used for detecting whether a video frame in the video data has a display screen phenomenon or not, and taking the video frame with the display screen phenomenon as a target frame;
the difference frame similarity detection module is used for detecting whether the similarity between the difference frame of the first frame and the difference frame of the second frame is larger than a second similarity threshold value; the first frame, the second frame and the target frame are adjacent in sequence;
and the screen display restoration module is used for replacing the difference frame of the target frame with the difference frame of the second frame if the similarity between the difference frame of the first frame and the difference frame of the second frame is larger than the second similarity threshold value.
Optionally, the apparatus further comprises:
the second detection module is used for detecting whether the wearable equipment is online or not;
correspondingly, the first detection module comprises:
and the detection sub-module is used for detecting whether the data transmission rate between the user terminal and the wearable equipment is lower than the preset threshold value if the wearable equipment is online.
Optionally, the second detection module includes:
the first acquisition sub-module is used for sending a first feedback information acquisition request to the cloud server, wherein the first feedback information acquisition request is used for indicating the cloud server to return first feedback information of the wearable equipment;
the second acquisition sub-module is used for sending a second feedback information acquisition request to the cloud server after a preset time interval if the first feedback information is received; the second feedback information acquisition request is used for indicating the cloud server to return second feedback information of the wearable device;
and the first determining submodule is used for determining that the wearable equipment is online if the second feedback information is received.
Optionally, the first feedback information includes positioning information of the wearable device, and the second detection module further includes:
a second determining submodule, configured to determine that the wearable device is offline if the second feedback information is not received;
and the sending sub-module is used for sending the positioning information to the target terminal bound by the wearable equipment.
Optionally, the transmission control module 20 is further configured to obtain, from a cloud server, first report information of a video acquisition device corresponding to the wearable device; and if the second reporting information of the video acquisition device is acquired from the cloud server at intervals of a preset time period, determining that the video acquisition device is online.
The data transmission device provided in this embodiment may execute the above embodiment of the data transmission method, and its implementation principle and technical effects are similar, and will not be described herein again. For specific limitations of the data transmission device, reference may be made to the above limitation of the data transmission method, and no further description is given here. The respective modules in the above-described data transmission apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, there is also provided a computer device as shown in fig. 10, which may be a terminal, and an internal structural diagram thereof may be as shown in fig. 10. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data transmission method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
if the wearable device is detected to be online, detecting whether the data transmission rate between the user terminal and the wearable device is lower than a preset threshold value;
if the data transmission rate is not lower than the preset threshold, controlling the wearable device to send video data and positioning information to the user terminal;
and if the data transmission rate is lower than the preset threshold, controlling the wearable device to send the positioning information to the user terminal, and prohibiting the wearable device from sending the video data to the user terminal.
In one embodiment, the processor when executing the computer program further performs the steps of:
Detecting whether a video frame in the video data has a black screen phenomenon or not, and taking the video frame with the black screen phenomenon as a target frame;
detecting whether the similarity between the key frame of the first frame and the key frame of the second frame is larger than a first similarity threshold; the key frame of the first frame, the key frame of the second frame and the target frame are adjacent in sequence;
and if the similarity between the key frame of the first frame and the key frame of the second frame is greater than the first similarity threshold, replacing the key frame of the target frame with the key frame of the second frame.
In one embodiment, the processor when executing the computer program further performs the steps of:
detecting whether a video frame in the video data has a screen-splash phenomenon or not, and taking the video frame with the screen-splash phenomenon as a target frame;
detecting whether the similarity between the difference frame of the first frame and the difference frame of the second frame is greater than a second similarity threshold; the difference frame of the first frame, the difference frame of the second frame and the target frame are adjacent in sequence;
and if the similarity between the difference frame of the first frame and the difference frame of the second frame is greater than the second similarity threshold, replacing the difference frame of the target frame with the difference frame of the second frame.
In one embodiment, the processor when executing the computer program further performs the steps of:
detecting whether the wearable device is online.
In one embodiment, the processor when executing the computer program further performs the steps of:
a first feedback information acquisition request is sent to a cloud server, wherein the first feedback information acquisition request is used for indicating the cloud server to return first feedback information of the wearable equipment;
if the first feedback information is received, after a preset time interval, a second feedback information acquisition request is sent to the cloud server; the second feedback information acquisition request is used for indicating the cloud server to return second feedback information of the wearable device;
and if the second feedback information is received, determining that the wearable equipment is online.
In one embodiment, the processor when executing the computer program further performs the steps of:
if the second feedback information is not received, determining that the wearable equipment is offline;
and sending the positioning information of the wearable equipment, which is included in the first feedback information, to a target terminal bound by the wearable equipment.
In one embodiment, the processor when executing the computer program further performs the steps of:
Acquiring first report information of a video acquisition device corresponding to the wearable equipment from a cloud server;
and if the second reporting information of the video acquisition device is acquired from the cloud server at intervals of a preset time period, determining that the video acquisition device is online.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program, which may be stored on a non-transitory computer readable storage medium and which, when executed, may comprise the steps of the above-described embodiments of the methods. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus (Ramb microsecond) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
if the wearable device is detected to be online, detecting whether the data transmission rate between the user terminal and the wearable device is lower than a preset threshold value;
if the data transmission rate is not lower than the preset threshold, controlling the wearable device to send video data and positioning information to the user terminal;
and if the data transmission rate is lower than the preset threshold, controlling the wearable device to send the positioning information to the user terminal, and prohibiting the wearable device from sending the video data to the user terminal.
In one embodiment, the computer program when executed by the processor further performs the steps of:
detecting whether a video frame in the video data has a black screen phenomenon or not, and taking the video frame with the black screen phenomenon as a target frame;
detecting whether the similarity between the key frame of the first frame and the key frame of the second frame is larger than a first similarity threshold; the key frame of the first frame, the key frame of the second frame and the target frame are adjacent in sequence;
And if the similarity between the key frame of the first frame and the key frame of the second frame is greater than the first similarity threshold, replacing the key frame of the target frame with the key frame of the second frame.
In one embodiment, the computer program when executed by the processor further performs the steps of:
detecting whether a video frame in the video data has a screen-splash phenomenon or not, and taking the video frame with the screen-splash phenomenon as a target frame;
detecting whether the similarity between the difference frame of the first frame and the difference frame of the second frame is greater than a second similarity threshold; the difference frame of the first frame, the difference frame of the second frame and the target frame are adjacent in sequence;
and if the similarity between the difference frame of the first frame and the difference frame of the second frame is greater than the second similarity threshold, replacing the difference frame of the target frame with the difference frame of the second frame.
In one embodiment, the computer program when executed by the processor further performs the steps of:
detecting whether the wearable device is online.
In one embodiment, the computer program when executed by the processor further performs the steps of:
a first feedback information acquisition request is sent to a cloud server, wherein the first feedback information acquisition request is used for indicating the cloud server to return first feedback information of the wearable equipment;
If the first feedback information is received, after a preset time interval, a second feedback information acquisition request is sent to the cloud server; the second feedback information acquisition request is used for indicating the cloud server to return second feedback information of the wearable device;
and if the second feedback information is received, determining that the wearable equipment is online.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the second feedback information is not received, determining that the wearable equipment is offline;
and sending the positioning information of the wearable equipment, which is included in the first feedback information, to a target terminal bound by the wearable equipment.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring first report information of a video acquisition device corresponding to the wearable equipment from a cloud server;
and if the second reporting information of the video acquisition device is acquired from the cloud server at intervals of a preset time period, determining that the video acquisition device is online.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.