CN102098446A - Real-time data storage method and device for caption broadcasting system - Google Patents

Real-time data storage method and device for caption broadcasting system Download PDF

Info

Publication number
CN102098446A
CN102098446A CN2009102426116A CN200910242611A CN102098446A CN 102098446 A CN102098446 A CN 102098446A CN 2009102426116 A CN2009102426116 A CN 2009102426116A CN 200910242611 A CN200910242611 A CN 200910242611A CN 102098446 A CN102098446 A CN 102098446A
Authority
CN
China
Prior art keywords
variable
data
caption
caption data
time
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.)
Granted
Application number
CN2009102426116A
Other languages
Chinese (zh)
Other versions
CN102098446B (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.)
China Digital Video Beijing Ltd
Original Assignee
China Digital Video Beijing 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 China Digital Video Beijing Ltd filed Critical China Digital Video Beijing Ltd
Priority to CN200910242611.6A priority Critical patent/CN102098446B/en
Publication of CN102098446A publication Critical patent/CN102098446A/en
Application granted granted Critical
Publication of CN102098446B publication Critical patent/CN102098446B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a real-time data storage method and a real-time data storage device for a caption broadcasting system. The real-time data storage method comprises the following steps of: presetting a variable comprising a variable name field and a variable value field, wherein the contents of the variable name field are stored into a database, and the contents of the variable value field are stored into a memory variable pool; receiving caption data from a third party in real time; and updating the received caption data into the variable value field corresponding to the memory variable pool. In the method and the device, address query is not required to be performed in the database to call the caption data, and the data is read from a memory by directly calling a value of the variable; and compared with a disk database, the device shortens consumed time in the reading of a magnetic head, increases the reading speed of the caption data and ensures the real-time of data reading.

Description

