CN103927341B - A kind of method and device for obtaining scene information - Google Patents

A kind of method and device for obtaining scene information Download PDF

Info

Publication number
CN103927341B
CN103927341B CN201410120012.8A CN201410120012A CN103927341B CN 103927341 B CN103927341 B CN 103927341B CN 201410120012 A CN201410120012 A CN 201410120012A CN 103927341 B CN103927341 B CN 103927341B
Authority
CN
China
Prior art keywords
gray
scene
scale map
web application
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410120012.8A
Other languages
Chinese (zh)
Other versions
CN103927341A (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.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co 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 Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201410120012.8A priority Critical patent/CN103927341B/en
Publication of CN103927341A publication Critical patent/CN103927341A/en
Application granted granted Critical
Publication of CN103927341B publication Critical patent/CN103927341B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9032Query formulation
    • G06F16/90324Query formulation using system suggestions

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of method and device for obtaining scene information, belong to field of Internet communication.Methods described includes:The application data of web application is obtained, the application data is the interface image of the web application or is the transmitted data on network bag transmitted between the web application and server;According to the application data, the scene information of scene residing for the web application is obtained.Described device includes:First acquisition module and the second acquisition module.Web application operation platform can get the scene information of scene residing for the web application in the present invention, according to the scene information of scene residing for the web application, provide more preferable service for the web application, and then add the species that service is provided for the web application.

Description

A kind of method and device for obtaining scene information
Technical field
The present invention relates to field of Internet communication, more particularly to a kind of method and device for obtaining scene information.
Background technology
With the fast development of Internet communication technology, there is increasing web application, web application needs Run in its corresponding web application operation platform, web application also has several scenes and web application is in its corresponding webpage Also need to be run by a kind of scene using operation in operation platform.So when user uses some web application, user Need first to download the web application operation platform, select a kind of scene and submit to web application, then the web application is by use The scene of family selection is run in its corresponding web application operation platform.
When web application is run in its corresponding web application platform, web application platform can provide to web application Various services.Wherein, some services that web application platform provides need to use the presently used scene of web application Scene information, but web application operation platform can not get the scene information of the web application institute usage scenario at present, with As for such service can not be provided for the web application.
The content of the invention
In order to solve problem of the prior art, the embodiments of the invention provide a kind of method and dress for obtaining scene information Put.The technical scheme is as follows:
On the one hand, there is provided a kind of method for obtaining scene information, methods described include:
The application data of web application is obtained, the application data is the interface image of the web application or is described The transmitted data on network bag transmitted between web application and server;
According to the application data, the scene information of scene residing for the web application is obtained.
Wherein, it is described according to the application data, the scene information of scene residing for the web application is obtained, including:
According to the form of the contextual data bag stored, contextual data bag is selected from the transmitted data on network bag;
According to the contextual data bag of the selection, the scene information of scene residing for the web application is obtained.
Further, the contextual data bag according to the selection, the scene of scene residing for the web application is obtained Information, including:
Scene Recognition mark is obtained from the contextual data bag of the selection;
Identified according to the scene Recognition, obtained in the corresponding relation identified from the scene Recognition stored with scene information Corresponding scene information;
The scene information of the acquisition is defined as to the scene information of scene residing for the web application.
Wherein, the application data for obtaining web application, including:
The picture size that acquisition scene image and the corresponding relation of picture size include;
In the image shown in the interface of web application, according to the picture size of the acquisition, opened from predetermined position Beginning interception image, obtain the interface image of the web application.
Further, it is described according to the application data, the scene information of scene residing for the web application is obtained, is wrapped Include:
Obtained according to the picture size of the acquisition, in the corresponding relation from the scene image with picture size corresponding Scene image;
The first gray-scale map and the second gray-scale map are obtained, first gray-scale map is the ash of the interface image of the web application Degree figure, second gray-scale map are the gray-scale map of the scene image of the acquisition;
If first gray-scale map is identical with second gray-scale map, institute is obtained according to the scene image of the acquisition State the scene information of scene residing for web application.
Preferably, if first gray-scale map is identical with second gray-scale map, according to the field of the acquisition Before scape image obtains the scene information of scene residing for the web application, in addition to:
The number of each gray value included according to first gray-scale map and including gray value total number, Yi Jisuo State each gray value that the second gray-scale map includes number and including gray value total number, judge first gray-scale map and Whether second gray-scale map is identical.
Wherein, the number of each gray value included according to first gray-scale map and including gray value sum Mesh, and the number of each gray value that includes of second gray-scale map and including gray value total number, judge described Whether one gray-scale map and second gray-scale map are identical, including:
The gray value that the number of each gray value included according to first gray-scale map and first gray-scale map include Total number, calculate the first ratio corresponding to each gray value that first gray-scale map includes;
The gray value that the number of each gray value included according to second gray-scale map and second gray-scale map include Total number, calculate the second ratio corresponding to each gray value that second gray-scale map includes;
If the first ratio of each gray value is identical with the second ratio, it is determined that first gray-scale map and described second Gray-scale map is identical, otherwise, it determines first gray-scale map is different with second gray-scale map.
On the other hand, there is provided a kind of device for obtaining scene information, described device include:
First acquisition module, for obtaining the application data of web application, the application data is the web application Interface image or the transmitted data on network bag transmitted between the web application and server;
Second acquisition module, for according to the application data, obtaining the scene information of scene residing for the web application.
Wherein, second acquisition module includes:
Selecting unit, for the form according to the contextual data bag stored, selected from the transmitted data on network bag Contextual data bag;
First acquisition unit, for the contextual data bag according to the selection, obtain scene residing for the web application Scene information.
Further, the selecting unit includes:
First obtains subelement, for obtaining scene Recognition mark from the contextual data bag of the selection;
Second obtains subelement, for being identified according to the scene Recognition, from the scene Recognition mark and scene stored Scene information corresponding to being obtained in the corresponding relation of information;
First determination subelement, for the scene information of the acquisition to be defined as to the field of scene residing for the web application Scape information.
Wherein, first acquisition module includes:
Second acquisition unit, the picture size that the corresponding relation for obtaining scene image and picture size includes;
Interception unit, in the image that is shown in the interface of web application, according to the picture size of the acquisition, from Predetermined position starts interception image, obtains the interface image of the web application.
Wherein, second acquisition module includes:
3rd acquiring unit, for the picture size according to the acquisition, from the scene image and pair of picture size Scene image corresponding to middle acquisition should be related to;
4th acquiring unit, it is the webpage for obtaining the first gray-scale map and the second gray-scale map, first gray-scale map The gray-scale map of the interface image of application, second gray-scale map are the gray-scale map of the scene image of the acquisition;
5th acquiring unit, if identical with second gray-scale map for first gray-scale map, obtained according to The scene image taken obtains the scene information of scene residing for the web application.
Preferably, second acquisition module also includes:
Judging unit, for the number of each gray value that is included according to first gray-scale map and including gray value Total number, and the number of each gray value that includes of second gray-scale map and including gray value total number, judge institute State the first gray-scale map and whether second gray-scale map is identical.
Wherein, the judging unit includes:
First computation subunit, for the number and described first of each gray value included according to first gray-scale map The total number for the gray value that gray-scale map includes, calculate the first ratio corresponding to each gray value that first gray-scale map includes;
Second computation subunit, for the number and described second of each gray value included according to second gray-scale map The total number for the gray value that gray-scale map includes, calculate the second ratio corresponding to each gray value that second gray-scale map includes;
Second determination subelement, if the first ratio for each gray value is identical with the second ratio, it is determined that described First gray-scale map is identical with second gray-scale map, otherwise, it determines first gray-scale map is different with second gray-scale map.
In embodiments of the present invention, the application data of web application is obtained, the application data is the interface of the web application Image or the transmitted data on network bag transmitted between the web application and server.In this way, web application operation platform can According to the application data, to get the scene information of scene residing for the web application, according to scene residing for the web application Scene information, more preferable service is provided for the web application, and then add the species that service is provided for the web application.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is a kind of method flow diagram for acquisition scene information that the embodiment of the present invention one provides;
Fig. 2 is a kind of method flow diagram for acquisition scene information that the embodiment of the present invention two provides;
Fig. 3 is a kind of method flow diagram for acquisition scene information that the embodiment of the present invention three provides;
Fig. 4 is a kind of apparatus structure schematic diagram for acquisition scene information that the embodiment of the present invention four provides.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
Embodiment one
Fig. 1 is a kind of method flow diagram for obtaining scene information provided in an embodiment of the present invention, referring to Fig. 1, this method bag Include:
Step 101:The application data of web application is obtained, the application data is the interface image of the web application or is The transmitted data on network bag transmitted between the web application and server;
Step 102:According to the application data, the scene information of scene residing for the web application is obtained.
Wherein, according to the application data, the scene information of scene residing for the web application is obtained, including:
According to the form of the contextual data bag stored, contextual data bag is selected from the transmitted data on network bag of acquisition;
According to the contextual data bag of selection, the scene information of scene residing for the web application is obtained.
Further, according to the contextual data bag of selection, the scene information of scene residing for the web application is obtained, including:
Scene Recognition mark is obtained from the contextual data bag of selection;
Identified according to the scene Recognition of acquisition, obtained in the corresponding relation identified from the scene Recognition stored with scene information Take corresponding scene information;
The scene information of acquisition is defined as to the scene information of scene residing for the web application.
Wherein, the application data of web application is obtained, including:
The picture size that acquisition scene image and the corresponding relation of picture size include;
In the image shown in the interface of web application, according to the picture size of acquisition, cut since predetermined position Image is taken, obtains the interface image of the web application.
Further, according to the application data, the scene information of scene residing for the web application is obtained, including:
According to the picture size of acquisition, corresponding scene graph is obtained in the corresponding relation from scene image with picture size Picture;
The first gray-scale map and the second gray-scale map are obtained, the first gray-scale map is the gray-scale map of the interface image of the web application, Second gray-scale map is the gray-scale map of the scene image obtained;
If the first gray-scale map and the second gray-scale map are identical, according to residing for the scene image of acquisition obtains the web application The scene information of scene.
Preferably, if the first gray-scale map and the second gray-scale map are identical, the webpage is obtained according to the scene image of acquisition Before scene information using residing scene, in addition to:
The number of each gray value included according to the first gray-scale map and including gray value total number, and second ash The number for each gray value that degree figure includes and including gray value total number, judge that the first gray-scale map and the second gray-scale map are It is no identical.
Wherein, the number of each gray value included according to the first gray-scale map and including gray value total number, and The number for each gray value that second gray-scale map includes and including gray value total number, judge the first gray-scale map and second ash Whether degree figure is identical, including:
The total number for the gray value that the number of each gray value included according to the first gray-scale map and the first gray-scale map include, Calculate the first ratio corresponding to each gray value that the first gray-scale map includes;
The total number for the gray value that the number of each gray value included according to the second gray-scale map and the second gray-scale map include, Calculate the second ratio corresponding to each gray value that the second gray-scale map includes;
If the first ratio of each gray value is identical with the second ratio, it is determined that the first gray-scale map and the second gray-scale map phase Together, otherwise, it determines the first gray-scale map and the second gray-scale map are different.
In embodiments of the present invention, the application data of web application is obtained, the application data is the interface of the web application Image or the transmitted data on network bag transmitted between the web application and server.In this way, web application operation platform can According to the application data, to get the scene information of scene residing for the web application, according to scene residing for the web application Scene information, more preferable service is provided for the web application, and then add the species that service is provided for the web application.
Embodiment two
Fig. 2 is a kind of method flow diagram for obtaining scene information provided in an embodiment of the present invention, referring to Fig. 2, this method bag Include:
Step 201:The application data of web application is obtained, what the application data was transmitted between web application and server Transmitted data on network bag;
Because the web application is run in web application operation platform, passed so working as between the web application and server During defeated transmitted data on network bag, the web application operation platform can be truncated to the transmitted data on network bag.
Step 202:According to the form of the contextual data bag stored, scene is selected from the transmitted data on network bag of acquisition Packet;
Specifically, the form of the contextual data bag stored is subjected to the matching analysis with the transmitted data on network bag obtained, The transmitted data on network bag of the format match of the contextual data bag with having stored is selected from the transmitted data on network bag of acquisition, will The transmitted data on network bag of selection is defined as contextual data bag.
Because a web application can have several scenes, and contextual data bag corresponding to every kind of scene is different, so The form of contextual data bag corresponding to every kind of scene is also different, it is necessary to store the form of contextual data bag corresponding to every kind of scene.
Wherein, the form of the contextual data bag stored is that technical staff is analyzed to obtain to the web application in advance 's.Technical staff is analyzed the web application, the method for obtaining the form of the contextual data bag of the scene of the web application Including two kinds:
The first, flash technological development web applications are all used due to current web application developer substantially, and pass through The product that the web application of flash technological development ultimately generates is a series of flash file, i.e. swf files.The swf files Form be disclosed, file includes the resources such as image, audio, video and code.So technical staff can pass through Flash analysis tools are analyzed the swf files, to check the logical code in the swf files, such as flash analyses Instrument is flash-decompiler analysis tools.Technical staff can find data transfer phase from the logical code checked The code position of pass, and the code related to data transfer is analyzed, and then contextual data bag is obtained from the swf files Form.
Further, scene Recognition mark and crucial data identification marking can also be got from the swf files.
When the secondth, entering row data communication between current web application and server, substantially using socket technologies or Http technologies carry out data interaction with server, so technical staff can create role in the web application, make the role Switch between different scenes, the socket packets or http packets that observation web application is sent.The role is existed The socket packets or http packets that web application is sent when switching between different scenes are analyzed, so as to obtain To the form of the contextual data bag of the web application.
Step 203:Scene Recognition mark is obtained from the contextual data bag of selection;
In embodiments of the present invention, after contextual data bag is got, can be identified according to scene Recognition in scene number According to the position in bag, scene Recognition mark is obtained from the contextual data bag of selection.Certainly, when being previously stored contextual data bag After the corresponding relation that form identifies with scene Recognition, the lattice for the contextual data bag that can also be matched according to the contextual data bag Formula, from the form of contextual data bag scene Recognition mark corresponding with acquisition in the corresponding relation that scene Recognition identifies.This hair The mode that bright embodiment obtains scene Recognition mark is not specifically limited.
Step 204:Identified according to the scene Recognition of acquisition, it is corresponding with scene information from the scene Recognition mark stored Scene information corresponding to being obtained in relation;
Specifically, identified according to the scene Recognition of acquisition, it is corresponding with scene information from the scene Recognition mark stored Recorded corresponding to being searched in relation, and the scene information corresponding to acquisition from the record of lookup.
Step 205:The scene information of acquisition is defined as to the scene information of scene residing for the web application.
Further, should after web application operation platform gets the scene information of scene residing for the web application Web application operation platform can according to residing for the web application scene scene information, provide service for the web application.
In embodiments of the present invention, according to the form of the contextual data bag stored, between web application and server Contextual data bag is selected in the transmitted data on network bag of transmission, scene Recognition mark is obtained from the contextual data bag of selection.Root Identified according to scene Recognition, the corresponding scene of acquisition is believed in the corresponding relation identified from the scene Recognition that has stored with scene information Breath.In this way, the scene information of web application operation platform can scene according to used in the web application, should for the webpage Preferably serviced with providing, and then add the species that service is provided for the web application.
Embodiment three
Fig. 3 is a kind of method flow diagram for obtaining scene information provided in an embodiment of the present invention, referring to Fig. 3, this method bag Include:
Step 301:The picture size that acquisition scene image and the corresponding relation of picture size include;
In this step, it can scan, obtain since first record of scene image and the corresponding relation of picture size One of scanning is taken to record the picture size included.Scan again next in the scene image and the corresponding relation of picture size Bar is recorded, and picture size is obtained from next record, until getting in the scene image and the corresponding relation of picture size All picture sizes untill.
Preferably, in embodiments of the present invention, this step can also be:Scan scene image pass corresponding with picture size First record in system, picture size is obtained from the record of scanning.Then the step of performing following 302-306, works as acquisition To after the scene information of scene residing for the web application, then end operation, it is not required to obtain scene image and picture size again Other picture sizes in corresponding relation.
Step 302:In the image shown in the interface of web application, according to the picture size of acquisition, from predeterminated position Place starts interception image, obtains the interface image of the web application;
When all picture sizes that the corresponding relation that scene image and picture size are got in step 301 includes When, step 302 can be:In the image shown in the interface of the web application, according to each picture size of acquisition, from pre- If opening position starts interception image respectively, the interface image of the web application corresponding to each picture size is obtained.
Because web application is to bring interactive experience to user with abundant image, it is related to the field of scene in the images Scape information is substantially fixed opening position in the interface of the web application and shown, it is possible at the interface of the web application Middle interception image, the scene information of scene according to residing for the interface image of the web application obtains the web application.
In embodiments of the present invention, predeterminated position is that the position shown according to the scene information of the scene of web application determines 's.For example, when the scene information of the scene of the web application is shown in the upper left corner at the interface of the web application, predeterminated position Can be the upper left corner at the interface of the web application.When the web application scene scene information at the interface of the web application The upper right corner display when, predeterminated position can be the web application interface the upper right corner.
Alternatively it is also possible to not storage scenarios image and the corresponding relation of picture size, can a storage scenarios image.When During storage scenarios image, in the image that can be shown out of the web application interface, intercepted since predeterminated position default The image of picture size, truncated picture is defined as to the interface image of the web application.Now, the chi of the scene image of storage It is very little to be also equal to preset image sizes.If intercept the interface image of the web application according to preset image sizes, only need to intercept Once, reduce the number for the interface image for intercepting the web application, save processing time.
Step 303:Obtained according to the picture size of acquisition, in the corresponding relation from the scene image with picture size corresponding Scene image;
Specifically, searched according to the picture size of acquisition, in the corresponding relation from the scene image with picture size corresponding Record, from the record of lookup obtain corresponding to scene image.
Wherein, include when the picture size that step 301 obtains for the corresponding relation of the scene image and picture size During all picture sizes, this step gets all scene graph that the corresponding relation of the scene image and picture size includes Picture.When a picture size in the corresponding relation that the picture size that step 301 obtains is the scene image and picture size, What this step obtained is a scene image corresponding to the picture size.
Step 304:The first gray-scale map and the second gray-scale map are obtained, the first gray-scale map is the interface image of the web application Gray-scale map, the second gray-scale map are the gray-scale map of the scene image obtained;
Specifically, the interface image of the web application is handled through gray processing, obtains the first gray-scale map;And by acquisition Scene image is handled through gray processing, obtains the second gray-scale map.
Wherein, the method to gray processing processing is prior art, in embodiments of the present invention no longer narration in detail.
Step 305:The number of each gray value included according to the first gray-scale map and including gray value total number, with And second the number of each gray value that includes of gray-scale map and including gray value total number, judge the first gray-scale map and second Whether gray-scale map is identical;
Specifically, this step can be divided into as follows(1)-(3)The step of, including:
(1), the gray value that includes of the number of each gray value that is included according to the first gray-scale map and the first gray-scale map it is total Number, calculate the first ratio corresponding to each gray value that the first gray-scale map includes;
Specifically, the number for each gray value that the first gray-scale map of statistics includes, and count what the first gray-scale map included The total number of gray value.The gray value that the number of each gray value that first gray-scale map includes divided by the first gray-scale map are included Total number, obtain the first ratio corresponding to each gray value that the first gray-scale map includes.
(2), the gray value that includes of the number of each gray value that is included according to the second gray-scale map and the second gray-scale map it is total Number, calculate the second ratio corresponding to each gray value that the second gray-scale map includes;
Specifically, the number for each gray value that the second gray-scale map of statistics includes, and count what the second gray-scale map included The total number of gray value.The gray value that the number of each gray value that second gray-scale map includes divided by the second gray-scale map are included Total number, obtain the second ratio corresponding to each gray value that the second gray-scale map includes.
(3)If, the first ratio of each gray value it is identical with the second ratio, it is determined that the first gray-scale map and the second gray scale Scheme it is identical, otherwise, it determines the first gray-scale map and the second gray-scale map are different.
Specifically, by the first ratio of each gray value compared with the second ratio, if the first of each gray value Ratio is identical with the second ratio, it is determined that the first gray-scale map and the second gray-scale map are identical, otherwise, it determines the first gray-scale map and second Gray-scale map is different.
Further, when some gray value being not present in the second gray-scale map in the first gray-scale map, if the gray value When corresponding first ratio is less than threshold value, then it can ignore the gray value.If the first ratio corresponding to the gray value be more than or During equal to the threshold value, then it can directly determine that the first gray-scale map is different from the second gray-scale map.Certainly, when not deposited in the first gray-scale map During some gray value in the second gray-scale map, if the second ratio corresponding to the gray value is less than threshold value, it can ignore The gray value.If the second ratio corresponding to the gray value is more than or equal to the threshold value, the first gray scale can be directly determined Figure is different from the second gray-scale map.
Alternatively, when the scene information of scene residing for web application be with text importing in the interface of the web application During fixed position, then the word that the first gray-scale map includes can be extracted from the first gray-scale map, and carried from the second gray-scale map The word for taking the second gray-scale map to include.By the word that the first gray-scale map includes compared with the word that the second gray-scale map includes, If both are identical, it is determined that the first gray-scale map is identical with the second gray-scale map, otherwise, it determines the first gray-scale map and the second gray-scale map It is different.
Step 306:If the first gray-scale map and the second gray-scale map are identical, the webpage is obtained according to the scene image of acquisition Using the scene information of residing scene.
Specifically, if the first gray-scale map and the second gray-scale map are identical, according to the scene image of acquisition, from what is stored Scene image and the corresponding scene information of acquisition in the corresponding relation of scene information, are defined as the webpage by the scene information of acquisition Using the scene information of residing scene.
Alternatively, in order to save memory space, the corresponding relation with scene information can be identified with storage scenarios.When the first ash When degree figure is identical with the second gray-scale map, scene identity can be obtained from the first gray-scale map or the second gray-scale map, according to acquisition Scene identity, corresponding scene information is obtained in the corresponding relation from the scene identity stored with scene information, will be obtained Scene information be defined as the scene information of scene residing for the web application.
In embodiments of the present invention, the picture size included according to the corresponding relation of scene image and picture size, from The interface image that intercepting page is applied in the image shown in the interface of the web application.According to the picture size, from scene graph As the corresponding scene image of acquisition in the corresponding relation with picture size.By the scene image of acquisition and the web application of interception Interface image is compared, if both are identical, can according to residing for the scene image of acquisition obtains the web application scene Scene information.In this way, the scene information of web application operation platform can scene according to used in the web application, is The web application provides preferably service, and then adds the species that service is provided for the web application.
Example IV
Fig. 4 is a kind of apparatus structure schematic diagram for obtaining scene information provided in an embodiment of the present invention, referring to Fig. 4, the dress Put including:
First acquisition module 401, for obtaining the application data of web application, the application data is the interface of web application Image or the transmitted data on network bag transmitted between the web application and server;
Second acquisition module 402, for according to application data, obtaining the scene information of scene residing for the web application.
Wherein, the second acquisition module 402 includes:
Selecting unit, for the form according to the contextual data bag stored, selected from the transmitted data on network bag of acquisition Select contextual data bag;
First acquisition unit, for the contextual data bag according to selection, the scene for obtaining scene residing for the web application is believed Breath.
Further, selecting unit includes:
First obtains subelement, for obtaining scene Recognition mark from the contextual data bag of selection;
Second obtains subelement, for being identified according to the scene Recognition of acquisition, from the scene Recognition mark stored and field Scene information corresponding to being obtained in the corresponding relation of scape information;
First determination subelement, the scene for the scene information of acquisition to be defined as to scene residing for the web application are believed Breath.
Wherein, the first acquisition module 401 includes:
Second acquisition unit, the picture size that the corresponding relation for obtaining scene image and picture size includes;
Interception unit, in the image that is shown in the interface of web application, according to the picture size of acquisition, from default Opening position starts interception image, obtains the interface image of the web application.
Wherein, the second acquisition module 402 includes:
3rd acquiring unit, for the picture size according to acquisition, from scene image and the corresponding relation of picture size Scene image corresponding to acquisition;
4th acquiring unit, for obtaining the first gray-scale map and the second gray-scale map, the first gray-scale map is the web application The gray-scale map of interface image, the second gray-scale map are the gray-scale map of the scene image obtained;
5th acquiring unit, if identical for the first gray-scale map and the second gray-scale map, according to the scene image of acquisition Obtain the scene information of scene residing for the web application.
Preferably, the second acquisition module 402 also includes:
Judging unit, for the number of each gray value that is included according to the first gray-scale map and including gray value sum Mesh, and the number of each gray value that includes of the second gray-scale map and including gray value total number, judge the first gray-scale map It is whether identical with the second gray-scale map.
Wherein, judging unit includes:
First computation subunit, for the number and the first gray-scale map bag of each gray value included according to the first gray-scale map The total number of the gray value included, calculate the first ratio corresponding to each gray value that the first gray-scale map includes;
Second computation subunit, for the number and the second gray-scale map bag of each gray value included according to the second gray-scale map The total number of the gray value included, calculate the second ratio corresponding to each gray value that the second gray-scale map includes;
Second determination subelement, if the first ratio for each gray value is identical with the second ratio, it is determined that first Gray-scale map and the second gray-scale map are identical, otherwise, it determines the first gray-scale map and the second gray-scale map are different.
In embodiments of the present invention, the application data of web application is obtained, the application data is the interface of the web application Image or the transmitted data on network bag transmitted between the web application and server.In this way, web application operation platform can According to the application data, to get the scene information of scene residing for the web application, according to scene residing for the web application Scene information, preferably service can be provided for the web application, and then add the species that service is provided for the web application.
It should be noted that:Above-described embodiment provide acquisition scene information device when obtaining scene information, only with The division progress of above-mentioned each functional module, can be as needed and by above-mentioned function distribution by not for example, in practical application Same functional module is completed, i.e., the internal structure of device is divided into different functional modules, to complete whole described above Or partial function.In addition, the device for the acquisition scene information that above-described embodiment provides is implemented with obtaining the method for scene information Example belongs to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment To complete, by program the hardware of correlation can also be instructed to complete, described program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.

Claims (14)

  1. A kind of 1. method for obtaining scene information, it is characterised in that applied to web application operation platform, methods described includes:
    The application data of web application is obtained, the application data is the interface image of the web application or is the webpage Using the transmitted data on network bag transmitted between server;
    According to the application data, the scene information of scene residing for the web application is obtained, the web application is according to residing Scene is run in the web application operation platform;
    According to the scene information of scene residing for the web application, service is provided for the web application.
  2. 2. the method as described in claim 1, it is characterised in that it is described according to the application data, obtain the web application The scene information of residing scene, including:
    According to the form of the contextual data bag stored, contextual data bag is selected from the transmitted data on network bag;
    According to the contextual data bag of the selection, the scene information of scene residing for the web application is obtained.
  3. 3. method as claimed in claim 2, it is characterised in that the contextual data bag according to the selection, described in acquisition The scene information of scene residing for web application, including:
    Scene Recognition mark is obtained from the contextual data bag of the selection;
    Identified according to the scene Recognition, acquisition is corresponding in the corresponding relation identified from the scene Recognition stored with scene information Scene information;
    The scene information of the acquisition is defined as to the scene information of scene residing for the web application.
  4. 4. the method as described in claim 1, it is characterised in that the application data for obtaining web application, including:
    The picture size that acquisition scene image and the corresponding relation of picture size include;
    In the image shown in the interface of web application, according to the picture size of the acquisition, cut since predetermined position Image is taken, obtains the interface image of the web application.
  5. 5. method as claimed in claim 4, it is characterised in that it is described according to the application data, obtain the web application The scene information of residing scene, including:
    According to the picture size of the acquisition, corresponding scene is obtained in the corresponding relation from the scene image with picture size Image;
    The first gray-scale map and the second gray-scale map are obtained, first gray-scale map is the gray scale of the interface image of the web application Figure, second gray-scale map are the gray-scale map of the scene image of the acquisition;
    If first gray-scale map is identical with second gray-scale map, the net is obtained according to the scene image of the acquisition The scene information of scene residing for page application.
  6. 6. method as claimed in claim 5, it is characterised in that if first gray-scale map and second gray-scale map It is identical, then before the scene information of scene according to residing for the scene image of the acquisition obtains the web application, in addition to:
    The number of each gray value included according to first gray-scale map and including gray value total number, and described The number for each gray value that two gray-scale maps include and including gray value total number, judge first gray-scale map and described Whether the second gray-scale map is identical.
  7. 7. method as claimed in claim 6, it is characterised in that each gray value included according to first gray-scale map Number and including gray value total number, and the number of each gray value that includes of second gray-scale map and including The total number of gray value, judge whether first gray-scale map and second gray-scale map are identical, including:
    The gray value that the number of each gray value included according to first gray-scale map and first gray-scale map include it is total Number, calculate the first ratio corresponding to each gray value that first gray-scale map includes;
    The gray value that the number of each gray value included according to second gray-scale map and second gray-scale map include it is total Number, calculate the second ratio corresponding to each gray value that second gray-scale map includes;
    If the first ratio of each gray value is identical with the second ratio, it is determined that first gray-scale map and second gray scale Scheme it is identical, otherwise, it determines first gray-scale map and second gray-scale map are different.
  8. 8. a kind of device for obtaining scene information, it is characterised in that applied to web application operation platform, described device includes:
    First acquisition module, for obtaining the application data of web application, the application data is the interface of the web application Image or the transmitted data on network bag transmitted between the web application and server;
    Second acquisition module, it is described for according to the application data, obtaining the scene information of scene residing for the web application Web application is run according to residing scene in the web application operation platform;
    Wherein, described device is additionally operable to:
    According to the scene information of scene residing for the web application, service is provided for the web application.
  9. 9. device as claimed in claim 8, it is characterised in that second acquisition module includes:
    Selecting unit, for the form according to the contextual data bag stored, scene is selected from the transmitted data on network bag Packet;
    First acquisition unit, for the contextual data bag according to the selection, obtain the scene of scene residing for the web application Information.
  10. 10. device as claimed in claim 9, it is characterised in that the selecting unit includes:
    First obtains subelement, for obtaining scene Recognition mark from the contextual data bag of the selection;
    Second obtains subelement, for being identified according to the scene Recognition, from the scene Recognition mark and scene information stored Corresponding relation in obtain corresponding to scene information;
    First determination subelement, the scene for the scene information of the acquisition to be defined as to scene residing for the web application are believed Breath.
  11. 11. device as claimed in claim 8, it is characterised in that first acquisition module includes:
    Second acquisition unit, the picture size that the corresponding relation for obtaining scene image and picture size includes;
    Interception unit, in the image that is shown in the interface of web application, according to the picture size of the acquisition, from default Opening position starts interception image, obtains the interface image of the web application.
  12. 12. device as claimed in claim 11, it is characterised in that second acquisition module includes:
    3rd acquiring unit, for the picture size according to the acquisition, closed from the scene image is corresponding with picture size Scene image corresponding to being obtained in system;
    4th acquiring unit, it is the web application for obtaining the first gray-scale map and the second gray-scale map, first gray-scale map Interface image gray-scale map, second gray-scale map for the acquisition scene image gray-scale map;
    5th acquiring unit, if identical with second gray-scale map for first gray-scale map, according to the acquisition Scene image obtains the scene information of scene residing for the web application.
  13. 13. device as claimed in claim 12, it is characterised in that second acquisition module also includes:
    Judging unit, for the number of each gray value that is included according to first gray-scale map and including gray value sum Mesh, and the number of each gray value that includes of second gray-scale map and including gray value total number, judge described Whether one gray-scale map and second gray-scale map are identical.
  14. 14. device as claimed in claim 13, it is characterised in that the judging unit includes:
    First computation subunit, for the number of each gray value included according to first gray-scale map and first gray scale The total number for the gray value that figure includes, calculate the first ratio corresponding to each gray value that first gray-scale map includes;
    Second computation subunit, for the number of each gray value included according to second gray-scale map and second gray scale The total number for the gray value that figure includes, calculate the second ratio corresponding to each gray value that second gray-scale map includes;
    Second determination subelement, if the first ratio for each gray value is identical with the second ratio, it is determined that described first Gray-scale map is identical with second gray-scale map, otherwise, it determines first gray-scale map is different with second gray-scale map.
CN201410120012.8A 2014-03-27 2014-03-27 A kind of method and device for obtaining scene information Active CN103927341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410120012.8A CN103927341B (en) 2014-03-27 2014-03-27 A kind of method and device for obtaining scene information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410120012.8A CN103927341B (en) 2014-03-27 2014-03-27 A kind of method and device for obtaining scene information

Publications (2)

Publication Number Publication Date
CN103927341A CN103927341A (en) 2014-07-16
CN103927341B true CN103927341B (en) 2017-12-26

Family

ID=51145562

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410120012.8A Active CN103927341B (en) 2014-03-27 2014-03-27 A kind of method and device for obtaining scene information

Country Status (1)

Country Link
CN (1) CN103927341B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105956170B (en) * 2016-05-20 2019-07-19 微鲸科技有限公司 Real-time scene information embedding method, Scene realization system and implementation method
CN111125603B (en) * 2019-12-27 2023-06-27 百度时代网络技术(北京)有限公司 Webpage scene recognition method and device, electronic equipment and storage medium
CN112973114A (en) * 2021-04-15 2021-06-18 深圳豹亮科技有限公司 Game scene model construction method and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053903A (en) * 2009-10-30 2011-05-11 国际商业机器公司 Method and system for storing and querying scene data for on-line operation programs
CN102323939A (en) * 2011-08-31 2012-01-18 百度在线网络技术(北京)有限公司 Method and device for determining background information of rearranged elements in page rearranging process
CN103544271A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Picture processing window loading method and device for browsers
CN103631866A (en) * 2013-11-01 2014-03-12 北京奇虎科技有限公司 Webpage display method and browser

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130238975A1 (en) * 2012-03-12 2013-09-12 Apple Inc. Off-line presentation of web content

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053903A (en) * 2009-10-30 2011-05-11 国际商业机器公司 Method and system for storing and querying scene data for on-line operation programs
CN102323939A (en) * 2011-08-31 2012-01-18 百度在线网络技术(北京)有限公司 Method and device for determining background information of rearranged elements in page rearranging process
CN103544271A (en) * 2013-10-18 2014-01-29 北京奇虎科技有限公司 Picture processing window loading method and device for browsers
CN103631866A (en) * 2013-11-01 2014-03-12 北京奇虎科技有限公司 Webpage display method and browser

Also Published As

Publication number Publication date
CN103927341A (en) 2014-07-16

Similar Documents

Publication Publication Date Title
US11321583B2 (en) Image annotating method and electronic device
US10360257B2 (en) System and method for image annotation
CN107919129A (en) Method and apparatus for controlling the page
CN104182234B (en) A kind of method for processing business and operation system
CN109660823A (en) Video distribution method, apparatus, electronic equipment and storage medium
CN106372606A (en) Target object information generation method and unit identification method and unit and system
CN105373471B (en) Detection method and device for RAM leakage loophole
CN105718558B (en) The display methods and device of picture in the page
CN104412565B (en) For relating to the method that the socket of bearer independent protocol manages
US9747385B2 (en) Compression of cascading style sheet files
CN110286917A (en) File packing method, device, equipment and storage medium
CN107203470B (en) Page adjustment method and device
CN111935081B (en) Data packet desensitization method and device
CN103927341B (en) A kind of method and device for obtaining scene information
CN107766307A (en) A kind of method and apparatus of Form Element linkage
CN113160231A (en) Sample generation method, sample generation device and electronic equipment
CN109902768A (en) The processing of the output result of optical character recognition technology
CN111881740A (en) Face recognition method, face recognition device, electronic equipment and medium
CN104883478B (en) Video processing method and device
CN111491209A (en) Video cover determining method and device, electronic equipment and storage medium
US20160188680A1 (en) Electronic device and information searching method for the electronic device
CN110135512A (en) Recognition methods, equipment, storage medium and the device of picture
CN105302715B (en) The acquisition methods and device of application program user interface
CN107239583A (en) A kind of face retrieval method and device based on L1 norm neutral nets
CN110134815A (en) Image processing method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 511446 Guangzhou City, Guangdong Province, Panyu District, South Village, Huambo Business District Wanda Plaza, block B1, floor 28

Applicant after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: 510655, Guangzhou, Whampoa Avenue, No. 2, creative industrial park, building 3-08,

Applicant before: Guangzhou Huaduo Network Technology Co., Ltd.

GR01 Patent grant