CN111935535B - Data processing method and device, terminal equipment and computer storage medium - Google Patents

Data processing method and device, terminal equipment and computer storage medium Download PDF

Info

Publication number
CN111935535B
CN111935535B CN201910394339.7A CN201910394339A CN111935535B CN 111935535 B CN111935535 B CN 111935535B CN 201910394339 A CN201910394339 A CN 201910394339A CN 111935535 B CN111935535 B CN 111935535B
Authority
CN
China
Prior art keywords
thread
index information
analyzed
preset operation
triggering
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
CN201910394339.7A
Other languages
Chinese (zh)
Other versions
CN111935535A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910394339.7A priority Critical patent/CN111935535B/en
Publication of CN111935535A publication Critical patent/CN111935535A/en
Application granted granted Critical
Publication of CN111935535B publication Critical patent/CN111935535B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
    • H04N21/4345Extraction or processing of SI, e.g. extracting service information from an MPEG stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4882Data services, e.g. news ticker for displaying messages, e.g. warnings, reminders

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention provides a data processing method, a data processing device, terminal equipment and a computer storage medium. The data processing method comprises the following steps: analyzing index information corresponding to a plurality of data blocks in target data through a first thread, and matching the analyzed index information with a first thread trigger condition in real time in the analyzing process; determining that the analyzed index information is matched with a first thread triggering condition; and triggering a second thread different from the first thread to execute a first preset operation according to the resolved index information. According to the scheme provided by the embodiment, the first thread triggering condition can be set according to the partial data block, and then the partial data block can be processed preferentially, so that the time for obtaining the processing result after the first preset operation is executed on the partial data block from the beginning of analyzing the index information is shortened; when the method is applied to the field of video playing, the second opening rate can be improved.

Description

