CN103927221B - Sensing data acquisition methods and electronic equipment - Google Patents
Sensing data acquisition methods and electronic equipment Download PDFInfo
- Publication number
- CN103927221B CN103927221B CN201310012912.6A CN201310012912A CN103927221B CN 103927221 B CN103927221 B CN 103927221B CN 201310012912 A CN201310012912 A CN 201310012912A CN 103927221 B CN103927221 B CN 103927221B
- Authority
- CN
- China
- Prior art keywords
- sensor
- sensing data
- application program
- request
- data
- 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
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a kind of sensing data acquisition methods and electronic equipment.The sensing data acquisition methods, applied to the electronic equipment with sensor, and electronic equipment operation has the Web applications based on HTML5, and methods described includes:The Web applications receive the request for sensor data of devices in remote electronic;The request for sensor data is parsed, obtains sensor application program interface corresponding with the request for sensor data;Sensing data is obtained from the sensor corresponding to the sensor application program interface;The Web applies is sent to the devices in remote electronic by the sensing data of acquisition.
Description
Technical field
The present invention relates to sensing data acquiring technology, obtained more particularly, to a kind of electronic equipment and sensing data
Take method.
Background technology
HTML5 is by World Wide Web Consortium(World Wide Web Consortium, W3C)The newest HTML standard formulated
Version, its a set of technical combinations including HTML, CSS and JavaScript.HTML5 can reduce browser for needs
The rich network english teaching of plug-in unit(Plug-in-based rich internet application, RIA), such as Adobe
Flash, Microsoft Silverlight, the demand with Oracle JavaFX;Also, more effectively enhancing networks can be provided
The regular set of application.W3C application programming interfaces(API)It is a series of access and control that W3C harpoons define to HTML5 standards
The JavaScript interface of various equipment, using these API, the application based on HTMIL5 can utilize JavaScript realizations pair
In the access and control of the equipment such as camera, sensor.
At present, many electronic equipments have one or more sensors, such as gravity sensor, gyroscope, light sensing
Device, magnetic field sensor, temperature sensor etc..Many the locally applied of electronic equipment make use of these sensors, however,
Web applications also fail to use this kind of sensor.W3C HTML5 defines the device A PI by access sensors equipment, real
Now the web application based on HTML5 obtains local sensor data.However, if it is desired to remotely use the sensing of other equipment
Device, remotely using the sensor on mobile phone such as on the PC of no sensor, there is presently no corresponding solution
Certainly scheme.
Accordingly, it is desirable to provide a kind of sensing data that Local or Remote equipment can be obtained under HTML5 environment, and nothing
The device A PI that need to be defined to existing HTML5 specifications and HTML5 specifications carries out the sensing data acquisition methods of any modification
And corresponding electronic equipment.
The content of the invention
In view of the above, the invention provides a kind of sensing data acquisition methods and electronic equipment, Neng Gou
The sensing data of Local or Remote equipment is obtained under HTML5 environment, without to existing HTML5 specifications and HTML5 rule
The device A PI that model defines carries out any modification.
According to one embodiment of present invention, there is provided a kind of sensing data acquisition methods, applied to sensor
Electronic equipment, and electronic equipment operation has the Web applications based on HTML5, and methods described includes:The Web applications connect
Receive the request for sensor data of devices in remote electronic;The request for sensor data is parsed, obtaining please with the sensing data
Seek corresponding sensor application program interface;Sensor number is obtained from the sensor corresponding to the sensor application program interface
According to;The Web applies is sent to the devices in remote electronic by the sensing data of acquisition.
In addition, sensing data acquisition methods according to an embodiment of the invention, the sensor application program connects
Mouth is the application programming interfaces for meeting HTML5 specifications.
According to another embodiment of the invention, there is provided a kind of sensing data acquisition methods, applied to electronic equipment,
The electronic equipment operation has the Web applications based on HTML5, and methods described includes:The Web applications send sensing data please
Ask;The request for sensor data is parsed, obtains sensor application program interface corresponding with the request for sensor data;Look into
Local application interface is ask, is connect if there is local application corresponding with the sensor application program interface of acquisition
Mouthful, then obtain sensing data from the local application interface and be supplied to the Web to apply;If there is no with acquisition
The sensor application program interface corresponding to local application interface, then sent to devices in remote electronic including acquisition
The request for sensor data of the sensor application program interface, and receive the sensor number beamed back from the devices in remote electronic
According to.
In addition, sensing data acquisition methods according to another embodiment of the invention, the sensor application program
Interface is the application programming interfaces for meeting HTML5 specifications.
According to still another embodiment of the invention, there is provided a kind of electronic equipment, including:Processing unit, for running extremely
The few one Web application based on HTML5;And communication unit, for being communicatively coupled via network and devices in remote electronic;
Wherein, the processing unit further comprises resolution unit and sensor agent unit, and the resolution unit is received and parsed
The request for sensor data that the Web applications of the processing unit operation are sent, is obtained corresponding with the request for sensor data
Sensor application program interface, the sensor agent unit inquires about local application interface, if there is the institute with acquisition
Local application interface corresponding to sensor application program interface is stated, then obtains sensor from the local application interface
Data are simultaneously supplied to the Web to apply;Locally should if there is no corresponding with the sensor application program interface of acquisition
With routine interface, then the sensor application program interface including acquisition is sent to remote equipment via the communication unit
Request for sensor data, and receive the sensing data beamed back from the devices in remote electronic.
In addition, electronic equipment according to still another embodiment of the invention, the electronic equipment also includes sensor unit,
Wherein, the Web of the processing unit operation applies the sensor number that devices in remote electronic is received via the communication unit
According to request, sensing data is obtained from the sensor corresponding to the sensor application program interface, the Web applications will obtain
The sensing data be sent to the devices in remote electronic via the communication unit.
In addition, electronic equipment according to still another embodiment of the invention, the sensor application program interface is to meet
The application programming interfaces of HTML5 specifications.
Sensing data acquisition methods according to embodiments of the present invention and electronic equipment, it can be obtained under HTML5 environment
The sensing data of Local or Remote equipment, without the device A PI defined to existing HTML5 specifications and HTML5 specifications
Carry out any modification.
It is to be understood that foregoing general description and following detailed description are both exemplary, and it is intended to
In the further explanation for providing claimed technology.
Brief description of the drawings
Fig. 1 is the theory structure schematic diagram of electronic equipment according to embodiments of the present invention;
Fig. 2 is that the sensing data of sensing data acquisition methods according to embodiments of the present invention obtains the flow of processing
Figure;And
Fig. 3 is that the sensing data of sensing data acquisition methods according to embodiments of the present invention provides the flow of processing
Figure.
Embodiment
Hereinafter, multiple embodiments, application and modification are described with reference to the accompanying drawings.In addition, the embodiments described below is excellent
The particular example of choosing, and there is provided technically preferable various limitations, but in the following description, the invention is not restricted to these
Embodiment.
First, reference picture 1 is described to electronic equipment according to embodiments of the present invention.The electronic equipment preferably can be
Smart mobile phone, personal computer, tablet personal computer etc..
As shown in figure 1, electronic equipment 1 according to embodiments of the present invention has processing unit 10, communication unit 20 and sensing
Device unit 30.It is easily understood that the component being closely related in Fig. 1 in order to simplify description only to show with the present invention, according to this
The electronic equipment 1 of inventive embodiments can also include other components, display unit, I/O unit etc. certainly.
Specifically, the processing unit 10 of the electronic equipment 1 shown in Fig. 1, for running operating system and at least one base
Applied in HTML5 Web.
Communication unit 20, for being communicatively coupled via network and other electronic equipments and server;The communication unit
Member 20 can be communicated via network with other electronic equipments and server in a wired or wireless fashion, so as to other electronics
Data and service needed for equipment and server exchange.
Sensor unit 30 includes but is not limited to gravity sensor, gyroscope, optical sensor, magnetic field sensor, temperature and passed
Sensor etc..
Those skilled in the art is it is easily understood that although Fig. 1 only schematically shows a sensor unit 30;But
It is that electronic equipment 1 according to embodiments of the present invention can include two or more sensor units.In addition, it is to be understood that
Electronic equipment 1 according to embodiments of the present invention can also not have local sensor unit, but can be by using according to this
The sensing data acquisition methods of inventive embodiments, obtain the number of the sensor configured in connected devices in remote electronic
According to.
In addition, as shown in figure 1, resolution unit 11 and sensor are further configured with the processing unit 10 of electronic equipment 1
Agent unit 12;In a preferred embodiment of the invention, the resolution unit 11, for receiving and parsing by described
The request for sensor data that the Web applications that reason unit 10 is run are sent, obtains sensing corresponding with the request for sensor data
Device application programming interfaces.
The sensor agent unit 12 further inquires about local application interface, with determine whether there is with by described
Resolution unit 11 parses the corresponding local application interface of the sensor application program interface obtained;If there is with acquisition
The sensor application program interface corresponding to local application interface, then from the local application interface obtain pass
Sensor data are simultaneously supplied to the Web to apply;If there is no sheet corresponding with the sensor application program interface of acquisition
Ground application programming interfaces, then the sensor application program including acquisition is sent to remote equipment via the communication unit 20
The request for sensor data of interface, and receive the sensing data beamed back from the devices in remote electronic.
Hereinafter, reference picture 2 and Fig. 3 are specifically described into sensing data acquisition methods according to embodiments of the present invention.
Fig. 2 is that the sensing data of sensing data acquisition methods according to embodiments of the present invention obtains the flow of processing
Figure.As shown in Fig. 2 sensing data acquisition methods according to embodiments of the present invention sensing data obtain processing include it is following
Step:
In step s 201, Web applications send request for sensor data;
Here, the Web applications that the request for sensor data is specifically run by processing unit 10 are sent.
In step S202, the request for sensor data is parsed, obtains sensor corresponding with request for sensor data
Application programming interfaces;
Here, the parsing is specifically completed by the resolution unit 11 in processing unit 10.
In a preferred embodiment of the invention, the sensor application program interface is to meet answering for HTML5 specifications
Use routine interface.
In step S203, local application interface is inquired about, it is determined whether the sensor application program with obtaining be present
Local application interface corresponding to interface, if it is present processing enters step S204;Otherwise, processing enters step S205.
Here, the inquiry is specifically completed by the sensor agent unit 12 in processing unit 10.
Specifically, if determining locally should in the presence of corresponding with the sensor application program interface of acquisition in step S203
With routine interface, i.e.,:There is the electronic equipment 1 Web to apply required sensor resource, and now processing enters step S204.
In step S204, obtain sensing data from the local application interface and be supplied to the Web to apply,
Hereafter sensing data acquisition processing is terminated.
Here, the acquisition sensing data is specifically completed by the sensor agent unit 12.
If on the contrary, determined in step S203 in the absence of corresponding with the sensor application program interface of acquisition local
Application programming interfaces, i.e.,:The electronic equipment 1 is specified using special without Web using required sensor resource or Web applications
Determine the sensor resource of devices in remote electronic, now processing enters step S205.
In step S205, the sensor number of the sensor application program interface including acquisition is sent to devices in remote electronic
According to request;
Here, the request for sensor data specifically from the sensor agent unit 12 via communication unit 20 to long-range
Electronic equipment is sent.
In step S206, receive the sensing data beamed back from devices in remote electronic and be supplied to the Web to apply, this
After terminate sensing data acquisition processing.
Here, the reception is specifically received by the sensor agent unit 12 via communication unit 20.
At sensing data acquisition by sensing data acquisition methods according to embodiments of the present invention as shown in Figure 2
Reason, local sensor data or distance sensor data can be provided as needed for Web applications, and the sensing data obtains
The appliance applications interface defined based on existing HTML5 specifications and HTML5 specifications is handled, without carrying out any expansion
Or modification.
Fig. 3 is that the sensing data of sensing data acquisition methods according to embodiments of the present invention provides the flow of processing
Figure.As shown in Fig. 2 sensing data acquisition methods according to embodiments of the present invention sensing data provide processing include it is following
Step:
In step S301, the request for sensor data of devices in remote electronic is received;
Here, the Web that the reception request for sensor data is specifically run by the processing unit 10 is applied via communication
Unit 20 receives.
In step s 302, the request for sensor data is parsed, obtains sensor corresponding with request for sensor data
Application programming interfaces;
Here, the parsing is specifically completed by the resolution unit 11 in processing unit 10.
As it was previously stated, in a preferred embodiment of the invention, the sensor application program interface is to meet HTML5
The application programming interfaces of specification.
In step S303, sensing data is obtained from the local application interface;
Here, the acquisition sensing data is specifically completed by sensor agent unit 12.
In step s 304, the sensing data of acquisition is sent to devices in remote electronic.
Here, the transmission is applied for Web sends via communication unit 20.
At sensing data offer by sensing data acquisition methods according to embodiments of the present invention as shown in Figure 3
Reason, local sensor data, and the sensing can be provided as needed for the devices in remote electronic for sending request for sensor data
Device data provide the appliance applications interface that processing is defined based on existing HTML5 specifications and HTML5 specifications, without entering
Any expansion of row or modification.
Sensing data acquisition methods and electronic equipment according to embodiments of the present invention are described above by reference to Fig. 1 to Fig. 3,
The sensing data of Local or Remote equipment can be obtained under HTML5 environment, without to existing HTML5 specifications and
The device A PI that HTML5 specifications define carries out any modification.
It should be noted that in this manual, term " comprising ", "comprising" or its any other variant are intended to
Nonexcludability includes, so that process, method, article or equipment including a series of elements not only will including those
Element, but also the other element including being not expressly set out, or it is this process, method, article or equipment also to include
Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Other identical element also be present in process, method, article or equipment including the key element.
Finally, it is to be noted that, a series of above-mentioned processing are not only included with order described here in temporal sequence
The processing of execution, and the processing including performing parallel or respectively rather than in chronological order.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by
Software adds the mode of required hardware platform to realize, naturally it is also possible to is all implemented by hardware.Based on such understanding,
What technical scheme contributed to background technology can be embodied in the form of software product in whole or in part,
The computer software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are making
Obtain a computer equipment(Can be personal computer, server, or network equipment etc.)Perform each embodiment of the present invention
Or the method described in some parts of embodiment.
The present invention is described in detail above, principle and embodiment party of the specific case used herein to the present invention
Formula is set forth, and the explanation of above example is only intended to help the method and its core concept for understanding the present invention;It is meanwhile right
In those of ordinary skill in the art, according to the thought of the present invention, change is had in specific embodiments and applications
Part, in summary, this specification content should not be construed as limiting the invention.
Claims (7)
1. a kind of sensing data acquisition methods, applied to the electronic equipment with sensor, and electronic equipment operation has
Web applications based on HTML5, methods described include:
The Web applications receive the request for sensor data of devices in remote electronic;
The request for sensor data is parsed, obtains sensor application program interface corresponding with the request for sensor data;
Sensing data is obtained from the sensor of the electronic equipment corresponding to the sensor application program interface;
The Web applies is sent to the devices in remote electronic by the sensing data of acquisition.
2. sensing data acquisition methods as claimed in claim 1, it is characterised in that the sensor application program interface is
Meet the application programming interfaces of HTML5 specifications.
3. a kind of sensing data acquisition methods, applied to electronic equipment, the electronic equipment operation has the Web based on HTML5
Using methods described includes:
The Web applications send request for sensor data;
The request for sensor data is parsed, obtains sensor application program interface corresponding with the request for sensor data;
Local application interface is inquired about, if there is corresponding locally applied with the sensor application program interface of acquisition
Routine interface, then obtain sensing data from the local application interface and be supplied to the Web to apply;If there is no
Local application interface corresponding with the sensor application program interface of acquisition, then to devices in remote electronic send including
The request for sensor data of the sensor application program interface obtained, and receive the biography beamed back from the devices in remote electronic
Sensor data.
4. sensing data acquisition methods as claimed in claim 3, it is characterised in that the sensor application program interface is
Meet the application programming interfaces of HTML5 specifications.
5. a kind of electronic equipment that can obtain sensing data, including:
Processing unit, for running at least one Web applications based on HTML5;And
Communication unit, for being communicatively coupled via network and devices in remote electronic;
Wherein, the processing unit further comprises resolution unit and sensor agent unit,
The resolution unit receives and parsed the request for sensor data that the Web applications of the processing unit operation are sent, and obtains
Sensor application program interface corresponding with the request for sensor data is taken, the sensor agent unit is inquired about locally applied
Routine interface, if there is local application interface corresponding with the sensor application program interface of acquisition, then from institute
Local application interface is stated to obtain sensing data and be supplied to the Web to apply;If there is no the biography with acquisition
Local application interface corresponding to sensor application programming interfaces, then send including obtaining via the communication unit to remote equipment
The request for sensor data of the sensor application program interface taken, and receive the sensing beamed back from the devices in remote electronic
Device data.
6. electronic equipment as claimed in claim 5, it is characterised in that the electronic equipment also includes sensor unit,
Wherein, the Web of the processing unit operation applies the sensing that devices in remote electronic is received via the communication unit
Device request of data, sensing data is obtained from the sensor corresponding to the sensor application program interface, the Web is applied will
The sensing data obtained is sent to the devices in remote electronic via the communication unit.
7. the electronic equipment as described in claim 5 or 6, it is characterised in that the sensor application program interface is to meet
The application programming interfaces of HTML5 specifications.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310012912.6A CN103927221B (en) | 2013-01-14 | 2013-01-14 | Sensing data acquisition methods and electronic equipment |
US14/153,484 US20140201619A1 (en) | 2013-01-11 | 2014-01-13 | Method And Device For Implementing Local Operation On Web Page |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310012912.6A CN103927221B (en) | 2013-01-14 | 2013-01-14 | Sensing data acquisition methods and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103927221A CN103927221A (en) | 2014-07-16 |
CN103927221B true CN103927221B (en) | 2017-11-24 |
Family
ID=51145450
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310012912.6A Active CN103927221B (en) | 2013-01-11 | 2013-01-14 | Sensing data acquisition methods and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103927221B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10004979B2 (en) * | 2015-02-26 | 2018-06-26 | Microsoft Technology Licensing, Llc | Sensor data availability from remote devices |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101771728A (en) * | 2008-12-29 | 2010-07-07 | 华为技术有限公司 | Method, device and system for inquiring sensor data |
CN101820588A (en) * | 2010-05-07 | 2010-09-01 | 中兴通讯股份有限公司 | Method and network for sharing sensor data among mobile terminals |
CN102685254A (en) * | 2012-05-31 | 2012-09-19 | 深圳英宝通科技有限公司 | Control method and system for cross-platform mobile network terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101410805B (en) * | 2006-04-07 | 2013-03-27 | 高通股份有限公司 | Sensor interface, and methods and apparatus pertaining to same |
-
2013
- 2013-01-14 CN CN201310012912.6A patent/CN103927221B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101771728A (en) * | 2008-12-29 | 2010-07-07 | 华为技术有限公司 | Method, device and system for inquiring sensor data |
CN101820588A (en) * | 2010-05-07 | 2010-09-01 | 中兴通讯股份有限公司 | Method and network for sharing sensor data among mobile terminals |
CN102685254A (en) * | 2012-05-31 | 2012-09-19 | 深圳英宝通科技有限公司 | Control method and system for cross-platform mobile network terminal |
Also Published As
Publication number | Publication date |
---|---|
CN103927221A (en) | 2014-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10867282B2 (en) | Method and system for GPS enabled model and site interaction and collaboration for BIM and other design platforms | |
US10949805B2 (en) | Method and system for native object collaboration, revision and analytics for BIM and other design platforms | |
US9817922B2 (en) | Method and system for creating 3D models from 2D data for building information modeling (BIM) | |
CN104702665B (en) | Information sharing method and information sharing apparatus | |
EP3745675A1 (en) | Service layer resource propagation across domains | |
CN103268319A (en) | Cloud browser based on webpages | |
CN104580454A (en) | Data synchronizing method, device and system | |
CN102272747A (en) | Method and apparatus for managing state information of remote user interface | |
CN103685433B (en) | Virtual document transmission system and virtual document transmission method thereof | |
CN102447726A (en) | Method and system for page access | |
CN103218741A (en) | Method and system for bidding advertisement, trading platform and advertisement service providing equipment | |
CN102402519A (en) | Search method, search result display method, search server and client | |
CN104917731B (en) | A kind of data that improve show the method and system of speed, server, browser | |
CN107463536A (en) | A kind of method and system for realizing document in online preview server in Android device | |
KR20110139867A (en) | Operation system and method for virtual world | |
CN103927221B (en) | Sensing data acquisition methods and electronic equipment | |
CN104618324A (en) | Method and device for transmitting data and detecting data legality | |
CN104079368B (en) | A kind of the test data transmission method and server of application software | |
CN105468636A (en) | Dynamic web page picture loading method, apparatus and system | |
KR101800745B1 (en) | Method and apparatus for connecting between devices | |
CN102685220A (en) | Method and system for data interaction based on WEB page | |
CN116127945A (en) | Network link processing method and device, electronic equipment and storage medium | |
US20170075880A1 (en) | Translation for web services | |
CN105915584A (en) | Business request method based on proxy server and system | |
CN103166829A (en) | Network information page providing method, system, network information platform and service system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |