Privacy switch test method, apparatus, device, and storage medium
Patent Information
- Application Number
- CN202311467053.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-06
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-11-06
AI Technical Summary
[0002]基于现在国家监管机构,对于智能化汽车的数据安全要求越来越严格,车内任何传感器与应用的交互过程中,如果涉及用户的隐私信息,需要通过设置隐私开关来控制车内智能座舱采集用户信息的权限,并起到告知用户的目的,但是往往在智能座舱的OTA(Over-the-Air Technology,空中下载技术)应用迭代中,有一些新增的应用涉及敏感数据采集,但工程师会存在忘记给新增的应用添加隐私开关,或隐私开关调用传感器的逻辑代码失效或错误的问题,导致智能座舱非法采集用户信息,一旦被国家监管单位查到车机存在此问题,或用户投诉,会产生对品牌极大的不良影响
[0009] In this embodiment, automated scenario simulation can quickly and accurately verify the functionality and performance of the cockpit privacy switch. Compared to manual testing, automated testing can execute test cases faster, saving time and manpower costs. Through customized and intelligent scenario simulation, the system can simulate various application scenarios and user behaviors, comprehensively testing different functions and logic of the privacy switch, thereby improving test coverage. The automated scenario simulation system can detect and discover potential problems with the privacy switch. Through automated test execution and continuous testing processes, the stability and reliability of the privacy switch can be ensured, which helps to identify and resolve problems in advance, reducing privacy leaks and data security risks.
Smart Images

