File access control method, device, equipment and medium

By obtaining the historical access record of the vehicle diagnostic equipment and determining whether it meets the access control conditions, the problem of the server being susceptible to malicious access is solved and the security control of file access is realized.

CN114676447BActive Publication Date: 2025-08-29LAUNCH SOFTWARE DEV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210410306.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2025-08-29
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

In the prior art, servers are prone to malicious access when receiving file access requests from vehicle diagnostic equipment, and lack effective access control mechanisms.

Method used

By obtaining the device identification of the target device, obtaining its historical access record, and determining whether the preset access control conditions are met based on these records. Access to the target file is allowed only when the conditions are met.

Benefits of technology

It effectively avoids malicious access to target files and improves the security and reliability of file access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114676447B_ABST
    Figure CN114676447B_ABST
Patent Text Reader

Abstract

The present application discloses a file access control method, apparatus, device and medium, which relates to the field of computer technology, and includes: obtaining an access request sent by a target device for accessing a target file; the access request carries a device identification of the target device; obtaining a historical access record of the target device based on the device identification; judging whether the target device meets a preset access control condition based on the historical access record; if so, allowing the target device to access the target file; if not, denying the target device access to the target file. The historical access record of the target device is obtained by using the device identification carried in the access request to judge whether the target device meets the preset access control condition, and access is allowed only when the access control condition is met. In this way, the preset access control condition can prevent the target file from being maliciously accessed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a file access control method, device, equipment and medium. Background Art

[0002] Vehicle diagnostic equipment refers to testing equipment that can quickly and accurately determine the technical condition of a vehicle, assembly, or mechanism, and draw reliable conclusions. Online programming is the most advanced feature of fault diagnosis equipment used by vehicle maintenance technicians. Vehicle functions are controlled by electronic control units (ECUs), which are divided into two modules: hardware and software. The software consists of an operating system and application programs. Application programs contain various control instructions, such as ignition, fuel, emissions, and idle speed. These control programs are programmed into executable software. When the operating system crashes and the software within the control unit becomes corrupted, online programming is required to restore the software. Currently, servers that receive requests from diagnostic equipment to access online programming files are vulnerable to malicious access.

[0003] In summary, how to prevent files from being maliciously accessed is a problem that needs to be solved. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a file access control method, apparatus, device and medium that can prevent files from being maliciously accessed. The specific solution is as follows:

[0005] In a first aspect, the present application discloses a file access control method, which is applied to a server and includes:

[0006] Obtaining an access request sent by a target device for accessing a target file; the access request carries a device identifier of the target device;

[0007] Acquire historical access records of the target device based on the device identifier;

[0008] Based on the historical access records, it is determined whether the target device meets the preset access control conditions; if so, the target device is allowed to access the target file; if not, the target device is denied access to the target file.

[0009] Optionally, the determining whether the target device meets a preset access control condition based on the historical access record includes:

[0010] Determining whether the file access volume of the target device within a preset unit time reaches a first threshold based on the historical access record;

[0011] If so, it is determined that the target device does not meet the preset access control condition.

[0012] Optionally, the determining whether the target device meets a preset access control condition based on the historical access record includes:

[0013] Determining, based on the historical access records, whether the file access volume of the target vehicle type information by the target device within a preset unit time reaches a second threshold;

[0014] If so, it is determined that the target device does not meet the preset access control condition.

[0015] Optionally, the determining whether the target device meets a preset access control condition based on the historical access record includes:

[0016] Determine, based on the historical access records, whether the number of first file accesses by the target device within a preset unit time reaches a first threshold, and obtain a first determination result;

[0017] Determine, based on the historical access records, whether the target device's access volume to the second file for the target vehicle model information within the preset unit time reaches a second threshold, and obtain a second determination result;

[0018] It is determined whether the target device meets a preset access control condition based on the first judgment result and the second judgment result.

[0019] Optionally, the determining whether the target device satisfies a preset access control condition based on the first determination result and the second determination result includes:

[0020] If the first judgment result is that the first file access volume reaches the first threshold, and / or the second judgment result is that the second file access volume reaches the second threshold, it is determined that the target device does not meet the preset access control condition.

