CN106293726B - Data acquisition method and device and mobile equipment - Google Patents

Data acquisition method and device and mobile equipment Download PDF

Info

Publication number
CN106293726B
CN106293726B CN201610631013.8A CN201610631013A CN106293726B CN 106293726 B CN106293726 B CN 106293726B CN 201610631013 A CN201610631013 A CN 201610631013A CN 106293726 B CN106293726 B CN 106293726B
Authority
CN
China
Prior art keywords
serial number
input
event
equipment
file
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
CN201610631013.8A
Other languages
Chinese (zh)
Other versions
CN106293726A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610631013.8A priority Critical patent/CN106293726B/en
Publication of CN106293726A publication Critical patent/CN106293726A/en
Application granted granted Critical
Publication of CN106293726B publication Critical patent/CN106293726B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides a data acquisition method, a data acquisition device and mobile equipment, wherein the data acquisition method comprises the following steps: determining a serial number of an input device; determining an event serial number corresponding to the input equipment serial number according to a pre-generated equipment file; acquiring data corresponding to the event sequence number according to the event sequence number; and recording a corresponding relation between the input equipment serial number and the event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration. The method can determine the accurate event serial number according to the serial number of the input equipment, thereby ensuring the accuracy of the acquired input equipment data.

Description

Data acquisition method and device and mobile equipment
Technical Field
The present invention relates to the field of mobile communications technologies, and in particular, to a data acquisition method, an apparatus, and a mobile device.
Background
Touch screens, volume keys, sensors on mobile devices, keys on earphone cords for controlling mobile devices, and the like all belong to input devices. Taking the mobile device as an android operating system as an example, the android operating system is based on a linux kernel, and an input subsystem can be established in the linux kernel corresponding to the input device. When the input subsystem initializes the device, registration operations including registration of the input device, event registration, and the like are performed. Input device serial numbers such as input1, input2, etc. are generated at registration time, and event serial numbers such as event1, event2, etc. are generated.
In the related art, when an Application (APP) needs to acquire data, an event sequence number identical to an input sequence number is determined according to the input sequence number, and then data corresponding to the event sequence number is acquired. For example, when data corresponding to input1 needs to be acquired, it is directly determined that the event sequence number corresponding to input1 is event1, and then the data of event1 is acquired.
Although in general, an input sequence number coincides with an event sequence number, for example, input1 corresponds to event 1. However, due to driving multiple threads, etc., in some cases, the input sequence number is not consistent with the event sequence number, for example, the first thread creates input1, the second thread creates input2, and multiple threads work simultaneously, so that there may exist a case where the second thread creates the event sequence number in advance of the first thread, that is, the second thread creates event1, and the first thread creates event2, which may cause the input sequence number to be inconsistent with the event sequence number, and at this time, the same event sequence number is determined directly according to the input sequence number as the corresponding event sequence number, which may cause a data acquisition error, for example, data of the sensor is mistaken as data of the touch screen.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, an object of the present invention is to provide a data acquisition method, which can determine an accurate event serial number according to an input device serial number, thereby ensuring the accuracy of the acquired input device data.
Another object of the present invention is to provide a data acquisition apparatus.
Another object of the present invention is to provide a mobile device.
In order to achieve the above object, an embodiment of the present invention provides a data acquisition method, including: determining a serial number of an input device; determining an event serial number corresponding to the input equipment serial number according to a pre-generated equipment file; acquiring data corresponding to the event sequence number according to the event sequence number; and recording a corresponding relation between the input equipment serial number and the event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration.
In the data acquiring method provided in the first aspect of the present invention, the event serial number corresponding to the input device serial number is determined according to the device file, and the correspondence between the input device serial number and the event serial number recorded in the device file is determined after the input device is registered, and since the registered actual information is acquired, the accuracy of the correspondence between the input device serial number and the event serial number can be ensured, so that the accurate event serial number can be determined according to the input device serial number when the data is acquired, thereby ensuring the accuracy of the acquired input device data.
In order to achieve the above object, a data acquisition apparatus according to an embodiment of a second aspect of the present invention includes: the first determining module is used for determining the serial number of the input equipment; the second determining module is used for determining an event serial number corresponding to the input equipment serial number according to a pre-generated equipment file; the acquisition module is used for acquiring data corresponding to the event serial number according to the event serial number; and recording a corresponding relation between the input equipment serial number and the event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration.
The data acquisition apparatus provided in the embodiment of the second aspect of the present invention determines the event serial number corresponding to the input device serial number according to the device file, and the correspondence between the input device serial number and the event serial number recorded in the device file is determined after the input device is registered, and since the registered actual information is obtained, the accuracy of the correspondence between the input device serial number and the event serial number can be ensured, so that the accurate event serial number can be determined according to the input device serial number when the data is acquired, thereby ensuring the accuracy of the acquired input device data.
In order to achieve the above object, a mobile device according to a third aspect of the present invention includes: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the mobile equipment; the memory is used for storing executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the steps of: determining a serial number of an input device; determining an event serial number corresponding to the input equipment serial number according to a pre-generated equipment file; acquiring data corresponding to the event sequence number according to the event sequence number; and recording a corresponding relation between the input equipment serial number and the event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration.
In the mobile device according to the third aspect of the present invention, the event serial number corresponding to the input device serial number is determined according to the device file, and the correspondence between the input device serial number and the event serial number recorded in the device file is determined after the input device is registered, and since the registered actual information is obtained, the accuracy of the correspondence between the input device serial number and the event serial number can be ensured, so that the accurate event serial number can be determined according to the input device serial number when data is obtained, thereby ensuring the accuracy of the obtained input device data.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of a data acquisition method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram of a data acquisition method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data acquisition apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data acquisition apparatus according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a mobile device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar modules or modules having the same or similar functionality throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. On the contrary, the embodiments of the invention include all changes, modifications and equivalents coming within the spirit and terms of the claims appended hereto.
Fig. 1 is a schematic flow chart of a data acquisition method according to an embodiment of the present invention.
Referring to fig. 1, the method includes:
s11: an input device serial number is determined.
The input subsystem detects the state of the input device, and when the state of the input device changes, the input subsystem generates corresponding data according to the state change condition and encapsulates the data in an event (event).
For example, when a volume down key (-) is detected to be pressed, data indicating a volume down may be generated and encapsulated in an event corresponding to the volume key, the input device.
In addition, the input subsystem reports the serial number of the input device (inputX, X ═ 1,2,3 …) with changed state, such as the serial number of the input device of the volume key, to the user space.
Thus, the user space may retrieve the input device serial number, such as input1, from the received information.
S12: and determining an event serial number corresponding to the input equipment serial number in a pre-generated equipment file.
And recording a corresponding relation between the input equipment serial number and the event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration.
For example, if an input1 is recorded in the device file corresponding to event1, and if the input device number received by the user space is input1, it may be determined that the corresponding event number is event 1.
Further, the device file may be created by the input subsystem, and after the input subsystem completes registration, the input subsystem may obtain the input device serial number and the corresponding event serial number corresponding to each input device, and then record the input device serial number and the event serial number in the device file correspondingly.
For example, after the input subsystem completes registration, if it is determined that the event sequence number corresponding to the device with the sequence number of input1 is event1, the corresponding relationship between input1 and event1 is established in the device file.
Further, after the input subsystem completes registration, the input subsystem may obtain the input device sequence number and the corresponding event sequence number from the input device handle (input _ handle).
S13: and acquiring data corresponding to the event sequence number according to the event sequence number.
The input subsystem encapsulates the data in the event when storing the data, so that the event sequence number can be sent to the input subsystem after the user space determines the event sequence number, the input subsystem determines the corresponding event according to the event sequence number, and then the data is acquired from the corresponding event and returned to the user space.
Further, after the user space acquires the data, subsequent data can be performed according to the data. Specifically, after acquiring data, the user space finally reaches an Application (APP) in the user space, and the APP may process the acquired data accordingly, for example, when receiving data indicating that the volume is decreased, the volume is decreased.
In this embodiment, the event sequence number corresponding to the input device sequence number is determined according to the device file, and the correspondence between the input device sequence number and the event sequence number recorded in the device file is determined after registration is completed. For example, the first thread creates input1, the second thread creates input2, even if the second thread creates an event sequence number in advance of the first thread, that is, the second thread creates event1, the first thread creates event2, because the registration is performed according to the actual situation, that is, the input1 corresponds to the event2 and the input2 corresponds to the event1 during the registration, when the input subsystem acquires the correspondence between the input sequence number and the event sequence number after the registration is completed, the input subsystem acquires an accurate correspondence, for example, the input1 corresponds to the event2, and the input2 corresponds to the event 1.
Fig. 2 is a schematic flow chart of a data acquisition method according to another embodiment of the present invention.
Referring to fig. 2, the method of the present embodiment includes:
s21: the input subsystem performs registration processing on the input device.
The registration process may include, among other things, input device registration and event registration.
The input device registers, for example, a touch screen, a volume key, a sensor, a key on an earphone cord, and the like as an input (input) device.
Event registration is registration of the handler of the input device.
At the time of registration processing, an input device serial number and an event serial number are generated.
S22: the input subsystem creates an equipment file, acquires an input equipment serial number and a corresponding event serial number corresponding to each input equipment after registration is completed, and records the corresponding relationship between the acquired input equipment serial number and the event serial number in the equipment file.
Wherein, a function can be configured in the input subsystem in advance, and the function is adopted to create the device file.
It is understood that the input subsystem may create a device file before the registration is completed, so that after the input device serial number and the event serial number are acquired after the registration of the input device is completed, the input device serial number and the event serial number are correspondingly recorded in the device file. Alternatively, the first and second electrodes may be,
the input subsystem may also create an equipment file after registration is completed, and record the acquired input equipment serial number and the acquired event serial number in the equipment file correspondingly.
In addition, the input subsystem may obtain the input device sequence number and the corresponding event sequence number according to the input _ handle.
The input device handle is a structural body in the input subsystem and is used for associating the input device serial number with the event serial number, so that the input device serial number and the event serial number which correspond to each other can be acquired through the input device handle.
S23: and after detecting that the state of the input equipment is changed, the input subsystem generates data according to the change condition and packages the data in the event.
For example, if the volume down key (-) is detected to be pressed, data indicating volume down is generated and encapsulated in the event number corresponding to the volume key, for example, if the event number corresponding to the audio key is event1, the data indicating volume down is encapsulated in the event of event 1.
For another example, when the rotation of the acceleration sensor is detected, coordinate values of x, y, and z axes corresponding to the rotation are generated, and the coordinate values of the three coordinate axes are enclosed in an event number corresponding to the acceleration sensor, for example, event 2.
Further, in order to ensure real-time performance of data, the method may further include:
the input subsystem determines the data generation time, and takes the generation time as a time stamp to be recorded corresponding to the data.
For example, if the generation time of the data indicating volume reduction (assumed to be represented by data 1) is t1, then the corresponding record in the input subsystem is: event1, data1, and t 1.
For another example, if the generation time of the three coordinate values of the acceleration sensor rotation (assumed to be represented by data 2) is t2, the input subsystem records: event2, data2, and t 2.
S24: and after detecting that the state of the input equipment is changed, the input subsystem sends the serial number of the changed input equipment to the user space.
For example, the input device number corresponding to the volume key is denoted by input1, and when the input subsystem detects that the volume down key is pressed, it sends input1 to the user space.
S25: and the user space searches in the equipment file according to the received serial number of the input equipment, and determines the event serial number corresponding to the received serial number of the input equipment.
For example, if the device file records that input1 corresponds to event1, it is determined that the corresponding event sequence number is event1 when input1 is received.
Specifically, the module for determining the event sequence number corresponding to the received input device sequence number according to the device file may specifically be a Hardware Abstraction Layer (HAL) or an application framework layer (application framework) in the user space.
S26: and the user space acquires corresponding data from the input subsystem according to the determined event sequence number.
For example, if the determined event sequence number is event1, the corresponding data is determined to be the data corresponding to event 1.
Further, when the user space acquires data, the data corresponding to the event sequence number and having the timestamp closest to the current time may be acquired according to the current time.
For example, the input subsystem records: event1, data11 and t11, and event1, data12 and t12, and the data obtained is data2, assuming that the determined event number is event1 and that t12 is closest to the current time.
S27: and the APP makes corresponding response according to the acquired data.
For example, after the HAL layer or the framework layer obtains data from the input subsystem, the data is reported to the APP, and then the APP can perform corresponding reaction according to the data.
For example, get volume — pressed, then decrease volume; volume + is pressed, increasing the volume. When the x, y and z axis data of the acceleration sensor is about (0,0,9.8), the screen is traversed; (0,9.8,0) vertical screen, etc.
In this embodiment, the event sequence number corresponding to the input device sequence number is determined according to the device file, and the correspondence between the input device sequence number and the event sequence number recorded in the device file is determined after registration is completed. Furthermore, by time stamping the data, the real-time performance of data acquisition can be ensured.
Fig. 3 is a schematic structural diagram of a data acquisition apparatus according to an embodiment of the present invention.
Referring to fig. 3, the apparatus 30 includes: a first determining module 31, a second determining module 32 and an obtaining module 33.
A first determining module 31, configured to determine an input device serial number;
a second determining module 32, configured to determine, according to a pre-generated device file, an event serial number corresponding to the input device serial number;
an obtaining module 33, configured to obtain, according to the event sequence number, data corresponding to the event sequence number;
and recording a corresponding relation between the input equipment serial number and the event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration.
In some embodiments, referring to fig. 4, the apparatus 30 of the present embodiment further includes:
the creating module 34 is configured to create an equipment file, acquire an input equipment serial number and a corresponding event serial number corresponding to each input equipment after registration is completed, and record a corresponding relationship between the acquired input equipment serial number and the event serial number in the equipment file.
In some embodiments, the creating module 34 is configured to obtain an input device serial number and a corresponding event serial number, and includes:
and acquiring the serial number of the input equipment and the corresponding event serial number according to the handle of the input equipment.
In some embodiments, the obtaining module 33 is specifically configured to:
and acquiring data which corresponds to the event sequence number and has the timestamp closest to the current time.
In some embodiments, referring to fig. 4, the apparatus 30 further comprises:
the recording module 35 is configured to generate data after detecting that the state of the input device changes, encapsulate the data in an event corresponding to the input device whose state changes, and record a timestamp corresponding to the data.
It is to be understood that the first determining module, the second determining module and the obtaining module may be specifically located in a user space, and the creating module and the recording module may be specifically located in an input subsystem of a kernel space.
It is understood that the apparatus of the present embodiment corresponds to the method embodiment described above, and specific contents may be referred to the description of the method embodiment, and are not described in detail herein.
In this embodiment, the event sequence number corresponding to the input device sequence number is determined according to the device file, and the correspondence between the input device sequence number and the event sequence number recorded in the device file is determined after the input device is registered, and since the registered actual information is obtained, the accuracy of the correspondence between the input device sequence number and the event sequence number can be ensured, so that the accurate event sequence number can be determined according to the input device sequence number when the data is obtained, thereby ensuring the accuracy of the obtained input device data.
Fig. 5 is a schematic structural diagram of a mobile device according to an embodiment of the present invention.
The mobile device may specifically be a mobile device of an android system, such as an android handset.
Referring to fig. 5, the mobile device 50 includes: the device comprises a shell 51, a processor 52, a memory 53, a circuit board 54, a power circuit 55 and a sensor 56, wherein the circuit board 54 is arranged inside a space enclosed by the shell 51, and the processor 52 and the memory 53 are arranged on the circuit board 54; a power supply circuit 55 for supplying power to various circuits or devices of the mobile device; the memory 53 is used to store executable program code; the processor 52 executes a program corresponding to the executable program code by reading the executable program code stored in the memory. The sensor 56 is used to perform the following steps:
determining a serial number of an input device;
determining an event serial number corresponding to the input equipment serial number according to a pre-generated equipment file;
acquiring data corresponding to the event sequence number according to the event sequence number;
and recording a corresponding relation between the input equipment serial number and the event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration.
Optionally, the method further includes:
the input subsystem creates an equipment file, acquires an input equipment serial number and a corresponding event serial number corresponding to each input equipment after registration is completed, and records the corresponding relationship between the acquired input equipment serial number and the event serial number in the equipment file.
Optionally, the acquiring the serial number of the input device and the corresponding event serial number includes:
and acquiring the serial number of the input equipment and the corresponding event serial number according to the handle of the input equipment.
Optionally, the acquiring data corresponding to the event sequence number includes:
and acquiring data which corresponds to the event sequence number and has the timestamp closest to the current time.
Optionally, the method further includes:
the input subsystem generates data after detecting that the state of the input equipment is changed, packages the data in an event corresponding to the input equipment with the changed state, and records a timestamp corresponding to the data.
It is understood that the mobile device of this embodiment corresponds to the method embodiment described above, and specific contents may refer to the description of the method embodiment, and are not described in detail here.
In this embodiment, the event sequence number corresponding to the input device sequence number is determined according to the device file, and the correspondence between the input device sequence number and the event sequence number recorded in the device file is determined after the input device is registered, and since the registered actual information is obtained, the accuracy of the correspondence between the input device sequence number and the event sequence number can be ensured, so that the accurate event sequence number can be determined according to the input device sequence number when the data is obtained, thereby ensuring the accuracy of the obtained input device data.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (7)

1. A method of data acquisition, comprising:
determining a serial number of an input device;
determining an event serial number corresponding to the input equipment serial number according to a pre-generated equipment file;
acquiring data corresponding to the event sequence number according to the event sequence number;
recording a corresponding relation between an input equipment serial number and an event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration;
further comprising:
the input subsystem creates an equipment file, acquires an input equipment serial number and a corresponding event serial number corresponding to each input equipment after registration is completed, and records the corresponding relation between the acquired input equipment serial number and the event serial number in the equipment file;
the input subsystem creates the equipment file before the registration is completed, so that the corresponding records are recorded in the equipment file after the input equipment serial number and the event serial number are acquired after the registration of the input equipment is completed; alternatively, the first and second electrodes may be,
the input subsystem creates the equipment file after the registration is completed, and correspondingly records the acquired input equipment serial number and the acquired event serial number in the equipment file;
the acquiring of the serial number of the input device and the corresponding event serial number includes:
acquiring a serial number of the input equipment and a corresponding event serial number according to the handle of the input equipment; the input device handle is a structural body in the input subsystem, and the input device handle is used for associating an input device serial number with an event serial number.
2. The method of claim 1, wherein the obtaining data corresponding to the event sequence number comprises:
and acquiring data which corresponds to the event sequence number and has the timestamp closest to the current time.
3. The method of claim 2, further comprising:
the input subsystem generates data after detecting that the state of the input equipment is changed, packages the data in an event corresponding to the input equipment with the changed state, and records a timestamp corresponding to the data.
4. A data acquisition apparatus, comprising:
the first determining module is used for determining the serial number of the input equipment;
the second determining module is used for determining an event serial number corresponding to the input equipment serial number according to a pre-generated equipment file;
the acquisition module is used for acquiring data corresponding to the event serial number according to the event serial number;
recording a corresponding relation between an input equipment serial number and an event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration;
further comprising:
the system comprises a creating module, a registering module and a judging module, wherein the creating module is used for creating an equipment file, acquiring an input equipment serial number and a corresponding event serial number corresponding to each input equipment after registration is completed, and recording the corresponding relation between the acquired input equipment serial number and the event serial number in the equipment file;
the input subsystem creates the equipment file before the registration is completed, so that the corresponding records are recorded in the equipment file after the input equipment serial number and the event serial number are acquired after the registration of the input equipment is completed; alternatively, the first and second electrodes may be,
the input subsystem creates the equipment file after the registration is completed, and correspondingly records the acquired input equipment serial number and the acquired event serial number in the equipment file;
the creating module is used for acquiring the serial number of the input device and the corresponding event serial number, and comprises:
acquiring a serial number of the input equipment and a corresponding event serial number according to the handle of the input equipment; the input device handle is a structural body in the input subsystem, and the input device handle is used for associating an input device serial number with an event serial number.
5. The apparatus of claim 4, wherein the obtaining module is specifically configured to:
and acquiring data which corresponds to the event sequence number and has the timestamp closest to the current time.
6. The apparatus of claim 5, further comprising:
and the recording module is used for generating data after detecting that the state of the input equipment is changed, packaging the data in an event corresponding to the input equipment with the changed state, and recording a timestamp corresponding to the data.
7. A mobile device, comprising: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the mobile equipment; the memory is used for storing executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the steps of:
determining a serial number of an input device;
determining an event serial number corresponding to the input equipment serial number according to a pre-generated equipment file;
acquiring data corresponding to the event sequence number according to the event sequence number;
recording a corresponding relation between an input equipment serial number and an event serial number in the equipment file, wherein the corresponding relation is determined after the input subsystem finishes registration;
further comprising:
the input subsystem creates an equipment file, acquires an input equipment serial number and a corresponding event serial number corresponding to each input equipment after registration is completed, and records the corresponding relation between the acquired input equipment serial number and the event serial number in the equipment file;
the input subsystem creates the equipment file before the registration is completed, so that the corresponding records are recorded in the equipment file after the input equipment serial number and the event serial number are acquired after the registration of the input equipment is completed; alternatively, the first and second electrodes may be,
the input subsystem creates the equipment file after the registration is completed, and correspondingly records the acquired input equipment serial number and the acquired event serial number in the equipment file;
the acquiring of the serial number of the input device and the corresponding event serial number includes:
acquiring a serial number of the input equipment and a corresponding event serial number according to the handle of the input equipment; the input device handle is a structural body in the input subsystem, and the input device handle is used for associating an input device serial number with an event serial number.
CN201610631013.8A 2016-08-01 2016-08-01 Data acquisition method and device and mobile equipment Active CN106293726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610631013.8A CN106293726B (en) 2016-08-01 2016-08-01 Data acquisition method and device and mobile equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610631013.8A CN106293726B (en) 2016-08-01 2016-08-01 Data acquisition method and device and mobile equipment

