Summary of the invention
Fundamental purpose of the present invention is to provide a kind of method and apparatus that utilizes two-dimension code to control interactive content, is intended to improve user's experience by improving the interactivity of user and game.
The present invention proposes a kind of method and apparatus that utilizes two-dimension code to control interactive content, comprising:
The scanning two-dimension code obtains pagefile according to described two-dimension code;
Read the script of preserving in pagefile, judge whether business corresponding to described script is interactive content, if obtain according to the user identity identification code historical data that the user preserves, according to the interaction mode of described historical data and the described business of script logic output.
Preferably, describedly judge whether the corresponding business of described script is that interactive content also comprises:
If judge that the corresponding business of described script is not interactive content, directly export business corresponding to described script.
Preferably, describedly obtain pagefile according to described two-dimension code and comprise:
Obtain the mapping relations of corresponding with described two-dimension code pagefile address according to described two-dimension code;
Obtain described pagefile according to the mapping relations of described pagefile address.
Preferably, the step of the described described pagefile of map locating Relation acquisition according to described pagefile address comprises:
Judged whether local memory address, if the version that judges pagefile in local memory address whether lower than default version, remote download pagefile if not;
If judge that the version of described pagefile is equal to or higher than default version, obtain in local memory address described pagefile.
Preferably, whether the described version that judges pagefile in local memory address also comprises after the step lower than default version:
If judge described pagefile lower than default version, remote download pagefile.
The present invention also proposes a kind of device that utilizes two-dimension code to control interactive content, comprising:
Scan module: be used for the scanning two-dimension code;
The first acquisition module is used for obtaining pagefile according to described two-dimension code;
Read module is used for reading the script that pagefile is preserved;
Judge module is used for judging whether the corresponding business of described script is interactive content;
The second acquisition module if be used for judging that the corresponding business of described script is interactive content, obtains according to the user identity identification code historical data that the user preserves;
Output module is according to the described business of the described historical data output interaction mode of last time.
Preferably, if described output module is also for judging that the corresponding business of described script is not interactive content, directly export described business.
Preferably, described the first acquisition module comprises:
First obtains submodule: the mapping relations that are used for obtaining according to described two-dimension code corresponding with described two-dimension code pagefile address;
Second obtains submodule, is used for obtaining described pagefile according to the mapping relations of described pagefile address.
Preferably, described second obtain submodule and comprise:
The first judging unit has judged whether local memory address;
The second judging unit has local memory address if be used for judgement, judges that whether the version of pagefile in described local memory address is lower than default version;
Acquiring unit is if the version that judges pagefile in described local memory address obtains described pagefile greater than or equal to default version;
Download unit does not exist local memory address, remote download pagefile if be used for judgement.
Preferably, if described download unit is used for also judging that the version of pagefile of described local memory address is lower than default version, remote download pagefile.
The two-dimension code that utilizes proposed by the invention is controlled the method and apparatus of interactive content, the method is by the scanning two-dimension code, obtain pagefile according to this two-dimension code, read the script of preserving in pagefile, obtain the historical data of the game of user's preservation according to user's identity code, interaction mode according to this historical data and script logic outgoing traffic, namely the use state according to user last time shows user's use state at the page, by improving the interactivity of user and content, improved user's experience.
Embodiment
Be described further with regard to technical scheme of the present invention below in conjunction with drawings and the specific embodiments.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
With reference to Fig. 1, Fig. 1 is that the present invention utilizes two-dimension code to control the schematic flow sheet of method one embodiment of interactive content.
The method of utilizing two bit codes to control interactive content that the present embodiment proposes comprises:
Step S10, the scanning two-dimension code;
Adopt scanning device such as talking pen to read 2 D code information, two-dimension code can be printed on books or is presented on other electronic equipment, and bookish each game can corresponding two-dimension code, and two-dimension code also can adopt other figure that can scan to replace, as bar code.
Step S20 obtains the corresponding pagefile of two-dimension code according to this two-dimension code;
Adopt scanning device such as talking pen to read 2 D code information, obtain the corresponding pagefile of two-dimension code according to this two-dimension code, each two-dimension code all can corresponding pagefile.Take game as example, the rule of game is kept in the script of pagefile, when reading pagefile, first read and preserve the corresponding game rule of this script in script, then give script providing capability function, this energy force function shows the elements such as the relevant image of game, text, sound, video according to the layout of game rule and pagefile.
Step S30 reads the script of preserving in pagefile;
Script is used for controlling the display mode of the page, namely controls the page and shows the elements such as image, text, sound, video according to its layout.When reading pagefile, first read the logic of the corresponding business of this script of preserving in script, then give script providing capability function, this energy force function shows the elements such as image, text, sound, video of this traffic aided according to the layout of the logic of business and pagefile.
Step S40 judges whether business corresponding to script is interactive content;
Preserve the characteristics of the corresponding business of script on remote server, be interactive content or fixing output content, the corresponding business of script comprises game, video, audio frequency, text and image etc., the state of interactive content is relevant with user's behavior, as game, game is that a variable is relevant with user's click behavior, and the user clicks the state of playing after behavior at every turn all might be different.When judging whether business corresponding to script is interactive content, it obtains the characteristics of this business by remote service, is the still content of fixing output of interactive content, and whether can judge this business is interactive content.
Step S50 if business corresponding to judgement script is interactive content, obtains according to the user identity identification code historical data that the user preserves;
When if business corresponding to judgement script is interactive content, illustrate that the user uses this business equal possibility difference of interaction mode of business afterwards at every turn, obtain according to the user identity identification code historical data that the user preserves, this historical data is corresponding with the interaction mode of business after the user used this business last time.User's identity code can be corresponding with the equipment of scanning two-dimension code, when obtaining two-dimension code, can obtain user's identity code.
Step S60 is according to the interaction mode of described historical data and script logic outgoing traffic.
Describe as an example of game example, the rule of game is kept in script logic, when the user clicks when game, and can be according to the interaction mode of the regular outgoing traffic of historical data and game.For example, the user is when playing Weiqi, each chess lattice is to there being a two-dimension code, the rule of game is kept in script, as next chess piece of chess lattice intelligence, when a certain chess lattice of scanning input two-dimension code is played chess, if in the historical data of this preservation, these chess lattice have had chess piece, can not begin according to these chess lattice of the rule of playing in script logic, this chess lattice flicker on display screen, the prompting user can not begin.perhaps the user is when playing the pet rabbit game, each two-dimension code all represents the food of a kind of rabbit, the rule of game is kept in script, as a kind of food pet rabbit one day only to eat once, such as the user is scanned the corresponding two-dimension code of radish morning, feed radish to rabbit, and preserve this data, scanned the corresponding two-dimension code of Chinese cabbage noon, feed Chinese cabbage to rabbit, and preserve this data, if the user continues the corresponding two-dimension code of scanning radish evening, feed radish to rabbit, that preserves had eaten radish morning according to rabbit in historical data, can not eat again radish today according to the regular rabbit that plays in script logic, point out the user to eat radish morning.
In the present embodiment, by the scanning two-dimension code, obtain pagefile according to this two-dimension code, obtain the historical data of the business of user's preservation according to user's identity code, interaction mode according to this historical data and script logic outgoing traffic, by improving the interactivity of user and game, improved user's experience.
With reference to Fig. 2, Fig. 2 is that the present invention utilizes two-dimension code to control the schematic flow sheet of another embodiment of method of interactive content.
Based on above-described embodiment, also comprise after step S40:
Step S70 is if judge that the corresponding business of described script is not interactive content, directly exports business corresponding to script.
The corresponding business of script comprises game, video, audio frequency, text and image etc., and interactive content is that a variable is relevant with user's click behavior, and as game, the user clicks the state of playing after behavior at every turn all might be different.So when the corresponding business of script is interactive content, historical data and the script logic preserved according to the user show the user interactions state, if the corresponding business of script is not interactive content, video, audio frequency, text or image for fixing output directly show this business.
With reference to Fig. 3, Fig. 3 is that the present invention utilizes two-dimension code to control the schematic flow sheet that obtains pagefile in the method for interactive content according to two-dimension code.
Based on above-described embodiment, step S20 comprises:
Step S21 obtains the mapping relations of corresponding with this two-dimension code pagefile address according to the two-dimension code of scanning;
Step S22 obtains pagefile according to the mapping relations of pagefile address.
The all corresponding pagefile of each two-dimension code, can obtain pagefile according to the mapping relations of two-dimension code and pagefile address after the scanning two-dimension code, the script of business is kept in pagefile, control the display mode of the page, script shows the elements such as image, text, sound and video according to the layout of the page on the page.
With reference to Fig. 4, Fig. 4 is that the present invention utilizes two-dimension code to control in the method for interactive content an embodiment schematic flow sheet that obtains pagefile according to the mapping relations of pagefile address.
Based on above-described embodiment, step S22 comprises:
Step S221 has judged whether local memory address;
Pagefile is kept in local memory address, obtains after two-dimension code and can obtain local memory address according to the mapping relations of pagefile address, if there is no local memory address, can't obtain pagefile by this locality.For example, local memory address is/scard/dotpaden/geme1, is a file in local memory device, and pagefile is kept in this document folder, and the address of pagefile is /scard/dotpaden/geme1/p1.htm.
Step S222 if judgement has local memory address, judges that whether the version of pagefile in local memory address is lower than default version;
The default version of pagefile is kept at remote service wherein, if judgement has local memory address, explanation might be obtained the pagefile in local storage, but the version of pagefile may cause the page can not show or show fault lower than default version, need relatively this pagefile version and the default version that is kept in server, if in local memory address, the version of pagefile greater than or equal to default version, obtains this pagefile.
Step S223 is not if judgement has local memory address, remote download pagefile;
The mapping of the corresponding pagefile of two-dimension code address, comprise the mapping of the local memory address of pagefile and the mapping of pagefile remote download address, if without local memory address, can't obtain local pagefile, need to be according to the mapping remote download pagefile of pagefile address, then according to coherent element such as image, the word etc. of the display business on the page of the script in pagefile.
Step S224 is if judge that the version of pagefile in local memory address is equal to or higher than default version, obtains the pagefile in local memory address;
If the version of local memory address is equal to or higher than default version, explanation can be obtained pagefile by in this locality storage according to local memory address, then according to coherent element such as image, the word etc. of the display business on the page of the script in pagefile.
Referring to Fig. 5, Fig. 5 is that the present invention utilizes two-dimension code to control in the method for interactive content another embodiment schematic flow sheet according to the mapping relations query page file of pagefile address.
Based on above-described embodiment, also comprise after step S222:
If judge the version of the pagefile in local memory address lower than default version, carrying out step S223 is the remote download pagefile.
If the version of the address of the pagefile in local memory address is lower than the default version in remote server, the content in the pagefile file can break down when can't show in display device or show, need mapping according to the pagefile address by server medium-long range downloading page file, then according to coherent element such as image, the word etc. of the script display business in pagefile.
Referring to Fig. 6, Fig. 6 is that device one embodiment that the present invention utilizes two-dimension code to control interactive content is considered as structural representation.
The device that utilizes two-dimension code to control interactive content that the present embodiment proposes comprises:
Scan module 10 is used for the scanning two-dimension code;
Scan module 10 can scan the equipment of two-dimension code for talking pen, smart mobile phone etc., two-dimension code can be printed on books or is presented on other electronic equipment, bookish each game can corresponding two-dimension code, and two-dimension code also can adopt other figure that can scan to replace, as bar code.
Thefirst acquisition module 20 is used for obtaining pagefile according to two-dimension code;
Scan module 20 reads 2 D code information, thefirst acquisition module 20 obtains the corresponding pagefile of two-dimension code according to this two-dimension code, each two-dimension code all can corresponding business, this business logic script be kept in pagefile, this script is used for controlling the display mode of the page.
Readmodule 30 is used for reading the script that pagefile is preserved;
Script is used for controlling the display mode of the page, namely controls the page and shows the elements such as image, text, sound, video according to its layout.When reading pagefile, first read the logic of preserving the corresponding business of this script in script, then give script providing capability function, this energy force function shows the elements such as image, text, sound, video of this traffic aided according to the layout of the logic of business and pagefile.
Judge module 40 is used for judging whether the corresponding business of script is interactive content;
Preserve the characteristics of the corresponding business of script on remote server, be interactive content or fixing output content, the corresponding business of script comprises game, video, audio frequency, text and image etc., the state of interactive content is relevant with user's behavior, be that a variable is relevant with user's click behavior as game, the user clicks the state of playing after behavior at every turn all might be different.When judging whether business corresponding to script is interactive content, it obtains the characteristics of this business by remote service, is the still content of fixing output of interactive content, and whether can judge this business is interactive content.
Thesecond acquisition module 50 is interactive content if be used for the corresponding business of judgement script, obtains according to the user identity identification code historical data that the user preserves;
Ifjudge module 40 business corresponding to judgement script are interactive content, illustrate that the user uses this business equal possibility difference of interaction mode of business afterwards at every turn, thesecond acquisition module 50 obtains according to the user identity identification code historical data that the user preserves, and after this historical data and user's use last time business, the state of business is corresponding.User's identity code can be corresponding with the equipment of scanning two-dimension code, whenscan module 10 obtains two-dimension code, can obtain user's identity code.
Output module 60 is used for the interaction mode according to historical data and logic script outgoing traffic.
Describe as an example of game example, the rule of game is kept in script logic, when the user clicks when game, and can be according to the interaction mode of the regular outgoing traffic of historical data and game.For example, the user is when playing Weiqi, each chess lattice is to there being a two-dimension code, the rule of game is kept in script, as next chess piece of chess lattice intelligence, when a certain chess lattice of scanning input two-dimension code is played chess, if in the historical data of this preservation, these chess lattice have had chess piece, can not begin according to these chess lattice of the rule of playing in script logic, this chess lattice flicker on display screen, the prompting user can not begin.perhaps the user is when playing the pet rabbit game, each two-dimension code all represents the food of a kind of rabbit, the rule of game is kept in script, as a kind of food pet rabbit one day only to eat once, such as the user is scanned the corresponding two-dimension code of radish morning, feed radish to rabbit, and preserve this data, scanned the corresponding two-dimension code of Chinese cabbage noon, feed Chinese cabbage to rabbit, and preserve this data, if the user continues the corresponding two-dimension code of scanning radish evening, feed radish to rabbit, that preserves had eaten radish morning according to rabbit in historical data, can not eat again radish today according to the regular rabbit that plays in script logic, point out the user to eat radish morning.
Ifjudge module 40 business corresponding to judgement script are not interactive contents, directly export this business, as video, audio frequency, text and image etc., namely show each element such as text, image etc. according to page layout.
in the present embodiment,scan module 10 scanning two-dimension codes, thefirst acquisition module 20 obtains pagefile according to this two-dimension code, readmodule 30 reads the corresponding script of pagefile,judge module 40 judges whether the corresponding business of this script is interactive content, if judge that the corresponding business of described script is interactive content, thesecond acquisition module 50 obtains according to the user identity identification code historical data that the user preserves,output module 60 is according to the interaction mode of this historical data and script logic outgoing traffic, by improving the interactivity of user and content, improved user's experience.
Referring to Fig. 7, Fig. 7 is the structural representation that utilizes the first acquisition module in the device that two-dimension code controls interactive content shown in Figure 6.
Based on above-described embodiment, thefirst acquisition module 20 comprises:
First obtains submodule 21: the mapping relations that are used for obtaining according to two-dimension code corresponding with this two-dimension code pagefile address;
Second obtainssubmodule 22, is used for obtaining pagefile according to the mapping relations of pagefile address.
The all corresponding pagefile of each two-dimension code, afterscan module 10 scanning two-dimension codes, first obtains the mapping relations that submodule 21 obtains two-dimension code and pagefile, second obtainssubmodule 22 obtains pagefile according to the mapping of two-dimension code and pagefile, the script of business is kept in pagefile, control the display mode of the page, script shows image, text, sound according to the layout of the page, and the element such as video.
Referring to Fig. 8, Fig. 8 is the second structural representation that obtains submodule in the first acquisition module shown in Figure 7.
Based on above-described embodiment, second obtainssubmodule 22 comprises:
Thefirst judging unit 221 is used for having judged whether local memory address;
Pagefile is kept in local memory address, obtains after two-dimension code and can obtain local memory address according to the mapping relations of pagefile address, if there is no local memory address, can't obtain pagefile by this locality.For example, local memory address is/scard/dotpaden/geme1, is a file in local memory device, and pagefile is kept in this document folder, and the address of pagefile is /scard/dotpaden/geme1/p1.htm.
Thesecond judging unit 222 has local memory address if be used for judgement, judges that whether the version of pagefile in local memory address is lower than default version;
The default version of pagefile is kept at remote service wherein, if judgement has local memory address, explanation might be obtained the pagefile in local storage, but the version of pagefile may cause the page can not show or show fault lower than default version, need relatively this pagefile version and the default version that is kept in server, if in local memory address, the version of pagefile greater than or equal to default version, obtains this pagefile.
Acquiringunit 223 is if the version that is used for judging local memory address pagefile obtains the pagefile in local memory address greater than or equal to default version;
If the version of local memory address is equal to or higher than default version, explanation can be obtained pagefile by in this locality storage according to local memory address, then according to coherent element such as image, the word etc. of the display business on the page of the script in pagefile
Download unit 224 does not exist local memory address, remote download pagefile if be used for judgement.
The mapping of the corresponding pagefile of two-dimension code address, comprise the mapping of the local memory address of pagefile and the mapping of pagefile remote download address, if without local memory address, can't obtain local pagefile, need to be according to the mapping remote download pagefile of pagefile address, then according to coherent element such as image, the word etc. of the display business on the page of the script in pagefile.
local memory address is corresponding with the mapping of pagefile address,scan module 10 obtains two-dimension code, thefirst acquisition module 20 obtains local memory address according to the mapping of pagefile address, if thefirst judging unit 221 judgements do not have local memory address,download unit 224 remote download pagefiles, if thefirst judging unit 221 judgements have local memory address, thesecond judging unit 222 judges that whether the version of the pagefile in local memory address is less than default version, if the version of the pagefile in thesecond judging unit 222 local memory addresss of judgement is equal to or higher than default version, acquiringunit 223 is according to the pagefile in local memory address.
Ifdownload unit 224 also is used for judging that the version of local memory address pagefile is less than default version, remote download pagefile.
If the version of the address of the pagefile in local memory address is lower than the default version in remote server, the content in the pagefile file can break down when can't show in display device or show, need mapping according to the pagefile address by server medium-long range downloading page file, then according to coherent element such as image, the word etc. of the script display business in pagefile.
The above is only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure transformation that utilizes instructions of the present invention and accompanying drawing content to do; or directly or indirectly be used in other relevant technical fields, all in like manner be included in scope of patent protection of the present invention.