[0021] Optionally, the file is a programming file used for vehicle system programming, and the method further includes:

[0022] determining a programming time for each vehicle system, and determining a number of replaceable systems within the preset unit time based on the programming time;

[0023] The first threshold is determined based on the number of replaceable systems and the number of programming files corresponding to each of the vehicle systems.

[0024] Optionally, the file access control method further includes:

[0025] Obtain the total number of vehicle systems of the target vehicle model and a predefined ratio of replaceable vehicle systems;

[0026] The second threshold is determined based on the proportion of replaceable vehicle systems, the total number of vehicle systems, and the number of programming files corresponding to each vehicle system.

[0027] In a second aspect, the present application discloses a file access control device, which is applied to a server and includes:

[0028] A request acquisition module, configured to acquire an access request sent by a target device for accessing a target file; the access request carries a device identifier of the target device;

[0029] A record acquisition module, configured to acquire historical access records of the target device based on the device identifier;

[0030] The judgment module is used to judge whether the target device meets the preset access control conditions based on the historical access records, and if so, allow the target device to access the target file; if not, deny the target device access to the target file.

[0031] In a third aspect, the present application discloses an electronic device, comprising:

[0032] Memory, used to store computer programs;

[0033] The processor is used to execute the computer program to implement the steps of the aforementioned disclosed file access control method.

[0034] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed file access control method are implemented.

[0035] It can be seen that the present application first obtains the access request sent by the target device for accessing the target file; the access request carries the device identification of the target device; and based on the device identification, the historical access record of the target device is obtained; then, based on the historical access record, it is determined whether the target device meets the preset access control conditions; if so, the target device is allowed to access the target file; if not, the target device is denied access to the target file. It can be seen that when the server obtains the access request sent by the target device, it obtains the historical access record of the target device through the device identification carried in the access request to determine whether the target device meets the preset access control conditions, and access is allowed only when the access control conditions are met. In this way, the preset access control conditions can prevent the target file from being maliciously accessed. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0037] Figure 1 A flow chart of a file access control method disclosed in this application;

[0038] Figure 2 A flowchart of a specific file access control method disclosed in this application;

[0039] Figure 3 A flowchart of a specific file access control method disclosed in this application;

[0040] Figure 4 This is a structural diagram of a file access control device disclosed in this application;

[0041] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0043] Currently, when a server receives a request from a target device to access a target file, it is easily subject to malicious access. To this end, the embodiments of the present application disclose a file access control method, apparatus, device, and medium that can prevent files from being maliciously accessed.

[0044] See also Figure 1 As shown, the embodiment of the present application discloses a file access control method, which includes:

[0045] Step S11: obtaining an access request sent by a target device for accessing a target file; the access request carries a device identification of the target device.

[0046] In this embodiment, the server obtains an access request sent by the target device for accessing the target file.

[0047] Step S12: Acquire historical access records of the target device based on the device identifier.

[0048] In this embodiment, the historical records corresponding to the target device are obtained through the device identification of the target device. The historical access records record the relevant information of the target device's previous access to the target file. The above-mentioned device identification can be a device serial number, which is not limited in this application.

[0049] Step S13: judging whether the target device satisfies a preset access control condition based on the historical access record; if so, allowing the target device to access the target file; if not, denying the target device access to the target file.

[0050] In this embodiment, historical access records are used to determine whether the target device meets preset access control conditions. Specifically, historical access records can be reviewed to determine whether the target device has accessed the target file, the number of file accesses, the specific time of access, and so on. Based on these historical access records, it is determined whether the device has accessed maliciously, and corresponding access control conditions are set to determine whether the device has accessed the target file. If the target device meets the preset access control conditions, the target device is allowed to access the target file; if the target device does not meet the preset access control conditions, the target device is denied access to the target file. In this way, malicious access to the target file can be prevented.

