A crawler identification method and device, a vehicle, and a readable storage medium
By identifying and blocking web crawler requests on the vehicle's infotainment system, the server load pressure caused by web crawlers was resolved, ensuring smooth data access and privacy security for legitimate users.
Patent Information
- Application Number
- CN202411738382.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-11-29
AI Technical Summary
Frequent access to the server by web crawlers can cause excessive server load, reducing the smoothness of data retrieval for normal users.
On the vehicle side, by obtaining the vehicle's system data and application data, it identifies whether the data request is a crawler request, and intercepts the request if it is determined to be a crawler request, thereby reducing the frequency of sending crawler requests.
This effectively reduces the load on the server, ensures smooth data access for normal users, and prevents web crawlers from maliciously obtaining private information.
Smart Images

Figure CN119363475B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and more particularly, to a crawler identification method and device, a vehicle, and a readable storage medium in the technical field of computers. BACKGROUND
[0002] A web crawler is a computer program that finds web pages through the link addresses of the web pages and automatically acquires the contents of the web pages according to certain rules. Since the web crawler does not need to render the pages, but only needs to acquire the file contents and the uniform resource locators (URLs) in the files, the web crawler can access the server at a very high frequency, which makes the load pressure of the server larger, thereby reducing the fluency of the normal users in acquiring data.
[0003] Therefore, how to reduce the load pressure of the server is a problem that needs to be solved at present. SUMMARY
[0004] The present application provides a crawler identification method and device, a vehicle, and a readable storage medium, which can identify and intercept web crawler requests, thereby reducing the access frequency of the web crawler requests and reducing the load pressure of the server.
[0005] In a first aspect, a crawler identification method is provided, which is applied to a vehicle machine end. The method comprises: in response to a data request sent by a vehicle machine application to a server, acquiring system data of a vehicle machine system and / or application data of the vehicle machine application; identifying whether the data request is a crawler request according to the system data of the vehicle machine system and / or the application data of the vehicle machine application; and in a case where it is determined that the data request is a crawler request, intercepting the data request so that the data request is not sent to the server.
[0006] In the above technical solution, the present application provides a crawler identification method: the vehicle machine end can acquire the system data of the vehicle machine system and / or the application data of the vehicle machine application in response to the data request sent by the vehicle machine application to the server, and identify whether the data request is a crawler request according to the system data of the vehicle machine system and / or the application data of the vehicle machine application. Since the present application determines that the data request is a crawler request in the case of the vehicle machine end, the data request is intercepted, so that the number of times of sending the crawler request to the server can be effectively reduced, thereby reducing the load pressure of the server, and further ensuring the fluency of the normal users (which can also be understood as non-crawler users) in acquiring data from the server, and effectively avoiding the case where the private information of the normal users is maliciously acquired by the crawler users.
[0007] In a possible implementation manner of the first aspect, the system data of the vehicle infotainment system and / or the application data of the vehicle infotainment application are used to determine whether the data request is a crawler request, including: obtaining at least one data combination according to the system data of the vehicle infotainment system and / or the application data of the vehicle infotainment application, the data combination including at least one data; and determining whether the data request is a crawler request according to the at least one data combination and a corresponding preset condition.
[0008] In the above technical solution, the system data of the vehicle infotainment system and / or the application data of the vehicle infotainment application are used to obtain at least one data combination, and the at least one data combination and a corresponding preset condition are used to determine whether the data request is a crawler request. Since each data combination has a corresponding preset condition, the accuracy of crawler identification of the data request can be ensured.
[0009] In a possible implementation manner of the first aspect, the system data of the vehicle infotainment system includes at least one of a number of account switches of the infotainment system, at least one first attribute value of the infotainment system, and at least one second attribute value of the vehicle, the first attribute value being a software attribute value of the infotainment system, and the second attribute value being a function attribute value of the infotainment system; the application data of the vehicle infotainment application includes at least one of a frequency of sending a data request by the infotainment application, a running time length of the infotainment application, and a number of restarts of the infotainment application; and the at least one data combination is obtained according to the system data of the vehicle infotainment system and / or the application data of the vehicle infotainment application, including: combining the frequency of sending a data request by the infotainment application and the number of account switches of the infotainment system to obtain a first data combination; combining the frequency of sending a data request by the infotainment application and the running time length of the infotainment application to obtain a second data combination; combining the frequency of sending a data request by the infotainment application and the number of restarts of the infotainment application to obtain a third data combination; combining the frequency of sending a data request by the infotainment application and the at least one first attribute value to obtain a fourth data combination; and combining the at least one second attribute value to obtain a fifth data combination.
[0010] In some possible implementation manners, according to the at least one data combination and the corresponding preset condition, the method further includes: determining that the data request is a crawler request in a case where the frequency of sending the data request by the car machine application in the first data combination and the number of account switching of the car machine system are respectively within the first preset range and the second preset range; and / or, determining that the data request is a crawler request in a case where the frequency of sending the data request by the car machine application in the second data combination and the running duration of the car machine application are respectively within the first preset range and the third preset range; and / or, determining that the data request is a crawler request in a case where the frequency of sending the data request by the car machine application in the third data combination and the number of restarts of the car machine application are respectively within the first preset range and the fourth preset range; and / or, determining that the data request is a crawler request in a case where the frequency of sending the data request by the car machine application in the fourth data combination is within the first preset range, and each first attribute value is different from the corresponding initial attribute value; and / or, determining that the data request is a crawler request in a case where at least one second attribute value in the fifth data combination does not match each other.
[0011] In the technical solution, in a case where any one data combination meets the corresponding preset condition, it can be determined that the data request is a crawler request, so as to avoid sending the data request to the server.
[0012] In some possible implementation manners, according to the at least one data combination and the corresponding preset condition, the method further includes: determining that the data request is not a crawler request in a case where the frequency of sending the data request by the car machine application in the first data combination and the number of account switching of the car machine system are not within the first preset range and the second preset range respectively; and / or, determining that the data request is not a crawler request in a case where the frequency of sending the data request by the car machine application in the second data combination and the running duration of the car machine application are not within the first preset range and the third preset range respectively; and / or, determining that the data request is not a crawler request in a case where the frequency of sending the data request by the car machine application in the third data combination and the number of restarts of the car machine application are not within the first preset range and the fourth preset range respectively; and / or, determining that the data request is not a crawler request in a case where the frequency of sending the data request by the car machine application in the fourth data combination is not within the first preset range, and each first attribute value is the same as the corresponding initial attribute value; and / or, determining that the data request is not a crawler request in a case where at least one second attribute value in the fifth data combination matches each other.
[0013] In the technical solution, in a case where all data combinations do not meet the corresponding preset condition, it can be determined that the data request is not a crawler request, so as to ensure the accuracy of determining that the data request is not a crawler request.
[0014] In a possible implementation of the first aspect and the foregoing implementation, the method further includes: in response to the data request sent by the vehicle machine application, determining a current running environment of the vehicle machine system; in a case where the current running environment of the vehicle machine system is a test environment, not performing the crawler identification on the data request; in a case where the current running environment of the vehicle machine system is a production environment, performing the crawler identification on the data request.
[0015] In the foregoing technical solution, in response to the data request sent by the vehicle machine application, the current running environment of the vehicle machine system is determined first. Since the response data corresponding to the data request has no actual value in a case where the current running environment of the vehicle machine system is a test environment, the crawler identification is not performed on the data request in this case, that is, the subsequent steps of obtaining the system data of the vehicle machine system and / or the application data of the vehicle machine application are not performed, thereby reducing the control power consumption of the vehicle. However, in a case where the current running environment of the vehicle machine system is a production environment, that is, in a case where the vehicle machine system directly faces users, since the response data corresponding to the data request has actual value, the crawler identification is performed on the data request in this case, thereby reducing the number of times of sending the crawler request to the server, and reducing the load pressure of the server.
[0016] In a possible implementation of the first aspect and the foregoing implementation, the method further includes: in a case where it is determined that the data request is a crawler request, randomly generating a simulated response data corresponding to the data request, and sending the simulated response data to the vehicle machine application.
[0017] In the foregoing technical solution, in a case where it is determined that the data request is a crawler request, a simulated response data corresponding to the data request can be randomly generated and sent to the vehicle machine application, so as to confuse the crawler user, so that the real data is not maliciously obtained by the crawler user, and the case where the crawler user sends the same data request again is avoided.
[0018] In a second aspect, a crawler identification apparatus is provided, the apparatus being applied to a vehicle machine end, and the apparatus includes:
[0019] The obtaining module is configured to, in response to a data request sent by a vehicle machine application to a server, obtain system data of a vehicle machine system and / or application data of the vehicle machine application.
[0020] The identification module is configured to identify, according to the system data of the vehicle machine system and / or the application data of the vehicle machine application, whether the data request is a crawler request.
[0021] An intercepting module is configured to intercept the data request so that the data request is not sent to the server if it is determined that the data request is a crawler request.
[0022] With reference to the second aspect and the foregoing implementations, in some possible implementations, the apparatus further includes a combining module configured to obtain at least one data combination according to system data of a car machine system of the vehicle and / or application data of a car machine application of the vehicle, the data combination including at least one data; and an identifying module configured to identify whether the data request is a crawler request according to the at least one data combination and a corresponding preset condition.
[0023] With reference to the second aspect and the foregoing implementations, in some possible implementations, the system data of the car machine system of the vehicle includes at least one of a number of account switches of the car machine system, at least one first attribute value of the car machine system, and at least one second attribute value of the car machine system, the first attribute value being a software attribute value of the car machine system, and the second attribute value being a function attribute value of the car machine system; the application data of the car machine application of the vehicle includes at least one of a frequency of sending data requests by the car machine application, a running duration of the car machine application, and a number of restarts of the car machine application; and the combining module is specifically configured to combine the frequency of sending data requests by the car machine application and the number of account switches of the car machine system to obtain a first data combination; combine the frequency of sending data requests by the car machine application and the running duration of the car machine application to obtain a second data combination; combine the frequency of sending data requests by the car machine application and the number of restarts of the car machine application to obtain a third data combination; combine the frequency of sending data requests by the car machine application and the at least one first attribute value to obtain a fourth data combination; and combine the at least one second attribute value to obtain a fifth data combination.
[0024] With reference to the second aspect and the foregoing implementations, in some possible implementations, the identifying module is specifically further configured to determine that the data request is a crawler request in a case where the frequency of sending data requests by the car machine application and the number of account switches of the car machine system in the first data combination are respectively within a first preset range and a second preset range; and / or, the frequency of sending data requests by the car machine application and the running duration of the car machine application in the second data combination are respectively within a first preset range and a third preset range; and / or, the frequency of sending data requests by the car machine application and the number of restarts of the car machine application in the third data combination are respectively within a first preset range and a fourth preset range; and / or, the frequency of sending data requests by the car machine application in the fourth data combination is within a first preset range, and each first attribute value is different from a corresponding initial attribute value; and / or, the at least one second attribute value in the fifth data combination does not match each other.
[0025] With reference to the second aspect and the foregoing implementation manners, in some possible implementation manners, the identification module is specifically further configured to: in the first data combination, the frequency of sending data requests by the vehicle machine application and the number of account switching of the vehicle machine system are not in the first preset range and the second preset range, respectively; and in the second data combination, the frequency of sending data requests by the vehicle machine application and the running duration of the vehicle machine application are not in the first preset range and the third preset range, respectively; and in the third data combination, the frequency of sending data requests by the vehicle machine application and the number of restarts of the vehicle machine application are not in the first preset range and the fourth preset range, respectively; and in the fourth data combination, the frequency of sending data requests by the vehicle machine application is not in the first preset range, and each first attribute value is the same as the corresponding initial attribute value; and in the case where the at least one second attribute value in the fifth data combination matches each other, it is determined that the data request is not a crawler request.
[0026] With reference to the second aspect and the foregoing implementation manners, in some possible implementation manners, the apparatus further includes a determination module configured to, in response to a data request sent by a vehicle machine application of a vehicle, determine a current running environment of a vehicle machine system of the vehicle; in the case where the current running environment of the vehicle machine system of the vehicle is a test environment, not performing crawler identification on the data request; and in the case where the current running environment of the vehicle machine system of the vehicle is a production environment, performing crawler identification on the data request.
[0027] With reference to the second aspect and the foregoing implementation manners, in some possible implementation manners, the apparatus further includes a generation module configured to, in the case where it is determined that the data request is a crawler request, randomly generate a simulated response data corresponding to the data request, and send the simulated response data to the vehicle machine application of the vehicle.
[0028] In a third aspect, a vehicle is provided, including a memory and a processor. The memory is configured to store executable program code, and the processor is configured to invoke and run the executable program code from the memory, so that the vehicle performs the crawler identification method in the first aspect or any possible implementation manner of the first aspect.
[0029] In a fourth aspect, a computer program product is provided, which includes computer program code. When the computer program code runs on a computer, the computer program code causes the computer to perform the crawler identification method in the first aspect or any possible implementation manner of the first aspect.
[0030] In a fifth aspect, a computer readable storage medium is provided, which stores computer program code. When the computer program code runs on a computer, the computer program code causes the computer to perform the crawler identification method in the first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is a structural schematic diagram of a vehicle machine system provided by an embodiment of the present application;
[0032] Figure 2 is a schematic flowchart of a crawler identification method provided by an embodiment of the present application;
[0033] Figure 3 is a structural schematic diagram of a crawler identification device provided by an embodiment of the present application;
[0034] Figure 4 is a structural schematic diagram of a vehicle provided by an embodiment of the present application. DETAILED DESCRIPTION
[0035] The technical solutions in the present application will be described in detail below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B: "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0036] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more features.
[0037] A web crawler is a computer program that finds web pages through the link addresses of the web pages and automatically obtains the contents of the web pages according to certain rules. Since the web crawler does not need to render the page, it only needs to obtain the file content and the uniform resource locator (URL) in the file, so the web crawler can access the server at a very high frequency, which makes the load pressure of the server larger, thereby reducing the smoothness of normal users obtaining data.
[0038] Therefore, how to reduce the load pressure of the server is a problem that needs to be solved at present.
[0039] Based on the above problem, the present application provides a crawler identification method, which can identify and intercept web crawler requests, thereby reducing the access frequency of web crawler requests, and further reducing the load pressure of the server.
[0040] Figure 1 is a structural schematic diagram of a vehicle machine system provided by an embodiment of the present application, referring to Figure 1As shown, the car-machine system 100 includes a car-machine application module 101, an anti-crawler module 102, and a car-machine application system service module 103.
[0041] The car-machine application module 101 is configured to send a data request to the anti-crawler module 102, so that the anti-crawler module 102 performs crawler identification on the data request upon receiving the data request. The data request refers to a request sent by a car-machine application (e.g., a navigation application, a multimedia entertainment application, a communication application, etc.) of a vehicle to a server, aiming to obtain response data from the server.
[0042] In a possible implementation, upon receiving the data request, the anti-crawler module 102 can obtain system data of the car-machine system and / or application data of the car-machine application from the car-machine application system service module 103, and perform crawler identification on the data request according to the system data of the car-machine system and / or the application data of the car-machine application.
[0043] In a possible implementation, upon receiving the data request sent by the anti-crawler module 102, the anti-crawler module 102 can first determine the current running environment of the car-machine system, so as to not perform crawler identification on the data request, i.e., not perform the subsequent step of obtaining the system data of the car-machine system and / or the application data of the car-machine application from the car-machine application system service module 103, in the case that the current running environment of the car-machine system is a test environment; and perform crawler identification on the data request in the case that the current running environment of the car-machine system is a production environment, so as to reduce the control power consumption of the vehicle.
[0044] The anti-crawler module 102 is further configured to, in the case that the data request is determined to be a crawler request, randomly generate a simulated response data corresponding to the data request, and send the simulated response data to the car-machine application module 101, so that the car-machine application module 101 performs corresponding business logic (e.g., playing music, updating a route on a navigation interface, updating a music list, turning on seat heating, etc.) according to the received simulated response data.
[0045] The method provided in the embodiments of the present application will be described in detail below. Figure 2 The method provided in the embodiments of the present application will be described in detail below.
[0046] Figure 2 is a schematic flowchart of a crawler identification method provided in the embodiments of the present application.
[0047] As shown in the example, taking an ECU with a car-machine end as an execution subject, the method 200 includes: Figure 2
[0048] At step 201, in response to a data request sent by a car machine application of a vehicle to a server, system data of a car machine system of the vehicle and / or application data of the car machine application of the vehicle are acquired.
[0049] The car machine application of the car machine includes one or more of a navigation application, a multimedia entertainment application (e.g., a music player, a video player, a radio, etc.), a communication application (e.g., a Bluetooth phone, a smart assistant, etc.), a remote control application (e.g., remote start / stop, door lock control, air conditioning preset, and vehicle positioning, etc.), a safety and auxiliary driving application (e.g., lane keeping assistance, collision warning, blind spot monitoring, and reversing image, etc.), an Internet and connection application (e.g., Wi-Fi hotspot, Over-The-Air Technology (OTA) update, etc.), and a personalized setting application (e.g., a user profile that allows a user to save personal settings such as seat position, audio preference, etc., a theme and interface customization that allows a user to change screen background, font size, etc., and shortcut key settings that allow a user to customize shortcut keys for frequently used functions), and the like, which are not limited in the embodiments of the present application.
[0050] It can be understood that the data request refers to a request sent by a car machine application (e.g., a navigation application, a multimedia entertainment application, a communication application, etc.) of a vehicle to a server, and the purpose is to acquire response data from the server or perform certain operations (e.g., update the user interface).
[0051] In the embodiments of the present application, when the car machine application of the vehicle sends a data request to the server, the ECU will send the data request to the anti-crawler module, so that the anti-crawler module acquires the system data of the car machine system of the vehicle and / or the application data of the car machine application from the car machine application system service module after receiving the data request, and identifies whether the data request is a crawler request according to the system data of the car machine system of the vehicle and / or the application data of the car machine application of the vehicle.
[0052] The system data of the vehicle telematics system includes at least one of the number of account switching of the telematics system, at least one first attribute value of the telematics system and at least one second attribute value of the telematics system. For example, the system data of the telematics system includes the number of account switching of the telematics system, the first attribute value and the second attribute value of the telematics system; for another example, the system data of the telematics system includes the number of account switching of the telematics system and the first attribute of the telematics system, and the embodiments of the present application are not limited thereto. The first attribute value is a software attribute value of the telematics system, for example, the first attribute value is a version number and a memory size of an operating system of the telematics system. The second attribute value of the telematics system is a function attribute value of the telematics system, that is, a function configuration of the telematics system. For example, a Bluetooth connection state (Bluetooth on / off), a panoramic sunroof function on / off state (panoramic sunroof on / off), a seat heating function on / off state (seat on / off 1-heating, seat on / off 2-heating, seat on / off 3-heating), an atmosphere lamp function on / off state (dynamic atmosphere lamp on / off and static atmosphere lamp on / off), and the like.
[0053] It should be noted that, since the response data corresponding to the account of different telematics systems and the attribute value (the first attribute value and the second attribute value) of different telematics systems is different, in order to obtain more comprehensive response data, the crawler user needs to constantly switch the account and modify the attribute value of the telematics system, therefore, in the embodiments of the present application, the anti-crawler module can obtain the number of account switching of the telematics system, the first attribute value and the second attribute value of the telematics system from the telematics application system service module, so as to subsequently judge whether the data request sent by the telematics application is a crawler request by using the number of account switching of the telematics system, the first attribute value and the second attribute value of the telematics system.
[0054] The application data of the telematics application of the vehicle includes at least one of the frequency of sending data requests of the telematics application, the running time length of the telematics application and the number of restarts of the telematics application. For example, the application data of the telematics application includes the frequency of sending data requests of the telematics application, the running time length of the telematics application and the number of restarts of the telematics application; for another example, the application data of the telematics application includes the frequency of sending data requests of the telematics application and the running time length of the telematics application, and the embodiments of the present application are not limited thereto.
[0055] It should be noted that, since different data requests correspond to different response data, in order for the crawler user to obtain more response data, the crawler user needs to frequently send data requests through the car application, therefore, in the embodiment of the application, the anti-crawler module can also obtain the frequency of sending data requests of the car application from the car application system service module, so as to subsequently determine whether the data request sent by the car application is a crawler request by using the frequency of sending data requests of the car application. Moreover, since the crawler user is only used for obtaining response data and will not use the car application for a long time, that is, after obtaining the response data, the crawler user will immediately exit the car application, therefore, in the embodiment of the application, the anti-crawler module can also obtain the running duration of the car application from the car application system service module, so as to subsequently determine whether the data request sent by the car application is a crawler request by using the running duration of the car application; in addition, since the second attribute value of the car system is modified, only after the corresponding car application is restarted, the modification will take effect, therefore, the crawler user will frequently restart the car application, therefore, in the embodiment of the application, the anti-crawler module can also obtain the number of restarts of the car application from the car application system service module, so as to subsequently determine whether the data request sent by the car application is a crawler request by using the number of restarts of the car application.
[0056] In a possible implementation, when responding to the data request sent by the car application of the vehicle, the anti-crawler module first determines the current running environment of the car system of the vehicle. Since the response data corresponding to the data request has no actual value in the case where the current running environment of the car system of the vehicle is a test environment, in this case, the anti-crawler module can not perform crawler identification on the data request, that is, the subsequent steps of obtaining the system data of the car system of the vehicle and / or the application data of the car application of the vehicle are not performed, thereby reducing the control power consumption of the vehicle. It should be noted that, in the case where the running environment of the car system is a test environment, the developer builds a simulation server through an intranet, therefore, even if the data request is a crawler request, since the intranet environment is isolated from the external Internet, the load pressure of the server in the external Internet will not increase at this time. However, in the case where the current running environment of the car system of the vehicle is a production environment, that is, in the case where the car system directly faces users, since the response data corresponding to the data request has actual value, and the car system interacts with the server in the external Internet, in this case, the data request needs to be identified, thereby reducing the number of times of sending crawler requests to the server, thereby reducing the load pressure of the server.
[0057] It should be noted that in order to facilitate the anti-crawler module to quickly determine whether the current running environment of the vehicle infotainment system is a test environment or a production environment, in a possible implementation, the developer can set specific environment variables for the test environment and the production environment, respectively. For example, set Environment = TEST in the test environment and set Environment = PROD in the production environment, so that the anti-crawler module can obtain the current environment variable when identifying the current running environment of the vehicle infotainment system, and quickly identify whether the current running environment of the vehicle infotainment system is a test environment or a production environment according to the current environment variable.
[0058] In step 202, whether the data request is a crawler request is identified according to the system data of the vehicle infotainment system and / or the application data of the vehicle infotainment application.
[0059] For example, after the anti-crawler module obtains the system data of the vehicle infotainment system and / or the application data of the vehicle infotainment application from the infotainment application system service module, the anti-crawler module can identify whether the data request is a crawler request according to the system data of the vehicle infotainment system and the application data of the vehicle infotainment application.
[0060] In a possible implementation, when the anti-crawler module identifies whether the data request is a crawler request according to the system data of the vehicle infotainment system and / or the application data of the vehicle infotainment application, at least one data combination can be obtained according to the system data of the vehicle infotainment system and / or the application data of the vehicle infotainment application, and whether the data request is a crawler request is identified according to the at least one data combination and the corresponding preset condition. Since each data combination has its own corresponding preset condition, the accuracy of the crawler identification of the data request can be ensured.
[0061] Next, how to obtain at least one data combination according to the system data of the vehicle infotainment system and / or the application data of the vehicle infotainment application will be described in detail.
[0062] It should be noted that, since there may be a case that normal users also send data requests through the car machine application with high frequency, in order to ensure the accuracy of the identification of the data request, in a possible implementation, the frequency of the data request sent by the car machine application needs to be combined with other data in order to improve the accuracy of the identification of the data request. Specifically, the frequency of the data request sent by the car machine application and the number of account switching of the car machine system can be combined to obtain a first data combination; the frequency of the data request sent by the car machine application and the running time of the car machine application can be combined to obtain a second data combination; the frequency of the data request sent by the car machine application and the number of restarts of the car machine application can be combined to obtain a third data combination; the frequency of the data request sent by the car machine application and at least one first attribute value of the car machine system can be combined to obtain a fourth data combination. Here, it should be noted that, since the at least one second attribute value of the car machine system is matched with each other, that is, in the case that the plurality of second attribute values of the car machine system are not matched with each other, it means that the second attribute value of the car machine system is definitely modified maliciously, that is, it can be determined that the data request is a crawler request, therefore, all the second attribute values of the car machine system can be combined to obtain a fifth data combination.
[0063] Among them, the plurality of second attribute values of the car machine system are not matched, which can be understood as, in the case that the car machine system does not support the heating of the seat, the car machine system displays that the seat heating is turned on, or, in the case that the car machine system supports the heating of the seat but does not support the heating of the seat in three gears, the car machine system displays that the seat heating is turned on and the heating of the seat in three gears is turned on, or, in the case that the car machine system supports turning on the dynamic ambient light (dynamic ambient light), the car machine system displays that it does not support the dynamic ambient light, or, in the case that the car machine system only supports turning on the static dynamic ambient light, the car machine system displays that the dynamic ambient light is turned on, etc.
[0064] After introducing how to obtain at least one data combination according to the system data of the car machine system of the vehicle and / or the application data of the car machine application of the vehicle, next, how to identify whether the data request is a crawler request according to at least one data combination and the corresponding preset condition will be introduced in detail.
[0065] In a possible implementation, after the car machine application sends a data request, in the case that the anti-crawler module determines that any one of the at least one data combination meets the corresponding preset condition, it can be determined that the data request is a crawler request, so as to avoid sending the data request to the server.
[0066] Specifically, in the first data combination, the frequency of sending data requests by the car machine application and the number of account switching of the car machine system are respectively within a first preset range and a second preset range; and / or, in the second data combination, the frequency of sending data requests by the car machine application and the running time of the car machine application are respectively within a first preset range and a third preset range; and / or, in the third data combination, the frequency of sending data requests by the car machine application and the number of restarts of the car machine application are respectively within a first preset range and a fourth preset range; and / or, in the fourth data combination, the frequency of sending data requests by the car machine application is within a first preset range, and each first attribute value (for example, the version number of the operating system and the memory size) of the car machine system is different from the corresponding initial attribute value; and / or, in the fifth data combination, at least one second attribute value of the car machine system does not match each other, it is determined that the data request is a crawler request.
[0067] In the fourth data combination, each first attribute value of the car machine system is different from the corresponding initial attribute value, which can be understood as that the version number of the operating system of the car machine system is different from the initial version number, and the memory size of the car machine system is different from the initial memory size.
[0068] For example, in the first data combination, the frequency of sending data requests by the car machine application and the number of account switching of the car machine system are respectively within a first preset range and a second preset range, but the remaining data combinations, i.e., the second data combination, the third data combination, the fourth data combination and the fifth data combination do not satisfy the preset conditions, it is determined that the data request is a crawler request, or, in the first data combination, the frequency of sending data requests by the car machine application and the number of account switching of the car machine system are respectively within a first preset range and a second preset range; in the second data combination, the frequency of sending data requests by the car machine application and the running time of the car machine application are respectively within a first preset range and a third preset range, but the other data combinations, i.e., the third data combination, the fourth data combination and the fifth data combination do not satisfy the preset conditions, it is determined that the data request is a crawler request.
[0069] In a possible implementation, after the car machine application sends a data request, if the ECU determines that all data combinations do not satisfy the corresponding preset conditions, it is determined that the data request is not a crawler request, so as to ensure the accuracy of determining that the data request is not a crawler request.
[0070] Specifically, in the first data combination, the frequency of sending data requests by the car machine application and the number of account switching of the car machine system are not in the first preset range and the second preset range, respectively; and in the second data combination, the frequency of sending data requests by the car machine application and the running time of the car machine application are not in the first preset range and the third preset range, respectively; and in the third data combination, the frequency of sending data requests by the car machine application and the number of restarts of the car machine application are not in the first preset range and the fourth preset range, respectively; and in the fourth data combination, the frequency of sending data requests by the car machine application is not in the first preset range, and each first attribute value is the same as the corresponding initial attribute value; and in the case that at least one second attribute value in the fifth data combination matches each other, it is determined that the data request is not a crawler request.
[0071] Step 203, in the case that the data request is determined to be a crawler request, the data request is intercepted so that the data request is not sent to the server.
[0072] Specifically, in the case that the anti-crawler module of the car machine system determines that the data request is a crawler request, the data request will be intercepted, i.e. the data request will not be sent to the server, thereby effectively reducing the number of times that the crawler request is sent to the server, thereby reducing the load pressure of the server, and further ensuring the smoothness of the normal user obtaining data from the server, and effectively avoiding the case that the privacy information of the normal user is maliciously obtained by the crawler user; in the case that the anti-crawler module of the car machine system determines that the data request is not a crawler request, the data request will be sent to the server, and in the case that the response data corresponding to the data request returned by the server is received, the response data will be sent to the car machine application module, so that the car machine application module executes the corresponding business logic (for example, playing music, updating the route on the navigation interface, updating the music list, turning on the seat heating, etc.) according to the response data.
[0073] In a possible implementation, in the case that the anti-crawler module determines that the data request is a crawler request, and after intercepting the data request, a simulated response data corresponding to the data request can also be randomly generated and sent to the car machine application of the vehicle, i.e. the car machine application module of the vehicle, to confuse the crawler user, so that the real data is not maliciously obtained by the crawler user, and the case that the crawler user sends the same data request again is also avoided.
[0074] Optionally, developers can design a series of simulated JSON or XML data based on the output format of the actual interface. This data should be as close to the actual response as possible, including but not limited to successful responses, error prompts, and empty data scenarios. A database or folder system should be created in the anti-crawler module to store these preset simulated response data. This allows the anti-crawler module to identify data requests as crawler requests and, after intercepting the data request, flexibly search for the corresponding simulated response data based on the different data requests and return the simulated response data to the vehicle application module.
[0075] The actual interface can be understood as a server-side interface. In other words, it refers to a set of specifications and methods defined by the server for communication and data exchange with the vehicle computer or other systems. These interfaces define the functions that the vehicle computer can access, the data format, the request method, and the server's response to these requests.
[0076] In summary, the embodiment of the present application provides a crawler identification method, in which the vehicle-side can respond to a data request sent by the vehicle-side application to the server, obtain the system data of the vehicle-side system and / or the application data of the vehicle-side application, and identify whether the data request is a crawler request based on the system data of the vehicle-side system and / or the application data of the vehicle-side application. Since the embodiment of the present application intercepts the data request when the vehicle-side determines that the data request is a crawler request, it can effectively reduce the number of crawler requests sent to the server, thereby reducing the load pressure on the server, thereby ensuring the smoothness of normal users (which can also be understood as non-crawler users) obtaining data from the server, and effectively preventing the private information of normal users from being maliciously obtained by crawler users. In addition, when responding to the data request sent by the vehicle-side application, the vehicle-side will first determine the current operating environment of the vehicle-side system, so that if the current operating environment of the vehicle-side system is a test environment, crawler identification is not performed on the data request, that is, the subsequent steps of obtaining the system data of the vehicle-side system and / or the application data of the vehicle-side application are not performed, thereby reducing the control power consumption of the vehicle. In addition, after determining that the data request is a crawler request and intercepting the data request, a simulated response data corresponding to the data request can be randomly generated and sent to the vehicle's on-board application to confuse the crawler user, so that the real data is not maliciously obtained by the crawler user, and the crawler user is prevented from sending the same data request again.
[0077] Figure 3 It is a structural diagram of a crawler identification device provided in an embodiment of the present application.
[0078] For example, Figure 3 As shown, the device 300 includes:
[0079] The acquisition module 301 is configured to acquire system data of the vehicle telematics system and / or application data of the vehicle telematics application in response to a data request sent by the vehicle telematics application to the server.
[0080] The identification module 302 is configured to identify whether the data request is a crawler request according to the system data of the vehicle telematics system and / or the application data of the vehicle telematics application.
[0081] The interception module 303 is configured to intercept the data request so that the data request is not sent to the server if it is determined that the data request is a crawler request.
[0082] With reference to the second aspect and the above possible implementation manners, in some possible implementation manners, the apparatus further includes a combination module configured to obtain at least one data combination according to the system data of the vehicle telematics system and / or the application data of the vehicle telematics application, the data combination including at least one data; and the identification module 302 is specifically configured to identify whether the data request is a crawler request according to the at least one data combination and a corresponding preset condition.
[0083] In a possible implementation manner, the system data of the vehicle telematics system includes at least one of a number of account switches of the telematics system, at least one first attribute value of the telematics system, and at least one second attribute value of the telematics system, the first attribute value being a software attribute value of the telematics system, and the second attribute value being a functional attribute value of the telematics system; the application data of the vehicle telematics application includes at least one of a frequency of sending data requests by the telematics application, a running time length of the telematics application, and a number of restarts of the telematics application; and the combination module is specifically configured to combine the frequency of sending data requests by the telematics application and the number of account switches of the telematics system to obtain a first data combination; combine the frequency of sending data requests by the telematics application and the running time length of the telematics application to obtain a second data combination; combine the frequency of sending data requests by the telematics application and the number of restarts of the telematics application to obtain a third data combination; combine the frequency of sending data requests by the telematics application and the at least one first attribute value to obtain a fourth data combination; and combine the at least one second attribute value to obtain a fifth data combination.
[0084] In a possible implementation, the identification module 302 is specifically further configured to: in a first data combination, the frequency of sending data requests by the car machine application and the number of account switching of the car machine system are respectively within a first preset range and a second preset range; and / or, in a second data combination, the frequency of sending data requests by the car machine application and the running time of the car machine application are respectively within a first preset range and a third preset range; and / or, in a third data combination, the frequency of sending data requests by the car machine application and the number of restarts of the car machine application are respectively within a first preset range and a fourth preset range; and / or, in a fourth data combination, the frequency of sending data requests by the car machine application is within the first preset range, and each first attribute value is different from the corresponding initial attribute value; and / or, in a case where at least one second attribute value in a fifth data combination does not match each other, it is determined that the data request is a crawler request.
[0085] In a possible implementation, the identification module 302 is specifically further configured to: in a first data combination, the frequency of sending data requests by the car machine application and the number of account switching of the car machine system are respectively not within a first preset range and a second preset range; and / or, in a second data combination, the frequency of sending data requests by the car machine application and the running time of the car machine application are respectively not within a first preset range and a third preset range; and / or, in a third data combination, the frequency of sending data requests by the car machine application and the number of restarts of the car machine application are respectively not within a first preset range and a fourth preset range; and / or, in a fourth data combination, the frequency of sending data requests by the car machine application is not within the first preset range, and each first attribute value is the same as the corresponding initial attribute value; and / or, in a case where at least one second attribute value in a fifth data combination matches each other, it is determined that the data request is not a crawler request.
[0086] In a possible implementation, the apparatus further includes a determination module configured to: in response to a data request sent by a car machine application of a vehicle, determine a current running environment of a car machine system of the vehicle; in a case where the current running environment of the car machine system of the vehicle is a test environment, not performing crawler identification on the data request; and in a case where the current running environment of the car machine system of the vehicle is a production environment, performing crawler identification on the data request.
[0087] In a possible implementation, the apparatus further includes a generation module configured to: in a case where it is determined that the data request is a crawler request, randomly generate an analog response data corresponding to the data request, and send the analog response data to the car machine application of the vehicle.
[0088] Figure 4 is a structural schematic diagram of a vehicle provided by an embodiment of the present application.
[0089] For example, Figure 4As shown, the vehicle 400 includes: a memory 401 and a processor 402, wherein the memory 401 stores an executable program code 403, and the processor 402 is used to call and execute the executable program code 403 to perform a crawler identification method.
[0090] In addition, an embodiment of the present application also protects a system, which may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to perform a crawler identification method provided by an embodiment of the present application.
[0091] In this embodiment, the system can be divided into functional modules based on the above-described method examples. For example, each functional module can be mapped to a specific functional module, or two or more functions can be integrated into a single processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and represents only a logical functional division. In actual implementation, other division methods may be used.
[0092] In the case of dividing each functional module into corresponding functional modules, the system may further include a determination module, a combination module, and a generation module. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0093] It should be understood that the system provided in this embodiment is used to execute the above-mentioned crawler identification method, and thus can achieve the same effect as the above-mentioned implementation method.
[0094] In the case of an integrated unit, the system may include a processing module and a storage module. When the system is used in a vehicle, the processing module may be used to control and manage the vehicle's movements, while the storage module may be used to support the vehicle's execution of relevant program codes.
[0095] The processing module may be a processor or controller that implements or executes the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a data combination that implements computing functions, such as a data combination of one or more microprocessors, a data combination of a digital signal processing (DSP) and a microprocessor, and the like. The storage module may be a memory.
[0096] In addition, the system provided in the embodiments of the present application can specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a crawler identification method provided in the above embodiment.
[0097] This embodiment also provides a computer-readable storage medium, which stores computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a crawler identification method provided by the above embodiment.
[0098] This embodiment also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement a crawler identification method provided by the above embodiment.
[0099] Among them, the system, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0100] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above.
[0101] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0102] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A crawler identification method, characterized in that, The method applied to a vehicle machine end comprises: In response to a data request sent by a vehicle machine application to a server, obtaining system data of a vehicle machine system of the vehicle and / or application data of the vehicle machine application; wherein the system data of the vehicle machine system comprises at least one of a number of account switching of the vehicle machine system, at least one first attribute value of the vehicle machine system and at least one second attribute value of the vehicle; the first attribute value is a software attribute value of the vehicle machine system, and the second attribute value is a function attribute value of the vehicle machine system; the application data of the vehicle machine application comprises at least one of a frequency of sending the data request by the vehicle machine application, a running time length of the vehicle machine application and a number of restarts of the vehicle machine application; combining the frequency of sending the data request by the vehicle machine application and the number of account switching of the vehicle machine system to obtain a first data combination; or, combining the frequency of sending the data request by the vehicle machine application and the running time length of the vehicle machine application to obtain a second data combination; or, combining the frequency of sending the data request by the vehicle machine application and the number of restarts of the vehicle machine application to obtain a third data combination; or, combining the frequency of sending the data request by the vehicle machine application and the at least one first attribute value to obtain a fourth data combination; or, combining the at least one second attribute value to obtain a fifth data combination; each data combination in the first data combination to the fifth data combination comprises at least one data; According to at least one data combination in the first data combination to the fifth data combination and a corresponding preset condition, identifying whether the data request is the crawler request, comprising: the frequency of sending the data request by the vehicle machine application in the first data combination and the number of account switching of the vehicle machine system are not in a first preset range and a second preset range, respectively; and, the frequency of sending the data request by the vehicle machine application in the second data combination and the running time length of the vehicle machine application are not in the first preset range and a third preset range, respectively; and, the frequency of sending the data request by the vehicle machine application in the third data combination and the number of restarts of the vehicle machine application are not in the first preset range and a fourth preset range, respectively; and, the frequency of sending the data request by the vehicle machine application in the fourth data combination is not in the first preset range, and each first attribute value is the same as a corresponding initial attribute value; and, in the case that the at least one second attribute value in the fifth data combination matches each other, it is determined that the data request is not the crawler request; In the case that it is determined that the data request is the crawler request, intercepting the data request so that the data request is not sent to the server.
2. The method of claim 1, wherein, According to at least one data combination in the first data combination to the fifth data combination and a corresponding preset condition, identifying whether the data request is the crawler request, comprising: The frequency of the car machine application sending the data request and the account switching number of the car machine system in the first data combination are respectively in a first preset range and a second preset range; And / or, the frequency of the car machine application sending the data request and the running time length of the car machine application in the second data combination are respectively in the first preset range and a third preset range; And / or, the frequency of the car machine application sending the data request and the restart number of the car machine application in the third data combination are respectively in the first preset range and a fourth preset range; And / or, the frequency of the car machine application sending the data request in the fourth data combination is in the first preset range, and each first attribute value is different from the corresponding initial attribute value; And / or, in the case that the at least one second attribute value in the fifth data combination does not match each other, the data request is determined as the crawler request.
3. The method according to any of claims 1-2, characterized in that, The method further comprises: In response to the data request sent by the car machine application of the vehicle, determining the current running environment of the car machine system of the vehicle; In the case that the current running environment of the car machine system of the vehicle is a test environment, the data request is not subjected to crawler identification; In the case that the current running environment of the car machine system of the vehicle is a production environment, the data request is subjected to crawler identification.
4. The method according to any one of claims 1-2, characterized in that, The method further comprises: In the case that the data request is determined as the crawler request, an analog response data corresponding to the data request is randomly generated, and the analog response data is sent to the car machine application of the vehicle.
5. A crawler identification apparatus characterized by comprising: Applied to a car machine end, the device comprises: An acquisition module is configured to acquire system data of a car machine system of a vehicle and / or application data of a car machine application of the vehicle in response to a data request sent by the car machine application of the vehicle to a server; wherein the system data of the car machine system of the vehicle comprises at least one of an account switching number of the car machine system, at least one first attribute value of the car machine system and at least one second attribute value of the car machine system; the first attribute value is a software attribute value of the car machine system, and the second attribute value of the vehicle is a function attribute value of the car machine system; the application data of the car machine application of the vehicle comprises at least one of a frequency of the car machine application sending the data request, a running time length of the car machine application and a restart number of the car machine application; The combination module is configured to combine the frequency of sending the data request by the car machine application and the number of account switching of the car machine system to obtain a first data combination; or combine the frequency of sending the data request by the car machine application and the running time of the car machine application to obtain a second data combination; or combine the frequency of sending the data request by the car machine application and the number of restarts of the car machine application to obtain a third data combination; or combine the frequency of sending the data request by the car machine application and the at least one first attribute value to obtain a fourth data combination; or combine the at least one second attribute value to obtain a fifth data combination; each of the first data combination to the fifth data combination comprises at least one data. The identification module is configured to identify whether the data request is the crawler request according to at least one of the first data combination to the fifth data combination and a corresponding preset condition, including: the frequency of sending the data request by the car machine application and the number of account switching of the car machine system in the first data combination are not in a first preset range and a second preset range, respectively; and the frequency of sending the data request by the car machine application and the running time of the car machine application in the second data combination are not in the first preset range and a third preset range, respectively; and the frequency of sending the data request by the car machine application and the number of restarts of the car machine application in the third data combination are not in the first preset range and a fourth preset range, respectively; and the frequency of sending the data request by the car machine application in the fourth data combination is not in the first preset range, and each first attribute value is the same as a corresponding initial attribute value; and in the case that the at least one second attribute value in the fifth data combination matches each other, it is determined that the data request is not the crawler request. The interception module is configured to intercept the data request in the case that the data request is the crawler request, so that the data request is not sent to the server.
6. A vehicle characterized by comprising: The vehicle comprises: a memory configured to store executable program code; a processor configured to call and run the executable program code from the memory, so that the vehicle executes the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, when the computer program is executed, the method according to any one of claims 1 to 4 is realized. The computer readable storage medium stores a computer program, when the computer program is executed, the method according to any one of claims 1 to 4 is realized.
Citation Information
Patent Citations
Crawler method and device for dynamically adjusting sending speed, equipment and product
CN118093978A
Traffic proxy method and system, and smart terminal and storage medium
WO2023097748A1