Diagnostic intrusion judgment method and device, computer equipment and storage medium
By obtaining the access frequency and service type of the diagnosis initiator, calculating the security score, and judging the diagnosis intrusion behavior, the problem of difficulty in judging the safety of external devices in vehicle diagnosis is solved, and the safety and accuracy of vehicle diagnosis are improved.
Patent Information
- Application Number
- CN202410747238.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-10-08
AI Technical Summary
During the vehicle diagnosis process, the safety of external diagnostic equipment cannot be effectively judged, which may cause the vehicle to be affected by unsafe equipment, causing potential risks.
By obtaining the access frequency and service type of the diagnosis initiator, calculate the security score data, and compare it with the authorization level threshold to determine whether there is diagnostic intrusion behavior, and then determine the security of the device.
It improves the safety of the vehicle diagnosis process, prevents unsafe equipment from being connected to the vehicle, and ensures the accuracy and reliability of the diagnosis process.
Smart Images

Figure CN118747362A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle diagnosis technology, and in particular to a diagnostic intrusion determination method, device, computer equipment and storage medium. Background Art
[0002] In the field of vehicle diagnostic technology, in order to ensure the normal operation of the vehicle, the vehicle is usually diagnosed regularly. At present, the main way to diagnose the vehicle is to use an external diagnostic device to interact with the vehicle gateway through the vehicle's OBD (On-Board Diagnostic) interface.
[0003] However, when the vehicle is diagnosed through an external diagnostic device, the vehicle cannot determine whether the diagnostic device is safe. Once connected to an unsafe diagnostic device, it will have a certain impact on the vehicle. Summary of the invention
[0004] Based on this, it is necessary to provide a diagnostic intrusion determination method, device, computer equipment and storage medium to address the above technical problems, which can perform intrusion determination on external devices before the external devices perform vehicle-wide diagnosis, thereby improving the safety of vehicle-wide diagnosis.
[0005] In a first aspect, the present application provides a method for diagnosing intrusion, comprising:
[0006] When the diagnosis authorization document of the diagnosis initiator is valid, obtaining the current access frequency of at least one diagnosis service initiated by the diagnosis initiator in the current diagnosis cycle; wherein the diagnosis authorization document includes the current authorization level;
[0007] Determine the service type to which each diagnostic service belongs;
[0008] Determine the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type;
[0009] According to the relationship between the sum of the security score data corresponding to each service type and the security score threshold corresponding to the current authorization level, it is determined whether the diagnosis initiator has any diagnosis intrusion behavior in the current diagnosis cycle.
[0010] In one of the embodiments, for an authorizable service whose service type is an authorizable type, security score data under the service type is determined based on the current access frequencies corresponding to each diagnostic service under the same service type, including: for each authorizable service, determining the frequency update coefficient of the authorizable service based on the standard authorization level to which the authorizable service belongs; determining the security score data under the authorizable type based on the frequency update coefficient of the authorizable service and the current access frequency of the authorizable service.
[0011] In one of the embodiments, a frequency update coefficient of the authorizable service is determined based on the standard authorization level to which the authorizable service belongs, including: if the authorizable service is an authorized service within the current authorization level, determining the access probability of the authorized service under the standard authorization level to which it belongs; and using the inverse of the access probability as the frequency update coefficient of the authorized service.
[0012] In one of the embodiments, a frequency update coefficient of the authorizable service is determined based on the standard authorization level to which the authorizable service belongs, including: if the authorizable service is an unauthorized service outside the current authorization level, then the unauthorized level difference between the standard authorization level to which the unauthorized service belongs and the current authorization level is determined; and the product of the unauthorized level difference and the standard impact coefficient corresponding to the unit level difference is used as the frequency update coefficient of the unauthorized service.
[0013] In one of the embodiments, the security score threshold corresponding to the current authorization level is determined in the following manner: obtaining the historical access frequency of at least one authorized service initiated by the reference diagnosis initiator within at least one historical diagnosis cycle; wherein each authorized service is a service under the current authorization level; determining the historical security score under the historical diagnosis cycle based on the historical access frequency corresponding to each authorized service under the same historical diagnosis cycle; determining the security score threshold corresponding to the current authorization level based on the sorting results of the historical security scores under each historical diagnosis cycle.
[0014] In one of the embodiments, the method further includes: if there is a diagnostic intrusion behavior in the current diagnostic cycle, outputting a reminder message indicating that the diagnostic authorization file has expired, and prohibiting each diagnostic service initiated by the diagnostic initiator from responding.
[0015] In one of the embodiments, determining the service type of each diagnostic service includes: for any diagnostic service, if the diagnostic service belongs to a preset security service, determining that the diagnostic service is not an attack service under the attack type; if the diagnostic service does not belong to the preset security service, determining that the diagnostic service is an attack service; and determining that the diagnostic service is an authorized service under an authorizable type, or an unauthorized service under an authorizable type, based on a comparison result between a standard authorization level to which the diagnostic service belongs and a current authorization level.
[0016] In a second aspect, the present application also provides a diagnostic intrusion determination device, comprising:
[0017] An access frequency acquisition module, used to acquire the current access frequency of at least one diagnostic service initiated by the diagnosis initiator in the current diagnosis cycle when the diagnosis authorization file of the diagnosis initiator is valid; wherein the diagnosis authorization file includes the current authorization level;
[0018] A service type determination module, used to determine the service type to which each diagnostic service belongs;
[0019] A score data determination module, used to determine the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type;
[0020] The intrusion behavior determination module is used to determine whether the diagnosis initiator has any diagnosis intrusion behavior in the current diagnosis cycle based on the relationship between the sum of the security score data corresponding to each service type and the security score threshold corresponding to the current authorization level.
[0021] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0022] When the diagnosis authorization file of the diagnosis initiator is valid, obtaining the current access frequency of at least one diagnosis service initiated by the diagnosis initiator in the current diagnosis cycle; wherein the diagnosis authorization file includes the current authorization level;
[0023] Determine the service type to which each diagnostic service belongs;
[0024] Determine the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type;
[0025] According to the relationship between the sum of the security score data corresponding to each service type and the security score threshold corresponding to the current authorization level, it is determined whether the diagnosis initiator has any diagnosis intrusion behavior in the current diagnosis cycle.
[0026] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0027] When the diagnosis authorization file of the diagnosis initiator is valid, obtaining the current access frequency of at least one diagnosis service initiated by the diagnosis initiator in the current diagnosis cycle; wherein the diagnosis authorization file includes the current authorization level;
[0028] Determine the service type to which each diagnostic service belongs;
[0029] Determine the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type;
[0030] According to the relationship between the sum of the security score data corresponding to each service type and the security score threshold corresponding to the current authorization level, it is determined whether the diagnosis initiator has any diagnosis intrusion behavior in the current diagnosis cycle.
[0031] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0032] When the diagnosis authorization file of the diagnosis initiator is valid, obtaining the current access frequency of at least one diagnosis service initiated by the diagnosis initiator in the current diagnosis cycle; wherein the diagnosis authorization file includes the current authorization level;
[0033] Determine the service type to which each diagnostic service belongs;
[0034] Determine the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type;
[0035] According to the relationship between the sum of the security score data corresponding to each service type and the security score threshold corresponding to the current authorization level, it is determined whether the diagnosis initiator has any diagnosis intrusion behavior in the current diagnosis cycle.
[0036] The above-mentioned diagnostic intrusion determination method, device, computer equipment and storage medium, when the diagnostic authorization file of the diagnostic initiator is valid, before allowing the diagnostic initiator to perform a whole vehicle diagnosis on the vehicle, obtains the current access frequency of at least one diagnostic service of the diagnostic initiator in the current diagnostic cycle, determines the service type to which each diagnostic service belongs, and determines the security score data under the corresponding service type based on the current access frequency corresponding to each diagnostic service under the same service type. In this process, since the diagnostic authorization file includes the current authorization level, different authorization levels allow different types of services to be diagnosed, and different service types correspond to different security score data. Therefore, the sum value subsequently determined based on the security score data corresponding to different service types is also more accurate. This improves the accuracy of the diagnostic result determined based on the size relationship between the sum value and the security score threshold corresponding to the current authorization level, thereby improving the accuracy of the diagnostic intrusion determination result. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A diagram of an application environment of a diagnostic intrusion determination method in an embodiment;
[0039] Figure 2A schematic diagram of a flow chart of a diagnostic intrusion determination method in one embodiment;
[0040] Figure 3 A schematic diagram of a process for determining a diagnostic service type in one embodiment;
[0041] Figure 4 A schematic diagram of a process for determining security score data in one embodiment;
[0042] Figure 5 A schematic diagram of a process for determining security score data in another embodiment;
[0043] Figure 6 A schematic diagram of a process for determining a safety score threshold in one embodiment;
[0044] Figure 7 A schematic diagram of a flow chart of a diagnostic intrusion determination method in another embodiment;
[0045] Figure 8 A structural block diagram of a diagnostic intrusion determination method device in one embodiment;
[0046] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0048] The diagnostic intrusion determination method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the diagnostic device (i.e., the diagnostic initiator) 102 is respectively connected to the OBD agent 104 (i.e., OBD Agent), the electronic control unit 106 (Electronic Control Unit, ECU) and the after-sales authorization system 108 in the vehicle. This embodiment is illustrated by applying the method to the OBD Agent 104 in the vehicle. When the diagnostic authorization file of the diagnostic initiator is valid, the OBD Agent 104 obtains the current access frequency of at least one diagnostic service initiated by the diagnostic initiator in the current diagnostic cycle; wherein the diagnostic authorization file includes the current authorization level; the OBD Agent 104 determines the service type to which each diagnostic service belongs; the OBD Agent 104 determines the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type; the OBD Agent 104 determines whether the diagnostic initiator has diagnostic intrusion behavior in the current diagnostic cycle according to the sum of the security score data corresponding to each service type and the size relationship between the security score threshold corresponding to the current authorization level. It can be understood that the method can also be applied to the ECU in the vehicle.
[0049] In the application environment of the above diagnostic intrusion determination method, the diagnostic initiator is used to connect with the OBD Agent to implement vehicle-wide diagnosis of the vehicle. The after-sales authorization system is used to generate a diagnostic authorization file corresponding to the diagnostic initiator according to the device serial number of the diagnostic initiator and the vehicle identification number (VIN) of the vehicle to be diagnosed.
[0050] In one embodiment, Figure 2 As shown, a real-time intrusion diagnosis and determination method is provided, and the method is applied to Figure 1 Taking the OBD Agent 104 in the example as an example, the following steps are included:
[0051] S210: When the diagnosis authorization file of the diagnosis initiator is valid, obtain the current access frequency of at least one diagnosis service initiated by the diagnosis initiator in the current diagnosis cycle.
[0052] The diagnosis initiator may be a diagnostic device connected to the vehicle, and the embodiment of the present application does not limit the device type of the diagnosis initiator. For example, the diagnosis initiator may be a computer diagnostic instrument for automobile fault problems, a comprehensive automobile engine analyzer, an electronic injection cleaning test bench, a computer wheel balancer, a computer four-wheel alignment instrument, a brake test bench, a side slip test bench, an automobile headlight checker, an automatic refrigerant treatment machine, and an air conditioning leak detector.
[0053] The diagnostic authorization file may be a file used to indicate that the diagnostic initiator is able to perform a full vehicle diagnosis on the corresponding vehicle. The diagnostic authorization file includes the current authorization level, and different authorization levels correspond to different authorized diagnostic services. The diagnostic authorization file records the validity period of the corresponding file. It is understandable that if the diagnostic authorization file of the diagnostic initiator is not within the validity period, the diagnostic initiator cannot perform a full vehicle diagnosis on the vehicle, that is, there is no need to execute the diagnostic intrusion determination process in this embodiment.
[0054] The current access frequency represents the number of times different diagnostic services are accessed in the current diagnostic cycle, and can measure the access conditions of different diagnostic services in the current diagnostic cycle. It is understandable that the premise for the diagnostic initiator to diagnose the vehicle is that it obtains the diagnostic authorization file.
[0055] The current diagnostic cycle can be the diagnostic cycle of the most recent diagnosis performed on the vehicle by the diagnostic initiator before the current moment. Accordingly, the current authorization level represents the authorization level of the diagnostic initiator in the current diagnostic cycle. Different types of diagnostic initiators correspond to different diagnostic services, and different types of diagnostic initiators have different corresponding authorization levels. For any diagnostic service, the current access frequency represents the access frequency of the diagnostic initiator to the corresponding diagnostic service in the current diagnostic cycle.
[0056] Exemplarily, in this embodiment, the diagnosis initiator may send its corresponding authorization file to the vehicle before attempting to perform a full vehicle diagnosis on the vehicle. In an optional implementation, the current access frequency of at least one diagnostic service initiated by the diagnosis initiator during the current diagnosis cycle may be stored in a local database or other preset storage location. In the event that the presence of a diagnosis authorization file of the diagnosis initiator is detected, the diagnosis authorization file may be parsed to determine whether it is within the validity period. Furthermore, in the event that the diagnosis authorization file of the diagnosis initiator is within the validity period, the current access frequency of at least one diagnostic service initiated by the diagnosis initiator during the current diagnosis cycle may be obtained from the corresponding database.
[0057] In another optional embodiment, the current access frequency of at least one diagnostic service initiated by the diagnosis initiator within the current diagnosis cycle can be stored in the diagnosis initiator. When it is detected that there is a diagnosis authorization file of the diagnosis initiator and the diagnosis authorization file is valid, an access frequency feedback instruction can be sent to the diagnosis initiator so that the diagnosis initiator can feedback the current access frequency of at least one diagnostic service initiated by it within the current diagnosis cycle.
[0058] S220: Determine the service type to which each diagnostic service belongs.
[0059] The service types of different diagnostic services may be determined based on manual experience. For example, in this embodiment, the service types of each diagnostic service may be classified according to the service purpose of the diagnostic service. The service types of each diagnostic service may also be classified according to the importance of the diagnostic service, which is not limited.
[0060] Exemplarily, the service type corresponding to each diagnostic service can be pre-stored in the identification information corresponding to the diagnostic service. This embodiment can determine the service type of each diagnostic service according to the identification information of each diagnostic service when obtaining at least one diagnostic service initiated by the diagnostic initiator within the current diagnostic cycle.
[0061] S230: Determine the security score data of the service type according to the current access frequency corresponding to each diagnostic service of the same service type.
[0062] Among them, the security score data is used to characterize the corresponding security of the diagnosis initiator under the corresponding service type. By way of example, in this embodiment, the higher the security score data, the higher the security, or the higher the security score data, the lower the security, and there is no limitation on this.
[0063] In an optional implementation, the security score data under each service type may correspond to the sum of the current access frequencies corresponding to at least one diagnostic service under the service type. For any service type, the corresponding relationship between the security score data and the access frequency corresponding to the service type may be determined in advance. After determining the current access frequencies corresponding to different diagnostic services under the service type, the security score data under the service type may be determined based on the corresponding relationship.
[0064] In another optional implementation, the current access frequencies corresponding to each diagnostic service under the same service type can be input into a pre-trained security score data determination model to obtain security score data under the corresponding service type. The security score data determination model can be constructed based on a common neural network. Furthermore, the sample access frequency data can be input into the security score data determination model, and the security score data determination model can be trained based on the determination result output by the security score data determination model and the sample label corresponding to the corresponding sample data (i.e., the real security score data corresponding to the sample data) to improve the accuracy of the security score data determination model.
[0065] S240, determining whether the diagnosis initiator has any diagnosis intrusion behavior in the current diagnosis cycle according to the relationship between the sum of the security score data corresponding to each service type and the security score threshold corresponding to the current authorization level.
[0066] The security score threshold is used to determine whether the diagnosis initiator has any diagnostic intrusion behavior. The security score thresholds corresponding to different authorization levels can be different or the same. The security score threshold can be determined based on manual experience or through a large number of experiments, and there is no limitation on this.
[0067] It should be noted that the method shown in S240 is only one method for determining whether the diagnosis initiator has any diagnostic intrusion behavior in the current diagnosis cycle. In this embodiment, it is also possible to determine whether the diagnosis initiator has any diagnostic intrusion behavior in the current diagnosis cycle based on the weighted sum of the security score data corresponding to each service type and the size relationship between the security score threshold corresponding to the current authorization level, and there is no limitation on this. Among them, the weight coefficient of the security score data under each service type can be determined based on experience or through a large number of experiments, and there is no limitation on this.
[0068] In an optional implementation, after determining the sum of the security score data corresponding to each service type, the sum can be compared with the security score threshold corresponding to the current authorization level of the diagnosis initiator. Taking the example that the higher the security score data, the lower the security, when the sum exceeds the corresponding security score threshold, it is determined that the diagnosis initiator has a diagnostic intrusion behavior in the current diagnosis cycle. Taking the example that the higher the security score data, the higher the security, when the sum does not exceed the corresponding security score threshold, it is determined that the diagnosis initiator has a diagnostic intrusion behavior in the current diagnosis cycle.
[0069] In the above-mentioned diagnostic intrusion determination method, when the diagnostic authorization file of the diagnostic initiator is valid, before allowing the diagnostic initiator to perform a whole vehicle diagnosis on the vehicle, the current access frequency of at least one diagnostic service of the diagnostic initiator in the current diagnostic cycle is obtained, and the service type to which each diagnostic service belongs is determined, and the security score data under the corresponding service type is determined according to the current access frequency corresponding to each diagnostic service under the same service type. In this process, since the diagnostic authorization file includes the current authorization level, different authorization levels allow different types of services to be diagnosed, and different service types correspond to different security score data. Therefore, the sum value subsequently determined according to the security score data corresponding to different service types is also more accurate. This improves the accuracy of the diagnostic result determined according to the size relationship between the sum value and the security score threshold corresponding to the current authorization level, thereby improving the accuracy of the diagnostic intrusion determination result.
[0070] Further, on the basis of the above-mentioned embodiments, in order to enrich the diagnostic intrusion determination method of the embodiment of the present application, the embodiment of the present application also provides an authorization level distinction method for each diagnostic service. Exemplarily, the diagnostic service function of the vehicle whole vehicle diagnosis may include OBD diagnostic service, endpoint detection and response (Endpoint Detection and Response, EDR) accident data recording service, 22 services (data reading service, including general data reading service and special data reading service) and INTER DIDs), FBL writing service, 28 communication control service, 19 service (reading fault diagnostic code), 2E service (divided into Commom DIDs and Important DIDs), 2F service (input and output control), 31 service (routine control service), 27 service (security authentication service), 14 service (clear fault code service), 11 service (reset service), 3E service (diagnostic online service), 10 service (session control service) and 85 (diagnostic trouble code (DTC) setting service) and other services. According to the different degrees of impact these diagnostic services can have on the vehicle controller (for example, the importance of the impact on vehicle operation, the importance of the impact on vehicle functions, the importance of the impact on vehicle data), the authorization level is divided into 0-6 levels. The relevant authorization levels and the corresponding supported diagnostic services can be shown in the following table:
[0071] Authorization level and diagnostic service comparison table:
[0072]
[0073] Among them, Level 0 is a diagnostic service that does not require authorization, such as OBD diagnostic service and EDR diagnostic service, because emission fault and data monitoring and EDR data recording are regulatory requirements and must be met at all times. There are also 10 services and 3E services, which have little impact on the controller.
[0074] Level 1 is a diagnostic service that simply analyzes the vehicle and solves vehicle problems, including reading fault codes (19 services) and reading general data such as ECU software and hardware version numbers (22 services).
[0075] Level 2 is a diagnostic service related to further analysis of vehicle problems, reading data from sensors and actuators connected to the controller (22 service), writing some general data (2E service), 27 service (safety authentication service), and clearing fault codes (14 service).
[0076] Level 3 is the service authorization level that supports most diagnostics and problem analysis, including writing all data (2E service), writing important DIDs such as configuration words (2E service), controlling the input and output of non-safety power ECUs (2F service), and controlling bus communications (28 service). Level 3 is the authorization level generally given to after-sales maintenance.
[0077] Level 4 supports input and output control of the power safety ECU (2F), routine control of the non-power safety ECU (31 service), and control of DTC settings (85 service). Level 4 routine control generally calibrates the windows and seats.
[0078] Level 5 supports flashing of the controller (FBL service, FBL service generally includes 34, 36, 37 services, the diagnostic agent generally determines whether it is FBL service by identifying 34, 36, 37 services), routine control of the safety power ECU (31 service), and level 5 routines generally include clearing total mileage and learning anti-theft routine services.
[0079] Level 6 supports all other authorized services, that is, level 6 permissions can perform all safety diagnostic operations on the entire vehicle.
[0080] It should be noted that when the authorization level is n, all services of levels n and below are supported. For example, when the authorization level is 3, diagnostic services of levels 0, 1, 2, and 3 are supported.
[0081] On the basis of the above embodiments, further, in order to ensure the safety of the vehicle, in one embodiment, if there is a diagnostic intrusion behavior in the current diagnostic cycle, a reminder message indicating that the diagnostic authorization file has expired is output, and each diagnostic service initiated by the response diagnosis initiator is prohibited. It can be understood that if the diagnostic intrusion determination result indicates that the diagnostic initiator has a diagnostic intrusion behavior in the current diagnostic cycle, it means that the diagnostic initiator is at risk of intrusion. In this case, prohibiting all diagnostic services initiated by the response diagnosis initiator can further ensure the safety of the vehicle.
[0082] Furthermore, after obtaining the current access frequency of at least one diagnostic service in the current diagnostic cycle, in order to make the process of determining the service type to which each diagnostic service belongs more rigorous, in one embodiment, Figure 3 As shown, the following determination methods are provided:
[0083] S310: For any diagnostic service, if the diagnostic service belongs to a preset security service, determine that the diagnostic service is not an attack service under the attack type.
[0084] Among them, the preset security service can be a pre-marked security service. For example, it can be marked in the attribute information of each diagnostic service whether it belongs to a security service; the diagnostic service recorded in the above authorization level and diagnostic service comparison table can also be used as a preset security service. In this embodiment, all diagnostic services that do not belong to the preset security service can be regarded as attack services under the attack type. For example, if all diagnostic services recorded in the above authorization level and diagnostic service comparison table are preset security services, all diagnostic services not recorded in the above table can be regarded as attack services under the attack type.
[0085] Exemplarily, for any diagnostic service, it is determined whether it belongs to a preset security service according to the attribute information of the diagnostic service. And if it belongs to the preset security service, it is determined that the diagnostic service is not an attack service under the attack type.
[0086] S320: If the diagnostic service does not belong to the preset security service, determine that the diagnostic service is an attack service.
[0087] S330: Determine whether the diagnostic service is an authorized service under an authorizable type or an unauthorized service under an authorizable type based on a comparison result between the standard authorization level to which the diagnostic service belongs and the current authorization level.
[0088] Among them, the preset security services are all diagnostic services of the authorized type. Authorized services can be all diagnostic services supported by the current authorization level. Unauthorized services can be preset security services that are not authorized services. Taking the preset security services as all diagnostic services recorded in the above table and the current authorization level as level 3 as an example, the authorized services are the diagnostic services corresponding to levels 0, 1, 2 and 3; the unauthorized services are the diagnostic services corresponding to levels 4, 5 and 6.
[0089] It should be noted that, when the authorization level is a numerical value, the comparison result can be the difference between the standard authorization level and the current authorization level; when the authorization level is high, medium or low, the comparison result can be the difference between the standard authorization level and the current authorization level, for example, the high level is higher than the medium level.
[0090] Exemplarily, taking the preset security services as all diagnostic services recorded in the above table as an example, for any diagnostic service, the standard authorization level to which it belongs is the authorization level corresponding to it in the table. Accordingly, for any diagnostic service, this embodiment can determine the standard authorization level to which it belongs according to the above table, and if the standard authorization level corresponding to it does not exceed the current authorization level, determine the corresponding diagnostic service as an authorized service under the authorized type. If the standard authorization level corresponding to it exceeds the current authorization level, determine the corresponding diagnostic service as an unauthorized service under the authorized type.
[0091] In the above embodiment, the diagnostic services are first divided into attack types and authorized types. Furthermore, each diagnostic service under the authorized type is divided into authorized services and unauthorized services according to the current authorization level, so that the classification of service types to which different diagnostic services belong is more accurate, which is convenient for subsequent diagnostic intrusion judgment.
[0092] On the basis of the above embodiments, the process of determining the security score data corresponding to different service types is further described in detail. First, the process of determining the security score data under the authorizable service under the authorizable type is introduced. Figure 4 As shown, it includes the following steps:
[0093] S410: For each licensable service, determine a frequency update coefficient of the licensable service according to a standard authorization level to which the licensable service belongs.
[0094] Among them, the frequency update coefficient can be used to adjust the security score data, so that the adjusted security score data is more accurate. In an optional implementation, the frequency update coefficients corresponding to each authorizable service under the same standard authorization level can be the same. For each authorizable service, the frequency update coefficient corresponding to its standard authorization level can be used as the frequency update coefficient corresponding to the authorizable service. Among them, the frequency update coefficients corresponding to different standard authorization levels can be associated with their level numbers. For example, the higher the level, the lower the corresponding frequency update coefficient. The frequency update coefficient can also be determined in advance based on manual experience, or it can be determined through a large number of experiments, and there is no limitation on this.
[0095] Further, in one embodiment, the authorizable services may include authorized services and unauthorized services. Accordingly, in order to make the frequency update coefficient more accurate, the frequency update coefficients corresponding to the authorized services and the unauthorized services may be determined differently. In an optional implementation, for the authorized services under the authorizable type, the access probability of the authorized services under the corresponding standard authorization level may be determined; the inverse of the access probability is used as the frequency update coefficient of the authorized service. Among them, for any authorized service, its corresponding access probability can be determined based on historical diagnostic data, and illustratively, it can be the proportion of access to the authorizable service in the historical diagnostic data. For example, in the historical diagnostic data, the proportion of 10 diagnostic services is 5%, and its corresponding frequency update coefficient is 20.
[0096] In this embodiment, the access probabilities of different authorized services are different, and the inverse of the access probability is used as the frequency update coefficient of the authorized service, so that the frequency update coefficient can better detect the use of each authorized service that deviates from the normal frequency.
[0097] In another optional implementation, for unauthorized services under the authorized type, the unauthorized level difference between the standard authorization level to which the authorized service belongs and the current authorization level can be determined; the product of the unauthorized level difference and the standard impact coefficient corresponding to the unit level difference is used as the frequency update coefficient of the unauthorized service. Among them, the standard impact coefficient corresponding to the unit level difference can be used to characterize the impact that each level of overstepping may have on the security score data. The frequency update coefficient corresponding to the unauthorized service can be regarded as a warning coefficient, which is used to characterize the severity of the unauthorized service. The standard impact coefficient can be determined based on manual experience or through a large number of experiments, and there is no limitation on this.
[0098] For example, if the current authorization level of the diagnosis initiator is level 3, and the diagnosis initiator has accessed 31 services with a standard authorization level of level 4 during the current diagnosis cycle, the unauthorized level difference is 4-3=1, and the frequency update coefficient corresponding to the authorized service is 1*the standard impact coefficient corresponding to the unit level difference. Taking the standard impact coefficient corresponding to the unit level difference as 0.1 as an example, its frequency update coefficient is 0.1.
[0099] S420: Determine security score data under the authorizable type according to the frequency update coefficient of the authorizable service and the current access frequency of the authorizable service.
[0100] For example, in this embodiment, the product of the frequency update coefficient of the authorizable service and the current access frequency of the corresponding authorizable service can be used as the updated current access frequency. Further, the statistical result of the updated current access frequency corresponding to each authorizable service is used as the security score data under the authorizable type.
[0101] In an optional implementation, for any authorized service, the statistical result of the current access frequency corresponding to the service can be used as the security score data of the corresponding authorized service. Further, for any service type, the sum of the security score data of different diagnostic services under the type is used as the security score data of the corresponding service type.
[0102] In another optional implementation, the statistical results of the updated current access frequency corresponding to the corresponding authorizable service may be processed according to a predetermined security score data determination formula to obtain the corresponding security score data.
[0103] For example, for an authorized service type, the corresponding security score data determination formula may be as follows:
[0104]
[0105] Where A represents the updated security score data corresponding to the authorized service; T1 and T2 represent the start time and end time of the current diagnosis cycle respectively; S i represents the number of accesses to the ith authorized service in a unit time. For example, when the authorization level is 0, S i The corresponding values are the number of accesses to the OBD service, the number of accesses to the EDR service, the number of accesses to the 10 service, the number of accesses to the 3E service, and the number of accesses to the 22 service; n represents the total number of authorized services; q i represents the frequency update coefficient corresponding to the i-th authorized service; q i *S i Represents the current access frequency of the i-th authorized service after update.
[0106] For example, for an unauthorized service type, the corresponding security score data determination formula may be as follows:
[0107]
[0108] Where B represents the updated security score data corresponding to the unauthorized service type; T1 and T2 represent the start time and end time of the current diagnosis cycle respectively; S i represents the number of visits to the i-th unauthorized service in a unit time; n represents the total number of unauthorized services; W i represents the frequency update coefficient corresponding to the i-th unauthorized service; W i *S i Represents the current access frequency after the i-th unauthorized service is updated.
[0109] In the above embodiment, a method for determining the security score data corresponding to the authorizable service of the authorizable service type is provided. In the process of determining the security score data, a frequency update coefficient is introduced, and the current access frequency is updated based on the frequency update data, thereby making the security score data more accurate.
[0110] On the basis of the above embodiments, a method for determining the security score data corresponding to the attack service whose service type is the attack type is further introduced, such as Figure 5 As shown, the following steps are included:
[0111] S510: Statistical results of current access frequencies corresponding to different attack services are used as security score data of different attack services under attack types.
[0112] Among them, the attack service may include a replay diagnosis service and a tampering diagnosis service.
[0113] Taking the attack services including replay diagnostic service C and tamper diagnostic service D as an example, the corresponding current access frequency statistics and security score data can be the sum of the number of attacks of replay diagnostic service C in unit time and the number of attacks of tamper diagnostic service D in unit time.
[0114] For example, for an attack type, the corresponding security score data may be determined by the following formula:
[0115]
[0116] Where C+D is the security score data corresponding to the replay diagnosis service C and the tampering diagnosis service D; N1 is the number of replay attacks per unit time; N2 is the number of tampering attacks per unit time; T1 and T2 represent the start time and end time of the current diagnosis cycle respectively.
[0117] On the basis of the above embodiments, further, after determining the security score data under different service types, it is necessary to determine the comprehensive score data of the security score data corresponding to the different service types. In one embodiment, the comprehensive score data of the security score data corresponding to the authorized type, the security score data corresponding to the unauthorized type, the security score data corresponding to the attack type, the weight coefficient corresponding to each type, and the diagnosis duration of the current diagnosis cycle can be used to determine the comprehensive score data of the security score data corresponding to the different service types.
[0118] The weight coefficient corresponding to each type may be determined based on manual experience or through a large number of experiments, and there is no limitation on this.
[0119] For example, the comprehensive score data may be determined by the following formula:
[0120] DG=(x*A+y*B+z*(C+D)) / (T2-T1);
[0121] Wherein, DG represents the comprehensive score data; A represents the updated security score data corresponding to the authorized service; T1 and T2 represent the start time and end time of the current diagnosis cycle respectively; B represents the updated security score data corresponding to the unauthorized service type; C+D represents the security score data corresponding to the replay diagnosis service C and the tampering diagnosis service D; x, y and z represent the weight coefficients of A, B and C+D respectively, and x<1.
[0122] In order to improve the accuracy of the comprehensive score data and to improve the accuracy of the diagnostic intrusion judgment results, in one embodiment, the weight coefficient corresponding to the authorized service can be determined based on the instruction repetition rate corresponding to the authorized service. The reason is that: since the ECU responds to diagnostic services in sequence in a serial manner, if a diagnostic request for other diagnostic services is received while the ECU is currently executing a diagnostic service response, the ECU cannot process it immediately and can reply with a diagnostic instruction that represents the response, such as NRC78. However, in some cases, unresponded diagnostic requests will continue to output diagnostic requests, which may cause more NRC78 diagnostic instructions than normal. Therefore, weighting the security score data A based on x determined by the instruction repetition rate can reduce the error caused by instruction repetition in the weighted result.
[0123] In another embodiment, x, y and z may be determined by a neural network model. Exemplarily, a large number of authorized diagnostic services (including authorized diagnostic services and unauthorized diagnostic services) and intrusion diagnostic services may be fitted by presetting a neural network model.
[0124] For example, each group of sample services includes the access frequency corresponding to each authorized service, the access frequency corresponding to each unauthorized service, and the attack service, such as the access frequency corresponding to replay and tampering, within a unit time. The preset neural network module is trained based on a large number of sample services. The expected output of the data sample for the authorized service is 1, the expected output of the sample data for the unauthorized service is 0, and the expected output of the sample data for the attack service is -1. The training process includes inputting the sample data set into the input layer of the neural network model, and performing convolution processing through the convolution layer, inputting the sample data set after convolution processing into the fully connected layer, and outputting it by the output layer. Furthermore, the weights of each neuron in the fully connected layer are adjusted by the cross entropy loss function until the preset convergence condition is met (for example, the preset number of iterations is reached or the output result reaches the preset accuracy), and then the training is stopped to obtain the corresponding neural network model.
[0125] On the basis of the above embodiments, after determining the comprehensive score data, it is necessary to determine whether the diagnosis initiator has any diagnostic intrusion behavior in the current diagnosis cycle according to the size relationship between the comprehensive score data and the security score threshold corresponding to the current authorization level. In one embodiment, a method for determining the security score threshold is provided, such as Figure 6 As shown, it includes the following steps:
[0126] S610: Obtain a historical access frequency of at least one authorized service initiated by a reference diagnosis initiator within at least one historical diagnosis cycle.
[0127] Among them, each authorized service is a service under the current authorization level. The reference diagnosis initiator can be a diagnostic device of the same type as the diagnosis initiator, or it can be the same diagnostic device. The current authorization level corresponding to the historical diagnosis initiator in the historical diagnosis cycle is the same as the current authorization level corresponding to the diagnosis initiator in the current diagnosis cycle. The cycle length of the historical diagnosis cycle can be the same as the diagnosis length of the current diagnosis cycle.
[0128] S620: Determine a historical security score in the historical diagnosis period according to the historical access frequencies corresponding to the authorized services in the same historical diagnosis period.
[0129] It should be noted that, in this embodiment, for the same historical diagnostic cycle, the process of determining the corresponding historical security score is the same as the process of determining the comprehensive score data in the above embodiment, and will not be repeated here. The difference is that in the embodiment of the present application, when determining the historical security score, the diagnostic services used are all authorized services.
[0130] S630: Determine a security score threshold corresponding to the current authorization level according to the ranking results of the historical security scores in each historical diagnosis period.
[0131] Among them, since the authorization level of the historical diagnosis initiator and the current diagnosis initiator is the same, the determined security score threshold corresponds to the current authorization level of the diagnosis initiator. In other words, different authorization levels correspond to different security score thresholds.
[0132] By way of example, in this embodiment, the historical security scores under different historical diagnosis cycles can be sorted, for example, from large to small, and then the sorting results can be quantified according to a predetermined quantile, and the historical security scores corresponding to the quantiles can be used as the security score threshold corresponding to the current authorization level. By way of example, a historical security score just exceeding 99.9% of the position in the sorting results can be used as the security score threshold.
[0133] In the above embodiment, a specific method for determining the security score threshold is provided. Compared with determining the security score threshold based on manual experience, determining the security score threshold based on the above method can make the judgment result of diagnosing intrusion more accurate.
[0134] In order to facilitate those skilled in the art to understand the present solution, in one embodiment, the diagnostic intrusion determination method provided in the embodiment of the present application is described in detail. Figure 7 As shown, it includes the following steps:
[0135] S701, after the diagnosis initiator obtains the vehicle VIN, it signs the data carrying the vehicle VIN and the equipment serial number SN, and sends the signed data to the after-sales authorization system to apply for a diagnosis authorization file.
[0136] S702, after the after-sales authorization system successfully verifies the signed data, it determines the validity of the vehicle VIN, and if valid, generates a diagnostic authorization file according to the default authorization level corresponding to the device serial number and returns it to the diagnosis initiator.
[0137] It should be noted that the default authorization level is an authorization level set according to the different types of diagnosis initiators, such as 4S shop after-sales diagnostic equipment is level 3, on-board diagnostic equipment is level 1, etc. If the diagnostic equipment needs to apply for permissions beyond its default authorization level, it can obtain a dynamic key after approval by the Office Automation (OA) system, and add the dynamic key to the authorization file for verification by the after-sales authorization system. After verification, the after-sales authorization system generates an authorization file of the corresponding authorization level and returns it to the diagnosis initiator.
[0138] Among them, the authorization file contains the diagnostic authorization file content as follows:
[0139] 1)vin: VIN number of the vehicle to be diagnosed.
[0140] 2) expiretime: The expiration date of this authorization file. After the expiration date, you need to reapply for the authorization file.
[0141] 3)27_ext_key_obd: The key used for diagnostic equipment and vehicle to diagnose 27 service 01 sub-service, used by electrical inspection equipment / diagnostic instrument, the data format is hexstring.
[0142] 4)27_ext_key_ecu: key for diagnostic equipment and vehicle to perform diagnostic 27 service 01 sub-service, used by OBDAgent, data format is hexstring.
[0143] 5)27_prog_key_obd: The key used for diagnostic equipment and vehicle to perform diagnostic 27 service 09 sub-service, used by electrical inspection equipment / diagnostic instrument, the data format is hexstring.
[0144] 6)27_prog_key_ecu: key for diagnostic equipment and vehicle to perform diagnostic 27 service 09 sub-service, used by OBDAgent, data format is hexstring.
[0145] 7) authorizationlevel: authorization level, two bytes, data format is hexstring
[0146] 8) sign: Sign vin, expire_time, 27_ext_key_obd, 27_ext_key_ecu, 27_prog_key_obd, 27_prog_key_ecu, and authorizationlevel. The signature algorithm is ED25519. Through these fields in the authorization file, the vehicle, time period, and specific operation content of the diagnostic operation can be limited. And the temporarily generated 27012709 key pair further ensures the security of OBD diagnosis.
[0147] S703, the diagnosis initiator sends 3101R_ID+diagnosis authorization file through the DOIP port (13400), and transfers the diagnosis authorization file to the OBDAgent.
[0148] S704, OBD Agent returns the authorization file receiving status and verifies the correctness of the diagnostic authorization file.
[0149] If the reception is successful, the OBD Agent returns 7101R_ID+00; if the reception fails, the OBD Agent returns 7101R_ID+01.
[0150] Specifically, after the diagnostic authorization file is verified to be correct, the VIN is compared to see if it is consistent. If it is consistent, the authorization time limit timer and authorization level register are set according to the expiretime and authorizationlevel in the authorization file, and the 27 keys are stored. Finally, the DID of the diagnostic agent mode is set to 1 to turn on the diagnostic agent mode. If the verification fails: OBD Agent needs to record the cause of the error.
[0151] It should be noted that after receiving the successful reception prompt returned by the OBD Agent, the diagnostic initiator periodically queries the write status. For example, after receiving 7101R_ID00, the diagnostic initiator should send 3103R_ID every 500ms to query the diagnostic authorization file write status. The OBD Agent returns 7103R_ID00: indicating that the diagnostic authorization file verification is successful; the OBD Agent returns 7103R_ID01: indicating that the diagnostic authorization file is being verified and the diagnostic authorization file status continues to be queried; the OBD Agent returns 7103R_ID02: indicating that the diagnostic authorization file verification failed and the query failure reason needs to be read.
[0152] S705 , when the diagnostic authorization file is effective and within the validity period, the OBD Agent obtains the current access frequencies of different diagnostic services initiated by the diagnostic initiator in the current diagnostic cycle.
[0153] Among them, the diagnostic authorization file includes the current authorization level.
[0154] S706, the OBD Agent determines the service type to which each diagnostic service belongs.
[0155] Specifically, whether the corresponding diagnostic service is an attack service under the attack type is determined based on whether the diagnostic service belongs to the preset security service; based on the difference between the standard authorization level to which the diagnostic service belongs and the current authorization level, the corresponding diagnostic service is determined to be an authorized service under the authorizable type, or an unauthorized service under the authorizable type.
[0156] S707, the OBD Agent determines, for each authorizable service whose service type is an authorizable type, a frequency update coefficient of the authorizable service according to the standard authorization level to which the authorizable service belongs.
[0157] Specifically, if the authorizable service is an authorized service under the current authorization level, the access probability of the authorized service under the standard authorization level is determined; the inverse of the access probability is used as the frequency update coefficient of the authorized service. If the authorizable service is an unauthorized service outside the current authorization level, the unauthorized level difference between the standard authorization level to which the authorizable service belongs and the current authorization level is determined; the product of the unauthorized level difference and the standard impact coefficient corresponding to the unit level difference is used as the frequency update coefficient of the unauthorized service.
[0158] S708, the OBD Agent uses the product of the frequency update coefficient of the authorizable service and the current access frequency of the corresponding authorizable service as the new current access frequency of the authorizable service.
[0159] S709, the OBD Agent uses the sum of the new current access frequencies corresponding to the authorizable services as the security score data under the authorizable type.
[0160] S710, the OBD Agent uses the sum of the current access frequencies corresponding to different attack services as security score data of the different attack services under the attack type for the attack service whose service type is the attack type.
[0161] S711, the OBD Agent determines whether the diagnosis initiator has any diagnosis intrusion behavior in the current diagnosis cycle according to the relationship between the sum of the security score data corresponding to different service types and the security score threshold corresponding to the current authorization level.
[0162] Among them, the security score threshold corresponding to the current authorization level is determined in the following way: obtain the historical access frequency of different authorized services under the current authorization level initiated by the reference diagnosis initiator within at least one historical diagnosis cycle; determine the historical security score under the corresponding historical diagnosis cycle based on the historical access frequency corresponding to different authorized services under the same historical diagnosis cycle; determine the security score threshold corresponding to the current authorization level based on the sorting results of the historical security scores under different historical diagnosis cycles.
[0163] S712, when there is a diagnosis intrusion behavior in the current diagnosis cycle, the OBD Agent outputs a reminder message indicating that the diagnosis authorization file has expired, and prohibits responding to various diagnostic services initiated by the diagnosis initiator.
[0164] S713, after receiving the reminder information, the diagnostic device needs to perform the operation of step S710 again.
[0165] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0166] Based on the same inventive concept, the embodiment of the present application also provides a diagnostic intrusion determination device for implementing the diagnostic intrusion determination method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more diagnostic intrusion determination device embodiments provided below can refer to the limitations of the diagnostic intrusion determination method above, and will not be repeated here.
[0167] In an exemplary embodiment, Figure 8 As shown, a diagnostic intrusion determination device is provided, including: an access frequency acquisition module 810, a service type determination module 820, a score data determination module 830 and an intrusion behavior determination module 840, wherein:
[0168] The access frequency acquisition module 810 is used to acquire the current access frequency of at least one diagnostic service initiated by the diagnosis initiator in the current diagnosis cycle when the diagnosis authorization file of the diagnosis initiator is valid.
[0169] Among them, the diagnostic authorization file includes the current authorization level.
[0170] The service type determination module 820 is used to determine the service type to which each diagnostic service belongs.
[0171] The score data determination module 830 is used to determine the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type.
[0172] The intrusion behavior determination module 840 is used to determine whether the diagnosis initiator has any diagnosis intrusion behavior in the current diagnosis cycle based on the relationship between the sum of the security score data corresponding to each service type and the security score threshold corresponding to the current authorization level.
[0173] In one embodiment, for an authorizable service whose service type is an authorizable type, the score data determination module includes a coefficient determination unit, which is used to determine, for each authorizable service, the frequency update coefficient of the authorizable service according to the standard authorization level to which the authorizable service belongs; and the score data determination unit, which is used to determine the security score data under the authorizable type according to the frequency update coefficient of the authorizable service and the current access frequency of the authorizable service.
[0174] In one embodiment, the coefficient determination unit includes a probability determination subunit, which is used to determine the access probability of the authorized service under the corresponding standard authorization level if the authorized service is an authorized service within the current authorization level; and a first coefficient determination subunit, which is used to use the inverse of the access probability as the frequency update coefficient of the authorized service.
[0175] In one embodiment, the coefficient determination unit includes a difference determination subunit, which is used to determine the unauthorized level difference between the standard authorization level to which the authorized service belongs and the current authorization level if the authorized service is an unauthorized service outside the current authorization level; and a second coefficient determination subunit, which is used to use the product of the unauthorized level difference and the standard influence coefficient corresponding to the unit level difference as the frequency update coefficient of the unauthorized service.
[0176] In one embodiment, the intrusion behavior determination module includes a threshold determination unit, which is used to obtain the historical access frequency of at least one authorized service initiated by a reference diagnosis initiator within at least one historical diagnosis cycle; wherein each authorized service is a service under the current authorization level; based on the historical access frequency corresponding to each authorized service under the same historical diagnosis cycle, a historical security score under the historical diagnosis cycle is determined; based on the sorting results of the historical security scores under each historical diagnosis cycle, a security score threshold corresponding to the current authorization level is determined.
[0177] In one embodiment, the diagnostic intrusion determination device further includes a reminder module for outputting reminder information indicating that the diagnostic authorization file has expired if there is diagnostic intrusion behavior in the current diagnostic cycle, and prohibiting various diagnostic services initiated by the diagnostic initiator from responding.
[0178] In one embodiment, the service type determination module includes a first determination unit, which is used to determine, for any diagnostic service, that the diagnostic service is not an attack service under the attack type if the diagnostic service belongs to a preset security service; a second determination unit, which is used to determine that the diagnostic service is an attack service if the diagnostic service does not belong to the preset security service; and a third determination unit, which is used to determine whether the diagnostic service is an authorized service under an authorizable type or an unauthorized service under an authorizable type based on a comparison result between a standard authorization level to which the diagnostic service belongs and a current authorization level.
[0179] Each module in the above-mentioned diagnostic intrusion determination device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0180] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a diagnostic intrusion determination method is implemented.
[0181] Those skilled in the art will understand that Fig. 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0182] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0183] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0184] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0185] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0186] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0187] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A diagnostic intrusion determination method, characterized in that: include: When the diagnosis authorization document of the diagnosis initiator is valid, obtaining the current access frequency of at least one diagnosis service initiated by the diagnosis initiator in the current diagnosis cycle; wherein the diagnosis authorization document includes the current authorization level; Determine the service type to which each diagnostic service belongs; Determine the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type; According to the relationship between the sum of the security score data corresponding to each service type and the security score threshold corresponding to the current authorization level, it is determined whether the diagnosis initiator has any diagnosis intrusion behavior within the current diagnosis cycle.
2. The method according to claim 1, characterized in that For an authorizable service whose service type is an authorizable type, determining the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type includes: For each licensable service, determining a frequency update coefficient of the licensable service according to the standard authorization level to which the licensable service belongs; The security score data under the authorizable type is determined according to the frequency update coefficient of the authorizable service and the current access frequency of the authorizable service.
3. The method according to claim 2, characterized in that The step of determining the frequency update coefficient of the authorizable service according to the standard authorization level to which the authorizable service belongs includes: If the authorizable service is an authorized service within the current authorization level, determining the access probability of the authorized service under the corresponding standard authorization level; The inverse of the access probability is used as the frequency update coefficient of the authorized service.
4. The method according to claim 2, characterized in that: The step of determining the frequency update coefficient of the authorizable service according to the standard authorization level to which the authorizable service belongs includes: If the authorizable service is an unauthorized service outside the current authorization level, determining an unauthorized level difference between the standard authorization level to which the unauthorized service belongs and the current authorization level; The product of the unauthorized level difference and the standard impact coefficient corresponding to the unit level difference is used as the frequency update coefficient of the unauthorized service.
5. The method according to any one of claims 1 to 4, characterized in that: The security score threshold corresponding to the current authorization level is determined in the following manner: Obtaining the historical access frequency of at least one authorized service initiated by the reference diagnosis initiator within at least one historical diagnosis cycle; wherein each of the authorized services is a service under the current authorization level; Determine a historical security score for the same historical diagnosis period according to the historical access frequency corresponding to each authorized service in the same historical diagnosis period; The security score threshold corresponding to the current authorization level is determined according to the ranking results of the historical security scores in each historical diagnosis period.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If there is any diagnostic intrusion behavior in the current diagnostic cycle, a reminder message indicating that the diagnostic authorization file has expired is output, and the diagnostic services initiated by the diagnostic initiator are prohibited from responding.
7. The method according to any one of claims 1 to 4, characterized in that: Determining the service type to which each diagnostic service belongs includes: For any diagnostic service, if the diagnostic service belongs to a preset security service, determining that the diagnostic service is not an attack service under the attack type; If the diagnostic service does not belong to the preset security service, determining that the diagnostic service is an attack service; According to the comparison result between the standard authorization level to which the diagnostic service belongs and the current authorization level, it is determined that the diagnostic service is an authorized service under the authorizable type, or an unauthorized service under the authorizable type.
8. A diagnostic intrusion determination device, characterized in that: The device comprises: An access frequency acquisition module, used to acquire the current access frequency of at least one diagnostic service initiated by the diagnosis initiator in the current diagnosis cycle when the diagnosis authorization file of the diagnosis initiator is valid; wherein the diagnosis authorization file includes the current authorization level; A service type determination module, used to determine the service type to which each diagnostic service belongs; A score data determination module, used to determine the security score data under the service type according to the current access frequency corresponding to each diagnostic service under the same service type; The intrusion behavior determination module is used to determine whether the diagnosis initiator has any diagnosis intrusion behavior within the current diagnosis cycle based on the relationship between the sum of the security score data corresponding to each service type and the security score threshold corresponding to the current authorization level.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