[0051] It can be seen that the present application first obtains the access request sent by the target device for accessing the target file; the access request carries the device identification of the target device; and based on the device identification, the historical access record of the target device is obtained; then, based on the historical access record, it is determined whether the target device meets the preset access control conditions; if so, the target device is allowed to access the target file; if not, the target device is denied access to the target file. It can be seen that when the server obtains the access request sent by the target device, it obtains the historical access record of the target device through the device identification carried in the access request to determine whether the target device meets the preset access control conditions, and access is allowed only when the access control conditions are met. In this way, the preset access control conditions can prevent the target file from being maliciously accessed.

[0052] See also Figure 2 As shown, the embodiment of this application discloses a specific file access control method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically, it includes:

[0053] Step S21: obtaining an access request sent by a target device for accessing a target file; the access request carries a device identification of the target device.

[0054] Step S22: Acquire historical access records of the target device based on the device identifier.

[0055] Step S23: Based on the historical access records, determine whether the file access volume of the target device within a preset unit time reaches a first threshold; if so, determine that the target device does not meet the preset access control condition; if not, deny the target device access to the target file.

[0056] In this embodiment, the target device's historical access records are checked for file access volume within a preset unit time, and then a determination is made as to whether the file access volume has reached a first threshold. If so, the target device is determined to not meet the preset access control conditions, and therefore, access to the target file by the target device is denied. The target file is a programming file, which is used for system programming and has a high degree of confidentiality. In this embodiment, the file access control method further includes:

[0057] determining a programming time for each vehicle system, and determining a number of replaceable systems within the preset unit time based on the programming time;

[0058] The first threshold is determined based on the number of replaceable systems and the number of programming files corresponding to each of the vehicle systems.

[0059] It will be appreciated that the first threshold is set based on programming time. It indicates the maximum number of programming files that can be programmed by any target device within a preset unit time. In this embodiment, the unit time can be the total operating time of the target device in a day. Specifically, the target device can be a vehicle diagnostic device. For example, assuming that the programming time of each vehicle system is approximately 20 minutes, the number of programming files per vehicle system is 5, and the total operating time of the diagnostic device in a day is 12 hours, then the number of systems that can be replaced by the same diagnostic device within 12 operating hours is 36. Consequently, the maximum number of programming files that can be downloaded by a diagnostic device within 12 operating hours is 36 × 5 = 180. Therefore, the first threshold can be set to 180. After determining the first threshold, the target device's file access volume within the preset unit time is determined based on historical access records to determine whether it has reached the first threshold. If so, it is determined that the target device does not meet the preset access control conditions, and therefore, the target device is denied access to the target file.

[0060] In another specific embodiment, the above-mentioned determination of whether the target device satisfies the preset access control condition based on the historical access record includes: determining whether the target device's file access volume for the target vehicle model information within a preset unit time has reached a second threshold based on the historical access record; if so, determining that the target device does not meet the preset access control condition. It is understandable that the target device can specifically be a vehicle diagnostic device, and the access request can carry not only the device identification of the diagnostic device but also the target vehicle model information. The target vehicle model information can specifically be a vehicle identification number (VIN code). The VIN is a set of seventeen letters or numbers, a unique number used on a car, which can identify the car's manufacturer, engine, chassis serial number, and other performance information. After the server obtains the historical access record corresponding to the diagnostic device through the device identification, it checks whether the target vehicle model information exists in the historical access record. If so, it means that the diagnostic device has accessed the programming file for the target vehicle model information within the unit time. Then, it is determined whether the file access volume of the diagnostic device for the target vehicle model information within a preset unit time reaches a second threshold. If it reaches the second threshold, it is determined that the diagnostic device does not meet the preset access control conditions. Therefore, the diagnostic device is denied access to the target file.

[0061] It should be noted that the above file access control method also includes:

[0062] Obtain the total number of vehicle systems of the target vehicle model and a predefined ratio of replaceable vehicle systems;

[0063] The second threshold is determined based on the proportion of replaceable vehicle systems, the total number of vehicle systems, and the number of programming files corresponding to each vehicle system.