A kind of method for storing real-time data and device that is used for the captions broadcast system
Technical field
The present invention relates to technical field of data storage, particularly relate to a kind of method for storing real-time data and device that is used for the captions broadcast system.
Background technology
The captions of captions broadcast system are made, and need the displaying contents of lot of data information as captions sometimes, and this data message generally are to read to obtain from database.Normally, the third party provides caption data, deposits this caption data in database then, in database, do corresponding configuration, the address is set, then captions making side, from this database, inquire about, access needed caption data, be made into corresponding captions and broadcast.
In some cases, data the having relatively high expectations of making for captions to real-time.And behind the data loading, carry out address configuration, and pass through address lookup again, access data then, the process of its experience has certain delay, and this delay can influence the real-time that captions show.
For example, the clock captions in the sports tournament live telecast are just very high to the requirement of real-time.According to the clock timing of in-situ match, on video screen, show the corresponding clock captions, this clock data is provided by the third party, deposits database earlier in, is accessed by the captions manufacturing system again, generates corresponding captions.Because the process that deposits database in and access data, the clock captions of the demonstration on video screen clock reality common and in-situ match is inconsistent.Be embodied in: when on-the-spot recorded video photographed the electrical screen of on-the-spot match, the clock on the electrical screen on this video can cause the inconsistent of picture than the clock captions on the screen in advance, has produced certain influence.
In a word, need the urgent technical problem that solves of those skilled in the art to be exactly: how a kind of method for storing real-time data that is used for the captions broadcast system can be provided, guarantee the real-time that caption data reads.
Summary of the invention
Technical problem to be solved by this invention provides a kind of method for storing real-time data of captions broadcast system, guarantees the real-time that caption data reads.
In order to address the above problem, the invention discloses a kind of method for storing real-time data that is used for the captions broadcast system, comprising:
Set in advance variable, described variable comprises field: name variable and variate-value; Wherein, the content of name variable field deposits in the database, and the content of variate-value field deposits in the memory variable pond;
Receive the caption data that the third party sends in real time;
The caption data that receives is updated in the variate-value field of memory variable pond correspondence.
Further, described method also comprises: obtain the corresponding name variable of caption object from database, set up the mapping relations of caption object and variable.
Further, described method also comprises: according to described mapping relations from the variate-value field of memory variable pond correspondence according to preset time at interval, read caption data in real time, as the content of caption object.
Preferably, described caption data is: clock data.
Preferably, described variable is a plurality of variablees;
Then, the caption data type according to receiving is updated to caption data in the variate-value field of memory variable pond correspondence.
According to another embodiment of the present invention, also disclose a kind of real-time data memory device that is used for the captions broadcast system, having comprised:
The unit is set, is used to set in advance variable, described variable comprises field: name variable and variate-value; Wherein, the content of name variable field deposits in the database, and the content of described variate-value field deposits in the memory variable pond;
Receiving element is used for receiving in real time the caption data that the third party sends;
Updating block, the caption data that is used for receiving are updated to the variate-value field of memory variable pond correspondence.
Further, described device also comprises: map unit, be used for obtaining the corresponding name variable of caption object from database, and set up the mapping relations of caption object and variable.
Further, described device also comprises: reading unit is used for reading caption data in real time, as the content of caption object according to described mapping relations from the variate-value field in memory variable pond according to preset time at interval.
Preferably, described caption data is: clock data.
Preferably, the described unit that is provided with sets in advance a plurality of variablees;
Then, described updating block is updated to caption data in the variate-value field of memory variable pond correspondence according to the caption data type that receives.
Compared with prior art, the present invention has the following advantages:
The present invention is by setting in advance variable, and the content of name variable field is deposited in the database, and the content of variate-value field deposits in the memory variable pond; The caption data that will receive third party's transmission then is updated in the variate-value field of memory variable pond correspondence.Pass through the embodiment of the invention, caption data writes direct in the memory variable pond, rather than deposit database in and carry out address configuration, then when obtaining caption data, need not to understand the address of variable in calculator memory, need only the value that just can obtain variable by the variable name reference to variable, directly from internal memory, read, and need in database, not carry out accessing caption data again behind the address lookup, guarantee the real-time of data read.And, than disk database, reduced expending time in when magnetic head reads, improved the reading speed of caption data.
In addition, the present invention passes through default a plurality of variablees, and sets up the mapping relations of a plurality of variablees and each captions, at different captions, reads the variables corresponding value from internal memory, has guaranteed that to realize various captions the real-time of a plurality of clock captions shows.
Further, the preferred caption data of the present invention is a clock data, and this caption data is stored as character string, then broadcasts end at captions and need not to carry out the processing of any form, obtains the back and just can directly broadcast, and is convenient, fast.
Description of drawings
Fig. 1 is a kind of flow chart that is used for the method for storing real-time data embodiment one of captions broadcast system of the present invention;
Fig. 2 is a kind of flow chart that is used for the method for storing real-time data embodiment two of captions broadcast system of the present invention;
Fig. 3 is a kind of structure chart that is used for the real-time data memory device embodiment of captions broadcast system of the present invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
Core idea of the present invention is: by design variables, with the value that the caption data of a large amount of real-time change is given variable, be stored in the memory variable pond, only deposit name variable in the database.By date storage method of the present invention, when the external call caption data, do not need by address lookup, only need directly from internal memory, to read the variables corresponding value, just can obtain the caption data of real-time.
With reference to Fig. 1, show a kind of flow chart that is used for the method for storing real-time data embodiment one of captions broadcast system of the present invention, comprising:
Step 101 sets in advance variable, and described variable comprises field: name variable and variate-value; Wherein, the content of name variable field deposits in the database, and the content of variate-value field deposits in the memory variable pond;
Be directed to the caption data of real-time change, a variable at first is set.
Below, variable is described explanation.Variable is meant the amount that can change at any time in the running of program.Variable be in the program data deposit the place temporarily.In code, can only use a variable, also can use a plurality of variablees, can deposit word, numerical value, date and attribute in the variable.Because variable can all be composed each segment data of preparing in the program to use to brief, as to be easy to a remember name, so it is very useful.
This step user creates the variable that oneself needs, so that deposit ephemeral data in the program process or result data or the like.Described variable comprises field: name variable and variate-value.When definition and use variable, to be defined as variable name easy use reading and can describe the title of contained data use usually, and not use some abbreviations hard to understand.
Be different from prior art, name variable and variate-value all leave in the database.The title of embodiment of the invention storage of variables in database promptly can know wherein deposited which variable by database.In addition, in internal memory, open up a memory variable pond, be specifically designed to and deposit variate-value.
Step 102 receives the caption data that the third party sends in real time;
Caption data according to the third party sends carries out the reception of caption data in real time, i.e. the frequency of caption data transmission is identical with the frequency of reception.
Step 103 is updated to the caption data that receives in the variate-value field of memory variable pond correspondence.
Accordingly, the caption data that the third party provides is not to deposit in the database, but writes in the described memory variable pond, as the value of variable.Because these data are real-time change, according to the frequency that receives, the data content in the variate-value field constantly upgrades variation.Concrete, described being updated to: with the legacy data in the caption data covering variate-value field that receives.
During beginning, for the acquiescence initial value, behind the caption data that receives third party's transmission, new caption data is covered in the variables corresponding value field in the variate-value field.Perhaps begin to be sky in the variate-value field, behind the caption data that receives third party's transmission, new caption data directly is filled in the variables corresponding value field, afterwards, constantly receive new caption data, constantly carry out the covering of original caption data, keep there is up-to-date caption data all the time in the memory variable pond.
Pass through the embodiment of the invention, caption data writes direct in the memory variable pond, and does not deposit database in, carries out address configuration, then when obtaining caption data, directly from internal memory, read,, reduced expending time in when magnetic head reads than disk database, and need in database, not carry out accessing data again behind the address lookup, this kind storage means has improved the reading speed of caption data, has guaranteed the real-time of data read.
With reference to Fig. 2, show a kind of flow chart that is used for the method for storing real-time data embodiment of captions broadcast system of the present invention, comprising:
Step 201 sets in advance variable, and described variable comprises field: name variable and variate-value; Wherein, the content of name variable field deposits in the database, and the content of variate-value field deposits in the memory variable pond;
The embodiment of the invention is directed to the captions broadcast system of competitive sports especially, and described data are used for the data that the competitive sports real-time is had relatively high expectations.In a preferred embodiment of the invention, described caption data is: clock data.
Below, broadcasting with the captions of Basketball Match is that example is elaborated.At first, design variables.According to laws of the game, schedules are divided into four trifles, and each trifle fixture is 12 minutes; And when a team member on the field obtained to control live ball, this team must attempt shooting in 24 seconds, and ball must leave team member's hand.Then this captions broadcast system need show the caption data of 12 fens elapsed time clock captions and two real-times of 24 seconds elapsed time clock captions.
Then default two variablees: a variable is directed to timing in 12 fens, indication residue fixture, and its name variable is time_12; Another variable is directed to timing in 24 seconds, and the indication ball-handling time, its name variable is time_24.
Further, deposit the content in the name variable field in database, promptly store in database: time_12, time_24 if the caption data of other real-times is arranged, can also comprise the name variable of other design variables.
In the variable pond of internal memory, be specifically designed to the variate-value of depositing each variable.If the initial default value of each variable is zero, then at this moment, time_12=0, time_24=0.
Be appreciated that in database also store the less demanding variable of real-time, its name variable and variate-value all are stored in the database.For example than divided data.
Step 202 is obtained the corresponding name variable of caption object from database, set up the mapping relations of caption object and variable;
After variable is set, need carry out correspondence one by one to each variable and captions, in embodiments of the present invention, the caption object that needs to broadcast is: 12 fens elapsed time clock captions and 24 seconds elapsed time clock captions.It is corresponding with variable time_12 that 12 fens elapsed time clock captions then are set; The elapsed time clock captions were corresponding with variable time_24 in 24 seconds.
Step 203 receives the caption data that the third party sends in real time;
The data that are used to make the clock captions provide by the third party, and described third party is positioned at the Basketball Match scene, carries out the collection and the issue of clock data.Because issue may be multiple caption data,, can perhaps by different transmit port and receiving ports, know the type that receives caption data in the enterprising row labels of this caption data in order to distinguish various caption data types.
Step 204, according to the caption data type that receives, with the Data Update that receives to the variate-value field of memory variable pond correspondence;
During beginning, for the acquiescence initial value of zero, behind the caption data that receives third party's transmission, it is inserted in the variables corresponding value field in the variate-value field according to the type of these data.Change because the data that receive are continuitys,, just it is covered to original data, guarantee constantly to keep in the variate-value field up-to-date caption data so receive each data afterwards.
For example, what receive third party's transmission is 12 fens elapsed time clock data, is followed successively by:
“12:00”,“11:59”,“11:58”,“11:57”......
When countdown is " 10:37 ", side team request suspension, then this moment, the third party no longer sent this caption data,
Accordingly, the caption data in the variate-value field of memory variable pond correspondence upgrades successively, and then the value of variable time_12 is followed successively by:
time_12=12:00,time_12=11:59,time_12=11:58,
Time_12=11:57...... up to time_12=10:37.
Step 205, according to described mapping relations from the variate-value field of memory variable pond correspondence according to preset time at interval, read caption data in real time, as the content of caption object.
When the user need begin to broadcast captions, artificial send a readout data signal, from the variate-value field of memory variable pond correspondence, read caption data according to mapping relations then, as the content of caption object.
Be appreciated that, according to the time interval of caption data renewal in the memory variable pond, corresponding time for reading can be set at interval, for example, for 12 fens elapsed time clock data, it upgraded at interval and was generally 1 second, promptly received a caption data every 1 second, then corresponding, the time for reading that caption data is set is spaced apart one second.And for example, some match is during with millisecond meter, and as dash etc., the data break of reception is a Millisecond, and then corresponding preset time is spaced apart 1 millisecond.
In the present embodiment, when the user need play 12 fens elapsed time clock captions, send a triggering signal, according to mapping relations, these captions and variable time_12 have corresponding mapping relations, then directly go to read caption data in the variables corresponding value field in the internal memory.
Then according to variate-value, read once every one second, the content of caption object is shown as successively:
“12:00”,“11:59”,“11:58”,“11:57”......“10:37”。
Owing to, call the time at " 10:37 ", do not receive new caption data, at this moment, the variables corresponding value no longer takes place to upgrade and changes, and remains " 10:37 " always, and corresponding, caption content also rests on " 10:37 ", remains unchanged.
Further, when match recovers to carry out, continue to enter the trifle countdown stage, in succession the time of interrupting last time, at this moment, the caption data that receives third party's transmission is followed successively by from " 10:37 ":
" 10:36 ", " 10:35 ", " 10:34 " ... end once more up to the match timing.
Accordingly, variate-value is changed to the above-mentioned caption data that receives successively:
time_12=10:36,time_12=10:35,time_12=10:34......
Accordingly,, from the memory variable pond, read out described caption data successively, broadcast demonstration as captions according to preset time.
Need to prove, behind operation start, described step 203, sequencing on step 204 and step 205 do not have to carry out, on the one hand, receiving terminal constantly receives the caption data that the third party provides, and be updated in the variate-value field of memory variable pond correspondence thereupon, on the other hand, captions broadcast end and constantly read caption data from internal memories, constantly upgrade and write on one side, constantly read on one side, what deposit in the assurance internal memory is up-to-date caption data, and what read from internal memory also is up-to-date caption data.
By the embodiment of the invention, do not need to understand the address of variable in calculator memory, need only the value that just can obtain variable by the variable name reference to variable, guaranteed the real-time that caption data reads.By default a plurality of variablees, and set up the mapping relations of a plurality of variablees and each captions, at different captions, from internal memory, read the variables corresponding value, to realize the real-time demonstration of various captions.
The preferred caption data of the embodiment of the invention is a clock data, this clock data is stored as character string, then broadcasts end at captions and need not to carry out the processing of any form, obtains the back and just can directly broadcast, convenient, fast, guaranteed the real-time that the clock captions show.
With reference to Fig. 3, show a kind of structure chart that is used for the real-time data memory device embodiment of captions broadcast system of the present invention, comprising:
Unit 301 is set, is used to set in advance variable, described variable comprises field: name variable and variate-value; Wherein, the content of name variable field deposits in the database, and the content of described variate-value field deposits in the memory variable pond;
Receiving element 302 is used for receiving in real time the caption data that the third party sends;
Updating block 303 is used for the Data Update that will the receive variate-value field to memory variable pond correspondence.
Further, described device also comprises:
Map unit is used for obtaining the corresponding name variable of caption object from database, sets up the mapping relations of caption object and variable.
Further, described device also comprises:
Reading unit is used for reading caption data in real time, as the content of caption object according to described mapping relations from the variate-value field in memory variable pond according to preset time at interval.Then by described mapping relations, this caption object is directly obtained the value of variable by the variable name reference to variable from internal memory.
In a preferred embodiment of the invention, described caption data is: clock data.
In order to realize reading of many middle real-time data, in a preferred embodiment of the invention, the described unit that is provided with sets in advance a plurality of variablees; Then, described updating block is updated to caption data in the variate-value field of memory variable pond correspondence according to the caption data type that receives.
Each embodiment in this specification all adopts the mode of going forward one by one to describe, and what each embodiment stressed all is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For device embodiment, because it is similar substantially to method embodiment, so description is fairly simple, relevant part gets final product referring to the part explanation of method embodiment.
More than to a kind of method for storing real-time data and device that is used for the captions broadcast system provided by the present invention, be described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. a method for storing real-time data that is used for the captions broadcast system is characterized in that, comprising:
Set in advance variable, described variable comprises field: name variable and variate-value; Wherein, the content of name variable field deposits in the database, and the content of variate-value field deposits in the memory variable pond;
Receive the caption data that the third party sends in real time;
The caption data that receives is updated in the variate-value field of memory variable pond correspondence.
2. the method for claim 1 is characterized in that, also comprises:
From database, obtain the corresponding name variable of caption object, set up the mapping relations of caption object and variable.
3. method as claimed in claim 2 is characterized in that, also comprises:
According to described mapping relations from the variate-value field of memory variable pond correspondence according to preset time at interval, read caption data in real time, as the content of caption object.
4. the method for claim 1 is characterized in that,
Described caption data is: clock data.
5. the method for claim 1 is characterized in that,
Described variable is a plurality of variablees;
Then, the caption data type according to receiving is updated to caption data in the variate-value field of memory variable pond correspondence.
6. a real-time data memory device that is used for the captions broadcast system is characterized in that, comprising:
The unit is set, is used to set in advance variable, described variable comprises field: name variable and variate-value; Wherein, the content of name variable field deposits in the database, and the content of described variate-value field deposits in the memory variable pond;
Receiving element is used for receiving in real time the caption data that the third party sends;
Updating block, the caption data that is used for receiving are updated to the variate-value field of memory variable pond correspondence.
7. device as claimed in claim 6 is characterized in that, also comprises:
Map unit is used for obtaining the corresponding name variable of caption object from database, sets up the mapping relations of caption object and variable.
8. device as claimed in claim 7 is characterized in that, also comprises:
Reading unit is used for reading caption data in real time, as the content of caption object according to described mapping relations from the variate-value field in memory variable pond according to preset time at interval.
9. device as claimed in claim 6 is characterized in that,
Described caption data is: clock data.
10. device as claimed in claim 6 is characterized in that,
The described unit that is provided with sets in advance a plurality of variablees;
Then, described updating block is updated to caption data in the variate-value field of memory variable pond correspondence according to the caption data type that receives.
CN200910242611.6A 2009-12-09 2009-12-09 Real-time data storage method and device for caption broadcasting system Expired - Fee Related CN102098446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910242611.6A CN102098446B (en) 2009-12-09 2009-12-09 Real-time data storage method and device for caption broadcasting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910242611.6A CN102098446B (en) 2009-12-09 2009-12-09 Real-time data storage method and device for caption broadcasting system

