WO2020113947A1 - Network file deletion method and device, computer device and storage medium - Google Patents

Network file deletion method and device, computer device and storage medium Download PDF

Info

Publication number
WO2020113947A1
WO2020113947A1 PCT/CN2019/093137 CN2019093137W WO2020113947A1 WO 2020113947 A1 WO2020113947 A1 WO 2020113947A1 CN 2019093137 W CN2019093137 W CN 2019093137W WO 2020113947 A1 WO2020113947 A1 WO 2020113947A1
Authority
WO
WIPO (PCT)
Prior art keywords
network file
file
hash value
network
identification code
Prior art date
Application number
PCT/CN2019/093137
Other languages
French (fr)
Chinese (zh)
Inventor
龙飞
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201811472659.1A external-priority patent/CN109597798B/en
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020113947A1 publication Critical patent/WO2020113947A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems

Definitions

  • the present application relates to the field of computer data processing, and in particular, to a network file deletion method, device, computer equipment, and computer-readable storage medium.
  • cloud service applications users can upload and save files to the server to achieve file backup, file sharing and other functions. If a large number of users frequently upload or delete the same file, the server will be in the file reading and writing state for a long time, occupying the server a lot of processing resources and bandwidth resources, not only causing problems such as excessive server load and waste of resources, but also Not conducive to improving user experience.
  • Embodiments of the present application provide a network file deletion method, device, computer equipment, and storage medium, which are intended to solve problems such as excessive server load and waste of resources caused by frequent reading and writing of network files.
  • an embodiment of the present application provides a method for deleting a network file, which includes: receiving an operation instruction of a network file from a client and updating the reference count corresponding to the network file according to the operation instruction; and determining the network file Whether the file attribute of the file is a shared file; if the file attribute of the network file is a shared file, check whether the reference count is equal to zero; if the reference count is equal to zero, delete the network file according to the heat value of the network file operating.
  • an embodiment of the present application provides a network file deletion apparatus, which includes: a first receiving unit configured to receive an operation instruction of a client on a network file and update a reference corresponding to the network file according to the operation instruction Count; a first judgment unit, used to judge whether the file attribute of the network file is a shared file; a detection unit, used to detect whether the reference count is equal to zero if the file attribute of the network file is a shared file; a deletion unit, It is used to delete the network file according to the heat value of the network file if the reference count is equal to zero.
  • an embodiment of the present application further provides a computer device, which includes a memory and a processor, a computer program is stored on the memory, and the processor implements the computer program to implement the method according to the first aspect described above .
  • an embodiment of the present application further provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the method according to the first aspect described above can be implemented.
  • FIG. 1 is a schematic flowchart of a network file deletion method according to an embodiment of the application
  • FIG. 2 is a schematic diagram of an application scenario of a method for deleting a network file provided by an embodiment of this application;
  • FIG. 3 is a schematic flowchart of a network file deletion method according to an embodiment of the application.
  • FIG. 4 is a schematic flowchart of a method for deleting a network file according to an embodiment of the application
  • FIG. 5 is a schematic flowchart of a method for deleting a network file according to an embodiment of the application
  • FIG. 6 is a schematic flowchart of a method for deleting a network file according to an embodiment of the application
  • FIG. 7 is a schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application.
  • FIG. 8 is another schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application.
  • FIG. 9 is another schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application.
  • FIG. 10 is another schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application.
  • FIG. 11 is another schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application.
  • FIG. 12 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • FIG. 1 and FIG. 2 are a schematic flowchart and an application scenario diagram of a network file deletion method according to an embodiment of the present application.
  • the network file deletion method is applied to the server side 20, which may be an independent server or a server cluster composed of multiple servers.
  • the server 20 can communicate with the client 10 through network communication to achieve data interaction.
  • the client 10 may be an electronic terminal such as a mobile phone, a tablet computer, or a smart bracelet.
  • the network file deletion method includes but is not limited to steps S110-S140.
  • S110 Receive an operation instruction of a client on a network file and update the reference count corresponding to the network file according to the operation instruction.
  • the network file is a network file uploaded by the user to the server through the client.
  • the network file is deleted in the server.
  • the user can access the network file even when the client is switched. Terminal access to the same network file function.
  • the reference count is the number of times the same network file is cited.
  • the initial value of the reference count is 0.
  • the types of operation instructions include create instructions and delete instructions.
  • Step S110 includes but is not limited to steps S111-S112b.
  • S111 Receive an operation instruction of a client on a network file and obtain the type of the operation instruction.
  • the type of the operation instruction includes a creation instruction and a deletion instruction.
  • the creation instruction is used to create a network file on the server side; the deletion instruction is used to delete the network file on the server side.
  • S112a If the type of the received operation instruction is a create instruction, increment the reference count by one.
  • the operation instruction received by the server on the network file by the user A through the client is a creation instruction, that is, the user A creates the network file A for the first time in the server.
  • the reference count corresponding to the network file A is increased by one, because the initial value of the reference count is 0, by updating the reference count from the default value of 0 to 1, the updated reference count is the current reference of the network file A count. If user A or other users continue to create the same network file A on the server side, add one to the current reference count to obtain the updated reference count. For example, when user A creates the same network file A on the server side, or user B creates the same network file A on the server side, the updated reference count is 2 by incrementing the reference count by one.
  • S112b If the type of the received operation instruction is a delete instruction, decrement the reference count by one.
  • the reference count is decremented by one to update the reference count.
  • S120 Determine whether the file attribute of the network file is a shared file.
  • the file attributes of the network file include shared files and non-shared files.
  • step S120 includes but is not limited to S121-S123.
  • S121 Obtain a first hash value corresponding to a network file and a user identification code, and determine whether a second hash value that is the same as the first hash value exists in the preset file index database.
  • the first hash value corresponding to the network file may be calculated by the client or the server through a preset hash algorithm.
  • the user identification code may be the user's login account or the machine code of the client.
  • the preset file index database is used to store the hash values and user identification codes of all network files in the server.
  • the hash value refers to a binary value obtained by calculating a network file through a preset hash algorithm.
  • the preset hash algorithm may include a strong hash algorithm and a weak hash algorithm.
  • the strong hash algorithm includes a secure hash algorithm (English: Secure Hash Algorithm, abbreviated as: SHA1), SHA256, and message digest (Message Digest Algorithm, abbreviated as: MD5), etc.
  • the weak hash algorithm includes cyclic redundancy check (English: Cyclic Redundancy Check, abbreviated as: CRC), XX hash (English: XXHash), Mumur hash (English: MumurHash) and so on.
  • CRC Cyclic Redundancy Check
  • XX hash English: XXHash
  • Mumur hash English: MumurHash
  • S122 If there is a second hash value that is the same as the first hash value in the preset file index database, obtain a user identification code corresponding to the second hash value, and determine that the second hash value corresponds Is the same as the user identification code of the network file.
  • each network file corresponds to the existence of a unique hash value and user identification code. Assuming that the hash value corresponding to the current network file is the first hash value, if there is a second hash value that is the same as the first hash value in the preset index database, it indicates that the current network file corresponds to the second hash value Is the same file, and it is determined whether the user identification code corresponding to the second hash value is the same as the user identification code of the network file.
  • the user identification code corresponding to the second hash value is different from the user identification code corresponding to the network file, it indicates that the network file and the network file corresponding to the second hash value are the same file, and The user corresponding to the second hash value and the user corresponding to the network file are not the same user, and then the file attribute of the network file is determined to be a shared file.
  • the user identification code corresponding to the second hash value is the same as the user identification code of the network file, it indicates that the network file and the network file corresponding to the second hash value are the same file, and the second hash value The corresponding user and the user corresponding to the network file are the same user, and it is determined that the file attribute of the network file is a non-shared file.
  • the reference count is updated, and it is detected whether the reference count is equal to zero.
  • the reference count is equal to zero, it indicates that all users have deleted the network file.
  • the user can delete the network file according to the heat value of the network file. Delete network files. If the reference count is not equal to zero, the process ends.
  • step S140 includes but is not limited to S141-S143b.
  • the heat value of the network file is used to indicate the sharing heat of the network file.
  • step S141 includes but is not limited to S1411-S1413.
  • S1411 Calculate the number of times the network file is created within a preset time period and obtain the user identification code corresponding to the creation of the network file.
  • the creation instructions corresponding to the network file are counted to calculate the number of times the network file is created within a preset time period, where the preset time period can be set according to actual needs, for example, the preset time period is 7 days .
  • the number of times that the same user repeatedly creates the network file is obtained by calculating the same number of user identification codes corresponding to the network file.
  • the result is the heat value.
  • the preset heat threshold may be set according to requirements. Assume that the preset heat threshold is 100. If the heat value of the network file is greater than 100 in the past seven days, it is determined that the heat value is greater than a preset heat threshold.
  • the heat value is greater than the preset heat threshold, it indicates that the network file has a higher heat. After all users have deleted the network file, the chance of recreating the network file in a short time is relatively high. Large, and then delete the network file after the preset first time threshold is triggered.
  • the preset first time threshold can be set according to actual needs, for example, 7 days, that is, if the heat value is greater than the preset heat threshold, the network file is deleted after 7 days.
  • the implementation of the embodiments of the present application can effectively reduce the repeated reading and writing of the same file on the server side caused by the user deleting or creating a shared file, effectively reducing the processing pressure on the server side and saving bandwidth resources on the server side.
  • the heat value is less than or equal to the preset heat threshold, it indicates that the heat of the network file is low.
  • the network file is re-created within a short time. The probability is small, and then the network file is deleted after the preset second time threshold is triggered.
  • the preset second time threshold can be set according to actual needs, and the preset second time threshold is less than the preset first time threshold, assuming that the preset first time threshold is 7 days , The preset second time threshold may be set to 3 days, etc.
  • a relative time threshold is set according to the heat value of the network file, and the network file is deleted according to the trigger of the time threshold, and the storage operation of the network file is reasonably achieved. Effectively reduce the repeated reading and writing of the same file on the server side caused by the user deleting or creating a shared file, which not only effectively reduces the processing pressure on the server side, but also effectively uses the storage space on the server side to prevent waste of resources.
  • FIG. 7 is a schematic block diagram of a network file deletion apparatus 100 provided by an embodiment of the present application. As shown in FIG. 7, corresponding to the above network file deletion method, the present application also provides a network file deletion device 100.
  • the network file deleting apparatus 100 includes a unit for performing the above network file deleting method.
  • the apparatus may be configured in a server side, which may be an independent server or a server cluster composed of multiple servers.
  • the network file deleting device 100 includes a first receiving unit 110, a first determining unit 120, a detecting unit 130 and a deleting unit 140.
  • the first receiving unit 110 is configured to receive an operation instruction of the client on the network file and update the reference count corresponding to the network file according to the operation instruction.
  • the first receiving unit 110 includes a type receiving unit 111, a first processing unit 112a, and a second processing unit 112b.
  • the type receiving unit 111 is configured to receive an operation instruction of the client on the network file and acquire the type of the operation instruction.
  • the first processing unit 112a is configured to increase the reference count by one if the type of the received operation instruction is a creation instruction.
  • the second processing unit 112b is configured to decrement the reference count by one if the type of the received operation instruction is a delete instruction.
  • the first determining unit 120 is configured to determine whether the file attribute of the network file is a shared file.
  • the first judgment unit 120 includes a second acquisition unit 121, a second judgment unit 122 and a first determination unit 123.
  • the second obtaining unit 121 is configured to obtain the first hash value corresponding to the network file and the user identification code, and determine whether the preset file index database has a second hash value that is the same as the first hash value.
  • the second judgment unit 122 is configured to obtain a user identification code corresponding to the second hash value if the preset file index database has the same second hash value as the first hash value, and judge the Whether the user identification code corresponding to the second hash value is the same as the user identification code of the network file.
  • the first determining unit 123 is configured to determine that the file attribute of the network file is a shared file if the user identification code corresponding to the second hash value is different from the user identification code corresponding to the network file. If the user identification code corresponding to the second hash value is the same as the user identification code of the network file, it is determined that the file attribute of the network file is a non-shared file.
  • the detection unit 130 is configured to detect whether the reference count is equal to zero if the file attribute of the network file is a shared file.
  • the deleting unit 140 is configured to delete the network file according to the heat value of the network file if the reference count is equal to zero.
  • the deletion unit 140 includes a first calculation unit 141, a third judgment unit 142, a third processing unit 143a, and a fourth processing unit 143b.
  • the first calculation unit 141 is used to calculate the heat value of the network file.
  • the first calculation unit 141 includes a second calculation unit 1411, a third calculation unit 1412, and a fourth calculation unit 1413.
  • the second calculation unit 1411 is configured to calculate the number of times the network file is created within a preset time period and acquire the user identification code corresponding to the creation of the network file.
  • the third calculation unit 1412 is configured to calculate the same number of user identification codes corresponding to the network file.
  • the fourth calculation unit 1413 is configured to calculate the heat value according to the number of creation times and the same number.
  • the third determining unit 142 is configured to determine whether the heat value is greater than a preset heat threshold.
  • the third processing unit 143a is configured to delete the network file after the preset first time threshold is triggered if the heat value is greater than the preset heat threshold.
  • the fourth processing unit 143b is configured to delete the network file after the preset second time threshold is triggered if the heat value is less than or equal to the preset heat threshold.
  • the above apparatus 100 may be implemented in the form of a computer program, and the computer program may run on the computer device shown in FIG. 12.
  • the computer device 500 may be a terminal.
  • the terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, and other electronic devices with communication functions.
  • the computer device 500 includes a processor 520, a memory, and a network interface 550 connected through a system bus 510, where the memory may include a non-volatile storage medium 530 and an internal memory 540.
  • the non-volatile storage medium 530 may store an operating system 531 and a computer program 532. When the computer program 532 is executed, it may cause the processor 520 to execute a network file deletion method.
  • the processor 520 is used to provide computing and control capabilities and support the operation of the entire computer device 500.
  • the internal memory 540 provides an environment for running a computer program in a non-volatile storage medium.
  • the processor 520 may execute a network file deletion method.
  • the network interface 550 is used for network communication with other devices.
  • the schematic block diagram of the computer device 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 500 to which the solution of the present application is applied.
  • the specific computer device 500 It may include more or less components than shown in the figure, or combine certain components, or have a different arrangement of components.
  • the processor 520 is used to run the program code stored in the memory, so as to implement the network file deletion method of the embodiment of the present application.
  • the processor 520 may be a central processing unit (Central Processing Unit, CPU), and the processor 520 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), Application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor.
  • the schematic block diagram of the computer device 500 does not constitute a limitation on the computer device 500, and may include more or less components than shown, or combine certain components, or arrange different components.
  • a computer-readable storage medium stores a computer program, where the computer program includes program instructions.
  • the processor is caused to execute the steps of the network file deletion method described in the above embodiments.
  • the computer-readable storage medium may be various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk.
  • program codes such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of each unit is only a logical function division, and there may be other division methods in actual implementation.
  • more than one unit or component may be combined or integrated into another system, or some features may be ignored or not implemented.
  • the steps in the method of the embodiment of the present application may be adjusted, merged, and deleted sequentially according to actual needs.
  • the units in the device of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
  • the functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application essentially or part of the contribution to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium
  • several instructions are included to enable a computer device (which may be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

An embodiment of the present application provides a network file deletion method and device, a computer device and a storage medium. The method is applied to the technical field of cloud storage, and comprises the steps of receiving an operation instruction from a client on a network file and updating a reference count corresponding to the network file according to the operation instruction; judging whether the file attribute of the network file is a shared file; if yes, detecting whether the reference count equal to zero; if yes, performing delete operation on the network file according to the popularity value of the network file.

Description

网络文件删除方法、装置、计算机设备及存储介质Network file deletion method, device, computer equipment and storage medium
本申请要求于2018年12月4日提交中国专利局、申请号为CN201811472659.1、申请名称为“网络文件删除方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the Chinese Patent Office on December 4, 2018, with the application number CN201811472659.1, and the application name is "network file deletion method, device, computer equipment and storage medium", and all of its content Incorporated by reference in this application.
技术领域Technical field
本申请涉及计算机数据处理领域,尤其涉及一种网络文件删除方法、装置、计算机设备及计算机可读存储介质。The present application relates to the field of computer data processing, and in particular, to a network file deletion method, device, computer equipment, and computer-readable storage medium.
背景技术Background technique
随着互联网技术的不断发展以及云计算的崛起,网络数据越来越丰富,云服务越来越得到普及。在云服务应用中,用户可将文件上传并保存至服务器以实现文件备份、文件分享等功能。若出现大量用户频繁对同一个文件进行上传或者删除等操作,会导致服务器长时间处于文件读写状态,占用服务器大量处理资源以及带宽资源,不仅导致出现服务器负载过大,资源浪费等问题,而且不利于提升用户体验。With the continuous development of Internet technology and the rise of cloud computing, network data is becoming more and more abundant, and cloud services are becoming more and more popular. In cloud service applications, users can upload and save files to the server to achieve file backup, file sharing and other functions. If a large number of users frequently upload or delete the same file, the server will be in the file reading and writing state for a long time, occupying the server a lot of processing resources and bandwidth resources, not only causing problems such as excessive server load and waste of resources, but also Not conducive to improving user experience.
发明内容Summary of the invention
本申请实施例提供了一种网络文件删除方法、装置、计算机设备及存储介质,旨在解决因网络文件频繁读写而导致的服务器负载过大、资源浪费等问题。Embodiments of the present application provide a network file deletion method, device, computer equipment, and storage medium, which are intended to solve problems such as excessive server load and waste of resources caused by frequent reading and writing of network files.
第一方面,本申请实施例提供了一种网络文件删除方法,其包括:接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数;判断所述网络文件的文件属性是否为共享文件;若所述网络文件的文件属性为共享文件,检测所述引用计数是否等于零;若所述引用计数等于零,根据所述网络文件的热度值对所述网络文件进行删除操作。In a first aspect, an embodiment of the present application provides a method for deleting a network file, which includes: receiving an operation instruction of a network file from a client and updating the reference count corresponding to the network file according to the operation instruction; and determining the network file Whether the file attribute of the file is a shared file; if the file attribute of the network file is a shared file, check whether the reference count is equal to zero; if the reference count is equal to zero, delete the network file according to the heat value of the network file operating.
第二方面,本申请实施例提供了一种网络文件删除装置,其包括:第一接收单元,用于接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数;第一判断单元,用于判断所述网络文件的文件属性 是否为共享文件;检测单元,用于若所述网络文件的文件属性为共享文件,检测所述引用计数是否等于零;删除单元,用于若所述引用计数等于零,根据所述网络文件的热度值对所述网络文件进行删除操作。In a second aspect, an embodiment of the present application provides a network file deletion apparatus, which includes: a first receiving unit configured to receive an operation instruction of a client on a network file and update a reference corresponding to the network file according to the operation instruction Count; a first judgment unit, used to judge whether the file attribute of the network file is a shared file; a detection unit, used to detect whether the reference count is equal to zero if the file attribute of the network file is a shared file; a deletion unit, It is used to delete the network file according to the heat value of the network file if the reference count is equal to zero.
第三方面,本申请实施例还提供了一种计算机设备,其包括存储器及处理器,所述存储器上存储有计算机程序,所述处理器执行所述计算机程序时实现上述第一方面所述方法。In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, a computer program is stored on the memory, and the processor implements the computer program to implement the method according to the first aspect described above .
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序当被处理器执行时可实现上述第一方面所述方法。According to a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the method according to the first aspect described above can be implemented.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1为本申请一实施例提供的一种网络文件删除方法的流程示意图;FIG. 1 is a schematic flowchart of a network file deletion method according to an embodiment of the application;
图2为本申请一实施例提供的一种网络文件删除方法的应用场景示意图;2 is a schematic diagram of an application scenario of a method for deleting a network file provided by an embodiment of this application;
图3为本申请一实施例提供的一种网络文件删除方法的流程示意图;FIG. 3 is a schematic flowchart of a network file deletion method according to an embodiment of the application;
图4为本申请一实施例提供的一种网络文件删除方法的流程示意图;4 is a schematic flowchart of a method for deleting a network file according to an embodiment of the application;
图5为本申请一实施例提供的一种网络文件删除方法的流程示意图;5 is a schematic flowchart of a method for deleting a network file according to an embodiment of the application;
图6为本申请一实施例提供的一种网络文件删除方法的流程示意图;6 is a schematic flowchart of a method for deleting a network file according to an embodiment of the application;
图7为本申请一实施例提供的一种网络文件删除装置的示意性框图;7 is a schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application;
图8为本申请一实施例提供的一种网络文件删除装置的另一示意性框图;8 is another schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application;
图9为本申请一实施例提供的一种网络文件删除装置的另一示意性框图;9 is another schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application;
图10为本申请一实施例提供的一种网络文件删除装置的另一示意性框图;10 is another schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application;
图11为本申请一实施例提供的一种网络文件删除装置的另一示意性框图;11 is another schematic block diagram of an apparatus for deleting network files according to an embodiment of the present application;
图12为本申请一实施例提供的一种计算机设备的示意性框图。12 is a schematic block diagram of a computer device according to an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清 楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或一个以上其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the terms "including" and "comprising" indicate the presence of described features, wholes, steps, operations, elements, and/or components, but do not exclude one or The presence or addition of more than one other feature, whole, step, operation, element, component, and/or collection thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terminology used in the description of this application is for the purpose of describing particular embodiments only and is not intended to limit this application. As used in the specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.
请参照图1以及图2,其为本申请一实施例提供的一种网络文件删除方法的流程示意图以及应用场景示意图。该网络文件删除方法应用于服务器端20,服务器端20可以为可以是独立的服务器,也可以是多个服务器组成的服务器集群。该服务器端20可通过网络通讯与客户端10进行通讯连接,以实现数据交互。其中,客户端10可以是手机、平板电脑、智能手环等电子终端。Please refer to FIG. 1 and FIG. 2, which are a schematic flowchart and an application scenario diagram of a network file deletion method according to an embodiment of the present application. The network file deletion method is applied to the server side 20, which may be an independent server or a server cluster composed of multiple servers. The server 20 can communicate with the client 10 through network communication to achieve data interaction. The client 10 may be an electronic terminal such as a mobile phone, a tablet computer, or a smart bracelet.
其中,该网络文件删除方法包括但不限于步骤S110-S140。Wherein, the network file deletion method includes but is not limited to steps S110-S140.
S110,接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数。S110: Receive an operation instruction of a client on a network file and update the reference count corresponding to the network file according to the operation instruction.
具体地,网络文件为用户通过客户端上传至服务器端的网络文件,网络文件删除于服务器端中,用户基于用户账号以及用户密码,在切换客户端的情况下也能访问到该网络文件,实现了多终端访问同一网络文件的功能。其中,引用计数为同一个网络文件被引用的次数。引用计数的初始值为0。Specifically, the network file is a network file uploaded by the user to the server through the client. The network file is deleted in the server. Based on the user account and user password, the user can access the network file even when the client is switched. Terminal access to the same network file function. Among them, the reference count is the number of times the same network file is cited. The initial value of the reference count is 0.
在一些实施例中,如图3所示,所述操作指令的类型包括创建指令以及删除指令,步骤S110包括但不限于步骤S111-S112b。In some embodiments, as shown in FIG. 3, the types of operation instructions include create instructions and delete instructions. Step S110 includes but is not limited to steps S111-S112b.
S111,接收客户端对网络文件的操作指令并获取所述操作指令的类型。S111. Receive an operation instruction of a client on a network file and obtain the type of the operation instruction.
具体地,所述操作指令的类型包括创建指令以及删除指令,创建指令用于在服务器端中创建网络文件;删除指令用于在服务器端删除网络文件。Specifically, the type of the operation instruction includes a creation instruction and a deletion instruction. The creation instruction is used to create a network file on the server side; the deletion instruction is used to delete the network file on the server side.
S112a,若所接收到的操作指令的类型为创建指令,将所述引用计数加一。S112a: If the type of the received operation instruction is a create instruction, increment the reference count by one.
具体地,假设服务器端所接收到用户甲通过客户端对网络文件的操作指令 为创建指令,即用户甲在服务器端中首次创建了网络文件A。此时将网络文件A对应的引用计数加一,因引用计数的初始值为0,通过将所述引用计数由默认值0更新为1,其更新后的引用计数即为网络文件A当前的引用计数。若用户甲或者其他用户在服务器端中继续创建同一个网络文件A时,在当前的引用计数的基础上加一,以得出更新后的引用计数。例如,用户甲又在服务器端中创建同一个网络文件A,或者用户乙在服务器端中创建同一个网络文件A时,通过将所述引用计数加一,所得出更新后的引用计数为2。Specifically, assume that the operation instruction received by the server on the network file by the user A through the client is a creation instruction, that is, the user A creates the network file A for the first time in the server. At this time, the reference count corresponding to the network file A is increased by one, because the initial value of the reference count is 0, by updating the reference count from the default value of 0 to 1, the updated reference count is the current reference of the network file A count. If user A or other users continue to create the same network file A on the server side, add one to the current reference count to obtain the updated reference count. For example, when user A creates the same network file A on the server side, or user B creates the same network file A on the server side, the updated reference count is 2 by incrementing the reference count by one.
S112b,若所接收到的操作指令的类型为删除指令,将所述引用计数减一。S112b: If the type of the received operation instruction is a delete instruction, decrement the reference count by one.
具体地,若接收到用户通过客户端对所述网络文件发出的操作指令为删除指令,则将所述引用计数减一以更新所述引用计数。Specifically, if the operation instruction issued by the user to the network file through the client is a delete instruction, the reference count is decremented by one to update the reference count.
S120,判断所述网络文件的文件属性是否为共享文件。S120: Determine whether the file attribute of the network file is a shared file.
其中,所述网络文件的文件属性包括共享文件以及非共享文件。The file attributes of the network file include shared files and non-shared files.
在一些实施例中,如图4所示,步骤S120包括但不限于S121-S123。In some embodiments, as shown in FIG. 4, step S120 includes but is not limited to S121-S123.
S121,获取网络文件对应的第一哈希值以及用户标识码,并判断预设的文件索引数据库是否存在与所述第一哈希值相同的第二哈希值。S121: Obtain a first hash value corresponding to a network file and a user identification code, and determine whether a second hash value that is the same as the first hash value exists in the preset file index database.
具体地,网络文件对应的第一哈希值可通过客户端或者服务器端通过预设的哈希算法计算得出。所述用户标识码可以为用户的登陆账号或者客户端的机器编码等。预设的文件索引数据库用于储存服务器端中所有的网络文件的哈希值以及用户标识码。Specifically, the first hash value corresponding to the network file may be calculated by the client or the server through a preset hash algorithm. The user identification code may be the user's login account or the machine code of the client. The preset file index database is used to store the hash values and user identification codes of all network files in the server.
其中,哈希值是指通过预设的哈希算法对网络文件进行计算所得出的二进制值。预设的哈希算法可包括强哈希算法和弱哈希算法。强哈希算法包括安全散列算法(英文:Secure Hash Algorithm,简称:SHA1)、SHA256和信息摘要(Message Digest Algorithm,简称:MD5)等。弱哈希算法包括循环冗余校验(英文:Cyclic Redundancy Check,简称:CRC)、XX哈希(英文:XXHash)、Mumur哈希(英文:MumurHash)等。本申请实施例对哈希算法的选择不作出限制。Among them, the hash value refers to a binary value obtained by calculating a network file through a preset hash algorithm. The preset hash algorithm may include a strong hash algorithm and a weak hash algorithm. The strong hash algorithm includes a secure hash algorithm (English: Secure Hash Algorithm, abbreviated as: SHA1), SHA256, and message digest (Message Digest Algorithm, abbreviated as: MD5), etc. The weak hash algorithm includes cyclic redundancy check (English: Cyclic Redundancy Check, abbreviated as: CRC), XX hash (English: XXHash), Mumur hash (English: MumurHash) and so on. The embodiment of the present application does not limit the choice of the hash algorithm.
S122,若预设的文件索引数据库存在与所述第一哈希值相同的第二哈希值,获取所述第二哈希值对应的用户标识码,并判断所述第二哈希值对应的用户标识码与所述网络文件的用户标识码是否相同。S122: If there is a second hash value that is the same as the first hash value in the preset file index database, obtain a user identification code corresponding to the second hash value, and determine that the second hash value corresponds Is the same as the user identification code of the network file.
其中,每个网络文件均对应存在唯一的哈希值以及用户标识码。假设当前网络文件对应的哈希值为第一哈希值,若在预设的索引数据库中存在与第一哈 希值相同的第二哈希值,表明当前网络文件与第二哈希值对应的网络文件为同一个文件,进而判断第二哈希值对应的用户标识码与所述网络文件的用户标识码是否相同。Among them, each network file corresponds to the existence of a unique hash value and user identification code. Assuming that the hash value corresponding to the current network file is the first hash value, if there is a second hash value that is the same as the first hash value in the preset index database, it indicates that the current network file corresponds to the second hash value Is the same file, and it is determined whether the user identification code corresponding to the second hash value is the same as the user identification code of the network file.
S123,若所述第二哈希值对应的用户标识码与所述网络文件对应的用户标识码不相同,确定所述网络文件的文件属性为共享文件。S123: If the user identification code corresponding to the second hash value is different from the user identification code corresponding to the network file, determine that the file attribute of the network file is a shared file.
具体地,若所述第二哈希值对应的用户标识码与所述网络文件对应的用户标识码不相同,表明所述网络文件与第二哈希值对应的网络文件为同一个文件,且第二哈希值对应的用户与所述网络文件对应的用户不是同一个用户,进而确定所述网络文件的文件属性为共享文件。Specifically, if the user identification code corresponding to the second hash value is different from the user identification code corresponding to the network file, it indicates that the network file and the network file corresponding to the second hash value are the same file, and The user corresponding to the second hash value and the user corresponding to the network file are not the same user, and then the file attribute of the network file is determined to be a shared file.
若所述第二哈希值对应的用户标识码与所述网络文件的用户标识码相同,表明所述网络文件与第二哈希值对应的网络文件为同一个文件,且第二哈希值对应的用户与所述网络文件对应的用户为同一个用户,进而确定所述网络文件的文件属性为非共享文件。If the user identification code corresponding to the second hash value is the same as the user identification code of the network file, it indicates that the network file and the network file corresponding to the second hash value are the same file, and the second hash value The corresponding user and the user corresponding to the network file are the same user, and it is determined that the file attribute of the network file is a non-shared file.
S130,若所述网络文件的文件属性为共享文件,检测所述引用计数是否等于零。S130: If the file attribute of the network file is a shared file, check whether the reference count is equal to zero.
具体地,通过接收用户端对所述网络文件的操作指令,以对所述引用计数进行更新,并检测所述引用计数是否等于零。Specifically, by receiving an operation instruction of the user terminal on the network file, the reference count is updated, and it is detected whether the reference count is equal to zero.
S140,若所述引用计数等于零,根据所述网络文件的热度值对所述网络文件进行删除操作。S140: If the reference count is equal to zero, delete the network file according to the heat value of the network file.
具体地,若所述引用计数等于零,表明所有用户均对该网络文件进行了删除操作,为减少已删除的网络文件对服务器端储存空间的占用,进而根据所述网络文件的热度值对所述网络文件进行删除操作。若所述引用计数不等于零,结束流程。Specifically, if the reference count is equal to zero, it indicates that all users have deleted the network file. In order to reduce the occupation of the server-side storage space by the deleted network file, the user can delete the network file according to the heat value of the network file. Delete network files. If the reference count is not equal to zero, the process ends.
在一些实施例中,如图5所示,步骤S140包括但不限于S141-S143b。In some embodiments, as shown in FIG. 5, step S140 includes but is not limited to S141-S143b.
S141,计算所述网络文件的热度值。S141: Calculate the heat value of the network file.
其中,网络文件的热度值用于表示所述网络文件的共享热度。The heat value of the network file is used to indicate the sharing heat of the network file.
在一些实施例中,如图6所示,步骤S141包括但不限于S1411-S1413。In some embodiments, as shown in FIG. 6, step S141 includes but is not limited to S1411-S1413.
S1411,计算预设时间段内所述网络文件的创建次数以及获取创建所述网络文件对应的用户标识码。S1411: Calculate the number of times the network file is created within a preset time period and obtain the user identification code corresponding to the creation of the network file.
具体地,通过统计所述网络文件对应的创建指令以实现计算预设时间段内 所述网络文件的创建次数,其中预设时间段可根据实际需求进行设定,例如预设时间段为7天。Specifically, the creation instructions corresponding to the network file are counted to calculate the number of times the network file is created within a preset time period, where the preset time period can be set according to actual needs, for example, the preset time period is 7 days .
S1412,计算所述网络文件对应的用户标识码相同的相同个数。S1412: Calculate the same number of user identification codes corresponding to the network file that are the same.
具体地,通过计算所述网络文件对应的用户标识码相同的相同个数以得出同一个用户重复创建该网络文件的次数。Specifically, the number of times that the same user repeatedly creates the network file is obtained by calculating the same number of user identification codes corresponding to the network file.
S1413,根据所述创建次数以及所述相同个数计算得出所述热度值。S1413: Calculate the heat value according to the number of creation times and the same number.
具体地,通过将所述创建次数减去所述相同个数,所得结果即为所述热度值。Specifically, by subtracting the same number of creation times, the result is the heat value.
S142,判断所述热度值是否大于预设的热度阈值。S142: Determine whether the heat value is greater than a preset heat threshold.
具体地,预设的热度阈值可根据需求进行设定。假设预设的热度阈值为100。若在过去七天内,该网络文件的热度值大于100,则确定所述热度值大于预设的热度阈值。Specifically, the preset heat threshold may be set according to requirements. Assume that the preset heat threshold is 100. If the heat value of the network file is greater than 100 in the past seven days, it is determined that the heat value is greater than a preset heat threshold.
S143a,若所述热度值大于预设的热度阈值,在预设的第一时间阈值触发后删除所述网络文件。S143a: If the heat value is greater than a preset heat threshold, delete the network file after the preset first time threshold is triggered.
具体地,若所述热度值大于预设的热度阈值,表明该网络文件的热度较高,在所有用户均对该网络文件进行了删除操作之后,短时间内再重新创建该网络文件的几率较大,进而在预设的第一时间阈值触发后删除所述网络文件。Specifically, if the heat value is greater than the preset heat threshold, it indicates that the network file has a higher heat. After all users have deleted the network file, the chance of recreating the network file in a short time is relatively high. Large, and then delete the network file after the preset first time threshold is triggered.
其中,该预设的第一时间阈值可根据实际需求进行设定,例如设定为7天,即若所述热度值大于预设的热度阈值,在7天后删除所述网络文件。实施本申请实施例,可有效减少因用户删除或者创建共享文件而导致服务器端不断对同一文件的重复读写,有效降低了服务器端的处理压力以及节省了服务器端的带宽资源。The preset first time threshold can be set according to actual needs, for example, 7 days, that is, if the heat value is greater than the preset heat threshold, the network file is deleted after 7 days. The implementation of the embodiments of the present application can effectively reduce the repeated reading and writing of the same file on the server side caused by the user deleting or creating a shared file, effectively reducing the processing pressure on the server side and saving bandwidth resources on the server side.
S143b,若所述热度值小于或者等于预设的热度阈值,在预设的第二时间阈值触发后删除所述网络文件。S143b: If the heat value is less than or equal to a preset heat threshold, delete the network file after the preset second time threshold is triggered.
具体地,若所述热度值小于或者等于预设的热度阈值,表明该网络文件的热度较低,在所有用户均对该网络文件进行了删除操作之后,短时间内再重新创建该网络文件的几率较小,进而在预设的第二时间阈值触发后删除所述网络文件。Specifically, if the heat value is less than or equal to the preset heat threshold, it indicates that the heat of the network file is low. After all users delete the network file, the network file is re-created within a short time. The probability is small, and then the network file is deleted after the preset second time threshold is triggered.
其中,该预设的第二时间阈值可根据实际需求进行设定,且所述预设的第二时间阈值小于所述预设的第一时间阈值,假设预设的第一时间阈值为7天, 则预设的第二时间阈值可以设定为3天等。The preset second time threshold can be set according to actual needs, and the preset second time threshold is less than the preset first time threshold, assuming that the preset first time threshold is 7 days , The preset second time threshold may be set to 3 days, etc.
实施本申请实施例,根据所述网络文件的热度值设定相对的时间阈值,并根据所述时间阈值的触发情况对所述网络文件进行删除操作,合理地实现了对网络文件储存操作,可有效减少因用户删除或者创建共享文件而导致服务器端不断对同一文件的重复读写,既有效减轻了服务器端的处理压力,又有效利用了服务器端的储存空间,防止资源浪费。In the embodiment of the present application, a relative time threshold is set according to the heat value of the network file, and the network file is deleted according to the trigger of the time threshold, and the storage operation of the network file is reasonably achieved. Effectively reduce the repeated reading and writing of the same file on the server side caused by the user deleting or creating a shared file, which not only effectively reduces the processing pressure on the server side, but also effectively uses the storage space on the server side to prevent waste of resources.
图7是本申请实施例提供的一种网络文件删除装置100的示意性框图。如图7所示,对应于以上网络文件删除方法,本申请还提供一种网络文件删除装置100。该网络文件删除装置100包括用于执行上述网络文件删除方法的单元,该装置可以被配置于服务器端中,服务器端可以是独立的服务器,也可以是多个服务器组成的服务器集群。7 is a schematic block diagram of a network file deletion apparatus 100 provided by an embodiment of the present application. As shown in FIG. 7, corresponding to the above network file deletion method, the present application also provides a network file deletion device 100. The network file deleting apparatus 100 includes a unit for performing the above network file deleting method. The apparatus may be configured in a server side, which may be an independent server or a server cluster composed of multiple servers.
具体地,请参阅图7,该网络文件删除装置100包括第一接收单元110、第一判断单元120、检测单元130以及删除单元140。Specifically, referring to FIG. 7, the network file deleting device 100 includes a first receiving unit 110, a first determining unit 120, a detecting unit 130 and a deleting unit 140.
第一接收单元110,用于接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数。The first receiving unit 110 is configured to receive an operation instruction of the client on the network file and update the reference count corresponding to the network file according to the operation instruction.
在一些实施例中,如图8所示,所述第一接收单元110包括类型接收单元111、第一处理单元112a以及第二处理单元112b。In some embodiments, as shown in FIG. 8, the first receiving unit 110 includes a type receiving unit 111, a first processing unit 112a, and a second processing unit 112b.
类型接收单元111,用于接收客户端对网络文件的操作指令并获取所述操作指令的类型。The type receiving unit 111 is configured to receive an operation instruction of the client on the network file and acquire the type of the operation instruction.
第一处理单元112a,用于若所接收到的操作指令的类型为创建指令,将所述引用计数加一。The first processing unit 112a is configured to increase the reference count by one if the type of the received operation instruction is a creation instruction.
第二处理单元112b,用于若所接收到的操作指令的类型为删除指令,将所述引用计数减一。The second processing unit 112b is configured to decrement the reference count by one if the type of the received operation instruction is a delete instruction.
第一判断单元120,用于判断所述网络文件的文件属性是否为共享文件。The first determining unit 120 is configured to determine whether the file attribute of the network file is a shared file.
在一些实施例中,如图9所示,所述第一判断单元120包括第二获取单元121、第二判断单元122以及第一确定单元123。In some embodiments, as shown in FIG. 9, the first judgment unit 120 includes a second acquisition unit 121, a second judgment unit 122 and a first determination unit 123.
第二获取单元121,用于获取网络文件对应的第一哈希值以及用户标识码,并判断预设的文件索引数据库是否存在与所述第一哈希值相同的第二哈希值。The second obtaining unit 121 is configured to obtain the first hash value corresponding to the network file and the user identification code, and determine whether the preset file index database has a second hash value that is the same as the first hash value.
第二判断单元122,用于若预设的文件索引数据库存在与所述第一哈希值相同的第二哈希值,获取所述第二哈希值对应的用户标识码,并判断所述第二哈 希值对应的用户标识码与所述网络文件的用户标识码是否相同。The second judgment unit 122 is configured to obtain a user identification code corresponding to the second hash value if the preset file index database has the same second hash value as the first hash value, and judge the Whether the user identification code corresponding to the second hash value is the same as the user identification code of the network file.
第一确定单元123,用于若所述第二哈希值对应的用户标识码与所述网络文件对应的用户标识码不相同,确定所述网络文件的文件属性为共享文件。若所述第二哈希值对应的用户标识码与所述网络文件的用户标识码相同确定所述网络文件的文件属性为非共享文件。The first determining unit 123 is configured to determine that the file attribute of the network file is a shared file if the user identification code corresponding to the second hash value is different from the user identification code corresponding to the network file. If the user identification code corresponding to the second hash value is the same as the user identification code of the network file, it is determined that the file attribute of the network file is a non-shared file.
检测单元130,用于若所述网络文件的文件属性为共享文件,检测所述引用计数是否等于零。The detection unit 130 is configured to detect whether the reference count is equal to zero if the file attribute of the network file is a shared file.
删除单元140,用于若所述引用计数等于零,根据所述网络文件的热度值对所述网络文件进行删除操作。The deleting unit 140 is configured to delete the network file according to the heat value of the network file if the reference count is equal to zero.
在一些实施例中,如图10所示,所述删除单元140包括第一计算单元141、第三判断单元142、第三处理单元143a以及第四处理单元143b。In some embodiments, as shown in FIG. 10, the deletion unit 140 includes a first calculation unit 141, a third judgment unit 142, a third processing unit 143a, and a fourth processing unit 143b.
第一计算单元141,用于计算所述网络文件的热度值。The first calculation unit 141 is used to calculate the heat value of the network file.
在一些实施例中,如图11所示,所述第一计算单元141包括第二计算单元1411、第三计算单元1412以及第四计算单元1413。In some embodiments, as shown in FIG. 11, the first calculation unit 141 includes a second calculation unit 1411, a third calculation unit 1412, and a fourth calculation unit 1413.
第二计算单元1411,用于计算预设时间段内所述网络文件的创建次数以及获取创建所述网络文件对应的用户标识码。The second calculation unit 1411 is configured to calculate the number of times the network file is created within a preset time period and acquire the user identification code corresponding to the creation of the network file.
第三计算单元1412,用于计算所述网络文件对应的用户标识码相同的相同个数。The third calculation unit 1412 is configured to calculate the same number of user identification codes corresponding to the network file.
第四计算单元1413,用于根据所述创建次数以及所述相同个数计算得出所述热度值。The fourth calculation unit 1413 is configured to calculate the heat value according to the number of creation times and the same number.
第三判断单元142,用于判断所述热度值是否大于预设的热度阈值。The third determining unit 142 is configured to determine whether the heat value is greater than a preset heat threshold.
第三处理单元143a,用于若所述热度值大于预设的热度阈值,在预设的第一时间阈值触发后删除所述网络文件。The third processing unit 143a is configured to delete the network file after the preset first time threshold is triggered if the heat value is greater than the preset heat threshold.
第四处理单元143b,用于若所述热度值小于或者等于预设的热度阈值,在预设的第二时间阈值触发后删除所述网络文件。The fourth processing unit 143b is configured to delete the network file after the preset second time threshold is triggered if the heat value is less than or equal to the preset heat threshold.
上述装置100可以实现为一种计算机程序的形式,计算机程序可以在如图12所示的计算机设备上运行。The above apparatus 100 may be implemented in the form of a computer program, and the computer program may run on the computer device shown in FIG. 12.
请参阅图12,图12是本申请实施例提供的一种计算机设备的示意性框图。该计算机设备500可以是终端。该终端可以是智能手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等具有通信功能的电子设备。Please refer to FIG. 12, which is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a terminal. The terminal may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, and other electronic devices with communication functions.
该计算机设备500包括通过***总线510连接的处理器520、存储器和网络接口550,其中,存储器可以包括非易失性存储介质530和内存储器540。该非易失性存储介质530可存储操作***531和计算机程序532。该计算机程序532被执行时,可使得处理器520执行一种网络文件删除方法。The computer device 500 includes a processor 520, a memory, and a network interface 550 connected through a system bus 510, where the memory may include a non-volatile storage medium 530 and an internal memory 540. The non-volatile storage medium 530 may store an operating system 531 and a computer program 532. When the computer program 532 is executed, it may cause the processor 520 to execute a network file deletion method.
该处理器520用于提供计算和控制能力,支撑整个计算机设备500的运行。The processor 520 is used to provide computing and control capabilities and support the operation of the entire computer device 500.
该内存储器540为非易失性存储介质中的计算机程序的运行提供环境,该计算机程序被处理器520执行时,可使得处理器520执行一种网络文件删除方法。The internal memory 540 provides an environment for running a computer program in a non-volatile storage medium. When the computer program is executed by the processor 520, the processor 520 may execute a network file deletion method.
该网络接口550用于与其它设备进行网络通信。本领域技术人员可以理解,该计算机设备的示意性框图仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。其中,所述处理器520用于运行存储在存储器中的程序代码,以实现本申请实施例的网络文件删除方法。The network interface 550 is used for network communication with other devices. Those skilled in the art may understand that the schematic block diagram of the computer device 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 500 to which the solution of the present application is applied. The specific computer device 500 It may include more or less components than shown in the figure, or combine certain components, or have a different arrangement of components. Wherein, the processor 520 is used to run the program code stored in the memory, so as to implement the network file deletion method of the embodiment of the present application.
应当理解,在本申请实施例中,处理器520可以是中央处理单元(Central Processing Unit,CPU),该处理器520还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that in the embodiment of the present application, the processor 520 may be a central processing unit (Central Processing Unit, CPU), and the processor 520 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), Application specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor.
本领域技术人员可以理解,该计算机设备500的示意性框图并不构成对计算机设备500的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。A person skilled in the art may understand that the schematic block diagram of the computer device 500 does not constitute a limitation on the computer device 500, and may include more or less components than shown, or combine certain components, or arrange different components.
在本申请的另一实施例中提供一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,其中计算机程序包括程序指令。该计算机程序被处理器执行时使处理器执行以上各实施例中所描述的网络文件删除方法的步骤。In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, where the computer program includes program instructions. When the computer program is executed by the processor, the processor is caused to execute the steps of the network file deletion method described in the above embodiments.
该计算机可读存储介质可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The computer-readable storage medium may be various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk, or an optical disk.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示 例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Persons of ordinary skill in the art may realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two, in order to clearly explain the hardware and software. Interchangeability, in the above description, the composition and steps of each example have been described generally in terms of function. Whether these functions are executed in hardware or software depends on the specific application of the technical solution and design constraints. Professional technicians can 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. Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working processes of the devices and units described above can refer to the corresponding processes in the foregoing method embodiments, which are not repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的。例如,各个单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。例如一个以上单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。In the several embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, more than one unit or component may be combined or integrated into another system, or some features may be ignored or not implemented.
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。本申请实施例装置中的单元可以根据实际需要进行合并、划分和删减。The steps in the method of the embodiment of the present application may be adjusted, merged, and deleted sequentially according to actual needs. The units in the device of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The above integrated unit may be implemented in the form of hardware or software functional unit.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,终端,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application essentially or part of the contribution to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium In it, several instructions are included to enable a computer device (which may be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above is only the specific implementation of this application, but the scope of protection of this application is not limited to this, any person skilled in the art can easily think of various equivalents within the technical scope disclosed in this application Modifications or replacements, these modifications or replacements should be covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种网络文件删除方法,所述方法包括:A network file deletion method, the method includes:
    接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数;Receiving the operation instruction of the client on the network file and updating the reference count corresponding to the network file according to the operation instruction;
    判断所述网络文件的文件属性是否为共享文件;Determine whether the file attribute of the network file is a shared file;
    若所述网络文件的文件属性为共享文件,检测所述引用计数是否等于零;If the file attribute of the network file is a shared file, check whether the reference count is equal to zero;
    若所述引用计数等于零,根据所述网络文件的热度值对所述网络文件进行删除操作。If the reference count is equal to zero, delete the network file according to the heat value of the network file.
  2. 如权利要求1所述的方法,其中,所述操作指令的类型包括创建指令以及删除指令,所述接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数,包括:The method according to claim 1, wherein the type of the operation instruction includes a creation instruction and a deletion instruction, the receiving client's operation instruction on the network file and updating the reference count corresponding to the network file according to the operation instruction ,include:
    接收客户端对网络文件的操作指令并获取所述操作指令的类型;Receiving the operation instruction of the client on the network file and obtaining the type of the operation instruction;
    若所接收到的操作指令的类型为创建指令,将所述引用计数加一;If the type of the received operation instruction is a creation instruction, increase the reference count by one;
    若所接收到的操作指令的类型为删除指令,将所述引用计数减一。If the type of the received operation instruction is a delete instruction, the reference count is decremented by one.
  3. 如权利要求1所述的方法,其中,所述判断所述网络文件的文件属性是否为共享文件,包括:The method of claim 1, wherein the determining whether the file attribute of the network file is a shared file includes:
    获取网络文件对应的第一哈希值以及用户标识码,并判断预设的文件索引数据库是否存在与所述第一哈希值相同的第二哈希值;Obtain the first hash value corresponding to the network file and the user identification code, and determine whether the preset file index database has a second hash value that is the same as the first hash value;
    若预设的文件索引数据库存在与所述第一哈希值相同的第二哈希值,获取所述第二哈希值对应的用户标识码,并判断所述第二哈希值对应的用户标识码与所述网络文件的用户标识码是否相同;If the preset file index database has a second hash value that is the same as the first hash value, obtain the user identification code corresponding to the second hash value, and determine the user corresponding to the second hash value Whether the identification code is the same as the user identification code of the network file;
    若所述第二哈希值对应的用户标识码与所述网络文件对应的用户标识码不相同,确定所述网络文件的文件属性为共享文件。If the user identification code corresponding to the second hash value is different from the user identification code corresponding to the network file, it is determined that the file attribute of the network file is a shared file.
  4. 如权利要求1所述的方法,其中,所述根据所述网络文件的热度值对所述网络文件进行删除操作,包括:The method of claim 1, wherein the deleting the network file according to the heat value of the network file comprises:
    计算所述网络文件的热度值;Calculating the heat value of the network file;
    判断所述热度值是否大于预设的热度阈值;Determine whether the heat value is greater than a preset heat threshold;
    若所述热度值大于预设的热度阈值,在预设的第一时间阈值触发后删除所述网络文件;If the heat value is greater than a preset heat threshold, delete the network file after the preset first time threshold is triggered;
    若所述热度值小于或者等于预设的热度阈值,在预设的第二时间阈值触发后删除所述网络文件。If the heat value is less than or equal to a preset heat threshold, delete the network file after the preset second time threshold is triggered.
  5. 如权利要求4所述的方法,其中,所述计算所述网络文件的热度值,包括:The method according to claim 4, wherein the calculating the heat value of the network file comprises:
    计算预设时间段内所述网络文件的创建次数以及获取创建所述网络文件对应的用户标识码;Calculating the number of times the network file is created within a preset time period and obtaining the user identification code corresponding to the creation of the network file;
    计算所述网络文件对应的用户标识码相同的相同个数;Calculating the same number of the same user identification codes corresponding to the network files;
    根据所述创建次数以及所述相同个数计算得出所述热度值。The heat value is calculated according to the number of creation times and the same number.
  6. 如权利要求3所述的方法,其中,所述判断所述网络文件的文件属性是否为共享文件,还包括:The method of claim 3, wherein the determining whether the file attribute of the network file is a shared file further comprises:
    若所述第二哈希值对应的用户标识码与所述网络文件的用户标识码相同,确定所述网络文件的文件属性为非共享文件。If the user identification code corresponding to the second hash value is the same as the user identification code of the network file, it is determined that the file attribute of the network file is a non-shared file.
  7. 如权利要求3所述的方法,其中,所述获取网络文件对应的第一哈希值,包括:通过预设的哈希算法计算得出网络文件对应的第一哈希值;其中,所述预设的哈希算法包括强哈希算法以及弱哈希算法。The method of claim 3, wherein the acquiring the first hash value corresponding to the network file comprises: calculating the first hash value corresponding to the network file through a preset hash algorithm; wherein, the The preset hash algorithm includes a strong hash algorithm and a weak hash algorithm.
  8. 一种网络文件删除装置,所述装置包括:A network file deletion device, the device includes:
    第一接收单元,用于接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数;The first receiving unit is configured to receive an operation instruction of the client on the network file and update the reference count corresponding to the network file according to the operation instruction;
    第一判断单元,用于判断所述网络文件的文件属性是否为共享文件;A first judging unit, used to judge whether the file attribute of the network file is a shared file;
    检测单元,用于若所述网络文件的文件属性为共享文件,检测所述引用计数是否等于零;A detection unit, configured to detect whether the reference count is equal to zero if the file attribute of the network file is a shared file;
    删除单元,用于若所述引用计数等于零,根据所述网络文件的热度值对所述网络文件进行删除操作。The deleting unit is configured to delete the network file according to the heat value of the network file if the reference count is equal to zero.
  9. 如权利要求8所述的装置,其中,所述操作指令的类型包括创建指令以及删除指令,所述第一接收单元包括:The apparatus of claim 8, wherein the type of the operation instruction includes a creation instruction and a deletion instruction, and the first receiving unit includes:
    类型获取单元,用于接收客户端对网络文件的操作指令并获取所述操作指令的类型;A type obtaining unit, configured to receive an operation instruction of a client on a network file and obtain the type of the operation instruction;
    第一处理单元,用于若所接收到的操作指令的类型为创建指令,将所述引用计数加一;The first processing unit is configured to increase the reference count by one if the type of the received operation instruction is a creation instruction;
    第二处理单元,用于若所接收到的操作指令的类型为删除指令,将所述引用计数减一。The second processing unit is configured to decrement the reference count by one if the type of the received operation instruction is a delete instruction.
  10. 如权利要求8所述的装置,其中,所述第一判断单元包括:The apparatus of claim 8, wherein the first judgment unit comprises:
    第二获取单元,用于获取网络文件对应的第一哈希值以及用户标识码,并判断预设的文件索引数据库是否存在与所述第一哈希值相同的第二哈希值;A second obtaining unit, configured to obtain the first hash value corresponding to the network file and the user identification code, and determine whether the preset file index database has the same second hash value as the first hash value;
    第二判断单元,用于若预设的文件索引数据库存在与所述第一哈希值相同的第二哈希值,获取所述第二哈希值对应的用户标识码,并判断所述第二哈希值对应的用户标识码与所述网络文件的用户标识码是否相同;A second judgment unit, configured to obtain a user identification code corresponding to the second hash value if the preset file index database has the same second hash value as the first hash value, and judge the first Whether the user identification code corresponding to the second hash value is the same as the user identification code of the network file;
    第一确定单元,用于若所述第二哈希值对应的用户标识码与所述网络文件对应的用户标识码不相同,确定所述网络文件的文件属性为共享文件。The first determining unit is configured to determine that the file attribute of the network file is a shared file if the user identification code corresponding to the second hash value is different from the user identification code corresponding to the network file.
  11. 一种计算机设备,包括存储器以及与所述存储器相连的处理器;所述存储器用于存储计算机程序;所述处理器用于运行所述存储器中存储的计算机程序,以执行如下步骤:A computer device includes a memory and a processor connected to the memory; the memory is used to store a computer program; the processor is used to run the computer program stored in the memory to perform the following steps:
    接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数;Receiving the operation instruction of the client on the network file and updating the reference count corresponding to the network file according to the operation instruction;
    判断所述网络文件的文件属性是否为共享文件;Determine whether the file attribute of the network file is a shared file;
    若所述网络文件的文件属性为共享文件,检测所述引用计数是否等于零;If the file attribute of the network file is a shared file, check whether the reference count is equal to zero;
    若所述引用计数等于零,根据所述网络文件的热度值对所述网络文件进行删除操作。If the reference count is equal to zero, delete the network file according to the heat value of the network file.
  12. 如权利要求11所述的计算机设备,其中,所述操作指令的类型包括创建指令以及删除指令,所述接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数,包括:The computer device according to claim 11, wherein the type of the operation instruction includes a creation instruction and a deletion instruction, the receiving client's operation instruction on the network file and updating the reference corresponding to the network file according to the operation instruction Count, including:
    接收客户端对网络文件的操作指令并获取所述操作指令的类型;Receiving the operation instruction of the client on the network file and obtaining the type of the operation instruction;
    若所接收到的操作指令的类型为创建指令,将所述引用计数加一;If the type of the received operation instruction is a creation instruction, increase the reference count by one;
    若所接收到的操作指令的类型为删除指令,将所述引用计数减一。If the type of the received operation instruction is a delete instruction, the reference count is decremented by one.
  13. 如权利要求11所述的计算机设备,其中,所述判断所述网络文件的文件属性是否为共享文件,包括:The computer device according to claim 11, wherein the judging whether the file attribute of the network file is a shared file includes:
    获取网络文件对应的第一哈希值以及用户标识码,并判断预设的文件索引数据库是否存在与所述第一哈希值相同的第二哈希值;Obtain the first hash value corresponding to the network file and the user identification code, and determine whether the preset file index database has a second hash value that is the same as the first hash value;
    若预设的文件索引数据库存在与所述第一哈希值相同的第二哈希值,获取所述第二哈希值对应的用户标识码,并判断所述第二哈希值对应的用户标识码与所述网络文件的用户标识码是否相同;If the preset file index database has a second hash value that is the same as the first hash value, obtain the user identification code corresponding to the second hash value, and determine the user corresponding to the second hash value Whether the identification code is the same as the user identification code of the network file;
    若所述第二哈希值对应的用户标识码与所述网络文件对应的用户标识码不相同,确定所述网络文件的文件属性为共享文件。If the user identification code corresponding to the second hash value is different from the user identification code corresponding to the network file, it is determined that the file attribute of the network file is a shared file.
  14. 如权利要求11所述的计算机设备,其中,所述根据所述网络文件的热度值对所述网络文件进行删除操作,包括:The computer device according to claim 11, wherein the deleting the network file according to the heat value of the network file includes:
    计算所述网络文件的热度值;Calculating the heat value of the network file;
    判断所述热度值是否大于预设的热度阈值;Determine whether the heat value is greater than a preset heat threshold;
    若所述热度值大于预设的热度阈值,在预设的第一时间阈值触发后删除所述网络文件;If the heat value is greater than a preset heat threshold, delete the network file after the preset first time threshold is triggered;
    若所述热度值小于或者等于预设的热度阈值,在预设的第二时间阈值触发后删除所述网络文件。If the heat value is less than or equal to a preset heat threshold, delete the network file after the preset second time threshold is triggered.
  15. 如权利要求14所述的计算机设备,其中,所述计算所述网络文件的热度值,包括:The computer device according to claim 14, wherein the calculating the heat value of the network file comprises:
    计算预设时间段内所述网络文件的创建次数以及获取创建所述网络文件对应的用户标识码;Calculating the number of times the network file is created within a preset time period and obtaining the user identification code corresponding to the creation of the network file;
    计算所述网络文件对应的用户标识码相同的相同个数;Calculating the same number of the same user identification codes corresponding to the network files;
    根据所述创建次数以及所述相同个数计算得出所述热度值。The heat value is calculated according to the number of creation times and the same number.
  16. 如权利要求13所述的计算机设备,其中,所述判断所述网络文件的文件属性是否为共享文件,还包括:The computer device according to claim 13, wherein the determining whether the file attribute of the network file is a shared file further comprises:
    若所述第二哈希值对应的用户标识码与所述网络文件的用户标识码相同,确定所述网络文件的文件属性为非共享文件。If the user identification code corresponding to the second hash value is the same as the user identification code of the network file, it is determined that the file attribute of the network file is a non-shared file.
  17. 如权利要求13所述的计算机设备,其中,所述获取网络文件对应的第一哈希值,包括:通过预设的哈希算法计算得出网络文件对应的第一哈希值;其中,所述预设的哈希算法包括强哈希算法以及弱哈希算法。The computer device according to claim 13, wherein the acquiring the first hash value corresponding to the network file comprises: calculating the first hash value corresponding to the network file through a preset hash algorithm; wherein, the The preset hash algorithm includes a strong hash algorithm and a weak hash algorithm.
  18. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器执行以下步骤:A computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, causes the processor to perform the following steps:
    接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数;Receiving the operation instruction of the client on the network file and updating the reference count corresponding to the network file according to the operation instruction;
    判断所述网络文件的文件属性是否为共享文件;Determine whether the file attribute of the network file is a shared file;
    若所述网络文件的文件属性为共享文件,检测所述引用计数是否等于零;If the file attribute of the network file is a shared file, check whether the reference count is equal to zero;
    若所述引用计数等于零,根据所述网络文件的热度值对所述网络文件进行 删除操作。If the reference count is equal to zero, delete the network file according to the heat value of the network file.
  19. 如权利要求18所述的计算机可读存储介质,其中,所述操作指令的类型包括创建指令以及删除指令,所述接收客户端对网络文件的操作指令并根据所述操作指令更新所述网络文件对应的引用计数,包括:The computer-readable storage medium according to claim 18, wherein the types of the operation instructions include creation instructions and deletion instructions, the receiving operation instructions of the client on the network file and updating the network file according to the operation instructions The corresponding reference count includes:
    接收客户端对网络文件的操作指令并获取所述操作指令的类型;Receiving the operation instruction of the client on the network file and obtaining the type of the operation instruction;
    若所接收到的操作指令的类型为创建指令,将所述引用计数加一;If the type of the received operation instruction is a creation instruction, increase the reference count by one;
    若所接收到的操作指令的类型为删除指令,将所述引用计数减一。If the type of the received operation instruction is a delete instruction, the reference count is decremented by one.
  20. 如权利要求18所述的计算机可读存储介质,其中,所述判断所述网络文件的文件属性是否为共享文件,包括:The computer-readable storage medium of claim 18, wherein the determining whether the file attribute of the network file is a shared file includes:
    获取网络文件对应的第一哈希值以及用户标识码,并判断预设的文件索引数据库是否存在与所述第一哈希值相同的第二哈希值;Obtain the first hash value corresponding to the network file and the user identification code, and determine whether the preset file index database has a second hash value that is the same as the first hash value;
    若预设的文件索引数据库存在与所述第一哈希值相同的第二哈希值,获取所述第二哈希值对应的用户标识码,并判断所述第二哈希值对应的用户标识码与所述网络文件的用户标识码是否相同;If the preset file index database has a second hash value that is the same as the first hash value, obtain the user identification code corresponding to the second hash value, and determine the user corresponding to the second hash value Whether the identification code is the same as the user identification code of the network file;
    若所述第二哈希值对应的用户标识码与所述网络文件对应的用户标识码不相同,确定所述网络文件的文件属性为共享文件。If the user identification code corresponding to the second hash value is different from the user identification code corresponding to the network file, it is determined that the file attribute of the network file is a shared file.
PCT/CN2019/093137 2018-12-04 2019-06-27 Network file deletion method and device, computer device and storage medium WO2020113947A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811472659.1 2018-12-04
CN201811472659.1A CN109597798B (en) 2018-12-04 Network file deleting method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020113947A1 true WO2020113947A1 (en) 2020-06-11

Family

ID=65960659

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093137 WO2020113947A1 (en) 2018-12-04 2019-06-27 Network file deletion method and device, computer device and storage medium

Country Status (1)

Country Link
WO (1) WO2020113947A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102419770A (en) * 2011-11-23 2012-04-18 中兴通讯股份有限公司 File sharing system, method for realizing file sharing, and file index service equipment
CN102866995A (en) * 2011-07-05 2013-01-09 中兴通讯股份有限公司 File access method for PPN (Peer-to-Peer Network), management method and distributed file system
CN104426955A (en) * 2013-08-28 2015-03-18 北大方正集团有限公司 Processing method of shared file, and cloud storage server
US20180276238A1 (en) * 2017-03-23 2018-09-27 International Business Machines Corporation Parallel deduplication using automatic chunk sizing
CN109597798A (en) * 2018-12-04 2019-04-09 平安科技(深圳)有限公司 Network file delet method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102866995A (en) * 2011-07-05 2013-01-09 中兴通讯股份有限公司 File access method for PPN (Peer-to-Peer Network), management method and distributed file system
CN102419770A (en) * 2011-11-23 2012-04-18 中兴通讯股份有限公司 File sharing system, method for realizing file sharing, and file index service equipment
CN104426955A (en) * 2013-08-28 2015-03-18 北大方正集团有限公司 Processing method of shared file, and cloud storage server
US20180276238A1 (en) * 2017-03-23 2018-09-27 International Business Machines Corporation Parallel deduplication using automatic chunk sizing
CN109597798A (en) * 2018-12-04 2019-04-09 平安科技(深圳)有限公司 Network file delet method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109597798A (en) 2019-04-09

Similar Documents

Publication Publication Date Title
CN109586969B (en) Content distribution network disaster tolerance method and device, computer equipment and storage medium
US10324814B2 (en) Faster reconstruction of segments using a spare memory unit
US8918375B2 (en) Content aware chunking for achieving an improved chunk size distribution
US9836287B2 (en) Storage optimization in computing devices
US10855759B2 (en) Utilizing a hierarchical index in a dispersed storage network
US20180285014A1 (en) Data storage method and apparatus
WO2020093501A1 (en) File storage method and deletion method, server, and storage medium
US11514003B2 (en) Data compression based on key-value store
WO2020147403A1 (en) Cloud storage based file processing method, system and computer device
CN110888603B (en) High concurrency data writing method, device, computer equipment and storage medium
CN114564446A (en) File storage method, device, system and storage medium
CN109842518B (en) Content distribution network disaster tolerance method and device, computer equipment and storage medium
US10572433B2 (en) Accessing data in accordance with an execution deadline
CN112667636B (en) Index establishing method, device and storage medium
WO2021068605A1 (en) Data persistence storage method and apparatus, computer device and storage medium
WO2020113947A1 (en) Network file deletion method and device, computer device and storage medium
CN109597798B (en) Network file deleting method and device, computer equipment and storage medium
CN116226905A (en) Distributed database current limiting method, current limiting device, system and electronic equipment
WO2022001133A1 (en) Method and system for improving soft copy read performance, terminal, and storage medium
WO2021227130A1 (en) Heterogeneous network community detection method, device, computer apparatus, and storage medium
CN110555158A (en) mutually exclusive data processing method and system, and computer readable storage medium
CN110351330B (en) Data uploading method and device, computer equipment and storage medium
CN110209512B (en) Data checking method and device based on multiple data sources
WO2022141060A1 (en) Blockchain-based data on-chain method and apparatus, terminal, and storage medium
US11853814B2 (en) Automatically generating events

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19892082

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19892082

Country of ref document: EP

Kind code of ref document: A1