Embodiment
By describing technology contents of the present invention in detail, realized object and effect, accompanying drawing is coordinated to be explained below in conjunction with embodiment.
The design of most critical of the present invention is: write corresponding configuration file according to the song of song-order machine, singer's situation of classifying, and generate sorted table and grouped data according to configuration file, sorted table described in mobile phone-downloaded and grouped data also show according to sorted table, thus ensure that singer on mobile phone, categorizing songs are identical with the classification on song-order machine.
Please refer to Fig. 1, a kind of method that singer and categorizing songs obtain, comprise the following steps:
S1, write the classification configurations file corresponding with singer in song-order machine, categorizing songs, and described configuration file is preset in service end;
S2, service end generate the readable database sorted table of mobile phone and grouped data according to described configuration file;
S3, mobile phone and described service end connect, and download described database sorted table and grouped data after connecting;
Described database sorted table resolved by S4, mobile phone, and according to the singer in described database sorted table display grouped data and song.
From foregoing description, beneficial effect of the present invention is: KTV service end of the present invention is according to the singer in song-order machine, categorizing songs situation writes the configuration file corresponded, and generate the readable sorted table of mobile phone and grouped data according to configuration file, when mobile phone connects described service end, described sorted table and grouped data are downloaded in mobile phone, mobile phone is according to described sorted table and grouped data display singer, categorizing songs, thus the singer that guarantee mobile phone shows, the singer that categorizing songs and song-order machine show, categorizing songs is consistent, thus greatly facilitate requesting song operation.Meanwhile, the present invention makes mobile phone request a song APP can compatible multiple languages song-order machine set-top box application, and different K TV customizes the mode classification in place, adds the dirigibility of mobile phone requesting song APP.
Further, described " mobile phone and described service end connect " is specially: service end sets up http server, mobile phone and http server are set up communication and are connected (after mobile phone is connected authorizes with requesting song, relevant resource is downloaded from http server by HTTP mode, use http protocol, the scheme of existing stable transfer file can be used).
Further, the method that this singer and categorizing songs obtain also comprises step: when service end upgrades singer, the categorizing songs of song-order machine, the described classification configurations file of corresponding amendment.Because the bent storehouse in the song-order machine of KTV often needs updating maintenance, therefore classification configurations file and the singer in song-order machine, categorizing songs can be made identical by the described classification configurations file of amendment, thus make the sorted table that downloads in mobile phone identical with the classification in song-order machine with grouped data.
Further, described grouped data includes multiple subtype set, also comprise in described " singer in display grouped data and song " time: judge whether that needing to obtain subtype set generates goal set, if so, then corresponding subtype is carried out subtype set corresponding to combination producing to carry out showing (it is generate when " configuration file generates the readable sorted table of mobile phone and grouped data " that this subtype set generates goal set).
Seen from the above description, grouped data is stored by multiple subtype rendezvous scheme, be convenient to song on the one hand and store and updating maintenance, be also convenient to show according to the subtype set of sorted table by correspondence simultaneously.Such as, described grouped data comprises Hong Kong and Taiwan man singer, Hong Kong and Taiwan female singer, continent man singer, continent female singer, American-European male singer and American-European female singer, when categorizing songs in song-order machine revised by needs, can directly carry out merging or splitting in units of subtype set, as Hong Kong and Taiwan female singer and continent female singer are merged into Chinese female singer, Hong Kong and Taiwan man singer and continent man singer merge into Chinese man singer.
Further, described configuration file comprises multiple configuration record, each configuration record represents a song or singer's sorting item, and each configuration record comprises configuration item numbering, classification name, configuration item type, source table name, the set of source classification subtype, target table name and the set of target classification subtype.
Please refer to Fig. 2, another technical scheme provided by the invention is: the device that a kind of singer and categorizing songs obtain, and comprises preset module 10, generation module 20, download module 30 and display module 40;
Described configuration file for writing the classification configurations file corresponding with singer in song-order machine, categorizing songs, and is preset in service end by described preset module 10;
Described generation module 20 generates the readable database sorted table of mobile phone and grouped data for service end according to described configuration file;
Described download module 30 connects for mobile phone and described service end, downloads described database sorted table and grouped data after connecting;
Described display module 40 resolves described database sorted table for mobile phone, and according to the singer in described database sorted table display grouped data and song.
As seen from the above description, the classification that this singer and the device that categorizing songs obtains make mobile phone request a song on the singer of APP, categorizing songs and song-order machine is identical, be convenient to be requested a song by mobile phone, also make mobile phone request a song APP can compatible multiple languages song-order machine set-top box application simultaneously, and different K TV customizes the mode classification in place, add the dirigibility of mobile phone requesting song APP.
Further, the device that described singer and categorizing songs obtain also comprises update module, and described update module is used for when service end upgrades singer, the categorizing songs of song-order machine, the described classification configurations file of corresponding amendment.
Seen from the above description, update module make classification configurations file and singer, categorizing songs table after upgrading consistent, thus ensure to be downloaded to sorted table in mobile phone and grouped data and song-order machine interior classify consistent.
Further, described display module 40 also comprises judging unit, and described judging unit is used for judging whether that needing to obtain subtype set generates goal set, and the subtype set if so, then corresponding subtype being carried out combination producing corresponding shows.
Seen from the above description, grouped data is stored by multiple subtype rendezvous scheme, be convenient to song on the one hand and store and updating maintenance, be also convenient to show according to the subtype set of sorted table by correspondence simultaneously.
Please refer to Fig. 3, embodiments of the invention one are: a kind of method that KTV mobile phone requesting song APP singer and categorizing songs obtain, and comprise step:
Write the classification configurations file of the singer in KTV song-order machine, categorizing songs;
KTV service end is according to the sorted table of described classification configurations file generated song database and grouped data;
Mobile phone requesting song APP and KTV service end is set up communication and is connected, and downloads described database sorted table and grouped data after connecting;
Mobile phone A PP resolves the sorted table of song database and grouped data, reads out singer's sorted table and song classification data, and the grouped data of sorted table is presented in the classification of mobile phone A PP.
The packet that mobile phone has been downloaded contains classification and grouped data, reads the classification of having downloaded, display classification; When there being request to enter classification, then show grouped data.After the program realizes, when there is data Classification Change.
Can carry out further inquiring about by the singer that shows in mobile phone A PP, categorizing songs, request a song, push up song, cut the operations such as song.
Wherein, as shown in Table 1, the song data information definition in song-order machine contains song number, song names, types of songs etc.;
Song number |
Song names |
Types of songs |
…… |
9000111 |
The love of thank you |
0 |
…… |
9000112 |
China's heart |
1 |
…… |
9000113 |
Everybody |
2 |
…… |
…… |
…… |
…… |
…… |
Table one
In table one, types of songs 0 represents Guangdong language song, and 1 represents national language song, and 2 represent English songs.
As shown in Table 2, the definition of singer's data message contains singer's numbering, singer's name, singer's type etc.;
Singer numbers |
Singer's name |
Singer's type |
…… |
1232 |
Xie Tingfeng |
12 |
…… |
1233 |
Sun Nan |
13 |
…… |
1234 |
Backstreet Boys |
14 |
…… |
…… |
…… |
…… |
…… |
Table two
In table two, singer's Class1 2 represents Hong Kong and Taiwan male star, and 13 represent continent male star, and 14 represent foreign country's combination; As shown in Table 3, for the configuration file format of singer, song classification data defines;
Table three
In table three, every a line configuration record, practical two vertical line segmentation between configuration item and configuration item, example is as follows:
Configuration item is numbered || classification name || and configuration item type || source table name (or source file path) || the set of source classification subtype || target table name || the set of target classification subtype.
Explanation of field in table three is as follows:
Configuration item is numbered: mobile phone A PP obtains the song data of the information service end of this configuration item by configuration item numbering;
Classification name: be presented at the readable character on mobile phone A PP interface;
Configuration item type: 0 represents that the Data Source in the classification of this configuration item is tables of data, and 1 represents that the Data Source in the classification of this configuration item is certain data file;
Source classification type set: represent when needing to obtain relevant Source Type set (the source data classification type that subtype set refers to; Generation module is combined according to the grouped data of the type that configuration file classifies source data, outputs to goal set) generate goal set, can be combined by Source Type, generate corresponding target type set ,-1 represents whole sources classification type;
Target table name: mobile phone A PP can be filled in the list of this classification type by the data query of target table name;
Target classification type set: mobile phone A PP can obtain relevant type set by this field, and-1 expression can combine whole type set.
Wherein, " KTV service end is according to the sorted table of described classification configurations file generated song database and grouped data " is specially: the sorted table that can read the configuration item numbering in configuration file, specific name, the set of target classification type and target table name generation mobile phone A PP and sorted table data, as shown in Table 4, described grouped data is the concrete data of each classification in sorted table to described sorted table;
Configuration item is numbered |
Classification name |
Target table name |
The set of target classification type |
1 |
Whole song |
Song information table 1 |
-1 |
2 |
National language song |
National language song table |
0,1 |
3 |
English songs |
English songs table |
-1 |
Table four
The configuration of singer's classification is consistent with the layoutprocedure of above-mentioned categorizing songs with generation.
In the above process, carry out " judge whether to need to obtain subtype set and generate goal set " this step, such as, only " configuration item numbering, specific name, the set of target classification type and target table name " these four projects are needed in mobile phone A PP, by the sundry item in classification configurations file, such as configuration item types etc. need to delete, display content as shown in Table 4 on last mobile phone A PP.
Described " mobile phone requesting song APP and KTV service end is set up communication and connected, and downloads described database sorted table and grouped data after connecting " is specially:
Set up http server in KTV service end (song-order machine also can as service end), mobile phone requesting song APP is connected with http server, and by HTTP request download package contains singer, the mobile phone A PP of categorizing songs table can read database file.
Mobile phone A PP reads the inquiry of singer, categorizing songs and resource and comprises step:
Mobile phone requesting song APP obtains the configuration information of this classification in sorted table;
According to configuration information, read corresponding data from object table, need to filter out these subtype if Target subtype set has subtype to configure.
In sum, the method that singer provided by the invention and categorizing songs obtain and device make request a song singer in singer in APP, categorizing songs and song-order machine Set Top Box, categorizing songs of mobile phone independently open, ensure that singer, categorizing songs in mobile phone requesting song APP are identical with the classification in song-order machine Set Top Box simultaneously, be convenient to requesting song operation, also make mobile phone can the set-top box application of compatible multi-lingual environment simultaneously, and different K TV customizes the mode classification in place, increase the dirigibility of mobile phone A PP.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every equivalents utilizing instructions of the present invention and accompanying drawing content to do, or be directly or indirectly used in relevant technical field, be all in like manner included in scope of patent protection of the present invention.