Publications (2)

Publication Number Publication Date
CN106293726A CN106293726A (en) 2017-01-04
CN106293726B true CN106293726B (en) 2020-03-06

Family

ID=57665174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610631013.8A Active CN106293726B (en) 2016-08-01 2016-08-01 Data acquisition method and device and mobile equipment

Country Status (1)

Country Link
CN (1) CN106293726B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117223A (en) * 2015-08-20 2015-12-02 广东欧珀移动通信有限公司 Processing method and system of input event

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105117223A (en) * 2015-08-20 2015-12-02 广东欧珀移动通信有限公司 Processing method and system of input event

Also Published As

Publication number Publication date
CN106293726A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
CN108415739B (en) Hook method and device for dynamic link library function and storage medium
CN107291586B (en) Application program analysis method and device
CN110196795B (en) Method and related device for detecting running state of mobile terminal application
CN107943685B (en) Traversal path generation method and device, server and storage medium
CN108073495B (en) Method and device for positioning crash reason of application program
CN113672441B (en) Method and device for testing intelligent equipment
CN107894950A (en) A kind of equipment detection method, device, server and storage medium
CN104298587A (en) Code coverage test method, device and system
CN111966491B (en) Method for counting occupied memory and terminal equipment
WO2014119143A1 (en) Inertial force detection device
CN109753425A (en) Pop-up processing method and processing device
CN110046497B (en) Function hook realization method, device and storage medium
CN113473074B (en) Detection method, electronic equipment, detection equipment and storage medium
CN107102950A (en) A kind of applied program testing method and device
WO2014081609A1 (en) Centralized dispatching of application analytics
CN106293726B (en) Data acquisition method and device and mobile equipment
CN109697156A (en) A kind of starting time obtaining method, device, terminal device and storage medium
CN107085532B (en) task monitoring method and device
CN107967203B (en) Function judgment method and device based on executable file
CN110737502B (en) Mirror image file processing method, device and system
US10895960B2 (en) Recommendation method implemented in electronic device
US10750314B2 (en) Recommendation method implemented in electronic device
CN112965905A (en) Data testing method, device, equipment and storage medium
CN106059898A (en) Information transmission method and device
CN109343871A (en) Method, apparatus, equipment and the storage medium that application program is packaged

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: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

GR01 Patent grant
GR01 Patent grant