CN112035823B - Data acquisition method, device, terminal and storage medium - Google Patents

Data acquisition method, device, terminal and storage medium Download PDF

Info

Publication number
CN112035823B
CN112035823B CN201910477491.1A CN201910477491A CN112035823B CN 112035823 B CN112035823 B CN 112035823B CN 201910477491 A CN201910477491 A CN 201910477491A CN 112035823 B CN112035823 B CN 112035823B
Authority
CN
China
Prior art keywords
application client
application
system function
data acquisition
target system
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
CN201910477491.1A
Other languages
Chinese (zh)
Other versions
CN112035823A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910477491.1A priority Critical patent/CN112035823B/en
Publication of CN112035823A publication Critical patent/CN112035823A/en
Application granted granted Critical
Publication of CN112035823B publication Critical patent/CN112035823B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a data acquisition method, a data acquisition device, a terminal and a storage medium, and belongs to the technical field of terminals. The method comprises the following steps: determining a target system function according to a first data acquisition instruction of a first application client, wherein the target system function is a system function called by the first data acquisition instruction; when the first application client does not have the calling authority of the target system function, determining a second application client which is an application client with the calling authority of the target system function; sending a second data acquisition instruction to a second application client, wherein the second data acquisition instruction is used for indicating the second application client to call a target system function; and receiving target data returned by the second application client based on the second data acquisition instruction. And the second application client is used for replacing the first application client to acquire the execution data, so that the target data required by the first application client is obtained, and the first application client can normally operate.

Description

