Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application relates to an installation-free application program, wherein the installation-free application program refers to an application program which can be used without downloading and installing, and the installation-free application program is also called an applet. An applet generally runs as a child application in an application client, where the application client and the applet have a parent-child relationship, the application client serves as a parent application client of the applet, and the applet serves as a child application of the application client. An Application client (also called APP (Application) client) refers to an Application program that is downloaded and installed in a terminal and runs in the terminal. Among others, terminals may include, but are not limited to: cell phones, PDAs (tablet), smart wearable devices (e.g., smart glasses, smart watches, etc.), and the like. Various application clients can be installed and run in the terminal, including but not limited to: an IM (instant messaging) client (e.g., a wechat client, a QQ client, etc.), an SNS (Social networking services) client (e.g., a microblog client, a map client with Social networking functions, etc.), a content service client (e.g., a news client), an image processing client, a search client, etc. Unless otherwise noted, the application programs mentioned in the following embodiments of the present application are all described by taking sub-application programs (i.e., applets) running in various application clients of the terminal as examples.
A device fingerprint of a terminal refers to a device identification that can be used to uniquely identify the device characteristics or unique characteristics of the terminal. A conventional Application (i.e., an Application that needs to be installed, such as an Application client in a terminal) directly obtains underlying data of the terminal by calling an operating system API (Application Programming Interface) of the terminal, and then generates a device fingerprint of the terminal according to the underlying data of the terminal. However, the applet runs in its parent application client, specifically: the code of the applet runs in a code engine provided by its parent application client, for example: the code of the applet in the IM client runs in a JS (JavaScript, an transliterated scripting language, which is a dynamic-type, weak-type, prototype-based programming language, JS for short) engine provided by the IM client. Therefore, the acquisition of various information of the terminal by the applet needs to be realized by providing an operating system API of the terminal by means of a parent application client of the applet, but for security, the parent application client of the applet usually does not provide the applet with an API for acquiring the underlying data (such as a MAC address, an IMEI, etc.) of the terminal, which results in that the applet cannot directly acquire the underlying data of the terminal like a conventional application (i.e. an application program that needs to be installed), and thus cannot directly generate the device fingerprint of the terminal according to the underlying data of the terminal.
Based on this, the embodiment of the application provides a data processing scheme, which can generate the device fingerprint of the terminal in the applet, and does not need the applet to interact with other devices (such as a third party), so that the networking environment requirement is not needed, and the security of the device fingerprint and the generation process of the device fingerprint can be ensured; in addition, the device fingerprint is generated by depending on hardware capability data of multiple dimensions of the terminal, the dependent data can comprehensively and fixedly reflect the bottom hardware capability of the terminal and is not changed along with the change of an operating system of the terminal (such as system upgrade, uninstallation and reinstallation of an application client, user account switching in an applet and the like), and therefore the uniqueness of the device fingerprint can be effectively guaranteed. The uniqueness is mainly expressed in the following two aspects, on one hand, the device fingerprint of the terminal generated by the small program is always unchanged in the same terminal regardless of upgrading, degrading, account switching and the like of a parent application client to which the small program belongs; on the other hand, the generated device fingerprints are necessarily different for different terminal devices. By the technical scheme, the applet can bypass the limitation of the parent application client to the bottom data access capability of the terminal, and can generate the device fingerprint with good persistence and uniqueness of the terminal without a networking environment.
The data processing scheme provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
FIG. 1 illustrates a flow chart of a data processing method provided by an exemplary embodiment of the present application; the method is executed by data processing equipment, the data processing equipment is integrated in a target application program, the target application program is an installation-free application program, and the target application program belongs to a sub-application program in an application client in a terminal; the method comprises the following steps S101-S103:
s101, acquiring a hardware identifier of the terminal.
The hardware identifier of the terminal refers to a unique identifier for identifying processor information in the terminal, and the hardware identifier may be, for example, a CPUID (the CPUID refers to processor information of a user computer device), or other identifier for identifying processor information in the terminal. The hardware identification of the terminal has the characteristic of good uniqueness, namely, one hardware identification can only uniquely identify processor information in one terminal. In one embodiment, a data processing apparatus may obtain a hardware identification of a terminal from a parent application client of an applet; or the hardware identification of the terminal is acquired by means of the calling capability of the hardware identification provided by the parent application client. If the hardware identification of the terminal can be successfully obtained, the hardware identification of the terminal can be directly used to generate the device fingerprint of the terminal. If the hardware identification of the terminal is not successfully acquired, then the device fingerprint of the terminal needs to be generated by means of steps S102-S103.
S102, if the hardware identification is failed to be obtained, collecting hardware capacity data of the terminal from N dimensions, wherein N is an integer larger than 1. The hardware capability data of one dimension is used to uniquely identify one hardware capability of the terminal.
The value of N may be set according to actual needs, for example, N is 3, 4, 5, and the like. The more the number of the dimensionalities is, the more comprehensive the collected hardware capability data of the terminal is, and the better the uniqueness of the finally generated equipment fingerprint of the terminal is; meanwhile, the more dimensionalities, the higher the complexity of the operation, and the more operation resources consumed. The value of N is therefore a balance between the uniqueness requirement of the device fingerprint and the reasonable consumption of computational resources. In the embodiment of the present application, in consideration of the above balance, taking N ═ 3 as an example for explanation, in one implementation, the N dimensions may include an operating system dimension, a plane graphics rendering dimension, and a stereoscopic image rendering dimension: (1) the hardware capability data of the operating system dimension may include a system information string of the terminal, which may be used to reflect language setting information of the operating system in the terminal, brand information of the terminal, version information of the operating system, and screen size of the terminal, etc. The language setting information and the brand information of the operating system can be used for identifying different brands and models of terminals in different batches (namely different brands and different models). The version information and the screen size information of the operating system can be used for distinguishing terminals in the same batch, namely, for two terminals of the same brand and the same model, the difference between the two terminals in the same batch can be distinguished through the version information and the screen size information. Therefore, the hardware capability data (i.e., the system information character string) of the operating system dimension can uniquely identify the hardware capability of the operating system of one terminal, and the generated device fingerprint has good uniqueness by using the hardware capability data of the operating system dimension as the generation factor of the device fingerprint. (2) The hardware capability data of the plane graphic drawing dimension may include pixel data of a plane graphic drawn by a GPU (Graphics Processing Unit) of the terminal. The GPU rendering capabilities and rendering parameters of different terminals are different, and even if the same text is rendered on a plurality of terminals in the same batch, the pixel data of the rendered plane graphics are also different; therefore, based on the difference, the pixel data of the plane graph drawn by the GPU of the terminal can be used to uniquely identify the plane graph drawing capability of the terminal, and the hardware capability data of the plane graph drawing dimension is used as the generation factor of the device fingerprint, so that the generated device fingerprint has good uniqueness. (3) The hardware capability data of the stereoscopic image rendering dimension may include pixel data of the stereoscopic image rendered by the GPU of the terminal and rendering protocol information (e.g., webgl (web Graphics Library) information) of the stereoscopic image. The three-dimensional image needs to be created in real time and dynamically rendered, and due to the difference between the GPU rendering capabilities and rendering parameters of different terminals, even if two terminals in the same batch are rendered, the pixel data of the three-dimensional image generated by rendering also has difference; therefore, based on the difference, the pixel data of the stereo image drawn by the terminal can be used for uniquely identifying the stereo image drawing capability of the terminal, and in addition, the drawing protocol information of the stereo image is static data which is related to the GPU hardware capability of the terminal and does not change along with the upgrade of the system version. Therefore, in the embodiment of the application, the pixel data of the stereo image and the drawing protocol information of the stereo image are used as the device fingerprint generation factor, so that the device fingerprint has good uniqueness.
And S103, performing fusion operation on the hardware capability data of the N dimensions to generate the equipment fingerprint of the terminal.
The hardware capability data of the N dimensions can be set as an input parameter, and then the input parameter is operated by adopting a fingerprint generation algorithm, so that the equipment fingerprint of the terminal can be generated; the fingerprint generation algorithm herein may include, but is not limited to: a hash Algorithm, an MD5(Message-Digest Algorithm 5, version 5 of the Message Digest Algorithm) Algorithm, an RSA (an Encryption Algorithm) Algorithm, a DES (Data Encryption Standard) Algorithm, and the like.
In the embodiment of the application, a data processing device integrated in a target application program (namely an applet) acquires a hardware identifier of a terminal; if the hardware identification is failed to be acquired, collecting hardware capability data of the terminal from N dimensions (N is an integer larger than 1), and performing fusion operation on the hardware capability data of the N dimensions to generate a device fingerprint of the terminal; firstly, the generation process of the device fingerprint is realized in an applet, and interaction with other devices (such as a third party) is not needed, so that the requirement of a networking environment is not needed, and the safety of the device fingerprint and the generation process of the device fingerprint can be ensured; in addition, the hardware capability data of the N dimensions can only identify N hardware capabilities of the terminal, so that the data processing device relies on the hardware capability data of the N dimensions to generate a device fingerprint, the dependent data can comprehensively and fixedly reflect the underlying hardware capability of the terminal and is not changed along with the change of an operating system of the terminal, and the uniqueness of the device fingerprint is effectively improved.
FIG. 2 illustrates a flow chart of a method of data processing provided by another exemplary embodiment of the present application; the method is executed by data processing equipment, the data processing equipment is integrated in a target application program, the target application program is an installation-free application program, and the target application program belongs to a sub-application program in an application client in a terminal; the method comprises the following steps S201-S203:
s201, calling a first API provided by a parent application client of a target application program, and checking whether a leakage event of a hardware identifier exists in a terminal; if yes, go to step S202; otherwise, step S204 is executed.
S202, acquiring a hardware identifier from the leakage event.
S203, if the hardware identifier is successfully acquired, performing operation processing on the hardware identifier to generate an equipment fingerprint of the terminal; after that, the flow ends.
In steps S201-S203, the data processing apparatus preferentially tries to check whether a leakage event of a hardware identifier (such as a CPUID) exists in the terminal; specifically, the data processing device calls a first API provided by the parent application client of the applet to perform a check, for example: an applet in the wechat client calls a first API opened by the wechat client to check for a leak event. The first API, when successfully called, returns the CPUID provided by the applet's parent application client. However, after the first API is successfully called, the terminal pops up the frame to prompt the user for authorization, and the CPUID is returned after the user is authorized; in practical application, due to security considerations, a user usually rejects authorization, so that the CPUID cannot be successfully obtained; in addition, the process that the first API is successfully called and returns the CPUID cannot be realized in a silent mode, and the applet requires the silent realization on the generation process of the device fingerprint of the terminal, so that the CPUID cannot be obtained by successfully calling the first API. However, practice shows that if an error parameter is introduced in the process of calling the first API, the first API does not pop up to prompt the user for authorization but directly returns a call failure prompt, but the CPUID is exposed in the call failure prompt, so that the CPUID is leaked. Therefore, in the embodiment of the present application, the data processing device attempts to obtain the CPUID by checking the leak event by using the above-mentioned characteristic of the first API, as described above, since the leak event is an event that the first API fails to be called due to the introduction of an error parameter in the process of calling the first API, the leak event belongs to a silent event, that is, the generation of the leak event is not perceived by the user (no pop-up prompt), which meets the silent requirement of the applet on the generation process of the device fingerprint of the terminal; in addition, the CPUID can be exposed by the leakage event, the CPUIID is a hardware identifier capable of uniquely identifying the terminal, and the CPUID is used as a generating factor of the device fingerprint, so that the device fingerprint with good uniqueness can be conveniently obtained. Therefore, if there is a leakage event, the CPUID character string exposed in the leakage event is directly used as an input parameter, and the input parameter is operated through a fingerprint generation algorithm such as MD5 algorithm, so as to obtain a device fingerprint of the terminal and end the process, where the device fingerprint may be a Hash (Hash) string. If no leak event exists, then the following steps S204-S208 need to be continued to generate the device fingerprint of the terminal in other ways.
And S204, collecting the system information character string of the terminal.
Step S204 is to collect hardware capability data of the terminal from the operating system dimension. FIG. 3 illustrates a flow chart for collecting a system information string provided by an exemplary embodiment of the present application; as shown in fig. 3, the process of collecting the system information string of the terminal in step S204 specifically includes the following steps S11-S12:
s11, calling a second API provided by a parent application client of the target application program to acquire hardware information of the operating system; as shown in fig. 3, the hardware information includes at least one of: language setting information, brand information, version information, and screen size information. The language setting information and the brand information can be used for identifying different brands and models of terminals in different batches (namely different brands and different models); the version information and the screen size information can be used for distinguishing terminals in the same batch, namely, for two terminals of the same brand and the same model, the difference between the two terminals in the same batch can be distinguished through the version information and the screen size information.
And s12, generating a system information character string of the terminal according to the hardware information.
In the steps s11-s12, the hardware information of the operating system of the terminal can be directly acquired by calling a second API opened by the parent application client of the applet, and the calling process belongs to a silent process, and the user is not required to be prompted for authorization by a pop-up box. The system information character string generated according to the acquired hardware information is, for example: { "system": android "," version ": 8.1", "brand": "xxglaxy 6", the system information string in this example indicates that the operating system of the terminal is the android system of version 8.1, the brand is xx, and the model is glaxy 6. As can be seen from the above steps s11-s12, the system information string can uniquely identify the hardware capability of the operating system of a terminal, and the system information string is used as the generation factor of the device fingerprint, so that the generated device fingerprint has good uniqueness.
And S205, collecting the pixel data of the plane graph drawn by the terminal.
Step S205 is to collect hardware capability data of the terminal from the planar graphics rendering dimension. FIG. 4a is a flow chart illustrating a collection of pixel data for a flat image according to an exemplary embodiment of the present application; as shown in FIG. 4a, the process of collecting pixel data of a planar graph includes the following steps s21-s 23:
s21, creating a plane drawing canvas label and acquiring the drawing context of the plane figure according to the plane drawing canvas label. In one implementation, the plane drawing picture tag is a contract 2D tag, and the contract is a tag for drawing graphics using JS and is a feature of HTML5(Hyper Text Markup Language 5.0). The drawing context to the plane graphics can be obtained through the covas 2D label, and the drawing context of the plane graphics herein can refer to the interface set required for drawing the plane graphics.
s22, drawing the plane figure in the drawing context of the plane figure. Specifically, the data processing device transmits the text to be drawn into the drawing context of the plane graph for drawing (i.e., rendering), that is, an interface in the drawing context of the plane graph is called to render the text to be drawn, so as to generate the plane graph. In this embodiment, the text to be drawn may include a text in which multinational language characters and unicode (uniform code, universal code, single code) expressions are mixed.
s23, pixel data of the drawn planar figure is acquired.
The key points of the steps s21-s23 are: when the text to be drawn is a text mixed with multinational language characters and unicode expressions, due to the difference of GPU rendering capabilities and rendering parameters of different terminals, even if the same text is rendered on a plurality of terminals in the same batch, the pixel data of a planar graph generated by rendering also has difference; referring specifically to the example shown in fig. 4b, the planar graphics rendered by the same text by 3 terminals in the same batch are 40, 41 and 42, respectively. As shown in the figure, the text to be drawn is "this is only a test", and theplanar graph 40 rendered by one of the terminals in the same batch includes a text 1 and anicon 401, where the text 1 is an english expression "It's just a test" of the text to be drawn. Theplanar graphics 41 rendered by the other terminal include text 2, which is the japanese expression "これはただ peripheral テストです" of the text to be drawn, and anicon 411. The planar graphic 42 rendered by the further terminal comprises a text 3 and anicon 421, the text 3 being the chinese expression "this is only a test" of the text to be drawn. There is a difference in pixel data of theplane patterns 40, 41, and 42. The method and the device can utilize the difference to uniquely identify the plane graph drawing capability of the terminal by acquiring the pixel data of the plane graph, and then the generated device fingerprint has good uniqueness by taking the pixel data of the plane graph as a generation factor of the device fingerprint. In one implementation, the pixel data of the planar graph refers to RGBA values of the planar graph.
And S206, collecting the pixel data of the stereo image drawn by the terminal.
S207, collecting drawing protocol information of the stereoscopic image of the terminal.
Steps S206-S207 are to collect hardware capability data of the terminal from the stereoscopic image rendering dimension. FIG. 5a illustrates a flow chart for collecting pixel data and drawing protocol information for a stereoscopic image according to an exemplary embodiment of the present application; as shown in FIG. 5a, the process of collecting pixel data of a stereo image includes the following steps s31-s 35:
s31, creating a stereoscopic canvas label, and acquiring a rendering context of the stereoscopic image according to the stereoscopic canvas label. In one implementation, the stereograph label is a convas webgl label; the webgl is a 3D drawing protocol, which allows JS and OpenGLES (OpenGL for embedded Systems, which define a cross-programming language and a cross-platform programming professional graphical program interface for terminals (such as mobile phones and PADs) to be combined together), and by adding a JS binding of OpenGLES, the webgl can provide hardware 3D accelerated rendering for HTML5 covas tags. The rendering context of the stereoscopic image herein may refer to a set of interfaces required to render the facade image.
s32, triangle vertex data is created according to the rendering context of the stereoscopic image. A stereoscopic image (3D image) is composed of triangle patches, and data such as positions and coordinates of 3 vertices are required for drawing a triangle. The present embodiment creates triangle vertex data by invoking an interface in the rendering context of the stereoscopic image.
s33, configure and compile the shader. Shaders (shaders) are used to implement image rendering, replacing editable programs in a fixed rendering pipeline. A compiled shader is a piece of code that is executed by the GPU of the terminal, and is used to determine how to render the triangle.
And s34, calling a drawing interface in the drawing context of the stereo image to render the triangle vertex data and the shader, and generating the stereo image.
First, the compiled shader is linked to the program (OpenGL ES linker) of the terminal to configure and use the compiled shader. And calling a drawing interface in the drawing context of the stereoscopic image, and rendering the GPU of the terminal by using the triangular data and the shader to obtain the 3D image. The drawn triangles can be seen in the schematic view of the example shown in fig. 5 b.
And s35, acquiring pixel data of the stereo image.
In one implementation, the pixel data of the stereo image refers to RGBA values of each triangle patch in the stereo image.
Referring again to fig. 5a, the process of collecting the drawing protocol information of the stereoscopic image includes the following steps s36-s 37:
s36, obtaining basic information of drawing protocol of the stereo image according to the drawing context of the stereo image.
In one implementation of this embodiment, the drawing protocol of the stereoscopic image is webgl. The basic information of the webgl is related to the underlying capability of the terminal hardware (such as OpenGl ES of android terminal), and will not change with the system upgrade.
s37, obtaining the extension information of the drawing protocol of the stereo image according to the drawing context of the stereo image. The extended information of the webgl includes: the extension names supported by the webgl are enumerated.
The hardware capability data of the rendering dimension of the stereoscopic image acquired in steps S206 to S207 is used as an input parameter for device fingerprint generation to improve uniqueness, which is mainly reflected in that:
(1) pixel data of a stereoscopic image. Because a three-dimensional (3D) image is created in real time through webgl and dynamically rendered, and because GPU rendering capabilities and rendering parameters of different terminals are different, even if two terminals in the same batch are rendered, pixel data of the three-dimensional image generated by rendering also have difference; by utilizing the difference, the drawing capability of the stereo image of the terminal is uniquely identified by acquiring the pixel data of the stereo image, and the pixel data of the stereo image is used as a generation factor of the equipment fingerprint, so that the uniqueness of the equipment fingerprint can be effectively improved.
(2) webgl information. Basic information of the webgl is static data, the basic information of the webgl is related to GPU hardware capability of a terminal and does not change with upgrading of a system version, and the webgl is used as an equipment fingerprint generation factor, so that the equipment fingerprint has good uniqueness.
S208, using the collected hardware capability data of each dimension as an input parameter, and performing operation processing on the input parameter by adopting an MD5 algorithm to generate an equipment fingerprint of the terminal; after that, the flow ends.
In one embodiment, the hardware capability data of 3 dimensions collected in steps S204-S207 may be used as an overall input parameter, and the MD5 algorithm is used to calculate the overall input parameter to generate the device fingerprint of the terminal. The device fingerprint of the terminal is a hash character string, and specifically, refer to the example shown in fig. 6. The process for determining the input parameters specifically comprises the following steps of: calculating the system information character string collected in the step S204 by using an MD5 algorithm to obtain a hash value of the dimension of the operating system; and secondly, calculating the pixel data of the plane graph collected in the step S205 by using an MD5 algorithm to obtain a hash value under the drawing dimension of the plane graph. And thirdly, calculating the pixel data of the stereo image and the drawing protocol information of the stereo image collected in the steps S206 to S207 by using an MD5 algorithm to obtain a hash value under the drawing dimension of the stereo image. And fourthly, performing character string splicing on the hash values of all dimensions to form input parameters.
In the embodiment of the application, a data processing device integrated in a target application program (namely an applet) acquires a hardware identifier of a terminal; if the hardware identification is failed to be acquired, collecting hardware capability data of the terminal from N dimensions (N is an integer larger than 1), and performing fusion operation on the hardware capability data of the N dimensions to generate a device fingerprint of the terminal; firstly, the generation process of the device fingerprint is realized in an applet, and interaction with other devices (such as a third party) is not needed, so that the requirement of a networking environment is not needed, and the safety of the device fingerprint and the generation process of the device fingerprint can be ensured; in addition, the hardware capability data of the N dimensions can only identify N hardware capabilities of the terminal, so that the data processing device relies on the hardware capability data of the N dimensions to generate a device fingerprint, the dependent data can comprehensively and fixedly reflect the underlying hardware capability of the terminal and is not changed along with the change of an operating system of the terminal, and the uniqueness of the device fingerprint is effectively improved.
The data processing methods shown in fig. 1 to fig. 6 can provide the mapping capability of the hardware of the terminal to the service of the upper layer product for the upper layer product (e.g. applet) of the terminal. By applying the device fingerprint of the terminal generated by the applet (particularly the data processing device integrated in the applet) to the wind control management scene, the wind control management of the service in the applet can be realized based on the device fingerprint of the terminal.
FIG. 7 illustrates a flow chart of a method of data processing provided by another exemplary embodiment of the present application; the method is executed by data processing equipment, the data processing equipment is integrated in a target application program, the target application program is an installation-free application program, and the target application program belongs to a sub-application program in an application client in a terminal; the method comprises the following steps S701-S703:
s701, acquiring a service request of the target application program. The service requests in the applet may include, but are not limited to: page requests, API call requests, function call requests, and the like.
S702, acquiring a device fingerprint of the terminal, where the device fingerprint of the terminal is generated by using the method shown in fig. 1 or fig. 2.
And S703, sending a service request to the server, wherein the service request carries the device fingerprint of the terminal, so that the server performs wind control detection on the service request according to the device fingerprint of the terminal, and processes the service request according to a wind control detection result.
A server may refer to a backend server of an applet. The wind control detection process in step S703 may include the following: (1) after receiving a service request sent by an applet, a server compares an equipment fingerprint of a terminal carried in the service request with an equipment blacklist library; the device blacklist library here contains a large number of malicious or illegal device fingerprints. (2) If the device fingerprint of the terminal carried in the service request hits the device blacklist library, the service request is indicated to have risk; and if the device fingerprint of the terminal carried in the service request does not hit the device blacklist library, the service request is free from risk. The processing of the service request by the server in step S703 according to the wind control detection result includes: if the service request has risk, the server intercepts the service request or discards the service request; if the service request is not at risk, the server responds to the service request. Through the wind control detection of the server, the judgment and the processing of the risk of the service request of the small program can be realized, and further, the functions such as anti-pulling wool, anti-spam registration and the like are realized. In addition, the server may also count the wind control detection result of the service request of the applet periodically (for example, every 12 hours, every day, etc.), form a wind control log of the applet, and send the wind control log of the applet to the developer or the operation and maintenance staff of the applet, where fig. 8 shows a page display diagram of the wind control log of the applet according to an exemplary embodiment of the present application; the developer or the operation and maintenance personnel of the small program can intuitively and timely capture the abnormity in the small program through the page shown in the figure 8.
In the embodiment of the application, the device fingerprint of the terminal is generated by the data processing device integrated in the target application program (i.e. the applet), the device fingerprint has good uniqueness, and the device fingerprint of the terminal can be applied to a wind control management scene, and by executing a wind control strategy (such as a device black name list library) on the device fingerprint of the terminal, the wind control management on the service in the applet can be realized, and the service security of the applet is improved.
FIG. 9 is a block diagram illustrating a data processing apparatus according to an exemplary embodiment of the present application; the data processing device is integrated in the target application and, in one embodiment, is integrated in the code of the target application in the form of an SDK (Software Development Kit). The target application program is an installation-free application program, and belongs to a sub-application program in an application client in the terminal; i.e. the target application is an applet. The data processing apparatus includes:
an obtainingunit 901, configured to obtain a hardware identifier of the terminal.
A collectingunit 902, configured to collect hardware capability data of a terminal from N dimensions if obtaining the hardware identifier fails, where N is an integer greater than 1.
And theprocessing unit 903 is configured to perform fusion operation on the hardware capability data of the N dimensions, and generate a device fingerprint of the terminal.
In one embodiment, theprocessing unit 903 is further configured to: and if the hardware identifier is successfully acquired, performing operation processing on the hardware identifier to generate the equipment fingerprint of the terminal.
In an embodiment, the obtainingunit 901 is specifically configured to:
calling a first application programming interface provided by a parent application client of a target application, and checking whether a leakage event of a hardware identifier exists in a terminal;
and if so, acquiring the hardware identification from the leakage event.
In one embodiment, the N dimensions include an operating system dimension, and the hardware capability data of the operating system dimension includes a system information string of the terminal; thecollection unit 902 is specifically configured to:
calling a second application programming interface provided by a parent application client of the target application program to acquire hardware information of the operating system;
generating a system information character string of the terminal according to the hardware information;
wherein the hardware information comprises at least one of: language setting information, brand information, version information, and screen size information.
In one embodiment, the N dimensions include a planar graph drawing dimension, the hardware capability data for the planar graph drawing dimension including pixel data for the planar graph; thecollection unit 902 is specifically configured to:
creating a plane drawing canvas label, and acquiring the drawing context of the plane graph according to the plane drawing canvas label;
drawing the plane graph in the drawing context of the plane graph;
and acquiring pixel data of the drawn planar graph.
In one embodiment, the N dimensions include a stereoscopic image rendering dimension, the hardware capability data for the stereoscopic image rendering dimension including pixel data for a stereoscopic image; thecollection unit 902 is specifically configured to:
creating a volume drawing canvas label, and acquiring the drawing context of the three-dimensional image according to the three-dimensional drawing canvas label;
creating triangle vertex data according to the drawing context of the stereo image, and configuring and compiling a shader; and the number of the first and second groups,
calling a drawing interface in the drawing context of the stereo image to render the triangle vertex data and the shader, and generating the stereo image;
pixel data of a stereoscopic image is acquired.
In one embodiment, the hardware capability data for the stereoscopic image rendering dimension further includes rendering protocol information for the stereoscopic image; thecollection unit 902 is further configured to:
and acquiring drawing protocol information of the stereoscopic image according to the drawing context of the stereoscopic image, wherein the drawing protocol information of the stereoscopic image comprises basic information and extension information of the drawing protocol of the stereoscopic image.
In one embodiment, theprocessing unit 903 is specifically configured to:
setting hardware capacity data of N dimensions as input parameters;
and performing operation processing on the input parameters by adopting a fingerprint generation algorithm to generate the equipment fingerprint of the terminal.
Based on the same inventive concept, the principle and the advantageous effect of the data processing apparatus provided in this embodiment for solving the problem are similar to those of the data processing method shown in fig. 1 or fig. 2, so that, in this embodiment, reference may be made to the principle and the advantageous effect of the implementation of the method shown in fig. 1 or fig. 2, and for brevity, no further description is given here.
In the embodiment of the application, a data processing device integrated in a target application program (namely an applet) acquires a hardware identifier of a terminal; if the hardware identification is failed to be acquired, collecting hardware capability data of the terminal from N dimensions (N is an integer larger than 1), and performing fusion operation on the hardware capability data of the N dimensions to generate a device fingerprint of the terminal; firstly, the generation process of the device fingerprint is realized in an applet, and interaction with other devices (such as a third party) is not needed, so that the requirement of a networking environment is not needed, and the safety of the device fingerprint and the generation process of the device fingerprint can be ensured; in addition, the hardware capability data of the N dimensions can only identify N hardware capabilities of the terminal, so that the data processing device relies on the hardware capability data of the N dimensions to generate a device fingerprint, the dependent data can comprehensively and fixedly reflect the underlying hardware capability of the terminal and is not changed along with the change of an operating system of the terminal, and the uniqueness of the device fingerprint is effectively improved.
FIG. 10 is a block diagram illustrating a data processing apparatus according to another exemplary embodiment of the present application; the data processing device is integrated in the target application and, in one embodiment, is integrated in the code of the target application in the form of an SDK (Software Development Kit). The target application program is an installation-free application program, and belongs to a sub-application program in an application client in the terminal; i.e. the target application is an applet.
The data processing apparatus includes:
arequest obtaining unit 1001 is configured to obtain a service request of a target application.
Afingerprint acquisition unit 1002 for acquiring a device fingerprint of the terminal.
Theprocessing unit 1003 is configured to send a service request to the server, where the service request carries the device fingerprint of the terminal, so that the server performs wind control detection on the service request according to the device fingerprint of the terminal, and processes the service request according to a wind control detection result.
The device fingerprint of the terminal obtained by thefingerprint obtaining unit 1002 may be generated by the data processing device executing the method shown in fig. 1 or fig. 2.
Based on the same inventive concept, the principle and the advantageous effect of the data processing apparatus provided in this embodiment for solving the problem are similar to those of the data processing method shown in fig. 7, so that the embodiment may refer to the principle and the advantageous effect of the implementation of the method shown in fig. 7, and for brevity, the details are not repeated here.
In the embodiment of the application, the device fingerprint of the terminal is generated by the data processing device integrated in the target application program (i.e. the applet), the device fingerprint has good uniqueness, and the device fingerprint of the terminal can be applied to a wind control management scene, and by executing a wind control strategy (such as a device black name list library) on the device fingerprint of the terminal, the wind control management on the service in the applet can be realized, and the service security of the applet is improved.
Fig. 11 is a schematic structural diagram of a terminal according to an exemplary embodiment of the present application. Referring to fig. 11, the terminal may be a mobile phone, a smart phone, a PDA (tablet), a smart wearable device (e.g., a smart watch, a smart bracelet), or the like. The terminal may include input devices and output devices, as well as aprocessor 1101 and a computer-readable storage medium 1102. The input devices, output devices,processor 1101, and computer-readable storage medium 1102 may be connected by a bus or other means. Among other things, input devices may include, but are not limited to: radio frequency receiver, keyboard, touch screen, etc.; the output device may include, but is not limited to, a radio frequency transmitter or the like.
The computer-readable storage medium 1101 is a memory device in the terminal, and is provided in a memory of the terminal. The computer-readable storage medium 1101 herein may include a built-in storage medium in the terminal, and may also include an extended storage medium supported by the terminal, and may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer readable storage medium located remotely from the aforementioned processor. The computer-readable storage medium 1101 provides a storage space for storing an operating system of the terminal and also for storing programs and data. In one implementation of this embodiment, the computer-readable storage medium stores 1101 a target application, the target application being an installation-free application, the target application being a sub-application in an application client in the terminal; and the target application has integrated therein a data processing device integrated therein in the form of an SDK, which SDK (i.e. the data processing device) is adapted to be loaded by theprocessor 1102 to implement the respective steps of the data processing method in the embodiment shown in fig. 1-2 or 7.
In one embodiment, theprocessor 1102 loads the SDK in the computer-readable storage medium 1101 and performs the steps of:
acquiring a hardware identifier of a terminal;
if the hardware identification is failed to be obtained, hardware capability data of the terminal are collected from N dimensions, wherein N is an integer larger than 1;
and performing fusion operation on the hardware capability data of the N dimensions to generate the equipment fingerprint of the terminal.
In one embodiment, theprocessor 1102 loads the SDK in the computer-readable storage medium 1101 and further performs the steps of: and if the hardware identifier is successfully acquired, performing operation processing on the hardware identifier to generate the equipment fingerprint of the terminal.
In an embodiment, when theprocessor 1102 loads the SDK in the computer-readable storage medium 1101 to execute the step of acquiring the hardware identifier of the terminal, the following steps are specifically executed:
calling a first application programming interface provided by a parent application client of a target application, and checking whether a leakage event of a hardware identifier exists in a terminal;
and if so, acquiring the hardware identification from the leakage event.
In one embodiment, the N dimensions include an operating system dimension, and the hardware capability data of the operating system dimension includes a system information string of the terminal; when theprocessor 1102 loads the SDK in the computer-readable storage medium 1101 and executes the step of collecting the hardware capability data of the terminal from the N dimensions, the following steps are specifically executed:
calling a second application programming interface provided by a parent application client of the target application program to acquire hardware information of the operating system;
generating a system information character string of the terminal according to the hardware information;
wherein the hardware information comprises at least one of: language setting information, brand information, version information, and screen size information.
In one embodiment, the N dimensions include a planar graph drawing dimension, the hardware capability data for the planar graph drawing dimension including pixel data for the planar graph; when theprocessor 1102 loads the SDK in the computer-readable storage medium 1101 and executes the step of collecting the hardware capability data of the terminal from the N dimensions, the following steps are specifically executed:
creating a plane drawing canvas label, and acquiring the drawing context of the plane graph according to the plane drawing canvas label;
drawing the plane graph in the drawing context of the plane graph;
and acquiring pixel data of the drawn planar graph.
In one embodiment, the N dimensions include a stereoscopic image rendering dimension, the hardware capability data for the stereoscopic image rendering dimension including pixel data for a stereoscopic image; when theprocessor 1102 loads the SDK in the computer-readable storage medium 1101 and executes the step of collecting the hardware capability data of the terminal from the N dimensions, the following steps are specifically executed:
creating a volume drawing canvas label, and acquiring the drawing context of the three-dimensional image according to the three-dimensional drawing canvas label;
creating triangle vertex data according to the drawing context of the stereo image, and configuring and compiling a shader; and the number of the first and second groups,
calling a drawing interface in the drawing context of the stereo image to render the triangle vertex data and the shader, and generating the stereo image;
pixel data of a stereoscopic image is acquired.
In one embodiment, the hardware capability data for the stereoscopic image rendering dimension further includes rendering protocol information for the stereoscopic image; when theprocessor 1102 loads the SDK in the computer-readable storage medium 1101 to perform the step of collecting hardware capability data of the terminal from the N dimensions, the following steps are further performed:
and acquiring drawing protocol information of the stereoscopic image according to the drawing context of the stereoscopic image, wherein the drawing protocol information of the stereoscopic image comprises basic information and extension information of the drawing protocol of the stereoscopic image.
In an embodiment, when theprocessor 1102 loads the SDK in the computer-readable storage medium 1101 to perform a fusion operation on the hardware capability data of N dimensions and generate a device fingerprint of the terminal, the following steps are specifically performed:
setting hardware capacity data of N dimensions as input parameters;
and performing operation processing on the input parameters by adopting a fingerprint generation algorithm to generate the equipment fingerprint of the terminal.
In the embodiment of the application, a data processing device integrated in a target application program (namely an applet) acquires a hardware identifier of a terminal; if the hardware identification is failed to be acquired, collecting hardware capability data of the terminal from N dimensions (N is an integer larger than 1), and performing fusion operation on the hardware capability data of the N dimensions to generate a device fingerprint of the terminal; firstly, the generation process of the device fingerprint is realized in an applet, and interaction with other devices (such as a third party) is not needed, so that the requirement of a networking environment is not needed, and the safety of the device fingerprint and the generation process of the device fingerprint can be ensured; in addition, the hardware capability data of the N dimensions can only identify N hardware capabilities of the terminal, so that the data processing device relies on the hardware capability data of the N dimensions to generate a device fingerprint, the dependent data can comprehensively and fixedly reflect the underlying hardware capability of the terminal and is not changed along with the change of an operating system of the terminal, and the uniqueness of the device fingerprint is effectively improved.
In another embodiment, theprocessor 1102 loads the SDK in the computer-readable storage medium 1101 and performs the steps of:
acquiring a service request of a target application program; the target application program is an installation-free application program, and belongs to a sub-application program in an application client in the terminal;
acquiring a device fingerprint of a terminal, wherein the device fingerprint of the terminal is generated by adopting the method in the embodiment shown in the figures 1-2;
and sending a service request to a server, wherein the service request carries the equipment fingerprint of the terminal, so that the server performs wind control detection on the service request according to the equipment fingerprint of the terminal and processes the service request according to a wind control detection result.
In the embodiment of the application, the device fingerprint of the terminal is generated by the data processing device integrated in the target application program (i.e. the applet), the device fingerprint has good uniqueness, and the device fingerprint of the terminal can be applied to a wind control management scene, and by executing a wind control strategy (such as a device black name list library) on the device fingerprint of the terminal, the wind control management on the service in the applet can be realized, and the service security of the applet is improved.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data processing method in the embodiments shown in fig. 1-2 and 7.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.