Publications (2)

Publication Number Publication Date
CN102098446A true CN102098446A (en) 2011-06-15
CN102098446B CN102098446B (en) 2015-05-27

Family

ID=44131293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910242611.6A Expired - Fee Related CN102098446B (en) 2009-12-09 2009-12-09 Real-time data storage method and device for caption broadcasting system

Country Status (1)

Country Link
CN (1) CN102098446B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327398A (en) * 2012-03-20 2013-09-25 君尊科技股份有限公司 Subtitle synchronization method applied to set top box and intelligent television and interactive language learning system thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100517051C (en) * 2005-09-22 2009-07-22 联想(北京)有限公司 Projector capable playing captions and caption playing method
CN101222592B (en) * 2007-01-11 2010-09-15 深圳Tcl新技术有限公司 Closed subtitling display equipment and method
CN101082928B (en) * 2007-06-25 2010-11-24 腾讯科技(深圳)有限公司 Method for accessing database and data-base mapping system
CN101494747B (en) * 2009-02-24 2010-12-29 山东泰信电子有限公司 Method for displaying roll titles based on digital television set-top box

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327398A (en) * 2012-03-20 2013-09-25 君尊科技股份有限公司 Subtitle synchronization method applied to set top box and intelligent television and interactive language learning system thereof