Data acquisition method, device, terminal and storage medium
Technical Field
The present invention relates to the field of terminal technologies, and in particular, to a data acquisition method, a data acquisition device, a terminal, and a storage medium.
Background
With the development of terminal technology, a plurality of application programs can be installed in the terminal, and the application programs need to call a plurality of system functions during normal operation. Because malicious application programs can destroy the system by calling system functions, terminal manufacturers limit the system functions which can be called by the application programs in the terminal in order to ensure the safety of the terminal system. The application program can call a certain system function after obtaining the calling authority of the system function. For example, after the take-away application obtains the calling authority of the positioning function, the terminal positioning can be performed; after the voice chat application program obtains the calling authority of the microphone, voice signal collection and the like can be performed.
At present, in order to enable the application program to normally call the required system functions, part of application program factories and terminal manufacturers achieve a cooperation agreement, the application program issued by the application program manufacturers is built in the terminal when the terminal leaves the factory, or the application program issued by the application program manufacturers is set in a permission white list, namely, the application program issued by the application program manufacturers is granted with the calling permission of the required system functions by default, so that the application program can normally run.
The problem with the above approach is that the application program issued by the application program vendor that does not have a cooperation agreement with the terminal vendor cannot call the required system function because the calling authority of the required system function is not obtained, and thus cannot acquire the data required for the normal operation of the application program.
Disclosure of Invention
The embodiment of the invention provides a data acquisition method, a device, a terminal and a storage medium, which are used for solving the problem that data required by normal work cannot be acquired when the current application program has no calling right of system functions. The technical scheme is as follows:
in one aspect, a method for obtaining data is provided, the method comprising:
determining a target system function according to a first data acquisition instruction of a first application client, wherein the target system function is a system function called by the first data acquisition instruction;
when the first application client does not have the calling authority of the target system function, determining a second application client which is an application client with the calling authority of the target system function;
sending a second data acquisition instruction to the second application client, wherein the second data acquisition instruction is used for indicating the second application client to call the target system function;
And receiving target data returned by the second application client based on the second data acquisition instruction.
In one possible implementation manner, the determining the second application client includes:
determining at least one third application client from application clients installed in a current terminal, wherein the at least one third application client is an application client which provides calling authority of at least one system function and has a sharing function;
and determining a third application client with the calling authority of the target system function from the at least one third application client as a second application client.
In another possible implementation manner, the determining at least one third application client from the application clients installed in the current terminal includes:
acquiring a first white list, wherein the first white list comprises application identifiers of a plurality of third application clients;
and when the application identifier of any application client in the application clients installed by the current terminal is included in the first white list, determining the application client as a third application client.
In another possible implementation manner, the determining at least one third application client from the application clients installed in the current terminal includes:
Determining at least one fourth application client from the application clients installed in the current terminal, wherein the fourth application client is an application client with a second white list;
for each fourth application client of the at least one fourth application client, when the application identification of the first application client is included in the second whitelist of the fourth application client, the fourth application client is taken as a third application client.
In another possible implementation manner, the determining, from the at least one third application client, a third application client having a calling authority of a target system function as the second application client includes:
sending inquiry information to the at least one third application client through a terminal internal communication mode, wherein the inquiry information is used for inquiring whether the at least one third application client has the calling authority of the target system function;
and when any third application client in the at least one third application client has the calling right of the target system function, the third application client is used as a second application client.
In another possible implementation manner, the determining the second application client includes:
Sending a sharing request to other terminals nearby the current terminal in a wireless communication mode, wherein the sharing request is used for establishing communication connection with an application client which provides calling authority of a target system function and has a sharing function;
and when receiving a response request of the sharing request, determining the application client side sending the response request as a second application client side.
In one aspect, there is provided a data acquisition apparatus, the apparatus comprising:
the determining module is used for determining a target system function according to a first data acquisition instruction of a first application client, wherein the target system function is a system function called by the first data acquisition instruction;
the determining module is further configured to determine, when the first application client does not have the call right of the target system function, a second application client, where the second application client is an application client having the call right of the target system function;
the sending module is used for sending a second data acquisition instruction to the second application client, wherein the second data acquisition instruction is used for indicating the second application client to call the target system function;
and the receiving module is used for receiving target data returned by the second application client based on the second data acquisition instruction.
In a possible implementation manner, the determining module is further configured to determine at least one third application client from application clients installed in the current terminal, where the at least one third application client is an application client that provides calling authority of at least one system function and has a sharing function; and determining a third application client with the calling authority of the target system function from the at least one third application client as a second application client.
In another possible implementation manner, the determining module is further configured to obtain a first whitelist, where the first whitelist includes application identifiers of a plurality of third application clients; and when the application identifier of any application client in the application clients installed by the current terminal is included in the first white list, determining the application client as a third application client.
In another possible implementation manner, the determining module is further configured to determine at least one fourth application client from application clients installed in the current terminal, where the fourth application client is an application client with a second whitelist; for each fourth application client of the at least one fourth application client, when the application identification of the first application client is included in the second whitelist of the fourth application client, the fourth application client is taken as a third application client.
In another possible implementation manner, the determining module is further configured to send query information to the at least one third application client through a terminal internal communication manner, where the query information is used to query whether the at least one third application client has a call authority of a target system function;
and when any third application client in the at least one third application client has the calling right of the target system function, the third application client is used as a second application client.
In another possible implementation manner, the determining module is further configured to send a sharing request to other terminals nearby the current terminal through a wireless communication manner, where the sharing request is used to establish a communication connection with an application client that provides a calling authority of a target system function and has a sharing function;
and when receiving a response request of the sharing request, determining the application client side sending the response request as a second application client side.
In one aspect, a terminal is provided, where the terminal includes a processor and a memory, where at least one instruction is stored in the memory, where the instruction is loaded and executed by the processor to implement an operation performed in a data acquisition method in an embodiment of the present invention.
In one aspect, a storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement operations performed in a data acquisition method in an embodiment of the present invention is provided.
The technical scheme provided by the embodiment of the invention has the beneficial effects that:
according to the technical scheme provided by the embodiment of the invention, when the first application client does not have the calling authority of a certain system function, the system function can be called through the second application client with the calling authority of the system function, namely, the second application client is used for replacing the acquisition of the execution data of the first application client, so that the target data required by the first application client is obtained, and the first application client can normally operate.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a diagram of an implementation environment for a data acquisition method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for data acquisition provided in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of a method for data acquisition provided in accordance with an embodiment of the present invention;
FIG. 4 is a block diagram of a data acquisition device provided in accordance with an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
Fig. 1 is an environmental diagram of an implementation of a data acquisition method according to an embodiment of the present invention, referring to fig. 2, including a terminal 101 and a server 102.
The terminal 101 may be connected to the server 102 through a wireless network or a wired network. The terminal 101 may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an electronic book reader, an MP3 player, an MP4 player, and a laptop portable computer. Server 102 may include at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center.
The terminal can be provided with a plurality of application clients, and the application clients can call at least one system function to acquire data when working, so that the normal operation of the application clients is ensured. The process of the application client calling the system function is actually a process of calling an API (Application Programming Interface ) of the system program, and different system functions correspond to different APIs, for example, a positioning function corresponds to a positioning API, a clock function corresponds to a clock API, and so on. The terminal will typically set permissions for a system function, and the application client cannot call a certain system function when the application client does not have the call permission for the system function. The server 102 is used to provide background services for application clients.
Fig. 2 is a flowchart of a data acquisition method according to an embodiment of the present invention. The embodiment of the invention is only described by the interaction between two application clients on the terminal, referring to fig. 2, the method comprises the following steps:
201. and the first application client determines a target system function according to the first data acquisition instruction, wherein the target system function is a system function called by the first data acquisition instruction.
The first application client may be a client of any application program installed in the terminal, and the application client obtains the first data obtaining instruction in a starting process or an operating process. The first data acquisition instruction may be a data acquisition instruction triggered by a user operation, or may be a data acquisition instruction triggered by any module in the first application client. The target system function is a function called by the first data acquisition instruction, the target system function may also be called a system function, a system API, etc., and correspondingly, the first data acquisition instruction may include a function identifier of the target system function, where the function identifier may be an interface identifier of a system program. The first application client can analyze the first data acquisition instruction to obtain an interface identifier of a system program called by the first data acquisition instruction.
For example, when a user clicks a positioning button in a navigation application client, triggering a data acquisition instruction for terminal position data, wherein the calling target of the data acquisition instruction is a positioning interface of a system program; for another example, when the verification code needs to be filled in the first application client, a data acquisition instruction for the short message data can be triggered, and the call target of the data acquisition instruction is a short message content acquisition interface of the system program or the like.
202. The first application client determines whether the authority for calling the target system function is possessed, if yes, step 203 is executed, and if not, step 204 is executed.
The first application client may maintain a first authority list, where the first authority list includes a function identifier of a callable system function, and determine whether the first authority list has authority to call a target system function. The first application client may compare the function identifier of the target system function with the function identifiers included in the first permission list one by one. When the function identifier of the target system function is the same as any function identifier included in the first authority list, determining that the first application client has the authority to call the target system function, and executing step 203; when the function identifier of the target system function is different from the function identifier included in the first authority list, it is determined that the first application client does not have the authority to call the target system function, and step 204 is executed.
In an alternative implementation, the terminal system may maintain a second authority list, where the second authority list includes a correspondence between a function identifier of a system function and an application identifier of an application client having a calling authority. The first application client sends a query request to the terminal system, wherein the query request carries an application identifier of the first application client and a function identifier of a target system function. When the second authority list includes the corresponding relation between the application identifier of the first application client and the function identifier of the target system function, determining that the first application client has the authority to call the target system function, and executing step 203; when the second authority list does not include the correspondence between the application identifier of the first application client and the function identifier of the target system function, it is determined that the first application client does not have the authority to call the target system function, and step 204 is executed.
203. When the first application client has the calling right of the target system function, the first application client acquires the target data and ends.
The first application client sends a call request to the terminal system, wherein the call request carries a function identifier and a call parameter of a target system function, and receives target data returned by the terminal system.
204. When the first application client does not have the calling right of the target system function, the first application client can determine the second application client in the current terminal.
For convenience of explanation, in the embodiment of the present invention, the first terminal represents the terminal where the first application client is located, that is, the current terminal is the first terminal.
When the second application client is an application client in the first terminal, the step of determining the second application client may include the following steps 1 and 2:
step 1, a first application client determines at least one third application client from application clients installed in a first terminal, wherein the third application client is an application client which provides calling authority of at least one system function and has a sharing function.
The sharing function means that the third application client can share the calling authority of the third application client to other application clients.
And 2, the first application client determines a third application client with the calling authority of the target system function from the at least one third application client as a second application client.
The first application client can acquire the function identifier of at least one system function provided by the third application client, and when the function identifier of the provided system function of any third application client is the same as the function identifier of the target system function, the third application client is used as the second application client.
For example, the first application client determines that the application client 1, the application client 2 and the application client 3 are third application clients from the first terminal, and the application client 1 provides the calling authority of the system function a, the system function B and the system function C; the application client 2 provides the calling authority of the system function C and the system function D; the application client 3 provides the calling authority of the system function a, the system function B, the system function E and the system function F. The target system function is system function B, the first application client may determine that application client 1 and application client 3 are second application clients.
The second application client determined in the current terminal has higher safety and better compatibility, and can be realized by a terminal internal communication mode, and the first application client and the second application client are in the same terminal, and the second application client calls the system function of the same terminal, so that the obtained data has high accuracy.
In an alternative implementation, the at least one third application client may be determined by a first whitelist configured for the first application client. Accordingly, step 1 may be: the first application client acquires a first white list, wherein the first white list comprises application identifiers of a plurality of third application clients, and when the application identifier of any application client installed in the first terminal is included in the first white list, the application client is determined to be the third application client. The first white list may be stored in a folder of the first application client, and the first white list may be carried by an installation package of the first application client, or may be obtained from a server in real time during operation or update of the first application client. The process of acquiring the first white list in real time may be any one of the following processes: (1) The first application client periodically sends a white list acquisition request to the server and receives a first white list returned by the server. (2) And when the first application client does not have the calling right of the target system function, sending a white list acquisition request to the server, and receiving a first white list returned by the server. The required application client can be rapidly determined from the first terminal through the first white list configured for the first application client, and the execution efficiency is high.
For example, taking a first application client to periodically send a white list obtaining request to obtain a first white list, an application identifier of a third application client included in the first white list is A, B, C, D, E, F, G, H, J and K, an application identifier of an installed application client in the first terminal includes A, B and C, and the first application client determines A, B and C that the application client corresponding to the first application client is the third application client.
In an alternative implementation, the at least one third application client may be determined by a second whitelist configured for the third application client. Accordingly, step 1 may be: the first application client determines at least one fourth application client from the application clients installed in the first terminal, wherein the fourth application client is an application client with a second white list, and for each fourth application client in the at least one fourth application client, when the application identifier of the first application client is included in the second white list of the fourth application client, the fourth application client is used as a third application client. Each fourth application client may have an independent second whitelist, where the second whitelist includes at least one application identifier, and the system function provided by the fourth application client may be invoked by at least one application client corresponding to the at least one application identifier. Through a second white list included in the third application client, the third application client can select whether to respond to the first application client, and when the third application client is busy, the calling authority of the system function can be temporarily not provided through means such as closing the access authority of the second white list, so that the normal operation of the third application client is ensured.
For example, the fourth application client determined by the first application client from the first terminal is an application client a, an application client B, an application client C, an application client D and an application client E, where the second whitelist of the application client a, the application client B and the application client C includes an application identifier of the first application client, and the application client a, the application client B and the application client C are determined as third application clients.
In an alternative implementation manner, the process that the first application client determines, from the at least one third application client, a third application client having the call authority of the target system function as the second application client may be implemented by: the first application client sends inquiry information to at least one third application client through a terminal internal communication mode, the inquiry information is used for inquiring whether the at least one third application client has the calling authority of the target system function, and when any third application client in the at least one third application client has the calling authority of the target system function, the third application client is used as the second application client. The internal communication method may be realized by broadcasting, AIDL (Android Interface Definition Language ), an Activity component, or the like.
For example, the third application client determined by the first application client is an application client a, an application client B and an application client C, the first application client sends query information to the application client a, the application client B and the application client C in a broadcast manner, whether the query has the call authority of the target system function is queried, and feedback information returned by the application client a, the application client B and the application client C can know that the application client a and the application client B have the call authority of the target system function, so that the application client a and the application client B are determined to be second application clients.
205. The first application client sends a second data acquisition instruction to the second application client, wherein the second data acquisition instruction is used for indicating the second application client to call the target system function.
In the embodiment of the invention, the first application client can determine one second application client, and can also determine a plurality of second application clients. When the first application client determines a plurality of second application clients, the first application client may send a second data acquisition instruction to any second application client, or may send a second data acquisition instruction to all second application clients. The second data acquisition instruction may include a function identifier of the target system function, an application identifier of the first application client, parameters required to invoke the target system function, and the like.
When the first application client sends a second data acquisition instruction to a certain second application client, the second data acquisition instruction can be used for calling a certain system function of the second application client; when the first application client sends a second data acquisition instruction including function identifiers of a plurality of target system functions to the second application client, the second data acquisition instruction may be used to call a plurality of system functions of the second application client simultaneously.
For example, a first application client sends an instruction to invoke a positioning function to a second application client. And indicating the second application client to call the positioning function according to the instruction.
In an alternative implementation manner, the first application client may further send a plurality of second data acquisition instructions to the plurality of second application clients in combination with the two data sending manners, where the plurality of second data acquisition instructions may be the same system function that invokes the plurality of second application clients, or may be different system functions that invoke the plurality of second application clients.
206. And the second application client receives a second data acquisition instruction and calls the target system function according to the second data acquisition instruction.
After the second application client receives the second data acquisition instruction, the second data acquisition instruction can be analyzed to obtain a function identifier of the target system function, an application identifier of the first application client, a call parameter and the like, and a call request of the target system function is sent to the terminal system according to the function identifier and the call parameter.
207. The second application client returns the target data to the first application client.
The second application client can send target data obtained by calling the target system function to the first application client in a terminal internal communication mode.
208. And the first application client receives target data returned by the second application client based on the second data acquisition instruction.
The first application client may receive the target data returned by the second application client. The target data may be one item of target data returned by a second application client, may be multiple items of target data returned by a second application client, or may be multiple items of target data returned by multiple second application clients.
According to the manner in which the first application client sends the second data acquisition instruction in step 205, when the first application client sends a second data acquisition instruction to a certain second application client, the first application client may receive a piece of label data returned by the second application client; when the first application client sends a second data acquisition instruction comprising function identifiers of a plurality of target system functions to the second application client, the second data acquisition instruction can be used for simultaneously calling a plurality of system functions of the second application client, and the first application client can receive multi-item target data returned by the second application client; when the first application client side can also combine the two data sending modes and send a plurality of second data acquisition instructions to a plurality of second application client sides, the first application client side can receive the plurality of second application client sides to return the multi-item label data.
In one possible implementation manner, the first application client may integrate multiple pieces of target data of the same type returned by the multiple second application clients, for example, the data with larger deviation from other target data may be removed, and an average value of the multiple pieces of target data may be obtained as the target data.
For example, the second application client includes an application client a, an application client B and an application client C, the first application client sends a second data acquisition instruction to the application client a, the application client B and the application client C respectively, the first application client receives three pieces of position data, averages the three pieces of position data, and obtains final position data.
It should be noted that, in the embodiment of the present invention, the method for implementing the data acquisition by the first application client and the second application client is described as an example, where the first application client and the second application client may be plug-ins or components in a terminal system, or may be functional modules in an application program, which is not specifically limited in this disclosure.
In the embodiment of the invention, when the first application client does not have the calling authority of a certain system function, the target system function can be called through the second application client with the calling authority of the system function in the current terminal, namely, the second application client is used for replacing the acquisition of the execution data of the first application client, so that the target data required by the first application client is obtained, and the first application client can normally operate.
Fig. 3 is a flowchart of a data acquisition method according to an embodiment of the present invention. The embodiment of the invention is only described with the interaction between two application clients on two terminals, see fig. 3, and the method comprises the following steps:
301. and the first application client determines a target system function according to the first data acquisition instruction, wherein the target system function is a system function called by the first data acquisition instruction.
The specific implementation process of this step may refer to step 201, which is not described herein in detail.
302. The first application client determines whether the authority to call the target system function is possessed, if yes, step 303 is executed, and if no, step 304 is executed.
The specific implementation process of this step may refer to step 202, which is not described herein in detail.
303. When the first application client has the calling right of the target system function, the first application client acquires the target data and ends.
The specific implementation process of this step may refer to step 203, which is not described herein in detail.
It should be noted that, when the first application client does not have the call right of the target system function, the step 304 may be directly executed to determine the second application client in the second terminal, or may be performed to determine the second application client in the first terminal first, and when the second application client cannot be found in the first terminal, the step 304 is executed again.
304. When the first application client does not have the calling right of the target system function, the first application client can determine the second application client in other terminals nearby the current terminal.
For convenience of explanation, the embodiment of the present invention uses the second terminal to represent other terminals near the current terminal.
The second application client is an application client in the second terminal, and the step of determining the second application client may be: the first application client sends a sharing request to the second terminal in a wired or wireless communication mode, the sharing request is used for establishing communication connection with the application client which provides the calling authority of the target system function and has the sharing function, and when the first application client receives a response request of the sharing request, the application client which sends the response request is determined to be the second application client. The wireless communication mode may be implemented by bluetooth, a wireless lan, a wired lan, or the like. The sharing request may carry information such as a function identifier of the target system function and a communication port created by the first application client. The first application client may establish a communication connection with the second application client according to the received response request, and communicate with the second application client through the communication connection.
For example, the first application client sends a sharing request through bluetooth broadcast, after receiving the sharing request, the second application client in the second terminal analyzes the sharing request to obtain a function identifier of a target system function and a communication port, and when the second application client determines that the calling right of the system function corresponding to the function identifier can be provided, a return response is sent to the first application client according to the communication port, wherein the return response carries the communication port of the second application client. The first application client establishes a communication connection with the second application client.
The second application client determined in the second terminal does not depend on the application program installed in the first terminal and the system function of the first terminal, and the second terminal can be different terminal equipment from the first terminal. For example, the first terminal does not have a network access function, the second terminal has an internet access function, and the first application client may transmit the network access request to the second application client to complete, thereby obtaining internet data.
305. The first application client sends a second data acquisition instruction to the second application client, wherein the second data acquisition instruction is used for indicating the second application client to call the target system function.
The first application client may send a second data acquisition instruction to the second application client via the communication connection established in step 304. The manner in which the first application client sends the second data acquisition instruction may refer to step 205, which is not described herein.
306. And the second application client receives a second data acquisition instruction and calls the target system function according to the second data acquisition instruction.
After the second application client receives the second data acquisition instruction, the second data acquisition instruction can be analyzed to obtain a function identifier of the target system function, an application identifier of the first application client, a call parameter and the like, and a call request of the target system function is sent to the terminal system according to the function identifier and the call parameter.
307. The second application client returns the target data to the first application client.
The second application client may send, to the first application client, the target data obtained by calling the target system function through the communication connection established in step 304.
308. And the first application client receives target data returned by the second application client based on the second data acquisition instruction.
The first application client may receive, through the communication connection established in step 304, the target data returned by the second application client, where the target data received by the first application client corresponds to the sent first data acquisition instruction, and the content of step 208 may be referred to, which will not be described herein.
In the embodiment of the invention, when the first application client does not have the calling authority of a certain system function, the target system function can be called through the second application client with the calling authority of the system function in other terminals nearby the current terminal, namely, the second application client is used for replacing the first application client to acquire the execution data, so that the target data required by the first application client is obtained, and the first application client can normally operate.
Fig. 4 is a block diagram of a data acquisition device according to an embodiment of the present invention, see fig. 4, including: a determining module 401, a transmitting module 402 and a receiving module 403.
The determining module 401 is configured to determine a target system function according to a first data acquisition instruction of the first application client, where the target system function is a system function called by the first data acquisition instruction;
The determining module 401 is further configured to determine, when the first application client does not have the call right of the target system function, a second application client, where the second application client is an application client having the call right of the target system function;
a sending module 402, configured to send a second data acquisition instruction to a second application client, where the second data acquisition instruction is configured to instruct the second application client to invoke a target system function;
and the receiving module 403 is configured to receive target data returned by the second application client based on the second data acquisition instruction.
In a possible implementation manner, the determining module 401 is further configured to determine at least one third application client from application clients installed in the current terminal, where the at least one third application client is an application client that provides calling authority of at least one system function and has a sharing function; and determining a third application client with the calling authority of the target system function from at least one third application client as a second application client.
In another possible implementation manner, the determining module 401 is further configured to obtain a first whitelist, where the first whitelist includes application identifiers of a plurality of third application clients; and determining the application client as a third application client when the application identifier of any application client in the application clients installed by the current terminal is included in the first white list.
In another possible implementation manner, the determining module 401 is further configured to determine at least one fourth application client from application clients installed in the current terminal, where the fourth application client is an application client with a second whitelist; for each fourth application client of the at least one fourth application client, the fourth application client is treated as a third application client when the application identification of the first application client is included in the second whitelist of fourth application clients.
In another possible implementation manner, the determining module 401 is further configured to send, through a terminal internal communication manner, query information to at least one third application client, where the query information is used to query whether the at least one third application client has a calling authority of a target system function;
and when any third application client in the at least one third application client has the calling right of the target system function, the third application client is used as the second application client.
In another possible implementation manner, the determining module 401 is further configured to send a sharing request to other terminals near the current terminal through a wireless communication manner, where the sharing request is used to establish a communication connection with an application client that provides a calling authority of a target system function and has a sharing function;
When a response request of the sharing request is received, the application client which sends the response request is determined to be a second application client.
In the embodiment of the invention, when the first application client does not have the calling authority of a certain system function, the target system function can be called through the second application client with the calling authority of the system function, namely, the second application client is used for replacing the acquisition of the execution data of the first application client, so that the target data required by the first application client is obtained, and the first application client can normally operate.
It should be noted that: in operation, the data acquisition device provided in the above embodiment is only exemplified by the above division of each functional module, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to perform all or part of the functions described above. In addition, the data acquisition device and the data acquisition method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the data acquisition device and the data acquisition method are detailed in the method embodiments and are not repeated herein.
Fig. 5 shows a block diagram of a terminal 500 according to an embodiment of the present invention. The terminal 500 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. The terminal 500 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, etc.
In general, the terminal 500 includes: a processor 501 and a memory 502.
Processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 501 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 501 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 501 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 501 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 502 is used to store at least one instruction for execution by processor 501 to implement the data acquisition methods provided by the method embodiments herein.
In some embodiments, the terminal 500 may further optionally include: a peripheral interface 503 and at least one peripheral. The processor 501, memory 502, and peripheral interface 503 may be connected by buses or signal lines. The individual peripheral devices may be connected to the peripheral device interface 503 by buses, signal lines or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 504, a display 505, a camera 506, audio circuitry 507, a positioning component 508, and a power supply 509.
Peripheral interface 503 may be used to connect at least one Input/Output (I/O) related peripheral to processor 501 and memory 502. In some embodiments, processor 501, memory 502, and peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 501, memory 502, and peripheral interface 503 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 504 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuitry 504 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 504 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 504 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 504 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 504 may also include NFC (Near Field Communication ) related circuitry, which is not limited in this application.
The display 505 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 505 is a touch display, the display 505 also has the ability to collect touch signals at or above the surface of the display 505. The touch signal may be input as a control signal to the processor 501 for processing. At this time, the display 505 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 505 may be one, providing a front panel of the terminal 500; in other embodiments, the display 505 may be at least two, respectively disposed on different surfaces of the terminal 500 or in a folded design; in still other embodiments, the display 505 may be a flexible display disposed on a curved surface or a folded surface of the terminal 500. Even more, the display 505 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display 505 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 506 is used to capture images or video. Optionally, the camera assembly 506 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 506 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuitry 507 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 501 for processing, or inputting the electric signals to the radio frequency circuit 504 for voice communication. For the purpose of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 500. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 501 or the radio frequency circuit 504 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuitry 507 may also include a headphone jack.
The location component 508 is used to locate the current geographic location of the terminal 500 to enable navigation or LBS (Location Based Service, location-based services). The positioning component 508 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, the Granati system of Russia, or the Galileo system of the European Union.
A power supply 509 is used to power the various components in the terminal 500. The power supply 509 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 509 comprises a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 500 further includes one or more sensors 510. The one or more sensors 510 include, but are not limited to: an acceleration sensor 511, a gyro sensor 512, a pressure sensor 513, a fingerprint sensor 514, an optical sensor 515, and a proximity sensor 516.
The acceleration sensor 511 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 500. For example, the acceleration sensor 511 may be used to detect components of gravitational acceleration on three coordinate axes. The processor 501 may control the display 505 to display a user interface in a landscape view or a portrait view according to a gravitational acceleration signal acquired by the acceleration sensor 511. The acceleration sensor 511 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 512 may detect a body direction and a rotation angle of the terminal 500, and the gyro sensor 512 may collect a 3D motion of the user to the terminal 500 in cooperation with the acceleration sensor 511. The processor 501 may implement the following functions based on the data collected by the gyro sensor 512: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 513 may be disposed at a side frame of the terminal 500 and/or at a lower layer of the display 505. When the pressure sensor 513 is disposed at a side frame of the terminal 500, a grip signal of the user to the terminal 500 may be detected, and the processor 501 performs left-right hand recognition or quick operation according to the grip signal collected by the pressure sensor 513. When the pressure sensor 513 is disposed at the lower layer of the display screen 505, the processor 501 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 505. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 514 is used for collecting the fingerprint of the user, and the processor 501 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 501 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 514 may be provided on the front, back or side of the terminal 500. When a physical key or a vendor Logo is provided on the terminal 500, the fingerprint sensor 514 may be integrated with the physical key or the vendor Logo.
The optical sensor 515 is used to collect the ambient light intensity. In one embodiment, the processor 501 may control the display brightness of the display screen 505 based on the intensity of ambient light collected by the optical sensor 515. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 505 is turned up; when the ambient light intensity is low, the display brightness of the display screen 505 is turned down. In another embodiment, the processor 501 may also dynamically adjust the shooting parameters of the camera assembly 506 based on the ambient light intensity collected by the optical sensor 515.
A proximity sensor 516, also referred to as a distance sensor, is typically provided on the front panel of the terminal 500. The proximity sensor 516 serves to collect a distance between the user and the front surface of the terminal 500. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front of the terminal 500 gradually decreases, the processor 501 controls the display 505 to switch from the bright screen state to the off screen state; when the proximity sensor 516 detects that the distance between the user and the front surface of the terminal 500 gradually increases, the processor 501 controls the display 505 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 5 is not limiting and that more or fewer components than shown may be included or certain components may be combined or a different arrangement of components may be employed.
The embodiment of the invention also provides a storage medium applied to the terminal, wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to realize the operation executed by the terminal in the method of the embodiment.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A method of data acquisition, the method comprising:
determining a target system function according to a first data acquisition instruction of a first application client, wherein the target system function is a system function called by the first data acquisition instruction;
when the first application client does not have the calling authority of the target system function, determining a second application client which is an application client with the calling authority of the target system function;
Sending a second data acquisition instruction to the second application client, wherein the second data acquisition instruction is used for indicating the second application client to call the target system function;
and receiving target data returned by the second application client based on the second data acquisition instruction.
2. The method of claim 1, wherein the determining the second application client comprises:
determining at least one third application client from application clients installed in a current terminal, wherein the at least one third application client is an application client which provides calling authority of at least one system function and has a sharing function;
and determining a third application client with the calling authority of the target system function from the at least one third application client as a second application client.
3. The method according to claim 2, wherein said determining at least one third application client from among the application clients installed by the current terminal comprises:
acquiring a first white list, wherein the first white list comprises application identifiers of a plurality of third application clients;
and when the application identifier of any application client in the application clients installed by the current terminal is included in the first white list, determining the application client as a third application client.
4. The method according to claim 2, wherein said determining at least one third application client from among the application clients installed by the current terminal comprises:
determining at least one fourth application client from the application clients installed in the current terminal, wherein the fourth application client is an application client with a second white list;
for each fourth application client of the at least one fourth application client, when the application identification of the first application client is included in the second whitelist of the fourth application client, the fourth application client is taken as a third application client.
5. The method according to claim 2, wherein said determining a third application client having a call authority of a target system function from the at least one third application client as the second application client comprises:
sending inquiry information to the at least one third application client through a terminal internal communication mode, wherein the inquiry information is used for inquiring whether the at least one third application client has the calling authority of the target system function;
and when any third application client in the at least one third application client has the calling right of the target system function, the third application client is used as a second application client.
6. The method of claim 1, wherein the determining the second application client comprises:
sending a sharing request to other terminals nearby the current terminal in a wireless communication mode, wherein the sharing request is used for establishing communication connection with an application client which provides calling authority of a target system function and has a sharing function;
and when receiving a response request of the sharing request, determining the application client side sending the response request as a second application client side.
7. A data acquisition device, the device comprising:
the determining module is used for determining a target system function according to a first data acquisition instruction of a first application client, wherein the target system function is a system function called by the first data acquisition instruction;
the determining module is further configured to determine, when the first application client does not have the call right of the target system function, a second application client, where the second application client is an application client having the call right of the target system function;
the sending module is used for sending a second data acquisition instruction to the second application client, wherein the second data acquisition instruction is used for indicating the second application client to call the target system function;
And the receiving module is used for receiving target data returned by the second application client based on the second data acquisition instruction.
8. The apparatus of claim 7, wherein the determining module is further configured to determine at least one third application client from application clients installed in the current terminal, the at least one third application client being an application client that provides calling authority of at least one system function and has a sharing function; and determining a third application client with the calling authority of the target system function from the at least one third application client as a second application client.
9. A terminal comprising a processor and a memory, the memory having stored therein at least one instruction that is loaded and executed by the processor to perform the operations performed in the data acquisition method of any of claims 1 to 6.
10. A storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the operations performed in the data acquisition method of any one of claims 1 to 6.
CN201910477491.1A 2019-06-03 2019-06-03 Data acquisition method, device, terminal and storage medium Active CN112035823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910477491.1A CN112035823B (en) 2019-06-03 2019-06-03 Data acquisition method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910477491.1A CN112035823B (en) 2019-06-03 2019-06-03 Data acquisition method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN112035823A CN112035823A (en) 2020-12-04
CN112035823B true CN112035823B (en) 2023-06-27

