Disclosure of Invention
One of the purposes of the invention is to provide a privacy data processing method which can directly work on a framework of small program operation and block the action of endangering personal privacy in real time.
Based on the above object, the present invention proposes a method for processing private data, applied to a communication layer of an applet, said method comprising the steps of:
responding to a calling request sent when a logic processing layer receives a data request, and calling a communication layer interface to acquire target data through the communication layer interface;
privacy detection is carried out on the obtained target data;
processing the target data according to the privacy data detection result;
and returning the processed target data to the logic processing layer.
The invention provides a privacy data processing method aiming at the privacy protection of an applet, which can directly work on a framework operated by the applet, and aims at data acquired by a data processing layer data request, so as to carry out privacy detection on the data in real time, process the privacy data and protect the data privacy.
Further, in some embodiments, the privacy detection includes type detection, the method comprising:
and detecting the type of the target data, and blocking the target data under the condition that the type of the target data is a preset privacy data type.
Further, in some embodiments, the privacy detection includes content detection, the method comprising:
and detecting the content of the target data, judging that the target data contains privacy data under the condition that the target data comprises sensitive information, and blocking the sensitive information, wherein the sensitive information is the data content meeting the preset sensitive information judging condition.
The invention also provides another privacy data processing method which is applied to the communication layer of the applet, and the method comprises the following steps:
Responding to a call request sent by a logic processing layer when receiving a sending request, and acquiring data to be sent;
privacy detection is carried out on the acquired data;
processing the data to be sent according to the privacy detection result;
and calling a communication layer interface to send the processed data to be sent through the communication layer interface.
Further, in some embodiments, the privacy detection includes content detection, the method comprising:
and detecting the content of the target data, judging that the target data contains privacy data under the condition that the target data comprises sensitive information, and performing privacy protection processing on the target data, wherein the sensitive information is data content meeting preset sensitive information judging conditions.
Further, in some embodiments, the privacy preserving means includes performing a desensitization operation or a blocking operation on the private data.
Another object of the present invention is to provide a private data detection engine, which is applied to a communication layer of an applet architecture, and detects and protects private data in real time.
Based on the above object, the present invention further provides a private data detection engine, which is applied to a communication layer of an applet architecture:
The detection engine responds to a calling request sent by the logic processing layer when receiving a data request, and calls a communication layer interface to acquire target data through the communication layer interface;
the detection engine carries out privacy detection on the acquired target data, and processes the target data according to a privacy data detection result;
and the detection engine returns the processed target data to the logic processing layer.
Further, in some embodiments, the private data detection engine includes a first interface for requesting access to mobile-side data, and a call request sent in response to the logic processing layer receiving the data request is sent to the detection engine through the first interface.
Further, in some embodiments, the detection engine performs type detection on the target data, and performs blocking processing on the target data if the type of the target data is a preset privacy data type.
Further, in some embodiments, the detecting engine performing privacy detection on the target data comprises:
and the detection engine detects the content of the target data, judges that the target data contains privacy data under the condition that the target data comprises sensitive information, and performs blocking processing on the sensitive information, wherein the sensitive information is data content meeting preset sensitive information judgment conditions.
The invention also provides another privacy data detection engine which is applied to a communication layer of the applet architecture:
the detection engine responds to a call request sent by the logic processing layer when receiving a transmission request, and acquires data to be transmitted;
the detection engine carries out privacy detection on the acquired data, and processes the data to be sent according to a privacy detection result;
and the detection engine calls a communication layer interface to send the processed data to be sent through the communication layer interface.
Further, in some embodiments, the private data detection engine includes a second interface for requesting access to an internet open interface service, and the call request issued in response to the logic processing layer receiving the send request is sent to the detection engine through the second interface.
Further, in some embodiments, the detection engine is further configured to perform content detection on the target data, determine that the target data includes private data when the target data includes sensitive information, and perform privacy protection processing on the target data, where the sensitive information is data content that meets a preset sensitive information determination condition.
Further, in some embodiments, the detection engine is further configured to perform a desensitization operation or a blocking operation on the private data.
It is yet another object of the present invention to provide a private data processing system, which is applied to a communication layer of an applet architecture, and detects and protects private data in real time.
In view of the above object, the present invention further provides a private data processing system, which includes a communication layer applied to an applet framework, and a logic processing layer in data communication with the communication layer, the communication layer further including a detection engine, the detection engine including a first interface for accessing mobile end data, the logic processing layer being in communication with the detection engine through the first interface, the detection engine being in communication with other interfaces of the communication layer through a communication layer interface:
the logic processing layer sends a call request to the detection engine through the first interface when receiving a data request,
the detection engine calls the communication layer interface to acquire target data through the communication layer interface;
the detection engine carries out privacy detection on the acquired target data, and processes the target data according to a privacy data detection result;
And the detection engine returns the processed target data to the logic processing layer.
Further, in some embodiments, the detecting engine performing privacy detection on the target data comprises:
the detection engine detects the type of the target data, and performs blocking processing on the target data under the condition that the type of the target data is a preset privacy data type.
Further, in some embodiments, the detecting engine performing privacy detection on the target data comprises:
and the detection engine detects the content of the target data, judges that the target data contains privacy data under the condition that the target data comprises sensitive information, and performs blocking processing on the sensitive information, wherein the sensitive information is data content meeting preset sensitive information judgment conditions.
Further, in some embodiments, the system further comprises a presentation layer, the detection engine further comprises a second interface for accessing an internet open interface service, the logic processing layer communicates with the detection engine through the second interface, and the detection engine communicates with other interfaces of the communication layer through the communication layer interface:
When the logic processing layer receives the sending request, a calling request is sent to the detection engine through the second interface;
the detection engine carries out privacy detection on the acquired data, and processes the data to be sent according to a privacy detection result;
and the detection engine calls a communication layer interface to send the processed data to be sent to the display layer through the communication layer interface.
Further, in some embodiments, the privacy data processing system is further configured to perform content detection on the target data, determine that the target data contains privacy data when the target data includes sensitive information, and perform privacy protection processing on the target data, where the sensitive information is data content that meets a preset sensitive information determination condition.
Further, in some embodiments, the detection engine is further configured to perform a desensitization operation or a blocking operation on the private data.
The privacy data processing method, the frame and the system have the following beneficial effects:
the method directly works on a framework of the operation of the applet, and blocks the behavior of endangering personal privacy in real time; the method is embedded into an applet framework, and the data reading behavior of a logic layer is detected, so that the behavior of endangering personal privacy can be blocked in real time; the method can be directly embedded into an applet framework, and detect the data returned to the page display layer to block the behavior of the desensitization of privacy data in real time;
Detailed Description
The method, detection engine and system for private data processing according to the present application will be described in further detail below with reference to the attached drawings and specific examples, but the detailed description is not meant to limit the application.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Furthermore, the modules referred to in the embodiments of the present application may be implemented in software or hardware.
FIG. 1 schematically illustrates an architecture diagram of a prior art applet framework in one embodiment, as shown in FIG. 1, which primarily includes a page presentation layer, a communication framework, and a logic processing layer. The page display layer requests data from the logic processing layer through the communication framework; the logic processing layer accesses the data of the mobile terminal and openAPI service opened on the Internet through the API provided by the applet communication framework, and transmits the processed data to the page display layer through the communication framework, and the page display layer completes final data display. In the data transmission process, privacy security problems can occur in some scenes, for example, a logic processing layer directly reads user privacy data in a violation manner through a communication framework of an applet; for another example, the logic layer reads the data of the mobile terminal in compliance with the service requirement or reads the personal privacy data through openAPI compliance, but the page presentation layer does not perform desensitization or desensitization errors, and the personal privacy data is not presented in compliance.
The invention is a privacy data processing method which can be applied to the existing applet framework, and can be directly embedded into the existing applet running framework to detect and process the behavior of endangering the data privacy in real time.
In one embodiment of the present invention, a method for processing private data is provided, which is applied to a detection engine in an applet communication framework, where the detection engine is used to detect target data to be processed in the applet communication framework, and fig. 2 is a schematic flow diagram of an embodiment of the method for processing private data according to the present invention.
As shown in fig. 2, the private data processing method includes the steps of:
200: and calling a communication layer interface in response to a calling request sent when the logic processing layer receives a data request so as to acquire target data through the communication layer interface.
In some embodiments, when the logic processing layer receives the data request, it sends a data call request to the communication layer of the applet to read the target data. The target data may be data obtained by a mobile terminal where a host application of an existing interface applet in the applet framework is located, and the data may be returned to the logic processing layer for further data processing. The host application is the APP where the applet is located, and the mobile terminal where the host application is located is the mobile device where the APP is installed, such as a mobile phone, a tablet, a personal computer, and even a device management apparatus. According to the privacy data processing method provided by the invention, the logic processing layer can not directly call the existing interface of the applet communication layer, but can request the communication layer through the interface provided by the invention; the data acquired from the mobile terminal is not directly fed back to the logic processing layer, but is returned to the logic processing layer after subsequent privacy detection and processing. Thus, the detection and processing of the privacy data returned to the logic layer in the applet are realized.
210: and carrying out privacy detection on the obtained target data.
220: and processing the target data according to the privacy data detection result, and returning the processed target data to the logic processing layer.
In some embodiments, the privacy detection comprises type detection, and the privacy data processing method further comprises the steps of: and detecting the type of the target data, and blocking the target data under the condition that the type of the target data is a preset privacy data type.
In this embodiment, whether the target data is private data is determined according to the data type of the target data. For example, the preset data types related to privacy include, but are not limited to, MAC address, device number, IP address, geographic location, address book information of the mobile terminal, etc., since these data may have a specific data type, or a specific field may be used to indicate the type of a certain data according to the definition of data standardization or structuring. By way of example, type detection may be performed by the format or type of the data itself, e.g., the MAC address is fixed to 48 bits; geographic location is composed of longitude and latitude; the IP address also has a standard data format, for example, the length of the ipv4 address is 32 bits, the range of address numbers of each segment is 0-255, the address length of the ipv6 address is 128 bits, etc. And detecting the target data according to the characteristics of the data, and judging that the target data comprises the privacy data under the condition that the composition characteristics of a certain section of data are detected to be in accordance with the type preset as the privacy data. Optionally, in other embodiments, according to the standard definition of the data in the interface, the device number may be indicated by the DeviceID, and if the obtained target data includes the data indicated by the field in the type detection process, the target data may be determined to include the device number, and if the device number is preset privacy data, the target data includes the privacy data. And in the case where the target data contains private data, blocking is directly performed. The blocking can be aimed at all data included in the call request, namely returning null data to the logic processing layer; the method may also be to filter the data related to the call request, and return only readable data to the logic processing layer after blocking the private data.
It should be noted that the above type detection method is only an alternative embodiment of the type detection provided by the present invention, and in the application process, higher detection accuracy may be obtained by more other detection methods or a combination of multiple types of methods.
In some embodiments, the privacy detection comprises content detection, and the method of processing the privacy data further comprises the steps of: and detecting the content of the target data, judging that the target data contains privacy data under the condition that the target data comprises sensitive information, and blocking the sensitive information, wherein the sensitive information is the data content meeting the preset sensitive information judging condition.
In this embodiment, the main purpose of content detection is to determine whether the target data contains preset data content that should not be returned to the logic processing layer. For example, the user corresponding to the host application where the applet is located includes an identification card number in its user information, and according to a preset privacy setting, its mobile phone number only allows to obtain the last 4 digits. In this embodiment, digits other than the last four digits in the identification card number belong to sensitive information, and if the digits are to be acquired, the sensitive information is required to be desensitized, for example, the sensitive information is hidden and replaced by a number, or only the last four digits are read in the reading process. When content detection is performed, it is necessary to determine whether or not the above-described sensitive information determination condition is satisfied for the target data, for example, all data of the mobile phone number is read, and the target data is regarded as including the privacy data. Alternatively, in some more specific embodiments, the sensitive information determination condition may be preset by a designer of the applet, or may be manually set by a user from the host application or the mobile terminal.
Similarly, in the case where the target data contains private data, blocking is performed. The blocking can be aimed at all data included in the call request, namely returning null data to the logic processing layer; the method may also be to filter the data related to the call request, and return only readable data to the logic processing layer after blocking the private data. Optionally, after blocking, the target data can be subjected to desensitization treatment by desensitization treatment, and the desensitized data is transferred to the logic processing layer.
In the method for processing private data provided by the invention, the mode of acquiring the target data by the detection engine is not limited. In some embodiments, the detection engine may be added to all data interfaces and data streams of the communication framework to obtain target data to be transferred to the logic processing layer, and perform privacy detection on the target data. In other embodiments, in order to improve the working efficiency of the detection engine, the original interface between the applet communication framework and the logic processing layer may be encapsulated, and the logic processing layer may not directly call the original interface of the applet framework, but may only call the interface provided by the detection engine. The interface detects the data of the access mobile terminal and all the data returned to the logic layer when the data access mobile terminal accesses the openAPI service opened on the Internet, and performs privacy detection
According to the method steps, the privacy data processing method provided by the invention can overcome the problems that most of the existing manual code audits aiming at the privacy security of the small program are easy to miss and the existing automatic code audit tools aiming at the privacy security cannot be used in the small program scene, can directly work on the framework of the small program operation, and can block the action of endangering the personal privacy in real time.
In another embodiment of the present invention, a method for processing private data is provided, which is applied to a detection engine in an applet communication framework, where the detection engine is used to detect target data to be processed in the applet communication framework, and fig. 3 is a schematic flow diagram of another embodiment of the method for processing private data according to the present invention.
As shown in fig. 3, the private data processing method includes the steps of:
300: and responding to a call request sent by the logic processing layer when receiving the transmission request, and acquiring data to be transmitted.
In some more specific embodiments, after the logic processing layer acquires the data and performs data processing, the data needs to be returned to the display layer and displayed to the user through the interactive interface. In this scenario, when the logic processing layer receives a request for sending data, an interface call request is typically sent to the communication layer of the applet, so that the data to be presented is transferred to the presentation layer through the communication layer. The communication layer obtains the data to be sent based on the call request. Unlike available small program frame, the privacy processing method of the present invention can not directly transmit the acquired data to be transmitted to the display layer, but rather, the privacy detection is performed on the data to be transmitted.
310: privacy detection is carried out on the acquired data;
320: processing the data to be sent according to the privacy detection result; and calling the communication layer interface to send the processed data to be sent through the communication layer interface.
In some embodiments, the privacy detection includes content detection, comprising the steps of:
and detecting the content of the target data, judging that the target data contains privacy data under the condition that the target data comprises sensitive information, and performing privacy protection processing on the target data, wherein the sensitive information is data content meeting preset sensitive information judging conditions.
In this embodiment, the target data of privacy detection is mainly data to be sent to the page display layer for display. In this case, the data type of the data acquired from the mobile terminal is generally allowed to be acquired, and the logic processing layer may further process the data according to preset logic, so as to finally obtain target data that needs to be fed back to the page display layer, where when the target data flows through the applet communication framework, the detection engine performs content detection on the target data. The main purpose of content detection is to judge whether the target data contains sensitive information which is not suitable for being displayed on a page display layer. For example, the user information of the user corresponding to the host application where the applet is located contains an identification card number, and according to a preset privacy setting, the identification card number is 18 bits, and only a part of bits are allowed to be displayed when the mobile terminal interface is displayed. In this embodiment, the content of the identification card number is sensitive information, except for the allowed bit. If the information is to be displayed on the page display layer, the sensitive information can be further desensitized, for example, the sensitive information is hidden and replaced by a sign, and the output of the information to the display layer can be directly blocked. When content detection is performed, it is necessary to determine whether or not the target data for presentation has met the above-described display requirement, i.e., the sensitive information determination condition.
Alternatively, in some more specific embodiments, the sensitive information determination condition may be preset by a designer of the applet, or may be manually set by a user from the host application or the mobile terminal. The desensitization operation is not limited to the concealment or substitution of numbers or characters, but also includes various types of smearing or mosaic processing of private information in pictures.
In some embodiments, the privacy preserving means includes performing a desensitization operation on the private data. In some more specific embodiments, the desensitization operation is performed when the private data is contained and is not desensitized or is not compliant. The desensitization operation corresponds to the type of the sensitive information and the sensitive information judgment condition. For example, for numbers or characters, numbers or characters on corresponding digits can be hidden according to desensitization requirements; for the picture, a masking pattern may be added to a portion of the picture that is not exposed for privacy protection or may be processed in a mosaic. In some more specific application scenarios, the privacy protection measures provided in the foregoing embodiments may be performed simultaneously or sequentially.
In the method for processing private data provided by the invention, the mode of acquiring the target data by the detection engine is not limited. In some embodiments, the detection engine may be added to all data interfaces and data streams of the communication framework to obtain target data to be transferred to the logic processing layer, and perform privacy detection on the target data. In other embodiments, in order to improve the working efficiency of the detection engine, the original interface between the applet communication framework and the logic processing layer may be encapsulated, and the logic processing layer may not directly call the original interface of the applet framework, but may only call the interface provided by the detection engine. The interface detects data of the access mobile terminal and all data returned to the logic layer when the data access mobile terminal accesses the openAPI service opened on the Internet, and performs privacy detection.
According to the method steps, the privacy data processing method provided by the invention can overcome the problems that most of the existing manual code audits aiming at the privacy security of the small program are easy to miss and the existing automatic code audit tools aiming at the privacy security cannot be used in the small program scene, can directly work on the framework of the small program operation, and can block the action of endangering the personal privacy in real time.
In another embodiment of the present invention, a private data detection engine is provided for application to a communication layer of an applet architecture. FIG. 4 schematically illustrates a flow of steps performed by the private data detection engine of the present invention in one embodiment, as shown in FIG. 4, for performing the steps of:
400: the detection engine responds to a call request sent when the logic processing layer receives a data request, and calls the communication layer interface to acquire target data through the communication layer interface.
In some embodiments, when the logic processing layer receives the data request, it sends a data call request to the communication layer of the applet to read the target data. The target data may be data obtained by a mobile terminal where a host application of an existing interface applet in the applet framework is located, and the data may be returned to the logic processing layer for further data processing. The host application is the APP where the applet is located, and the mobile terminal where the host application is located is the mobile device where the APP is installed, such as a mobile phone, a tablet, a personal computer, and even a device management apparatus. The manner in which the detection engine obtains the target data is not limited. In some embodiments, the detection engine may be added to all data streams of the communication framework to obtain target data to be transferred to the logic processing layer or the page presentation layer, and perform privacy detection on the target data.
In some embodiments, the private data detection engine includes a first interface for requesting access to mobile-side data, and a call request sent in response to the logic processing layer receiving the data request is sent to the detection engine through the first interface. In this embodiment, when the logic layer needs to request to access the mobile terminal data, the access cannot be obtained through the original applet communication layer interface, but is obtained through an interface provided by the detection engine. After the detection engine acquires the request, target data is acquired from the original communication interface of the applet, privacy detection is carried out, and then the target data is returned to the logic processing layer through the interface. In this way, the detection engine can perform private data detection on the data requested by all the logic processing layers from the mobile terminal, so as to perform data detection and processing.
410: the detection engine carries out privacy detection on the acquired target data, and processes the target data according to the detection result of the privacy data.
420: the detection engine returns the processed target data to the logic processing layer.
In some embodiments, the privacy detection includes type detection, and the detection engine performs privacy detection on the acquired target data further includes the steps of: and detecting the type of the target data, and blocking the target data under the condition that the type of the target data is a preset privacy data type.
In this embodiment, whether the target data is private data is determined according to the data type of the target data. For example, the preset data types related to privacy include, but are not limited to, MAC address, device number, IP address, geographic location, address book information of the mobile terminal, etc., since these data may have a specific data type, or a specific field may be used to indicate the type of a certain data according to the definition of data standardization or structuring. By way of example, type detection may be performed by the format or type of the data itself, e.g., the MAC address is fixed to 48 bits; geographic location is composed of longitude and latitude; the IP address also has a standard data format, for example, the length of the ipv4 address is 32 bits, the range of address numbers of each segment is 0-255, the address length of the ipv6 address is 128 bits, etc. And detecting the target data according to the characteristics of the data, and judging that the target data comprises the privacy data under the condition that the composition characteristics of a certain section of data are detected to be in accordance with the type preset as the privacy data. Optionally, in other embodiments, according to the standard definition of the data in the interface, the device number may be indicated by the DeviceID, and if the obtained target data includes the data indicated by the field in the type detection process, the target data may be determined to include the device number, and if the device number is preset privacy data, the target data includes the privacy data. And in the case where the target data contains private data, blocking is directly performed. The blocking can be aimed at all data included in the call request, namely returning null data to the logic processing layer; the method may also be to filter the data related to the call request, and return only readable data to the logic processing layer after blocking the private data.
It should be noted that the above type detection method is only an alternative embodiment of the type detection provided by the present invention, and in the application process, higher detection accuracy may be obtained by more other detection methods or a combination of multiple types of methods.
In some embodiments, the privacy data detection engine performing privacy detection on the target data comprises:
and the detection engine detects the content of the target data, judges that the target data contains private data under the condition that the target data comprises sensitive information, and blocks the sensitive information. The sensitive information is data content which accords with preset sensitive information judging conditions.
In this embodiment, the main purpose of content detection is to determine whether the target data contains preset data content that should not be returned to the logic processing layer. For example, the user corresponding to the host application where the applet is located includes an identification card number in its user information, and according to a preset privacy setting, its mobile phone number only allows to obtain the last 4 digits. In this embodiment, digits other than the last four digits in the identification card number belong to sensitive information, and if the digits are to be acquired, the sensitive information is required to be desensitized, for example, the sensitive information is hidden and replaced by a number, or only the last four digits are read in the reading process. When content detection is performed, it is necessary to determine whether or not the above-described sensitive information determination condition is satisfied for the target data, for example, all data of the mobile phone number is read, and the target data is regarded as including the privacy data. Alternatively, in some more specific embodiments, the sensitive information determination condition may be preset by a designer of the applet, or may be manually set by a user from the host application or the mobile terminal.
Similarly, in the case where the target data contains private data, blocking is performed. The blocking can be aimed at all data included in the call request, namely returning null data to the logic processing layer; the method may also be to filter the data related to the call request, and return only readable data to the logic processing layer after blocking the private data. Optionally, after blocking, the target data can be subjected to desensitization treatment by desensitization treatment, and the desensitized data is transferred to the logic processing layer.
In yet another embodiment of the present invention, another privacy data detection engine is provided for application to the communication layer of the applet architecture. Fig. 5 exemplarily shows a flow of steps performed by the private data detection engine according to another embodiment of the present invention, as shown in fig. 5, and the detection engine is configured to perform the following steps:
500: the detection engine responds to a call request sent by the logic processing layer when receiving a transmission request, and acquires data to be transmitted;
in some more specific embodiments, after the logic processing layer acquires the data and performs data processing, the data needs to be returned to the display layer and displayed to the user through the interactive interface. In this scenario, when the logic processing layer receives a request for sending data, an interface call request is typically sent to the communication layer of the applet, so that the data to be displayed is transferred to the display layer through the communication layer, and the communication layer obtains the data to be sent based on the call request. Unlike available small program frame, the privacy processing method of the present invention can not directly transmit the acquired data to be transmitted to the display layer, but transmit the data to be transmitted through the detection engine to perform privacy detection on the data to be transmitted.
In some embodiments, the private data detection engine includes a second interface for requesting access to an internet open interface service, and the call request issued in response to the logic processing layer receiving the send request is sent to the detection engine through the second interface.
510: the detection engine carries out privacy detection on the acquired data, and processes the data to be sent according to the privacy detection result;
520: the detection engine calls the communication layer interface to send the processed data to be sent through the communication layer interface.
In some embodiments, the privacy detection includes content detection, and the privacy data detection engine is configured to detect content of the target data, determine that the target data includes privacy data when the target data includes sensitive information, and perform privacy protection processing on the target data, where the sensitive information is data content that meets a preset sensitive information determination condition.
In this embodiment, the target data of privacy detection is mainly data to be sent to the page display layer for display. In this case, the data type of the data acquired from the mobile terminal is generally allowed to be acquired, and the logic processing layer may further process the data according to preset logic, so as to finally obtain target data that needs to be fed back to the page display layer, where when the target data flows through the applet communication framework, the detection engine performs content detection on the target data. The main purpose of content detection is to judge whether the target data contains sensitive information which is not suitable for being displayed on a page display layer. For example, the user information of the user corresponding to the host application where the applet is located contains an identification card number, and according to a preset privacy setting, the identification card number is 18 bits, and only a part of bits are allowed to be displayed when the mobile terminal interface is displayed. In this embodiment, the content of the identification card number is sensitive information, except for the allowed bit. If the information is to be displayed on the page display layer, the sensitive information can be further desensitized, for example, the sensitive information is hidden and replaced by a sign, and the output of the information to the display layer can be directly blocked. When content detection is performed, it is necessary to determine whether or not the target data for presentation has met the above-described display requirement, i.e., the sensitive information determination condition.
Alternatively, in some more specific embodiments, the sensitive information determination condition may be preset by a designer of the applet, or may be manually set by a user from the host application or the mobile terminal. The desensitization operation is not limited to the concealment or substitution of numbers or characters, but also includes various types of smearing or mosaic processing of private information in pictures.
In some embodiments, the detection engine is further configured to perform a desensitization operation or a blocking operation on the private data. In some more specific embodiments, the desensitization operation is performed when the private data is contained and is not desensitized or is not compliant. The desensitization operation corresponds to the type of the sensitive information and the sensitive information judgment condition. For example, for numbers or characters, numbers or characters on corresponding digits can be hidden according to desensitization requirements; for the picture, a masking pattern may be added to a portion of the picture that is not exposed for privacy protection or may be processed in a mosaic. In some more specific application scenarios, the privacy protection measures provided in the foregoing embodiments may be performed simultaneously or sequentially.
It should be noted that, in some specific application scenarios, the detection engine may include a first interface for accessing mobile end data and a second interface for accessing an internet open interface service, where the target data is transmitted through the first interface or the second interface. According to the privacy data processing detection engine provided by the invention, the detection engine of privacy data is added in the existing applet communication frame, the detection engine can also be used for packaging the original interface between the applet communication frame and the logic processing layer, the logic processing layer can not directly call the original interface of the applet frame, and only can call the interface provided by the detection engine, and the detection engine comprises the following steps: a set of APIs that provide the applet developer with access to data on the mobile side and a set of APIs that access openAPI services open on the internet. The interface detects data of the access mobile terminal and data returned when the openAPI service is opened on the internet, and privacy detection is performed.
According to the method, the privacy data detection engine provided by the invention can overcome the problems that most of the existing manual code audits aiming at the privacy security of the small program are easy to miss and the existing automatic code audit tools aiming at the privacy security cannot be used in the small program scene, can directly work on the framework of the small program operation, and can block the action of endangering the personal privacy in real time. Further, the method can be directly embedded into an applet framework, and the data reading behavior of a logic layer can be detected, so that the behavior of endangering personal privacy can be blocked in real time; the detection of the data returned to the page presentation layer can block the behavior of the desensitization of the privacy data in real time.
Another embodiment of the present invention also provides a private data processing system. FIG. 6 is a schematic diagram illustrating an architecture of a private data processing system according to an embodiment of the present invention, where the private data processing system includes a communication layer applied to an applet framework, and a logic processing layer in data communication with the communication layer, the communication layer further including a private data detection engine, the detection engine including a first interface (not separately shown) for accessing mobile side data, the logic processing layer in communication with the detection engine via the first interface, and the detection engine in communication with other interfaces of the communication layer via the communication layer interface, as shown in FIG. 6. The private data processing system may perform the steps of:
First, when the logic processing layer receives a data request, a calling request is sent to the detection engine through the first interface. Then, the detection engine calls the communication layer interface to acquire target data through the communication layer interface; then, the detection engine carries out privacy detection on the acquired target data, and processes the target data according to the detection result of the privacy data; and finally, the detection engine returns the processed target data to the logic processing layer.
In some embodiments, when the logic processing layer receives the data request, it sends a data call request to the communication layer of the applet to read the target data. The target data may be data obtained by a mobile terminal where a host application of an existing interface applet in the applet framework is located, and the data may be returned to the logic processing layer for further data processing. The host application is the APP where the applet is located, and the mobile terminal where the host application is located is the mobile device where the APP is installed, such as a mobile phone, a tablet, a personal computer, and even a device management apparatus. The manner in which the detection engine obtains the target data is not limited. In some embodiments, the detection engine may be added to all data streams of the communication framework to obtain target data to be transferred to the logic processing layer or the page presentation layer, and perform privacy detection on the target data.
In some embodiments, the private data detection engine includes a first interface for requesting access to mobile-side data, and a call request sent in response to the logic processing layer receiving the data request is sent to the detection engine through the first interface. In this embodiment, when the logic layer needs to request to access the mobile terminal data, the access cannot be obtained through the original applet communication layer interface, but is obtained through an interface provided by the detection engine. After the detection engine acquires the request, target data is acquired from the original communication interface of the applet, privacy detection is carried out, and then the target data is returned to the logic processing layer through the interface. In this way, the detection engine can perform private data detection on the data requested by all the logic processing layers from the mobile terminal, so as to perform data detection and processing.
In some embodiments, the detecting engine performing privacy detection on the target data includes performing type detection on the target data, and performing blocking processing on the target data in the case that the type of the target data is a preset privacy data type.
In this embodiment, whether the target data is private data is determined according to the data type of the target data. For example, the preset data types related to privacy include, but are not limited to, MAC address, device number, IP address, geographic location, address book information of the mobile terminal, etc., since these data may have a specific data type, or a specific field may be used to indicate the type of a certain data according to the definition of data standardization or structuring. By way of example, type detection may be performed by the format or type of the data itself, e.g., the MAC address is fixed to 48 bits; geographic location is composed of longitude and latitude; the IP address also has a standard data format, for example, the length of the ipv4 address is 32 bits, the range of address numbers of each segment is 0-255, the address length of the ipv6 address is 128 bits, etc. And detecting the target data according to the characteristics of the data, and judging that the target data comprises the privacy data under the condition that the composition characteristics of a certain section of data are detected to be in accordance with the type preset as the privacy data. Optionally, in other embodiments, according to the standard definition of the data in the interface, the device number may be indicated by the DeviceID, and if the obtained target data includes the data indicated by the field in the type detection process, the target data may be determined to include the device number, and if the device number is preset privacy data, the target data includes the privacy data. And in the case where the target data contains private data, blocking is directly performed. The blocking can be aimed at all data included in the call request, namely returning null data to the logic processing layer; the method may also be to filter the data related to the call request, and return only readable data to the logic processing layer after blocking the private data.
It should be noted that the above type detection method is only an alternative embodiment of the type detection provided by the present invention, and in the application process, higher detection accuracy may be obtained by more other detection methods or a combination of multiple types of methods.
In some implementations, the detection engine in the private data processing system is further configured to perform content detection on the target data, determine that the target data contains the private data when the target data includes the sensitive information, and perform blocking processing on the sensitive information, where the sensitive information is data content that meets a preset sensitive information determination condition.
In this embodiment, the main purpose of content detection is to determine whether the target data contains preset data content that should not be returned to the logic processing layer. For example, the user corresponding to the host application where the applet is located includes an identification card number in its user information, and according to a preset privacy setting, its mobile phone number only allows to obtain the last 4 digits. In this embodiment, digits other than the last four digits in the identification card number belong to sensitive information, and if the digits are to be acquired, the sensitive information is required to be desensitized, for example, the sensitive information is hidden and replaced by a number, or only the last four digits are read in the reading process. When content detection is performed, it is necessary to determine whether or not the above-described sensitive information determination condition is satisfied for the target data, for example, all data of the mobile phone number is read, and the target data is regarded as including the privacy data. Alternatively, in some more specific embodiments, the sensitive information determination condition may be preset by a designer of the applet, or may be manually set by a user from the host application or the mobile terminal.
Similarly, in the case where the target data contains private data, blocking is performed. The blocking can be aimed at all data included in the call request, namely returning null data to the logic processing layer; the method may also be to filter the data related to the call request, and return only readable data to the logic processing layer after blocking the private data. Optionally, after blocking, the target data can be subjected to desensitization treatment by desensitization treatment, and the desensitized data is transferred to the logic processing layer.
In some embodiments, the system further comprises a presentation layer, the detection engine further comprises a second interface for accessing an internet open interface service, the logic processing layer communicates with the detection engine through the second interface, and the detection engine communicates with other interfaces of the communication layer through the communication layer interface. When receiving the sending request, the logic processing layer sends a calling request to the detection engine through the second interface; the detection engine carries out privacy detection on the acquired data, and processes the data to be sent according to the privacy detection result; the detection engine calls the communication layer interface to send the processed data to be sent to the display layer through the communication layer interface.
In this embodiment, the communication framework in the private data processing system further includes a first interface for accessing mobile terminal data and a second interface for accessing an internet open interface service, and the target data is obtained through the first interface or the second interface. In this embodiment, according to the private data processing communication framework provided by the present invention, a detection engine for private data is added in an existing applet communication framework, and the detection engine is further configured to encapsulate an original interface between the applet communication framework and a logic processing layer, where the logic processing layer cannot directly call the original interface of the applet framework, and only can call the interface provided by the detection engine, and includes: a set of APIs that provide the applet developer with access to data on the mobile side and a set of APIs that access openAPI services open on the internet. The interface detects data of the access mobile terminal and data returned when the openAPI service is opened on the internet, and privacy detection is performed.
In some more specific embodiments, the private data processing system is further configured to perform content detection on the target data, determine that the target data contains the private data if the target data includes sensitive information, and perform privacy protection processing on the target data. The sensitive information is data content which accords with preset sensitive information judging conditions.
For an interface of an internet open service, the target data of privacy detection is mainly data which is used for being sent to a page display layer for display. In this case, the data type of the data acquired from the mobile terminal is generally allowed to be acquired, and the logic processing layer may further process the data according to preset logic, so as to finally obtain target data that needs to be fed back to the page display layer, where when the target data flows through the applet communication framework, the detection engine performs content detection on the target data. The main purpose of content detection is to judge whether the target data contains sensitive information which is not suitable for being displayed on a page display layer. For example, the user information of the user corresponding to the host application where the applet is located contains an identification card number, and according to a preset privacy setting, the identification card number is 18 bits, and only a part of bits are allowed to be displayed when the mobile terminal interface is displayed. In this embodiment, the content of the identification card number is sensitive information, except for the allowed bit. If the information is to be displayed on the page display layer, the sensitive information can be further desensitized, for example, the sensitive information is hidden and replaced by a sign, and the output of the information to the display layer can be directly blocked. When content detection is performed, it is necessary to determine whether or not the target data for presentation has met the above-described display requirement, i.e., the sensitive information determination condition.
Alternatively, in some more specific embodiments, the sensitive information determination condition may be preset by a designer of the applet, or may be manually set by a user from the host application or the mobile terminal. The desensitization operation is not limited to the concealment or substitution of numbers or characters, but also includes various types of smearing or mosaic processing of private information in pictures.
In some embodiments, the detection engine is further configured to perform a desensitization operation or a blocking operation on the private data. In some more specific embodiments, the desensitization operation is performed when the private data is contained and is not desensitized or is not compliant. The desensitization operation corresponds to the type of the sensitive information and the sensitive information judgment condition. For example, for numbers or characters, numbers or characters on corresponding digits can be hidden according to desensitization requirements; for the picture, a masking pattern may be added to a portion of the picture that is not exposed for privacy protection or may be processed in a mosaic. In some more specific application scenarios, the privacy protection measures provided in the foregoing embodiments may be performed simultaneously or sequentially.
According to the method, the privacy data processing system provided by the invention can overcome the problems that most of the existing manual code audits aiming at the privacy security of the small program are easy to miss and the existing automatic code audit tools aiming at the privacy security cannot be used in the small program scene, can directly work on the framework of the small program operation, and can block the action of endangering the personal privacy in real time. Further, the method can be directly embedded into an applet framework, and the data reading behavior of a logic layer can be detected, so that the behavior of endangering personal privacy can be blocked in real time; the detection of the data returned to the page presentation layer can block the behavior of the desensitization of the privacy data in real time.
It should be noted that the above-mentioned embodiments are merely examples of the present invention, and it is obvious that the present invention is not limited to the above-mentioned embodiments, and many similar variations are possible. All modifications attainable or obvious from the present disclosure set forth herein should be deemed to be within the scope of the present disclosure.