Data processing method and device, terminal equipment and computer storage medium
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a data processing method, a data processing device, terminal equipment and a computer storage medium.
Background
When a video is played, for example, when the video is played through a video player such as a browser, the second opening rate is an important user experience index, and the second opening rate refers to a ratio of the number of videos started to be played to the total number of videos to be played within one second from the start of the user clicking to play, and the improvement of the second opening rate can greatly improve the experience of consumers, so that the playing amount of the videos is improved.
In the existing video playing process, mostly, complete video index information is obtained first, then a plurality of video frames included in the video are downloaded and decoded according to the index information, and each video frame is played according to the sequence indicated by the index information, thereby realizing the playing of the video. In the playing process, the second-opening rate can be increased by increasing the speed of video caching or downloading, increasing the decoding speed of video and the like, but the method has higher requirements on network speed and the like, and is not beneficial to popularization. Therefore, how to provide a scheme with a high second opening rate is a technical problem which needs to be solved urgently in the prior art.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a data processing method, an apparatus, a terminal device, and a computer storage medium, so as to at least solve the above problems.
According to a first aspect of embodiments of the present invention, there is provided a data processing method, including: analyzing index information corresponding to a plurality of data blocks in target data through a first thread, and matching the analyzed index information with a first thread trigger condition in real time in the analyzing process; determining that the parsed index information matches the first thread trigger condition; and triggering a second thread different from the first thread to execute a first preset operation according to the resolved index information.
According to a second aspect of embodiments of the present invention, there is provided a data processing apparatus including: the first matching module is used for analyzing the index information corresponding to the data blocks in the target data through a first thread and matching the analyzed index information with the triggering condition of the first thread in real time in the analyzing process; the first condition determining module is used for determining that the analyzed index information is matched with the first thread triggering condition; and the first triggering module is used for triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information.
According to a third aspect of the embodiments of the present invention, there is provided a terminal device, including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the corresponding operation of the data processing method.
According to a fourth aspect of embodiments of the present invention, there is provided a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the data processing method as described above.
According to the scheme provided by the embodiment of the invention, the index information corresponding to a plurality of data blocks in the target data is analyzed through the first thread, and the analyzed index information is matched with the triggering condition of the first thread in real time in the analyzing process; determining that the parsed index information matches the first thread trigger condition; triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information, so that a first thread triggering condition can be set according to a part of data blocks, and then the part of data blocks can be processed in priority, and the time for obtaining a processing result after the first preset operation is executed on the part of data blocks from the beginning of analyzing the index information is shortened; when the method is applied to the field of video playing, the second opening rate can be improved.
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 embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following descriptions are only some embodiments described in the embodiments of the present invention, and other drawings can be obtained by those skilled in the art according to these drawings.
FIG. 1 is a flowchart illustrating steps of a data processing method according to a first embodiment of the present invention;
FIG. 2A is a flowchart illustrating a data processing method according to a second embodiment of the present invention;
FIG. 2B is a timing diagram of a video data processing method according to a second embodiment of the present invention;
fig. 3 is a block diagram of a data processing apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely 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 embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention shall fall within the scope of the protection of the embodiments of the present invention.
The following further describes concrete implementation of the embodiment of the invention by combining the drawings of the embodiment of the invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a data processing method according to a first embodiment of the present invention is shown.
The data processing method of the embodiment comprises the following steps:
s102, analyzing index information corresponding to a plurality of data blocks in target data through a first thread, and matching the analyzed index information with a first thread trigger condition in real time in the analyzing process.
In this embodiment, the target data includes index information and a plurality of data blocks, where the index information may be used to indicate a position of each data block in the target data and a storage position corresponding to each of the plurality of data blocks, for example, the index information is used to indicate that the data block is specifically the fourth data block in the target data, and the plurality of data blocks may be combined to obtain complete and accurate target data according to the position of each data block in the target data; according to the storage positions corresponding to the plurality of data blocks respectively, the corresponding data blocks can be obtained from the storage addresses.
The thread refers to a unit capable of performing operation scheduling by the operating system, and in this embodiment, the index information may be analyzed by the first thread. Taking a video playing process as an example, the target data may be video data to be played, and then, in the playing process, video head data is obtained first, where the video head data includes encapsulated video index information, that is, the index information encapsulated in the video head can be analyzed through the first thread.
After the index information is analyzed, the analyzed index information can be matched with a first thread triggering condition in real time, wherein the first thread triggering condition is a condition for instructing a second thread to start executing a first preset operation according to the progress of the index information analysis of the first thread. For example, the first thread trigger condition may be: completing the analysis of basic index information required by executing the first preset operation; or, the index information corresponding to the data block with higher priority is analyzed, and the like.
In this embodiment, by matching the analyzed index information with the first thread trigger condition in real time, when the analyzed index information meets the first thread trigger condition, the second thread may be controlled to start executing the first preset operation in real time, regardless of whether the progress of analyzing the index information is completed completely.
Further, according to the content of the first thread trigger condition, a part of the index data may be preferentially parsed by the first thread, for example, if the first thread trigger condition is that the index information corresponding to the data block with the higher priority is parsed, the index information corresponding to the data block with the higher priority may be preferentially parsed by the first thread.
S104, determining that the analyzed index information is matched with the first thread triggering condition.
In this embodiment, since the real-time matching is performed in step S102, when the analyzed index information matches the first thread trigger condition, a result of determining that the two match can be obtained in time.
And S106, triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information.
In this embodiment, the second thread is different from the first thread, and according to steps S102 and S106 in this embodiment, the relationship between the first thread and the second thread is: the second thread executes a first preset operation according to the index information analyzed by the first thread, so that the first thread and the second thread can be in parallel, and the first thread transmits the index information obtained by analysis to the second thread in real time. In this embodiment, a new thread may be created as the second thread.
In this embodiment, a person skilled in the art may determine specific content of the first preset operation according to actual needs, for example, when playing a video, the first preset operation may be downloading a plurality of video frames of video data according to the index information.
In the scheme provided by this embodiment, index information corresponding to a plurality of data blocks in target data is analyzed through a first thread, and the analyzed index information is matched with a first thread trigger condition in real time in the analysis process; determining that the parsed index information matches the first thread trigger condition; triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information, so that a first thread triggering condition can be set according to a part of data blocks, the second thread is triggered to execute the first preset operation according to whether the index information corresponding to the part of data blocks is analyzed, and the part of data blocks can be processed preferentially, so that the time for obtaining a processing result after the first preset operation is executed on the part of data blocks from the beginning of analyzing the index information is shortened; when the second thread starts to execute the first preset operation, the index information can be continuously analyzed through the first thread, and the first thread is parallel to the second thread, so that the analysis process of the index information is not influenced by the first preset operation, the accuracy of the process of processing the target data is further ensured, and the time required by processing the target data is shortened.
When the scheme in the embodiment is applied to the field of video playing, the index information of a video can be analyzed through a first thread, and a first thread trigger condition is set to be that the index information corresponding to a target video frame (for example, a first frame of the video) in the video is analyzed; when the trigger condition of the first thread is met, the second thread can be triggered to download the target video frame according to the analyzed index data in real time, and therefore the time from the beginning of analyzing the index information to the downloading of the target video frame is shortened. When the target video frame is the first frame of the video, the time from the beginning of analyzing the index information to the downloading of the first frame of the video can be shortened through the scheme, and then the second opening rate is improved.
The data processing method of the present embodiment may be executed by any suitable terminal device having data processing capability, including but not limited to: mobile terminals (such as tablet computers, mobile phones and the like) and PCs.
Example two
Referring to fig. 2A, a flowchart illustrating steps of a data processing method according to a second embodiment of the present invention is shown.
The data processing method of the embodiment comprises the following steps:
s202, analyzing the index information corresponding to the data blocks in the target data through the first thread, and matching the analyzed index information with the trigger condition of the first thread in real time in the analyzing process.
In this embodiment, the step S202 may be realized by referring to the step S102 in the above embodiment, and this embodiment is not described herein again.
Specifically, the target data includes a plurality of data blocks, and the processing priorities of the plurality of data blocks may be different, for example, the processing priority of the data block located earlier or more important is higher, the processing priority of the remaining data blocks is lower, and the processing may be delayed. Therefore, the first thread triggering condition may be set such that the index information corresponding to the data block satisfying the set priority is analyzed, so that the data block requiring higher processing priority may be determined to be the data block satisfying the set priority according to the position, the importance degree, and the like of the data block, and the first thread triggering condition may be set according to the data block, so that the data block satisfying the set priority may be preferentially processed through the thread triggering condition in step S206.
In addition, in this embodiment, for example, video playing is taken, the target data is video data, and the data blocks are video frames. When playing videos, a container is mostly needed to carry the videos, so that the videos are played in the container. In this embodiment, the video head data may be downloaded according to the container information, and the index information of the video may be determined and analyzed from the container information, where the index information may specifically include an index table, and a position of each video frame and a storage address corresponding to each video frame are stored in the table, where a video frame whose position is at the head of the video is a video head frame.
When the video is played, the time from the start of the user clicking playing to the successful playing of the first frame of the video is shortened, and the method is an important way for improving the second opening rate, so that the processing priority of the first frame of the video is higher than that of other video frames. Then, the first thread trigger condition may be: and analyzing the index information corresponding to the video head frame in the plurality of video frames. By setting the first thread trigger condition according to the first frame of the video, when the index data is analyzed through the first thread, the index data corresponding to the first frame of the video can be preferentially analyzed, and when the index data is processed through the first thread, the first frame of the video can be preferentially processed, so that the time from the start of the click play of a user to the successful play of the first frame of the video is shortened, and the second-opening rate is improved.
Specifically referring to fig. 2B, as can be seen from fig. 2B, a first thread may correspond to a thread one, and a second thread may correspond to a thread two, where the thread one is configured to download a video head file and analyze index information therein according to container information of a video, and during an analysis process, the index information corresponding to a first frame of the video may be preferentially analyzed, and at a time t1, the index information of the first frame of the video is completely analyzed, so that it may be determined that the analyzed index information matches the first thread trigger condition; the second thread is used for downloading a plurality of video frames according to the index information, at the time t1, the second thread is triggered to start downloading the plurality of video frames, and the index information of the first video frame is analyzed, the first video frame can be downloaded preferentially, so that the time from the start of the user click playing to the successful playing of the first video frame is shortened.
S204, determining that the analyzed index information is matched with the first thread trigger condition.
Since the real-time matching is performed in step S202, when the parsed index information matches the first thread trigger condition, a result of determining that the two match can be obtained in time.
S206, triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information.
In this embodiment, the step S106 in the above embodiment can be referred to for specific implementation of the step S206, and this embodiment is not described herein again.
Specifically, in the process of analyzing the index information, the index information corresponding to the data block satisfying the set priority may be analyzed preferentially, or the index information may be analyzed in other orders. Therefore, the parsed index data may include not only the index information corresponding to the data block satisfying the set priority, but also index information corresponding to other data blocks, and then the second thread may perform the first preset operation according to the parsed index information, including: and preferentially executing the first preset operation on the data blocks meeting the set priority according to the analyzed index information.
In this embodiment, by preferentially executing the first preset operation on the data block meeting the set priority, the processing result of the first preset operation corresponding to the data block meeting the set priority can be preferentially obtained, and the time for obtaining the processing result of the first preset operation corresponding to the data block meeting the set priority is further shortened.
In a specific implementation manner of the present embodiment, after step S206, other processing may be performed as required by a person skilled in the art directly according to the processing result of the first preset operation, for example, performing a second preset operation described below.
In another specific implementation manner of this embodiment, during the execution of step S206, a second preset operation may be further performed on the data block through steps S208 to S212 described below.
And S208, in the process of executing a first preset operation by a second thread, matching a processing result corresponding to the first preset operation with a trigger condition of the second thread in real time.
In this embodiment, after the first preset operation is executed, a second preset operation may also be executed, and in this embodiment, a second thread trigger condition may be set again according to the above-mentioned idea of setting the first thread trigger condition, where the second thread trigger condition is a condition that triggers the third thread to start executing the second preset operation according to the processing result of the first preset operation. For example, the second thread trigger condition may be: obtaining a basic first preset operation processing result required by executing a second preset operation; or, the first preset operation processing result corresponding to the data block with higher priority is obtained, and the like.
In this embodiment, by matching the processing result corresponding to the first preset operation with the trigger condition of the second thread in real time, the third thread can be controlled to start executing the second preset operation in real time when the obtained processing result meets the trigger condition of the second thread, regardless of whether the progress of executing the first preset operation by the second thread is completed.
In addition, optionally, in this embodiment, the first preset operation may be to download the plurality of data blocks according to index information; the second thread trigger condition may be: the data blocks of the plurality of data blocks which meet the set priority are downloaded completely.
Taking the target data as the video data as an example, downloading the plurality of data blocks according to the index information may specifically be: downloading a plurality of video frames of the video according to the index information of the video; the second thread trigger condition may specifically be: and finishing downloading the first frame of the video in the plurality of video frames.
S210, determining that the processing result is matched with the second thread triggering condition.
S212, triggering a third thread different from the first thread and the second thread to execute a second preset operation according to the processing result.
In this embodiment, similar to the second thread, the third thread may also be parallel to the first thread and the second thread, and the details are not repeated herein. In this embodiment, a thread may be newly started as a third thread.
Specifically, the triggering the third thread to execute the second preset operation according to the processing result includes: and preferentially executing a second preset operation on the downloaded data blocks meeting the set priority according to the processing result.
In this embodiment, by preferentially executing the second preset operation on the data block meeting the set priority, the processing result of the second preset operation corresponding to the data block meeting the set priority can be preferentially obtained, and the time for obtaining the processing result of the second preset operation corresponding to the data block meeting the set priority is further shortened.
In addition, in this embodiment, when the first preset operation is to download a plurality of data blocks in the target data, the second preset operation may be to decode the downloaded data blocks.
Specifically, taking the target data as the video data as an example, the second thread triggering condition may be: and finishing downloading the first frame of the video in the plurality of video frames. Therefore, during subsequent processing, the first frame of the video can be processed preferentially, the time from the start of the click playing of the user to the successful playing of the first frame of the video is shortened again, and the second opening rate is improved.
Specifically referring to fig. 2B, as can be seen from fig. 2B, the second thread may correspond to thread two, the third thread may correspond to thread three, the thread two is configured to download a plurality of video frames included in the video data according to the index information of the video, and at time t1, when the index information of the first video frame is completely parsed, the thread two starts to download the video frame and preferentially downloads the first video frame of the plurality of video frames; at the moment of t2, the downloading of the first frame of the video is completed, so that the downloading result can be determined to be matched with the triggering condition of the second thread, and then the third thread is triggered to decode the downloaded video frame, the first frame of the video is preferentially decoded during decoding, so that the time from the beginning of analyzing the index information to the completion of decoding the first frame of the video is greatly shortened by the cooperation of the first thread, the second thread and the third thread.
In addition, it should be noted that, after the second thread is triggered, the first thread may continue to parse the index information; after the third thread is triggered, the second thread can continue to execute the first preset operation, and when the scheme is applied to the video playing process, the parallel analysis of the index information of the video data, the downloading of the video frame and the decoding of the video frame can be realized through the first thread, the second thread and the third thread, so that the time required for processing the target data is shortened.
In addition, the first thread, the second thread, and the third thread are only exemplary illustrations, and do not mean that only three threads may be parallel, and when the method is actually used, the number of parallel threads may be greater than three, and different threads may correspond to different processing steps of the target data, for example, the first thread in this embodiment corresponds to a step of parsing the index data, the second thread corresponds to a first preset operation, and the third thread corresponds to a second preset operation.
In the scheme provided by this embodiment, index information corresponding to a plurality of data blocks in target data is analyzed through a first thread, and the analyzed index information is matched with a first thread trigger condition in real time in the analysis process; determining that the parsed index information matches the first thread trigger condition; triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information; in the process of executing a first preset operation by a second thread, matching a processing result corresponding to the first preset operation with a trigger condition of the second thread in real time; determining that a processing result matches the second thread trigger condition; and triggering a third thread different from the first thread and the second thread to execute a second preset operation according to the processing result. Therefore, a first thread trigger condition and a second thread trigger condition can be set according to a part of data blocks, so that whether the index information corresponding to the part of data blocks is analyzed and the second thread is triggered to execute a first preset operation is completed, and whether a first preset operation processing result corresponding to the part of data blocks is obtained or not is judged to execute a second preset operation, and then the part of data blocks can be processed in priority, so that the time from the beginning of analyzing the index information to the obtaining of a processing result after the second preset operation is executed on the part of data blocks is shortened.
The data processing method of the present embodiment may be executed by any suitable terminal device having data processing capability, including but not limited to: mobile terminals (such as tablet computers, mobile phones and the like) and PCs.
EXAMPLE III
Referring to fig. 3, a block diagram of a data processing apparatus according to a third embodiment of the present invention is shown.
As shown in fig. 3, the data processing apparatus includes: a first matching module 302, a first condition determining module 304, a first triggering module 306.
The first matching module 302 is configured to analyze, by a first thread, index information corresponding to a plurality of data blocks in target data, and perform real-time matching between the analyzed index information and a first thread trigger condition in an analysis process.
A first condition determining module 304, configured to determine that the parsed index information matches the first thread trigger condition.
A first triggering module 306, configured to trigger a second thread different from the first thread to perform a first preset operation according to the parsed index information.
In an optional embodiment, the first thread triggering condition is that index information corresponding to the data block meeting the set priority is parsed.
In an optional implementation manner, the first triggering module is specifically configured to trigger the second thread to preferentially execute the first preset operation on the data block meeting the set priority according to the parsed index information.
In an alternative embodiment, the target data is video data, and the data blocks are video frames.
In an optional embodiment, the method further comprises: the second matching module is used for matching a processing result corresponding to a first preset operation with a trigger condition of a second thread in real time in the process of executing the first preset operation by the second thread; the second condition determining module is used for determining that the processing result is matched with the second thread triggering condition; and the second triggering module is used for triggering a third thread different from the first thread and the second thread to execute a second preset operation according to the processing result.
In the data processing scheme provided by this embodiment, index information corresponding to a plurality of data blocks in target data is analyzed through a first thread, and the analyzed index information is matched with a first thread trigger condition in real time in the analysis process; determining that the analyzed index information is matched with the first thread trigger condition; triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information, so that a first thread triggering condition can be set according to a part of data blocks, the second thread is triggered to execute the first preset operation according to whether the index information corresponding to the part of data blocks is analyzed, and the part of data blocks can be processed preferentially, so that the time for obtaining a processing result after the first preset operation is executed on the part of data blocks from the beginning of analyzing the index information is shortened; when the second thread starts to execute the first preset operation, the index information can be continuously analyzed through the first thread, and the first thread is parallel to the second thread, so that the analysis process of the index information is not influenced by the first preset operation, the accuracy of the process of processing the target data is further ensured, and the time required by processing the target data is shortened.
When the scheme in the embodiment is applied to the field of video playing, the index information of a video can be analyzed through a first thread, and a first thread trigger condition is set to be that the index information corresponding to a target video frame (for example, a first frame of the video) in the video is analyzed; when the trigger condition of the first thread is met, the second thread can be triggered to download the target video frame according to the analyzed index data in real time, and therefore the time from the beginning of analyzing the index information to the downloading of the target video frame is shortened. When the target video frame is the first frame of the video, the time from the beginning of analyzing the index information to the downloading of the first frame of the video can be shortened through the scheme, and then the second opening rate is improved.
Example four
A terminal device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the corresponding operation of the data processing method.
Specifically, referring to fig. 4, a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention is shown, and the specific embodiment of the present invention does not limit the specific implementation of the terminal device.
As shown in fig. 4, the terminal device may include: a processor (processor)402, a Communications Interface 404, a memory 406, and a Communications bus 408.
Wherein:
the processor 402, communication interface 404, and memory 406 communicate with each other via a communication bus 408.
A communication interface 404 for communicating with other terminal devices or servers.
The processor 402 is configured to execute the program 410, and may specifically perform relevant steps in the above-described data processing method embodiment.
In particular, program 410 may include program code comprising computer operating instructions.
The processor 402 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention. The terminal device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 406 for storing a program 410. Memory 406 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 410 may be specifically configured to cause the processor 402 to perform the following operations: analyzing index information corresponding to a plurality of data blocks in target data through a first thread, and matching the analyzed index information with a first thread trigger condition in real time in the analyzing process; determining that the parsed index information matches the first thread trigger condition; and triggering a second thread different from the first thread to execute a first preset operation according to the resolved index information.
In an optional embodiment, the first thread triggering condition is that index information corresponding to the data block meeting the set priority is parsed.
In an optional embodiment, the second thread performing a first preset operation according to the parsed index information includes: and preferentially executing the first preset operation on the data blocks meeting the set priority according to the analyzed index information.
In an alternative embodiment, the target data is video data, and the data blocks are video frames.
In an optional implementation, the first thread trigger condition is: and analyzing the index information corresponding to the video head frame in the plurality of video frames.
In an optional embodiment, the method further comprises: in the process of executing a first preset operation by a second thread, matching a processing result corresponding to the first preset operation with a trigger condition of the second thread in real time; determining that a processing result matches the second thread trigger condition; and triggering a third thread different from the first thread and the second thread to execute a second preset operation according to the processing result.
In an optional implementation manner, the first preset operation is to download the plurality of data blocks according to index information; the second thread trigger condition is: the data blocks of the plurality of data blocks which meet the set priority are downloaded completely.
In an optional implementation manner, the triggering the third thread to execute the second preset operation according to the processing result includes: and preferentially executing a second preset operation on the downloaded data blocks meeting the set priority according to the processing result.
In an alternative embodiment, the second predetermined operation is to decode the downloaded data block.
For specific implementation of each step in the program 410, reference may be made to corresponding steps and corresponding descriptions in units in the foregoing data processing method embodiments, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
In the terminal device of this embodiment, in the scheme provided in this embodiment, index information corresponding to a plurality of data blocks in target data is analyzed through a first thread, and the analyzed index information is matched with a first thread trigger condition in real time in an analysis process; determining that the parsed index information matches the first thread trigger condition; triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information, so that a first thread triggering condition can be set according to a part of data blocks, the second thread is triggered to execute the first preset operation according to whether the index information corresponding to the part of data blocks is analyzed, and the part of data blocks can be processed preferentially, so that the time for obtaining a processing result after the first preset operation is executed on the part of data blocks from the beginning of analyzing the index information is shortened; when the second thread starts to execute the first preset operation, the index information can be continuously analyzed through the first thread, and the first thread is parallel to the second thread, so that the analysis process of the index information is not influenced by the first preset operation, the accuracy of the process of processing the target data is further ensured, and the time required by processing the target data is shortened.
When the scheme in the embodiment is applied to the field of video playing, the index information of a video can be analyzed through a first thread, and a first thread trigger condition is set to be that the index information corresponding to a target video frame (for example, a first frame of the video) in the video is analyzed; when the trigger condition of the first thread is met, the second thread can be triggered to download the target video frame according to the analyzed index data in real time, and therefore the time from the beginning of analyzing the index information to the downloading of the target video frame is shortened. When the target video frame is the first frame of the video, the time from the beginning of analyzing the index information to the downloading of the first frame of the video can be shortened through the scheme, and then the second opening rate is improved.
It should be noted that, according to the implementation requirement, each component/step described in the embodiment of the present invention may be divided into more components/steps, and two or more components/steps or partial operations of the components/steps may also be combined into a new component/step to achieve the purpose of the embodiment of the present invention.
The above-described method according to an embodiment of the present invention may be implemented in hardware, firmware, or as software or computer code storable in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk, or a magneto-optical disk, or as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA. It will be appreciated that the computer, processor, microprocessor controller or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the data processing methods described herein. Further, when a general-purpose computer accesses code for implementing the data processing method shown herein, execution of the code converts the general-purpose computer into a special-purpose computer for executing the data processing method shown herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The above embodiments are only for illustrating the embodiments of the present invention and not for limiting the embodiments of the present invention, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention, so that all equivalent technical solutions also belong to the scope of the embodiments of the present invention, and the scope of patent protection of the embodiments of the present invention should be defined by the claims.

Claims (12)

1. A data processing method, comprising:
analyzing index information corresponding to a plurality of data blocks in target data through a first thread, and matching the analyzed index information with a first thread trigger condition in real time in the analyzing process;
determining that the parsed index information matches the first thread trigger condition;
triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information;
the method for processing the video frame includes the steps that the first thread triggering condition is that index information corresponding to a first video frame in a plurality of video frames is analyzed, the first preset operation is downloading the video frames, the index information corresponding to a plurality of data blocks in target data is analyzed through the first thread, and the analyzed index information is matched with the first thread triggering condition in real time in the analyzing process, and includes the following steps:
the index information corresponding to the first frame of the video is preferentially analyzed through the first thread, and the analyzed index information is matched with the triggering condition of the first thread in real time in the analyzing process.
2. The method of claim 1, wherein the first thread trigger condition is that index information corresponding to the data block satisfying a set priority is parsed.
3. The method of claim 1, wherein the second thread performing a first predetermined operation according to the parsed index information comprises:
and preferentially executing the first preset operation on the data blocks meeting the set priority according to the analyzed index information.
4. The method according to any one of claims 1-3, further comprising:
in the process of executing a first preset operation by a second thread, matching a processing result corresponding to the first preset operation with a trigger condition of the second thread in real time;
determining that a processing result matches the second thread trigger condition;
and triggering a third thread different from the first thread and the second thread to execute a second preset operation according to the processing result.
5. The method according to claim 4, wherein the first predetermined operation is downloading the plurality of data blocks according to index information; the second thread trigger condition is as follows: the data blocks of the plurality of data blocks which meet the set priority are downloaded completely.
6. The method of claim 5, wherein the triggering the third thread to perform the second predetermined operation according to the processing result comprises: and preferentially executing second preset operation on the downloaded data blocks meeting the set priority according to the processing result.
7. The method of claim 5, wherein the second predetermined operation is decoding the data block that is downloaded completely.
8. A data processing apparatus, comprising:
the first matching module is used for analyzing the index information corresponding to the data blocks in the target data through a first thread and matching the analyzed index information with the triggering condition of the first thread in real time in the analyzing process;
the first condition determining module is used for determining that the analyzed index information is matched with the first thread triggering condition;
the first triggering module is used for triggering a second thread different from the first thread to execute a first preset operation according to the analyzed index information;
the first thread triggering condition is that index information corresponding to a first video frame in a plurality of video frames is analyzed, the first preset operation is to download the video frames, and the first matching module is specifically configured to: the index information corresponding to the first frame of the video is preferentially analyzed through the first thread, and the analyzed index information is matched with the triggering condition of the first thread in real time in the analyzing process.
9. The apparatus of claim 8, wherein the first triggering module is specifically configured to trigger the second thread to preferentially execute the first preset operation on the data block meeting a set priority according to the parsed index information.
10. The apparatus of any one of claims 8-9, further comprising:
the second matching module is used for matching a processing result corresponding to a first preset operation with a trigger condition of a second thread in real time in the process of executing the first preset operation by the second thread;
the second condition determining module is used for determining that the processing result is matched with the second thread triggering condition;
and the second triggering module is used for triggering a third thread different from the first thread and the second thread to execute a second preset operation according to the processing result.
11. A terminal device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the corresponding operation of the data processing method according to any one of claims 1-7.
12. A computer storage medium, on which a computer program is stored which, when being executed by a processor, carries out the data processing method of any one of claims 1 to 7.
CN201910394339.7A 2019-05-13 2019-05-13 Data processing method and device, terminal equipment and computer storage medium Active CN111935535B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910394339.7A CN111935535B (en) 2019-05-13 2019-05-13 Data processing method and device, terminal equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910394339.7A CN111935535B (en) 2019-05-13 2019-05-13 Data processing method and device, terminal equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN111935535A CN111935535A (en) 2020-11-13
CN111935535B true CN111935535B (en) 2022-06-17

Family

ID=73282603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910394339.7A Active CN111935535B (en) 2019-05-13 2019-05-13 Data processing method and device, terminal equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN111935535B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005318392A (en) * 2004-04-30 2005-11-10 Toshiba Kyaria Kk Communication system and adapter
CN106227583A (en) * 2016-07-18 2016-12-14 青岛科信安全技术有限公司 A kind of multiple thread video Real-time Data Processing Method and device
CN108737893A (en) * 2018-06-05 2018-11-02 上海哔哩哔哩科技有限公司 Realize that quick first frame goes out the video broadcasting method, device and medium of figure based on hybrid decoding

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227590B (en) * 2007-01-19 2013-03-06 北京风行在线技术有限公司 P2P protocol-based media file order program control method and apparatus
CN101127989A (en) * 2007-09-11 2008-02-20 中兴通讯股份有限公司 A method for supporting hypertext transmission stream media service of mobile phone
US20110274178A1 (en) * 2010-05-06 2011-11-10 Canon Kabushiki Kaisha Method and device for parallel decoding of video data units
CN105898551A (en) * 2015-12-18 2016-08-24 乐视云计算有限公司 Network video playing method and device
CN108933764B (en) * 2017-05-26 2022-04-22 中兴通讯股份有限公司 Method and device for realizing quick broadcast starting
CN109474854B (en) * 2018-11-29 2021-09-14 广州市百果园信息技术有限公司 Video playing method, playlist generating method and related equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005318392A (en) * 2004-04-30 2005-11-10 Toshiba Kyaria Kk Communication system and adapter
CN106227583A (en) * 2016-07-18 2016-12-14 青岛科信安全技术有限公司 A kind of multiple thread video Real-time Data Processing Method and device
CN108737893A (en) * 2018-06-05 2018-11-02 上海哔哩哔哩科技有限公司 Realize that quick first frame goes out the video broadcasting method, device and medium of figure based on hybrid decoding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种可扩展的流式解码器的设计与实现;严权锋;《电脑与信息技术》;20071215(第06期);全文 *
基于多核的嵌入式HEVC解码器并行优化;刘鹏等;《单片机与嵌入式系统应用》;20160701(第07期);全文 *

