A kind of information broadcasting system and method based on Android platform
Technical field
The present invention relates to RSS technical field, especially relate to a kind of information based on Android platform and report systemSystem and method.
Background technology
Universal and fast-developing along with network, internet has been the main channel of obtaining information, more and moreUser obtain news with network. But traditional web page browsing mode has also exposed a lot of problems, such as,Irrelevant advertisement and information a large amount of in webpage have been brought a lot of puzzlements to us, for some portal websites, Wo MenxuJust can see the information that we need through multilayer link, these processes can spend the time that user is very many.
Than traditional browsing mode, RSS can realize easily and converge rapidly relevant information, for user carriesFor fast, accurate location, and upgrade in time. Therefore, RSS technology becomes the focus in network application gradually,Praised highly by increasing user, because it has fundamentally changed the mode of the passive obtaining informations of people, and adoptBy a kind of mechanism of hommization more. RSS technology is widely used in portal website, blog and wiki at present.And because these data are all the XML forms of standard, so also can in other terminal and service, use.The RSSReader that has occurred at present a lot of desktop versions both at home and abroad, obtains lastest imformation with helping user,And manage the RSS channel of oneself subscribing to. But this class desktop version RSSReader is subject to the system in time and spaceApproximately, user is obtaining information whenever and wherever possible, and its traditional reading method is to there being the crowd of certain DyslexiaAs inapplicable in children, the elderly etc., this has all restricted the popularization of such technology.
Summary of the invention
Object of the present invention is exactly to provide a kind of based on Android in order to overcome the defect that above-mentioned prior art existsThe information broadcasting system of platform.
Object of the present invention can be achieved through the following technical solutions: a kind of information based on Android platform is broadcastReporting system, is characterized in that, comprises
Cell-phone customer terminal: a visual platform is provided, and user can operate according to demand;
Information service sub-system: the information that realizes cell-phone customer terminal is downloaded and channel subscription;
Voice service subsystem: the voice broadcast function of realizing cell-phone customer terminal;
Information service support platform: information service is provided, presets the information list of Info channel, carry out dataCollection, the information content that the information searching of uploading according to cell-phone customer terminal is specified also returns to result to described information industryBusiness subsystem;
Phonetic synthesis service platform: civilian language Transformation Service is provided, result is returned to described voice service subsystem;
Described information service support platform is connected with cell-phone customer terminal by information service sub-system, described phonetic synthesisService platform is connected with cell-phone customer terminal by voice service subsystem.
Described information service support platform comprises support interface, database and information website, described database, informationWebsite is connected with information service sub-system by support interface.
Described phonetic synthesis service platform comprises phonetic synthesis interface and voice cloud, and described voice cloud passes through phonetic synthesisInterface is connected with voice service subsystem.
An information broadcasting method based on Android platform, is characterized in that, the method comprises the following steps:
1) timing of information service sub-system is carried out information collection by information service support platform;
2) judge that cell-phone customer terminal, whether to information service sub-system request information service, is to perform step 3),Otherwise turn to step 1);
3) judging cell-phone customer terminal request information service classification, is to browse information content to turn to step 4), is to orderRead Info channel and turn to step 5);
4) information service sub-system is according to the requesting query database content that obtains information, and result is returned to mobile phoneClient, turns to step 6);
5) information service sub-system obtains channel content according to requesting query database, and result is returned to mobile phoneClient;
6) content of acquisition is kept at this locality by cell-phone customer terminal;
7) judge whether cell-phone customer terminal asks voice service subsystem information broadcasting content, is to turn to step 8),Otherwise turn to step 2);
8) voice service subsystem responses request, is audio file by voice cloud by the text-converted of acquisition, handMachine client is carried out voice broadcast to file, successful turn to step 2), make mistakes and finish.
Described in step 1) information service sub-system timing by information service support platform carry out information collection comprise withLower step:
101) information service support platform, by default RSSFeed address, is obtained the content of RSS, makes mistakesFinish;
102) call RSS resolution component, resolve RSSFeed according to RSS document specification and obtain news list,Make mistakes and finish;
103), after the title of obtaining news links with content, judge whether that in addition news do not ask in full, to bePerform step 104), otherwise finish;
104) for headline is calculated MD5 value, and search the record that whether has repetition in database according to this value,To perform step 103), otherwise execution step 105);
105) according to the chained address request full press release of news content;
106), by HTML filter HtmlHelper class, obtain the plain text information of news;
107) news content collecting and relevant information are inserted in database, turn to step 103).
Described in step 3), cell-phone customer terminal request is browsed information content and is comprised the following steps:
301) enter cell-phone customer terminal information list interface, the data in database are initialized, now handNew process of machine client terminal start-up, is in charge of news and reads;
302) news data in file reading format transformation;
303) judge that whether local file is effective, if effectively perform step 304), if invalid execution step307), make mistakes and finish process;
304) continue to judge whether the file update time interval be greater than 24 hours, if perform step 305),Otherwise execution step 306);
305) starting position that replacement information reads, turns to step 308);
306) starting position that information reads is made as the index record in file, turns to step 308);
307) also resolve from network reading out data according to starting position and request quantity, make mistakes and finish process;
308) Domestic News of acquisition is set to current news list, and upgrades list;
309) judge whether the page is rolled to bottom, if starting position is made as original position and adds that the page onceShow quantity, and return to step 307), if not finish process.
Described in step 3), the cell-phone customer terminal Info channel that pulls subscription comprises the following steps:
311) enter channel list interface, initialization data, and start a new management of process channel information and read;
312) read the channel data of network and analyze, finishing process if make mistakes;
313) judge that whether network data is effective, perform step 314 if invalid), if effectively perform step315);
314) load configuration, from local file reading out data parsing;
315) be set to current channel list, and preserve up-to-date data to file, finish process if make mistakes;
316) the subscription situation of searching user is upgraded expandableListView assembly;
317) judge whether in option list selected, if call editor config editor preserve userSubscription information and return to step 315), finish if not process.
Described in step 6), cell-phone customer terminal is kept at this locality by the content of acquisition and comprises the following steps:
601) enter information list interface;
602) start a timed task, management local cache;
603) current index record is set;
604) judge that whether the information of searching download is for not reading, if perform step 605), finish if not intoJourney;
605) obtain the up-to-date set of not reading Domestic News;
606) information and related content are converted to Json string, finish process if make mistakes;
607) be saved in file and finish process.
Described in step 8), cell-phone customer terminal carries out voice broadcast to file and comprises the following steps:
801) enter information list interface, and start Service, Managing speech is reported;
802) the text resource that needs report is set, and segmentation;
803) the synthetic parameter of configured voice;
804) start phonetic synthesis, send broadcast, finish process if make mistakes;
805) judge whether to have synthesized final stage text, if perform step 806), return to if not step804);
806) judge whether to be set to continuous report, report position if next is set, send broadcast and changeCurrent chosen position, finishes process if not.
Between described cell-phone customer terminal and information service sub-system and voice service subsystem, adopt http protocol to enterSerial Communication.
Compared with prior art, the present invention has the following advantages:
1, be easy to carry about with one, facilitate user, user is obtaining information whenever and wherever possible, has broken the system in time and spaceApproximately;
2, system of the present invention can initiatively be propagated product information, sends its concern information, than biography for target audienceSystem publishes and distributes even pc client application and all possesses greater advantages;
3, can develop more services, utilize mobile phone RSS platform can also develop mobile phone B LOG, mobile phone is made friends,Organizing user transmits self-control news, on self-control picture to whole platform, fully ownership's enthusiasm;
4, native system design is unique, utilizes MSP voice cloud platform to realize the function of voice broadcast, has not only reducedThe burden of cell-phone customer terminal, and can make the naturalness of voice higher;
5, the present invention can realize the real-time update of information;
6, the present invention utilizes double buffering technology, for newsletter archive to be reported, first for the reality of networkBandwidth, calculates best single phonetic synthesis text sheet length, then system by two separate threads of scheduling withOver-over mode realizes phonetic synthesis and the broadcasting of text, thereby has ensured the fluency that news is reported, and has promoted userExperience.
Brief description of the drawings
Fig. 1 is the Organization Chart of system of the present invention.
Fig. 2 is the flow chart that information content is browsed in cell-phone customer terminal request of the present invention.
Fig. 3 is the flow chart of information service end response cell-phone customer terminal of the present invention request.
Fig. 4 is the flow chart of cell-phone customer terminal request information broadcasting content of the present invention.
Fig. 5 is the pull subscription flow chart of Info channel of cell-phone customer terminal of the present invention.
Fig. 6 is that content is kept at local flow chart by cell-phone customer terminal of the present invention.
Fig. 7 is cell-phone customer terminal of the present invention carries out voice broadcast flow chart to file.
Detailed description of the invention
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.
As shown in Figure 1, a kind of information broadcasting system based on Android platform, is characterized in that, comprises mobile phoneClient 1, information service sub-system 2, voice service subsystem 3, information service support platform 4 and voice closeBecome service platform 5, described information service support platform 4 connects by information service sub-system 2 and cell-phone customer terminal 1Connect, described phonetic synthesis service platform 5 is connected with cell-phone customer terminal 1 by voice service subsystem 3.
Described information service support platform 4 comprises support interface, database and information website, described database, moneyNews website is connected with information service sub-system by support interface.
Described phonetic synthesis service platform 5 comprises phonetic synthesis interface and voice cloud, and described voice cloud closes by voiceBecome interface to be connected with voice service subsystem.
As shown in Figure 2, a kind of information broadcasting method based on Android platform, is characterized in that the method bagDraw together following steps:
1) timing of information service sub-system is carried out information collection by information service support platform;
2) judge that cell-phone customer terminal, whether to information service sub-system request information service, is to perform step 3),Otherwise turn to step 1);
3) judging cell-phone customer terminal request information service classification, is to browse information content to turn to step 4), is to orderRead Info channel and turn to step 5);
4) information service sub-system is according to the requesting query database content that obtains information, and result is returned to mobile phoneClient, turns to step 6);
5) information service sub-system obtains channel content according to requesting query database, and result is returned to mobile phoneClient;
6) content of acquisition is kept at this locality by cell-phone customer terminal;
7) judge whether cell-phone customer terminal asks voice service subsystem information broadcasting content, is to turn to step 8),Otherwise turn to step 2);
8) voice service subsystem responses request, is audio file by voice cloud by the text-converted of acquisition, handMachine client is carried out voice broadcast to file, successful turn to step 2), make mistakes and finish.
As shown in Figure 3, described in step 1), the timing of information service sub-system provides by information service support platformNews collection comprises the following steps:
101) information service support platform, by default RSSFeed address, is obtained the content of RSS, makes mistakesFinish;
102) call RSS resolution component, resolve RSSFeed according to RSS document specification and obtain news list,Make mistakes and finish;
103), after the title of obtaining news links with content, judge whether that in addition news do not ask in full, to bePerform step 104), otherwise finish;
104) for headline is calculated MD5 value, and search the record that whether has repetition in database according to this value,To perform step 103), otherwise execution step 105);
105) according to the chained address request full press release of news content;
106), by HTML filter HtmlHelper class, obtain the plain text information of news;
107) news content collecting and relevant information are inserted in database, turn to step 103).
As shown in Figure 4, described in step 3), cell-phone customer terminal request is browsed information content and is comprised the following steps:
301) enter cell-phone customer terminal information list interface, the data in database are initialized, now handNew process of machine client terminal start-up, is in charge of news and reads;
302) news data in file reading format transformation;
303) judge that whether local file is effective, if effectively perform step 304), if invalid execution step307), make mistakes and finish process;
304) continue to judge whether the file update time interval be greater than 24 hours, if perform step 305),Otherwise execution step 306);
305) starting position that replacement information reads, turns to step 308);
306) starting position that information reads is made as the index record in file, turns to step 308);
307) also resolve from network reading out data according to starting position and request quantity, make mistakes and finish process;
308) Domestic News of acquisition is set to current news list, and upgrades list;
309) judge whether the page is rolled to bottom, if starting position is made as original position and adds that the page onceShow quantity, and return to step 307), if not finish process.
As shown in Figure 5, described in step 3), the cell-phone customer terminal Info channel that pulls subscription comprises the following steps:
311) enter channel list interface, initialization data, and start a new management of process channel information and read;
312) read the channel data of network and analyze, finishing process if make mistakes;
313) judge that whether network data is effective, perform step 314 if invalid), if effectively perform step315);
314) call LoadConfig control, from local file reading out data parsing;
315) be set to current channel list, and preserve up-to-date data to file, finish process if make mistakes;
316) the subscription situation of searching user is upgraded expandableListView assembly;
317) judge whether in option list selected, if call editor config editor preserve userSubscription information and return to step 315), finish if not process.
As shown in Figure 6, described in step 6), cell-phone customer terminal is kept at this locality by the content of acquisition and comprises the following steps:
601) enter information list interface;
602) start a timed task, management local cache;
603) call setListIndex, current index record is set;
604) judge that whether the information of searching download is for not reading, if perform step 605), finish if not intoJourney;
605) obtain the up-to-date set of not reading Domestic News;
606) information and related content are converted to Json string, finish process if make mistakes;
607) be saved in file and finish process.
As shown in Figure 7, described in step 8), cell-phone customer terminal carries out voice broadcast to file and comprises the following steps:
801) enter information list interface, and start Service, Managing speech is reported;
802) call setDataSource the text resource that needs report is set, and segmentation;
803) the synthetic parameter of configured voice;
804) call playVoice and start phonetic synthesis, send broadcast, finish process if make mistakes;
805) judge whether to have synthesized final stage text, if perform step 806), return to if not step804);
806) judge whether to be set to continuous report, report position if next is set, send broadcast and changeCurrent chosen position, finishes process if not.
Between described cell-phone customer terminal and information service sub-system and voice service subsystem, adopt http protocol to enterSerial Communication.
The present invention, in traditional RSS technical foundation, embeds voice SDK and has realized frequently in individual terminal devicesThe function synthetic technology of reporting with information is subscribed in road, and system has been used voice cloud client MSC, after MSPPlatform voice synthesizing server, the client using to user provides the Composite tone of high-quality, believes by " listening "Breath instead of " seeing " information are carried out the channel of obtaining information, for terminal device provides more freely man-machine alternately easilyInterface.
Compared with prior art, the present invention adopts domestic advanced person's voice verification technology, and voice naturalness is higher, andThe functions such as subscribe to news, the optional report of men and women's sound, news duplicate removal, the optional report of background music, real-time sharing are given and are usedBetter reading experience is brought at family. Highly smooth, natural sound information not only can make up the defect that tradition is read,Especially to having the crowd of certain Dyslexia as children, the elderly etc., there is natural that traditional reading cannot make upAdvantage. By voice broadcast, improve the experience that user radio is read, allow user enjoy the enjoyment of " listening information ".