[0064] The second threshold is set based on the number of vehicle systems. It indicates the maximum number of programming files that a diagnostic device can download for a target vehicle model within a preset unit of time. For example, assuming a vehicle model has 24 vehicle systems, each corresponding to 5 programming files, and the ratio of replaceable vehicle systems is set to 80%, meaning the target vehicle model has 80% of its total number of replaceable systems, the maximum number of programming files that a diagnostic device can download for a target vehicle model is 24 x 5 x 80% = 96. Therefore, the second threshold can be set to 96.

[0065] It can be understood that the server pre-sets an access control condition library for accessing the target file for the target device, and the access control condition library includes a first threshold condition for controlling the file access volume of the target device within a preset unit time and a second threshold condition for controlling the file access volume of the target device to the target vehicle model information within a preset unit time.

[0066] For more specific processing procedures of the above steps S21 and S22, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be elaborated here.

[0067] It can be seen that in the embodiment of the present application, the above-mentioned determination of whether the diagnostic device meets the preset access control conditions based on the historical access records includes: determining whether the file access volume of the diagnostic device within a preset unit time reaches a first threshold based on the historical access records; if so, determining that the diagnostic device does not meet the preset access control conditions, and also includes: determining whether the file access volume for the target vehicle model information of the diagnostic device within a preset unit time reaches a second threshold based on the historical access records; if so, determining that the diagnostic device does not meet the preset access control conditions. By comparing the file access volume of the diagnostic device within a preset unit time or the file access volume of the diagnostic device for the target vehicle model information within a preset unit time with the corresponding first threshold or second threshold, it is determined whether the diagnostic device meets the preset access control conditions, and then determining whether the diagnostic device is allowed to access the target file. In this way, malicious access to the target file can be avoided.

[0068] See also Figure 3 As shown, the embodiment of this application discloses a specific file access control method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically, it includes:

[0069] Step S31: obtaining an access request sent by a diagnostic device for accessing a target file; the access request carries a device identification of the diagnostic device.

[0070] Step S32: Acquire historical access records of the diagnostic device based on the device identification.

[0071] Step S33: Based on the historical access records, determine whether the first file access volume of the diagnostic device within the preset unit time reaches a first threshold, and obtain a first judgment result; based on the historical access records, determine whether the second file access volume for the target vehicle model information of the diagnostic device within the preset unit time reaches a second threshold, and obtain a second judgment result.

[0072] In this embodiment, it is necessary to determine whether the first file access volume of the diagnostic device within a preset unit time reaches a first threshold based on historical access records and obtain a first judgment result, and it is also necessary to determine whether the second file access volume for the target vehicle model information of the diagnostic device within a preset unit time reaches a second threshold based on historical access records and obtain a second judgment result.

[0073] Step S34: determining whether the diagnostic device meets a preset access control condition based on the first judgment result and the second judgment result.

[0074] In this embodiment, the determination of whether the diagnostic device satisfies the preset access control condition based on the first and second judgment results includes: if the first judgment result is that the first file access volume reaches the first threshold, and / or the second judgment result is that the second file access volume reaches the second threshold, then determining that the diagnostic device does not satisfy the preset access control condition. It is understood that when comparing with the second threshold, it is also necessary to ensure that the current file access volume of the diagnostic device to the programming file satisfies the first threshold. Therefore, if the current second file access volume of the diagnostic device to the programming file for the target vehicle model information is less than the second threshold, but the current second file access volume of the diagnostic device to the programming file exceeds the first threshold, then the diagnostic device is denied access to the programming file.

[0075] Step S35: If the conditions are met, the diagnostic device is allowed to access the target file; if not, the diagnostic device is denied access to the target file.

[0076] In this embodiment, when the first file access volume does not reach the first threshold and the second file access volume does not reach the second threshold, the diagnostic device is allowed to access the target file; otherwise, the diagnostic device is denied access to the target file.

[0077] For more specific processing procedures of the above steps S31 and S32, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be elaborated here.