Also Published As

Publication number Publication date
CN111935535A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN110121100B (en) Method, device, terminal and computer readable storage medium for downloading media file
CN108076377B (en) Video storage and playing method and device, electronic equipment and storage medium
JP6314252B2 (en) Network video playback method and apparatus
CN107798064B (en) Page processing method, electronic device and computer readable storage medium
US20190370152A1 (en) Automatic intelligent cloud service testing tool
US20210344584A1 (en) Method for Measuring Network Speed, Computing Device, and Computer-Program Product
CN109064733A (en) Adaptive infrared signal coding/decoding method, computer installation and its control device
CN108833968B (en) Method for caching video and related equipment
CN112416964A (en) Data processing method, device and system, computer equipment and computer readable storage medium
CN113132267B (en) Distributed system, data aggregation method and computer readable storage medium
CN108769830B (en) Method for caching video and related equipment
CN111935535B (en) Data processing method and device, terminal equipment and computer storage medium
CN112235422B (en) Data processing method and device, computer readable storage medium and electronic device
CN112422604B (en) File uploading method, device and system and computer equipment
CN111031117B (en) Multimedia file downloading method and related device
CN110575670B (en) Method for generating configuration strategy of game data and related products
CN112671878A (en) Block chain information subscription method, device, server and storage medium
CN109298928B (en) Service processing method and device
CN105491400B (en) Video stream downloading method and device
CN110650100A (en) Method and device for capturing network card data packet and electronic equipment
CN110727576A (en) Web page testing method, device, equipment and storage medium
CN111193777B (en) File downloading method and device based on breakpoint continuous transmission and storage medium
CN115469991A (en) Timer queue setting method, device and equipment and readable storage medium
CN113656322A (en) Data processing method and device, electronic equipment and computer storage medium
CN113055433A (en) File transmission method, device, equipment and machine-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