Figure CN117520158B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive electronics technology, and in particular to a method, apparatus, device, and storage medium for testing privacy switches. Background Technology
[0002] Given the increasingly stringent data security requirements of national regulatory agencies for intelligent vehicles, any interaction between in-vehicle sensors and applications involving user privacy information requires the use of privacy switches to control the in-vehicle smart cockpit's access to collect user information and to inform the user. However, during the OTA (Over-the-Air Technology) application iterations of smart cockpits, some new applications involve sensitive data collection. Engineers may forget to add privacy switches to these new applications, or the logic code for the privacy switch to call the sensors may be malfunctioning or incorrect, leading to the smart cockpit illegally collecting user information. If national regulatory agencies discover this problem in the vehicle's infotainment system, or if users file complaints, it will have a significant negative impact on the brand. Summary of the Invention
[0003] Based on the above problems, embodiments of this application provide a privacy switch testing method, apparatus, device, and storage medium.
[0004] The technical solution provided in this application is as follows:
[0005] This application first provides a privacy switch testing method, the method comprising: obtaining a generated test case set; each test case in the test case set having test parameters corresponding to at least one application scenario; wherein, the test parameters include privacy information and the privacy switch status of the application collecting the privacy information, the privacy switch being used to control the application's permission to collect user privacy information; generating a test script based on the test case set; and executing the test script to obtain the test result of the privacy switch.
[0006] This application embodiment also provides a privacy switch testing device, the device comprising: a first acquisition module, configured to acquire a generated test case set; each test case in the test case set corresponds to at least one application scenario in terms of test parameters; wherein, the test parameters include privacy information and the privacy switch status of the application collecting the privacy information, the privacy switch being used to control the application's permission to collect user privacy information; a first generation module, configured to generate a test script based on the test case set; and an execution module, configured to execute the test script to obtain the test result of the privacy switch.
[0007] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the steps in the privacy switch testing method described in this application.
[0008] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the privacy switch testing method described in this application.
[0009] In this embodiment, automated scenario simulation can quickly and accurately verify the functionality and performance of the cockpit privacy switch. Compared to manual testing, automated testing can execute test cases faster, saving time and manpower costs. Through customized and intelligent scenario simulation, the system can simulate various application scenarios and user behaviors, comprehensively testing different functions and logic of the privacy switch, thereby improving test coverage. The automated scenario simulation system can detect and discover potential problems with the privacy switch. Through automated test execution and continuous testing processes, the stability and reliability of the privacy switch can be ensured, which helps to identify and resolve problems in advance, reducing privacy leaks and data security risks. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating a privacy switch testing method according to an embodiment of this application;
[0011] Figure 2 This is a flowchart illustrating another privacy switch testing method according to an embodiment of this application;
[0012] Figure 3 This is a flowchart illustrating another privacy switch testing method according to an embodiment of this application;
[0013] Figure 4 This is a flowchart illustrating another privacy switch testing method according to an embodiment of this application;
[0014] Figure 5 A flowchart illustrating a privacy switch testing method is also provided as an embodiment of this application.
[0015] Figure 6 A flowchart illustrating a privacy switch testing method is also provided as an embodiment of this application.
[0016] Figure 7 A flowchart illustrating a privacy switch testing method is also provided as an embodiment of this application.
[0017] Figure 8 This is a schematic diagram of the composition structure of a privacy switch testing device according to an embodiment of this application;
[0018] Figure 9This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0019] In smart cockpit applications, some possible issues with privacy switches, such as malfunctions or bugs, include:
[0020] Forgot to add privacy switch: During development, engineers may neglect to add privacy switch to newly added applications or features, resulting in the unauthorized collection of user information without control or notification to users.
[0021] Privacy switch logic error: Engineers may make mistakes that cause problems with the privacy switch logic, making it impossible to properly control the interaction between the sensor and the application, resulting in the unauthorized collection of users' private information.
[0022] OTA application update issues: During the OTA application update process, due to the complexity of cockpit hardware and software, engineers may neglect or incorrectly update the privacy switch-related code, causing the privacy switch to malfunction or encounter bugs.
[0023] Security vulnerabilities may be exploited: Hackers or malicious users may exploit security vulnerabilities to bypass privacy switches and illegally collect users' private information.
[0024] To avoid the adverse effects of the above situations, especially during the OTA iteration process of intelligent vehicle intelligent cockpits, there is an urgent need for an intelligent cockpit privacy switch testing system based on automated scenario simulation in the OTA application testing process. This system ensures the correctness of the privacy switch's function and logic, and provides comprehensive test coverage of preceding scenarios. It should also monitor the privacy switch's operational status during scenario-based testing and promptly respond and alert when anomalies are detected. Furthermore, the system needs to be integrated with known privacy switch vulnerability scanning to promptly identify and resolve potential security issues, preventing exploitation by hackers and attackers.
[0025] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0026] Figure 1 This is a flowchart illustrating a privacy switch testing method according to an embodiment of this application. The method is applied to a privacy switch testing system for automobiles, such as... Figure 1 As shown, the method includes the following steps:
[0027] Step 102: Obtain the generated test case set; the test parameters of each test case in the test case set correspond to at least one application scenario;
[0028] The test parameters include privacy information and the status of the privacy switch of the application that collects the privacy information. The privacy switch is used to control the application's permission to collect user privacy information.
[0029] Each test case may include elements such as test environment, test case number, test case title, test case level, preconditions, test input (i.e. test parameters), test steps, and expected results. The expected results are used to compare with the actual test results. If they are the same, the test case passes; otherwise, the test case fails.
[0030] The application's privacy switch includes an on state and an off state. When the application's privacy switch is on, the application does not have the permission to collect privacy information. When the application's privacy switch is off, the application has the permission to collect privacy information.
[0031] Step 104: Generate test scripts based on the test case set;
[0032] Specifically, test scripts for each test case can be generated based on the step attributes and test parameters of each test step in each test case. The step attributes can include the execution order of the test steps.
[0033] Step 106: Execute the test script to obtain the test results of the privacy switch.
[0034] This involves using automated testing tools and scripts to execute simulated application scenarios in a test environment, simulating user input and other cockpit interactions to trigger the privacy switch's functions and logic. These application scenarios are related to the application. The status and behavior of the privacy switch are monitored, including determining whether the collection and use permissions for privacy information are correctly invoked, and relevant data is recorded. Based on the test results of the automated testing, data analysis and evaluation are performed. The results also determine whether there are any problems with the privacy switch when collecting privacy information, such as whether there is a risk of privacy leakage or whether the access control is accurate.
[0035] In this embodiment, automated scenario simulation can quickly and accurately verify the functionality and performance of the cockpit privacy switch. Compared to manual testing, automated testing can execute test cases faster, saving time and manpower costs. Through customized and intelligent scenario simulation, the system can simulate various application scenarios and user behaviors, comprehensively testing different functions and logic of the privacy switch, thereby improving test coverage. The automated scenario simulation system can detect and discover potential problems with the privacy switch. Through automated test execution and continuous testing processes, the stability and reliability of the privacy switch can be ensured, which helps to identify and resolve problems in advance, reducing privacy leaks and data security risks.
[0036] In some embodiments, such as Figure 2 As shown, the method further includes the following steps:
[0037] Step 1011: Obtain at least one type of privacy information;
[0038] Step 1012: Based on each of the privacy information provided, generate at least one application scenario for the application.
[0039] Among them, the privacy switch testing system can provide a scenario simulator, which can customize various application scenarios to verify the functionality and performance of the privacy switch in the smart cockpit under various application scenarios. The privacy switch testing system can intelligently generate simulated application scenarios, and restore real cockpit application scenarios by simulating user behavior, cockpit device interaction and other factors, so as to fully verify the functionality of the privacy switch.
[0040] Step 1013: Define the state of the privacy switch for the application in each of the aforementioned application scenarios;
[0041] Specifically, different states of the privacy switch for each application scenario can be defined to determine whether the collection and use permissions for privacy information are correctly invoked in different states, thereby determining whether the privacy switch is functioning normally. If the application can still collect or use privacy information when the privacy switch is on, or if the application cannot collect or use privacy information when the privacy switch is off, then it can be determined that the privacy switch is malfunctioning.
[0042] Step 1014: Generate the test case set based on the at least one application scenario, the state of the privacy switch in each application scenario, and the expected result.
[0043] The test parameters can also be various abnormal data, so that the privacy switch test system can simulate various abnormal situations, such as malicious program attacks and unauthorized access, to verify the privacy switch's reaction and protection capabilities under abnormal conditions.
[0044] In one embodiment, the Sonic framework can be used to write automated test cases to simulate user input or cockpit interaction and trigger the privacy switch functionality and logic. Sonic's API (Application Programming Interface) can be used to simulate user clicks, text input, and other operations.
[0045] The following is a sample script written using the Sonic framework to simulate user input or cockpit interaction and trigger the privacy switch functionality and logic. In this sample script, the required Sonic library and timing module are first imported, then a Sonic instance is created, and next, a test case function named "test_scenario" is defined to simulate user actions on the cockpit device.
[0046] In test cases, Sonic's APIs, such as "click" and "input," can be used to simulate user clicks and text input. First, the cockpit device page can be opened, simulating a user login. Then, the user can be simulated selecting a seat and enabling the privacy switch. Next, the user can be simulated triggering privacy switch functions, such as facial recognition. Finally, the user can be simulated disabling the privacy switch, and assertions can be used to verify whether the switch was successfully turned off.
[0047] When generating test cases, the "test_scenario" function can be called to perform automated scenario simulation. Sonic will automatically simulate user operations and trigger the privacy switch function and logic on the cockpit equipment. In actual testing, this test script can be modified and extended according to specific application scenarios and requirements.
[0048] It should be noted that the selectors in the example script (such as "#login-button" and "#username-input") can be defined according to the specific cockpit device page structure. The privacy switch testing system needs to be named and modified accordingly in advance based on the structure of the cockpit device page and the element selectors.
[0049]
[0050]
[0051] After the test cases are written, automated test scripts can be created, which can simulate user input and cockpit interaction through code; for example, clicking buttons on the cockpit interface, touch screen operation, and text input.
[0052] Taking facial information as an example of privacy information, facial information can be simulated after creating a test script: prepare appropriate facial data, including facial images under normal and abnormal conditions, and use these facial images in the test script to simulate the facial acquisition process of the cockpit equipment.
[0053] After simulating facial information, the state and operation of the privacy switch can be controlled within the test script. The switch's on / off state or access control can be controlled by calling relevant APIs or manipulating the cockpit device's configuration file.
[0054] After controlling the state and operation of the privacy switch, an automated test script can be executed to simulate user input and cockpit interaction, triggering the privacy switch's functions and logic. This process will automatically execute the test script in the test environment and record the relevant operations and results.
[0055] During automated testing, the status and behavior of the privacy switch can be monitored, and logs and output information generated during the test can be recorded, including whether the privacy switch responds and the response behavior.
[0056] Through the above steps, the system can perform automated scenario simulations, mimicking user input or cockpit interactions to trigger the privacy switch's functionality and logic. This allows for comprehensive testing of the privacy switch's behavior and performance, including aspects such as facial data collection, access control, and privacy protection, ensuring its proper functioning and compliance with relevant data compliance requirements.
[0057] In this embodiment of the application, at least one application scenario can be generated based on at least one piece of privacy information obtained, and a predefined set of test cases can be automatically generated based on the application scenario and the state of the privacy switch in the application scenario to monitor the function and performance of the privacy switch, thereby improving testing efficiency and accuracy.
[0058] In some embodiments, such as Figure 3 As shown, the privacy information includes at least one of location information, user input information, user voice information, and image information. Step 1012, "Generating at least one application scenario for an application based on each piece of privacy information," includes the following steps:
[0059] Step 10121: Based on the location information, generate map application scenarios, intelligent driving application scenarios, and weather application scenarios;
[0060] Application scenarios can be generated based on the type of privacy information. In the case that the privacy information is location information, the vehicle's cockpit equipment may record and upload the vehicle's real-time location information, driving trajectory, etc. The application scenarios related to the location information may include map application scenarios corresponding to map applications, intelligent driving application scenarios corresponding to intelligent driving applications, and weather application scenarios corresponding to weather applications.
[0061] Step 10122: Generate user behavior application scenarios based on the user input information;
[0062] The user input information may be the user's touch information or the text information entered. When the privacy information is user input information, the application scenarios involved in the user input information may include user behavior application scenarios corresponding to applications that require user input information (such as social communication applications and office applications).
[0063] Step 10123: Generate a voice interaction application scenario based on the user's voice information;
[0064] When the privacy information is user voice information, the vehicle's voice assistant needs to obtain the user's voice commands for voice recognition and control; the application scenarios involving the user voice information may include voice interaction application scenarios corresponding to artificial intelligence applications.
[0065] Step 10124: Generate a monitoring application scenario based on the image information.
[0066] The image information includes picture information and video information. When the privacy information is image information, the image information can be identified for monitoring and recording the situation inside and outside the vehicle. The application scenarios involved in the image information can include monitoring application scenarios corresponding to image recognition applications.
[0067] In this embodiment of the application, by simulating various application scenarios and user behaviors based on multiple types of privacy information, different functions and logics of the privacy switch can be tested in different application scenarios, thereby improving the coverage of the test.
[0068] In some embodiments, such as Figure 4 As shown, the image information includes environmental information and facial information, and the monitoring application scenarios include environmental monitoring application scenarios, care application scenarios, identity recognition application scenarios, and status monitoring application scenarios. Step 10124, "Generate a monitoring application scenario based on the image information," includes the following steps:
[0069] Step 101241: Based on the environmental information, generate an environmental monitoring application scenario and a care application scenario. The environmental monitoring information is used to monitor the environmental safety inside and around the car, and the care application scenario is used to care for target objects inside the car.
[0070] Step 101242: Based on the facial information, generate an identity recognition application scenario and a status monitoring application scenario. The identity recognition application scenario is used to identify the driver's identity for facial payment, or to determine the navigation route, seat position and in-vehicle temperature based on the driver's preferences. The status monitoring application scenario is used to monitor the driver's status.
[0071] The environmental information can include information about the vehicle's interior and surrounding environment. The facial information can include facial images under normal and abnormal conditions, and can use real facial data or generate virtual facial data to simulate different test scenarios. The target object can be vulnerable groups such as the elderly or children. The vehicle's cabin equipment can collect real-time image information of the vehicle's interior and surrounding environment through the vehicle's built-in camera. For example, the vehicle's driving recorder needs to acquire image information of the vehicle's interior or surrounding environment. The application scenarios involved can include in-vehicle care functions for caring for the elderly or children, and can also include a sentry mode for monitoring the vehicle's interior and surrounding environment to prevent the vehicle from being scratched.
[0072] The cockpit system can use facial recognition for security, monitoring, and personalization. For example, it can identify the driver and monitor their condition, such as whether they are drowsy or distracted. Based on facial recognition, the system can provide customized navigation routes, seat positions, and in-vehicle temperature control according to the driver's personal settings and preferences. It can also unlock seats and make payments via facial recognition.
[0073] In this embodiment of the application, corresponding application scenarios are generated by classifying image information, which can further simulate various application scenarios and user behaviors. This allows for testing different functions and logic of the privacy switch in different application scenarios, thereby improving the coverage of the test.
[0074] In some embodiments, such as Figure 5 As shown, step 106, "Execute the test script to obtain the test results of the privacy switch," includes the following steps:
[0075] Step 1061: Identify the code segment in the test script that is set to collect the privacy information;
[0076] The following is an example code snippet for setting up location information collection:
[0077]
[0078]
[0079] In the example script, first, a global variable "vehicle_location_used" is defined to indicate whether the code for retrieving vehicle location information was called. Then, a decorator function "track_function_calls" is defined to extend the functionality of the decorated function. Within the decorator function, the call stack of the called function can be obtained using the "inspect" module. The frame information in the call stack is traversed to check if the function for retrieving vehicle location information was called. If the function was called, the flag "vehicle_location_used" is set to "True".
[0080] Next, we can define two example application functions, "app1" and "app2". These application functions are extended with the decorator "@track_function_calls" so that they can automatically recognize calls to functions that retrieve vehicle location information during execution. Finally, we execute the example application functions and check the value of the "vehicle_location_used" flag to determine if a function for retrieving vehicle location information was called.
[0081] The following is an example code snippet for identifying applications that call vehicle location information by monitoring function calls:
[0082]
[0083]
[0084]
[0085] Step 1063: Check the status of the privacy switch in the call path;
[0086] Step 1064: Based on the call details and the status of the privacy switch, determine the test result of the privacy switch.
[0087] Based on the system's ability to automatically identify the calls to privacy data made by newly added application code or function code during each OTA process, the system then checks whether a privacy switch has been added to these call paths and whether the privacy switch is effective.
[0088] In this embodiment of the application, the test result of the privacy switch can be determined by identifying the code segment containing the privacy information, the application's calls to the privacy information, and the state of the privacy switch, thereby enabling a more accurate determination of the test result of the privacy switch.
[0089] In some embodiments, the test results of the privacy switch include valid and invalid, where invalid includes not adding the privacy switch, a logic code error in the privacy switch, and other code errors in the privacy switch; such as Figure 6 As shown, step 1064, "Based on the invocation situation and the state of the privacy switch, determine the test result of the privacy switch," includes the following steps:
[0090] Step 10641: If the privacy switch is in the state of "no privacy switch added", determine that the test result of the privacy switch is that the application has not added the privacy switch;
[0091] Step 10642: If the privacy switch is in the state of "Add Privacy Switch" and the logic code of the privacy switch is incorrect, and the call status is "Successful Call", then determine that the test result of the privacy switch is that the logic code of the privacy switch is incorrect.
[0092] Step 10643: If the privacy switch is in the state of "Add Privacy Switch" and the privacy switch has other code errors, and the call status is "Successful Call", then determine that the test result of the privacy switch is "Other code errors of the privacy switch", and the other code errors are other code in the privacy switch code other than logic code.
[0093] In this embodiment, the state of the privacy switch can more accurately determine the type of failure of the privacy switch, such as a missing privacy switch, a logic error, or a security vulnerability. This helps to identify and resolve problems in advance, reducing the risk of privacy leaks and data security breaches.
[0094] In some embodiments, such as Figure 7 As shown, the method further includes the following steps:
[0095] Step 107: Based on the test results, generate a test report, which includes the application scenario and test results;
[0096] Step 108: If the test report indicates that the privacy switch is malfunctioning, repair the privacy switch, or provide feedback on the malfunction type of the privacy switch to the developers for repair.
[0097] The privacy switch testing system analyzes the test results and generates detailed test reports, which may include test scenarios, test results, performance statistics, etc., helping developers evaluate the performance and risks of the cockpit privacy switch, identify potential problems, and promptly address them. This helps ensure that the privacy switch operates as expected, correctly controls data collection and access permissions, and complies with relevant data compliance regulations and policies. The automated scenario simulation-based smart cockpit privacy switch testing system helps developers comprehensively verify the functionality and security of the cockpit privacy switch and discover potential problems and risks. It improves testing efficiency and coverage, reduces labor costs, and ensures the normal operation of the smart cockpit privacy switch and the secure protection of user data.
[0098] In this embodiment, based on the test results, the system can generate detailed test reports and provide test metrics and performance statistics. These reports and analyses help the development team evaluate the functionality and performance of the privacy switch and make timely optimizations and improvements.
[0099] In this embodiment of the application, the intelligent cockpit privacy switch testing system based on automated scenario simulation can:
[0100] Improve testing efficiency: Automated scenario simulation can quickly and accurately verify the functionality and performance of the cockpit privacy switch. Compared to manual testing, automated testing can execute test cases faster, saving time and manpower costs.
[0101] Increased test coverage: Through customized and intelligent scenario simulation, the system can simulate various application scenarios and user behaviors to comprehensively test the different functions and logic of the privacy switch, thereby increasing the test coverage.
[0102] Discovering potential issues: Automated scenario simulation systems can detect and identify potential problems with privacy switches, such as missing privacy switches, logic errors, and security vulnerabilities. This helps to identify and resolve issues early, reducing the risk of privacy leaks and data security breaches.
[0103] Enhanced reliability and stability: Automated test execution and continuous testing processes ensure the stability and reliability of the privacy switch. The system helps developers debug and fix issues promptly, ensuring the privacy switch functions as expected.
[0104] Provides test reports and analysis: Based on the test results, the system can generate detailed test reports and provide test metrics and performance statistics. These reports and analyses help the development team evaluate the functionality and performance of the privacy switch and make timely optimizations and improvements.
[0105] Mitigating Data Compliance Risks: Automated scenario simulation testing systems can mitigate data compliance risks caused by privacy switch malfunctions or bugs. By promptly identifying and fixing privacy switch issues, enterprises can ensure compliance with relevant data protection regulations and policies, avoiding unnecessary legal and brand reputation risks.
[0106] The intelligent cockpit privacy switch testing system based on automated scenario simulation provides an efficient and comprehensive testing solution that can help companies improve product quality, enhance security and compliance, and increase user trust and satisfaction.
[0107] It should be noted that, in the embodiments of this application, if the above-mentioned privacy switch testing method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a mobile phone, tablet computer, desktop computer, personal digital assistant, navigator, digital phone, video phone, television, sensing device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0108] Figure 8 This is a schematic diagram of the composition structure of a privacy switch testing device according to an embodiment of this application, as shown below. Figure 8 As shown, the device 800 includes: a first acquisition module 801, a first generation module 802, and an execution module 803, wherein:
[0109] The first acquisition module 801 is used to acquire the generated test case set; the test parameters of each test case in the test case set correspond to at least one application scenario.
[0110] The test parameters include privacy information and the status of the privacy switch of the application that collects the privacy information. The privacy switch is used to control the application's permission to collect user privacy information.
[0111] The first generation module 802 is used to generate test scripts based on the test case set;
[0112] The execution module 803 is used to execute the test script and obtain the test results of the privacy switch.
[0113] In some embodiments, the apparatus further includes:
[0114] The second acquisition module is used to acquire at least one type of privacy information;
[0115] The second generation module is used to generate at least one application scenario for an application based on each of the privacy information provided.
[0116] The definition module is used to define the state of the privacy switch of the application in each of the aforementioned application scenarios;
[0117] The third generation module is used to generate the test case set based on the at least one application scenario, the state of the privacy switch in each application scenario, and the expected result.
[0118] In some embodiments, the privacy information includes at least one of location information, user input information, user voice information, and image information. The second generation module includes: a first generation submodule, configured to generate a map application scenario, an intelligent driving application scenario, and a weather application scenario based on the location information; a second generation submodule, configured to generate a user behavior application scenario based on the user input information; a third generation submodule, configured to generate a voice interaction application scenario based on the user voice information; and a fourth generation submodule, configured to generate a monitoring application scenario based on the image information.
[0119] In some embodiments, the image information includes environmental information and facial information, and the monitoring application scenarios include environmental monitoring application scenarios, care application scenarios, identity recognition application scenarios, and status monitoring application scenarios. The fourth generation submodule includes a first generation unit, used to generate an environmental monitoring application scenario and the care application scenario based on the environmental information. The environmental monitoring information is used to monitor the environmental safety inside and around the vehicle, and the care application scenario is used to care for target objects inside the vehicle. A second generation unit is used to generate an identity recognition application scenario and a status monitoring application scenario based on the facial information. The identity recognition application scenario is used to identify the driver for facial payment or to determine navigation routes, seat positions, and in-vehicle temperatures based on the driver's preferences. The status monitoring application scenario is used to monitor the driver's status.
[0120] In some embodiments, the execution module 803 includes: a first identification submodule for identifying the code segment in the test script that is set to collect the privacy information; a second identification submodule for identifying the application's call to the privacy information; a detection submodule for detecting the state of the privacy switch in the call path; and a determination submodule for determining the test result of the privacy switch based on the call situation and the state of the privacy switch.
[0121] In some embodiments, the test result of the privacy switch includes valid and invalid, and the invalidity risk includes not adding the privacy switch, a logic code error in the privacy switch, and other code errors in the privacy switch; the determining submodule includes: a first determining unit, configured to determine that the test result of the privacy switch is that the application has not added the privacy switch when the privacy switch is in a state of not adding the privacy switch; a second determining unit, configured to determine that the test result of the privacy switch is a logic code error in the privacy switch when the privacy switch is in a state of adding the privacy switch, the logic code of the privacy switch has an error, and the call status is a successful call; a third determining unit, configured to determine that the test result of the privacy switch is other code errors in the privacy switch when the privacy switch is in a state of adding the privacy switch, the privacy switch has other code errors, and the call status is a successful call, wherein the other code errors are other code in the privacy switch code besides the logic code.
[0122] In some embodiments, the apparatus further includes: a fourth generation module, configured to generate a test report based on the test results, the test report including application scenarios and test results; and a repair module, configured to repair the privacy switch if the test report indicates that the privacy switch is invalid, or to feed back the invalidity type of the privacy switch to the developers for repair.
[0123] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0124] Based on the foregoing embodiments, this application also provides an electronic device. Figure 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application, such as... Figure 9 As shown, the hardware entity of the device 900 includes a memory 901 and a processor 902. The memory 901 stores a computer program that can run on the processor 902. When the processor 902 executes the program, it implements the steps in the privacy switch testing method in the above embodiments.
[0125] The memory 901 is configured to store instructions and applications executable by the processor 902, and can also cache data to be processed or already processed by the processor 902 and the various modules in the device 900 (e.g., image data, audio data, voice communication data and video communication data), which can be implemented by flash memory or random access memory (RAM).
[0126] Based on the foregoing embodiments, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor of an electronic device, can implement the privacy switch testing method provided in any of the preceding embodiments.
[0127] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0128] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict.
[0129] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0130] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0131] It should be noted that the aforementioned computer-readable storage media can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; or it can be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0132] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0133] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware nodes. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0135] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0136] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0137] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0138] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for testing a privacy switch, characterized in that, The method includes: Obtain at least one type of privacy information; generate at least one application scenario for an application based on each type of privacy information; define the privacy switch status of the application under each application scenario; generate a set of test cases based on the at least one application scenario, the privacy switch status under each application scenario, and the expected results. Obtain the generated test case set; the test parameters of each test case in the test case set correspond to at least one application scenario; wherein, the test parameters include privacy information and the state of the privacy switch of the application that collects the privacy information, the privacy switch being used to control the permission of the application to collect user privacy information; Based on the aforementioned test case set, test scripts are generated; Identify the code segment in the test script that is set to collect the privacy information; identify the application's call to the privacy information; detect the status of the privacy switch in the call path; determine the test result of the privacy switch based on the call situation and the status of the privacy switch; wherein, the test result of the privacy switch includes valid and invalid, and invalid includes not adding the privacy switch, logical code error of the privacy switch, and other code error of the privacy switch.
2. The method according to claim 1, characterized in that, The privacy information includes at least one of location information, user input information, user voice information, and image information. The generation of at least one application scenario based on each piece of privacy information includes: Based on the location information, map application scenarios, intelligent driving application scenarios, and weather application scenarios are generated. Based on the user input information, user behavior application scenarios are generated; Based on the user's voice information, a voice interaction application scenario is generated; Based on the image information, a monitoring application scenario is generated.
3. The method according to claim 2, wherein, The image information includes environmental information and facial information; the monitoring application scenarios include environmental monitoring, caregiving, identity recognition, and status monitoring; and generating monitoring application scenarios based on the image information includes: Based on the environmental information, an environmental monitoring application scenario and a care application scenario are generated. The environmental information is used to monitor the environmental safety inside and around the vehicle, and the care application scenario is used to care for target objects inside the vehicle. Based on the facial information, an identity recognition application scenario and a status monitoring application scenario are generated. The identity recognition application scenario is used to identify the driver's identity for facial payment, or to determine the navigation route, seat position, and in-vehicle temperature based on the driver's preferences. The status monitoring application scenario is used to monitor the driver's status.
4. The method according to claim 1, characterized in that, The determination of the test result of the privacy switch based on the invocation situation and the state of the privacy switch includes: If the privacy switch is in the state of "no privacy switch added", the test result of the privacy switch is determined to be that the application has not added the privacy switch. If the privacy switch is in the state of "Add Privacy Switch" and the logic code of the privacy switch is incorrect, and the call is successful, then the test result of the privacy switch is determined to be that the logic code of the privacy switch is incorrect. If the privacy switch is in the state of "Add Privacy Switch" and there is an "Other Code Error" with the privacy switch, and the call is successful, then the test result of the privacy switch is determined to be an "Other Code Error" with the privacy switch. The "Other Code Error" refers to other code in the privacy switch's code besides the logic code.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Based on the test results, a test report is generated, which includes the application scenario and test results; If the test report indicates that the privacy switch is invalid, the privacy switch shall be repaired, or the invalidity type of the privacy switch shall be reported back to the developers for repair.
6. A privacy switch testing device, characterized in that, The device includes: The first acquisition module is used to acquire at least one type of privacy information; generate at least one application scenario based on each type of privacy information; define the privacy switch status of the application under each application scenario; generate a test case set based on the at least one application scenario, the privacy switch status under each application scenario, and the expected result; acquire the generated test case set; the test parameters of each test case in the test case set correspond to at least one application scenario. The test parameters include privacy information and the status of the privacy switch of the application that collects the privacy information. The privacy switch is used to control the application's permission to collect user privacy information. The first generation module is used to generate test scripts based on the test case set; The execution module is used to identify the code segment in the test script that is set to collect the privacy information; identify the application's call to the privacy information; detect the status of the privacy switch in the call path; and determine the test result of the privacy switch based on the call situation and the status of the privacy switch; wherein the test result of the privacy switch includes valid and invalid, and invalid includes not adding the privacy switch, logical code error of the privacy switch, and other code error of the privacy switch.
7. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the privacy switch testing method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the privacy switch testing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Privacy compliance detection method and device, server, terminal and storage medium
CN115146309A
Database system for protecting and securing stored data using a privacy switch
US20180150647A1