[0078] It can be seen that in the embodiment of the present application, it is necessary to judge whether the first file access volume of the diagnostic device within the preset unit time has reached the first threshold value based on the historical access records and obtain the first judgment result, and it is also necessary to judge whether the second file access volume for the target vehicle model information of the diagnostic device within the preset unit time has reached the second threshold value based on the historical access records and obtain the second judgment result. If the first judgment result is that the first file access volume has reached the first threshold value, and / or the second judgment result is that the second file access volume has reached the second threshold value, it is determined that the diagnostic device does not meet the preset access control conditions, and then the diagnostic device is denied access to the target file. In this way, the target file can be prevented from being maliciously accessed.

[0079] See also Figure 4 As shown, the embodiment of the present application discloses a file access control device, which is applied to a server and includes:

[0080] The request acquisition module 11 is used to acquire an access request sent by a target device for accessing a target file; the access request carries a device identification of the target device;

[0081] A record acquisition module 12, configured to acquire historical access records of the target device based on the device identifier;

[0082] The judgment module 13 is used to judge whether the target device meets the preset access control conditions based on the historical access records. If so, the target device is allowed to access the target file; if not, the target device is denied access to the target file.

[0083] It can be seen that the present application first obtains the access request sent by the target device for accessing the target file; the access request carries the device identification of the target device; and based on the device identification, the historical access record of the target device is obtained; then, based on the historical access record, it is determined whether the target device meets the preset access control conditions; if so, the target device is allowed to access the target file; if not, the target device is denied access to the target file. It can be seen that when the server obtains the access request sent by the target device, it obtains the historical access record of the target device through the device identification carried in the access request to determine whether the target device meets the preset access control conditions, and access is allowed only when the access control conditions are met. In this way, the preset access control conditions can prevent the target file from being maliciously accessed.

[0084] In some specific embodiments, the judgment module 13 may specifically include:

[0085] A first judging unit, configured to judge whether the file access volume of the target device within a preset unit time reaches a first threshold based on the historical access record;

[0086] The first determining unit is configured to determine that the target device does not meet a preset access control condition if the condition is reached.

[0087] In some specific embodiments, the judgment module 13 may specifically include:

[0088] A second judgment unit is configured to judge, based on the historical access records, whether the file access volume of the target device for the target vehicle model information within a preset unit time reaches a second threshold;

[0089] The second determining unit is configured to determine, if reached, that the target device does not satisfy a preset access control condition.

[0090] In some specific embodiments, the judgment module 13 may specifically include:

[0091] a first result obtaining unit, configured to determine, based on the historical access records, whether the number of first file accesses of the target device within a preset unit time reaches a first threshold, and obtain a first determination result;

[0092] A second result obtaining unit is configured to determine, based on the historical access records, whether the number of accesses to the second file of the target vehicle model information by the target device within the preset unit time reaches a second threshold, and obtain a second determination result;

[0093] The third judgment unit is configured to judge whether the target device satisfies a preset access control condition based on the first judgment result and the second judgment result.

[0094] In some specific embodiments, the third judgment unit may specifically include:

[0095] The third determining unit is configured to determine that the target device does not meet a preset access control condition if the first judgment result is that the first file access volume reaches the first threshold, and / or the second judgment result is that the second file access volume reaches the second threshold.

[0096] In some specific embodiments, the file access control device may further include:

[0097] an information determining unit, configured to determine a programming time for each vehicle system and, based on the programming time, determine a number of replaceable systems within the preset unit time;

[0098] The first threshold determination unit is configured to determine the first threshold based on the number of replaceable systems and the number of programming files corresponding to each of the vehicle systems.

[0099] In some specific embodiments, the file access control device may further include:

[0100] an information acquisition unit, configured to acquire the total number of vehicle systems of a target vehicle model and a predefined ratio of replaceable vehicle systems;

[0101] The second threshold determination unit is configured to determine the second threshold based on the proportion of replaceable vehicle systems, the total number of vehicle systems, and the number of programming files corresponding to each vehicle system.

[0102] Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Specifically, the device may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the file access control method performed by the electronic device disclosed in any of the aforementioned embodiments.

[0103] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0104] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0105] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.

[0106] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to enable the processor 21 to calculate and process the massive amount of data 223 in the memory 22. The operating system 221 can be Windows, Unix, Linux, etc. In addition to including computer programs capable of implementing the file access control method performed by the electronic device 20 as disclosed in any of the aforementioned embodiments, the computer programs 222 can further include computer programs capable of performing other specific tasks. The data 223 can include data received by the electronic device from external devices, as well as data collected by its own input and output interface 25.