Family

ID=73576172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910477491.1A Active CN112035823B (en) 2019-06-03 2019-06-03 Data acquisition method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112035823B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312801A (en) * 2013-06-05 2013-09-18 上海西本网络科技有限公司 Application devices, interaction method and system for data between application devices and server
CN107992363A (en) * 2016-10-27 2018-05-04 腾讯科技(深圳)有限公司 The treating method and apparatus of data
CN109063467A (en) * 2013-05-27 2018-12-21 华为终端(东莞)有限公司 The method, apparatus and terminal of system function call
CN109063040A (en) * 2018-07-17 2018-12-21 清华大学 Client-side program collecting method and system
WO2019071424A1 (en) * 2017-10-10 2019-04-18 深圳传音通讯有限公司 Application function control method and terminal
CN109684278A (en) * 2018-12-21 2019-04-26 广州酷狗计算机科技有限公司 File acquisition method, device, terminal and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070136465A1 (en) * 2005-12-12 2007-06-14 Fernandes Lilian S Method for allowing multiple authorized applications to share the same port
US9635028B2 (en) * 2011-08-31 2017-04-25 Facebook, Inc. Proxy authentication
US9038138B2 (en) * 2012-09-10 2015-05-19 Adobe Systems Incorporated Device token protocol for authorization and persistent authentication shared across applications
US9525692B2 (en) * 2012-10-25 2016-12-20 Imprivata, Inc. Secure content sharing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063467A (en) * 2013-05-27 2018-12-21 华为终端(东莞)有限公司 The method, apparatus and terminal of system function call
CN103312801A (en) * 2013-06-05 2013-09-18 上海西本网络科技有限公司 Application devices, interaction method and system for data between application devices and server
CN107992363A (en) * 2016-10-27 2018-05-04 腾讯科技(深圳)有限公司 The treating method and apparatus of data
WO2019071424A1 (en) * 2017-10-10 2019-04-18 深圳传音通讯有限公司 Application function control method and terminal
CN109063040A (en) * 2018-07-17 2018-12-21 清华大学 Client-side program collecting method and system
CN109684278A (en) * 2018-12-21 2019-04-26 广州酷狗计算机科技有限公司 File acquisition method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN112035823A (en) 2020-12-04