Also Published As

Publication number Publication date
CN102098446B (en) 2015-05-27

Similar Documents

Publication Publication Date Title
CN102098454B (en) Real-time caption broadcasting system and method
CN102782665B (en) In data storage device place combination user content and supplemental content
CN109792500A (en) Show non-temporal boundary content
CN100517209C (en) System and method for synchronous reproduction of local and remote content in a communication network
CN111182321B (en) Method, device and system for processing information
CN100393068C (en) Method for buffering data in stream media
CN106791953B (en) Multi-player control method, server and client
CN106331877A (en) Bullet screen playing method and device
CN109168021A (en) A kind of method and device of plug-flow
CN105912474A (en) Game online debugging method and system as well as edit server
CN103914470A (en) Three-dimensional electronic map information management method and system
CN106162357B (en) Obtain the method and device of video content
CN103957240A (en) Weather system capable of shooting pictures in real time and conducting sharing and implementation method of weather system capable of shooting pictures in real time and conducting sharing
CN103607631A (en) Carousel program introduction method and device of intelligent TV set
CN111901619A (en) Message pushing method and device
CN102098446A (en) Real-time data storage method and device for caption broadcasting system
EP2175412A1 (en) Promotional material playback upon trigger event
CN104581226A (en) Method and device for recommending programs by aiming at current live stream
CN101494755B (en) Recording device and recording method
CN106534950A (en) Controlling method and device for media scanning and playing
CN106576181A (en) Method and system for backward recording
CN110446096A (en) Video broadcasting method, device and storage medium a kind of while recorded
CN103297516A (en) Multi-type providing method, multi-type providing system and multi-type providing device of applications
CN107172493B (en) OTA (over the air) upgrading method compatible with different partition types
CN104618814A (en) Television interactive communication method, television terminal and television remote controller

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150527

Termination date: 20161209