[0107] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the method steps performed in the file access control process disclosed in any of the aforementioned embodiments are implemented.

[0108] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0109] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0110] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0111] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0112] The above is a detailed introduction to the file access control method, device, equipment and storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

Claims

1. A file access control method, characterized in that: Applicable to servers, including: Obtaining an access request sent by a target device for accessing a target file; the access request carries a device identification of the target device; wherein the target device is a vehicle diagnostic device, the target file is a programming file for vehicle system programming, and the device identification is a device serial number; Acquire historical access records of the target device based on the device identifier; Determining whether the target device meets a preset access control condition based on the historical access record; if so, allowing the target device to access the target file; if not, denying the target device access to the target file; The determining whether the target device satisfies a preset access control condition based on the historical access record includes: Determining, based on the historical access records, whether the file access volume of the target vehicle type information by the target device within a preset unit time reaches a second threshold; If so, it is determined that the target device does not meet the preset access control conditions; The method further comprises: Obtain the total number of vehicle systems of the target vehicle model and a predefined ratio of replaceable vehicle systems; The second threshold is determined based on the proportion of replaceable vehicle systems, the total number of vehicle systems, and the number of programming files corresponding to each vehicle system.

2. The file access control method according to claim 1, wherein: The determining whether the target device meets a preset access control condition based on the historical access record further includes: Determining whether the file access volume of the target device within a preset unit time reaches a first threshold based on the historical access record; If so, it is determined that the target device does not meet the preset access control condition.

3. The file access control method according to claim 1, wherein: The determining whether the target device meets a preset access control condition based on the historical access record further includes: Determine, based on the historical access records, whether the number of first file accesses by the target device within a preset unit time reaches a first threshold, and obtain a first determination result; Determine, based on the historical access records, whether the target device's access volume to the second file for the target vehicle model information within the preset unit time reaches a second threshold, and obtain a second determination result; It is determined whether the target device meets a preset access control condition based on the first judgment result and the second judgment result.

4. The file access control method according to claim 3, wherein: The determining whether the target device satisfies a preset access control condition based on the first determination result and the second determination result includes: If the first judgment result is that the first file access volume reaches the first threshold, and / or the second judgment result is that the second file access volume reaches the second threshold, it is determined that the target device does not meet the preset access control condition.

5. The file access control method according to claim 2, wherein: The file is a programming file used for vehicle system programming. The method further includes: determining a programming time for each vehicle system, and determining a number of replaceable systems within the preset unit time based on the programming time; The first threshold is determined based on the number of replaceable systems and the number of programming files corresponding to each of the vehicle systems.

6. A file access control device, characterized in that: Applicable to servers, including: a request acquisition module, configured to acquire an access request sent by a target device for accessing a target file; the access request carries a device identification of the target device; wherein the target device is a vehicle diagnostic device, the target file is a programming file for vehicle system programming, and the device identification is a device serial number; A record acquisition module, configured to acquire historical access records of the target device based on the device identifier; a judgment module, configured to judge whether the target device satisfies a preset access control condition based on the historical access record, and if so, allow the target device to access the target file; if not, deny the target device access to the target file; The judgment module specifically includes: A second judgment unit is configured to judge, based on the historical access records, whether the file access volume of the target device for the target vehicle model information within a preset unit time reaches a second threshold; a second determining unit, configured to determine, if reached, that the target device does not satisfy a preset access control condition; The file access control device further includes: an information acquisition unit, configured to acquire the total number of vehicle systems of a target vehicle model and a predefined ratio of replaceable vehicle systems; The second threshold determination unit is configured to determine the second threshold based on the proportion of replaceable vehicle systems, the total number of vehicle systems, and the number of programming files corresponding to each vehicle system.

7. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the file access control method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the steps of the file access control method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Automobile data diagnosis method and device

    CN110989564A

  • Data flow limiting method and device, electronic equipment and readable storage medium

    CN113645310A