Similar Documents

Publication Publication Date Title
CN111190748B (en) Data sharing method, device, equipment and storage medium
CN111177013B (en) Log data acquisition method, device, computer equipment and storage medium
CN113204298B (en) Method and device for displaying release progress, electronic equipment and storage medium
CN111510482B (en) Method and device for determining failed network request and computer storage medium
CN110740340B (en) Video live broadcast method and device and storage medium
CN110704324B (en) Application debugging method, device and storage medium
CN112256320B (en) Version number generation method, device, terminal and storage medium
CN111866140B (en) Fusion management device, management system, service calling method and medium
CN113051015B (en) Page rendering method and device, electronic equipment and storage medium
CN112988254B (en) Method, device and equipment for managing hardware equipment
CN111191227B (en) Method and device for preventing malicious code from executing
CN112612539B (en) Data model unloading method and device, electronic equipment and storage medium
CN113225573B (en) Live broadcast connection method, device, terminal, server, medium and product
CN111881423B (en) Method, device and system for authorizing restricted function use
CN111008083B (en) Page communication method and device, electronic equipment and storage medium
CN111580892B (en) Method, device, terminal and storage medium for calling service components
CN111428080B (en) Video file storage method, video file search method and video file storage device
CN111130985B (en) Incidence relation establishing method, device, terminal, server and storage medium
CN108837509B (en) method for configuring setting parameters of virtual scene, computer device and storage medium
CN114143280B (en) Session display method and device, electronic equipment and storage medium
CN112612540B (en) Data model configuration method, device, electronic equipment and storage medium
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN110941458B (en) Method, device, equipment and storage medium for starting application program
CN116842047A (en) Cache updating method, device, equipment and computer readable storage medium
CN112035823B (en) Data acquisition method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant